release: public alpha 0.6.0 baseline
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# official
|
||||
|
||||
Official-owned reviewed extensions. Person memory is the only official command plugin in the current inventory.
|
||||
|
||||
Every child directory is generated from the authoritative local extension
|
||||
ownership inventory.
|
||||
@@ -0,0 +1,17 @@
|
||||
# debug-telemetry
|
||||
|
||||
Author: `official`
|
||||
|
||||
埋点 p50/p95
|
||||
|
||||
Help:
|
||||
|
||||
- `/debug`
|
||||
|
||||
Registered commands:
|
||||
|
||||
- `/debug`
|
||||
|
||||
The adapter has no direct Ledger, GUI, environment, shell, or network access.
|
||||
It delegates to the reviewed `debug-telemetry` Kernel service profile
|
||||
and returns a structured `ReplyPlan`.
|
||||
@@ -0,0 +1,14 @@
|
||||
id = "debug-telemetry"
|
||||
author = "official"
|
||||
description = "埋点 p50/p95"
|
||||
help = ["/debug"]
|
||||
version = "1.0.0"
|
||||
api_version = "1"
|
||||
entrypoint = "debug_telemetry:plugin"
|
||||
type = "command"
|
||||
|
||||
[capabilities]
|
||||
commands = ["/debug"]
|
||||
storage = false
|
||||
network_profiles = []
|
||||
service_profiles = ["debug-telemetry"]
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Generated reviewed adapter for debug-telemetry."""
|
||||
|
||||
from jwebot_sdk import Event, ExtensionResult, ReplyPlan, SingleGroupContext
|
||||
|
||||
|
||||
PROFILE = 'debug-telemetry'
|
||||
AUTHOR = 'official'
|
||||
DESCRIPTION = '埋点 p50/p95'
|
||||
HELP_ENTRIES = ('/debug',)
|
||||
COMMANDS = ('/debug',)
|
||||
|
||||
|
||||
def _handler(context: SingleGroupContext, command: str):
|
||||
def handle(event: Event, arguments: str) -> ExtensionResult:
|
||||
response = context.services.call(
|
||||
PROFILE,
|
||||
operation="execute",
|
||||
payload={
|
||||
"command": command,
|
||||
"arguments": arguments,
|
||||
"event": event.to_mapping(),
|
||||
},
|
||||
)
|
||||
text = response.get("text")
|
||||
if not isinstance(text, str) or not text.strip():
|
||||
raise ValueError("local service returned invalid text")
|
||||
return ExtensionResult(
|
||||
reply=ReplyPlan.text(text),
|
||||
metadata={"local_extension": PROFILE, "author": AUTHOR},
|
||||
)
|
||||
|
||||
return handle
|
||||
|
||||
|
||||
def plugin(context: SingleGroupContext) -> None:
|
||||
for command in COMMANDS:
|
||||
context.commands.register(command, _handler(context, command))
|
||||
@@ -0,0 +1,29 @@
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
|
||||
SOURCE = Path(__file__).resolve().parents[1] / "src"
|
||||
sys.path.insert(0, str(SOURCE))
|
||||
|
||||
from debug_telemetry import AUTHOR, DESCRIPTION, HELP_ENTRIES, plugin
|
||||
|
||||
|
||||
class PluginTests(unittest.TestCase):
|
||||
def test_registers_declared_commands_and_author(self):
|
||||
context = mock.Mock()
|
||||
plugin(context)
|
||||
registered = [
|
||||
call.args[0]
|
||||
for call in context.commands.register.call_args_list
|
||||
]
|
||||
self.assertEqual(AUTHOR, 'official')
|
||||
self.assertEqual(DESCRIPTION, '埋点 p50/p95')
|
||||
self.assertEqual(HELP_ENTRIES, ('/debug',))
|
||||
self.assertIn('/debug', registered)
|
||||
self.assertEqual(len(registered), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,17 @@
|
||||
# jwebot-version
|
||||
|
||||
Author: `official`
|
||||
|
||||
JWeBot 版本
|
||||
|
||||
Help:
|
||||
|
||||
- `/version`
|
||||
|
||||
Registered commands:
|
||||
|
||||
- `/version`
|
||||
|
||||
The adapter has no direct Ledger, GUI, environment, shell, or network access.
|
||||
It delegates to the reviewed `jwebot-version` Kernel service profile
|
||||
and returns a structured `ReplyPlan`.
|
||||
@@ -0,0 +1,14 @@
|
||||
id = "jwebot-version"
|
||||
author = "official"
|
||||
description = "JWeBot 版本"
|
||||
help = ["/version"]
|
||||
version = "1.0.0"
|
||||
api_version = "1"
|
||||
entrypoint = "jwebot_version:plugin"
|
||||
type = "command"
|
||||
|
||||
[capabilities]
|
||||
commands = ["/version"]
|
||||
storage = false
|
||||
network_profiles = []
|
||||
service_profiles = ["jwebot-version"]
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Generated reviewed adapter for jwebot-version."""
|
||||
|
||||
from jwebot_sdk import Event, ExtensionResult, ReplyPlan, SingleGroupContext
|
||||
|
||||
|
||||
PROFILE = 'jwebot-version'
|
||||
AUTHOR = 'official'
|
||||
DESCRIPTION = 'JWeBot 版本'
|
||||
HELP_ENTRIES = ('/version',)
|
||||
COMMANDS = ('/version',)
|
||||
|
||||
|
||||
def _handler(context: SingleGroupContext, command: str):
|
||||
def handle(event: Event, arguments: str) -> ExtensionResult:
|
||||
response = context.services.call(
|
||||
PROFILE,
|
||||
operation="execute",
|
||||
payload={
|
||||
"command": command,
|
||||
"arguments": arguments,
|
||||
"event": event.to_mapping(),
|
||||
},
|
||||
)
|
||||
text = response.get("text")
|
||||
if not isinstance(text, str) or not text.strip():
|
||||
raise ValueError("local service returned invalid text")
|
||||
return ExtensionResult(
|
||||
reply=ReplyPlan.text(text),
|
||||
metadata={"local_extension": PROFILE, "author": AUTHOR},
|
||||
)
|
||||
|
||||
return handle
|
||||
|
||||
|
||||
def plugin(context: SingleGroupContext) -> None:
|
||||
for command in COMMANDS:
|
||||
context.commands.register(command, _handler(context, command))
|
||||
@@ -0,0 +1,29 @@
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
|
||||
SOURCE = Path(__file__).resolve().parents[1] / "src"
|
||||
sys.path.insert(0, str(SOURCE))
|
||||
|
||||
from jwebot_version import AUTHOR, DESCRIPTION, HELP_ENTRIES, plugin
|
||||
|
||||
|
||||
class PluginTests(unittest.TestCase):
|
||||
def test_registers_declared_commands_and_author(self):
|
||||
context = mock.Mock()
|
||||
plugin(context)
|
||||
registered = [
|
||||
call.args[0]
|
||||
for call in context.commands.register.call_args_list
|
||||
]
|
||||
self.assertEqual(AUTHOR, 'official')
|
||||
self.assertEqual(DESCRIPTION, 'JWeBot 版本')
|
||||
self.assertEqual(HELP_ENTRIES, ('/version',))
|
||||
self.assertIn('/version', registered)
|
||||
self.assertEqual(len(registered), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,21 @@
|
||||
# person-memory
|
||||
|
||||
Author: `official`
|
||||
|
||||
管理个人和同群人物记忆
|
||||
|
||||
Help:
|
||||
|
||||
- `/记住 内容;/我的记忆;/忘记 关键词或全部;/人物记忆 [显示名]`
|
||||
|
||||
Registered commands:
|
||||
|
||||
- `/记住`
|
||||
- `/我的记忆`
|
||||
- `/忘记`
|
||||
- `/人物记忆`
|
||||
- `/记忆帮助`
|
||||
|
||||
The adapter has no direct Ledger, GUI, environment, shell, or network access.
|
||||
It delegates to the reviewed `person-memory` Kernel service profile
|
||||
and returns a structured `ReplyPlan`.
|
||||
@@ -0,0 +1,14 @@
|
||||
id = "person-memory"
|
||||
author = "official"
|
||||
description = "管理个人和同群人物记忆"
|
||||
help = ["/记住 内容;/我的记忆;/忘记 关键词或全部;/人物记忆 [显示名]"]
|
||||
version = "1.0.0"
|
||||
api_version = "1"
|
||||
entrypoint = "person_memory:plugin"
|
||||
type = "command"
|
||||
|
||||
[capabilities]
|
||||
commands = ["/记住", "/我的记忆", "/忘记", "/人物记忆", "/记忆帮助"]
|
||||
storage = false
|
||||
network_profiles = []
|
||||
service_profiles = ["person-memory"]
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Generated reviewed adapter for person-memory."""
|
||||
|
||||
from jwebot_sdk import Event, ExtensionResult, ReplyPlan, SingleGroupContext
|
||||
|
||||
|
||||
PROFILE = 'person-memory'
|
||||
AUTHOR = 'official'
|
||||
DESCRIPTION = '管理个人和同群人物记忆'
|
||||
HELP_ENTRIES = ('/记住 内容;/我的记忆;/忘记 关键词或全部;/人物记忆 [显示名]',)
|
||||
COMMANDS = ('/记住', '/我的记忆', '/忘记', '/人物记忆', '/记忆帮助')
|
||||
|
||||
|
||||
def _handler(context: SingleGroupContext, command: str):
|
||||
def handle(event: Event, arguments: str) -> ExtensionResult:
|
||||
response = context.services.call(
|
||||
PROFILE,
|
||||
operation="execute",
|
||||
payload={
|
||||
"command": command,
|
||||
"arguments": arguments,
|
||||
"event": event.to_mapping(),
|
||||
},
|
||||
)
|
||||
text = response.get("text")
|
||||
if not isinstance(text, str) or not text.strip():
|
||||
raise ValueError("local service returned invalid text")
|
||||
return ExtensionResult(
|
||||
reply=ReplyPlan.text(text),
|
||||
metadata={"local_extension": PROFILE, "author": AUTHOR},
|
||||
)
|
||||
|
||||
return handle
|
||||
|
||||
|
||||
def plugin(context: SingleGroupContext) -> None:
|
||||
for command in COMMANDS:
|
||||
context.commands.register(command, _handler(context, command))
|
||||
@@ -0,0 +1,29 @@
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
|
||||
SOURCE = Path(__file__).resolve().parents[1] / "src"
|
||||
sys.path.insert(0, str(SOURCE))
|
||||
|
||||
from person_memory import AUTHOR, DESCRIPTION, HELP_ENTRIES, plugin
|
||||
|
||||
|
||||
class PluginTests(unittest.TestCase):
|
||||
def test_registers_declared_commands_and_author(self):
|
||||
context = mock.Mock()
|
||||
plugin(context)
|
||||
registered = [
|
||||
call.args[0]
|
||||
for call in context.commands.register.call_args_list
|
||||
]
|
||||
self.assertEqual(AUTHOR, 'official')
|
||||
self.assertEqual(DESCRIPTION, '管理个人和同群人物记忆')
|
||||
self.assertEqual(HELP_ENTRIES, ('/记住 内容;/我的记忆;/忘记 关键词或全部;/人物记忆 [显示名]',))
|
||||
self.assertIn('/记住', registered)
|
||||
self.assertEqual(len(registered), 5)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,18 @@
|
||||
# server-status
|
||||
|
||||
Author: `official`
|
||||
|
||||
服务器状态
|
||||
|
||||
Help:
|
||||
|
||||
- `/状态;/status`
|
||||
|
||||
Registered commands:
|
||||
|
||||
- `/状态`
|
||||
- `/status`
|
||||
|
||||
The adapter has no direct Ledger, GUI, environment, shell, or network access.
|
||||
It delegates to the reviewed `server-status` Kernel service profile
|
||||
and returns a structured `ReplyPlan`.
|
||||
@@ -0,0 +1,14 @@
|
||||
id = "server-status"
|
||||
author = "official"
|
||||
description = "服务器状态"
|
||||
help = ["/状态;/status"]
|
||||
version = "1.0.0"
|
||||
api_version = "1"
|
||||
entrypoint = "server_status:plugin"
|
||||
type = "command"
|
||||
|
||||
[capabilities]
|
||||
commands = ["/状态", "/status"]
|
||||
storage = false
|
||||
network_profiles = []
|
||||
service_profiles = ["server-status"]
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Generated reviewed adapter for server-status."""
|
||||
|
||||
from jwebot_sdk import Event, ExtensionResult, ReplyPlan, SingleGroupContext
|
||||
|
||||
|
||||
PROFILE = 'server-status'
|
||||
AUTHOR = 'official'
|
||||
DESCRIPTION = '服务器状态'
|
||||
HELP_ENTRIES = ('/状态;/status',)
|
||||
COMMANDS = ('/状态', '/status')
|
||||
|
||||
|
||||
def _handler(context: SingleGroupContext, command: str):
|
||||
def handle(event: Event, arguments: str) -> ExtensionResult:
|
||||
response = context.services.call(
|
||||
PROFILE,
|
||||
operation="execute",
|
||||
payload={
|
||||
"command": command,
|
||||
"arguments": arguments,
|
||||
"event": event.to_mapping(),
|
||||
},
|
||||
)
|
||||
text = response.get("text")
|
||||
if not isinstance(text, str) or not text.strip():
|
||||
raise ValueError("local service returned invalid text")
|
||||
return ExtensionResult(
|
||||
reply=ReplyPlan.text(text),
|
||||
metadata={"local_extension": PROFILE, "author": AUTHOR},
|
||||
)
|
||||
|
||||
return handle
|
||||
|
||||
|
||||
def plugin(context: SingleGroupContext) -> None:
|
||||
for command in COMMANDS:
|
||||
context.commands.register(command, _handler(context, command))
|
||||
@@ -0,0 +1,29 @@
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
|
||||
SOURCE = Path(__file__).resolve().parents[1] / "src"
|
||||
sys.path.insert(0, str(SOURCE))
|
||||
|
||||
from server_status import AUTHOR, DESCRIPTION, HELP_ENTRIES, plugin
|
||||
|
||||
|
||||
class PluginTests(unittest.TestCase):
|
||||
def test_registers_declared_commands_and_author(self):
|
||||
context = mock.Mock()
|
||||
plugin(context)
|
||||
registered = [
|
||||
call.args[0]
|
||||
for call in context.commands.register.call_args_list
|
||||
]
|
||||
self.assertEqual(AUTHOR, 'official')
|
||||
self.assertEqual(DESCRIPTION, '服务器状态')
|
||||
self.assertEqual(HELP_ENTRIES, ('/状态;/status',))
|
||||
self.assertIn('/状态', registered)
|
||||
self.assertEqual(len(registered), 2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user