Commit Graph
2 Commits
Author SHA1 Message Date
yetone 1a05a77431 powercontext 0.2.1: the README and page say capture feeds Memory/Topic, not Experience (#607)
pluoki (on X) found that magpie's capture never gives PowerContext's
scheduled Experience anything to incubate. That holds: persist writes
every conversation as content Sources (POST v1/sources/content, metadata
origin "magpie", event "conversation_completed"), and nothing else.

Checked against oceanbase/powercontext at 5032075:
- builtin/artifacts/experience/incubation.py skips every Source whose
  metadata kind isn't "task-outcome" (TASK_OUTCOME_SOURCE_KIND);
  docs/en/docs/workflows/create-and-review-experience.md: "Ordinary prompt
  Sources are ignored", and incubation creates candidates for review only.
- http/_generated/operations.py: RECORD_TASK_OUTCOME is POST
  /v1/work/outcomes/record, operation_id record_task_outcome, and
  server/mcp.py exposes it as an MCP tool.

This ships option (a) of the issue only. The README gets a section
"Capture feeds Memory and Topic Memory, not Experience" saying so, that
task-outcome Sources come from the agent through PowerContext's
record_task_outcome MCP tool at a real completion boundary, and why the
plugin does not derive one from a chat turn; Memory tools names it too.
The page's visible capture disclosure ("What is sent") says the same in
en, zh, zh-TW, ja and de. No behaviour changes. Option (b), an opt-in
that records host-derived outcomes on a real boundary, is not done.

Run (mote, at this tree on origin/main 53e3820, after debc0f7):
- HOME=$(mktemp -d) bun test: 4558 pass, 0 fail, 9 skip (live checks).
- bun scripts/check.mjs: ok.
- Broken by hand: the README heading removed, and ja's disclosure without
  the note: the new guard test red each time, green after.
Not tried: a real PowerContext server; nothing it receives changed.
2026-11-02 02:42:22 +08:00
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