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.
36 lines
5.9 KiB
HTML
36 lines
5.9 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<title>Aelios · Settings</title><link rel="icon" href="icon.svg" type="image/svg+xml"><link rel="stylesheet" href="style.css">
|
||
<script src="_magpie/bridge.js" defer></script><script src="i18n.js" defer></script><script src="form.js" defer></script><script src="settings.js" defer></script>
|
||
</head>
|
||
<body><main>
|
||
<header class="page-head"><div><h1>Aelios</h1><p data-t="intro">Memory that follows your agents.</p></div><span id="state" class="badge" role="status" data-t="loading">Loading…</span></header>
|
||
<form id="form" novalidate>
|
||
<fieldset id="editor" disabled>
|
||
<section class="panel" aria-labelledby="connection-title"><div class="section-head"><h2 id="connection-title" data-t="connection">Connection</h2></div>
|
||
<div id="connection-summary" hidden><p id="configured-url"></p><p class="notice" data-t="configuredHelp">Settings are configured. Use the matching list to verify the connection and permissions.</p></div>
|
||
<details id="connection-editor" open><summary id="change-connection" data-t="changeConnection">Change connection</summary>
|
||
<p data-t="connectionIntro">Connect to your Aelios service.</p>
|
||
<div class="fields"><label class="wide" for="url"><span data-t="url">Server URL</span><input id="url" type="url" placeholder="https://your-aelios.workers.dev" autocomplete="off" spellcheck="false" aria-describedby="url-help"><small id="url-help" data-t="urlHelp">HTTPS, or HTTP on localhost. No credentials, query or fragment.</small></label>
|
||
<label class="wide" for="key"><span data-t="key">API key</span><span class="secret"><input id="key" type="password" autocomplete="off" spellcheck="false" autocapitalize="off" aria-describedby="key-help"><button id="show-key" type="button" aria-controls="key" aria-pressed="false" data-t="show">Show</button></span><small id="key-help" data-t="keyHelp">Stored in Magpie’s local plugin settings. Leave blank to use the environment variable.</small></label></div>
|
||
<button id="connect" type="button" disabled data-t="connect">Connect and test</button></details></section>
|
||
<section id="daily-settings" class="panel" aria-labelledby="behavior-title" hidden><div class="section-head"><h2 id="behavior-title" data-t="behavior">Memory behavior</h2></div>
|
||
<label class="toggle-row" for="recall"><span><strong data-t="recall">Recall memory</strong><small data-t="recallHelp">Send the latest turn to Aelios and include relevant memory. On by default.</small></span><input id="recall" type="checkbox" role="switch" checked></label>
|
||
<label class="toggle-row" for="record"><span><strong data-t="record">Record conversations</strong><small data-t="recordHelp">Send completed turns and replies to Aelios to remember. Off by default.</small></span><input id="record" type="checkbox" role="switch"></label>
|
||
</section>
|
||
<section class="panel" aria-labelledby="assignment-title"><h2 id="assignment-title" data-t="assignment">Assistant assignment</h2><p id="assignment-summary"></p></section>
|
||
<details id="advanced" class="panel advanced"><summary data-t="advanced">Advanced settings</summary>
|
||
<div class="fields"><label class="wide" for="identity"><span data-t="identity">Default identity / fallback</span><input id="identity" maxlength="128" placeholder="" autocomplete="off" spellcheck="false" aria-describedby="identity-help"><small id="identity-help" data-t="identityHelp">Leave blank for Aelios to select by model when no routes are configured. With routes, this is the fallback for unmatched requests.</small></label>
|
||
<label for="agents"><span data-t="agents">Limit to agents</span><input id="agents" autocomplete="off" spellcheck="false" placeholder="claude, codex"><small data-t="agentsHelp">Optional, comma separated. Blank includes all agents allowed by the request scope.</small></label>
|
||
<label for="key-env"><span data-t="keyEnv">API key environment variable</span><input id="key-env" placeholder="AELIOS_API_KEY" autocomplete="off" spellcheck="false"><small data-t="keyEnvHelp">Optional. Read from the Magpie host, never from this page.</small></label></div>
|
||
<section aria-labelledby="routes-title"><div class="section-head"><h2 id="routes-title" data-t="routes">Identity routes</h2><p data-t="routesIntro">First match wins. Move a route up to give it priority.</p></div>
|
||
<p class="notice" data-t="routeHelp">Match models and/or agents with comma-separated selectors. Models support * and ignore case; agents match exactly. If both are set, both must match. Unmatched requests are skipped unless a default identity is set.</p>
|
||
<div id="routes"></div><p id="empty-routes" class="empty" data-t="emptyRoutes">No routes. Aelios uses the default identity, or selects by model automatically.</p><button id="add-route" class="secondary" type="button" data-t="addRoute">+ Add route</button><small class="route-limit" data-t="routeLimit">Up to 64 routes. Each route needs an identity and at least one selector.</small></section>
|
||
<label class="toggle-row" for="allow-remote"><span><strong data-t="allowRemote">Allow remote requests</strong><small data-t="allowRemoteHelp">Off by default. Enable recall and recording for remote requests and other gateway keys, subject to the agent filter. Normally only local requests and this computer’s Magpie key are included.</small></span><input id="allow-remote" type="checkbox" role="switch"></label></details>
|
||
</fieldset>
|
||
<footer><div><p id="result" role="status" aria-live="polite" hidden></p><small data-t="saveHelp">Other advanced settings are preserved. Connection tests use saved settings.</small></div><div id="saved-actions" class="actions" hidden><button id="test" type="button" class="secondary" disabled data-t="test">View matching list / retest</button><button id="save" type="button" disabled data-t="save">Save settings</button></div></footer>
|
||
</form><p class="privacy" data-t="privacy">Recall sends conversation context to your configured Aelios service even when recording is off. Connection testing opens Magpie’s local service page.</p>
|
||
</main></body></html>
|