@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
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type TaskVerificationStatus = 'passed' | 'failed' | 'unverified';
|
|
2
|
-
export type TaskFailurePhase = 'planning' | 'execution' | 'verification' | 'approval' | 'runtime';
|
|
3
|
-
export type TaskFailureCode = 'cancelled' | 'timeout' | 'tool_failed' | 'verification_failed' | 'approval_required' | 'conflict' | 'model_failed' | 'unknown';
|
|
4
|
-
export type TaskRecoveryAction = 'replan' | 'retry_with_changed_strategy' | 'request_user_input' | 'none';
|
|
5
|
-
export interface TaskVerification {
|
|
6
|
-
status: TaskVerificationStatus;
|
|
7
|
-
checks: Array<{
|
|
8
|
-
criterion: string;
|
|
9
|
-
status: TaskVerificationStatus;
|
|
10
|
-
evidenceTitles: string[];
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
export interface TaskFailureDiagnosis {
|
|
14
|
-
code: TaskFailureCode;
|
|
15
|
-
phase: TaskFailurePhase;
|
|
16
|
-
recoveryAction: TaskRecoveryAction;
|
|
17
|
-
}
|
|
18
|
-
export declare function verifyTaskCompletion(input: {
|
|
19
|
-
status: 'succeeded' | 'failed' | 'cancelled';
|
|
20
|
-
acceptanceCriteria: string[];
|
|
21
|
-
evidence: Array<{
|
|
22
|
-
title: string;
|
|
23
|
-
verifies?: string[];
|
|
24
|
-
}>;
|
|
25
|
-
}): TaskVerification;
|
|
26
|
-
export declare function diagnoseTaskFailure(input: {
|
|
27
|
-
status: 'failed' | 'cancelled';
|
|
28
|
-
summary: string;
|
|
29
|
-
}): TaskFailureDiagnosis;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { findTaskOutcomeForAssistant, getTaskOutcome, listTaskOutcomes, summarizeTaskOutcomes, updateTaskOutcome } from "../../../storage/sqlite/task-outcome-repository.js";
|
|
2
|
-
import "../../../storage/sqlite/index.js";
|
|
3
|
-
import { replayTaskEvaluation } from "../../../agent/outcomes/task-evaluation.js";
|
|
4
|
-
//#region src/gateway/hono/routes/task-outcomes.ts
|
|
5
|
-
function parseLimit(raw) {
|
|
6
|
-
if (!raw) return void 0;
|
|
7
|
-
const value = Number.parseInt(raw, 10);
|
|
8
|
-
return Number.isFinite(value) ? value : void 0;
|
|
9
|
-
}
|
|
10
|
-
function isStringArray(value) {
|
|
11
|
-
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
12
|
-
}
|
|
13
|
-
function isTaskContract(value) {
|
|
14
|
-
if (!value || typeof value !== "object") return false;
|
|
15
|
-
const contract = value;
|
|
16
|
-
return typeof contract.objective === "string" && isStringArray(contract.deliverables) && isStringArray(contract.acceptanceCriteria) && isStringArray(contract.constraints) && isStringArray(contract.approvalRequired);
|
|
17
|
-
}
|
|
18
|
-
function isTaskEvidence(value) {
|
|
19
|
-
return Array.isArray(value) && value.every((item) => {
|
|
20
|
-
if (!item || typeof item !== "object") return false;
|
|
21
|
-
const evidence = item;
|
|
22
|
-
return (evidence.kind === "artifact" || evidence.kind === "test" || evidence.kind === "state" || evidence.kind === "source") && typeof evidence.title === "string" && typeof evidence.summary === "string" && (evidence.uri === void 0 || typeof evidence.uri === "string") && (evidence.verifies === void 0 || isStringArray(evidence.verifies));
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function registerTaskOutcomeRoutes(authenticated, _deps) {
|
|
26
|
-
authenticated.get("/api/task-outcomes", (c) => {
|
|
27
|
-
const items = listTaskOutcomes({
|
|
28
|
-
sessionKey: c.req.query("sessionKey")?.trim() || void 0,
|
|
29
|
-
limit: parseLimit(c.req.query("limit"))
|
|
30
|
-
});
|
|
31
|
-
return c.json({
|
|
32
|
-
ok: true,
|
|
33
|
-
items
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
authenticated.get("/api/task-outcomes/metrics", (c) => {
|
|
37
|
-
return c.json({
|
|
38
|
-
ok: true,
|
|
39
|
-
metrics: summarizeTaskOutcomes()
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
authenticated.get("/api/task-outcomes/evaluation", (c) => {
|
|
43
|
-
const items = listTaskOutcomes({ limit: parseLimit(c.req.query("limit")) ?? 100 });
|
|
44
|
-
return c.json({
|
|
45
|
-
ok: true,
|
|
46
|
-
evaluation: replayTaskEvaluation(items)
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
authenticated.get("/api/task-outcomes/for-assistant", (c) => {
|
|
50
|
-
const sessionKey = c.req.query("sessionKey")?.trim() ?? "";
|
|
51
|
-
const assistantTimestamp = Number(c.req.query("assistantTimestamp"));
|
|
52
|
-
if (!sessionKey || !Number.isFinite(assistantTimestamp) || assistantTimestamp <= 0) return c.json({
|
|
53
|
-
ok: false,
|
|
54
|
-
error: "sessionKey and assistantTimestamp are required"
|
|
55
|
-
}, 400);
|
|
56
|
-
const outcome = findTaskOutcomeForAssistant(sessionKey, assistantTimestamp);
|
|
57
|
-
return outcome ? c.json({
|
|
58
|
-
ok: true,
|
|
59
|
-
outcome
|
|
60
|
-
}) : c.json({
|
|
61
|
-
ok: false,
|
|
62
|
-
error: "Task outcome not found"
|
|
63
|
-
}, 404);
|
|
64
|
-
});
|
|
65
|
-
authenticated.get("/api/task-outcomes/:runId", (c) => {
|
|
66
|
-
const outcome = getTaskOutcome(c.req.param("runId"));
|
|
67
|
-
return outcome ? c.json({
|
|
68
|
-
ok: true,
|
|
69
|
-
outcome
|
|
70
|
-
}) : c.json({
|
|
71
|
-
ok: false,
|
|
72
|
-
error: "Task outcome not found"
|
|
73
|
-
}, 404);
|
|
74
|
-
});
|
|
75
|
-
authenticated.patch("/api/task-outcomes/:runId", async (c) => {
|
|
76
|
-
const body = await c.req.json().catch(() => null);
|
|
77
|
-
if (!body || typeof body !== "object") return c.json({
|
|
78
|
-
ok: false,
|
|
79
|
-
error: "Invalid JSON body"
|
|
80
|
-
}, 400);
|
|
81
|
-
if (body.contract !== void 0 && !isTaskContract(body.contract)) return c.json({
|
|
82
|
-
ok: false,
|
|
83
|
-
error: "Invalid task contract"
|
|
84
|
-
}, 400);
|
|
85
|
-
if (body.evidence !== void 0 && !isTaskEvidence(body.evidence)) return c.json({
|
|
86
|
-
ok: false,
|
|
87
|
-
error: "Invalid task evidence"
|
|
88
|
-
}, 400);
|
|
89
|
-
if (body.summary !== void 0 && typeof body.summary !== "string") return c.json({
|
|
90
|
-
ok: false,
|
|
91
|
-
error: "Invalid task summary"
|
|
92
|
-
}, 400);
|
|
93
|
-
const outcome = updateTaskOutcome({
|
|
94
|
-
runId: c.req.param("runId"),
|
|
95
|
-
...body.contract === void 0 ? {} : { contract: body.contract },
|
|
96
|
-
...body.evidence === void 0 ? {} : { evidence: body.evidence },
|
|
97
|
-
...body.summary === void 0 ? {} : { summary: body.summary }
|
|
98
|
-
});
|
|
99
|
-
return outcome ? c.json({
|
|
100
|
-
ok: true,
|
|
101
|
-
outcome
|
|
102
|
-
}) : c.json({
|
|
103
|
-
ok: false,
|
|
104
|
-
error: "Task outcome not found"
|
|
105
|
-
}, 404);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
//#endregion
|
|
109
|
-
export { registerTaskOutcomeRoutes };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { GoalContractInput } from './types.js';
|
|
2
|
-
export type GoalContractDraftInput = {
|
|
3
|
-
title: string;
|
|
4
|
-
context?: string;
|
|
5
|
-
criteria?: string[];
|
|
6
|
-
uiLocale?: 'en' | 'zh';
|
|
7
|
-
modelRef?: string;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
|
-
};
|
|
10
|
-
export type GoalContractDraftResult = {
|
|
11
|
-
contract: GoalContractInput;
|
|
12
|
-
generated: boolean;
|
|
13
|
-
warning?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function draftGoalContract(input: GoalContractDraftInput): Promise<GoalContractDraftResult>;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
|
|
2
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
3
|
-
//#region src/goals/goal-contract-draft.ts
|
|
4
|
-
init_providers();
|
|
5
|
-
const MAX_ITEMS = 7;
|
|
6
|
-
function stringList(value) {
|
|
7
|
-
if (!Array.isArray(value)) return [];
|
|
8
|
-
const seen = /* @__PURE__ */ new Set();
|
|
9
|
-
const items = [];
|
|
10
|
-
for (const item of value) {
|
|
11
|
-
if (typeof item !== "string") continue;
|
|
12
|
-
const text = item.trim();
|
|
13
|
-
const key = text.toLocaleLowerCase();
|
|
14
|
-
if (!text || seen.has(key)) continue;
|
|
15
|
-
seen.add(key);
|
|
16
|
-
items.push(text);
|
|
17
|
-
if (items.length >= MAX_ITEMS) break;
|
|
18
|
-
}
|
|
19
|
-
return items;
|
|
20
|
-
}
|
|
21
|
-
function extractText(content) {
|
|
22
|
-
if (!Array.isArray(content)) return "";
|
|
23
|
-
return content.filter((block) => Boolean(block && typeof block === "object")).filter((block) => block.type === "text" && typeof block.text === "string").map((block) => block.text).join("").trim();
|
|
24
|
-
}
|
|
25
|
-
function parseJson(raw) {
|
|
26
|
-
const text = raw.trim().replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/, "");
|
|
27
|
-
try {
|
|
28
|
-
return JSON.parse(text);
|
|
29
|
-
} catch {
|
|
30
|
-
const start = text.indexOf("{");
|
|
31
|
-
const end = text.lastIndexOf("}");
|
|
32
|
-
if (start < 0 || end <= start) return null;
|
|
33
|
-
try {
|
|
34
|
-
return JSON.parse(text.slice(start, end + 1));
|
|
35
|
-
} catch {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function fallbackContract(input) {
|
|
41
|
-
const title = input.title.trim();
|
|
42
|
-
const criteria = stringList(input.criteria);
|
|
43
|
-
const isChinese = input.uiLocale === "zh";
|
|
44
|
-
return {
|
|
45
|
-
objective: title,
|
|
46
|
-
scopeBoundary: input.context?.trim() || void 0,
|
|
47
|
-
criteria: criteria.length ? criteria : isChinese ? [`“${title}”具有清晰且可由用户验证的最终结果。`, `“${title}”在约定范围内完成所需工作。`] : [`${title} has a clear, user-verifiable outcome.`, `The required work for ${title} is complete within the stated scope.`],
|
|
48
|
-
evidencePlan: [isChinese ? "提供可检查的测试结果、产物、链接或报告,以证明目标完成。" : "Record an inspectable test result, artifact, link, or report that proves completion."]
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function normalizedModelContract(data, fallback) {
|
|
52
|
-
const objective = typeof data.objective === "string" && data.objective.trim() ? data.objective.trim() : fallback.objective;
|
|
53
|
-
const scopeBoundary = typeof data.scopeBoundary === "string" && data.scopeBoundary.trim() ? data.scopeBoundary.trim() : fallback.scopeBoundary;
|
|
54
|
-
const criteria = stringList(data.criteria);
|
|
55
|
-
const evidencePlan = stringList(data.evidencePlan);
|
|
56
|
-
return {
|
|
57
|
-
objective,
|
|
58
|
-
scopeBoundary,
|
|
59
|
-
criteria: criteria.length ? criteria : fallback.criteria,
|
|
60
|
-
evidencePlan: evidencePlan.length ? evidencePlan : fallback.evidencePlan
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
async function draftGoalContract(input) {
|
|
64
|
-
const fallback = fallbackContract(input);
|
|
65
|
-
if (!input.modelRef?.trim()) return {
|
|
66
|
-
contract: fallback,
|
|
67
|
-
generated: false,
|
|
68
|
-
warning: input.uiLocale === "zh" ? "未配置用于定义目标的模型,已生成可编辑的本地草案。" : "No model is configured for goal drafting."
|
|
69
|
-
};
|
|
70
|
-
try {
|
|
71
|
-
const model = resolveModel(input.modelRef.trim());
|
|
72
|
-
const apiKey = await getApiKey(model.provider);
|
|
73
|
-
const parsed = parseJson(extractText((await completeWithResolvedCredentials(model, { messages: [{
|
|
74
|
-
role: "user",
|
|
75
|
-
content: [
|
|
76
|
-
"Turn the explicitly requested persistent goal into a concise, measurable goal contract.",
|
|
77
|
-
"Preserve the user intent. Do not claim work is done. Do not include markdown or commentary.",
|
|
78
|
-
"Return only one JSON object with objective, scopeBoundary, criteria, and evidencePlan.",
|
|
79
|
-
"criteria and evidencePlan must each contain 1 to 7 concrete, observable strings.",
|
|
80
|
-
"The scope boundary must state material exclusions when possible.",
|
|
81
|
-
input.uiLocale === "zh" ? "Return every string value in Simplified Chinese." : "Return every string value in English.",
|
|
82
|
-
"",
|
|
83
|
-
`Goal title: ${input.title.trim()}`,
|
|
84
|
-
`Context: ${input.context?.trim() || "(none)"}`,
|
|
85
|
-
`Existing acceptance criteria: ${stringList(input.criteria).join(" | ") || "(none)"}`
|
|
86
|
-
].join("\n"),
|
|
87
|
-
timestamp: Date.now()
|
|
88
|
-
}] }, {
|
|
89
|
-
apiKey,
|
|
90
|
-
maxTokens: 1200,
|
|
91
|
-
temperature: 0,
|
|
92
|
-
signal: input.signal
|
|
93
|
-
})).content));
|
|
94
|
-
if (!parsed) return {
|
|
95
|
-
contract: fallback,
|
|
96
|
-
generated: false,
|
|
97
|
-
warning: input.uiLocale === "zh" ? "模型未返回有效的目标契约,已生成可编辑的本地草案。" : "The model did not return a valid goal contract."
|
|
98
|
-
};
|
|
99
|
-
return {
|
|
100
|
-
contract: normalizedModelContract(parsed, fallback),
|
|
101
|
-
generated: true
|
|
102
|
-
};
|
|
103
|
-
} catch {
|
|
104
|
-
return {
|
|
105
|
-
contract: fallback,
|
|
106
|
-
generated: false,
|
|
107
|
-
warning: input.uiLocale === "zh" ? "目标定义暂不可用,已生成可编辑的本地草案。" : "Goal drafting is unavailable; a local draft was prepared instead."
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
//#endregion
|
|
112
|
-
export { draftGoalContract };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { GoalEvidence, GoalEvidenceRequirement } from './types.js';
|
|
2
|
-
export type GoalEvidenceReviewVerdict = 'approved' | 'needs_more_evidence' | 'rejected';
|
|
3
|
-
export type GoalEvidenceReviewResult = {
|
|
4
|
-
verdict: GoalEvidenceReviewVerdict;
|
|
5
|
-
reason: string;
|
|
6
|
-
confidence?: number;
|
|
7
|
-
generated: boolean;
|
|
8
|
-
warning?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function reviewGoalEvidenceRequirement(input: {
|
|
11
|
-
requirement: GoalEvidenceRequirement;
|
|
12
|
-
evidence: GoalEvidence[];
|
|
13
|
-
modelRef?: string;
|
|
14
|
-
signal?: AbortSignal;
|
|
15
|
-
}): Promise<GoalEvidenceReviewResult>;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
|
|
2
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
3
|
-
//#region src/goals/goal-evidence-review.ts
|
|
4
|
-
init_providers();
|
|
5
|
-
function extractText(content) {
|
|
6
|
-
if (!Array.isArray(content)) return "";
|
|
7
|
-
return content.filter((block) => Boolean(block && typeof block === "object")).filter((block) => block.type === "text" && typeof block.text === "string").map((block) => block.text).join("").trim();
|
|
8
|
-
}
|
|
9
|
-
function parseJson(raw) {
|
|
10
|
-
const text = raw.trim().replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/, "");
|
|
11
|
-
try {
|
|
12
|
-
return JSON.parse(text);
|
|
13
|
-
} catch {
|
|
14
|
-
const start = text.indexOf("{");
|
|
15
|
-
const end = text.lastIndexOf("}");
|
|
16
|
-
if (start < 0 || end <= start) return null;
|
|
17
|
-
try {
|
|
18
|
-
return JSON.parse(text.slice(start, end + 1));
|
|
19
|
-
} catch {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function localReview(requirement, evidence) {
|
|
25
|
-
if (!evidence.length) return {
|
|
26
|
-
verdict: "needs_more_evidence",
|
|
27
|
-
reason: `No evidence is linked to the requirement: ${requirement.text}`,
|
|
28
|
-
generated: false
|
|
29
|
-
};
|
|
30
|
-
return {
|
|
31
|
-
verdict: "needs_more_evidence",
|
|
32
|
-
reason: `${evidence.length} evidence item(s) are linked. Configure a goal judge model to assess whether they prove this requirement, then approve the result manually.`,
|
|
33
|
-
generated: false,
|
|
34
|
-
warning: "No model is configured for evidence review."
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
async function reviewGoalEvidenceRequirement(input) {
|
|
38
|
-
const fallback = localReview(input.requirement, input.evidence);
|
|
39
|
-
if (!input.modelRef?.trim() || input.evidence.length === 0) return fallback;
|
|
40
|
-
try {
|
|
41
|
-
const model = resolveModel(input.modelRef.trim());
|
|
42
|
-
const apiKey = await getApiKey(model.provider);
|
|
43
|
-
const parsed = parseJson(extractText((await completeWithResolvedCredentials(model, { messages: [{
|
|
44
|
-
role: "user",
|
|
45
|
-
content: [
|
|
46
|
-
"Assess whether the linked evidence proves the single goal requirement.",
|
|
47
|
-
"Be conservative: never infer facts that are absent from the supplied evidence.",
|
|
48
|
-
"Return only JSON with verdict (approved, needs_more_evidence, or rejected), reason, and confidence (0 to 1).",
|
|
49
|
-
"An approved result is advisory and still needs a human approval before goal completion.",
|
|
50
|
-
"",
|
|
51
|
-
`Requirement: ${input.requirement.text}`,
|
|
52
|
-
"Linked evidence:",
|
|
53
|
-
...input.evidence.map((item, index) => [
|
|
54
|
-
`${index + 1}. kind=${item.kind}; title=${item.title}`,
|
|
55
|
-
item.summary ? `summary=${item.summary}` : "",
|
|
56
|
-
item.uri ? `uri=${item.uri}` : ""
|
|
57
|
-
].filter(Boolean).join("; "))
|
|
58
|
-
].join("\n"),
|
|
59
|
-
timestamp: Date.now()
|
|
60
|
-
}] }, {
|
|
61
|
-
apiKey,
|
|
62
|
-
maxTokens: 700,
|
|
63
|
-
temperature: 0,
|
|
64
|
-
signal: input.signal
|
|
65
|
-
})).content));
|
|
66
|
-
if (!parsed) return {
|
|
67
|
-
...fallback,
|
|
68
|
-
warning: "The model did not return a valid evidence review."
|
|
69
|
-
};
|
|
70
|
-
const verdict = parsed.verdict;
|
|
71
|
-
if (verdict !== "approved" && verdict !== "needs_more_evidence" && verdict !== "rejected") return {
|
|
72
|
-
...fallback,
|
|
73
|
-
warning: "The model returned an unsupported evidence verdict."
|
|
74
|
-
};
|
|
75
|
-
return {
|
|
76
|
-
verdict,
|
|
77
|
-
reason: typeof parsed.reason === "string" && parsed.reason.trim() ? parsed.reason.trim() : "The model did not provide a review rationale.",
|
|
78
|
-
confidence: typeof parsed.confidence === "number" && Number.isFinite(parsed.confidence) ? Math.min(1, Math.max(0, parsed.confidence)) : void 0,
|
|
79
|
-
generated: true
|
|
80
|
-
};
|
|
81
|
-
} catch {
|
|
82
|
-
return {
|
|
83
|
-
...fallback,
|
|
84
|
-
warning: "Evidence review is unavailable; manual approval remains available."
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
export { reviewGoalEvidenceRequirement };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { type TaskFailureCode, type TaskFailurePhase, type TaskRecoveryAction, type TaskVerification } from '../../agent/outcomes/task-verifier.js';
|
|
2
|
-
export type TaskOutcomeStatus = 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
3
|
-
export type TaskFeedbackOutcome = 'helpful' | 'not_helpful';
|
|
4
|
-
export interface TaskContract {
|
|
5
|
-
objective: string;
|
|
6
|
-
deliverables: string[];
|
|
7
|
-
acceptanceCriteria: string[];
|
|
8
|
-
constraints: string[];
|
|
9
|
-
approvalRequired: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface TaskEvidence {
|
|
12
|
-
kind: 'artifact' | 'test' | 'state' | 'source';
|
|
13
|
-
title: string;
|
|
14
|
-
summary: string;
|
|
15
|
-
uri?: string;
|
|
16
|
-
verifies?: string[];
|
|
17
|
-
}
|
|
18
|
-
export interface TaskOutcome {
|
|
19
|
-
runId: string;
|
|
20
|
-
sessionKey: string;
|
|
21
|
-
channel: string;
|
|
22
|
-
objective: string;
|
|
23
|
-
status: TaskOutcomeStatus;
|
|
24
|
-
summary?: string;
|
|
25
|
-
contract?: TaskContract;
|
|
26
|
-
evidence: TaskEvidence[];
|
|
27
|
-
verification: TaskVerification;
|
|
28
|
-
failure?: {
|
|
29
|
-
code: TaskFailureCode;
|
|
30
|
-
phase: TaskFailurePhase;
|
|
31
|
-
recoveryAction: TaskRecoveryAction;
|
|
32
|
-
};
|
|
33
|
-
feedback?: {
|
|
34
|
-
outcome: TaskFeedbackOutcome;
|
|
35
|
-
reason?: string;
|
|
36
|
-
needsCorrection?: boolean;
|
|
37
|
-
supportFit?: boolean;
|
|
38
|
-
};
|
|
39
|
-
startedAt: number;
|
|
40
|
-
completedAt?: number;
|
|
41
|
-
updatedAt: number;
|
|
42
|
-
}
|
|
43
|
-
export interface TaskOutcomeMetrics {
|
|
44
|
-
total: number;
|
|
45
|
-
completed: number;
|
|
46
|
-
succeeded: number;
|
|
47
|
-
verified: number;
|
|
48
|
-
helpful: number;
|
|
49
|
-
notHelpful: number;
|
|
50
|
-
completionRate: number;
|
|
51
|
-
successRate: number;
|
|
52
|
-
verificationRate: number;
|
|
53
|
-
helpfulRate: number;
|
|
54
|
-
}
|
|
55
|
-
export declare function startTaskOutcome(input: {
|
|
56
|
-
runId: string;
|
|
57
|
-
sessionKey: string;
|
|
58
|
-
channel: string;
|
|
59
|
-
objective: string;
|
|
60
|
-
now?: number;
|
|
61
|
-
}): TaskOutcome;
|
|
62
|
-
export declare function completeTaskOutcome(input: {
|
|
63
|
-
runId: string;
|
|
64
|
-
status: Exclude<TaskOutcomeStatus, 'running'>;
|
|
65
|
-
summary: string;
|
|
66
|
-
now?: number;
|
|
67
|
-
}): TaskOutcome | undefined;
|
|
68
|
-
export declare function updateTaskOutcome(input: {
|
|
69
|
-
runId: string;
|
|
70
|
-
contract?: TaskContract;
|
|
71
|
-
evidence?: TaskEvidence[];
|
|
72
|
-
summary?: string;
|
|
73
|
-
now?: number;
|
|
74
|
-
}): TaskOutcome | undefined;
|
|
75
|
-
export declare function setTaskOutcomeFeedback(input: {
|
|
76
|
-
sessionKey: string;
|
|
77
|
-
assistantTimestamp: number;
|
|
78
|
-
outcome: TaskFeedbackOutcome;
|
|
79
|
-
reason?: string;
|
|
80
|
-
needsCorrection?: boolean;
|
|
81
|
-
supportFit?: boolean;
|
|
82
|
-
now?: number;
|
|
83
|
-
}): TaskOutcome | undefined;
|
|
84
|
-
export declare function getTaskOutcome(runId: string): TaskOutcome | undefined;
|
|
85
|
-
export declare function findTaskOutcomeForAssistant(sessionKey: string, assistantTimestamp: number): TaskOutcome | undefined;
|
|
86
|
-
export declare function listTaskOutcomes(input?: {
|
|
87
|
-
sessionKey?: string;
|
|
88
|
-
limit?: number;
|
|
89
|
-
}): TaskOutcome[];
|
|
90
|
-
export declare function summarizeTaskOutcomes(): TaskOutcomeMetrics;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { diagnoseTaskFailure, verifyTaskCompletion } from "../../agent/outcomes/task-verifier.js";
|
|
3
|
-
//#region src/storage/sqlite/task-outcome-repository.ts
|
|
4
|
-
function fromRow(row) {
|
|
5
|
-
const contract = row.contract_json ? JSON.parse(row.contract_json) : void 0;
|
|
6
|
-
const evidence = JSON.parse(row.evidence_json);
|
|
7
|
-
const feedback = row.feedback_outcome ? {
|
|
8
|
-
outcome: row.feedback_outcome,
|
|
9
|
-
...row.feedback_reason ? { reason: row.feedback_reason } : {},
|
|
10
|
-
...row.needs_correction === null ? {} : { needsCorrection: row.needs_correction === 1 },
|
|
11
|
-
...row.support_fit === null ? {} : { supportFit: row.support_fit === 1 }
|
|
12
|
-
} : void 0;
|
|
13
|
-
return {
|
|
14
|
-
runId: row.run_id,
|
|
15
|
-
sessionKey: row.session_key,
|
|
16
|
-
channel: row.channel,
|
|
17
|
-
objective: row.objective,
|
|
18
|
-
status: row.status,
|
|
19
|
-
...row.summary ? { summary: row.summary } : {},
|
|
20
|
-
...contract ? { contract } : {},
|
|
21
|
-
evidence,
|
|
22
|
-
verification: {
|
|
23
|
-
...JSON.parse(row.verification_json),
|
|
24
|
-
status: row.verification_status
|
|
25
|
-
},
|
|
26
|
-
...row.failure_code && row.failure_phase && row.recovery_action ? { failure: {
|
|
27
|
-
code: row.failure_code,
|
|
28
|
-
phase: row.failure_phase,
|
|
29
|
-
recoveryAction: row.recovery_action
|
|
30
|
-
} } : {},
|
|
31
|
-
...feedback ? { feedback } : {},
|
|
32
|
-
startedAt: row.started_at,
|
|
33
|
-
...row.completed_at === null ? {} : { completedAt: row.completed_at },
|
|
34
|
-
updatedAt: row.updated_at
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const SELECT_COLUMNS = `run_id, session_key, channel, objective, status, summary,
|
|
38
|
-
contract_json, evidence_json, feedback_outcome, feedback_reason,
|
|
39
|
-
needs_correction, support_fit, started_at, completed_at, updated_at,
|
|
40
|
-
verification_status, verification_json, failure_code, failure_phase, recovery_action`;
|
|
41
|
-
function startTaskOutcome(input) {
|
|
42
|
-
const now = input.now ?? Date.now();
|
|
43
|
-
runSqliteWriteTransaction((db) => {
|
|
44
|
-
db.prepare(`INSERT INTO task_outcomes (
|
|
45
|
-
run_id, session_key, channel, objective, status, started_at, updated_at
|
|
46
|
-
) VALUES (?, ?, ?, ?, 'running', ?, ?)`).run(input.runId, input.sessionKey, input.channel, input.objective, now, now);
|
|
47
|
-
});
|
|
48
|
-
return getTaskOutcome(input.runId);
|
|
49
|
-
}
|
|
50
|
-
function completeTaskOutcome(input) {
|
|
51
|
-
const now = input.now ?? Date.now();
|
|
52
|
-
const current = getTaskOutcome(input.runId);
|
|
53
|
-
if (!current) return void 0;
|
|
54
|
-
const verification = verifyTaskCompletion({
|
|
55
|
-
status: input.status,
|
|
56
|
-
acceptanceCriteria: current.contract?.acceptanceCriteria ?? [],
|
|
57
|
-
evidence: current.evidence
|
|
58
|
-
});
|
|
59
|
-
const failure = input.status === "succeeded" ? void 0 : diagnoseTaskFailure({
|
|
60
|
-
status: input.status,
|
|
61
|
-
summary: input.summary
|
|
62
|
-
});
|
|
63
|
-
runSqliteWriteTransaction((db) => {
|
|
64
|
-
db.prepare(`UPDATE task_outcomes
|
|
65
|
-
SET status = ?, summary = ?, completed_at = ?, updated_at = ?,
|
|
66
|
-
verification_status = ?, verification_json = ?, failure_code = ?,
|
|
67
|
-
failure_phase = ?, recovery_action = ?
|
|
68
|
-
WHERE run_id = ?`).run(input.status, input.summary, now, now, verification.status, JSON.stringify({ checks: verification.checks }), failure?.code ?? null, failure?.phase ?? null, failure?.recoveryAction ?? null, input.runId);
|
|
69
|
-
});
|
|
70
|
-
return getTaskOutcome(input.runId);
|
|
71
|
-
}
|
|
72
|
-
function updateTaskOutcome(input) {
|
|
73
|
-
const current = getTaskOutcome(input.runId);
|
|
74
|
-
if (!current) return void 0;
|
|
75
|
-
const now = input.now ?? Date.now();
|
|
76
|
-
const contract = input.contract === void 0 ? current.contract : input.contract;
|
|
77
|
-
const evidence = input.evidence === void 0 ? current.evidence : input.evidence;
|
|
78
|
-
const summary = input.summary === void 0 ? current.summary : input.summary;
|
|
79
|
-
runSqliteWriteTransaction((db) => {
|
|
80
|
-
db.prepare(`UPDATE task_outcomes
|
|
81
|
-
SET contract_json = ?, evidence_json = ?, summary = ?, updated_at = ?
|
|
82
|
-
WHERE run_id = ?`).run(contract ? JSON.stringify(contract) : null, JSON.stringify(evidence), summary ?? null, now, input.runId);
|
|
83
|
-
});
|
|
84
|
-
return getTaskOutcome(input.runId);
|
|
85
|
-
}
|
|
86
|
-
function setTaskOutcomeFeedback(input) {
|
|
87
|
-
const matched = findTaskOutcomeForAssistant(input.sessionKey, input.assistantTimestamp);
|
|
88
|
-
if (!matched) return void 0;
|
|
89
|
-
const now = input.now ?? Date.now();
|
|
90
|
-
runSqliteWriteTransaction((db) => {
|
|
91
|
-
db.prepare(`UPDATE task_outcomes
|
|
92
|
-
SET feedback_outcome = ?, feedback_reason = ?, needs_correction = ?, support_fit = ?, updated_at = ?
|
|
93
|
-
WHERE run_id = ?`).run(input.outcome, input.reason ?? null, input.needsCorrection === void 0 ? null : Number(input.needsCorrection), input.supportFit === void 0 ? null : Number(input.supportFit), now, matched.runId);
|
|
94
|
-
});
|
|
95
|
-
return getTaskOutcome(matched.runId);
|
|
96
|
-
}
|
|
97
|
-
function getTaskOutcome(runId) {
|
|
98
|
-
const row = getSqliteDatabase().prepare(`SELECT ${SELECT_COLUMNS} FROM task_outcomes WHERE run_id = ?`).get(runId);
|
|
99
|
-
return row ? fromRow(row) : void 0;
|
|
100
|
-
}
|
|
101
|
-
function findTaskOutcomeForAssistant(sessionKey, assistantTimestamp) {
|
|
102
|
-
const row = getSqliteDatabase().prepare(`SELECT ${SELECT_COLUMNS}
|
|
103
|
-
FROM task_outcomes
|
|
104
|
-
WHERE session_key = ?
|
|
105
|
-
AND started_at <= ?
|
|
106
|
-
ORDER BY started_at DESC
|
|
107
|
-
LIMIT 1`).get(sessionKey, assistantTimestamp);
|
|
108
|
-
return row ? fromRow(row) : void 0;
|
|
109
|
-
}
|
|
110
|
-
function listTaskOutcomes(input = {}) {
|
|
111
|
-
const limit = Math.max(1, Math.min(100, Math.floor(input.limit ?? 50)));
|
|
112
|
-
return (input.sessionKey ? getSqliteDatabase().prepare(`SELECT ${SELECT_COLUMNS} FROM task_outcomes WHERE session_key = ? ORDER BY started_at DESC LIMIT ?`).all(input.sessionKey, limit) : getSqliteDatabase().prepare(`SELECT ${SELECT_COLUMNS} FROM task_outcomes ORDER BY started_at DESC LIMIT ?`).all(limit)).map((row) => fromRow(row));
|
|
113
|
-
}
|
|
114
|
-
function summarizeTaskOutcomes() {
|
|
115
|
-
const row = getSqliteDatabase().prepare(`SELECT
|
|
116
|
-
COUNT(*) AS total,
|
|
117
|
-
SUM(CASE WHEN status != 'running' THEN 1 ELSE 0 END) AS completed,
|
|
118
|
-
SUM(CASE WHEN status = 'succeeded' THEN 1 ELSE 0 END) AS succeeded,
|
|
119
|
-
SUM(CASE WHEN verification_status = 'passed' THEN 1 ELSE 0 END) AS verified,
|
|
120
|
-
SUM(CASE WHEN feedback_outcome = 'helpful' THEN 1 ELSE 0 END) AS helpful,
|
|
121
|
-
SUM(CASE WHEN feedback_outcome = 'not_helpful' THEN 1 ELSE 0 END) AS not_helpful
|
|
122
|
-
FROM task_outcomes`).get();
|
|
123
|
-
const rated = row.helpful + row.not_helpful;
|
|
124
|
-
return {
|
|
125
|
-
total: row.total,
|
|
126
|
-
completed: row.completed,
|
|
127
|
-
succeeded: row.succeeded,
|
|
128
|
-
verified: row.verified,
|
|
129
|
-
helpful: row.helpful,
|
|
130
|
-
notHelpful: row.not_helpful,
|
|
131
|
-
completionRate: row.total ? row.completed / row.total : 0,
|
|
132
|
-
successRate: row.completed ? row.succeeded / row.completed : 0,
|
|
133
|
-
verificationRate: row.completed ? row.verified / row.completed : 0,
|
|
134
|
-
helpfulRate: rated ? row.helpful / rated : 0
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
export { completeTaskOutcome, findTaskOutcomeForAssistant, getTaskOutcome, listTaskOutcomes, setTaskOutcomeFeedback, startTaskOutcome, summarizeTaskOutcomes, updateTaskOutcome };
|