Files
plugins/packages/powercontext/package.json
T
Tsukikage 1e4c8a2b91 powercontext 0.2.0: PowerContext recall and opt-in capture as a gateway hook (#117)
PowerContext as a gateway hook package (@magpie-community/gateway-powercontext 0.2.0): recall from a user-deployed PowerContext service before a request, and opt-in capture of completed conversations, with a connection page that uses only the options/theme bridge. By @Tsukikage7.

Reviewed at c61036e9 (author) plus bff430f9 (maintainer merge of main: README, registry.json and scripts/check.mjs conflicts, both sides kept; check.mjs takes main's identical hooks skip).
All four points of the 10-25 review are fixed: the timing tests give the healthy side 1000 ms and move the backoff with a stubbed Date.now(); the empty page panels are gone; Scope ID is optional on the page as in the hook; both READMEs describe the npm install and the registry lists it.

Run on mote (macOS, Bun 1.4.2, temp HOME) at bff430f9:
- bun scripts/check.mjs: exit 0. Full bun test: 3423 pass, 8 skip, 0 fail.
- packages/powercontext: 107 pass, 5 runs in a row, then 8 runs in parallel, 0 fail each.
- Broken by hand: putting the Scope-required check back in page/settings.js turns the optional-Scope page test red; making the recall backoff expire at once (powercontext.hooks.mjs:336) turns 4 tests red (hung scope/prepare/body and connection-failure backoff).
- Earlier round (10-25): the real package in magpie's Bun host behind the gateway handler, against fake PowerContext and upstream.
Not tried: the page in a browser at this head (the author reports 40 Chromium/WebKit cases), a real PowerContext server.
2026-10-29 21:13:37 +08:00

51 lines
1.3 KiB
JSON

{
"name": "@magpie-community/gateway-powercontext",
"version": "0.2.0",
"description": "PowerContext context recall and asynchronous conversation capture for clients behind Magpie",
"type": "module",
"files": [
"powercontext.hooks.mjs",
"conversation.mjs",
"README.md",
"page"
],
"keywords": [
"magpie",
"magpie-gateway",
"powercontext",
"memory",
"llm-gateway"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/powercontext"
},
"magpie": {
"icon": "https://raw.githubusercontent.com/oceanbase/powercontext/master/src/powercontext/server/dashboard/static/brand/favicon-color.svg",
"hooks": "./powercontext.hooks.mjs",
"options": {
"authorizationEnv": "POWERCONTEXT_AUTHORIZATION",
"gatewayTimeoutMs": 5000,
"requestTimeoutMs": 1000,
"recallBackoffMs": 30000,
"maxBytes": 8000,
"capture": false,
"captureRemote": false,
"recallRemote": false
},
"page": {
"title": "PowerContext",
"file": "page/settings.html",
"icon": "page/powercontext-favicon-color.svg"
}
},
"scripts": {
"check": "bun test ./*.test.mjs"
},
"engines": {
"bun": ">=1.4.2"
}
}