@xopcai/xopc 0.0.298 → 0.0.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-C-DSdak3.js → activity-store-sCQ2ErNm.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DQx3cICI.js → agent-avatar-dicebear-L6Vh9fL1.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BdAFy0gE.js → agent-defaults-settings-panel-C22DdeJ6.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-9Q_62jYG.js → agents-CjwnFadx.js} +1 -1
- package/dist/gateway/static/root/assets/api-BjlN9GPQ.js +1 -0
- package/dist/gateway/static/root/assets/{api-DS4w0i5N.js → api-pwK0DxZJ.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-rZk3-w6S.js → app-management-settings-panel-BPanjQB6.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-CUWA2E_f.js +1 -0
- package/dist/gateway/static/root/assets/{apps-page-BeNbZ2aw.js → apps-page-D8hP1XhF.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CNi0DDvL.js → archive-plugin-BT7OnQyy.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CThmC7i6.js → attachment-load-CQGhCfVn.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BGe-cTjn.js → automations-page-CHeFkkKk.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B_-VM4Va.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Cv_aLtBz.js → binary-plugins-D_8pZaqQ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BkS6rDLR.js → block-editor-m48cnmng.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DvwCwLOp.js → browser-automation-inputs-jciex8-r.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D93HlJH4.js → browser-automations-page-ct9dHGJF.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BdHYYHIv.js → browser-settings-page-DNX0BZFM.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BJ5gZB8e.js → capabilities-settings-panel-nvCpR13B.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-CikNo086.js → channels-settings-BeDwuVtH.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-status-swr-CgtFOwNh.js → channels-status-swr-Cz3X8Gfa.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dr3iyWHW.js → chat-terminal-dock-Bn_th7oe.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-model-settings-CgDUQ9On.js → computer-model-settings-BOObauzH.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-unz5J8oW.js → computer-settings-page-BicG-IvN.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-EdtkQUqf.js → connectors-page-D9xCnhbY.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-expression-DU3E4CbL.js → cron-expression-C0ogAVG7.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-BjGxRWfE.js → date-picker-HtU776kx.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-B9Fsdq_j.js → dependency-picker-DvDdN4Xu.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BVIdx2PC.js → desktop-pet-BWi5FE7D.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CjTgpDfw.js → desktop-pet-settings-CptAwdZd.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CaSz5VAr.js → device-pairing-wizard-C8BiZYwP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CMjMKdg0.js → extension-debug-page-nRRdMurF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Dm4ohyoF.js → extension-page-DxotmtcG.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jsjKLZ_n.js → extension-settings-page-BK2t7aFl.js} +1 -1
- package/dist/gateway/static/root/assets/figtree-latin-ext-wght-normal-DCwSJGxG.woff2 +0 -0
- package/dist/gateway/static/root/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-B2xVR9gt.js → gateway-config-swr-COJzzscc.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CnMgDQVJ.js → gateway-settings-rIGo_jeB.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-c7s8h7px.js → gateway-startup-retry-211-jptU.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CJNc9fVz.js → heartbeat-settings-DAHqGRKZ.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-X0TcW6Fs.js → home-page-BU59mAGQ.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-DUjbV88R.js → image-generation-api-sO31fQr_.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BaQmVh_d.js → imports-page-BQ4HTIVc.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BwqBcOv1.js → index-54o0AGdj.js} +39 -41
- package/dist/gateway/static/root/assets/index-R89i_XYi.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-7eX6_wx-.js → keyboard-shortcuts-settings-BSgsIe7E.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-C5Q12itI.js → local-app-workbench-page-BtEQDQeQ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-C9L4Hlw5.js → local-apps-page-BrEO9hz5.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CwuCkjo7.js → locale-store-DuG-kbsP.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BC131pzE.js → logs-page-DhXIIoc0.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CeDBuLQg.js → management-settings-DC67VTpr.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-3YQc6QFV.js → markdown-view-B1q2w6W_.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DWfT8oeo.js → media-plugins-DdoSox1I.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BYbx4OuI.js +3 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-DkN6faxv.js → note-detail-panel-CCIA4VbP.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-C4hKdQdj.js → notes-page-C8JeFMSH.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-BcTjkR5o.js → page-tabs-B_I0YuTK.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DYH10UsL.js → preview-open-alternatives--5Zt1oSs.js} +1 -1
- package/dist/gateway/static/root/assets/{proactive-page-LEG1kQFJ.js → proactive-page-BBJZB2RV.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DLm3cUhY.js → product-open-page-CKFPKr0A.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-HxD09IfH.js → project-detail-page-DeTeDel1.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-D2fC38bE.js → projects-page-BUsI5G7U.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Cxx1-pCg.js → registry-api-BDgFNu05.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DvXeZ98_.js → remote-access-hub-DSGwCc4h.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CXpFgOci.js → runtime-tools-settings-panel-BY9oD7eN.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DaT4vD2j.js → schema-form-CuIDQtYN.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-zAeJa1Ae.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BG4EILeB.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-B6ZUcWOA.js → settings-form-section-C4D1p0xR.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Chvn3lRv.js → settings-page-BBG4jliE.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BS51qtzu.js → setup-status-panel-DXqDeXNi.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Brta3iG6.js → share-preview-page-DbE7gsDd.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-oSqDaSSF.js → shares-settings-BN_O6Dwt.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Sq-IWawl.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-cxh7-L-8.js → skills-page-Dh33NKoP.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CM_4-WWk.js → skills-page.utils-BNz7GQvw.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CCv2jppr.js → system-settings-panel-C3L8_KEq.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-Dip4NJ1W.js → task-detail-page-CJ1WpRpN.js} +1 -1
- package/dist/gateway/static/root/assets/theme-store-JzZVUvEh.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-B0z39eec.js → tunnel-api-GLzwLaUZ.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-B2Vitgh0.js → use-autosave-DSrlXbBg.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DARb0_C4.js → user-model-page-CX9eizCN.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-XsHsCfWR.js → voice-api-key-field-9P97T0CT.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-De1DTzxK.js → voice-config-api-DJvwbFbz.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B5mnI1IB.js → work-discovery-overlay-CoVHgrQY.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DcFMhxC_.js → workflow-run-setup-panel-BR-S_IGS.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-CaaEc_f1.js → workflows-page-ea-j18xi.js} +1 -1
- package/dist/gateway/static/root/index.html +10 -10
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +11 -4
- package/dist/src/agent/service/process-direct-one-shot.js +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +2 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.d.ts +1 -0
- package/dist/src/chat-commands/builtins/config.js +13 -9
- package/dist/src/chat-commands/builtins/model.js +2 -1
- package/dist/src/chat-commands/builtins/session.js +10 -7
- package/dist/src/chat-commands/builtins/skill.js +0 -1
- package/dist/src/chat-commands/builtins/thinking.js +12 -8
- package/dist/src/chat-commands/builtins/tts.js +7 -7
- package/dist/src/chat-commands/builtins/understanding.js +2 -1
- package/dist/src/chat-commands/command-parse.js +5 -6
- package/dist/src/chat-commands/context.js +19 -16
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/connectors/auth-provider-registry.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connection-recovery-service.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/automation-agent-session.js +4 -1
- package/dist/src/gateway/chat-stream/mapper.js +1 -0
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/capabilities.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +3 -3
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +3 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +21 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +2 -3
- package/dist/src/gateway/service.js +5 -5
- package/dist/src/notifications/plain-text.d.ts +1 -0
- package/dist/src/notifications/plain-text.js +14 -0
- package/dist/src/notifications/planner.js +2 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/reset-triggers.d.ts +2 -0
- package/dist/src/session/reset-triggers.js +11 -1
- package/dist/src/storage/sqlite/session-repository.js +12 -1
- package/dist/src/storage/sqlite/transcript-repository.js +11 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +2 -2
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/user-context/config.js +2 -2
- package/dist/src/work-discovery/service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +5 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/api-BhJmc8E-.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-CbIWkXlh.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-rHXrY_xk.js +0 -6
- package/dist/gateway/static/root/assets/index-Bt6a_Yxc.css +0 -2
- package/dist/gateway/static/root/assets/messages-D6CRVWtT.js +0 -3
- package/dist/gateway/static/root/assets/sessions-page-T5S0FTQJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bi3puKV6.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CITITcjJ.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-Dt7ob2wD.js +0 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-54o0AGdj.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-BYbx4OuI.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-DuG-kbsP.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-BaskVM5g.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-CCC4FJ3Y.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/app-link-BiBXVEvp.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-B1q2w6W_.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/dist-Che_jiQF.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
<link rel="modulepreload" crossorigin href="/assets/files-Be5viEFY.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/button-CGlRPNzi.js">
|
|
52
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
53
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-211-jptU.js">
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BDgFNu05.js">
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-COJzzscc.js">
|
|
55
55
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-sCQ2ErNm.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-JzZVUvEh.js">
|
|
58
58
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
59
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
59
|
+
<link rel="stylesheet" crossorigin href="/assets/index-R89i_XYi.css">
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
62
62
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -7,17 +7,17 @@ import { getInteractionState } from "../storage/sqlite/interaction-state-reposit
|
|
|
7
7
|
import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
8
8
|
import "../storage/sqlite/index.js";
|
|
9
9
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
10
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
10
11
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
11
12
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
12
|
-
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
13
|
-
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
14
13
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
15
14
|
import { init_session_key } from "../routing/session-key.js";
|
|
15
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
16
|
+
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
16
17
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
18
|
+
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
17
19
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
18
20
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
19
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
20
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
21
21
|
import { extractTextContent } from "./context/workspace.js";
|
|
22
22
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
23
23
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -4,10 +4,10 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
4
4
|
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
5
5
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import "../../storage/sqlite/index.js";
|
|
7
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
7
8
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
8
9
|
import { getApiKeySync, init_providers, resolveModel } from "../../providers/index.js";
|
|
9
10
|
import { createExtensionAwareStreamFn } from "../../providers/extension-stream-bridge.js";
|
|
10
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
11
11
|
import { extractTextContent } from "../context/workspace.js";
|
|
12
12
|
import { listUserAssertions } from "../../user-model/repository.js";
|
|
13
13
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveModelsJsonPath } from "../../config/paths.js";
|
|
2
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
2
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
4
|
import { XopcModelCredentialStore, init_model_credential_store } from "../../auth/model-credential-store.js";
|
|
5
5
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
6
6
|
import { init_register_runtime_providers, registerRuntimeProviders } from "../../providers/register-runtime-providers.js";
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { parseTurnOutcome } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
4
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
5
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
7
7
|
import { runWithEmbeddedExecutionSession } from "./execution-context.js";
|
|
8
8
|
import { resolveAgentTurnTimeoutMs } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
9
9
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
2
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
|
-
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
4
3
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
|
+
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
7
7
|
import "../../capabilities/readiness/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { readFile, rm } from "node:fs/promises";
|
|
5
5
|
//#region src/agent/mcp/oauth/mcp-oauth-store.ts
|
|
@@ -42,10 +42,17 @@ async function tryRunSlashCommand(deps, ctx, content, options) {
|
|
|
42
42
|
matched: false,
|
|
43
43
|
aggregatedText: ""
|
|
44
44
|
};
|
|
45
|
-
if (!commandRegistry.has(parsed.command))
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
if (!commandRegistry.has(parsed.command)) {
|
|
46
|
+
if (parsed.command.startsWith("skill:")) return {
|
|
47
|
+
matched: false,
|
|
48
|
+
aggregatedText: ""
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
matched: true,
|
|
52
|
+
aggregatedText: `Unknown command: /${parsed.command}\nType /help to see available commands.`,
|
|
53
|
+
command: parsed.command
|
|
54
|
+
};
|
|
55
|
+
}
|
|
49
56
|
const command = commandRegistry.findByName(parsed.command);
|
|
50
57
|
if (options?.sourceContexts?.length && !command?.acceptsContext) return {
|
|
51
58
|
matched: true,
|
|
@@ -74,6 +74,7 @@ async function runProcessDirect(deps, input) {
|
|
|
74
74
|
clearPendingTranscriptUserMessage(input.conversationId, pendingUserMessage);
|
|
75
75
|
}
|
|
76
76
|
})();
|
|
77
|
+
if (input.origin.type === "system" && input.origin.source === "automation" && result.lastAssistantText?.trim()) await deps.sessionStore.updateMetadata(input.conversationId, { hiddenFromSessionList: false });
|
|
77
78
|
deps.onTurnComplete?.(input.conversationId, result.lastAssistantText);
|
|
78
79
|
if (!result.ok) throw new Error(result.errorMessage ?? "Agent turn failed");
|
|
79
80
|
return result.lastAssistantText ?? "";
|
|
@@ -256,12 +256,13 @@ async function* runProcessDirectStreaming(deps, input) {
|
|
|
256
256
|
if (slash.matched) {
|
|
257
257
|
ranSlashCommand = true;
|
|
258
258
|
slashCommandMetadata = slash.metadata;
|
|
259
|
+
if (slash.metadata?.sessionConfigChanged === true) pushVisible({ type: "session_config_updated" });
|
|
259
260
|
const text = slash.aggregatedText.trim();
|
|
260
261
|
if (text) {
|
|
261
262
|
webchatSlashReceipt = text;
|
|
262
263
|
pushAssistantReceipt(queue, text, input.runId, slashCommandMetadata);
|
|
263
264
|
} else if (channel === "webchat") {
|
|
264
|
-
webchatSlashReceipt = "Command finished with no assistant text.
|
|
265
|
+
webchatSlashReceipt = "Command finished with no assistant text. A task continuation may still be scheduled automatically.";
|
|
265
266
|
pushAssistantReceipt(queue, webchatSlashReceipt, input.runId);
|
|
266
267
|
}
|
|
267
268
|
const workflowRun = slash.metadata?.workflowRun;
|
|
@@ -2,11 +2,11 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
5
6
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
6
7
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
7
|
-
import { init_providers, resolveModel } from "../providers/index.js";
|
|
8
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
9
8
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
|
+
import { init_providers, resolveModel } from "../providers/index.js";
|
|
10
10
|
import { extractTextContent } from "./context/workspace.js";
|
|
11
11
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
12
12
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
4
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
8
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
4
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
5
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
|
-
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
8
5
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
|
+
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
9
7
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
10
8
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
11
9
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
10
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
12
11
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
12
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
13
13
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
init_providers();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
4
3
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
5
4
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
6
5
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
6
|
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
7
|
+
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
2
|
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
|
+
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
2
3
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
|
-
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
-
import {
|
|
5
|
+
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
3
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
|
-
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
5
|
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
7
7
|
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
|
|
9
9
|
import "../native-messaging-host.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, normalizeAgentId, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
2
|
-
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
2
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
3
|
+
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
4
|
import { commandRegistry } from "./registry.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -19,12 +19,13 @@ function isBlockedPath(path) {
|
|
|
19
19
|
for (const blocked of BLOCKED_WRITE_PATHS) if (joined === blocked || joined.startsWith(`${blocked}.`)) return true;
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
22
|
+
const SENSITIVE_CONFIG_KEY = /(?:api[_-]?key|token|secret|password|passwd|credential|private[_-]?key|authorization|cookie)$/i;
|
|
23
|
+
function redactConfigForDisplay(value) {
|
|
24
|
+
if (Array.isArray(value)) return value.map(redactConfigForDisplay);
|
|
25
|
+
if (!value || typeof value !== "object") return value;
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const [key, entry] of Object.entries(value)) out[key] = SENSITIVE_CONFIG_KEY.test(key) ? "[redacted]" : redactConfigForDisplay(entry);
|
|
28
|
+
return out;
|
|
28
29
|
}
|
|
29
30
|
function senderMayWritePersistentConfig(ctx) {
|
|
30
31
|
const { source, senderId, isGroup } = ctx;
|
|
@@ -84,9 +85,12 @@ const configCommand = {
|
|
|
84
85
|
const action = parts[0]?.toLowerCase();
|
|
85
86
|
const rest = parts.slice(1).join(" ").trim();
|
|
86
87
|
if (!action || action === "show" || action === "get") {
|
|
88
|
+
if (!senderMayWritePersistentConfig(ctx)) return {
|
|
89
|
+
content: "⚠️ You are not allowed to view configuration from this chat surface.",
|
|
90
|
+
success: false
|
|
91
|
+
};
|
|
87
92
|
const config = ctx.getConfig?.() ?? loadConfig(resolveConfigPath());
|
|
88
|
-
const plain = JSON.parse(JSON.stringify(config));
|
|
89
|
-
redactConfigForDisplay(plain);
|
|
93
|
+
const plain = redactConfigForDisplay(JSON.parse(JSON.stringify(config)));
|
|
90
94
|
if (rest) {
|
|
91
95
|
const parsed = parseConfigPath(rest);
|
|
92
96
|
if (!parsed.ok || !parsed.path) return {
|
|
@@ -183,4 +187,4 @@ function registerConfigCommand() {
|
|
|
183
187
|
commandRegistry.register(configCommand);
|
|
184
188
|
}
|
|
185
189
|
//#endregion
|
|
186
|
-
export { registerConfigCommand };
|
|
190
|
+
export { redactConfigForDisplay, registerConfigCommand };
|
|
@@ -78,7 +78,8 @@ const switchCommand = {
|
|
|
78
78
|
const modelName = modelId.split("/").pop() || modelId;
|
|
79
79
|
return {
|
|
80
80
|
content: joinBlocks(`✅ Switched to ${code(modelId)} (${modelName}).`, "This model will be used for your next message."),
|
|
81
|
-
success: true
|
|
81
|
+
success: true,
|
|
82
|
+
metadata: { sessionConfigChanged: true }
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
return {
|
|
@@ -16,7 +16,7 @@ const newCommand = {
|
|
|
16
16
|
await ctx.setTyping(true);
|
|
17
17
|
await ctx.resetSession();
|
|
18
18
|
return {
|
|
19
|
-
content: "",
|
|
19
|
+
content: "✅ New session started. Previous transcript archived; model and session overrides kept.",
|
|
20
20
|
success: true
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -42,7 +42,7 @@ const listCommand = {
|
|
|
42
42
|
sessions.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());
|
|
43
43
|
const content = "📋 Your Sessions:\n\n" + sessions.slice(0, 10).map((s) => {
|
|
44
44
|
const indicator = s.isActive ? "▶️" : " ";
|
|
45
|
-
const name = getSessionDisplayName(s.key);
|
|
45
|
+
const name = s.name ?? getSessionDisplayName(s.key);
|
|
46
46
|
const date = s.updatedAt.toLocaleDateString();
|
|
47
47
|
return `${indicator} ${name}\n ${s.messageCount} messages · ${date}`;
|
|
48
48
|
}).join("\n\n");
|
|
@@ -53,7 +53,7 @@ const listCommand = {
|
|
|
53
53
|
type: "session-list",
|
|
54
54
|
sessions: sessions.slice(0, 5).map((s) => ({
|
|
55
55
|
...s,
|
|
56
|
-
name: getSessionDisplayName(s.key)
|
|
56
|
+
name: s.name ?? getSessionDisplayName(s.key)
|
|
57
57
|
})),
|
|
58
58
|
currentSession: ctx.conversationId
|
|
59
59
|
}]
|
|
@@ -67,7 +67,7 @@ const listCommand = {
|
|
|
67
67
|
const clearCommand = {
|
|
68
68
|
id: "session.clear",
|
|
69
69
|
name: "clear",
|
|
70
|
-
description: "Clear current session
|
|
70
|
+
description: "Clear current session and archive its previous transcript",
|
|
71
71
|
category: "session",
|
|
72
72
|
scope: [
|
|
73
73
|
"global",
|
|
@@ -76,10 +76,9 @@ const clearCommand = {
|
|
|
76
76
|
],
|
|
77
77
|
handler: async (ctx) => {
|
|
78
78
|
await ctx.setTyping(true);
|
|
79
|
-
|
|
80
|
-
await ctx.clearSession();
|
|
79
|
+
await ctx.resetSession();
|
|
81
80
|
return {
|
|
82
|
-
content:
|
|
81
|
+
content: "🗑️ Session cleared. Previous transcript archived.",
|
|
83
82
|
success: true
|
|
84
83
|
};
|
|
85
84
|
}
|
|
@@ -226,6 +225,10 @@ const archiveCommand = {
|
|
|
226
225
|
"group"
|
|
227
226
|
],
|
|
228
227
|
handler: async (ctx) => {
|
|
228
|
+
if (ctx.channelId === "webchat") return {
|
|
229
|
+
content: "Archive this chat from the sidebar so the app can navigate away safely.",
|
|
230
|
+
success: false
|
|
231
|
+
};
|
|
229
232
|
await ctx.setTyping(true);
|
|
230
233
|
await ctx.archiveSession();
|
|
231
234
|
return {
|
|
@@ -70,7 +70,6 @@ function parseInstallArgs(args) {
|
|
|
70
70
|
const skillCommand = {
|
|
71
71
|
id: "system.skill",
|
|
72
72
|
name: "skill",
|
|
73
|
-
aliases: ["skills"],
|
|
74
73
|
description: "Install skills from explicit sources. Subcommands: install <source>",
|
|
75
74
|
category: "tool",
|
|
76
75
|
scope: ["global", "private"],
|
|
@@ -49,8 +49,9 @@ const thinkCommand = {
|
|
|
49
49
|
xhigh: "Extra high thinking effort",
|
|
50
50
|
max: "Maximum thinking effort",
|
|
51
51
|
adaptive: "Auto-adjust based on task complexity"
|
|
52
|
-
}[level]}\n\
|
|
53
|
-
success: true
|
|
52
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
53
|
+
success: true,
|
|
54
|
+
metadata: { sessionConfigChanged: true }
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
};
|
|
@@ -88,8 +89,9 @@ const reasoningCommand = {
|
|
|
88
89
|
off: "Hide reasoning from user",
|
|
89
90
|
on: "Show reasoning after completion",
|
|
90
91
|
stream: "Stream reasoning in real-time"
|
|
91
|
-
}[level]}\n\
|
|
92
|
-
success: true
|
|
92
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
93
|
+
success: true,
|
|
94
|
+
metadata: { sessionConfigChanged: true }
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
97
|
};
|
|
@@ -116,8 +118,9 @@ const verboseCommand = {
|
|
|
116
118
|
const newLevel = await ctx.getVerboseLevel?.() === "on" ? "off" : "on";
|
|
117
119
|
await setSessionAgentField(ctx.getSessionConfigStore?.(), ctx.conversationId, "verboseLevel", newLevel);
|
|
118
120
|
return {
|
|
119
|
-
content: `📝 *Verbose Mode*\n\nMode: *${newLevel}*\n\n${newLevel === "on" ? "Verbose output enabled
|
|
120
|
-
success: true
|
|
121
|
+
content: `📝 *Verbose Mode*\n\nMode: *${newLevel}*\n\n${newLevel === "on" ? "Verbose output enabled for this conversation." : "Verbose output disabled for this conversation."}`,
|
|
122
|
+
success: true,
|
|
123
|
+
metadata: { sessionConfigChanged: true }
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
126
|
const level = normalizeVerboseLevel(args.trim());
|
|
@@ -131,8 +134,9 @@ const verboseCommand = {
|
|
|
131
134
|
off: "Minimal output",
|
|
132
135
|
on: "Normal verbose output",
|
|
133
136
|
full: "Full verbose output with all details"
|
|
134
|
-
}[level]}\n\
|
|
135
|
-
success: true
|
|
137
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
138
|
+
success: true,
|
|
139
|
+
metadata: { sessionConfigChanged: true }
|
|
136
140
|
};
|
|
137
141
|
}
|
|
138
142
|
};
|
|
@@ -84,7 +84,7 @@ Voice: *${currentVoice}*
|
|
|
84
84
|
switch (arg) {
|
|
85
85
|
case "on":
|
|
86
86
|
case "enable": {
|
|
87
|
-
const success = await ctx.updateConfig?.("tts.enabled", true);
|
|
87
|
+
const success = await ctx.updateConfig?.("messages.tts.enabled", true);
|
|
88
88
|
const base = success ? "✅ TTS enabled. Use `/tts always` or `/tts inbound` to set trigger mode." : "❌ Failed to enable TTS.";
|
|
89
89
|
return {
|
|
90
90
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -93,7 +93,7 @@ Voice: *${currentVoice}*
|
|
|
93
93
|
}
|
|
94
94
|
case "off":
|
|
95
95
|
case "disable": {
|
|
96
|
-
const success = await ctx.updateConfig?.("tts.enabled", false);
|
|
96
|
+
const success = await ctx.updateConfig?.("messages.tts.enabled", false);
|
|
97
97
|
return {
|
|
98
98
|
content: success ? "✅ TTS disabled." : "❌ Failed to disable TTS.",
|
|
99
99
|
success: !!success
|
|
@@ -103,8 +103,8 @@ Voice: *${currentVoice}*
|
|
|
103
103
|
case "inbound":
|
|
104
104
|
case "tagged": {
|
|
105
105
|
const mode = arg;
|
|
106
|
-
const success = await ctx.updateConfig?.("tts.trigger", mode);
|
|
107
|
-
if (success && !isEnabled) await ctx.updateConfig?.("tts.enabled", true);
|
|
106
|
+
const success = await ctx.updateConfig?.("messages.tts.trigger", mode);
|
|
107
|
+
if (success && !isEnabled) await ctx.updateConfig?.("messages.tts.enabled", true);
|
|
108
108
|
const base = success ? `✅ TTS trigger mode set to *${mode}*${!isEnabled ? " and TTS enabled" : ""}.` : `❌ Failed to set TTS trigger mode.`;
|
|
109
109
|
return {
|
|
110
110
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -112,7 +112,7 @@ Voice: *${currentVoice}*
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
case "never": {
|
|
115
|
-
const success = await ctx.updateConfig?.("tts.trigger", "off");
|
|
115
|
+
const success = await ctx.updateConfig?.("messages.tts.trigger", "off");
|
|
116
116
|
return {
|
|
117
117
|
content: success ? "✅ TTS trigger mode set to *off*." : "❌ Failed to set TTS trigger mode.",
|
|
118
118
|
success: !!success
|
|
@@ -165,7 +165,7 @@ Voice: *${currentVoice}*
|
|
|
165
165
|
content: `❌ Invalid provider: ${provider}\nValid providers: openai, alibaba, minimax, edge`,
|
|
166
166
|
success: false
|
|
167
167
|
};
|
|
168
|
-
const success = await ctx.updateConfig?.("tts.provider", provider);
|
|
168
|
+
const success = await ctx.updateConfig?.("messages.tts.provider", provider);
|
|
169
169
|
const base = success ? `✅ TTS provider set to *${provider}*.` : "❌ Failed to set TTS provider.";
|
|
170
170
|
return {
|
|
171
171
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -175,7 +175,7 @@ Voice: *${currentVoice}*
|
|
|
175
175
|
if (subcommand === "voice" && subarg) {
|
|
176
176
|
const voice = subarg;
|
|
177
177
|
const provider = currentProvider;
|
|
178
|
-
const success = await ctx.updateConfig?.(`tts.${provider}.voice`, voice);
|
|
178
|
+
const success = await ctx.updateConfig?.(`messages.tts.providers.${provider}.voice`, voice);
|
|
179
179
|
return {
|
|
180
180
|
content: success ? `✅ TTS voice set to *${voice}* for ${provider}.` : "❌ Failed to set TTS voice.",
|
|
181
181
|
success: !!success
|
|
@@ -101,7 +101,8 @@ const learningCommand = {
|
|
|
101
101
|
const mode = (await store.get(ctx.conversationId))?.userContextMode ?? "enabled";
|
|
102
102
|
return {
|
|
103
103
|
content: globallyEnabled && mode === "enabled" ? "User understanding is enabled for this conversation." : globallyEnabled && mode === "temporary" ? "This is a temporary conversation. Stored user context is not read, and this conversation does not update user understanding." : globallyEnabled ? "User understanding is off for this conversation. Existing chat history is still stored; use /remember for anything you explicitly want saved." : "User understanding is disabled globally. Existing chat history is still stored.",
|
|
104
|
-
success: true
|
|
104
|
+
success: true,
|
|
105
|
+
...action !== "status" ? { metadata: { sessionConfigChanged: true } } : {}
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
};
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
function normalizeTelegramCommandName(command) {
|
|
7
7
|
const at = command.indexOf("@");
|
|
8
|
-
|
|
9
|
-
return command.slice(0, at);
|
|
8
|
+
return (at === -1 ? command : command.slice(0, at)).toLowerCase();
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* Parse a `/command` from message text. Handles:
|
|
@@ -20,14 +19,14 @@ function parseSlashCommand(text) {
|
|
|
20
19
|
const line = part.trim();
|
|
21
20
|
if (!line.startsWith("/")) continue;
|
|
22
21
|
const withoutPrefix = line.slice(1);
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
22
|
+
const whitespaceIndex = withoutPrefix.search(/\s/);
|
|
23
|
+
if (whitespaceIndex === -1) return {
|
|
25
24
|
command: normalizeTelegramCommandName(withoutPrefix),
|
|
26
25
|
args: ""
|
|
27
26
|
};
|
|
28
27
|
return {
|
|
29
|
-
command: normalizeTelegramCommandName(withoutPrefix.slice(0,
|
|
30
|
-
args: withoutPrefix.slice(
|
|
28
|
+
command: normalizeTelegramCommandName(withoutPrefix.slice(0, whitespaceIndex)),
|
|
29
|
+
args: withoutPrefix.slice(whitespaceIndex + 1).trim()
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
32
|
return null;
|