@xopcai/xopc 0.0.178 → 0.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-BzGX__8I.js → activity-store-DFKtQDgE.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BzxntcaZ.js → agent-avatar-dicebear-CcTvB_4W.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DgGj9bu6.js +2 -0
- package/dist/gateway/static/root/assets/{api-hi6f2Xtp.js → api-CUClAvuL.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-fTY1F7ac.js → app-management-settings-panel-Ib-cWKHM.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BZ-IxQfB.js → appearance-settings-CRSN8WuA.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-B5xahuT-.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-ZSLLG8wB.js → archive-plugin-BBF9zspN.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-D4YktqIF.js → attachment-load-D3QQfA7w.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-BUYrvMmD.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BIkPxfxj.js → binary-plugins-D78XOjJ3.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Q3v_YQom.js → block-editor-D_VVXlYX.js} +46 -46
- package/dist/gateway/static/root/assets/browser-settings-page-Cjw07q9h.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-M5lTEW1I.js → browser-workflow-inputs-_gu08MA4.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-B3T1KYk4.js → browser-workflows-page-58DBMXgG.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D_dfVxHY.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-DE09c0VB.js → capability-presets-api-DhCn9rPv.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-LWWIYUT7.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-CFR5FBfS.js → channel-recipient-api-DYtoNV5A.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Cyj5OunL.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-TEFnV0IG.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-B1mD-3pM.js → connector-logo-CxIXnifA.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-0TobCpBB.js +2 -0
- package/dist/gateway/static/root/assets/desktop-pet-CwVSLL6N.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-BOIp4q0Z.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BYQJ2XUS.js → directory-picker-path-field-C8_lsW6S.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-BXcb8fwx.js → dreaming-settings-Da9FeWQl.js} +3 -3
- package/dist/gateway/static/root/assets/{extension-debug-page-O1Xu1r4Q.js → extension-debug-page-CMNnSJP6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C2Jraq8l.js → extension-page-t0pJqLvM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DcXQDTpG.js → extension-settings-page-aiR-tKnW.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-DmPIZrvg.js → gateway-config-api-CkyQBD6r.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BIZfAgfB.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BZEkOdPm.js → gateway-startup-retry-CSU7UvzG.js} +1 -1
- package/dist/gateway/static/root/assets/goals-settings-Dx9uTyWF.js +1 -0
- package/dist/gateway/static/root/assets/{heartbeat-settings-BtKu2NWT.js → heartbeat-settings-Cnr5ORXL.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-05Gg8wsU.js → image-generation-api-BR6Kb77X.js} +1 -1
- package/dist/gateway/static/root/assets/index-B0Tdge_q.css +1 -0
- package/dist/gateway/static/root/assets/index-BA56bQ68.js +224 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CfmDR9Sc.js → keyboard-shortcuts-settings-D76uYKeQ.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DSUNtLHg.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Df8BW1A_.js → local-apps-page-BsLnojTh.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CTwSy7yW.js → locale-store-BNC8HUCI.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-yI8kpQtO.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-B3FvKbaP.js → markdown-split-D6smTQWD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DsjrvvB6.js → media-plugins-D1TmMF0A.js} +1 -1
- package/dist/gateway/static/root/assets/messages-H_iJjnEM.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-tuzIwy3c.js → notes-page-Vt-diFf0.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-BD297EZt.js +4 -0
- package/dist/gateway/static/root/assets/outcome-detail-page-C5i_ZR9a.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-ke9s4nYi.js → page-tabs-BnSzIjH0.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cp1eI4S9.js → preview-open-alternatives-CF12Eqi4.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-BVG-eWQO.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-dXQCMAtH.js → product-open-page-Du0TE_CU.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-D1HGz7Dy.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CqP2TnW-.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BXdVJLS3.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-Bl30zjHc.js → save-bar-controls-B53UNtDM.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-DqhmXQKo.js → schedule-field-C3dIMN5q.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DkUCy6vf.js → schema-form-BKvpxqof.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-DgQq6Z5S.js → schemas-C6onAggk.js} +2 -2
- package/dist/gateway/static/root/assets/sessions-page-CPAwDdl5.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C-jGsoft.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-C6ZbNpdy.js → settings-form-section-kt6GIS32.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-Bk58_cr7.js → settings-loading-skeleton-85eUPcKz.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-k8iE_NdX.js → settings-page-Di5x6Xrc.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DgFSya2e.js → settings-page-layout-CkkCee_x.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-B_KDlyZA.js → setup-status-panel-uxEE6gAB.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CV7nL_J9.js → share-preview-page-BtLEstaI.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-2mcsMWgn.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-ocDwsrEt.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-9_jfsFU5.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-kahBIHg0.js → skills-page.utils-C2SHvq8V.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-JV3-MG5F.js → system-settings-panel-CIJ66cUy.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DFLyzoLO.js → theme-store-ClDa_Bci.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-D0zAsHOo.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-60Aqo-UJ.js → typed-models-lib-GsmwmB40.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-CnTkHDnw.js → use-channel-catalog-BQz3K7xj.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-Bn4BLg4W.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CNa8qUgS.js → voice-api-key-field-Blaxsbb3.js} +1 -1
- package/dist/gateway/static/root/assets/work-copy-Cwyan9Sn.js +1 -0
- package/dist/gateway/static/root/assets/work-discovery-page-iJ9RBSpu.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-CqTH7PQX.js +1 -0
- package/dist/gateway/static/root/assets/work-page-H3m99ccS.js +3 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-yV_x595t.js → workflow-run-setup-panel-CTG4RpRE.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BxZSKMfv.js +11 -0
- package/dist/gateway/static/root/index.html +9 -10
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/outcomes.js +137 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/work-intake.js +85 -0
- package/dist/src/activity/service.d.ts +1 -0
- package/dist/src/activity/service.js +4 -1
- package/dist/src/agent/agent-manager.d.ts +4 -1
- package/dist/src/agent/agent-manager.js +21 -7
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/code-intelligence/binary.js +1 -1
- package/dist/src/agent/context/execution-scope.d.ts +1 -1
- package/dist/src/agent/context/execution-scope.js +6 -4
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +2 -0
- package/dist/src/agent/embedded/run-for-session.js +3 -1
- package/dist/src/agent/goals/post-turn.js +7 -6
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +6 -1
- package/dist/src/agent/inbound/turn-dispatcher.js +5 -2
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/lifecycle/timeout-wrapper.d.ts +2 -0
- package/dist/src/agent/lifecycle/timeout-wrapper.js +39 -9
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +6 -1
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +1 -1
- package/dist/src/agent/mcp/mcp-stdio-transport.js +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.d.ts +2 -0
- package/dist/src/agent/mcp/mcp-transport-config.js +10 -3
- package/dist/src/agent/mcp/mcp-transport.d.ts +1 -0
- package/dist/src/agent/mcp/mcp-transport.js +5 -2
- package/dist/src/agent/memory/dreaming/config.js +1 -1
- package/dist/src/agent/memory/user-context-coordinator.d.ts +1 -0
- package/dist/src/agent/memory/user-context-coordinator.js +17 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +6 -2
- package/dist/src/agent/outcomes/{task-evaluation.d.ts → execution-evaluation.d.ts} +3 -3
- package/dist/src/agent/outcomes/{task-evaluation.js → execution-evaluation.js} +5 -5
- package/dist/src/agent/outcomes/execution-verifier.d.ts +29 -0
- package/dist/src/agent/outcomes/{task-verifier.js → execution-verifier.js} +4 -4
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +1 -0
- package/dist/src/agent/service/process-direct-one-shot.d.ts +3 -0
- package/dist/src/agent/service/process-direct-one-shot.js +4 -1
- package/dist/src/agent/service/process-direct-streaming.js +3 -1
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +5 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +6 -0
- package/dist/src/agent/skills/filesystem-watcher.d.ts +4 -0
- package/dist/src/agent/skills/filesystem-watcher.js +16 -7
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.d.ts +10 -7
- package/dist/src/agent/skills/index.js +56 -47
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.d.ts +5 -2
- package/dist/src/agent/skills/skill-manager.js +10 -5
- package/dist/src/agent/skills/skill-sources.d.ts +18 -0
- package/dist/src/agent/skills/skill-sources.js +143 -0
- package/dist/src/agent/skills/types.d.ts +25 -2
- package/dist/src/agent/tools/delegate-tool.js +2 -1
- package/dist/src/agent/tools/executor.d.ts +2 -0
- package/dist/src/agent/tools/executor.js +18 -11
- package/dist/src/agent/tools/factory.js +18 -1
- package/dist/src/agent/tools/goal-tool.js +5 -3
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/managed-job-tool.d.ts +2 -0
- package/dist/src/agent/tools/managed-job-tool.js +160 -0
- package/dist/src/agent/tools/todo-tool.d.ts +5 -0
- package/dist/src/agent/tools/todo-tool.js +16 -4
- package/dist/src/agent/tools/update-plan-tool.d.ts +1 -0
- package/dist/src/agent/tools/update-plan-tool.js +6 -0
- package/dist/src/agent/workspace-runtime/registry.d.ts +3 -0
- package/dist/src/agent/workspace-runtime/registry.js +3 -1
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/auth/credentials.d.ts +9 -1
- package/dist/src/auth/credentials.js +112 -56
- package/dist/src/auth/model-credential-store.js +7 -22
- package/dist/src/auth/oauth-provider-lock.d.ts +5 -0
- package/dist/src/auth/oauth-provider-lock.js +91 -0
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/automations/domain/defaults.d.ts +8 -1
- package/dist/src/automations/domain/defaults.js +9 -2
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/types.d.ts +33 -7
- package/dist/src/automations/domain/validation.d.ts +8 -0
- package/dist/src/automations/domain/validation.js +2 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.d.ts +2 -2
- package/dist/src/automations/service/action-executor.js +144 -34
- package/dist/src/automations/service/automation-service.d.ts +4 -0
- package/dist/src/automations/service/automation-service.js +197 -18
- package/dist/src/automations/storage/automation-run-repository.d.ts +1 -0
- package/dist/src/automations/storage/automation-run-repository.js +37 -7
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/browser/providers/cloakbrowser.js +2 -2
- package/dist/src/channels/attachments/voice-stt-webchat.d.ts +0 -3
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -24
- package/dist/src/chat-commands/builtins/goal.js +5 -4
- 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/goal.js +6 -5
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/cli/utils/oauth-login.js +1 -7
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +3 -0
- package/dist/src/config/schema.js +2 -1
- package/dist/src/connectors/learning-coordinator.js +7 -1
- package/dist/src/connectors/source-change-publisher.d.ts +17 -0
- package/dist/src/connectors/source-change-publisher.js +148 -0
- package/dist/src/discussions/analyzer.d.ts +35 -0
- package/dist/src/discussions/analyzer.js +127 -0
- package/dist/src/discussions/index.d.ts +7 -0
- package/dist/src/discussions/index.js +7 -0
- package/dist/src/discussions/live-worker.d.ts +33 -0
- package/dist/src/discussions/live-worker.js +148 -0
- package/dist/src/discussions/pipeline.d.ts +33 -0
- package/dist/src/discussions/pipeline.js +205 -0
- package/dist/src/discussions/project-inference.d.ts +13 -0
- package/dist/src/discussions/project-inference.js +19 -0
- package/dist/src/discussions/repository.d.ts +29 -0
- package/dist/src/discussions/repository.js +255 -0
- package/dist/src/discussions/service.d.ts +51 -0
- package/dist/src/discussions/service.js +335 -0
- package/dist/src/discussions/transcript.d.ts +3 -0
- package/dist/src/discussions/transcript.js +15 -0
- package/dist/src/discussions/types.d.ts +116 -0
- package/dist/src/discussions/types.js +10 -0
- package/dist/src/discussions/worker.d.ts +18 -0
- package/dist/src/discussions/worker.js +74 -0
- package/dist/src/extensions/activation-context.js +2 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/testing.js +1 -1
- package/dist/src/gateway/agents-admin.js +3 -3
- package/dist/src/gateway/chat-stream/mapper.js +53 -3
- package/dist/src/gateway/chat-stream/protocol.d.ts +17 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/app.js +8 -3
- package/dist/src/gateway/hono/lib/config-payload.js +2 -2
- package/dist/src/gateway/hono/middleware/auth.js +2 -2
- package/dist/src/gateway/hono/middleware/logger.js +1 -1
- package/dist/src/gateway/hono/middleware/strict-rate-limit.js +1 -1
- package/dist/src/gateway/hono/oauth-async.js +1 -7
- package/dist/src/gateway/hono/oauth.js +1 -7
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +79 -0
- package/dist/src/gateway/hono/routes/discussions.d.ts +3 -0
- package/dist/src/gateway/hono/routes/discussions.js +177 -0
- package/dist/src/gateway/hono/routes/execution-receipts.d.ts +3 -0
- package/dist/src/gateway/hono/routes/execution-receipts.js +163 -0
- package/dist/src/gateway/hono/routes/exposure.js +1 -1
- package/dist/src/gateway/hono/routes/goals.js +3 -288
- package/dist/src/gateway/hono/routes/home.d.ts +2 -102
- package/dist/src/gateway/hono/routes/home.js +8 -424
- package/dist/src/gateway/hono/routes/index.js +6 -2
- package/dist/src/gateway/hono/routes/memory.js +7 -7
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +30 -0
- package/dist/src/gateway/hono/routes/projects.js +8 -152
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/status.js +2 -2
- package/dist/src/gateway/hono/routes/tunnel.js +3 -3
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/hono/routes/work.d.ts +3 -0
- package/dist/src/gateway/hono/routes/work.js +207 -0
- package/dist/src/gateway/hono/routes/you.js +13 -15
- package/dist/src/gateway/index.js +2 -2
- package/dist/src/gateway/runtime-config.js +2 -2
- package/dist/src/gateway/security/audit.js +2 -2
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +46 -51
- package/dist/src/gateway/service.d.ts +8 -1
- package/dist/src/gateway/service.js +142 -15
- package/dist/src/goals/goal-queue-store.d.ts +1 -0
- package/dist/src/goals/goal-queue-store.js +5 -1
- package/dist/src/goals/goal-queue-types.d.ts +11 -1
- package/dist/src/goals/goal-runner.js +10 -6
- package/dist/src/goals/goal-service.d.ts +2 -15
- package/dist/src/goals/goal-service.js +9 -42
- package/dist/src/goals/goal-store.d.ts +1 -18
- package/dist/src/goals/goal-store.js +25 -231
- package/dist/src/goals/goal-workflow-judge.js +1 -1
- package/dist/src/goals/index.d.ts +0 -4
- package/dist/src/goals/index.js +1 -3
- package/dist/src/goals/types.d.ts +4 -66
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/service.d.ts +1 -0
- package/dist/src/notes/service.js +10 -1
- package/dist/src/notes/types.d.ts +1 -0
- package/dist/src/proactive/events/product-event-bridge.d.ts +7 -0
- package/dist/src/proactive/events/product-event-bridge.js +84 -0
- package/dist/src/proactive/execution/context.d.ts +27 -11
- package/dist/src/proactive/execution/context.js +259 -25
- package/dist/src/proactive/execution/repository.js +18 -5
- package/dist/src/proactive/execution/types.d.ts +7 -1
- package/dist/src/proactive/execution/worker.js +7 -6
- package/dist/src/proactive/inbox/repository.js +8 -2
- package/dist/src/proactive/index.d.ts +4 -2
- package/dist/src/proactive/index.js +5 -3
- package/dist/src/proactive/temporal/worker.d.ts +16 -0
- package/dist/src/proactive/temporal/worker.js +110 -0
- package/dist/src/projects/project-loop.js +3 -3
- package/dist/src/providers/auth-runtime/oauth.js +12 -0
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/storage/sqlite/activity-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/activity-repository.js +4 -1
- package/dist/src/storage/sqlite/connector-sync-policy-repository.d.ts +20 -0
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +50 -0
- package/dist/src/storage/sqlite/execution-receipt-repository.d.ts +146 -0
- package/dist/src/storage/sqlite/execution-receipt-repository.js +235 -0
- package/dist/src/storage/sqlite/index.d.ts +4 -2
- package/dist/src/storage/sqlite/index.js +6 -4
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +9 -1
- package/dist/src/storage/sqlite/memory-records-repository.js +1 -1
- package/dist/src/storage/sqlite/migrations/075_connector_sync_policies.sql +13 -0
- package/dist/src/storage/sqlite/migrations/076_meeting_preparation_scenario.sql +29 -0
- package/dist/src/storage/sqlite/migrations/077_proactive_insight_fingerprints.sql +4 -0
- package/dist/src/storage/sqlite/migrations/078_discussion_captures.sql +64 -0
- package/dist/src/storage/sqlite/migrations/079_discussion_follow_up_scenario.sql +29 -0
- package/dist/src/storage/sqlite/migrations/080_task_outcome_context.sql +15 -0
- package/dist/src/storage/sqlite/migrations/081_project_monitoring_policies.sql +10 -0
- package/dist/src/storage/sqlite/migrations/082_one_click_live_discussions.sql +100 -0
- package/dist/src/storage/sqlite/migrations/083_session_task_plans.sql +9 -0
- package/dist/src/storage/sqlite/migrations/084_work_intake_lifecycle.sql +26 -0
- package/dist/src/storage/sqlite/migrations/085_task_outcome_projection.sql +19 -0
- package/dist/src/storage/sqlite/migrations/086_outcome_aggregates.sql +168 -0
- package/dist/src/storage/sqlite/migrations/087_context_snapshots.sql +21 -0
- package/dist/src/storage/sqlite/migrations/088_automation_execution_deadlines.sql +5 -0
- package/dist/src/storage/sqlite/migrations/089_automation_run_leases.sql +8 -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/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/notes-repository.js +9 -0
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +89 -44
- package/dist/src/storage/sqlite/session-repository.js +1 -1
- package/dist/src/storage/sqlite/session-task-plan-repository.d.ts +20 -0
- package/dist/src/storage/sqlite/session-task-plan-repository.js +77 -0
- package/dist/src/tui/backends/embedded-backend.d.ts +2 -0
- package/dist/src/tui/backends/embedded-backend.js +12 -8
- package/dist/src/tui/tui-backend.d.ts +2 -0
- package/dist/src/tui/tui-oauth-login.js +1 -7
- package/dist/src/tui/tui-picker-overlay.js +1 -0
- package/dist/src/tui/tui-picker-services.d.ts +1 -0
- package/dist/src/tui/tui-skills-autocomplete.d.ts +6 -2
- package/dist/src/tui/tui-skills-autocomplete.js +10 -6
- package/dist/src/tui/tui-startup-resources.d.ts +3 -1
- package/dist/src/tui/tui-startup-resources.js +4 -3
- package/dist/src/tui/tui.js +4 -1
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +1 -1
- package/dist/src/tunnel/index.js +2 -2
- package/dist/src/user-context/context-compiler.d.ts +31 -0
- package/dist/src/user-context/context-compiler.js +51 -0
- package/dist/src/voice/local/model-files.js +1 -1
- package/dist/src/voice/stt/config.d.ts +4 -0
- package/dist/src/voice/stt/config.js +26 -0
- package/dist/src/voice/stt/index.d.ts +1 -0
- package/dist/src/voice/stt/index.js +2 -1
- package/dist/src/voice/stt/list-providers.js +1 -1
- package/dist/src/work/attention-governor.d.ts +20 -0
- package/dist/src/work/attention-governor.js +46 -0
- package/dist/src/work/execution-context.d.ts +16 -0
- package/dist/src/work/execution-context.js +66 -0
- package/dist/src/work/home-query-service.d.ts +147 -0
- package/dist/src/work/home-query-service.js +389 -0
- package/dist/src/work/index.d.ts +14 -0
- package/dist/src/work/index.js +15 -0
- package/dist/src/work/outcome-contract-definition.d.ts +8 -0
- package/dist/src/work/outcome-contract-definition.js +15 -0
- package/dist/src/work/outcome-execution-service.d.ts +27 -0
- package/dist/src/work/outcome-execution-service.js +60 -0
- package/dist/src/work/outcome-projection-service.d.ts +7 -0
- package/dist/src/work/outcome-projection-service.js +51 -0
- package/dist/src/work/outcome-receipt-service.d.ts +13 -0
- package/dist/src/work/outcome-receipt-service.js +55 -0
- package/dist/src/work/outcome-repository.d.ts +50 -0
- package/dist/src/work/outcome-repository.js +112 -0
- package/dist/src/work/outcome-run-coordinator.d.ts +25 -0
- package/dist/src/work/outcome-run-coordinator.js +117 -0
- package/dist/src/work/project-monitoring-service.d.ts +21 -0
- package/dist/src/work/project-monitoring-service.js +76 -0
- package/dist/src/work/project-operating-view-service.d.ts +10 -0
- package/dist/src/work/project-operating-view-service.js +46 -0
- package/dist/src/work/work-intake-repository.d.ts +49 -0
- package/dist/src/work/work-intake-repository.js +97 -0
- package/dist/src/work/work-intake-service.d.ts +26 -0
- package/dist/src/work/work-intake-service.js +171 -0
- package/dist/src/work/work-value-metrics-service.d.ts +4 -0
- package/dist/src/work/work-value-metrics-service.js +88 -0
- package/dist/src/work-items/work-item-service.d.ts +0 -2
- package/dist/src/work-items/work-item-service.js +0 -28
- package/dist/src/workflows/service/workflow-run-service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +3 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/agents-DC9F12Kw.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-5bKr05Fa.js +0 -1
- package/dist/gateway/static/root/assets/automation-suggestion-card-B7mxFRtf.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Dg6dmt5g.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BHoo6Rpq.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BlsqN8Fu.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DJeT8_B4.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-C4VVjYEm.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-vdf8kB16.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DNcrDThX.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-B1urphOZ.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DTL6J3EP.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DmObBx9b.js +0 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-BRhmmBe9.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-C1k7_s_O.js +0 -4
- package/dist/gateway/static/root/assets/goals-config-api-Fwu1wjEP.js +0 -1
- package/dist/gateway/static/root/assets/goals-page-hOu9uA3q.js +0 -2
- package/dist/gateway/static/root/assets/goals-settings-DY-JjvHz.js +0 -1
- package/dist/gateway/static/root/assets/index-C0CGebQ1.js +0 -212
- package/dist/gateway/static/root/assets/index-eqq25gvV.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-EjsNT7nJ.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-Dswjlraa.js +0 -7
- package/dist/gateway/static/root/assets/messages-DP6tPKk-.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-DSh3-hMY.js +0 -4
- package/dist/gateway/static/root/assets/product-delivery-BTRT9kCS.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-D0QPRHR_.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CI5Vz62F.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-S1jpzBS5.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CTm66k7h.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CU52AUVD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DK6XK95e.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Bvv_u4ii.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BGHvVbay.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-XwpxdZFr.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-DBCMk-Vn.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-C1UIdsCl.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-DEAQepB8.js +0 -1
- package/dist/gateway/static/root/assets/work-page-D5qYmCTq.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-yrK17ZZ5.js +0 -11
- package/dist/src/agent/outcomes/task-verifier.d.ts +0 -29
- package/dist/src/gateway/hono/routes/task-outcomes.d.ts +0 -3
- package/dist/src/gateway/hono/routes/task-outcomes.js +0 -109
- package/dist/src/goals/goal-contract-draft.d.ts +0 -15
- package/dist/src/goals/goal-contract-draft.js +0 -112
- package/dist/src/goals/goal-evidence-review.d.ts +0 -15
- package/dist/src/goals/goal-evidence-review.js +0 -89
- package/dist/src/storage/sqlite/task-outcome-repository.d.ts +0 -90
- package/dist/src/storage/sqlite/task-outcome-repository.js +0 -138
|
@@ -169,13 +169,7 @@ async function runTuiOAuthLogin(provider, deps) {
|
|
|
169
169
|
deps,
|
|
170
170
|
activeCleanups
|
|
171
171
|
}));
|
|
172
|
-
await new CredentialResolver().
|
|
173
|
-
access: config.provider.getApiKey(credentials),
|
|
174
|
-
refresh: credentials.refresh,
|
|
175
|
-
expiresAt: credentials.expires,
|
|
176
|
-
scope: Array.isArray(credentials.scope) ? credentials.scope.filter((value) => typeof value === "string") : void 0,
|
|
177
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
178
|
-
});
|
|
172
|
+
await new CredentialResolver().saveOAuthCredentials(selectedProvider, credentials);
|
|
179
173
|
deps.chatLog.addSystem(`OAuth login completed for ${selectedProvider}.`);
|
|
180
174
|
} finally {
|
|
181
175
|
for (const cleanup of [...activeCleanups]) cleanup();
|
|
@@ -611,6 +611,7 @@ function openProjectTrustOverlay(svc) {
|
|
|
611
611
|
trustStore.setMany(selected.updates);
|
|
612
612
|
svc.setProjectTrustSessionDecision(null);
|
|
613
613
|
} else svc.setProjectTrustSessionDecision(selected.trusted);
|
|
614
|
+
svc.onProjectTrustChanged();
|
|
614
615
|
svc.closeOverlay();
|
|
615
616
|
svc.tui.setFocus(svc.editor);
|
|
616
617
|
const scope = selected.savedPath ? `saved for ${selected.savedPath}` : "this session only";
|
|
@@ -50,5 +50,6 @@ export type PickerServices = {
|
|
|
50
50
|
getProjectTrustStore: () => ProjectTrustStore;
|
|
51
51
|
getProjectTrustSessionDecision: () => boolean | null;
|
|
52
52
|
setProjectTrustSessionDecision: (decision: boolean | null) => void;
|
|
53
|
+
onProjectTrustChanged: () => void;
|
|
53
54
|
keybindings: KeybindingsManager;
|
|
54
55
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { TuiAutocompleteProvider } from '../extensions/types/tui.js';
|
|
2
2
|
/** `@skill` autocomplete from workspace + global + bundled skill directories. */
|
|
3
|
-
export declare function createSkillsAutocompleteProvider(
|
|
3
|
+
export declare function createSkillsAutocompleteProvider(options?: {
|
|
4
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean;
|
|
5
|
+
}): TuiAutocompleteProvider;
|
|
4
6
|
/** Test helper — build skill list without caching. */
|
|
5
|
-
export declare function listSkillAutocompleteSuggestions(
|
|
7
|
+
export declare function listSkillAutocompleteSuggestions(options?: {
|
|
8
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean;
|
|
9
|
+
}): Array<{
|
|
6
10
|
name: string;
|
|
7
11
|
description?: string;
|
|
8
12
|
}>;
|
|
@@ -7,13 +7,15 @@ import "../config/index.js";
|
|
|
7
7
|
//#region src/tui/tui-skills-autocomplete.ts
|
|
8
8
|
init_paths();
|
|
9
9
|
/** `@skill` autocomplete from workspace + global + bundled skill directories. */
|
|
10
|
-
function createSkillsAutocompleteProvider() {
|
|
10
|
+
function createSkillsAutocompleteProvider(options = {}) {
|
|
11
11
|
let cached = null;
|
|
12
12
|
const refresh = () => {
|
|
13
|
+
const workspaceDir = getWorkspacePath(loadConfig());
|
|
13
14
|
cached = loadSkills({
|
|
14
|
-
workspaceDir
|
|
15
|
+
workspaceDir,
|
|
15
16
|
builtinDir: resolveBundledSkillsDir(),
|
|
16
|
-
globalDir: resolveStateDir()
|
|
17
|
+
globalDir: resolveStateDir(),
|
|
18
|
+
workspaceTrust: options.isWorkspaceTrusted?.(workspaceDir) === true ? "trusted" : "untrusted"
|
|
17
19
|
}).skills.map((skill) => ({
|
|
18
20
|
name: skill.name,
|
|
19
21
|
description: skill.description ? `skill · ${skill.description.slice(0, 112)}` : "skill"
|
|
@@ -27,11 +29,13 @@ function createSkillsAutocompleteProvider() {
|
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
31
|
/** Test helper — build skill list without caching. */
|
|
30
|
-
function listSkillAutocompleteSuggestions() {
|
|
32
|
+
function listSkillAutocompleteSuggestions(options = {}) {
|
|
33
|
+
const workspaceDir = getWorkspacePath(loadConfig());
|
|
31
34
|
return loadSkills({
|
|
32
|
-
workspaceDir
|
|
35
|
+
workspaceDir,
|
|
33
36
|
builtinDir: resolveBundledSkillsDir(),
|
|
34
|
-
globalDir: resolveStateDir()
|
|
37
|
+
globalDir: resolveStateDir(),
|
|
38
|
+
workspaceTrust: options.isWorkspaceTrusted?.(workspaceDir) === true ? "trusted" : "untrusted"
|
|
35
39
|
}).skills.map((s) => ({
|
|
36
40
|
name: s.name,
|
|
37
41
|
description: s.description
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { Config } from '../config/schema.js';
|
|
2
2
|
import type { TuiStartupResources } from './tui-backend.js';
|
|
3
|
-
export declare function collectTuiStartupResources(config: Config, sessionKey?: string
|
|
3
|
+
export declare function collectTuiStartupResources(config: Config, sessionKey?: string, options?: {
|
|
4
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean;
|
|
5
|
+
}): TuiStartupResources;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir, resolveUserProfilePath } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|
|
@@ -14,7 +14,7 @@ init_paths();
|
|
|
14
14
|
function uniqueSorted(values) {
|
|
15
15
|
return [...new Set([...values].map((value) => value.trim()).filter(Boolean))].sort((a, b) => a.localeCompare(b));
|
|
16
16
|
}
|
|
17
|
-
function collectTuiStartupResources(config, sessionKey) {
|
|
17
|
+
function collectTuiStartupResources(config, sessionKey, options = {}) {
|
|
18
18
|
const profile = resolveEffectiveAgentProfileForSession(config, sessionKey);
|
|
19
19
|
const profileDir = resolveAgentProfileDir(config, profile.agentId);
|
|
20
20
|
const workspaceDir = profile.resolvedWorkspacePath || getWorkspacePath(config);
|
|
@@ -28,7 +28,8 @@ function collectTuiStartupResources(config, sessionKey) {
|
|
|
28
28
|
context,
|
|
29
29
|
skills: uniqueSorted(loadSkills({
|
|
30
30
|
workspaceDir,
|
|
31
|
-
builtinDir: resolveBundledSkillsDir() ?? void 0
|
|
31
|
+
builtinDir: resolveBundledSkillsDir() ?? void 0,
|
|
32
|
+
workspaceTrust: options.isWorkspaceTrusted?.(workspaceDir) === true ? "trusted" : "untrusted"
|
|
32
33
|
}).skills.filter((skill) => !skill.disableModelInvocation && isSkillEnabled(skill, skillsConfig)).map((skill) => skill.name)),
|
|
33
34
|
workflows: uniqueSorted(createWorkflowCatalog().list().map((entry) => entry.name)),
|
|
34
35
|
connectors: uniqueSorted(listConnectorInstances(config).map((instance) => instance.displayName || instance.connectorId || instance.instanceId))
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -2,10 +2,10 @@ import { version } from "../../package.js";
|
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
4
4
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
6
5
|
import { init_paths } from "../config/paths.js";
|
|
7
6
|
import { loadConfig } from "../config/loader.js";
|
|
8
7
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
9
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
10
10
|
import { runViewToSnapshot } from "../workflows/service/run-view-to-snapshot.js";
|
|
11
11
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
@@ -1936,6 +1936,9 @@ async function runTui(opts) {
|
|
|
1936
1936
|
setProjectTrustSessionDecision: (decision) => {
|
|
1937
1937
|
projectTrustSessionDecision = decision;
|
|
1938
1938
|
},
|
|
1939
|
+
onProjectTrustChanged: () => {
|
|
1940
|
+
client.refreshWorkspaceTrust?.();
|
|
1941
|
+
},
|
|
1939
1942
|
keybindings
|
|
1940
1943
|
};
|
|
1941
1944
|
uiOverlays.openModelPicker = (initialSearch) => void openModelPickerOverlay(pickerSvc, initialSearch);
|
|
@@ -6,8 +6,8 @@ import { tmpdir } from "node:os";
|
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { chmodSync, createWriteStream, existsSync, mkdirSync, rmSync } from "node:fs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
|
-
import { Readable } from "node:stream";
|
|
10
9
|
import { pipeline } from "node:stream/promises";
|
|
10
|
+
import { Readable } from "node:stream";
|
|
11
11
|
//#region src/tunnel/frpc-binary.ts
|
|
12
12
|
init_paths();
|
|
13
13
|
init_logger();
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
|
-
import AdmZip from "adm-zip";
|
|
7
6
|
import { gunzipSync } from "node:zlib";
|
|
7
|
+
import AdmZip from "adm-zip";
|
|
8
8
|
//#region src/tunnel/frpc-extract.ts
|
|
9
9
|
init_logger();
|
|
10
10
|
const log = createLogger("TunnelFrpcExtract");
|
package/dist/src/tunnel/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { loadTunnelState, resolveTunnelStatePath, saveTunnelState } from "./tunnel-state.js";
|
|
2
2
|
import { buildMobileConnectQrPayload, resolveLanGatewayUrl } from "./tunnel-qr.js";
|
|
3
3
|
import { CURRENT_TUNNEL_CONSENT_VERSION, TUNNEL_CONSENT_REQUIRED_CODE, TUNNEL_RISK_SUMMARY_LINES, TunnelConsentError, assertTunnelMayStart, getTunnelConsentState, hasValidTunnelConsent } from "./consent.js";
|
|
4
|
-
import { getTunnelRegistrationSecretMeta, isMaskedTunnelSecretPatchValue, isProductionTunnelBroker, resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "./env.js";
|
|
5
4
|
import { TunnelBrokerClient, resolveBrokerApiBase } from "./broker-client.js";
|
|
5
|
+
import { getTunnelRegistrationSecretMeta, isMaskedTunnelSecretPatchValue, isProductionTunnelBroker, resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "./env.js";
|
|
6
|
+
import { applyTunnelConsentToConfig, mergeTunnelConfigPatch, sanitizeTunnelConfig, setTunnelEnabledInConfig } from "./tunnel-config.js";
|
|
6
7
|
import { FRPC_VERSION, clearFrpcPathForProcess, ensureFrpcBinary, publishFrpcPathForProcess } from "./frpc-binary.js";
|
|
7
8
|
import { consumePairingSecret, createPairingSecret, resetPairingSessionsForTests } from "./pairing.js";
|
|
8
9
|
import { logTunnelAudit } from "./tunnel-audit.js";
|
|
@@ -10,6 +11,5 @@ import { TunnelService, getTunnelService, hashGatewayToken } from "./tunnel-serv
|
|
|
10
11
|
import { resolveFrpSubdomainHost } from "./frp-subdomain-host.js";
|
|
11
12
|
import { clearTunnelWellKnownCache, fetchTunnelWellKnown } from "./well-known.js";
|
|
12
13
|
import { configureTunnelFromGatewayConfig, maybeAutoStartTunnelFromConfig, wireTunnelEventsToGateway } from "./gateway-lifecycle.js";
|
|
13
|
-
import { applyTunnelConsentToConfig, mergeTunnelConfigPatch, sanitizeTunnelConfig, setTunnelEnabledInConfig } from "./tunnel-config.js";
|
|
14
14
|
import { consumeTunnelMutationLimit, resetTunnelMutationLimitsForTests } from "./tunnel-rate-limit.js";
|
|
15
15
|
export { CURRENT_TUNNEL_CONSENT_VERSION, FRPC_VERSION, TUNNEL_CONSENT_REQUIRED_CODE, TUNNEL_RISK_SUMMARY_LINES, TunnelBrokerClient, TunnelConsentError, TunnelService, applyTunnelConsentToConfig, assertTunnelMayStart, buildMobileConnectQrPayload, clearFrpcPathForProcess, clearTunnelWellKnownCache, configureTunnelFromGatewayConfig, consumePairingSecret, consumeTunnelMutationLimit, createPairingSecret, ensureFrpcBinary, fetchTunnelWellKnown, getTunnelConsentState, getTunnelRegistrationSecretMeta, getTunnelService, hasValidTunnelConsent, hashGatewayToken, isMaskedTunnelSecretPatchValue, isProductionTunnelBroker, loadTunnelState, logTunnelAudit, maybeAutoStartTunnelFromConfig, mergeTunnelConfigPatch, publishFrpcPathForProcess, resetPairingSessionsForTests, resetTunnelMutationLimitsForTests, resolveBrokerApiBase, resolveFrpSubdomainHost, resolveLanGatewayUrl, resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret, resolveTunnelStatePath, sanitizeTunnelConfig, saveTunnelState, setTunnelEnabledInConfig, wireTunnelEventsToGateway };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { UserContextPlan } from '../agent/memory/context/types.js';
|
|
2
|
+
import { type RelationshipSettings } from '../storage/sqlite/index.js';
|
|
3
|
+
export interface ContextSnapshot {
|
|
4
|
+
id: string;
|
|
5
|
+
traceId: string;
|
|
6
|
+
sessionKey: string;
|
|
7
|
+
query: string;
|
|
8
|
+
selectedItems: UserContextPlan['items'];
|
|
9
|
+
rejectedItems: UserContextPlan['rejected'];
|
|
10
|
+
consentRequests: UserContextPlan['consentRequests'];
|
|
11
|
+
relationshipPolicy: RelationshipSettings;
|
|
12
|
+
estimatedTokens: number;
|
|
13
|
+
outcomeId?: string;
|
|
14
|
+
runId?: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class ContextCompiler {
|
|
18
|
+
capture(input: {
|
|
19
|
+
sessionKey: string;
|
|
20
|
+
query: string;
|
|
21
|
+
plan: UserContextPlan;
|
|
22
|
+
now?: number;
|
|
23
|
+
}): ContextSnapshot;
|
|
24
|
+
get(id: string): ContextSnapshot | undefined;
|
|
25
|
+
latestForSession(sessionKey: string, since?: number): ContextSnapshot | undefined;
|
|
26
|
+
linkToRun(input: {
|
|
27
|
+
snapshotId: string;
|
|
28
|
+
outcomeId?: string;
|
|
29
|
+
runId: string;
|
|
30
|
+
}): ContextSnapshot | undefined;
|
|
31
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { getRelationshipSettings } from "../storage/sqlite/relationship-settings-repository.js";
|
|
3
|
+
import "../storage/sqlite/index.js";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
//#region src/user-context/context-compiler.ts
|
|
6
|
+
function fromRow(row) {
|
|
7
|
+
return {
|
|
8
|
+
id: row.snapshot_id,
|
|
9
|
+
traceId: row.trace_id,
|
|
10
|
+
sessionKey: row.session_key,
|
|
11
|
+
query: row.query,
|
|
12
|
+
selectedItems: JSON.parse(row.selected_items_json),
|
|
13
|
+
rejectedItems: JSON.parse(row.rejected_items_json),
|
|
14
|
+
consentRequests: JSON.parse(row.consent_requests_json),
|
|
15
|
+
relationshipPolicy: JSON.parse(row.relationship_policy_json),
|
|
16
|
+
estimatedTokens: row.estimated_tokens,
|
|
17
|
+
...row.outcome_id ? { outcomeId: row.outcome_id } : {},
|
|
18
|
+
...row.run_id ? { runId: row.run_id } : {},
|
|
19
|
+
createdAt: row.created_at
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var ContextCompiler = class {
|
|
23
|
+
capture(input) {
|
|
24
|
+
const now = input.now ?? Date.now();
|
|
25
|
+
const id = randomUUID();
|
|
26
|
+
runSqliteWriteTransaction((db) => {
|
|
27
|
+
db.prepare(`INSERT INTO context_snapshots (
|
|
28
|
+
snapshot_id, trace_id, session_key, query, selected_items_json,
|
|
29
|
+
rejected_items_json, consent_requests_json, relationship_policy_json,
|
|
30
|
+
estimated_tokens, created_at
|
|
31
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.plan.traceId, input.sessionKey, input.query.trim(), JSON.stringify(input.plan.items), JSON.stringify(input.plan.rejected), JSON.stringify(input.plan.consentRequests), JSON.stringify(getRelationshipSettings()), input.plan.estimatedTokens, now);
|
|
32
|
+
});
|
|
33
|
+
return this.get(id);
|
|
34
|
+
}
|
|
35
|
+
get(id) {
|
|
36
|
+
const row = getSqliteDatabase().prepare("SELECT * FROM context_snapshots WHERE snapshot_id = ?").get(id);
|
|
37
|
+
return row ? fromRow(row) : void 0;
|
|
38
|
+
}
|
|
39
|
+
latestForSession(sessionKey, since = 0) {
|
|
40
|
+
const row = getSqliteDatabase().prepare(`SELECT * FROM context_snapshots
|
|
41
|
+
WHERE session_key = ? AND created_at >= ?
|
|
42
|
+
ORDER BY created_at DESC LIMIT 1`).get(sessionKey, since);
|
|
43
|
+
return row ? fromRow(row) : void 0;
|
|
44
|
+
}
|
|
45
|
+
linkToRun(input) {
|
|
46
|
+
getSqliteDatabase().prepare(`UPDATE context_snapshots SET outcome_id = ?, run_id = ? WHERE snapshot_id = ?`).run(input.outcomeId ?? null, input.runId, input.snapshotId);
|
|
47
|
+
return this.get(input.snapshotId);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ContextCompiler };
|
|
@@ -2,8 +2,8 @@ import { dirname, join } from "node:path";
|
|
|
2
2
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { mkdir, rm, stat } from "node:fs/promises";
|
|
5
|
-
import { Readable } from "node:stream";
|
|
6
5
|
import { pipeline } from "node:stream/promises";
|
|
6
|
+
import { Readable } from "node:stream";
|
|
7
7
|
//#region src/voice/local/model-files.ts
|
|
8
8
|
function resolveModelFileUrl(remoteHost, model, file) {
|
|
9
9
|
const base = remoteHost.endsWith("/") ? remoteHost : `${remoteHost}/`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DEFAULT_STT_CONFIG } from "./types.js";
|
|
2
|
+
//#region src/voice/stt/config.ts
|
|
3
|
+
function mergeSttProviders(base, patch) {
|
|
4
|
+
if (!base && !patch) return void 0;
|
|
5
|
+
const merged = { ...base ?? {} };
|
|
6
|
+
for (const [id, slice] of Object.entries(patch ?? {})) merged[id] = {
|
|
7
|
+
...merged[id] ?? {},
|
|
8
|
+
...slice
|
|
9
|
+
};
|
|
10
|
+
return merged;
|
|
11
|
+
}
|
|
12
|
+
function mergeSttConfigFromAppConfig(stt, toolsMedia) {
|
|
13
|
+
const patch = stt ?? {};
|
|
14
|
+
return {
|
|
15
|
+
...DEFAULT_STT_CONFIG,
|
|
16
|
+
...patch,
|
|
17
|
+
providers: mergeSttProviders(DEFAULT_STT_CONFIG.providers, patch.providers),
|
|
18
|
+
fallback: {
|
|
19
|
+
...DEFAULT_STT_CONFIG.fallback,
|
|
20
|
+
...patch.fallback
|
|
21
|
+
},
|
|
22
|
+
...toolsMedia?.models?.length ? { sharedModels: toolsMedia.models } : {}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { mergeSttConfigFromAppConfig };
|
|
@@ -9,6 +9,7 @@ import './providers/index.js';
|
|
|
9
9
|
import type { STTConfig, STTOptions, STTResult } from './types.js';
|
|
10
10
|
export { transcribe } from './transcribe-core.js';
|
|
11
11
|
export { isSTTAvailable } from './availability.js';
|
|
12
|
+
export { mergeSttConfigFromAppConfig } from './config.js';
|
|
12
13
|
/**
|
|
13
14
|
* Single-provider transcription helper. Used by chat-commands /stt so a user
|
|
14
15
|
* can force a specific provider regardless of fallback config.
|
|
@@ -4,6 +4,7 @@ import "./providers/index.js";
|
|
|
4
4
|
import { resolveSTTProviderChain, resolveSTTProviderConfig, resolveSTTProviderOrder } from "./factory.js";
|
|
5
5
|
import { transcribe } from "./transcribe-core.js";
|
|
6
6
|
import { isSTTAvailable } from "./availability.js";
|
|
7
|
+
import { mergeSttConfigFromAppConfig } from "./config.js";
|
|
7
8
|
import { checkMentionInTranscription } from "./mention.js";
|
|
8
9
|
import { audioPreflightTranscribe } from "./preflight.js";
|
|
9
10
|
//#region src/voice/stt/index.ts
|
|
@@ -28,4 +29,4 @@ async function transcribeWithProvider(audioBuffer, providerName, config, options
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
//#endregion
|
|
31
|
-
export { alibabaTranscriptionProvider, audioPreflightTranscribe, checkMentionInTranscription, isSTTAvailable, openAiTranscriptionProvider, resolveSTTProviderChain, resolveSTTProviderConfig, resolveSTTProviderOrder, transcribe, transcribeWithProvider };
|
|
32
|
+
export { alibabaTranscriptionProvider, audioPreflightTranscribe, checkMentionInTranscription, isSTTAvailable, mergeSttConfigFromAppConfig, openAiTranscriptionProvider, resolveSTTProviderChain, resolveSTTProviderConfig, resolveSTTProviderOrder, transcribe, transcribeWithProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { listMediaUnderstandingProviders } from "../../media-understanding/registry.js";
|
|
2
2
|
import { resolveSTTProviderConfig } from "./factory.js";
|
|
3
|
-
import { mergeSttConfigFromAppConfig } from "
|
|
3
|
+
import { mergeSttConfigFromAppConfig } from "./config.js";
|
|
4
4
|
import { getVoiceProviderMetadata } from "../metadata/registry.js";
|
|
5
5
|
import "../metadata/index.js";
|
|
6
6
|
//#region src/voice/stt/list-providers.ts
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkHomeAttention, WorkHomeDecision } from '@xopcai/gateway-contract';
|
|
2
|
+
export interface AttentionProjection {
|
|
3
|
+
decisions: WorkHomeDecision[];
|
|
4
|
+
attention: WorkHomeAttention[];
|
|
5
|
+
policy: {
|
|
6
|
+
visibleDecisionCount: number;
|
|
7
|
+
suppressedDecisionCount: number;
|
|
8
|
+
visibleAttentionCount: number;
|
|
9
|
+
suppressedAttentionCount: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare class AttentionGovernor {
|
|
13
|
+
project(input: {
|
|
14
|
+
decisions: WorkHomeDecision[];
|
|
15
|
+
attention: WorkHomeAttention[];
|
|
16
|
+
proactiveEnabled: boolean;
|
|
17
|
+
maxDecisions?: number;
|
|
18
|
+
maxAttention?: number;
|
|
19
|
+
}): AttentionProjection;
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/work/attention-governor.ts
|
|
2
|
+
function decisionScore(item) {
|
|
3
|
+
if (item.reason === "approval_required") return 100;
|
|
4
|
+
if (item.reason === "needs_input") return 95;
|
|
5
|
+
if (item.reason === "blocked") return 85;
|
|
6
|
+
if (item.reason === "in_review") return 80;
|
|
7
|
+
if (item.kind === "agent_judgment") return Math.round((item.judgment?.valueScore ?? 0) * 70) + (item.urgency === "now" ? 20 : 0);
|
|
8
|
+
if (item.reason === "overdue") return 70;
|
|
9
|
+
return 50;
|
|
10
|
+
}
|
|
11
|
+
function decisionKey(item) {
|
|
12
|
+
const title = item.title.trim().toLocaleLowerCase();
|
|
13
|
+
return item.response ? item.id : `${item.projectId ?? "global"}:${title}:${item.reason === "approval_required" ? item.id : ""}`;
|
|
14
|
+
}
|
|
15
|
+
function keepDecision(item, proactiveEnabled) {
|
|
16
|
+
if (item.kind !== "agent_judgment") return true;
|
|
17
|
+
if (!proactiveEnabled) return false;
|
|
18
|
+
return (item.judgment?.confidence ?? 0) >= .65 && (item.judgment?.valueScore ?? 0) >= .6;
|
|
19
|
+
}
|
|
20
|
+
var AttentionGovernor = class {
|
|
21
|
+
project(input) {
|
|
22
|
+
const maxDecisions = Math.max(1, Math.min(20, input.maxDecisions ?? 7));
|
|
23
|
+
const maxAttention = Math.max(1, Math.min(10, input.maxAttention ?? 5));
|
|
24
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25
|
+
const eligible = [...input.decisions].filter((item) => keepDecision(item, input.proactiveEnabled)).sort((left, right) => decisionScore(right) - decisionScore(left) || right.updatedAt - left.updatedAt).filter((item) => {
|
|
26
|
+
const key = decisionKey(item);
|
|
27
|
+
if (seen.has(key)) return false;
|
|
28
|
+
seen.add(key);
|
|
29
|
+
return true;
|
|
30
|
+
});
|
|
31
|
+
const attention = [...input.attention].sort((left, right) => right.updatedAt - left.updatedAt).slice(0, maxAttention);
|
|
32
|
+
const decisions = eligible.slice(0, maxDecisions);
|
|
33
|
+
return {
|
|
34
|
+
decisions,
|
|
35
|
+
attention,
|
|
36
|
+
policy: {
|
|
37
|
+
visibleDecisionCount: decisions.length,
|
|
38
|
+
suppressedDecisionCount: Math.max(0, input.decisions.length - decisions.length),
|
|
39
|
+
visibleAttentionCount: attention.length,
|
|
40
|
+
suppressedAttentionCount: Math.max(0, input.attention.length - attention.length)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { AttentionGovernor };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SessionMetadata } from '../session/types.js';
|
|
2
|
+
import type { ExecutionReceiptContext } from '../storage/sqlite/execution-receipt-repository.js';
|
|
3
|
+
export interface ExecutionContext extends ExecutionReceiptContext {
|
|
4
|
+
runId: string;
|
|
5
|
+
sessionKey: string;
|
|
6
|
+
channel: string;
|
|
7
|
+
agentId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveExecutionContext(input: {
|
|
10
|
+
runId: string;
|
|
11
|
+
sessionKey: string;
|
|
12
|
+
channel: string;
|
|
13
|
+
metadata: SessionMetadata;
|
|
14
|
+
agentId?: string;
|
|
15
|
+
}): ExecutionContext;
|
|
16
|
+
export declare function executionReceiptContext(context: ExecutionContext): ExecutionReceiptContext;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/work/execution-context.ts
|
|
2
|
+
const ORIGINS = new Set([
|
|
3
|
+
"chat",
|
|
4
|
+
"goal",
|
|
5
|
+
"workflow",
|
|
6
|
+
"automation",
|
|
7
|
+
"browser",
|
|
8
|
+
"proactive"
|
|
9
|
+
]);
|
|
10
|
+
const TRIGGERS = new Set([
|
|
11
|
+
"user",
|
|
12
|
+
"schedule",
|
|
13
|
+
"webhook",
|
|
14
|
+
"proactive",
|
|
15
|
+
"retry"
|
|
16
|
+
]);
|
|
17
|
+
function optionalString(value) {
|
|
18
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
19
|
+
}
|
|
20
|
+
function metadataOrigin(metadata) {
|
|
21
|
+
const explicit = optionalString(metadata.customData?.origin);
|
|
22
|
+
if (explicit && ORIGINS.has(explicit)) return explicit;
|
|
23
|
+
if (optionalString(metadata.customData?.goalId)) return "goal";
|
|
24
|
+
if (metadata.sessionType === "workflow-run" || metadata.sessionType === "workflow-subagent") return "workflow";
|
|
25
|
+
if (metadata.sessionType === "cron") return "automation";
|
|
26
|
+
if (metadata.sessionType === "heartbeat") return "proactive";
|
|
27
|
+
if (optionalString(metadata.customData?.browserRecipeId)) return "browser";
|
|
28
|
+
return "chat";
|
|
29
|
+
}
|
|
30
|
+
function metadataTrigger(metadata) {
|
|
31
|
+
const explicit = optionalString(metadata.customData?.triggerKind);
|
|
32
|
+
if (explicit && TRIGGERS.has(explicit)) return explicit;
|
|
33
|
+
if (metadata.sessionType === "cron") return "schedule";
|
|
34
|
+
if (metadata.sessionType === "heartbeat") return "proactive";
|
|
35
|
+
return "user";
|
|
36
|
+
}
|
|
37
|
+
function resolveExecutionContext(input) {
|
|
38
|
+
return {
|
|
39
|
+
runId: input.runId,
|
|
40
|
+
sessionKey: input.sessionKey,
|
|
41
|
+
channel: input.channel,
|
|
42
|
+
agentId: input.agentId,
|
|
43
|
+
projectId: input.metadata.projectId,
|
|
44
|
+
outcomeId: optionalString(input.metadata.customData?.outcomeId),
|
|
45
|
+
goalId: optionalString(input.metadata.customData?.goalId),
|
|
46
|
+
workItemId: optionalString(input.metadata.customData?.workItemId),
|
|
47
|
+
origin: metadataOrigin(input.metadata),
|
|
48
|
+
triggerKind: metadataTrigger(input.metadata),
|
|
49
|
+
parentRunId: optionalString(input.metadata.customData?.parentRunId),
|
|
50
|
+
contextTraceId: optionalString(input.metadata.customData?.contextTraceId)
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function executionReceiptContext(context) {
|
|
54
|
+
return {
|
|
55
|
+
outcomeId: context.outcomeId,
|
|
56
|
+
projectId: context.projectId,
|
|
57
|
+
goalId: context.goalId,
|
|
58
|
+
workItemId: context.workItemId,
|
|
59
|
+
origin: context.origin,
|
|
60
|
+
triggerKind: context.triggerKind,
|
|
61
|
+
parentRunId: context.parentRunId,
|
|
62
|
+
contextTraceId: context.contextTraceId
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { executionReceiptContext, resolveExecutionContext };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { WorkHomeResponse } from '@xopcai/gateway-contract';
|
|
2
|
+
import { type AutomationRun } from '../automations/index.js';
|
|
3
|
+
import type { AutomationService } from '../automations/service/automation-service.js';
|
|
4
|
+
import type { Config } from '../config/schema.js';
|
|
5
|
+
import { type GoalWithDetails } from '../goals/index.js';
|
|
6
|
+
import type { NotesService } from '../notes/service.js';
|
|
7
|
+
import type { ProactiveInboxService } from '../proactive/inbox/service.js';
|
|
8
|
+
import type { ProjectService } from '../projects/project-service.js';
|
|
9
|
+
import type { SessionIndex } from '../session/manager.js';
|
|
10
|
+
import type { WorkflowRunService } from '../workflows/service/workflow-run-service.js';
|
|
11
|
+
type HomeDecision = WorkHomeResponse['decisions'][number];
|
|
12
|
+
type HomeAttention = WorkHomeResponse['attention'][number];
|
|
13
|
+
type HomeBriefingWin = WorkHomeResponse['briefing']['wins'][number];
|
|
14
|
+
type HomeAutomation = WorkHomeResponse['upcomingAutomations'][number];
|
|
15
|
+
type HomeAutomationRun = {
|
|
16
|
+
id: string;
|
|
17
|
+
automationId: string;
|
|
18
|
+
automationName?: string;
|
|
19
|
+
status: AutomationRun['status'];
|
|
20
|
+
createdAtMs: number;
|
|
21
|
+
startedAtMs?: number;
|
|
22
|
+
endedAtMs?: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
summary?: string;
|
|
25
|
+
sessionKey?: string;
|
|
26
|
+
workflowRunId?: string;
|
|
27
|
+
};
|
|
28
|
+
type HomeSnapshot = WorkHomeResponse & {
|
|
29
|
+
recentlyOpened: unknown[];
|
|
30
|
+
inboxCount: number;
|
|
31
|
+
pendingTasks: unknown[];
|
|
32
|
+
pendingTaskCount: number;
|
|
33
|
+
recentSessions: unknown[];
|
|
34
|
+
activeAgent: {
|
|
35
|
+
id: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
};
|
|
39
|
+
gateway: Record<string, unknown>;
|
|
40
|
+
recentAutomationRuns: HomeAutomationRun[];
|
|
41
|
+
};
|
|
42
|
+
interface WorkHomeGatewayPort {
|
|
43
|
+
readonly notesServiceInstance: NotesService;
|
|
44
|
+
readonly sessions: Pick<SessionIndex, 'listSessions'> & {
|
|
45
|
+
getActiveRun(sessionKey: string): {
|
|
46
|
+
active: boolean;
|
|
47
|
+
runId?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
readonly currentConfig: Config;
|
|
51
|
+
readonly automationServiceInstance: AutomationService;
|
|
52
|
+
readonly projects: ProjectService;
|
|
53
|
+
readonly proactiveInbox: ProactiveInboxService;
|
|
54
|
+
createWorkflowRunService(): WorkflowRunService;
|
|
55
|
+
getHealth(): {
|
|
56
|
+
status: string;
|
|
57
|
+
ready: boolean;
|
|
58
|
+
httpListening: boolean;
|
|
59
|
+
version: string;
|
|
60
|
+
uptime: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export declare function workItemAttentionRank(item: {
|
|
64
|
+
status: string;
|
|
65
|
+
dueAt?: number;
|
|
66
|
+
priority: string;
|
|
67
|
+
updatedAt: number;
|
|
68
|
+
}, nowMs: number): number;
|
|
69
|
+
export declare function decisionFromGoal(goal: GoalWithDetails, projectName?: string): HomeDecision | null;
|
|
70
|
+
export declare function buildHomeBriefing(input: {
|
|
71
|
+
locale?: string;
|
|
72
|
+
decisions: HomeDecision[];
|
|
73
|
+
attention: HomeAttention[];
|
|
74
|
+
activeWorkCount: number;
|
|
75
|
+
activeWorkflowCount: number;
|
|
76
|
+
activeGoalCount: number;
|
|
77
|
+
wins: HomeBriefingWin[];
|
|
78
|
+
nextScheduled?: HomeAutomation;
|
|
79
|
+
nowMs: number;
|
|
80
|
+
}): {
|
|
81
|
+
generatedAt: number;
|
|
82
|
+
summary: string;
|
|
83
|
+
focus: {
|
|
84
|
+
id: string;
|
|
85
|
+
kind: "work_item" | "goal" | "agent_judgment" | "connector_approval" | "goal_evidence";
|
|
86
|
+
title: string;
|
|
87
|
+
reason: "approval_required" | "blocked" | "needs_input" | "in_review" | "overdue" | "due_soon" | "decision_needed";
|
|
88
|
+
urgency: "now" | "soon";
|
|
89
|
+
href: string;
|
|
90
|
+
updatedAt: number;
|
|
91
|
+
detail?: string;
|
|
92
|
+
projectId?: string;
|
|
93
|
+
projectName?: string;
|
|
94
|
+
judgment?: {
|
|
95
|
+
inboxItemId: string;
|
|
96
|
+
whyNow: string;
|
|
97
|
+
impact: string;
|
|
98
|
+
workDone: string;
|
|
99
|
+
recommendation: string;
|
|
100
|
+
confidence: number;
|
|
101
|
+
valueScore?: number;
|
|
102
|
+
decision?: {
|
|
103
|
+
question: string;
|
|
104
|
+
options: {
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
consequence: string;
|
|
108
|
+
}[];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
response?: {
|
|
112
|
+
kind: "connector_approval";
|
|
113
|
+
approvalId: string;
|
|
114
|
+
} | {
|
|
115
|
+
kind: "goal_evidence";
|
|
116
|
+
goalId: string;
|
|
117
|
+
requirementId: string;
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
progress: {
|
|
121
|
+
activeWorkCount: number;
|
|
122
|
+
activeWorkflowCount: number;
|
|
123
|
+
activeGoalCount: number;
|
|
124
|
+
movingCount: number;
|
|
125
|
+
};
|
|
126
|
+
wins: {
|
|
127
|
+
id: string;
|
|
128
|
+
kind: "work_item" | "workflow_run" | "automation_run";
|
|
129
|
+
title: string;
|
|
130
|
+
href: string;
|
|
131
|
+
completedAt: number;
|
|
132
|
+
}[];
|
|
133
|
+
nextScheduled: {
|
|
134
|
+
id: string;
|
|
135
|
+
trigger: string;
|
|
136
|
+
action: string;
|
|
137
|
+
nextRunAt: string;
|
|
138
|
+
name?: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export declare class WorkHomeQueryService {
|
|
142
|
+
#private;
|
|
143
|
+
private readonly service;
|
|
144
|
+
constructor(service: WorkHomeGatewayPort);
|
|
145
|
+
getSnapshot(locale?: string): Promise<HomeSnapshot>;
|
|
146
|
+
}
|
|
147
|
+
export {};
|