@xopcai/xopc 0.0.460 → 0.0.463
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/_locales/en/messages.json +1 -0
- package/dist/browser-ext/_locales/zh_CN/messages.json +1 -0
- package/dist/browser-ext/dist/assets/{auth-CQmxIyWw.js → auth-YPMDpWOW.js} +32 -1
- package/dist/browser-ext/dist/assets/{pcm-capture-worklet-CGN9Mlhg.js → pcm-capture-worklet-Df5TcFw4.js} +4 -2
- package/dist/browser-ext/dist/background.js +24 -19
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +10 -9
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-C_rlXuEe.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CGUdvmIT.js → agents-DC0lHtl5.js} +3 -3
- package/dist/gateway/static/root/assets/{apps-page-M2XD1Pzu.js → apps-page-D1qzENN_.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-CiJmJ7_h.js → automation-task-card-CJbIHRxN.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CVjgENMO.js → automations-page-HYFnPiNG.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CGPWyL0P.js → automations-workspace-JCQ1IXFk.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-CmnkluMF.js → block-editor-DrZyRQQ0.js} +5 -5
- package/dist/gateway/static/root/assets/{capabilities-DDqDvCBs.js → capabilities-Dr-vvMez.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-hSb-qEgL.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-kPv2dOzf.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CvF8VRTv.js → capabilities-settings-panel-B08mjrGB.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-BDVQ6Z7A.js → channels-B--IHNs4.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-stPJEZ90.js → chat-chart-block-ClCZyIi0.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-CalELOKj.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B4uA_W6R.js → chat-terminal-dock-eneTvxV3.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DyzDVVfz.js → connectors-page-B9mpz_Rt.js} +1 -1
- package/dist/gateway/static/root/assets/constants-Bg1wM2nv.js +1 -0
- package/dist/gateway/static/root/assets/diagnostics-Bo0Z42P_.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BPwRrP3L.js → extension-debug-page-Bn_5xu_M.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DIH4TcdH.js → extension-iframe-host-Vs6USa0c.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-C9JDpo_7.js → extension-message-router-GIekDj_w.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CLDoL5N8.js → extension-page-C_3bIjSB.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BPIoHw4r.js → extension-provider-D-LolObs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BO_UKeG8.js → extension-settings-page-BV51dk16.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-DefKShSW.js +8 -0
- package/dist/gateway/static/root/assets/index-CChzK_5b.css +1 -0
- package/dist/gateway/static/root/assets/index-DUo6H0PC.js +11 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-D8oqDDAn.js → local-app-workbench-page-CfnixDO3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-BlxIaCCQ.js → markdown-view-CNJaAdNN.js} +39 -39
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-DCIEL5bA.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DsXb1qjW.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-D6mvMSKr.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CdXA-g9r.js → notes-api-BOIM9Q_D.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-BTpiOw67.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Dibmspef.js → page-context-capture-button-B_Vdo2Ai.js} +1 -1
- package/dist/gateway/static/root/assets/pcm-capture-worklet-CpXsv44v.js +1 -0
- package/dist/gateway/static/root/assets/{personal-page-BwfyW7Hx.js → personal-page-I3IGVSJh.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-CQhZjoK6.js → personal-profile-settings-C4CxmQLQ.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-peD05ktj.js → personal-settings-panel-CnxI2TL0.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-nSDw8sfo.js → plugin-details-dialog-F08k_k2u.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-D51I7Lg3.js → product-automation-feedback-CGso8wGv.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-WkF2j_c-.js → product-preview-content-Dgtb4LF7.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-modal-C35EWUps.js +2 -0
- package/dist/gateway/static/root/assets/project-detail-page-Dy46uSEt.js +7 -0
- package/dist/gateway/static/root/assets/recording-upload-CFX7CANT.js +1 -0
- package/dist/gateway/static/root/assets/route-preload-ChTaYgpA.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-KH1VaEdC.js +2 -0
- package/dist/gateway/static/root/assets/{service-recommendation-list-DDlMyPvC.js → service-recommendation-list-BmRtbJz2.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-63NaXb1s.js +25 -0
- package/dist/gateway/static/root/assets/{settings-page-BHImcF1q.js → settings-page-C39lKVRv.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-fV5USZb1.js → share-preview-page-Cqy-7-rd.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-sl40lqND.js → shares-settings-BDr50uTV.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-FTd0Z7Ey.js → skills-page-DReUQ4Ug.js} +1 -1
- package/dist/gateway/static/root/assets/star-CnYNmpLd.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-D1dNWTnP.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-CSJeB9AH.js → task-result-evidence-CW_tN93T.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-CO7XLI4x.js → use-composer-attachments-Xn6eUus2.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BXXeXnT0.js → use-file-preview-expanded-D0IBFhM9.js} +1 -1
- package/dist/gateway/static/root/assets/use-realtime-voice-B5IsKrRW.js +1 -0
- package/dist/gateway/static/root/assets/{use-workspace-tree-D27u-eoX.js → use-workspace-tree-7X2ydgS8.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-BiqJ0tlf.js → voice-settings-57pwZeKD.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-UvWbDUXi.js → work-discovery-overlay-BJ15p4rH.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BM1HsYz6.js → work-discovery-page-8XciWNs5.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-Dd_UDfeo.js +2 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-NffP-UXC.js → workspace-file-preview-dialog-Clj9hMj5.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-preview-store-Do31QQH5.js → workspace-preview-store-imhtuEIP.js} +1 -1
- package/dist/gateway/static/root/index.html +30 -29
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/follow-ups.js +97 -0
- package/dist/packages/gateway-contract/src/home.js +1 -0
- package/dist/packages/gateway-contract/src/index.js +4 -0
- package/dist/packages/gateway-contract/src/observation-starters.js +95 -0
- package/dist/packages/gateway-contract/src/observation.js +7 -0
- package/dist/packages/gateway-contract/src/task-research-result.js +3 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +1 -0
- package/dist/src/agent/background-review/prompts.js +7 -1
- package/dist/src/agent/background-review/run-background-review.js +85 -7
- package/dist/src/agent/coding/run-verification.d.ts +14 -7
- package/dist/src/agent/coding/run-verification.js +28 -6
- package/dist/src/agent/context/coordinator.js +1 -1
- package/dist/src/agent/context/deep-recall.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +4 -2
- package/dist/src/agent/embedded/run-for-session.d.ts +2 -0
- package/dist/src/agent/embedded/run-for-session.js +9 -0
- package/dist/src/agent/embedded/run-turn.js +63 -14
- package/dist/src/agent/embedded/session-runner.js +2 -2
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/external-tools/gateway-tools.js +8 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
- package/dist/src/agent/mcp/connection-setup.js +46 -42
- package/dist/src/agent/mcp/conversation-setup.js +13 -8
- package/dist/src/agent/mcp/discovery.d.ts +22 -1
- package/dist/src/agent/mcp/discovery.js +19 -3
- package/dist/src/agent/mcp/managed-discovery.d.ts +8 -0
- package/dist/src/agent/mcp/managed-discovery.js +77 -0
- package/dist/src/agent/mcp/tool-catalog.js +1 -1
- package/dist/src/agent/prompt/conversational-configuration-guide.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +17 -2
- package/dist/src/agent/service/process-direct-streaming.d.ts +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +1 -0
- package/dist/src/agent/service.d.ts +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +6 -2
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +10 -7
- package/dist/src/agent/tasks/task-judge-service.js +1 -0
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +3 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.js +12 -4
- package/dist/src/agent/tools/factory.d.ts +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +36 -4
- package/dist/src/agent/tools/personal-task-tool.d.ts +7 -1
- package/dist/src/agent/tools/personal-task-tool.js +68 -3
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.d.ts +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +54 -3
- package/dist/src/agent/tools/task-result-tool.js +31 -0
- package/dist/src/agent/tools/xopc-use-tool.js +50 -19
- package/dist/src/automations/capabilities/write.d.ts +2 -2
- package/dist/src/automations/domain/validation.d.ts +4 -4
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/browser/drivers/browser-driver.d.ts +1 -0
- package/dist/src/browser/drivers/create-driver.js +2 -11
- package/dist/src/browser/drivers/playwright-driver.d.ts +5 -2
- package/dist/src/browser/drivers/playwright-driver.js +83 -38
- package/dist/src/browser/runtime/browser-runtime.d.ts +5 -0
- package/dist/src/browser/runtime/browser-runtime.js +71 -9
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +2 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +4 -4
- package/dist/src/computer/errors.d.ts +4 -4
- package/dist/src/computer/evaluation.d.ts +3 -3
- package/dist/src/computer/flows.d.ts +1 -1
- package/dist/src/computer/runtime.d.ts +3 -3
- package/dist/src/config/schema.d.ts +6 -2
- package/dist/src/config/schema.js +3 -0
- package/dist/src/connectors/connected-source-understanding.js +11 -3
- package/dist/src/connectors/connection-recovery-service.js +38 -5
- package/dist/src/connectors/excluded-connectors.d.ts +1 -0
- package/dist/src/connectors/excluded-connectors.js +5 -1
- package/dist/src/connectors/learning-coordinator.js +45 -11
- package/dist/src/connectors/plugin-connection.d.ts +10 -0
- package/dist/src/connectors/plugin-connection.js +105 -0
- package/dist/src/discussions/recording.js +13 -6
- package/dist/src/endpoint-tools/device-host.d.ts +2 -2
- package/dist/src/extensions/agent-plugins/setup.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +4 -0
- package/dist/src/gateway/hono/middleware/auth.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +2 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/desktop-host.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +51 -0
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +3 -3
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +15 -1
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/agent-runner.d.ts +2 -8
- package/dist/src/gateway/service/agent-runner.js +2 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +5 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +13 -8
- package/dist/src/gateway/service/run-gateway-agent.js +6 -3
- package/dist/src/gateway/service/session-input-coordinator.d.ts +4 -0
- package/dist/src/gateway/service/session-input-coordinator.js +6 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +19 -12
- package/dist/src/home-intelligence/follow-ups.d.ts +36 -0
- package/dist/src/home-intelligence/follow-ups.js +496 -0
- package/dist/src/home-intelligence/host.d.ts +80 -4
- package/dist/src/home-intelligence/host.js +124 -4
- package/dist/src/home-intelligence/observation-starters.d.ts +3 -0
- package/dist/src/home-intelligence/observation-starters.js +27 -0
- package/dist/src/home-intelligence/observation.d.ts +1 -1
- package/dist/src/home-intelligence/observation.js +16 -4
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +2 -2
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/local-apps/automation-proposals.d.ts +4 -4
- package/dist/src/local-apps/capabilities/projections.d.ts +38 -38
- package/dist/src/memory-learning/choice-observations.d.ts +9 -0
- package/dist/src/memory-learning/choice-observations.js +155 -0
- package/dist/src/memory-learning/evidence-repair.d.ts +12 -0
- package/dist/src/memory-learning/evidence-repair.js +31 -0
- package/dist/src/memory-learning/repository.d.ts +1 -0
- package/dist/src/memory-learning/repository.js +43 -5
- package/dist/src/memory-learning/source-learning.js +52 -7
- package/dist/src/memory-learning/task-receipts.js +19 -10
- package/dist/src/memory-learning/transcript-source.js +7 -0
- package/dist/src/memory-learning/work-candidate.d.ts +14 -0
- package/dist/src/memory-learning/work-candidate.js +17 -2
- package/dist/src/memory-learning/work-capture.d.ts +1 -0
- package/dist/src/memory-learning/work-capture.js +28 -10
- package/dist/src/memory-learning/work-review.d.ts +46 -0
- package/dist/src/memory-learning/work-review.js +209 -0
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notifications/service.js +2 -2
- package/dist/src/personal-agent/communication.d.ts +1 -1
- package/dist/src/personal-agent/communication.js +1 -1
- package/dist/src/personal-agent/default-style.d.ts +1 -1
- package/dist/src/personal-agent/default-style.js +1 -1
- package/dist/src/personal-agent/proactivity/repository.d.ts +1 -1
- package/dist/src/personal-agent/prompts.js +4 -4
- package/dist/src/personal-agent/reply-composer.d.ts +1 -1
- package/dist/src/personal-agent/reply-composer.js +52 -34
- package/dist/src/personal-agent/reply-style.d.ts +2 -2
- package/dist/src/personal-agent/reply-style.js +3 -2
- package/dist/src/personal-agent/request-repository.d.ts +3 -0
- package/dist/src/personal-agent/request-service.d.ts +2 -0
- package/dist/src/personal-agent/request-service.js +8 -2
- package/dist/src/phone/contracts.d.ts +1 -1
- package/dist/src/phone/stream-gateway.js +1 -1
- package/dist/src/projects/capabilities/write.js +1 -1
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +22 -0
- package/dist/src/storage/sqlite/upgrades/274_home_followups.sql +21 -0
- package/dist/src/tasks/capabilities/management.d.ts +3 -3
- package/dist/src/tasks/capabilities/relations.d.ts +3 -3
- package/dist/src/tasks/capabilities/write.d.ts +4 -4
- package/dist/src/tasks/capabilities/write.js +2 -0
- package/dist/src/tasks/home-query-service.js +4 -2
- package/dist/src/tasks/task-allocation-service.js +10 -2
- package/dist/src/tasks/task-application-service.d.ts +4 -0
- package/dist/src/tasks/task-application-service.js +6 -1
- package/dist/src/tasks/task-context-assembler.js +7 -2
- package/dist/src/tasks/task-contract-planner.js +3 -3
- package/dist/src/tasks/task-conversation-summary.d.ts +64 -0
- package/dist/src/tasks/task-conversation-summary.js +105 -0
- package/dist/src/tasks/task-delay-notice.d.ts +4 -0
- package/dist/src/tasks/task-delay-notice.js +113 -0
- package/dist/src/tasks/task-deletion-service.js +6 -1
- package/dist/src/tasks/task-handoff.d.ts +21 -0
- package/dist/src/tasks/task-handoff.js +77 -1
- package/dist/src/tasks/task-json-acceptance.d.ts +22 -0
- package/dist/src/tasks/task-json-acceptance.js +96 -0
- package/dist/src/tasks/task-main-update-decision-service.js +17 -21
- package/dist/src/tasks/task-main-update-delivery.js +34 -7
- package/dist/src/tasks/task-notification-preference.d.ts +16 -0
- package/dist/src/tasks/task-notification-preference.js +42 -0
- package/dist/src/tasks/task-origin-repository.d.ts +1 -0
- package/dist/src/tasks/task-origin-repository.js +3 -0
- package/dist/src/tasks/task-read-model-projector.js +1 -1
- package/dist/src/tasks/task-repository.js +1 -0
- package/dist/src/tasks/task-research-repair.d.ts +19 -1
- package/dist/src/tasks/task-research-repair.js +14 -4
- package/dist/src/tasks/task-research-result.d.ts +12 -0
- package/dist/src/tasks/task-research-result.js +5 -0
- package/dist/src/tasks/task-result-delivery-repository.d.ts +4 -1
- package/dist/src/tasks/task-result-delivery-repository.js +8 -5
- package/dist/src/tasks/task-result-delivery-service.js +9 -1
- package/dist/src/tasks/task-run-coordinator.js +45 -10
- package/dist/src/tui/tui-management.js +2 -2
- package/dist/src/usage/cloud-wire.d.ts +1 -0
- package/dist/src/user-context/config.d.ts +8 -0
- package/dist/src/user-context/config.js +10 -0
- package/dist/src/user-model/capture/evidence-policy.d.ts +2 -0
- package/dist/src/user-model/capture/evidence-policy.js +8 -1
- package/dist/src/user-model/capture/executor.js +16 -4
- package/dist/src/user-model/capture/semantic.d.ts +4 -0
- package/dist/src/user-model/capture/semantic.js +3 -0
- package/dist/src/user-model/index.js +1 -1
- package/dist/src/user-model/observation-repository.d.ts +6 -0
- package/dist/src/user-model/observation-repository.js +12 -0
- package/dist/src/user-model/repository.js +10 -1
- package/dist/src/voice/realtime/agentEngine.js +29 -7
- package/dist/src/voice/realtime/pcmPlaybackEcho.d.ts +10 -0
- package/dist/src/voice/realtime/pcmPlaybackEcho.js +56 -0
- package/dist/src/voice/realtime/playback-echo.d.ts +3 -0
- package/dist/src/voice/realtime/playback-echo.js +35 -5
- package/dist/src/voice/realtime/runtime.js +6 -1
- package/dist/src/voice/realtime/turnPolicy.js +1 -1
- package/package.json +14 -8
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CikzCYAG.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-DB713nRi.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-D2hq4cgE.js +0 -2
- package/dist/gateway/static/root/assets/chat-page-BhPw56Vc.js +0 -71
- package/dist/gateway/static/root/assets/constants-DpkUgykJ.js +0 -1
- package/dist/gateway/static/root/assets/discussion-annotation-sync-fwPPMPv9.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BPPe4JXB.js +0 -7
- package/dist/gateway/static/root/assets/index-DjzrnmBA.js +0 -11
- package/dist/gateway/static/root/assets/index-YQxumvaS.css +0 -1
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-CsTSmjmX.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-BbHlfAju.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-CqK_uJ6Y.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-8w2Stfak.js +0 -8
- package/dist/gateway/static/root/assets/pcm-capture-worklet-uW_SEACy.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-DMHOKocl.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-CNFuzmRr.js +0 -7
- package/dist/gateway/static/root/assets/recording-upload-CyZSl2DJ.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-CuxNu-LB.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-CXs4PjW0.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-D2LaQymu.js +0 -25
- package/dist/gateway/static/root/assets/task-detail-page-_5TEldtl.js +0 -3
- package/dist/gateway/static/root/assets/use-realtime-voice-C7iWQuUv.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-LghfbP5g.js +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
1
2
|
import { parseResultReferenceId } from "../../../packages/gateway-contract/src/result-reference.js";
|
|
2
3
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
@@ -9,11 +10,12 @@ import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js
|
|
|
9
10
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
10
11
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
11
12
|
import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
12
|
-
import {
|
|
13
|
+
import { assertTaskHandoffExecutorAccess, getTaskHandoff, materializeTaskHandoffFile, readTaskConversationExcerpts, readTaskHandoffSource } from "../../tasks/task-handoff.js";
|
|
13
14
|
import { taskResearchEvidence } from "../../tasks/task-research-result.js";
|
|
14
15
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
15
16
|
import { Type } from "@sinclair/typebox";
|
|
16
17
|
//#region src/agent/tools/task-collaboration-tool.ts
|
|
18
|
+
init_transaction();
|
|
17
19
|
init_src();
|
|
18
20
|
init_request_repository();
|
|
19
21
|
init_session_repository();
|
|
@@ -22,6 +24,7 @@ init_task_run_repository();
|
|
|
22
24
|
const Schema = Type.Object({
|
|
23
25
|
command: Type.Union([Type.Literal("get"), Type.Literal("post")]),
|
|
24
26
|
section: Type.Optional(Type.Union([
|
|
27
|
+
Type.Literal("goal"),
|
|
25
28
|
Type.Literal("collaboration"),
|
|
26
29
|
Type.Literal("task"),
|
|
27
30
|
Type.Literal("brief"),
|
|
@@ -90,7 +93,7 @@ function createTaskCollaborationTool(deps) {
|
|
|
90
93
|
name: "task_collaboration",
|
|
91
94
|
label: "Task collaboration",
|
|
92
95
|
parameters: Schema,
|
|
93
|
-
description: "Coordinate the current Task with its originating conversation. get section brief reads the full task body in 4000-character pages (offset/nextOffset); section handoff lists the
|
|
96
|
+
description: "For a continuing goal, get section goal reads confirmed criteria, durable step receipts (offset/nextOffset), and user update previews (afterSequence/nextAfterSequence). Supply entryId to read a linked user update in full (offset/nextOffset). Coordinate the current Task with its originating conversation. get section brief reads the full task body in 4000-character pages (offset/nextOffset); section handoff lists the original request, selected conversation excerpts and versioned sources. Treat quoted conversation as task context. Read the CURRENT handoff first; source indices can change across work revisions. Only entries marked materializable support materialize=true, with an explicit sourceIndex. section source with materialize=true copies a selected pinned workspace file OR published result artifact into your Task input directory; use the returned executionInputRoot as cwd and readOnlyPath as input, never the owner workspace path. Result body text uses read; materialize requires an exact artifact source. The returned copies are read-only: write revised outputs elsewhere and publish those new files. It grants no wider root access. Otherwise section source reads one sourceIndex (query for result search, revision for pinned extracted text). section evidence lists real successful tool reads, or reads a toolCallId in 4000-character pages. Evidence excerpts must cite that original toolCallId. get with section task reads constraints and waits; default get reads complete ordered messages (afterSequence/limit) or one entryId. post progress for meaningful changes; post question then stop this turn until answered. Initial handoff and source/tool IDs require no ack. Before continuing, post ack only for a user/main_agent collaboration entry of kind answer or instruction, with causationId equal to that entry ID and explain how the result will incorporate it. Confirmation is receipt and intent, not completed verification. Reuse the same Task and executor. Account authorization stays in the main connection UI; answers and instructions cannot change the selected connector/account or permit writes. Preserve idempotencyKey on retries.",
|
|
94
97
|
mutatesWorkspace: true,
|
|
95
98
|
mutationScope: "external",
|
|
96
99
|
requiresExclusiveWorkspaceLock: false,
|
|
@@ -98,6 +101,13 @@ function createTaskCollaborationTool(deps) {
|
|
|
98
101
|
const conversationId = getEmbeddedExecutionSession() ?? deps.getCurrentConversationId?.();
|
|
99
102
|
const active = conversationId ? new TaskConversationRepository().resolveActiveExecutionSession(conversationId) : void 0;
|
|
100
103
|
if (!active || deps.getCurrentAgentId?.() && active.agentId !== deps.getCurrentAgentId()) throw new Error("No active Task execution");
|
|
104
|
+
if (getSqliteDatabase().prepare("SELECT 1 FROM home_followup_steps WHERE task_id=? UNION ALL SELECT 1 FROM home_followups WHERE root_task_id=? LIMIT 1").get(active.taskId, active.taskId) && (input.command !== "get" || ![
|
|
105
|
+
"goal",
|
|
106
|
+
"task",
|
|
107
|
+
"brief",
|
|
108
|
+
"evidence",
|
|
109
|
+
"collaboration"
|
|
110
|
+
].includes(input.section ?? "collaboration"))) throw new Error("Continuing goals allow read-only task evidence and brief access");
|
|
101
111
|
const request = personalRequestForExecution(conversationId);
|
|
102
112
|
if (!request && getSessionMetadata(conversationId)?.customData?.personalReadRequestId || request && [
|
|
103
113
|
"cancelled",
|
|
@@ -121,15 +131,56 @@ function createTaskCollaborationTool(deps) {
|
|
|
121
131
|
}],
|
|
122
132
|
details: {}
|
|
123
133
|
});
|
|
134
|
+
if (input.section === "goal") {
|
|
135
|
+
const goal = getSqliteDatabase().prepare(`SELECT g.* FROM home_followups g WHERE g.root_task_id=? OR EXISTS
|
|
136
|
+
(SELECT 1 FROM home_followup_steps s WHERE s.followup_id=g.id AND s.task_id=?)`).get(active.taskId, active.taskId);
|
|
137
|
+
if (!goal) throw new Error("No continuing goal is linked to this Task");
|
|
138
|
+
if (input.entryId) {
|
|
139
|
+
const entry = new TaskCollaborationRepository().get(input.entryId);
|
|
140
|
+
if (!entry || entry.taskId !== goal.root_task_id || entry.authorKind !== "user") throw new Error("Goal update is unavailable");
|
|
141
|
+
return reply(page(entry.body));
|
|
142
|
+
}
|
|
143
|
+
const updates = getSqliteDatabase().prepare(`SELECT entry_id AS id,sequence,body FROM task_collaboration_entries WHERE task_id=? AND author_kind='user' AND sequence>? ORDER BY sequence LIMIT 11`).all(goal.root_task_id, input.afterSequence ?? 0);
|
|
144
|
+
const steps = getSqliteDatabase().prepare(`SELECT s.sequence,s.task_id,s.action FROM home_followup_steps s WHERE s.followup_id=? AND s.sequence>? ORDER BY s.sequence LIMIT 11`).all(goal.id, input.offset ?? 0);
|
|
145
|
+
return reply({
|
|
146
|
+
goal: goal.goal,
|
|
147
|
+
criteria: JSON.parse(goal.criteria_json),
|
|
148
|
+
status: goal.status,
|
|
149
|
+
updates: updates.slice(0, 10).map((u) => ({
|
|
150
|
+
id: u.id,
|
|
151
|
+
sequence: u.sequence,
|
|
152
|
+
preview: u.body.slice(0, 200)
|
|
153
|
+
})),
|
|
154
|
+
...updates.length > 10 ? { nextAfterSequence: updates[9].sequence } : {},
|
|
155
|
+
steps: steps.slice(0, 10).map((s) => {
|
|
156
|
+
const run = new TaskRunRepository().getLatestRoot(s.task_id);
|
|
157
|
+
const receipt = run && new TaskRunRepository().getReceipt(run.id);
|
|
158
|
+
return {
|
|
159
|
+
number: s.sequence,
|
|
160
|
+
taskId: s.task_id,
|
|
161
|
+
action: s.action,
|
|
162
|
+
status: run?.status,
|
|
163
|
+
receipt: receipt ? {
|
|
164
|
+
summary: receipt.summary.slice(0, 1600),
|
|
165
|
+
verification: receipt.verification.status,
|
|
166
|
+
verdict: receipt.completionVerdict
|
|
167
|
+
} : void 0
|
|
168
|
+
};
|
|
169
|
+
}),
|
|
170
|
+
...steps.length > 10 ? { nextOffset: steps[9].sequence } : {},
|
|
171
|
+
note: "Historical receipts report prior work; they are not independent proof of current external state."
|
|
172
|
+
});
|
|
173
|
+
}
|
|
124
174
|
if (input.section === "brief") return reply(page(new TaskRepository().require(active.taskId).body ?? ""));
|
|
125
175
|
if (input.section === "handoff") {
|
|
126
176
|
const handoff = getTaskHandoff(active.taskId);
|
|
127
177
|
if (!handoff) return reply({ available: false });
|
|
128
|
-
|
|
178
|
+
const conversationExcerpts = readTaskConversationExcerpts(handoff, deps.getConfig?.());
|
|
129
179
|
return reply({
|
|
130
180
|
...handoff,
|
|
131
181
|
originalRequest: page(handoff.originalRequest ?? ""),
|
|
132
182
|
interpretation: void 0,
|
|
183
|
+
...handoff.conversationExcerpts ? { conversationExcerpts } : {},
|
|
133
184
|
sources: handoff.sources.map(({ text: _text, ...source }, sourceIndex) => ({
|
|
134
185
|
...source,
|
|
135
186
|
sourceIndex,
|
|
@@ -6,6 +6,37 @@ const id = Type.String({
|
|
|
6
6
|
maxLength: 120
|
|
7
7
|
});
|
|
8
8
|
const schema = Type.Object({
|
|
9
|
+
followUp: Type.Optional(Type.Union([
|
|
10
|
+
Type.Object({
|
|
11
|
+
state: Type.Literal("next_step"),
|
|
12
|
+
nextStep: Type.String({
|
|
13
|
+
minLength: 1,
|
|
14
|
+
maxLength: 1e3
|
|
15
|
+
}),
|
|
16
|
+
reason: Type.String({
|
|
17
|
+
minLength: 1,
|
|
18
|
+
maxLength: 1e3
|
|
19
|
+
})
|
|
20
|
+
}, { additionalProperties: false }),
|
|
21
|
+
Type.Object({
|
|
22
|
+
state: Type.Literal("waiting"),
|
|
23
|
+
waitingFor: Type.String({
|
|
24
|
+
minLength: 1,
|
|
25
|
+
maxLength: 1e3
|
|
26
|
+
}),
|
|
27
|
+
nextStep: Type.Optional(Type.String({
|
|
28
|
+
minLength: 1,
|
|
29
|
+
maxLength: 1e3
|
|
30
|
+
}))
|
|
31
|
+
}, { additionalProperties: false }),
|
|
32
|
+
Type.Object({
|
|
33
|
+
state: Type.Literal("review_goal"),
|
|
34
|
+
reason: Type.String({
|
|
35
|
+
minLength: 1,
|
|
36
|
+
maxLength: 1e3
|
|
37
|
+
})
|
|
38
|
+
}, { additionalProperties: false })
|
|
39
|
+
], { description: "For continuing-goal steps, propose the next bounded step, say exactly what input is missing, or request goal review. Never declare the parent goal complete." })),
|
|
9
40
|
finalText: Type.Optional(Type.String({
|
|
10
41
|
minLength: 1,
|
|
11
42
|
maxLength: 16e3,
|
|
@@ -12,6 +12,7 @@ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository
|
|
|
12
12
|
import "../../storage/sqlite/index.js";
|
|
13
13
|
import "../../activity/index.js";
|
|
14
14
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
15
16
|
import { hasUnlocalizedTaskText, resolveTaskLocale } from "../../tasks/task-language.js";
|
|
16
17
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
17
18
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
@@ -25,7 +26,7 @@ import { AutomationMcpSourceInput, prepareAutomationMcpSource } from "../../auto
|
|
|
25
26
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
26
27
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
27
28
|
import "../../projects/index.js";
|
|
28
|
-
import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
29
|
+
import { parseTaskConversationExcerpts, parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
29
30
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
30
31
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
31
32
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
@@ -34,6 +35,7 @@ import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
|
34
35
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
35
36
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
36
37
|
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
38
|
+
import { isTaskNotificationPreference, taskNotificationContext } from "../../tasks/task-notification-preference.js";
|
|
37
39
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
38
40
|
import "../../tasks/index.js";
|
|
39
41
|
import { randomUUID } from "node:crypto";
|
|
@@ -1488,6 +1490,20 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1488
1490
|
ok: false,
|
|
1489
1491
|
error: "Invalid selected task sourceRefs"
|
|
1490
1492
|
};
|
|
1493
|
+
if (args.conversationExcerpts !== void 0 && (createMode !== "allocate" || !originConversationId || !isPersonalConversation(originConversationId))) return {
|
|
1494
|
+
ok: false,
|
|
1495
|
+
error: "Selected conversation excerpts require a Personal Task submission"
|
|
1496
|
+
};
|
|
1497
|
+
const notificationPreference = args.notificationPreference;
|
|
1498
|
+
if (notificationPreference !== void 0 && (!isTaskNotificationPreference(notificationPreference) || createMode !== "allocate" || !originConversationId || !isPersonalConversation(originConversationId))) return {
|
|
1499
|
+
ok: false,
|
|
1500
|
+
error: "Notification preferences require a Personal Task submission"
|
|
1501
|
+
};
|
|
1502
|
+
const conversationExcerpts = parseTaskConversationExcerpts(originConversationId, args.conversationExcerpts, config);
|
|
1503
|
+
if (!conversationExcerpts) return {
|
|
1504
|
+
ok: false,
|
|
1505
|
+
error: "Use exact visible passages and entry IDs from this conversation for selected excerpts"
|
|
1506
|
+
};
|
|
1491
1507
|
const input = {
|
|
1492
1508
|
idempotencyKey: trimString(args.idempotencyKey) ?? randomUUID(),
|
|
1493
1509
|
title: trimString(args.title) ?? objective,
|
|
@@ -1504,24 +1520,39 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1504
1520
|
outputDestinations: []
|
|
1505
1521
|
},
|
|
1506
1522
|
dependencies: dependsOnTaskIds,
|
|
1507
|
-
context: [
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1523
|
+
context: [
|
|
1524
|
+
...args.includeConversationContext === false ? [] : conversationId ? [{
|
|
1525
|
+
targetKind: "session",
|
|
1526
|
+
targetId: conversationId,
|
|
1527
|
+
role: "input",
|
|
1528
|
+
pinned: false,
|
|
1529
|
+
retrievalPolicy: {},
|
|
1530
|
+
metadata: {}
|
|
1531
|
+
}] : [],
|
|
1532
|
+
...sourceRefs.map((ref) => ({
|
|
1533
|
+
targetKind: "source",
|
|
1534
|
+
targetId: `${ref.kind}:${ref.sourceId}`,
|
|
1535
|
+
role: "input",
|
|
1536
|
+
pinned: true,
|
|
1537
|
+
retrievalPolicy: { currentAuthorizationRequired: true },
|
|
1538
|
+
metadata: {
|
|
1539
|
+
kind: "task_reference_request",
|
|
1540
|
+
ref
|
|
1541
|
+
}
|
|
1542
|
+
})),
|
|
1543
|
+
...originConversationId && isTaskNotificationPreference(notificationPreference) ? [taskNotificationContext(originConversationId, notificationPreference)] : [],
|
|
1544
|
+
...conversationExcerpts.map((excerpt) => ({
|
|
1545
|
+
targetKind: "source",
|
|
1546
|
+
targetId: `conversation-excerpt:${excerpt.entryId}`,
|
|
1547
|
+
role: "input",
|
|
1548
|
+
pinned: true,
|
|
1549
|
+
retrievalPolicy: { currentAuthorizationRequired: true },
|
|
1550
|
+
metadata: {
|
|
1551
|
+
kind: "task_conversation_excerpt",
|
|
1552
|
+
excerpt
|
|
1553
|
+
}
|
|
1554
|
+
}))
|
|
1555
|
+
],
|
|
1525
1556
|
authorityGrants: [],
|
|
1526
1557
|
activation: createMode === "allocate" ? {
|
|
1527
1558
|
mode: "allocate",
|
|
@@ -112,12 +112,12 @@ export declare const AutomationCreateCapabilityInputSchema: z.ZodObject<{
|
|
|
112
112
|
wait: z.ZodObject<{
|
|
113
113
|
kind: z.ZodEnum<{
|
|
114
114
|
approval: "approval";
|
|
115
|
+
paused: "paused";
|
|
115
116
|
dependency: "dependency";
|
|
116
117
|
user_input: "user_input";
|
|
117
118
|
external_event: "external_event";
|
|
118
119
|
scheduled_time: "scheduled_time";
|
|
119
120
|
retry_backoff: "retry_backoff";
|
|
120
|
-
paused: "paused";
|
|
121
121
|
}>;
|
|
122
122
|
reason: z.ZodString;
|
|
123
123
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -346,12 +346,12 @@ export declare const AutomationUpdatePatchSchema: z.ZodObject<{
|
|
|
346
346
|
wait: z.ZodObject<{
|
|
347
347
|
kind: z.ZodEnum<{
|
|
348
348
|
approval: "approval";
|
|
349
|
+
paused: "paused";
|
|
349
350
|
dependency: "dependency";
|
|
350
351
|
user_input: "user_input";
|
|
351
352
|
external_event: "external_event";
|
|
352
353
|
scheduled_time: "scheduled_time";
|
|
353
354
|
retry_backoff: "retry_backoff";
|
|
354
|
-
paused: "paused";
|
|
355
355
|
}>;
|
|
356
356
|
reason: z.ZodString;
|
|
357
357
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -108,12 +108,12 @@ export declare const AutomationActionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
108
108
|
wait: z.ZodObject<{
|
|
109
109
|
kind: z.ZodEnum<{
|
|
110
110
|
approval: "approval";
|
|
111
|
+
paused: "paused";
|
|
111
112
|
dependency: "dependency";
|
|
112
113
|
user_input: "user_input";
|
|
113
114
|
external_event: "external_event";
|
|
114
115
|
scheduled_time: "scheduled_time";
|
|
115
116
|
retry_backoff: "retry_backoff";
|
|
116
|
-
paused: "paused";
|
|
117
117
|
}>;
|
|
118
118
|
reason: z.ZodString;
|
|
119
119
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -323,12 +323,12 @@ export declare const AutomationSchema: z.ZodObject<{
|
|
|
323
323
|
wait: z.ZodObject<{
|
|
324
324
|
kind: z.ZodEnum<{
|
|
325
325
|
approval: "approval";
|
|
326
|
+
paused: "paused";
|
|
326
327
|
dependency: "dependency";
|
|
327
328
|
user_input: "user_input";
|
|
328
329
|
external_event: "external_event";
|
|
329
330
|
scheduled_time: "scheduled_time";
|
|
330
331
|
retry_backoff: "retry_backoff";
|
|
331
|
-
paused: "paused";
|
|
332
332
|
}>;
|
|
333
333
|
reason: z.ZodString;
|
|
334
334
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -517,12 +517,12 @@ export declare const CreateAutomationSchema: z.ZodObject<{
|
|
|
517
517
|
wait: z.ZodObject<{
|
|
518
518
|
kind: z.ZodEnum<{
|
|
519
519
|
approval: "approval";
|
|
520
|
+
paused: "paused";
|
|
520
521
|
dependency: "dependency";
|
|
521
522
|
user_input: "user_input";
|
|
522
523
|
external_event: "external_event";
|
|
523
524
|
scheduled_time: "scheduled_time";
|
|
524
525
|
retry_backoff: "retry_backoff";
|
|
525
|
-
paused: "paused";
|
|
526
526
|
}>;
|
|
527
527
|
reason: z.ZodString;
|
|
528
528
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -738,12 +738,12 @@ export declare const UpdateAutomationSchema: z.ZodObject<{
|
|
|
738
738
|
wait: z.ZodObject<{
|
|
739
739
|
kind: z.ZodEnum<{
|
|
740
740
|
approval: "approval";
|
|
741
|
+
paused: "paused";
|
|
741
742
|
dependency: "dependency";
|
|
742
743
|
user_input: "user_input";
|
|
743
744
|
external_event: "external_event";
|
|
744
745
|
scheduled_time: "scheduled_time";
|
|
745
746
|
retry_backoff: "retry_backoff";
|
|
746
|
-
paused: "paused";
|
|
747
747
|
}>;
|
|
748
748
|
reason: z.ZodString;
|
|
749
749
|
condition: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -89,7 +89,7 @@ export declare function buildAutomationDraftResponse(draft: GeneratedAutomationD
|
|
|
89
89
|
} | {
|
|
90
90
|
type: "add_wait";
|
|
91
91
|
wait: {
|
|
92
|
-
kind: "approval" | "dependency" | "user_input" | "external_event" | "scheduled_time" | "retry_backoff"
|
|
92
|
+
kind: "approval" | "paused" | "dependency" | "user_input" | "external_event" | "scheduled_time" | "retry_backoff";
|
|
93
93
|
reason: string;
|
|
94
94
|
condition: Record<string, unknown>;
|
|
95
95
|
resumeAt?: number;
|
|
@@ -6,6 +6,7 @@ export type BrowserPrimitiveInput = Exclude<BrowserActionInput, BrowserNavigateI
|
|
|
6
6
|
}>;
|
|
7
7
|
export interface BrowserDriver {
|
|
8
8
|
readonly kind: 'playwright' | 'extension' | 'desktop';
|
|
9
|
+
readonly abortClosesSession?: boolean;
|
|
9
10
|
connect(): Promise<void>;
|
|
10
11
|
disconnect(): Promise<void>;
|
|
11
12
|
createSession(sessionId: string): Promise<void>;
|
|
@@ -21,6 +21,7 @@ async function createBrowserDriver(config, endpointTools) {
|
|
|
21
21
|
const driver = config.driver;
|
|
22
22
|
return new PlaywrightDriver({
|
|
23
23
|
connect: () => connectPlaywright(driver),
|
|
24
|
+
isolateSessions: driver.kind === "playwright",
|
|
24
25
|
maxNodes: config.observation.maxNodes,
|
|
25
26
|
maxCharacters: config.observation.maxCharacters,
|
|
26
27
|
visualFallback: config.observation.visualFallback,
|
|
@@ -62,21 +63,11 @@ async function connectPlaywright(driver) {
|
|
|
62
63
|
executablePath: driver.executablePath,
|
|
63
64
|
args: ["--no-sandbox", "--disable-setuid-sandbox"]
|
|
64
65
|
});
|
|
65
|
-
const context = await createContext(browser);
|
|
66
66
|
log.info({
|
|
67
67
|
kind: driver.kind,
|
|
68
68
|
headless: driver.headless
|
|
69
69
|
}, "Browser driver connected");
|
|
70
|
-
return {
|
|
71
|
-
browser,
|
|
72
|
-
context
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
async function createContext(browser) {
|
|
76
|
-
return browser.newContext({ viewport: {
|
|
77
|
-
width: 1280,
|
|
78
|
-
height: 720
|
|
79
|
-
} });
|
|
70
|
+
return { browser };
|
|
80
71
|
}
|
|
81
72
|
//#endregion
|
|
82
73
|
export { createBrowserDriver };
|
|
@@ -3,11 +3,12 @@ import type { Browser, BrowserContext } from 'playwright-core';
|
|
|
3
3
|
import type { BrowserDriver, BrowserPrimitiveInput } from './browser-driver.js';
|
|
4
4
|
export interface PlaywrightConnection {
|
|
5
5
|
browser: Browser;
|
|
6
|
-
context
|
|
6
|
+
context?: BrowserContext;
|
|
7
7
|
release?: () => Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
export interface PlaywrightDriverOptions {
|
|
10
10
|
connect: () => Promise<PlaywrightConnection>;
|
|
11
|
+
isolateSessions?: boolean;
|
|
11
12
|
maxNodes: number;
|
|
12
13
|
maxCharacters: number;
|
|
13
14
|
visualFallback: boolean;
|
|
@@ -19,20 +20,22 @@ export declare class PlaywrightDriver implements BrowserDriver {
|
|
|
19
20
|
private connection;
|
|
20
21
|
private sessions;
|
|
21
22
|
constructor(options: PlaywrightDriverOptions);
|
|
23
|
+
get abortClosesSession(): boolean;
|
|
22
24
|
connect(): Promise<void>;
|
|
23
25
|
disconnect(): Promise<void>;
|
|
24
26
|
createSession(sessionId: string): Promise<void>;
|
|
25
27
|
closeSession(sessionId: string): Promise<void>;
|
|
26
28
|
navigate(sessionId: string, input: BrowserNavigateInput, signal?: AbortSignal): Promise<BrowserControlResult>;
|
|
27
29
|
observe(sessionId: string, input: BrowserObserveInput, signal?: AbortSignal): Promise<BrowserObservation>;
|
|
30
|
+
private observePage;
|
|
28
31
|
perform(sessionId: string, input: BrowserPrimitiveInput, signal?: AbortSignal): Promise<BrowserControlResult>;
|
|
29
32
|
tabs(sessionId: string, input: BrowserTabsInput, signal?: AbortSignal): Promise<BrowserControlResult>;
|
|
30
33
|
private wait;
|
|
31
34
|
private verifiedResult;
|
|
35
|
+
private observeAfterAction;
|
|
32
36
|
private captureVisual;
|
|
33
37
|
private activeState;
|
|
34
38
|
private session;
|
|
35
39
|
private createPageState;
|
|
36
|
-
private context;
|
|
37
40
|
private listTabs;
|
|
38
41
|
}
|