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.
This commit is contained in:
yetone
2026-11-02 02:42:22 +08:00
parent debc0f7b53
commit 1a05a77431
6 changed files with 47 additions and 10 deletions
+25 -2
View File
@@ -178,11 +178,34 @@ needs its own generation model and credentials; the plugin does not reuse the
client's model authorization. Configure generation through the independent
Server's documented setup.
### Capture feeds Memory and Topic Memory, not Experience
Every captured conversation is written as one or more content Sources
(`POST v1/sources/content`, metadata `origin: "magpie"`,
`event: "conversation_completed"`). PowerContext's scheduled Memory and Topic
Memory processing reads these Sources. Its scheduled **Experience** incubation
does not: it considers only Sources whose metadata has `"kind": "task-outcome"`
and ignores ordinary conversation Sources, so with capture on, Experience still
gets nothing from Magpie's conversations.
Task-outcome Sources come from the agent, not from this plugin. The agent
records one with PowerContext's `record_task_outcome` MCP tool
(`POST /v1/work/outcomes/record`) at a real completion or interruption
boundary, with the objective, a status (`succeeded`, `partial`, `blocked`,
`failed`, `cancelled` or `unknown`), its observations and checks. A completed
chat turn is not a task outcome, and the plugin does not derive one: an
assistant reply's claim of success would be recorded as fact. To feed
Experience, add PowerContext's MCP server to the agent (see
[Memory tools](#memory-tools)) and have it record outcomes. Experience
incubation creates candidates for review in PowerContext's Review Inbox; it
never approves them.
## Memory tools
This plugin neither declares nor executes memory tools. If an Agent needs
explicit search or remember tools, configure PowerContext's existing MCP server
through the client's Library MCP integration. The client owns tool execution and
explicit search or remember tools, or `record_task_outcome` for Experience,
configure PowerContext's existing MCP server through the client's Library MCP
integration. The client owns tool execution and
subsequent model calls. Automatic recall/capture requires no MCP or skill.
## Validation
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/gateway-powercontext",
"version": "0.2.0",
"version": "0.2.1",
"description": "PowerContext context recall and asynchronous conversation capture for clients behind Magpie",
"type": "module",
"files": [
+5 -5
View File
@@ -58,7 +58,7 @@ const messages = {
"automaticScope": "Resolved by service",
"dataTitle": "What is sent",
"recallDisclosure": "Recall sends the latest user turn to the configured service URL above, even when capture is off.",
"captureDisclosure": "Capture is off by default. When enabled, complete user and assistant turns, client tool calls and results, including files and command output read by the Agent, are sent to that same service. Remote recall and capture require separate opt-ins."
"captureDisclosure": "Capture is off by default. When enabled, complete user and assistant turns, client tool calls and results, including files and command output read by the Agent, are sent to that same service. Remote recall and capture require separate opt-ins. Saved conversations feed Memory and Topic Memory, not Experience: Experience needs task-outcome Sources the agent records with PowerContext’s record_task_outcome MCP tool."
},
"zh": {
"deployButton": "部署方式",
@@ -116,7 +116,7 @@ const messages = {
"automaticScope": "由服务端解析",
"dataTitle": "发送的内容",
"recallDisclosure": "召回会将最新一轮用户消息发送到上方配置的服务地址,即使对话存回关闭也会发送。",
"captureDisclosure": "对话存回默认关闭。开启后会向同一服务发送完整的用户和助手消息、客户端工具调用与结果,包括 Agent 读取的文件内容和命令输出。远程召回与存回需要分别授权开启。"
"captureDisclosure": "对话存回默认关闭。开启后会向同一服务发送完整的用户和助手消息、客户端工具调用与结果,包括 Agent 读取的文件内容和命令输出。远程召回与存回需要分别授权开启。保存的对话用于 Memory 和 Topic Memory,不用于 Experience:Experience 需要 agent 通过 PowerContext 的 record_task_outcome MCP 工具记录的 task-outcome Source。"
},
"zh-TW": {
"deployButton": "部署方式",
@@ -174,7 +174,7 @@ const messages = {
"automaticScope": "由伺服器解析",
"dataTitle": "傳送的內容",
"recallDisclosure": "記憶檢索會將最新一輪使用者訊息傳送至上方設定的服務位址,即使對話儲存關閉也會傳送。",
"captureDisclosure": "對話儲存預設關閉。開啟後會向同一服務傳送完整的使用者和助理訊息、用戶端工具呼叫與結果,包括 Agent 讀取的檔案內容和指令輸出。遠端檢索與儲存需要分別授權開啟。"
"captureDisclosure": "對話儲存預設關閉。開啟後會向同一服務傳送完整的使用者和助理訊息、用戶端工具呼叫與結果,包括 Agent 讀取的檔案內容和指令輸出。遠端檢索與儲存需要分別授權開啟。儲存的對話用於 Memory 和 Topic Memory,不用於 Experience:Experience 需要 agent 透過 PowerContext 的 record_task_outcome MCP 工具記錄的 task-outcome Source。"
},
"ja": {
"deployButton": "デプロイ方法",
@@ -232,7 +232,7 @@ const messages = {
"automaticScope": "サービス側で解決",
"dataTitle": "送信される内容",
"recallDisclosure": "記憶検索は、会話の保存が無効でも、最新のユーザー発言を上記の設定済みサービス URL に送信します。",
"captureDisclosure": "会話の保存は既定で無効です。有効にすると、ユーザーとアシスタントの全発言、クライアントのツール呼び出しと結果(Agent が読み取ったファイルやコマンド出力を含む)を同じサービスに送信します。リモートの検索と保存にはそれぞれ明示的な許可が必要です。"
"captureDisclosure": "会話の保存は既定で無効です。有効にすると、ユーザーとアシスタントの全発言、クライアントのツール呼び出しと結果(Agent が読み取ったファイルやコマンド出力を含む)を同じサービスに送信します。リモートの検索と保存にはそれぞれ明示的な許可が必要です。保存した会話は Memory と Topic Memory に使われ、Experience には使われません。Experience には、agent が PowerContext の record_task_outcome MCP ツールで記録する task-outcome Source が必要です。"
},
"de": {
"deployButton": "Bereitstellung",
@@ -290,7 +290,7 @@ const messages = {
"automaticScope": "Vom Dienst aufgelöst",
"dataTitle": "Übertragene Inhalte",
"recallDisclosure": "Der Abruf sendet den letzten Benutzerbeitrag an die oben konfigurierte Dienst-URL, auch wenn die Gesprächsspeicherung deaktiviert ist.",
"captureDisclosure": "Die Gesprächsspeicherung ist standardmäßig deaktiviert. Wenn aktiviert, werden vollständige Benutzer- und Assistentenbeiträge sowie Tool-Aufrufe und Ergebnisse des Clients an denselben Dienst gesendet, einschließlich vom Agent gelesener Dateien und Befehlsausgaben. Entfernter Abruf und entfernte Speicherung benötigen jeweils eine separate Freigabe."
"captureDisclosure": "Die Gesprächsspeicherung ist standardmäßig deaktiviert. Wenn aktiviert, werden vollständige Benutzer- und Assistentenbeiträge sowie Tool-Aufrufe und Ergebnisse des Clients an denselben Dienst gesendet, einschließlich vom Agent gelesener Dateien und Befehlsausgaben. Entfernter Abruf und entfernte Speicherung benötigen jeweils eine separate Freigabe. Gespeicherte Gespräche speisen Memory und Topic Memory, nicht Experience: Experience braucht task-outcome-Sources, die der Agent mit PowerContexts MCP-Tool record_task_outcome aufzeichnet."
}
};
+1 -1
View File
@@ -25,7 +25,7 @@
<p id="result" role="status" aria-live="polite" hidden></p>
</div><footer><span data-t="saveHelp">Advanced options are preserved.</span><div class="actions"><button id="cancel" class="secondary" type="button" data-t="cancel">Cancel</button><button id="save" type="button" disabled data-t="save">Save configuration</button></div></footer>
</form></dialog>
<section class="data-notice" aria-labelledby="data-title"><h2 id="data-title" data-t="dataTitle">What is sent</h2><p data-t="recallDisclosure">Recall sends the latest user turn to the configured service URL above, even when capture is off.</p><p data-t="captureDisclosure">Capture is off by default. When enabled, complete user and assistant turns, client tool calls and results, including files and command output read by the Agent, are sent to that same service. Remote recall and capture require separate opt-ins.</p></section>
<section class="data-notice" aria-labelledby="data-title"><h2 id="data-title" data-t="dataTitle">What is sent</h2><p data-t="recallDisclosure">Recall sends the latest user turn to the configured service URL above, even when capture is off.</p><p data-t="captureDisclosure">Capture is off by default. When enabled, complete user and assistant turns, client tool calls and results, including files and command output read by the Agent, are sent to that same service. Remote recall and capture require separate opt-ins. Saved conversations feed Memory and Topic Memory, not Experience: Experience needs task-outcome Sources the agent records with PowerContext’s record_task_outcome MCP tool.</p></section>
<dialog id="deployment-dialog" aria-labelledby="deployment-title">
<div class="dialog-head"><img class="pc-brand-light" src="powercontext-favicon-color.svg" width="20" height="20" alt=""><img class="pc-brand-dark" src="powercontext-favicon-reverse.svg" width="20" height="20" alt=""><h2 id="deployment-title" data-t="deployButton">Deployment</h2><button id="deployment-close" class="icon-button" type="button" aria-label="Close">×</button></div>
<div class="dialog-body deployment-body"><p class="deploy-intro" data-t="deployIntro">Run PowerContext independently, then connect Magpie.</p>
+1 -1
View File
@@ -16,7 +16,7 @@
import { createHash } from "node:crypto";
import { resolve } from "node:path";
import { conversation as transcript, history } from "./conversation.mjs";
const version = "0.2.0";
const version = "0.2.1";
const schema = "powercontext.prepared-context.v1";
const open = "<powercontext-reference>";
const close = "</powercontext-reference>";
@@ -947,3 +947,17 @@ test("configuration page follows all host languages without losing edits or stat
for (const el of translated) expect(el.textContent).toBe(messages[language][el.dataset.t])
}
})
test("the README and page say capture feeds Memory/Topic, not Experience, and name record_task_outcome (#607)", async () => {
const read = (file) => Bun.file(new URL(`./${file}`, import.meta.url)).text()
const [readme, dictionary, html] = await Promise.all([read("README.md"), read("page/i18n.js"), read("page/settings.html")])
expect(readme).toContain("### Capture feeds Memory and Topic Memory, not Experience")
expect(readme).toContain('`"kind": "task-outcome"`')
expect(readme).toContain("`record_task_outcome`")
const { messages } = runInNewContext(`${dictionary}\npowercontextI18n`, {})
for (const language of ["en", "zh", "zh-TW", "ja", "de"]) {
expect(messages[language].captureDisclosure).toContain("record_task_outcome")
expect(messages[language].captureDisclosure).toContain("Experience")
}
expect(html).toContain(messages.en.captureDisclosure)
})