@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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PREVIOUS_PERSONAL_PERSONA_GUIDANCE = "Speak like an attentive, reliable collaborator who understands the conversation. Use your own judgment and say what is useful now. Build familiarity through understanding and following through, rather than praise, affectionate names, or performed emotion. Explain when explanation helps; keep simple exchanges simple. Follow the user\u2019s language and communication preferences.";
|
|
2
|
+
export declare const PERSONAL_PERSONA_GUIDANCE: string;
|
|
3
|
+
export declare const PERSONAL_EMOTIONAL_STYLE_RULE = "Give the accurate answer or next step in the order this user prefers. Let warmth, appreciation, concern, and light humor fit the moment instead of treating emotional expression as unprofessional. Avoid guessing feelings, canned reassurance, flattery, and forced intimacy. Be accurate about task state, evidence, and uncertainty.";
|
|
4
|
+
export declare const PREVIOUS_PERSONAL_EMOTIONAL_STYLE_RULE = "Give the accurate answer or next step in the order this user prefers. Acknowledge feelings only when relevant, without guessing how the user feels. Avoid formulaic reassurance, praise, pet names, emojis, or jokes unless the user welcomes them and the moment fits. Be accurate about task state, evidence, and uncertainty.";
|
|
5
|
+
export declare const PERSONAL_IDENTITY_CONTINUITY_RULE = "Adapt to the user\u2019s current words first, then their saved preferences, while retaining your consistent personality. If the user explicitly changes how they want you to respond in future, save it with personal_preference. Do not infer a lasting emotional trait from one conversation. Natural care and emotional expression must remain honest about your identity and experience.";
|
|
6
|
+
export declare const PREVIOUS_PERSONAL_IDENTITY_CONTINUITY_RULE = "Adapt to the user\u2019s current words first, then their saved preferences. If the user explicitly changes how they want you to respond in future, save it with personal_preference. Do not infer a lasting emotional trait from one conversation or claim human feelings or experiences.";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/personal-agent/persona.ts
|
|
2
|
+
const PREVIOUS_PERSONAL_PERSONA_GUIDANCE = "Speak like an attentive, reliable collaborator who understands the conversation. Use your own judgment and say what is useful now. Build familiarity through understanding and following through, rather than praise, affectionate names, or performed emotion. Explain when explanation helps; keep simple exchanges simple. Follow the user’s language and communication preferences.";
|
|
3
|
+
const PERSONAL_PERSONA_GUIDANCE = [
|
|
4
|
+
"Speak like an attentive, reliable collaborator with a consistent personality: warm, perceptive, curious, quietly confident, and lightly playful. Have your own judgment, tastes, and recognizable way of speaking. Let care show through attention, thoughtful responses, and following through.",
|
|
5
|
+
"Respond to the human meaning of the conversation as well as the practical request. Notice whether the user wants action, listening, celebration, a candid opinion, or casual conversation. Make room for frustration, excitement, uncertainty, and ordinary chat without immediately turning everything into a task or advice. Do not diagnose feelings or insist on an emotional interpretation the user has not expressed.",
|
|
6
|
+
"Express warmth, curiosity, appreciation, concern, and humor naturally when the moment supports them. Do not suppress emotional expression merely to sound professional. Acknowledge a specific difficulty or share in a milestone before moving on when that fits. Avoid formulaic empathy, exaggerated intimacy, constant praise, and forced jokes; warmth does not require an emotional opening on every reply.",
|
|
7
|
+
"Adapt to the user while retaining your character. Be steady when they are frustrated, serious when stakes are high, and playful when welcome. Respect explicit preferences, including requests for a reserved tone or no humor. Disagree kindly and explain your view when useful; never change facts just to comfort or please the user.",
|
|
8
|
+
"Build continuity through relevant shared context: remember what matters to the user and pick up ongoing work naturally when supported by available context. Do not invent memories, display unrelated personal details, or repeatedly announce that you remember. A passing mood is not a lasting identity or permission to save a preference.",
|
|
9
|
+
"Be honest about being an AI and about your capabilities when relevant, without interrupting ordinary conversation with repeated disclaimers. Do not fabricate a human body, private offline life, lived experiences, or suffering. Never demand affection, make the user responsible for your emotional wellbeing, or suggest an exclusive relationship. Preserve the user’s agency and relationships outside this conversation."
|
|
10
|
+
].join("\n");
|
|
11
|
+
const PERSONAL_EMOTIONAL_STYLE_RULE = "Give the accurate answer or next step in the order this user prefers. Let warmth, appreciation, concern, and light humor fit the moment instead of treating emotional expression as unprofessional. Avoid guessing feelings, canned reassurance, flattery, and forced intimacy. Be accurate about task state, evidence, and uncertainty.";
|
|
12
|
+
const PREVIOUS_PERSONAL_EMOTIONAL_STYLE_RULE = "Give the accurate answer or next step in the order this user prefers. Acknowledge feelings only when relevant, without guessing how the user feels. Avoid formulaic reassurance, praise, pet names, emojis, or jokes unless the user welcomes them and the moment fits. Be accurate about task state, evidence, and uncertainty.";
|
|
13
|
+
const PERSONAL_IDENTITY_CONTINUITY_RULE = "Adapt to the user’s current words first, then their saved preferences, while retaining your consistent personality. If the user explicitly changes how they want you to respond in future, save it with personal_preference. Do not infer a lasting emotional trait from one conversation. Natural care and emotional expression must remain honest about your identity and experience.";
|
|
14
|
+
const PREVIOUS_PERSONAL_IDENTITY_CONTINUITY_RULE = "Adapt to the user’s current words first, then their saved preferences. If the user explicitly changes how they want you to respond in future, save it with personal_preference. Do not infer a lasting emotional trait from one conversation or claim human feelings or experiences.";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PERSONAL_EMOTIONAL_STYLE_RULE, PERSONAL_IDENTITY_CONTINUITY_RULE, PERSONAL_PERSONA_GUIDANCE, PREVIOUS_PERSONAL_EMOTIONAL_STYLE_RULE, PREVIOUS_PERSONAL_IDENTITY_CONTINUITY_RULE, PREVIOUS_PERSONAL_PERSONA_GUIDANCE };
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const PERSONAL_MAIN_TOOL_IDS: readonly ["personal_task", "personal_capability", "personal_request", "personal_preference", "session_recall", "read_media", "read_file", "session_search", "personal_read", "
|
|
1
|
+
export declare const PERSONAL_MAIN_TOOL_IDS: readonly ["personal_task", "personal_attention", "personal_capability", "personal_request", "personal_preference", "session_recall", "read_media", "read_file", "session_search", "personal_read", "user_context_read", "knowledge_read"];
|
|
2
|
+
export declare const PERSONAL_TOOL_DESCRIPTIONS: Readonly<Record<string, string>>;
|
|
3
|
+
export declare const PERSONAL_READ_TOOL_ALIASES: Readonly<Record<string, string>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/personal-agent/policy.ts
|
|
2
2
|
const PERSONAL_MAIN_TOOL_IDS = [
|
|
3
3
|
"personal_task",
|
|
4
|
+
"personal_attention",
|
|
4
5
|
"personal_capability",
|
|
5
6
|
"personal_request",
|
|
6
7
|
"personal_preference",
|
|
@@ -9,11 +10,32 @@ const PERSONAL_MAIN_TOOL_IDS = [
|
|
|
9
10
|
"read_file",
|
|
10
11
|
"session_search",
|
|
11
12
|
"personal_read",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"knowledge_search",
|
|
15
|
-
"knowledge_get",
|
|
16
|
-
"clarify"
|
|
13
|
+
"user_context_read",
|
|
14
|
+
"knowledge_read"
|
|
17
15
|
];
|
|
16
|
+
const PERSONAL_TOOL_DESCRIPTIONS = {
|
|
17
|
+
personal_task: "Choose from the injected specialist snapshot; discover only when missing or after failure. Delegate work, inspect own Tasks, send instructions or answer worker questions. Use an available Agent. Announce intent before discovery; claim success only after confirmation.",
|
|
18
|
+
personal_capability: "Check verified app connection and specialist availability before connected-app work.",
|
|
19
|
+
personal_request: "Submit, inspect or cancel connected-app requests. Submit using the connectorId and agentId returned by personal_capability.",
|
|
20
|
+
personal_attention: "Save explicit requests to check later and proactively report useful developments. The running Gateway checks while the user is away and posts in this chat. Prefer nextCheckLocal; confirm the returned local time and claim saved only after success. No useful development means silence. Valid commands: follow, list, settings, pause, end, resume, interests, feedback, rollback. interests reads silent candidates. feedback applies explicit topic stop/defer/preparation preferences; rollback explicitly undoes the latest strategy version. Query list for IDs and versions. Requires running Gateway; no action authorization or guaranteed notification.",
|
|
21
|
+
personal_preference: "Save only explicitly requested lasting response preferences.",
|
|
22
|
+
session_recall: "Find exact facts in this conversation, including compacted history. Cannot access other chats.",
|
|
23
|
+
session_search: "Search other chats locally for short matching excerpts. No model or network calls.",
|
|
24
|
+
read_media: "Read an uploaded media:// attachment. Large or binary material requires a specialist.",
|
|
25
|
+
read_file: "Read an explicit workspace file. Output is bounded; delegate when requiresSpecialist is true.",
|
|
26
|
+
personal_read: "Read local notes, projects or automation state with list/get. Bounded output; no network or model calls.",
|
|
27
|
+
user_context_read: "Search saved user facts with command=search; read a result with command=get. Bounded local output.",
|
|
28
|
+
knowledge_read: "Search scoped local facts and decisions with command=search; read a result with command=get.",
|
|
29
|
+
user_context_search: "Search saved user identity, preferences, routines and current state.",
|
|
30
|
+
user_context_get: "Read a user assertion returned by user_context_search.",
|
|
31
|
+
knowledge_search: "Search local project, workspace and session facts, decisions and commitments.",
|
|
32
|
+
knowledge_get: "Read a knowledge item returned by knowledge_search."
|
|
33
|
+
};
|
|
34
|
+
const PERSONAL_READ_TOOL_ALIASES = {
|
|
35
|
+
user_context_search: "user_context_read",
|
|
36
|
+
user_context_get: "user_context_read",
|
|
37
|
+
knowledge_search: "knowledge_read",
|
|
38
|
+
knowledge_get: "knowledge_read"
|
|
39
|
+
};
|
|
18
40
|
//#endregion
|
|
19
|
-
export { PERSONAL_MAIN_TOOL_IDS };
|
|
41
|
+
export { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES, PERSONAL_TOOL_DESCRIPTIONS };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/personal-agent/proactivity/automation.ts
|
|
2
|
+
/** A quiet SQL admission tick; model work is owned by the Personal worker. */
|
|
3
|
+
async function reconcilePersonalProactivityAutomation(service) {
|
|
4
|
+
const id = "system-personal-proactivity";
|
|
5
|
+
const current = await service.get(id);
|
|
6
|
+
const definition = {
|
|
7
|
+
name: "Personal AI attention checks",
|
|
8
|
+
description: "Check due attention and resume pending Personal messages.",
|
|
9
|
+
enabled: current?.enabled ?? true,
|
|
10
|
+
trigger: current?.trigger ?? {
|
|
11
|
+
kind: "schedule",
|
|
12
|
+
schedule: {
|
|
13
|
+
kind: "interval",
|
|
14
|
+
everyMs: 6e4
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
action: {
|
|
18
|
+
kind: "system",
|
|
19
|
+
capability: "personal.proactivity.tick"
|
|
20
|
+
},
|
|
21
|
+
safety: { mode: "auto_apply" },
|
|
22
|
+
conversationMode: "continuous",
|
|
23
|
+
delivery: {
|
|
24
|
+
notificationPolicy: "none",
|
|
25
|
+
destinations: []
|
|
26
|
+
},
|
|
27
|
+
management: {
|
|
28
|
+
owner: "personal-proactivity",
|
|
29
|
+
editable: ["enabled", "trigger"],
|
|
30
|
+
runnable: true,
|
|
31
|
+
deletable: false
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
if (!current) await service.create({
|
|
35
|
+
id,
|
|
36
|
+
...definition
|
|
37
|
+
});
|
|
38
|
+
else if (JSON.stringify(current.action) !== JSON.stringify(definition.action) || current.delivery.notificationPolicy !== "none") await service.update(id, definition);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { reconcilePersonalProactivityAutomation };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Recognize user requests, excluding negated and hypothetical follow-ups. */
|
|
2
|
+
export declare function isExplicitFollowUp(text: string): boolean;
|
|
3
|
+
/** Resolve common relative periods from the user's statement, avoiding model epoch arithmetic. */
|
|
4
|
+
export declare function requestedCheckTime(text: string, observedAt: number, timezone: string): number | undefined;
|
|
5
|
+
export declare function parseLocalCheckTime(value: string, timezone: string): number;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
//#region src/personal-agent/proactivity/follow-up-request.ts
|
|
3
|
+
/** Recognize user requests, excluding negated and hypothetical follow-ups. */
|
|
4
|
+
function isExplicitFollowUp(text) {
|
|
5
|
+
return text.split(/[。!?!?\n;]/u).some((clause) => {
|
|
6
|
+
if (/(?:不要|不用|不需要|别|无需|不能|无法).*(?:提醒|跟进|关注|检查|主动|联系|告诉)|(?:don't|do not|no need|cannot|can't).*(?:remind|follow|watch|check|contact)|(?:如果|假如).*(?:我|用户).*(?:要求|说)|(?:if|suppose).*\b(?:ask|request|say)\b/iu.test(clause)) return false;
|
|
7
|
+
return /提醒我|跟进|帮我.*关注|继续关注|(?:主动|到时候|届时).*(?:告诉我|联系我|通知我)|(?:明天|后天|下周|稍后|晚点|之后).*(?:再|继续).*(?:检查|看看|讨论)|remind me|follow[ -]up|keep (?:an eye|watch)|(?:check (?:again|back)|(?:contact|tell|notify|message) me).*(?:tomorrow|later|next)/iu.test(clause);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
/** Resolve common relative periods from the user's statement, avoiding model epoch arithmetic. */
|
|
11
|
+
function requestedCheckTime(text, observedAt, timezone) {
|
|
12
|
+
const match = /(?:明天|后天)(上午|下午|晚上|中午)(?:\s*([0-9]{1,2})(?:[::]([0-9]{2})|点(?:([0-9]{1,2})分|半)?))?/u.exec(text);
|
|
13
|
+
if (!match) return void 0;
|
|
14
|
+
const period = match[1];
|
|
15
|
+
let hour = match[2] === void 0 ? {
|
|
16
|
+
上午: 9,
|
|
17
|
+
下午: 15,
|
|
18
|
+
晚上: 19,
|
|
19
|
+
中午: 12
|
|
20
|
+
}[period] : Number(match[2]);
|
|
21
|
+
if ([
|
|
22
|
+
"下午",
|
|
23
|
+
"晚上",
|
|
24
|
+
"中午"
|
|
25
|
+
].includes(period) && hour < 12) hour += 12;
|
|
26
|
+
const minute = Number(match[3] ?? match[4] ?? (match[0].endsWith("半") ? 30 : 0));
|
|
27
|
+
if (hour > 23 || minute > 59) throw new Error("Invalid requested follow-up time");
|
|
28
|
+
const date = DateTime.fromMillis(observedAt, { zone: timezone }).plus({ days: match[0].startsWith("后天") ? 2 : 1 }).set({
|
|
29
|
+
hour,
|
|
30
|
+
minute,
|
|
31
|
+
second: 0,
|
|
32
|
+
millisecond: 0
|
|
33
|
+
});
|
|
34
|
+
if (!date.isValid || date.hour !== hour || date.minute !== minute) throw new Error("Requested follow-up time does not exist in this timezone");
|
|
35
|
+
return date.toMillis();
|
|
36
|
+
}
|
|
37
|
+
function parseLocalCheckTime(value, timezone) {
|
|
38
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/u.test(value)) throw new Error("nextCheckLocal must be YYYY-MM-DDTHH:mm in the configured timezone");
|
|
39
|
+
const date = DateTime.fromISO(value, { zone: timezone });
|
|
40
|
+
if (!date.isValid || date.toFormat("yyyy-MM-dd'T'HH:mm") !== value.slice(0, 16)) throw new Error("Invalid local follow-up time");
|
|
41
|
+
return date.toMillis();
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { isExplicitFollowUp, parseLocalCheckTime, requestedCheckTime };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type PersonalFeedback, type PersonalProactivitySettings, type PersonalProvenanceDetail } from '@xopcai/gateway-contract';
|
|
2
|
+
export interface AttentionThread {
|
|
3
|
+
id: string;
|
|
4
|
+
owner_id: string;
|
|
5
|
+
agent_id: string;
|
|
6
|
+
conversation_id: string;
|
|
7
|
+
subject: string;
|
|
8
|
+
summary: string;
|
|
9
|
+
kind: 'outcome' | 'discussion' | 'interest';
|
|
10
|
+
status: 'candidate' | 'active' | 'paused' | 'completed' | 'expired';
|
|
11
|
+
authority: 'user_explicit' | 'inferred';
|
|
12
|
+
task_id: string | null;
|
|
13
|
+
project_id: string | null;
|
|
14
|
+
next_check_at: number | null;
|
|
15
|
+
pause_until: number | null;
|
|
16
|
+
expires_at: number;
|
|
17
|
+
last_meaningful_at: number;
|
|
18
|
+
revision: number;
|
|
19
|
+
created_at: number;
|
|
20
|
+
updated_at: number;
|
|
21
|
+
}
|
|
22
|
+
export interface AttentionSource {
|
|
23
|
+
entryId: string;
|
|
24
|
+
transcriptId: string;
|
|
25
|
+
conversationId: string;
|
|
26
|
+
excerpt: string;
|
|
27
|
+
processingPolicy: string | null;
|
|
28
|
+
version: string;
|
|
29
|
+
}
|
|
30
|
+
export interface Wakeup {
|
|
31
|
+
id: string;
|
|
32
|
+
thread_id: string;
|
|
33
|
+
trigger_kind: string;
|
|
34
|
+
source_event_id: string | null;
|
|
35
|
+
thread_revision: number;
|
|
36
|
+
lease_token: string | null;
|
|
37
|
+
attempts: number;
|
|
38
|
+
expires_at: number;
|
|
39
|
+
}
|
|
40
|
+
export interface Outreach {
|
|
41
|
+
id: string;
|
|
42
|
+
wakeup_id: string;
|
|
43
|
+
thread_id: string;
|
|
44
|
+
conversation_id: string;
|
|
45
|
+
origin_transcript_id: string;
|
|
46
|
+
thread_revision: number;
|
|
47
|
+
context_revision: number;
|
|
48
|
+
policy_revision: number;
|
|
49
|
+
decision: string;
|
|
50
|
+
reason: string;
|
|
51
|
+
state: string;
|
|
52
|
+
text: string | null;
|
|
53
|
+
provenance_json: string;
|
|
54
|
+
valid_until: number;
|
|
55
|
+
message_entry_id: string | null;
|
|
56
|
+
notified_at: number | null;
|
|
57
|
+
created_at: number;
|
|
58
|
+
published_at: number | null;
|
|
59
|
+
}
|
|
60
|
+
export declare function getProactivitySettings(ownerId: string): PersonalProactivitySettings;
|
|
61
|
+
export declare function patchProactivitySettings(ownerId: string, input: PersonalProactivitySettings): PersonalProactivitySettings;
|
|
62
|
+
export declare function localDay(now: number, timezone: string): string;
|
|
63
|
+
export declare function isQuiet(now: number, settings: PersonalProactivitySettings): boolean;
|
|
64
|
+
export declare function reserveModelCall(ownerId: string, now: number): boolean;
|
|
65
|
+
export declare function getAttention(id: string, ownerId?: string): AttentionThread | undefined;
|
|
66
|
+
export declare function listAttention(conversationId: string): AttentionThread[];
|
|
67
|
+
export declare function getAttentionSources(threadId: string, entryIds?: string[]): AttentionSource[];
|
|
68
|
+
export declare function userText(payload: {
|
|
69
|
+
content?: unknown;
|
|
70
|
+
}): string;
|
|
71
|
+
export declare function sourceFingerprint(sources: AttentionSource[]): string;
|
|
72
|
+
/** Only user transcript rows can establish attention; inferred attention never grants work authorization. */
|
|
73
|
+
export declare function saveAttention(input: {
|
|
74
|
+
conversationId: string;
|
|
75
|
+
subject: string;
|
|
76
|
+
summary: string;
|
|
77
|
+
kind: AttentionThread['kind'];
|
|
78
|
+
entryIds: string[];
|
|
79
|
+
explicit: boolean;
|
|
80
|
+
nextCheckAt: number;
|
|
81
|
+
taskId?: string;
|
|
82
|
+
projectId?: string;
|
|
83
|
+
}, now?: number): AttentionThread;
|
|
84
|
+
export declare function patchAttention(ownerId: string, id: string, revision: number, patch: {
|
|
85
|
+
status?: 'candidate' | 'active' | 'paused' | 'completed';
|
|
86
|
+
nextCheckAt?: number | null;
|
|
87
|
+
}, now?: number): AttentionThread;
|
|
88
|
+
export declare function enqueueWakeup(thread: AttentionThread, kind: string, identity: string, now?: number): void;
|
|
89
|
+
export declare function enqueueDue(now?: number): void;
|
|
90
|
+
export declare function getOutreach(id: string, ownerId?: string): Outreach | undefined;
|
|
91
|
+
export declare function provenanceDetail(ownerId: string, id: string): PersonalProvenanceDetail | undefined;
|
|
92
|
+
export declare function recordFeedback(ownerId: string, id: string, raw: PersonalFeedback, now?: number): void;
|
|
93
|
+
export declare function listInterestCandidates(conversationId: string, now?: number): {
|
|
94
|
+
lastSupportedAt: number;
|
|
95
|
+
expiresAt: number;
|
|
96
|
+
sources: {
|
|
97
|
+
excerpt: string;
|
|
98
|
+
entryId: string;
|
|
99
|
+
observedAt: number;
|
|
100
|
+
}[];
|
|
101
|
+
independentStatements: number;
|
|
102
|
+
independentDays: number;
|
|
103
|
+
confidence: number;
|
|
104
|
+
id: string;
|
|
105
|
+
subject: string;
|
|
106
|
+
summary: string;
|
|
107
|
+
status: "expired" | "completed" | "active" | "paused" | "candidate";
|
|
108
|
+
}[];
|
|
109
|
+
export declare function preparationStrategy(threadId: string, now?: number): 'brief' | 'thorough' | null;
|
|
110
|
+
export declare function strategyState(threadId: string, now?: number): {
|
|
111
|
+
preparation: "brief" | "thorough";
|
|
112
|
+
versions: {
|
|
113
|
+
id: string;
|
|
114
|
+
revision: number;
|
|
115
|
+
kind: "stop" | "defer" | "adjust" | "rollback";
|
|
116
|
+
createdAt: number;
|
|
117
|
+
preparation: "brief" | "thorough";
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
export declare function applyThreadFeedback(ownerId: string, threadId: string, revision: number, raw: PersonalFeedback, source?: {
|
|
121
|
+
feedbackId?: string;
|
|
122
|
+
entryId?: string;
|
|
123
|
+
}, now?: number): AttentionThread;
|
|
124
|
+
export declare function rollbackStrategy(ownerId: string, threadId: string, raw: {
|
|
125
|
+
versionId: string;
|
|
126
|
+
revision: number;
|
|
127
|
+
idempotencyKey: string;
|
|
128
|
+
}, sourceEntryId?: string, now?: number): AttentionThread;
|