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.
315 lines
24 KiB
JavaScript
315 lines
24 KiB
JavaScript
// Classic scripts work in Magpie's opaque-origin sandbox without module CORS.
|
||
const powercontextI18n = (() => {
|
||
// Match the languages exposed by Magpie's official page theme bridge.
|
||
const messages = {
|
||
"en": {
|
||
"deployButton": "Deployment",
|
||
"done": "Done",
|
||
"deployIntro": "Run PowerContext independently, then connect Magpie.",
|
||
"deployOne": "Deploy the service",
|
||
"deployOneHelp": "Follow the official quickstart for the current installation and startup commands. This plugin connects to your service; it does not install or start it.",
|
||
"deployTwo": "Prepare models and a Scope",
|
||
"deployTwoHelp": "Configure Generation, Embedding and the Memory schedule on the Server. Use an explicit Scope, a session/workspace binding or the service’s default Scope.",
|
||
"deployThree": "Connect in Magpie",
|
||
"deployThreeHelp": "Enter the service URL, optional Scope ID and service key in Connection settings. Leave the key empty if authentication is disabled. Enable conversation capture when ready.",
|
||
"configure": "Configure connection",
|
||
"dialogTitle": "Connection settings",
|
||
"cancel": "Cancel",
|
||
"settingsIntro": "Connect Magpie to your PowerContext service.",
|
||
"serviceSection": "Service connection",
|
||
"authSection": "Authentication",
|
||
"intro": "Connect an independently deployed memory service.",
|
||
"connection": "Existing service",
|
||
"url": "Service URL",
|
||
"urlHelp": "Local HTTP or remote HTTPS. No credentials in the URL.",
|
||
"scope": "Scope ID",
|
||
"scopeHelp": "Optional. Leave empty to use the session/workspace binding or the service’s default Scope.",
|
||
"auth": "Service key",
|
||
"authHelp": "Enter the service token; Bearer is added automatically. Optional if authentication is disabled. Saved in Magpie’s local plugin configuration.",
|
||
"capture": "Save complete conversations",
|
||
"captureHelp": "Off by default. Includes user and assistant turns, client tool calls and results. Remote callers require a separate opt-in.",
|
||
"save": "Save configuration",
|
||
"saveHelp": "Advanced options are preserved.",
|
||
"docs": "Official deployment guide",
|
||
"docsHelp": "Installation, model setup and service configuration.",
|
||
"copyLink": "Copy link",
|
||
"boundary": "This sandboxed page saves configuration only. It cannot verify connectivity or read live records. See Magpie’s hook diagnostics and the PowerContext dashboard for actual results.",
|
||
"close": "Close",
|
||
"notConfigured": "Not configured",
|
||
"on": "On",
|
||
"off": "Off",
|
||
"loaded": "Configuration loaded · not a connection check",
|
||
"loadFailed": "Could not load configuration. Reopen this page to retry.",
|
||
"bridgeFailed": "Magpie configuration bridge unavailable.",
|
||
"copied": "Link copied. Paste it into your browser to open the guide.",
|
||
"copyFallback": "Address selected. Press Ctrl+C or ⌘C to copy it, then open it in your browser.",
|
||
"invalidUrl": "Use local HTTP or remote HTTPS without credentials, query or fragment.",
|
||
"configurationSaved": "Configuration saved",
|
||
"saveSucceeded": "Saved. Connectivity has not been checked; saving does not write conversations or Memory.",
|
||
"saveFailed": "Save failed. Reopen the page to check the current options.",
|
||
"saving": "Saving…",
|
||
"captureEnabled": "Conversation capture enabled for subsequent requests. Remote callers still require separate authorization.",
|
||
"captureDisabled": "Conversation capture disabled for subsequent requests. Existing data is retained.",
|
||
"captureFailed": "Could not confirm the change. The switch shows the last readable configuration; reload to retry.",
|
||
"authFallback": "An existing authorization environment variable remains a fallback when this field is empty.",
|
||
"showKey": "Show",
|
||
"hideKey": "Hide",
|
||
"invalidKey": "Enter a token without spaces or line breaks.",
|
||
"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. 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": "部署方式",
|
||
"done": "知道了",
|
||
"deployIntro": "先独立部署 PowerContext,再连接到 Magpie。",
|
||
"deployOne": "部署服务",
|
||
"deployOneHelp": "按官方快速开始文档安装并启动当前版本。插件连接已部署的服务,不负责安装、启动或停止。",
|
||
"deployTwo": "准备模型与记忆空间",
|
||
"deployTwoHelp": "在服务端配置 Generation、Embedding 和记忆调度。可指定 Scope,或使用会话/工作目录绑定及服务端的默认 Scope。",
|
||
"deployThree": "填写连接配置",
|
||
"deployThreeHelp": "在连接设置中填写服务地址、可选的 Scope ID 和服务密钥。未启用认证时密钥可留空,按需开启对话存回。",
|
||
"configure": "连接配置",
|
||
"dialogTitle": "连接配置",
|
||
"cancel": "取消",
|
||
"settingsIntro": "连接 Magpie 与你的 PowerContext 服务。",
|
||
"serviceSection": "服务连接",
|
||
"authSection": "鉴权",
|
||
"intro": "连接独立部署的记忆服务。",
|
||
"connection": "已有服务",
|
||
"url": "服务地址",
|
||
"urlHelp": "本机可用 HTTP,远程请用 HTTPS;地址中不要包含凭据。",
|
||
"scope": "记忆空间 ID(Scope)",
|
||
"scopeHelp": "可选。留空时使用会话/工作目录绑定,或服务端的默认 Scope。",
|
||
"auth": "服务密钥",
|
||
"authHelp": "直接填写服务令牌,自动添加 Bearer 前缀。未启用鉴权可留空;密钥保存在 Magpie 本机插件配置中。",
|
||
"capture": "保存完整对话",
|
||
"captureHelp": "默认关闭。开启后发送用户与助手对话、客户端工具调用及结果;远程请求仍需单独授权。",
|
||
"save": "保存配置",
|
||
"saveHelp": "保留已有高级选项。",
|
||
"docs": "官方部署文档",
|
||
"docsHelp": "安装部署、模型接入与服务配置。",
|
||
"copyLink": "复制链接",
|
||
"boundary": "此页面仅保存配置,无法检查连接或读取实时记录。实际处理结果请查看 Magpie 的 Hook 诊断和 PowerContext 自带的控制台。",
|
||
"close": "关闭",
|
||
"notConfigured": "尚未配置",
|
||
"on": "已开启",
|
||
"off": "已关闭",
|
||
"loaded": "配置已载入 · 连接未验证",
|
||
"loadFailed": "无法读取配置,请重新打开页面重试。",
|
||
"bridgeFailed": "Magpie 配置接口不可用。",
|
||
"copied": "链接已复制,粘贴到浏览器即可打开文档。",
|
||
"copyFallback": "地址已选中,按 Ctrl+C 或 ⌘C 复制后,在浏览器中打开。",
|
||
"invalidUrl": "请使用本机 HTTP 或远程 HTTPS 地址,不包含凭据、查询参数或片段。",
|
||
"configurationSaved": "配置已保存",
|
||
"saveSucceeded": "配置已保存,尚未检查服务连接;保存操作不会写入对话或记忆。",
|
||
"saveFailed": "保存失败,请重新打开页面确认当前配置。",
|
||
"saving": "正在保存…",
|
||
"captureEnabled": "完整对话存回已开启,后续请求生效;远程请求仍需单独授权。",
|
||
"captureDisabled": "完整对话存回已关闭,后续请求生效;已保存的数据会保留。",
|
||
"captureFailed": "无法确认修改结果。开关显示最后读取到的配置,请刷新后重试。",
|
||
"authFallback": "留空时,仍兼容已有的鉴权环境变量配置。",
|
||
"showKey": "显示",
|
||
"hideKey": "隐藏",
|
||
"invalidKey": "密钥不能包含空格或换行。",
|
||
"automaticScope": "由服务端解析",
|
||
"dataTitle": "发送的内容",
|
||
"recallDisclosure": "召回会将最新一轮用户消息发送到上方配置的服务地址,即使对话存回关闭也会发送。",
|
||
"captureDisclosure": "对话存回默认关闭。开启后会向同一服务发送完整的用户和助手消息、客户端工具调用与结果,包括 Agent 读取的文件内容和命令输出。远程召回与存回需要分别授权开启。保存的对话用于 Memory 和 Topic Memory,不用于 Experience:Experience 需要 agent 通过 PowerContext 的 record_task_outcome MCP 工具记录的 task-outcome Source。"
|
||
},
|
||
"zh-TW": {
|
||
"deployButton": "部署方式",
|
||
"done": "知道了",
|
||
"deployIntro": "先獨立部署 PowerContext,再連接到 Magpie。",
|
||
"deployOne": "部署服務",
|
||
"deployOneHelp": "依官方快速入門文件安裝並啟動目前版本。外掛連接已部署的服務,不負責安裝、啟動或停止。",
|
||
"deployTwo": "準備模型與記憶空間",
|
||
"deployTwoHelp": "在伺服器設定 Generation、Embedding 和記憶排程。可指定 Scope,或使用工作階段/工作目錄綁定及伺服器的預設 Scope。",
|
||
"deployThree": "填寫連線設定",
|
||
"deployThreeHelp": "在連線設定中填寫服務位址、選填的 Scope ID 和服務金鑰。未啟用驗證時金鑰可留空,視需要開啟對話儲存。",
|
||
"configure": "連線設定",
|
||
"dialogTitle": "連線設定",
|
||
"cancel": "取消",
|
||
"settingsIntro": "連接 Magpie 與你的 PowerContext 服務。",
|
||
"serviceSection": "服務連線",
|
||
"authSection": "驗證",
|
||
"intro": "連接獨立部署的記憶服務。",
|
||
"connection": "已有服務",
|
||
"url": "服務位址",
|
||
"urlHelp": "本機可用 HTTP,遠端請用 HTTPS;位址中不要包含憑證。",
|
||
"scope": "記憶空間 ID(Scope)",
|
||
"scopeHelp": "選填。留空時使用工作階段/工作目錄綁定,或伺服器的預設 Scope。",
|
||
"auth": "服務金鑰",
|
||
"authHelp": "直接填寫服務權杖,自動加入 Bearer 前綴。未啟用驗證可留空;金鑰儲存在 Magpie 本機外掛設定中。",
|
||
"capture": "儲存完整對話",
|
||
"captureHelp": "預設關閉。開啟後傳送使用者與助手對話、用戶端工具呼叫及結果;遠端請求仍需另外授權。",
|
||
"save": "儲存設定",
|
||
"saveHelp": "保留已有進階選項。",
|
||
"docs": "官方部署文件",
|
||
"docsHelp": "安裝部署、模型接入與服務設定。",
|
||
"copyLink": "複製連結",
|
||
"boundary": "此頁面僅儲存設定,無法檢查連線或讀取即時記錄。實際處理結果請查看 Magpie 的 Hook 診斷及 PowerContext 自帶的控制台。",
|
||
"close": "關閉",
|
||
"notConfigured": "尚未設定",
|
||
"on": "已開啟",
|
||
"off": "已關閉",
|
||
"loaded": "設定已載入 · 連線未驗證",
|
||
"loadFailed": "無法讀取設定,請重新開啟頁面重試。",
|
||
"bridgeFailed": "Magpie 設定介面無法使用。",
|
||
"copied": "連結已複製,貼到瀏覽器即可開啟文件。",
|
||
"copyFallback": "位址已選取,按 Ctrl+C 或 ⌘C 複製後,在瀏覽器中開啟。",
|
||
"invalidUrl": "請使用本機 HTTP 或遠端 HTTPS 位址,不包含憑證、查詢參數或片段。",
|
||
"configurationSaved": "設定已儲存",
|
||
"saveSucceeded": "設定已儲存,尚未檢查服務連線;儲存設定不會寫入對話或記憶。",
|
||
"saveFailed": "儲存失敗,請重新開啟頁面確認目前設定。",
|
||
"saving": "正在儲存…",
|
||
"captureEnabled": "完整對話儲存已開啟,後續請求生效;遠端請求仍需另外授權。",
|
||
"captureDisabled": "完整對話儲存已關閉,後續請求生效;已儲存的資料會保留。",
|
||
"captureFailed": "無法確認修改結果。開關顯示最後讀取到的設定,請重新整理後重試。",
|
||
"authFallback": "留空時,仍相容既有的驗證環境變數設定。",
|
||
"showKey": "顯示",
|
||
"hideKey": "隱藏",
|
||
"invalidKey": "金鑰不能包含空格或換行。",
|
||
"automaticScope": "由伺服器解析",
|
||
"dataTitle": "傳送的內容",
|
||
"recallDisclosure": "記憶檢索會將最新一輪使用者訊息傳送至上方設定的服務位址,即使對話儲存關閉也會傳送。",
|
||
"captureDisclosure": "對話儲存預設關閉。開啟後會向同一服務傳送完整的使用者和助理訊息、用戶端工具呼叫與結果,包括 Agent 讀取的檔案內容和指令輸出。遠端檢索與儲存需要分別授權開啟。儲存的對話用於 Memory 和 Topic Memory,不用於 Experience:Experience 需要 agent 透過 PowerContext 的 record_task_outcome MCP 工具記錄的 task-outcome Source。"
|
||
},
|
||
"ja": {
|
||
"deployButton": "デプロイ方法",
|
||
"done": "閉じる",
|
||
"deployIntro": "PowerContext を個別にデプロイしてから Magpie に接続します。",
|
||
"deployOne": "サービスのデプロイ",
|
||
"deployOneHelp": "公式クイックスタートに従って最新版をインストールし、起動してください。このプラグインは既存のサービスに接続し、インストールや起動・停止は行いません。",
|
||
"deployTwo": "モデルと Scope の準備",
|
||
"deployTwoHelp": "サーバーで Generation、Embedding と記憶のスケジュールを設定します。Scope を指定するか、セッション/作業フォルダーのバインドまたはサービスの既定の Scope を使用してください。",
|
||
"deployThree": "Magpie への接続",
|
||
"deployThreeHelp": "接続設定にサービス URL、任意の Scope ID とサービスキーを入力します。認証が無効な場合はキーを空欄にできます。必要に応じて会話の保存を有効にします。",
|
||
"configure": "接続設定",
|
||
"dialogTitle": "接続設定",
|
||
"cancel": "キャンセル",
|
||
"settingsIntro": "Magpie をお使いの PowerContext サービスに接続します。",
|
||
"serviceSection": "サービス接続",
|
||
"authSection": "認証",
|
||
"intro": "個別にデプロイされた記憶サービスに接続します。",
|
||
"connection": "既存のサービス",
|
||
"url": "サービス URL",
|
||
"urlHelp": "ローカルでは HTTP、リモートでは HTTPS を使用してください。URL に認証情報を含めないでください。",
|
||
"scope": "Scope ID",
|
||
"scopeHelp": "任意。空欄の場合はセッション/作業フォルダーのバインド、またはサービスの既定の Scope を使用します。",
|
||
"auth": "サービスキー",
|
||
"authHelp": "サービストークンを入力してください。Bearer は自動で付加されます。認証が無効な場合は空欄にできます。Magpie のローカルプラグイン設定に保存されます。",
|
||
"capture": "会話全体を保存",
|
||
"captureHelp": "既定では無効です。有効にするとユーザーとアシスタントの会話、クライアントのツール呼び出しと結果が送信されます。リモートからのリクエストには別途許可が必要です。",
|
||
"save": "設定を保存",
|
||
"saveHelp": "既存の詳細設定は保持されます。",
|
||
"docs": "公式デプロイガイド",
|
||
"docsHelp": "インストール、モデルの接続、サービスの設定。",
|
||
"copyLink": "リンクをコピー",
|
||
"boundary": "このページでは設定の保存のみ可能です。接続の検証やリアルタイムの履歴取得はできません。実際の結果は Magpie のフック診断と PowerContext の管理画面で確認してください。",
|
||
"close": "閉じる",
|
||
"notConfigured": "未設定",
|
||
"on": "有効",
|
||
"off": "無効",
|
||
"loaded": "設定を読み込みました · 接続は未検証です",
|
||
"loadFailed": "設定を読み込めません。ページを開き直してください。",
|
||
"bridgeFailed": "Magpie の設定 API を利用できません。",
|
||
"copied": "リンクをコピーしました。ブラウザーに貼り付けてガイドを開いてください。",
|
||
"copyFallback": "アドレスを選択しました。Ctrl+C または ⌘C でコピーし、ブラウザーで開いてください。",
|
||
"invalidUrl": "ローカルの HTTP またはリモートの HTTPS を使用し、認証情報、クエリ、フラグメントを含めないでください。",
|
||
"configurationSaved": "設定を保存しました",
|
||
"saveSucceeded": "設定を保存しました。接続は未検証です。この操作では会話や記憶は書き込まれません。",
|
||
"saveFailed": "保存に失敗しました。ページを開き直して現在の設定を確認してください。",
|
||
"saving": "保存中…",
|
||
"captureEnabled": "以降のリクエストで会話全体を保存します。リモートからのリクエストには引き続き別途許可が必要です。",
|
||
"captureDisabled": "以降のリクエストで会話は保存されません。既存のデータは保持されます。",
|
||
"captureFailed": "変更を確認できません。スイッチは最後に読み取れた設定を示しています。再読み込みしてお試しください。",
|
||
"authFallback": "空欄の場合、既存の認証用環境変数の設定が引き続き使用されます。",
|
||
"showKey": "表示",
|
||
"hideKey": "非表示",
|
||
"invalidKey": "空白や改行を含まないトークンを入力してください。",
|
||
"automaticScope": "サービス側で解決",
|
||
"dataTitle": "送信される内容",
|
||
"recallDisclosure": "記憶検索は、会話の保存が無効でも、最新のユーザー発言を上記の設定済みサービス URL に送信します。",
|
||
"captureDisclosure": "会話の保存は既定で無効です。有効にすると、ユーザーとアシスタントの全発言、クライアントのツール呼び出しと結果(Agent が読み取ったファイルやコマンド出力を含む)を同じサービスに送信します。リモートの検索と保存にはそれぞれ明示的な許可が必要です。保存した会話は Memory と Topic Memory に使われ、Experience には使われません。Experience には、agent が PowerContext の record_task_outcome MCP ツールで記録する task-outcome Source が必要です。"
|
||
},
|
||
"de": {
|
||
"deployButton": "Bereitstellung",
|
||
"done": "Fertig",
|
||
"deployIntro": "PowerContext separat bereitstellen und anschließend mit Magpie verbinden.",
|
||
"deployOne": "Dienst bereitstellen",
|
||
"deployOneHelp": "Der offiziellen Kurzanleitung für Installation und Start der aktuellen Version folgen. Dieses Plugin verbindet sich mit einem vorhandenen Dienst; es installiert oder startet ihn nicht.",
|
||
"deployTwo": "Modelle und Scope vorbereiten",
|
||
"deployTwoHelp": "Generation, Embedding und den Memory-Zeitplan auf dem Server konfigurieren. Einen Scope angeben oder die Sitzungs-/Arbeitsverzeichnisbindung beziehungsweise den Standard-Scope des Dienstes verwenden.",
|
||
"deployThree": "In Magpie verbinden",
|
||
"deployThreeHelp": "Dienst-URL, optionale Scope-ID und Dienstschlüssel in den Verbindungseinstellungen eintragen. Ohne Authentifizierung den Schlüssel leer lassen. Bei Bedarf die Gesprächsspeicherung aktivieren.",
|
||
"configure": "Verbindung einrichten",
|
||
"dialogTitle": "Verbindungseinstellungen",
|
||
"cancel": "Abbrechen",
|
||
"settingsIntro": "Magpie mit deinem PowerContext-Dienst verbinden.",
|
||
"serviceSection": "Dienstverbindung",
|
||
"authSection": "Authentifizierung",
|
||
"intro": "Einen separat bereitgestellten Speicherdienst verbinden.",
|
||
"connection": "Vorhandener Dienst",
|
||
"url": "Dienst-URL",
|
||
"urlHelp": "Lokal HTTP oder entfernt HTTPS verwenden. Keine Zugangsdaten in der URL.",
|
||
"scope": "Scope-ID",
|
||
"scopeHelp": "Optional. Ohne Angabe wird die Sitzungs-/Arbeitsverzeichnisbindung oder der Standard-Scope des Dienstes verwendet.",
|
||
"auth": "Dienstschlüssel",
|
||
"authHelp": "Dienst-Token eingeben; Bearer wird automatisch ergänzt. Ohne Authentifizierung optional. Wird in Magpies lokaler Plugin-Konfiguration gespeichert.",
|
||
"capture": "Vollständige Gespräche speichern",
|
||
"captureHelp": "Standardmäßig deaktiviert. Speichert Benutzer- und Assistentenbeiträge sowie Tool-Aufrufe und Ergebnisse des Clients. Entfernte Anfragen benötigen eine separate Freigabe.",
|
||
"save": "Konfiguration speichern",
|
||
"saveHelp": "Erweiterte Optionen bleiben erhalten.",
|
||
"docs": "Offizielle Anleitung",
|
||
"docsHelp": "Installation, Modelle und Dienstkonfiguration.",
|
||
"copyLink": "Link kopieren",
|
||
"boundary": "Diese Seite speichert nur die Konfiguration. Sie kann weder Verbindungen prüfen noch Live-Daten lesen. Ergebnisse sind in Magpies Hook-Diagnose und im PowerContext-Dashboard einsehbar.",
|
||
"close": "Schließen",
|
||
"notConfigured": "Nicht konfiguriert",
|
||
"on": "Ein",
|
||
"off": "Aus",
|
||
"loaded": "Konfiguration geladen · Verbindung nicht geprüft",
|
||
"loadFailed": "Konfiguration konnte nicht geladen werden. Seite erneut öffnen.",
|
||
"bridgeFailed": "Magpies Konfigurationsschnittstelle ist nicht verfügbar.",
|
||
"copied": "Link kopiert. Zum Öffnen der Anleitung in den Browser einfügen.",
|
||
"copyFallback": "Adresse markiert. Mit Strg+C oder ⌘C kopieren und im Browser öffnen.",
|
||
"invalidUrl": "Lokales HTTP oder entferntes HTTPS ohne Zugangsdaten, Abfrageparameter oder Fragment verwenden.",
|
||
"configurationSaved": "Konfiguration gespeichert",
|
||
"saveSucceeded": "Gespeichert. Die Verbindung wurde nicht geprüft; Gespräche oder Erinnerungen wurden nicht geschrieben.",
|
||
"saveFailed": "Speichern fehlgeschlagen. Seite erneut öffnen, um die aktuellen Optionen zu prüfen.",
|
||
"saving": "Wird gespeichert…",
|
||
"captureEnabled": "Gesprächsspeicherung für nachfolgende Anfragen aktiviert. Entfernte Anfragen benötigen weiterhin eine separate Freigabe.",
|
||
"captureDisabled": "Gesprächsspeicherung für nachfolgende Anfragen deaktiviert. Vorhandene Daten bleiben erhalten.",
|
||
"captureFailed": "Änderung konnte nicht bestätigt werden. Der Schalter zeigt die zuletzt gelesene Konfiguration. Zum Wiederholen neu laden.",
|
||
"authFallback": "Bei leerem Feld bleibt eine vorhandene Authentifizierungs-Umgebungsvariable als Rückfall erhalten.",
|
||
"showKey": "Anzeigen",
|
||
"hideKey": "Verbergen",
|
||
"invalidKey": "Ein Token ohne Leerzeichen oder Zeilenumbrüche eingeben.",
|
||
"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. 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."
|
||
}
|
||
};
|
||
|
||
const languageTags = {en:'en', zh:'zh-CN', 'zh-TW':'zh-TW', ja:'ja-JP', de:'de-DE'};
|
||
|
||
function languageFor(value = '') {
|
||
const tag = value.toLowerCase().replaceAll('_', '-');
|
||
if (/^zh-(tw|hk|mo|hant)\b/.test(tag)) return 'zh-TW';
|
||
if (/^zh(?:-|$)/.test(tag)) return 'zh';
|
||
if (/^ja(?:-|$)/.test(tag)) return 'ja';
|
||
if (/^de(?:-|$)/.test(tag)) return 'de';
|
||
return 'en';
|
||
}
|
||
|
||
function translate(language, key, parameters = {}) {
|
||
const template = messages[language]?.[key] ?? messages.en[key] ?? key;
|
||
return template.replace(/\{(\w+)\}/g, (match, name) => parameters[name] ?? match);
|
||
}
|
||
|
||
return {messages, languageTags, languageFor, translate};
|
||
})();
|