Files
plugins/packages/aelios/package.json
T
sakisakisa-design 33027a8fb8 aelios 0.1.0: Aelios memory recall and opt-in recording as gateway hooks (#549)
New package @magpie-community/gateway-aelios 0.1.0: asynchronous gateway hooks for Aelios memory, by sakisakisa-design (Aelios's author).

- Recall before each human turn, appended after the last user message. Recording of completed turns is opt-in (record: false by default).
- Traffic goes only to the user's own serverUrl (HTTPS or loopback HTTP, redirects refused, a key required). Only local and magpie-key origins by default.
- Local admission: an authenticated, dialogue-free GET /v1/hook/identities decides which model maps to which identity. Unmatched turns, or an unavailable list, send no dialogue.
- The request is slimmed (system prompts, thinking and tool results dropped, historical credentials masked). The recorded reply is slimmed to text and tool calls before the secret check and the send.
- Settings page served by a loopback Bun service (Host, Origin null and per-process token checks).
- The cleanMessageText/appendMemory logic ported from AGPL Aelios is relicensed MIT by its sole author (PR thread).

Run at the reviewed head 620cd47 on mote (macOS, Bun 1.4.2):
- bun test packages/aelios: 178 pass. Full HOME=$(mktemp -d) bun test: 4176 pass, 0 fail. Merged onto main 39de030: 4179 pass, 0 fail. check.mjs: exit 0 at both.
- Broken by hand: recording the raw reply turns 5 tests red; admitting every model turns 11 red.
- Probe against a fake Aelios: no thinking, reasoning, signature or encrypted_content is recorded for Anthropic, Responses or Chat. A secret in visible text skips the record. An unmatched model, or an identities endpoint answering 404, malformed JSON or a network error, sends only the GET.
- Real magpie Bun host (origin/main ceeb73a0f, GatewayBegin/Finish): recall injected, the slimmed record sent, nothing for an unmatched model or a remote origin.
- PR CI: test red only on gcp-ai's browser test 40s timeout (#471, unrelated, passes on mote).

Not tried: a real Aelios deployment, or a real agent behind a running magpie.
2026-10-31 14:52:01 +08:00

52 lines
1.1 KiB
JSON

{
"name": "@magpie-community/gateway-aelios",
"version": "0.1.0",
"description": "Aelios long-term memory for every agent behind magpie: recall before each turn, optional recording after it",
"type": "module",
"files": [
"aelios.hooks.mjs",
"slim.mjs",
"service.mjs",
"probe.mjs",
"page",
"README.md"
],
"keywords": [
"magpie",
"magpie-gateway",
"aelios",
"memory",
"llm-gateway"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/aelios"
},
"magpie": {
"hooks": "./aelios.hooks.mjs",
"options": {
"apiKeyEnv": "AELIOS_API_KEY",
"gatewayTimeoutMs": 5000,
"requestTimeoutMs": 4000,
"recallBackoffMs": 30000,
"record": false,
"port": 3481
},
"page": {
"title": "Aelios",
"file": "page/settings.html",
"icon": "page/icon.svg",
"service": { "port": 3481, "option": "port" }
}
},
"main": "./service.mjs",
"scripts": {
"check": "bun test ./*.test.mjs"
},
"engines": {
"bun": ">=1.4.2"
}
}