diff --git a/packages/powercontext/README.md b/packages/powercontext/README.md index d47018b..229acfc 100644 --- a/packages/powercontext/README.md +++ b/packages/powercontext/README.md @@ -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 diff --git a/packages/powercontext/package.json b/packages/powercontext/package.json index ca9e891..0a8babe 100644 --- a/packages/powercontext/package.json +++ b/packages/powercontext/package.json @@ -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": [ diff --git a/packages/powercontext/page/i18n.js b/packages/powercontext/page/i18n.js index aab6fb6..58cef3a 100644 --- a/packages/powercontext/page/i18n.js +++ b/packages/powercontext/page/i18n.js @@ -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." } }; diff --git a/packages/powercontext/page/settings.html b/packages/powercontext/page/settings.html index bd6d27f..f142e52 100644 --- a/packages/powercontext/page/settings.html +++ b/packages/powercontext/page/settings.html @@ -25,7 +25,7 @@ -

What is sent

Recall sends the latest user turn to the configured service URL above, even when capture is off.

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.

+

What is sent

Recall sends the latest user turn to the configured service URL above, even when capture is off.

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.

Deployment

Run PowerContext independently, then connect Magpie.

diff --git a/packages/powercontext/powercontext.hooks.mjs b/packages/powercontext/powercontext.hooks.mjs index a2f53dd..3ac96cf 100644 --- a/packages/powercontext/powercontext.hooks.mjs +++ b/packages/powercontext/powercontext.hooks.mjs @@ -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 = ""; const close = ""; diff --git a/packages/powercontext/powercontext.test.mjs b/packages/powercontext/powercontext.test.mjs index d75bdae..0b19791 100644 --- a/packages/powercontext/powercontext.test.mjs +++ b/packages/powercontext/powercontext.test.mjs @@ -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) +})