@xopcai/xopc 0.0.364 → 0.0.367
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/dist/sidepanel.js +16 -4
- 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-GvR2gZ0T.js → activity-store-Cuf3JFFJ.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-7Ct-ZlfL.js → agent-avatar-dicebear-DyATPNTe.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-gT9_j4tr.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CLXCJ6JN.js +1 -0
- package/dist/gateway/static/root/assets/agents-BAUfOMsq.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-BkXb7VEZ.js → agents-admin-api-D842OcNo.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-4gpFbdsr.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CjfsIn9A.js → app-management-settings-panel-CoIFxQKH.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-qqHZ15GU.js → appearance-settings-DQr0o6Lm.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-Ba2VkQk6.js → apps-page-CltMV4Xp.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CKe3qAaL.js → archive-plugin-DT8Nio-r.js} +1 -1
- package/dist/gateway/static/root/assets/automation-display-DCkjVzA0.js +2 -0
- package/dist/gateway/static/root/assets/{automations-page-Bt8Q58ut.js → automations-page-BIfWS_3Y.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BCGPjsdU.js +6 -0
- package/dist/gateway/static/root/assets/binary-plugins-7qs3qcW9.js +2 -0
- package/dist/gateway/static/root/assets/{block-editor-ClRFbHP7.js → block-editor-BFPUlxJ6.js} +28 -28
- package/dist/gateway/static/root/assets/{browser-automation-inputs-5B3qAdmb.js → browser-automation-inputs-BUAIKIX0.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BjMub7JM.js → browser-automations-page-CSwu1U1F.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-C1ReMNqX.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-BzWFO_x_.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities-BKu9BqPe.js → capabilities-K0Zb_lH0.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-BdTSqloI.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-gZ8auLwa.js → capabilities-settings-panel-BUblBMZC.js} +4 -4
- package/dist/gateway/static/root/assets/{capability-header-actions-L1NvoOUG.js → capability-header-actions-AMn_vTNv.js} +1 -1
- package/dist/gateway/static/root/assets/channels-CXCf5qO6.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DsCpKPBe.js → chat-terminal-dock-C7nAROhF.js} +2 -2
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +1 -0
- package/dist/gateway/static/root/assets/computer-settings-page-B5SuSZ3G.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-mtH9mEBf.js → connector-service-page-CTx1B8wx.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DfnK1crf.js +2 -0
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-Cx_xIKvN.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-B_fPQBTM.js → dependency-picker-DYm96PDu.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CJrO9Vd_.js → desktop-pet-D90OzgeR.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DYAfri9w.js → desktop-pet-settings-CmdCecjm.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CqRys2R8.js → device-pairing-wizard-s2ogSa4l.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-D7_qSxNZ.js → directory-picker-path-field-DZpaoeNa.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BGyJpRv4.js → extension-debug-page-Bv6QE8kC.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-D1zBmd8F.js → extension-page-CEsq71Cm.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-F9JzOWZ3.js → extension-provider-CX-sK0Tw.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CTR8AjCG.js → extension-settings-page-UyOHF39P.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-Chhv4Nfv.js → fallback-models-CKv_Wqg8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CoRoOG1l.js → gateway-config-swr-Cjnkle5J.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-D0ygm6bc.js → gateway-realtime-DCCLdyQD.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-C_Th8kGg.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CZ73IpbP.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-FDS6S6qa.js → gateway-startup-retry-CXKmdVzN.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BQWq4kYi.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-BPd76jW5.js → image-generation-api-NLHzm4Nc.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-9EnECtcl.js → imports-page-C7qvlBTQ.js} +1 -1
- package/dist/gateway/static/root/assets/index-BQgqzhQj.js +106 -0
- package/dist/gateway/static/root/assets/index-COB4QIJp.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-MC7mG2h2.js → keyboard-shortcuts-settings-pkgFWJb-.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-dMDhZXAi.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-c3HncHZ3.js → local-apps-page-TpUAfOn2.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-Cvv7I0fw.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-DId6-v2R.js → locale-store-C8TMD2gn.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-B-Y9oZLh.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-B2lzsw6X.js +1 -0
- package/dist/gateway/static/root/assets/markdown-view-Dse7rkio.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-XLewwq2q.js → media-plugins-BZrnzaBM.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Dy26npMy.js +3 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-B9SKjidc.js → models-hub-cache-B1C86nRp.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DL__qP6U.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-Byt65v3r.js → notes-api-DKiVeQKG.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-DTBbg9Hs.js +8 -0
- package/dist/gateway/static/root/assets/{oauth-api-BYsCbyGZ.js → oauth-api-BwpzpRwC.js} +1 -1
- package/dist/gateway/static/root/assets/open-route-MyZ2sB9C.js +1 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-RBp1QK0F.js → page-context-capture-button-Cxzd4QPB.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CzaTnHeD.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-D4hoEWiu.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-aR38El2E.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-D20QH4YB.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Bf3BIcT6.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-7F2WNEZC.js → registry-api-AdnxowbH.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CKxqncqW.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-B0c120iI.js → runtime-tools-settings-panel-CBN3raz1.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-Cv_5ozfX.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-DQpQc9tH.js → schema-form-CxrMGsT9.js} +1 -1
- package/dist/gateway/static/root/assets/secret-input-D93UrW4C.js +1 -0
- package/dist/gateway/static/root/assets/{send-session-input-D1oc6BC6.js → send-session-input-CgOzhDZ0.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-N3N37MrR.js → session-api-_HIN8or3.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-CzCto5zT.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-DZcu6NLJ.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DazqeDQ7.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-GgBEp6O7.js → settings-page-D8Q3H3-o.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DvLMMiuS.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-TBBGJPfT.js → share-link-dialog-Dg5os066.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DyRLPsPv.js → share-preview-page-DMvohAyr.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DU0fHP2G.js → shares-api-C96IO4qJ.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-DJ1ME-XM.js → shares-settings-CsDATuCw.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-1Puv6wOz.js → skill-api-C10ML0CH.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-ClyFqHk7.js → skill-reload-api-DNbJzSfB.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-DObMKvA6.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel--yV67a8L.js → system-settings-panel-Bn3khdzb.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BR2L1L8l.js +2 -0
- package/dist/gateway/static/root/assets/task-expandable-content-DL2Q2gre.js +1 -0
- package/dist/gateway/static/root/assets/{tasks-CH6KoBeY.js → tasks-DwKXgZ-I.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-OhcbFEUR.js → theme-store-DQ6KJa4l.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-Ed8_GYUT.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-COLdiP_E.js → tunnel-api-D3X8jDwo.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-CtM5IfrL.js → usage-page-BqzRyyb9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-veoM0dHn.js → use-autosave-CRFefpzO.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-OLrvSjn5.js +2 -0
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-Bope6MW6.js → use-file-preview-expanded-CJvzfQvw.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-CG6wqIKP.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CwD6a3KQ.js → voice-api-key-field-R9zNWYR_.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Daexehmc.js → voice-config-api-DLudE9Rc.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C9u7tuEc.js → work-discovery-overlay-DVmQrolV.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BMOBbf33.js → workflow-run-setup-panel-DEkmuD3T.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-pqCB3sh4.js +6 -0
- package/dist/gateway/static/root/assets/workspace-api-CdVUhyPo.js +2 -0
- package/dist/gateway/static/root/index.html +33 -31
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +1 -0
- package/dist/packages/gateway-contract/src/home.js +14 -0
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/notifications.js +2 -1
- package/dist/packages/gateway-contract/src/personal-proactivity.js +139 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +1 -0
- package/dist/packages/image-providers/src/catalog.js +373 -0
- package/dist/packages/image-providers/src/execute.js +372 -0
- package/dist/packages/image-providers/src/http.js +94 -0
- package/dist/packages/image-providers/src/index.js +5 -0
- package/dist/packages/image-providers/src/types.d.ts +95 -0
- package/dist/packages/image-providers/src/validation.js +52 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +35 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/context/execution-context.js +1 -1
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/failover-error.d.ts +1 -1
- package/dist/src/agent/failover-error.js +7 -0
- package/dist/src/agent/image/generation/native-provider.d.ts +2 -0
- package/dist/src/agent/image/generation/native-provider.js +118 -0
- package/dist/src/agent/image/generation/openai-images-provider.d.ts +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +48 -32
- package/dist/src/agent/image/generation/provider-registry.js +4 -13
- package/dist/src/agent/image/generation/providers/xopc-cloud.js +5 -34
- package/dist/src/agent/image/generation/runtime-types.d.ts +2 -4
- package/dist/src/agent/image/generation/runtime.js +28 -23
- package/dist/src/agent/image/generation/types.d.ts +3 -50
- package/dist/src/agent/image/generation/validation.d.ts +6 -0
- package/dist/src/agent/image/generation/validation.js +16 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
- package/dist/src/agent/prompt/voice-presentation.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +17 -1
- package/dist/src/agent/service.js +3 -3
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -0
- package/dist/src/agent/tools/delegation-policy.js +2 -0
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +31 -4
- package/dist/src/agent/tools/image-generate-tool.js +5 -19
- package/dist/src/agent/tools/index.d.ts +2 -2
- package/dist/src/agent/tools/index.js +3 -3
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +2 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +60 -1
- package/dist/src/agent/tools/personal-attention-tool.d.ts +21 -0
- package/dist/src/agent/tools/personal-attention-tool.js +191 -0
- package/dist/src/agent/tools/personal-task-tool.d.ts +12 -8
- package/dist/src/agent/tools/personal-task-tool.js +35 -41
- package/dist/src/agent/tools/user-context-tool.d.ts +2 -0
- package/dist/src/agent/tools/user-context-tool.js +61 -2
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +1 -1
- package/dist/src/agent-catalog/repository.d.ts +1 -0
- package/dist/src/agent-catalog/repository.js +4 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +2 -0
- package/dist/src/automations/domain/types.d.ts +1 -1
- package/dist/src/automations/domain/validation.d.ts +4 -0
- package/dist/src/automations/domain/validation.js +1 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/personal-command-policy.d.ts +2 -0
- package/dist/src/chat-commands/personal-command-policy.js +9 -0
- package/dist/src/chat-commands/registry.js +6 -0
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/models.js +4 -9
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/models-json.d.ts +170 -0
- package/dist/src/config/models-json.js +23 -8
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/files/file-service.d.ts +6 -0
- package/dist/src/files/file-service.js +38 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/custom-image-providers.d.ts +34 -0
- package/dist/src/gateway/file-path-classifier.js +12 -3
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/files.js +13 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/observability.js +8 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +41 -0
- package/dist/src/gateway/hono/routes/projects.js +3 -3
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +9 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +12 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +15 -0
- package/dist/src/gateway/service/session-command-service.js +5 -3
- package/dist/src/gateway/service/session-input-coordinator.d.ts +12 -0
- package/dist/src/gateway/service/session-input-coordinator.js +63 -5
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +54 -9
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/notifications/planner.js +32 -0
- package/dist/src/notifications/service.d.ts +2 -0
- package/dist/src/personal-agent/capability-service.js +3 -2
- package/dist/src/personal-agent/communication.d.ts +3 -2
- package/dist/src/personal-agent/communication.js +4 -3
- package/dist/src/personal-agent/conversation-state.d.ts +5 -0
- package/dist/src/personal-agent/conversation-state.js +17 -0
- package/dist/src/personal-agent/notifications.d.ts +4 -0
- package/dist/src/personal-agent/notifications.js +40 -0
- package/dist/src/personal-agent/persona.d.ts +6 -0
- package/dist/src/personal-agent/persona.js +16 -0
- package/dist/src/personal-agent/policy.d.ts +3 -1
- package/dist/src/personal-agent/policy.js +28 -6
- package/dist/src/personal-agent/proactivity/automation.d.ts +3 -0
- package/dist/src/personal-agent/proactivity/automation.js +41 -0
- package/dist/src/personal-agent/proactivity/follow-up-request.d.ts +5 -0
- package/dist/src/personal-agent/proactivity/follow-up-request.js +44 -0
- package/dist/src/personal-agent/proactivity/repository.d.ts +128 -0
- package/dist/src/personal-agent/proactivity/repository.js +403 -0
- package/dist/src/personal-agent/proactivity/routes.d.ts +3 -0
- package/dist/src/personal-agent/proactivity/routes.js +182 -0
- package/dist/src/personal-agent/proactivity/service.d.ts +32 -0
- package/dist/src/personal-agent/proactivity/service.js +496 -0
- package/dist/src/personal-agent/prompt-context.d.ts +10 -0
- package/dist/src/personal-agent/prompt-context.js +119 -0
- package/dist/src/personal-agent/prompts.d.ts +7 -0
- package/dist/src/personal-agent/prompts.js +135 -0
- package/dist/src/personal-agent/reply-composer.d.ts +1 -1
- package/dist/src/personal-agent/reply-composer.js +41 -13
- package/dist/src/personal-agent/repository.d.ts +1 -1
- package/dist/src/personal-agent/repository.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +2 -2
- package/dist/src/personal-agent/service.d.ts +1 -2
- package/dist/src/personal-agent/service.js +5 -93
- package/dist/src/personal-agent/specialist-capabilities.d.ts +9 -0
- package/dist/src/personal-agent/specialist-capabilities.js +37 -0
- package/dist/src/personal-agent/unread.d.ts +10 -0
- package/dist/src/personal-agent/unread.js +43 -0
- package/dist/src/providers/env-keys.js +6 -0
- package/dist/src/providers/model-catalog-persistence.js +3 -22
- package/dist/src/providers/model-catalog-store.js +1 -8
- package/dist/src/providers/model-catalog-types.d.ts +1 -9
- package/dist/src/providers/xopc-cloud-model-source.js +4 -25
- package/dist/src/session/client-history.d.ts +2 -0
- package/dist/src/session/client-history.js +26 -0
- package/dist/src/session/init-session-turn.js +10 -0
- package/dist/src/session/session-context-for-llm.js +28 -0
- package/dist/src/session/store.js +1 -1
- package/dist/src/storage/sqlite/migrations/235_personal_conversation_priority.sql +3 -0
- package/dist/src/storage/sqlite/migrations/236_personal_proactivity.sql +53 -0
- package/dist/src/storage/sqlite/migrations/237_personal_strategy_versions.sql +18 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-input-repository.js +18 -5
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +27 -1
- package/dist/src/tasks/task-main-update-decision-service.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/voice/platform-catalog.d.ts +1 -9
- package/dist/src/voice/realtime/agentEngine.js +32 -7
- package/dist/src/voice/realtime/engine.d.ts +1 -0
- package/dist/src/voice/realtime/omniEngine.d.ts +1 -0
- package/dist/src/voice/realtime/omniEngine.js +10 -0
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/runtime.d.ts +1 -0
- package/dist/src/voice/realtime/runtime.js +5 -0
- package/dist/src/voice/realtime/runtime.types.d.ts +2 -0
- package/dist/src/work-discovery/service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +4 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-wYj-iyqv.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-C9HYMhnJ.js +0 -1
- package/dist/gateway/static/root/assets/agents-hPkFQ81z.js +0 -66
- package/dist/gateway/static/root/assets/app-link-DRL0YnPs.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ch0ViAJW.js +0 -7
- package/dist/gateway/static/root/assets/binary-plugins-J51oS7-D.js +0 -2
- package/dist/gateway/static/root/assets/browser-settings-page-CYrPA-Fp.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-CT_ZW9fT.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-dW6FXtOy.js +0 -2
- package/dist/gateway/static/root/assets/channels-Dx5T2G73.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-6FWwxYLe.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DgDLaws0.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-BDcwEaIx.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DBvCRclh.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BVfz4Tla.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BF_9C9yW.js +0 -1
- package/dist/gateway/static/root/assets/index-BpXej9jJ.js +0 -106
- package/dist/gateway/static/root/assets/index-CbJNcWAn.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CytNu0-_.js +0 -1
- package/dist/gateway/static/root/assets/local-session-drafts-gbemPamv.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-D4aXtitd.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-CRzWi_iJ.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-DQZ51j9e.js +0 -201
- package/dist/gateway/static/root/assets/messages-BHvpZNe9.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-BgbByI-4.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-R2BX5XCE.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-F0jTBWva.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-BtDK68qb.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DmQEm0yH.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CrLQvkHX.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C25_hQAd.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-DM64yMnx.js +0 -2
- package/dist/gateway/static/root/assets/secret-input-DPl3VYM8.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-CMGUwtbN.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DvDO8LtA.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BNhgbmcX.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-10bMi6yL.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-D52pEr5x.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-D-tcS2bS.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-DoBJ0TYY.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-DB0bBGzZ.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-CSh61kZ5.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-BrD9vXqO.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-Cs4sjV2A.js +0 -2
- package/dist/src/agent/image/generation/normalization.d.ts +0 -38
- package/dist/src/agent/image/generation/normalization.js +0 -181
- package/dist/src/agent/image/generation/providers/dashscope.d.ts +0 -35
- package/dist/src/agent/image/generation/providers/dashscope.js +0 -257
- package/dist/src/agent/image/generation/providers/fal.d.ts +0 -15
- package/dist/src/agent/image/generation/providers/fal.js +0 -323
- package/dist/src/agent/image/generation/providers/google.d.ts +0 -16
- package/dist/src/agent/image/generation/providers/google.js +0 -244
- package/dist/src/agent/image/generation/providers/minimax.d.ts +0 -23
- package/dist/src/agent/image/generation/providers/minimax.js +0 -215
- package/dist/src/agent/image/generation/providers/openai.d.ts +0 -5
- package/dist/src/agent/image/generation/providers/openai.js +0 -134
|
@@ -60,6 +60,12 @@ var init_env_keys = __esmMin((() => {
|
|
|
60
60
|
"GITHUB_COPILOT_TOKEN"
|
|
61
61
|
],
|
|
62
62
|
/** DashScope HTTP APIs (image gen, STT, TTS) — not an LLM KnownProvider. */
|
|
63
|
+
seedream: ["ARK_API_KEY", "VOLCENGINE_API_KEY"],
|
|
64
|
+
ideogram: ["IDEOGRAM_API_KEY"],
|
|
65
|
+
bfl: ["BFL_API_KEY"],
|
|
66
|
+
tokenhub: ["TOKENHUB_API_KEY"],
|
|
67
|
+
stability: ["STABILITY_API_KEY"],
|
|
68
|
+
fal: ["FAL_KEY", "FAL_API_KEY"],
|
|
63
69
|
dashscope: ["DASHSCOPE_API_KEY", "QWEN_API_KEY"],
|
|
64
70
|
"dashscope-cn": ["DASHSCOPE_API_KEY", "QWEN_API_KEY"],
|
|
65
71
|
"dashscope-intl": ["DASHSCOPE_API_KEY", "QWEN_API_KEY"],
|
|
@@ -2,6 +2,7 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
|
|
3
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
4
|
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
|
+
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
5
6
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
6
7
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
7
8
|
import { readFileSync, rmSync } from "node:fs";
|
|
@@ -10,33 +11,13 @@ import { rm } from "node:fs/promises";
|
|
|
10
11
|
//#region src/providers/model-catalog-persistence.ts
|
|
11
12
|
var MAX_CATALOG_BYTES, imageGenerationSchema, sttSchema, ttsSchema, searchSchema, catalogModelSchema, persistedCatalogSchema, ModelCatalogPersistence;
|
|
12
13
|
var init_model_catalog_persistence = __esmMin((() => {
|
|
14
|
+
init_models_json();
|
|
13
15
|
init_voice();
|
|
14
16
|
init_src();
|
|
15
17
|
init_paths_state();
|
|
16
18
|
init_write_file_atomic();
|
|
17
19
|
MAX_CATALOG_BYTES = 4 * 1024 * 1024;
|
|
18
|
-
imageGenerationSchema =
|
|
19
|
-
maxCount: z.number().int().positive(),
|
|
20
|
-
sizes: z.array(z.string()),
|
|
21
|
-
aspectRatios: z.array(z.string()).optional(),
|
|
22
|
-
qualities: z.array(z.enum([
|
|
23
|
-
"low",
|
|
24
|
-
"medium",
|
|
25
|
-
"high",
|
|
26
|
-
"auto"
|
|
27
|
-
])),
|
|
28
|
-
formats: z.array(z.enum([
|
|
29
|
-
"png",
|
|
30
|
-
"jpeg",
|
|
31
|
-
"webp"
|
|
32
|
-
])),
|
|
33
|
-
backgrounds: z.array(z.enum([
|
|
34
|
-
"transparent",
|
|
35
|
-
"opaque",
|
|
36
|
-
"auto"
|
|
37
|
-
])),
|
|
38
|
-
maxInputImages: z.number().int().nonnegative()
|
|
39
|
-
}).strict();
|
|
20
|
+
imageGenerationSchema = ImageGenerationCapabilitiesSchema;
|
|
40
21
|
sttSchema = z.object({
|
|
41
22
|
inputFormats: z.array(z.string()),
|
|
42
23
|
maxBytes: z.number().int().nonnegative(),
|
|
@@ -77,14 +77,7 @@ var init_model_catalog_store = __esmMin((() => {
|
|
|
77
77
|
input: [...model.input],
|
|
78
78
|
output: [...model.output],
|
|
79
79
|
operations: [...model.operations],
|
|
80
|
-
...model.imageGeneration ? { imageGeneration: {
|
|
81
|
-
...model.imageGeneration,
|
|
82
|
-
sizes: [...model.imageGeneration.sizes],
|
|
83
|
-
aspectRatios: [...model.imageGeneration.aspectRatios ?? []],
|
|
84
|
-
qualities: [...model.imageGeneration.qualities],
|
|
85
|
-
formats: [...model.imageGeneration.formats],
|
|
86
|
-
backgrounds: [...model.imageGeneration.backgrounds]
|
|
87
|
-
} } : {},
|
|
80
|
+
...model.imageGeneration ? { imageGeneration: structuredClone(model.imageGeneration) } : {},
|
|
88
81
|
...model.voice ? { voice: structuredClone(model.voice) } : {},
|
|
89
82
|
...model.stt ? { stt: {
|
|
90
83
|
...model.stt,
|
|
@@ -20,15 +20,7 @@ export interface CatalogModel {
|
|
|
20
20
|
priority?: number;
|
|
21
21
|
tier?: string;
|
|
22
22
|
bestEffort?: boolean;
|
|
23
|
-
imageGeneration?:
|
|
24
|
-
maxCount: number;
|
|
25
|
-
sizes: string[];
|
|
26
|
-
aspectRatios?: string[];
|
|
27
|
-
qualities: Array<'low' | 'medium' | 'high' | 'auto'>;
|
|
28
|
-
formats: Array<'png' | 'jpeg' | 'webp'>;
|
|
29
|
-
backgrounds: Array<'transparent' | 'opaque' | 'auto'>;
|
|
30
|
-
maxInputImages: number;
|
|
31
|
-
};
|
|
23
|
+
imageGeneration?: import('../../packages/image-providers/src/types.js').ImageCapabilities;
|
|
32
24
|
stt?: {
|
|
33
25
|
inputFormats: string[];
|
|
34
26
|
maxBytes: number;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { init_model_policy, isDedicatedComputerProfile } from "../computer/model-policy.js";
|
|
2
|
+
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
2
3
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
3
4
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
4
5
|
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
6
|
import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
|
|
6
7
|
//#region src/providers/xopc-cloud-model-source.ts
|
|
8
|
+
init_models_json();
|
|
7
9
|
init_voice();
|
|
8
10
|
init_model_policy();
|
|
9
11
|
init_provider_auth_service();
|
|
@@ -190,31 +192,8 @@ function positiveInteger(value) {
|
|
|
190
192
|
return Number.isSafeInteger(value) && Number(value) > 0 ? Number(value) : 0;
|
|
191
193
|
}
|
|
192
194
|
function parseImageGenerationCapabilities(value) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const strings = (candidate, allowed) => Array.isArray(candidate) ? candidate.filter((item) => typeof item === "string" && (!allowed || allowed.includes(item))) : [];
|
|
196
|
-
return {
|
|
197
|
-
maxCount: Number.isSafeInteger(raw.maxCount) && Number(raw.maxCount) > 0 ? Number(raw.maxCount) : 1,
|
|
198
|
-
sizes: strings(raw.sizes),
|
|
199
|
-
aspectRatios: strings(raw.aspectRatios),
|
|
200
|
-
qualities: strings(raw.qualities, [
|
|
201
|
-
"low",
|
|
202
|
-
"medium",
|
|
203
|
-
"high",
|
|
204
|
-
"auto"
|
|
205
|
-
]),
|
|
206
|
-
formats: strings(raw.formats, [
|
|
207
|
-
"png",
|
|
208
|
-
"jpeg",
|
|
209
|
-
"webp"
|
|
210
|
-
]),
|
|
211
|
-
backgrounds: strings(raw.backgrounds, [
|
|
212
|
-
"transparent",
|
|
213
|
-
"opaque",
|
|
214
|
-
"auto"
|
|
215
|
-
]),
|
|
216
|
-
maxInputImages: Number.isSafeInteger(raw.maxInputImages) && Number(raw.maxInputImages) > 0 ? Number(raw.maxInputImages) : 0
|
|
217
|
-
};
|
|
195
|
+
const parsed = ImageGenerationCapabilitiesSchema.safeParse(value);
|
|
196
|
+
return parsed.success ? parsed.data : void 0;
|
|
218
197
|
}
|
|
219
198
|
function parseDisplayNames(value) {
|
|
220
199
|
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PersonalProvenance } from '@xopcai/gateway-contract';
|
|
1
2
|
import { type TaskResultDelivery, type TurnOutcome, type UserTurnDocument } from '@xopcai/gateway-contract';
|
|
2
3
|
import type { Message } from './types.js';
|
|
3
4
|
import type { TaskUpdateTrigger } from '../storage/sqlite/session-input-repository.js';
|
|
@@ -37,6 +38,7 @@ export interface ClientHistoryMessage {
|
|
|
37
38
|
userTurnDocument?: UserTurnDocument;
|
|
38
39
|
turnOutcome?: TurnOutcome;
|
|
39
40
|
taskResultDelivery?: TaskResultDelivery;
|
|
41
|
+
personalProvenance?: PersonalProvenance;
|
|
40
42
|
};
|
|
41
43
|
kind?: 'message' | 'compaction' | 'context' | 'bash' | 'custom' | 'branch';
|
|
42
44
|
tokensBefore?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseTurnOutcome } from "../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { isUserTurnDocument } from "../../packages/gateway-contract/src/user-turn-document.js";
|
|
3
3
|
import { parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
4
|
+
import { PersonalProvenanceSchema, parsePersonalProactiveMessage } from "../../packages/gateway-contract/src/personal-proactivity.js";
|
|
4
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
6
|
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
6
7
|
import { buildTranscriptOutline } from "./transcript-outline.js";
|
|
@@ -195,6 +196,10 @@ function messagesToClientHistory(messages, opts) {
|
|
|
195
196
|
const toolCalls = toolCallsWithResults(collectMessageToolCalls(m.content, m.tool_calls), results);
|
|
196
197
|
out.push({
|
|
197
198
|
role: "assistant",
|
|
199
|
+
...PersonalProvenanceSchema.safeParse(m.metadata?.personalProvenance).success ? {
|
|
200
|
+
startsNewBubble: true,
|
|
201
|
+
metadata: { personalProvenance: PersonalProvenanceSchema.parse(m.metadata?.personalProvenance) }
|
|
202
|
+
} : {},
|
|
198
203
|
...parseTaskResultDelivery(m.metadata?.taskResultDelivery) ? {
|
|
199
204
|
startsNewBubble: true,
|
|
200
205
|
metadata: m.metadata
|
|
@@ -338,6 +343,23 @@ function customRowToClientHistory(row) {
|
|
|
338
343
|
timestamp: parseTimestampValue(typeof r.timestamp === "number" ? r.timestamp : void 0)
|
|
339
344
|
};
|
|
340
345
|
}
|
|
346
|
+
if (customType === "personal_proactive_message") {
|
|
347
|
+
const message = parsePersonalProactiveMessage(r.details);
|
|
348
|
+
if (!message) return null;
|
|
349
|
+
return {
|
|
350
|
+
role: "assistant",
|
|
351
|
+
kind: "message",
|
|
352
|
+
startsNewBubble: true,
|
|
353
|
+
turnId: `personal-outreach:${message.outreachId}`,
|
|
354
|
+
content: message.text,
|
|
355
|
+
rawContent: [{
|
|
356
|
+
type: "text",
|
|
357
|
+
text: message.text
|
|
358
|
+
}],
|
|
359
|
+
timestamp: parseTimestampValue(message.createdAt),
|
|
360
|
+
metadata: { personalProvenance: message.provenance }
|
|
361
|
+
};
|
|
362
|
+
}
|
|
341
363
|
if (customType === "task_result_delivery") {
|
|
342
364
|
const delivery = parseTaskResultDelivery(r.details);
|
|
343
365
|
if (!delivery) return null;
|
|
@@ -579,6 +601,10 @@ function transcriptRowsToClientHistory(rows, opts) {
|
|
|
579
601
|
out.push({
|
|
580
602
|
id,
|
|
581
603
|
...messageRow.turnId ? { turnId: messageRow.turnId } : {},
|
|
604
|
+
...PersonalProvenanceSchema.safeParse(messageRow.metadata?.personalProvenance).success ? {
|
|
605
|
+
startsNewBubble: true,
|
|
606
|
+
metadata: { personalProvenance: PersonalProvenanceSchema.parse(messageRow.metadata.personalProvenance) }
|
|
607
|
+
} : {},
|
|
582
608
|
...messageRow.turnId && opts?.startsNewBubbleTurnIds?.has(messageRow.turnId) ? { startsNewBubble: true } : {},
|
|
583
609
|
role: "assistant",
|
|
584
610
|
kind: "message",
|
|
@@ -3,6 +3,7 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
4
4
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
5
5
|
import { SessionConfigSchema, init_schema } from "../config/schema.js";
|
|
6
|
+
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
6
7
|
import { evaluateSessionFreshness, resolveSessionResetPolicy } from "./reset-policy.js";
|
|
7
8
|
import { resolveChannelResetConfig, resolveSessionResetType } from "./reset-type.js";
|
|
8
9
|
import { resolveSessionLifecycleTimestamps } from "./lifecycle-timestamps.js";
|
|
@@ -25,6 +26,15 @@ async function initSessionTurn(opts) {
|
|
|
25
26
|
conversationId: opts.conversationId
|
|
26
27
|
});
|
|
27
28
|
const key = conversationId?.trim() ?? opts.conversationId.trim();
|
|
29
|
+
if (isPersonalConversation(key)) return {
|
|
30
|
+
conversationId: key,
|
|
31
|
+
transcriptId: sessionMetadata?.transcriptId,
|
|
32
|
+
isNewSession: false,
|
|
33
|
+
resetTriggered: false,
|
|
34
|
+
staleRollover: false,
|
|
35
|
+
bodyStripped: rawBody,
|
|
36
|
+
bareReset: false
|
|
37
|
+
};
|
|
28
38
|
const routing = sessionMetadata?.routing;
|
|
29
39
|
const peerKind = routing?.peerKind;
|
|
30
40
|
const resetType = resolveSessionResetType({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
3
|
+
import { parsePersonalProactiveMessage } from "../../packages/gateway-contract/src/personal-proactivity.js";
|
|
3
4
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
5
|
import { init_voice_transcript, voiceTranscriptMessage } from "./voice-transcript.js";
|
|
5
6
|
import { init_compaction_types, isCompactionAudit, isCompactionHandover } from "./compaction-types.js";
|
|
@@ -297,6 +298,18 @@ function buildSessionContextForLlm(rows) {
|
|
|
297
298
|
}
|
|
298
299
|
if (isTranscriptCustomMessageEntry(r)) {
|
|
299
300
|
if (r.customType === "personal_request_status") continue;
|
|
301
|
+
if (r.customType === "personal_proactive_message") {
|
|
302
|
+
const message = parsePersonalProactiveMessage(r.details);
|
|
303
|
+
if (message) out.push({
|
|
304
|
+
role: "assistant",
|
|
305
|
+
content: [{
|
|
306
|
+
type: "text",
|
|
307
|
+
text: message.text
|
|
308
|
+
}],
|
|
309
|
+
timestamp: message.createdAt
|
|
310
|
+
});
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
300
313
|
if (r.customType === "task_result_delivery") {
|
|
301
314
|
const delivery = parseTaskResultDelivery(r.details);
|
|
302
315
|
if (delivery) out.push({
|
|
@@ -348,6 +361,21 @@ function buildSessionDisplayMessages(rows) {
|
|
|
348
361
|
});
|
|
349
362
|
continue;
|
|
350
363
|
}
|
|
364
|
+
if (r.customType === "personal_proactive_message") {
|
|
365
|
+
const message = parsePersonalProactiveMessage(r.details);
|
|
366
|
+
if (message) out.push({
|
|
367
|
+
role: "assistant",
|
|
368
|
+
content: [{
|
|
369
|
+
type: "text",
|
|
370
|
+
text: message.text
|
|
371
|
+
}],
|
|
372
|
+
timestamp: message.createdAt,
|
|
373
|
+
turnId: `personal-outreach:${message.outreachId}`,
|
|
374
|
+
startsNewBubble: true,
|
|
375
|
+
metadata: { personalProvenance: message.provenance }
|
|
376
|
+
});
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
351
379
|
if (r.customType === "task_result_delivery") {
|
|
352
380
|
const delivery = parseTaskResultDelivery(r.details);
|
|
353
381
|
if (delivery) out.push({
|
|
@@ -14,11 +14,11 @@ import { getSessionConfig, setSessionConfig } from "../storage/sqlite/config-rep
|
|
|
14
14
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
15
15
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
16
16
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
17
|
+
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
17
18
|
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
18
19
|
import { transcriptRowsToClientHistory } from "./client-history.js";
|
|
19
20
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
20
21
|
import { resolveCompactionPolicy } from "../agent/memory/compaction-policy.js";
|
|
21
|
-
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
22
22
|
import { IdleCompactionScheduler } from "../agent/memory/idle-compaction-scheduler.js";
|
|
23
23
|
import { readPostCompactionContext } from "../agent/reply/post-compaction-context.js";
|
|
24
24
|
import { promoteCompactionLedger } from "../agent/memory/compaction-promotion.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
-- Conversation priority is independent of Task cancellation and artifact delivery.
|
|
2
|
+
ALTER TABLE session_inputs ADD COLUMN interrupt_requested INTEGER NOT NULL DEFAULT 0 CHECK(interrupt_requested IN (0, 1));
|
|
3
|
+
ALTER TABLE task_result_deliveries ADD COLUMN reply_context_revision INTEGER;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
CREATE TABLE personal_attention_threads (
|
|
2
|
+
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, agent_id TEXT NOT NULL,
|
|
3
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
4
|
+
subject TEXT NOT NULL, summary TEXT NOT NULL, kind TEXT NOT NULL CHECK(kind IN ('outcome','discussion','interest')),
|
|
5
|
+
status TEXT NOT NULL CHECK(status IN ('candidate','active','paused','completed','expired')),
|
|
6
|
+
authority TEXT NOT NULL CHECK(authority IN ('user_explicit','inferred')),
|
|
7
|
+
task_id TEXT, project_id TEXT, next_check_at INTEGER, pause_until INTEGER, expires_at INTEGER NOT NULL,
|
|
8
|
+
last_meaningful_at INTEGER NOT NULL, revision INTEGER NOT NULL DEFAULT 1,
|
|
9
|
+
created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL
|
|
10
|
+
);
|
|
11
|
+
CREATE INDEX personal_attention_due ON personal_attention_threads(status, next_check_at);
|
|
12
|
+
CREATE TABLE personal_attention_sources (
|
|
13
|
+
thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
14
|
+
evidence_id TEXT REFERENCES context_evidence(evidence_id) ON DELETE CASCADE,
|
|
15
|
+
entry_id TEXT NOT NULL REFERENCES transcript_entries(entry_id) ON DELETE CASCADE,
|
|
16
|
+
transcript_id TEXT NOT NULL, conversation_id TEXT NOT NULL,
|
|
17
|
+
PRIMARY KEY(thread_id, entry_id)
|
|
18
|
+
);
|
|
19
|
+
CREATE TABLE personal_wakeups (
|
|
20
|
+
id TEXT PRIMARY KEY, thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
21
|
+
dedupe_key TEXT NOT NULL UNIQUE, trigger_kind TEXT NOT NULL, source_event_id TEXT,
|
|
22
|
+
thread_revision INTEGER NOT NULL, not_before INTEGER NOT NULL, expires_at INTEGER NOT NULL,
|
|
23
|
+
status TEXT NOT NULL DEFAULT 'pending' CHECK(status IN ('pending','evaluating','done','cancelled','dead_letter')),
|
|
24
|
+
lease_token TEXT, lease_until INTEGER NOT NULL DEFAULT 0, attempts INTEGER NOT NULL DEFAULT 0,
|
|
25
|
+
next_attempt_at INTEGER NOT NULL DEFAULT 0, last_error TEXT, created_at INTEGER NOT NULL
|
|
26
|
+
);
|
|
27
|
+
CREATE INDEX personal_wakeups_due ON personal_wakeups(status, next_attempt_at, not_before);
|
|
28
|
+
CREATE TABLE personal_outreach (
|
|
29
|
+
id TEXT PRIMARY KEY, wakeup_id TEXT NOT NULL UNIQUE REFERENCES personal_wakeups(id) ON DELETE CASCADE,
|
|
30
|
+
thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
31
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
32
|
+
origin_transcript_id TEXT NOT NULL, thread_revision INTEGER NOT NULL, context_revision INTEGER NOT NULL,
|
|
33
|
+
policy_revision INTEGER NOT NULL, decision TEXT NOT NULL, reason TEXT NOT NULL,
|
|
34
|
+
state TEXT NOT NULL CHECK(state IN ('decided','ready','published','stale','cancelled')),
|
|
35
|
+
text TEXT, provenance_json TEXT NOT NULL CHECK(json_valid(provenance_json)),
|
|
36
|
+
valid_until INTEGER NOT NULL, message_entry_id TEXT, notified_at INTEGER,
|
|
37
|
+
created_at INTEGER NOT NULL, published_at INTEGER
|
|
38
|
+
);
|
|
39
|
+
CREATE INDEX personal_outreach_pending ON personal_outreach(state, created_at);
|
|
40
|
+
CREATE TABLE personal_feedback (
|
|
41
|
+
id TEXT PRIMARY KEY, outreach_id TEXT NOT NULL REFERENCES personal_outreach(id) ON DELETE CASCADE,
|
|
42
|
+
thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
43
|
+
owner_id TEXT NOT NULL, kind TEXT NOT NULL, scope TEXT NOT NULL,
|
|
44
|
+
payload_json TEXT NOT NULL CHECK(json_valid(payload_json)), created_at INTEGER NOT NULL,
|
|
45
|
+
dedupe_key TEXT NOT NULL, UNIQUE(owner_id, dedupe_key)
|
|
46
|
+
);
|
|
47
|
+
CREATE TABLE personal_adaptive_strategies (
|
|
48
|
+
id TEXT PRIMARY KEY, thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
49
|
+
feedback_id TEXT NOT NULL UNIQUE REFERENCES personal_feedback(id) ON DELETE CASCADE,
|
|
50
|
+
dimension TEXT NOT NULL CHECK(dimension = 'preparation'), value TEXT NOT NULL,
|
|
51
|
+
authority TEXT NOT NULL CHECK(authority = 'explicit'), revision INTEGER NOT NULL,
|
|
52
|
+
created_at INTEGER NOT NULL, review_at INTEGER NOT NULL
|
|
53
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
CREATE TABLE personal_strategy_versions (
|
|
2
|
+
id TEXT PRIMARY KEY,
|
|
3
|
+
owner_id TEXT NOT NULL,
|
|
4
|
+
thread_id TEXT NOT NULL REFERENCES personal_attention_threads(id) ON DELETE CASCADE,
|
|
5
|
+
revision INTEGER NOT NULL,
|
|
6
|
+
kind TEXT NOT NULL CHECK(kind IN ('stop', 'defer', 'adjust', 'rollback')),
|
|
7
|
+
before_json TEXT NOT NULL CHECK(json_valid(before_json)),
|
|
8
|
+
after_json TEXT NOT NULL CHECK(json_valid(after_json)),
|
|
9
|
+
input_json TEXT NOT NULL CHECK(json_valid(input_json)),
|
|
10
|
+
source_entry_id TEXT REFERENCES transcript_entries(entry_id) ON DELETE SET NULL,
|
|
11
|
+
feedback_id TEXT REFERENCES personal_feedback(id) ON DELETE SET NULL,
|
|
12
|
+
restored_version_id TEXT REFERENCES personal_strategy_versions(id),
|
|
13
|
+
dedupe_key TEXT NOT NULL,
|
|
14
|
+
created_at INTEGER NOT NULL,
|
|
15
|
+
UNIQUE(owner_id, dedupe_key),
|
|
16
|
+
UNIQUE(thread_id, revision)
|
|
17
|
+
);
|
|
18
|
+
CREATE INDEX personal_strategy_versions_thread ON personal_strategy_versions(thread_id, revision DESC);
|
|
@@ -3,7 +3,7 @@ import type { ApplyMigrationsOptions } from './types.js';
|
|
|
3
3
|
/** Baseline schema version applied from schema.sql on first open. */
|
|
4
4
|
export declare const XOPC_DB_BASELINE_SCHEMA_VERSION = 165;
|
|
5
5
|
/** Latest schema version this release supports (increment when adding migrations). */
|
|
6
|
-
export declare const XOPC_DB_SCHEMA_VERSION =
|
|
6
|
+
export declare const XOPC_DB_SCHEMA_VERSION = 237;
|
|
7
7
|
export declare function resolveMigrationsDir(override?: string): string;
|
|
8
8
|
/**
|
|
9
9
|
* Apply sequential SQL migrations from (currentVersion + 1) through targetVersion.
|
|
@@ -57,7 +57,7 @@ function applySingleMigration(db, migration, discardOldScenes = false) {
|
|
|
57
57
|
*/
|
|
58
58
|
function applyPendingMigrations(db, options = {}) {
|
|
59
59
|
db.function("xopc_operation_id", () => currentOperationId() ?? null);
|
|
60
|
-
const targetVersion = options.targetVersion ??
|
|
60
|
+
const targetVersion = options.targetVersion ?? 237;
|
|
61
61
|
let currentVersion = readSchemaVersion(db);
|
|
62
62
|
if (currentVersion > targetVersion) throw new DatabaseSchemaTooNewError(currentVersion, targetVersion);
|
|
63
63
|
if (!options.migrationsDir && currentVersion < 165) throw new DatabaseSchemaTooOldError(currentVersion, 165);
|
|
@@ -95,7 +95,7 @@ function applyPendingMigrations(db, options = {}) {
|
|
|
95
95
|
}
|
|
96
96
|
/** Inspect schema version without mutating the database. */
|
|
97
97
|
function inspectSchemaMigrationStatus(db, options = {}) {
|
|
98
|
-
const appVersion = options.targetVersion ??
|
|
98
|
+
const appVersion = options.targetVersion ?? 237;
|
|
99
99
|
const dbVersion = readSchemaVersion(db);
|
|
100
100
|
if (dbVersion > appVersion) return {
|
|
101
101
|
dbVersion,
|
|
@@ -137,7 +137,7 @@ var init_runner = __esmMin((() => {
|
|
|
137
137
|
init_errors();
|
|
138
138
|
log = createLogger("Sqlite:Migrations");
|
|
139
139
|
XOPC_DB_BASELINE_SCHEMA_VERSION = 165;
|
|
140
|
-
XOPC_DB_SCHEMA_VERSION =
|
|
140
|
+
XOPC_DB_SCHEMA_VERSION = 237;
|
|
141
141
|
}));
|
|
142
142
|
//#endregion
|
|
143
143
|
init_runner();
|
|
@@ -18,6 +18,7 @@ export type SessionInput = {
|
|
|
18
18
|
conversationId: string;
|
|
19
19
|
clientMessageId: string;
|
|
20
20
|
expectedTranscriptId?: string;
|
|
21
|
+
interruptRequested?: boolean;
|
|
21
22
|
requestedDelivery: SessionInputDelivery;
|
|
22
23
|
effectiveDelivery: SessionInputDelivery;
|
|
23
24
|
status: SessionInputStatus;
|
|
@@ -80,6 +81,7 @@ export declare function insertSessionInput(input: {
|
|
|
80
81
|
conversationId: string;
|
|
81
82
|
clientMessageId: string;
|
|
82
83
|
expectedTranscriptId?: string;
|
|
84
|
+
interruptRequested?: boolean;
|
|
83
85
|
requestedDelivery: SessionInputDelivery;
|
|
84
86
|
effectiveDelivery: SessionInputDelivery;
|
|
85
87
|
status: 'queued' | 'injecting';
|
|
@@ -9,6 +9,7 @@ function mapInput(row) {
|
|
|
9
9
|
conversationId: row.conversation_id,
|
|
10
10
|
clientMessageId: row.client_message_id,
|
|
11
11
|
expectedTranscriptId: row.expected_transcript_id ?? void 0,
|
|
12
|
+
interruptRequested: row.interrupt_requested === 1,
|
|
12
13
|
requestedDelivery: row.requested_delivery,
|
|
13
14
|
effectiveDelivery: row.effective_delivery,
|
|
14
15
|
status: row.status,
|
|
@@ -130,8 +131,8 @@ function insertSessionInput(input) {
|
|
|
130
131
|
db.prepare(`INSERT INTO session_inputs(id, conversation_id, client_message_id, expected_transcript_id,
|
|
131
132
|
requested_delivery, effective_delivery, status, content, attachments_json,
|
|
132
133
|
context_refs_json, context_snapshots_json, thinking, origin_json, position,
|
|
133
|
-
target_run_id, version, created_at_ms, updated_at_ms, kind, payload_json, task_run_id)
|
|
134
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?, ?, ?, ?)`).run(input.id, input.conversationId, input.clientMessageId, input.expectedTranscriptId ?? null, input.requestedDelivery, input.effectiveDelivery, input.status, input.content, input.attachments ? JSON.stringify(input.attachments) : null, input.contextRefs ? JSON.stringify(input.contextRefs) : null, input.contextSnapshots ? JSON.stringify(input.contextSnapshots) : null, input.thinking ?? null, JSON.stringify(input.origin), max.value + 1, input.targetRunId ?? null, now, now, input.kind ?? "message", input.payload ? JSON.stringify(input.payload) : null, input.taskRunId ?? null);
|
|
134
|
+
target_run_id, version, created_at_ms, updated_at_ms, kind, payload_json, task_run_id, interrupt_requested)
|
|
135
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?, ?, ?, ?, ?)`).run(input.id, input.conversationId, input.clientMessageId, input.expectedTranscriptId ?? null, input.requestedDelivery, input.effectiveDelivery, input.status, input.content, input.attachments ? JSON.stringify(input.attachments) : null, input.contextRefs ? JSON.stringify(input.contextRefs) : null, input.contextSnapshots ? JSON.stringify(input.contextSnapshots) : null, input.thinking ?? null, JSON.stringify(input.origin), max.value + 1, input.targetRunId ?? null, now, now, input.kind ?? "message", input.payload ? JSON.stringify(input.payload) : null, input.taskRunId ?? null, input.interruptRequested ? 1 : 0);
|
|
135
136
|
bumpSessionInputRevision(db, input.conversationId);
|
|
136
137
|
return mapInput(db.prepare(`${SELECT_INPUTS} WHERE id = ?`).get(input.id));
|
|
137
138
|
});
|
|
@@ -147,7 +148,7 @@ function claimNextSessionInput(conversationId, runId, expectedInputId) {
|
|
|
147
148
|
version = version + 1, updated_at_ms = ? WHERE conversation_id = ? AND status = 'queued'
|
|
148
149
|
AND expected_transcript_id IS NOT NULL AND expected_transcript_id IS NOT ?`).run(Date.now(), conversationId, readCurrentTranscriptId(db, conversationId)).changes) bumpSessionInputRevision(db, conversationId);
|
|
149
150
|
const row = db.prepare(`${SELECT_INPUTS} WHERE conversation_id = ? AND effective_delivery = 'next'
|
|
150
|
-
AND status = 'queued' ORDER BY position, created_at_ms, id LIMIT 1`).get(conversationId);
|
|
151
|
+
AND status = 'queued' ORDER BY interrupt_requested DESC, position, created_at_ms, id LIMIT 1`).get(conversationId);
|
|
151
152
|
if (!row) return void 0;
|
|
152
153
|
if (expectedInputId && row.id !== expectedInputId) return void 0;
|
|
153
154
|
const now = Date.now();
|
|
@@ -155,7 +156,19 @@ function claimNextSessionInput(conversationId, runId, expectedInputId) {
|
|
|
155
156
|
updated_at_ms = ? WHERE id = ?`).run(runId, now, row.id);
|
|
156
157
|
db.prepare(`UPDATE session_input_runtime SET active_run_id = ?, active_input_id = ?,
|
|
157
158
|
revision = revision + 1, updated_at_ms = ? WHERE conversation_id = ?`).run(runId, row.id, now, conversationId);
|
|
158
|
-
|
|
159
|
+
const claimed = mapInput(db.prepare(`${SELECT_INPUTS} WHERE id = ?`).get(row.id));
|
|
160
|
+
const hasMaterial = (value) => Boolean(value.attachments_json && JSON.parse(value.attachments_json).length || value.context_snapshots_json && JSON.parse(value.context_snapshots_json).length);
|
|
161
|
+
if (row.interrupt_requested && !hasMaterial(row)) {
|
|
162
|
+
const pending = db.prepare(`${SELECT_INPUTS} WHERE conversation_id = ? AND status = 'queued'
|
|
163
|
+
ORDER BY interrupt_requested DESC, position, created_at_ms, id LIMIT 10`).all(conversationId);
|
|
164
|
+
for (const next of pending) {
|
|
165
|
+
if (!next.interrupt_requested || next.kind !== "message" || hasMaterial(next) || next.thinking !== row.thinking || next.expected_transcript_id !== row.expected_transcript_id || next.origin_json !== row.origin_json || next.created_at_ms - row.created_at_ms > 500 || claimed.content.length + next.content.length > 64e3) break;
|
|
166
|
+
db.prepare(`UPDATE session_inputs SET status = 'injecting', effective_delivery = 'steer', target_run_id = ?,
|
|
167
|
+
version = version + 1, updated_at_ms = ? WHERE id = ?`).run(runId, now, next.id);
|
|
168
|
+
claimed.content += `\n\n${next.content}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return claimed;
|
|
159
172
|
});
|
|
160
173
|
}
|
|
161
174
|
function finishSessionInputRun(conversationId, runId, status, error) {
|
|
@@ -225,7 +238,7 @@ var init_session_input_repository = __esmMin((() => {
|
|
|
225
238
|
init_session_instance_repository();
|
|
226
239
|
init_transaction();
|
|
227
240
|
init_src();
|
|
228
|
-
SELECT_INPUTS = `SELECT id, conversation_id, client_message_id, expected_transcript_id, requested_delivery,
|
|
241
|
+
SELECT_INPUTS = `SELECT interrupt_requested, id, conversation_id, client_message_id, expected_transcript_id, requested_delivery,
|
|
229
242
|
effective_delivery, status, content, attachments_json, context_refs_json, context_snapshots_json,
|
|
230
243
|
thinking, origin_json, position, kind, payload_json, task_run_id,
|
|
231
244
|
target_run_id, run_id, version, error, created_at_ms, updated_at_ms
|
|
@@ -2,10 +2,10 @@ import { ProductReadContracts } from "../../../packages/gateway-contract/src/cap
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../task-run-repository.js";
|
|
5
|
-
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
6
|
-
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
7
5
|
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
8
6
|
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
7
|
+
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
|
+
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
9
|
import { TaskContextRepository } from "../task-context-repository.js";
|
|
10
10
|
import { TaskDependencyService } from "../task-dependency-service.js";
|
|
11
11
|
import { TaskCriterionReviewRepository } from "../task-criterion-review-repository.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
|
-
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
4
3
|
import { getExecutionEnvironmentForSession } from "../execution-environments/subject.js";
|
|
4
|
+
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
5
5
|
//#region src/tasks/execution-context.ts
|
|
6
6
|
init_sqlite();
|
|
7
7
|
const ORIGINS = new Set([
|
|
@@ -69,6 +69,11 @@ function decisionFromTask(model, projectName, locale) {
|
|
|
69
69
|
const isChinese = locale?.toLowerCase().startsWith("zh") ?? task.locale === "zh";
|
|
70
70
|
if (task.phase === "review") return {
|
|
71
71
|
id: `task:${task.id}:review`,
|
|
72
|
+
response: {
|
|
73
|
+
kind: "task",
|
|
74
|
+
taskId: task.id,
|
|
75
|
+
canRetry: false
|
|
76
|
+
},
|
|
72
77
|
kind: "task",
|
|
73
78
|
title: task.title,
|
|
74
79
|
detail: isChinese ? "执行已经完成,正在等待你验收结果。" : "The work is complete and ready for your review.",
|
|
@@ -92,6 +97,11 @@ function decisionFromTask(model, projectName, locale) {
|
|
|
92
97
|
if (!reason) return null;
|
|
93
98
|
return {
|
|
94
99
|
id: `task:${task.id}`,
|
|
100
|
+
response: {
|
|
101
|
+
kind: "task",
|
|
102
|
+
taskId: task.id,
|
|
103
|
+
canRetry: reason === "retry" && model.allowedCommands.includes("start")
|
|
104
|
+
},
|
|
95
105
|
kind: "task",
|
|
96
106
|
title: task.title,
|
|
97
107
|
detail: item.summary,
|
|
@@ -109,6 +119,7 @@ function homeActionCopy(locale) {
|
|
|
109
119
|
approve: "允许并继续",
|
|
110
120
|
deny: "拒绝",
|
|
111
121
|
review: "查看并处理",
|
|
122
|
+
reviewResult: "查看结果并验收",
|
|
112
123
|
retry: "重试",
|
|
113
124
|
acknowledge: "暂时忽略",
|
|
114
125
|
viewProgress: "查看进度",
|
|
@@ -124,6 +135,7 @@ function homeActionCopy(locale) {
|
|
|
124
135
|
approve: "Allow and continue",
|
|
125
136
|
deny: "Deny",
|
|
126
137
|
review: "Review",
|
|
138
|
+
reviewResult: "Review result",
|
|
127
139
|
retry: "Retry",
|
|
128
140
|
acknowledge: "Dismiss",
|
|
129
141
|
viewProgress: "View progress",
|
|
@@ -186,7 +198,21 @@ function buildHomeWorkbench(input) {
|
|
|
186
198
|
dueAt: decision.dueAt,
|
|
187
199
|
updatedAt: decision.updatedAt,
|
|
188
200
|
openAction,
|
|
189
|
-
...
|
|
201
|
+
...decision.response?.kind === "task" && decision.reason === "decision_needed" ? {
|
|
202
|
+
primaryAction: {
|
|
203
|
+
type: "task_review",
|
|
204
|
+
label: copy.reviewResult,
|
|
205
|
+
taskId: decision.response.taskId
|
|
206
|
+
},
|
|
207
|
+
secondaryActions: [openAction]
|
|
208
|
+
} : decision.response?.kind === "task" && decision.response.canRetry ? {
|
|
209
|
+
primaryAction: {
|
|
210
|
+
type: "retry_task",
|
|
211
|
+
label: copy.retry,
|
|
212
|
+
taskId: decision.response.taskId
|
|
213
|
+
},
|
|
214
|
+
secondaryActions: [openAction]
|
|
215
|
+
} : connectorActions
|
|
190
216
|
};
|
|
191
217
|
});
|
|
192
218
|
const failures = input.attention.map((item) => ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
3
3
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
4
|
+
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
4
5
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
5
6
|
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
6
|
-
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
7
7
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
8
8
|
//#region src/tasks/task-main-update-decision-service.ts
|
|
9
9
|
init_providers();
|
|
@@ -7,11 +7,11 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
7
7
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
8
8
|
import { init_request_repository, personalRequestForTask } from "../personal-agent/request-repository.js";
|
|
9
9
|
import { appendTranscriptEntry, init_transcript_repository } from "../storage/sqlite/transcript-repository.js";
|
|
10
|
+
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
10
11
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
11
12
|
import { tryParseMediaUri } from "../media/uri.js";
|
|
12
13
|
import { resolveMediaBufferPath } from "../media/store.js";
|
|
13
14
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
14
|
-
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
15
15
|
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
16
16
|
import { enqueuePersonalReply } from "../personal-agent/reply-composer.js";
|
|
17
17
|
import { lstat } from "node:fs/promises";
|
|
@@ -10,7 +10,6 @@ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository
|
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
11
|
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
12
12
|
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
13
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
14
13
|
import { init_paths } from "../../config/paths.js";
|
|
15
14
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
16
15
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
@@ -23,6 +22,7 @@ import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
|
23
22
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
24
23
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
25
24
|
import { evictEmbeddedSessionRunner } from "../../agent/embedded/session-runner.js";
|
|
25
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
26
26
|
import { SessionIndex } from "../../session/manager.js";
|
|
27
27
|
import "../../session/index.js";
|
|
28
28
|
import { parseModelRef } from "../../agent/models/selection.js";
|