@xopcai/xopc 0.0.411 → 0.0.413
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/{agent-avatar-dicebear-sGJnq-SA.js → agent-avatar-dicebear-BT6oqCMD.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BFmRRD_4.js +1 -0
- package/dist/gateway/static/root/assets/agents-Clwskw2J.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-uGDeJR1f.js → agents-admin-api-CeBkHnl8.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-BdCgtTfT.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-C3-hCFlF.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DJbKg3va.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-CGdU_E5B.js → archive-plugin-BviFGCy4.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BAPZY56r.js → automations-page-CfzazXE5.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-D_X0_1X3.js +8 -0
- package/dist/gateway/static/root/assets/{binary-plugins-B0ispXo2.js → binary-plugins-Dp-gtJEk.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B9Ci-prO.js → block-editor-D-DEPdpi.js} +4 -4
- package/dist/gateway/static/root/assets/{browser-automation-inputs-D4-vQc4g.js → browser-automation-inputs-D1pDgMJu.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-BI-ep6uM.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BTyQ4-vN.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-Bpeh6E22.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-GNS95mG9.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DBiv1HN-.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-Cic05oWh.js → capability-header-actions-CP2fI9Fe.js} +1 -1
- package/dist/gateway/static/root/assets/channels-DWlrUKBr.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Bm-IGeDe.js → chat-terminal-dock-BL3tFntQ.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-DEQ5GYfC.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-DcdASUU9.js → connector-service-page-CecwMnC5.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BcpUvrtl.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-gVLWu9R0.js → date-picker-N5jnlvPs.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-C0LARyok.js → dependency-picker-C4jddxFl.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-v_le3sCs.js → desktop-pet-BCbiUNQG.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CkKU0JMY.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard--E2GQoY1.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CBefVUPR.js → directory-picker-path-field-CbMbPimD.js} +1 -1
- package/dist/gateway/static/root/assets/extension-debug-page-OE1nJMQ8.js +1 -0
- package/dist/gateway/static/root/assets/{extension-page-C0-oP7S_.js → extension-page-BEomiKhy.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BFOjQeSX.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-BVqYVaGy.js → gateway-config-swr-DF_HV6NP.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-CY1LBGBS.js → gateway-realtime-DMAzNlm-.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CoIgC1Al.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CR4CsfNN.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CPKGkr6D.js → gateway-startup-retry-B91CBTzO.js} +1 -1
- package/dist/gateway/static/root/assets/highlight-code-6ONPRH5r.js +1 -0
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-CN5PNRN3.js → highlighted-body-KQOG7T2V-EJ9Kg4iQ.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-B9w3a6r2.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DRLXG9Ws.js → image-generation-api-D0HNic89.js} +1 -1
- package/dist/gateway/static/root/assets/imports-page-bxTINe-2.js +1 -0
- package/dist/gateway/static/root/assets/index-D1oivYvN.js +710 -0
- package/dist/gateway/static/root/assets/index-D_7q1UkI.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-Cmi-2SIh.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-NGCmXpa_.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-BChE6nUD.js → local-apps-page-jgaogH9Z.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-BCaC-1rH.js → local-session-drafts-DvmwiLUx.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DAgpZxAS.js → locale-store-JogcXC4J.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-drrr-c2W.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-Dc1opXVr.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-BmLuWkkZ.js → media-plugins-BRS9puQV.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-B--edI1I.js +1 -0
- package/dist/gateway/static/root/assets/{messages-DMXSIJUO.js → messages-RzwPiQNL.js} +2 -2
- package/dist/gateway/static/root/assets/note-detail-panel-C3s4-ytB.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-D7q5-KuS.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-qVxoErUS.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-B7rDRlS7.js → page-context-capture-button-D_VOB2_C.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-B-T8NzQo.js +1 -0
- package/dist/gateway/static/root/assets/personal-settings-panel-BKA4fbYH.js +1 -0
- package/dist/gateway/static/root/assets/phone-dependencies-card-DhEsfEUN.js +1 -0
- package/dist/gateway/static/root/assets/phone-model-picker-J4mFDk21.js +1 -0
- package/dist/gateway/static/root/assets/phone-settings-page-BLflz8CQ.js +1 -0
- package/dist/gateway/static/root/assets/plugin-details-dialog-1BwvmKZi.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Z4NM7_Dn.js → preview-open-alternatives-DaTaSKox.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-C5TcIaJj.js → product-open-page-wYlC0IVZ.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-5xID6jIj.js → product-preview-content-Bxur-p6S.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DwowzxzD.js +7 -0
- package/dist/gateway/static/root/assets/projects-page-Bwvn4i_e.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-B6kqbuw8.js → registry-api-BGqSwITi.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DrHisOUe.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-api-CSm5SpnR.js +5 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DXNidliV.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-DtPkiYwm.js → schema-form-DeSZ7SiO.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-D6-Vz8xK.js → session-api-DTxZyMta.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-DWbcMHcj.js → session-manager-B2HDomj4.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-seP7t0kv.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-VqBu7gHu.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DD3iD5t5.js → settings-form-section-BNYQjZU4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-iLY3LRDq.js → settings-page-29Ix0jSQ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-Dx5S-Msc.js → settings-page-header-CYpuTXUW.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-layout-B20AfmFG.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-COQZgKX9.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-B8h9lqDL.js → share-preview-page-CwMRULXc.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BWaykw9E.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-C9RsrvOp.js → skill-api-xfB5fUAh.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Bq-3_MCt.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-C3LfWsAZ.js +2 -0
- package/dist/gateway/static/root/assets/system-settings-panel-DRJu1ehM.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-XCJFP-Aa.js +2 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-DjNWPpn_.js → task-result-evidence-C4o_Yue_.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-CYslh-Pu.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-C6XfsSWy.js → tunnel-api-Bi_kw6bv.js} +1 -1
- package/dist/gateway/static/root/assets/usage-page-CTTmklCs.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-DO-Twmbm.js → use-autosave-BkB9uD93.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-BDqguzRE.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-MGe3HkS_.js → voice-api-key-field-bt8_Agih.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CPKzUb4R.js → voice-config-api-D7xsWrdh.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DptHqYh5.js → work-discovery-overlay-D3NG14dX.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Y_UIryBH.js → xopc-cloud-account-card-B2OUKOQi.js} +1 -1
- package/dist/gateway/static/root/index.html +14 -14
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/capabilities.js +1 -0
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/background-review/prompts.js +4 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +1 -1
- package/dist/src/agent/embedded/xopc-stream-bridge.js +7 -3
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/prompt/system-prompt.js +1 -1
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tool-manuals/index.js +7 -0
- package/dist/src/agent/tool-manuals/phone.d.ts +1 -0
- package/dist/src/agent/tool-manuals/phone.js +16 -0
- package/dist/src/agent/tools/factory.js +15 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +2 -1
- package/dist/src/agent/tools/personal-task-tool.js +43 -20
- package/dist/src/agent/tools/phone-use-tool.d.ts +8 -0
- package/dist/src/agent/tools/phone-use-tool.js +49 -0
- package/dist/src/agent/tools/session-recall-tool.js +2 -1
- package/dist/src/agent/tools/session-search-tool.js +11 -5
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/repository.js +5 -1
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/resolver.js +5 -0
- package/dist/src/agent-config/schema.d.ts +24 -0
- package/dist/src/agent-config/schema.js +5 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/runtime.js +32 -4
- package/dist/src/cli/utils/init-workspace-core.js +6 -4
- package/dist/src/computer/diagnostics.d.ts +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/config-file.d.ts +6 -0
- package/dist/src/config/config-file.js +35 -0
- package/dist/src/config/loader.js +5 -4
- package/dist/src/config/models-json.d.ts +36 -0
- package/dist/src/config/models-json.js +9 -0
- package/dist/src/config/schema.d.ts +12 -0
- package/dist/src/config/schema.js +6 -2
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +7 -1
- package/dist/src/gateway/agent-builtin-tools.js +7 -0
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/global-defaults-admin.js +2 -0
- package/dist/src/gateway/hono/lib/config-payload.d.ts +8 -0
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/models.js +3 -0
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-dependencies.d.ts +3 -0
- package/dist/src/gateway/hono/routes/phone-dependencies.js +137 -0
- package/dist/src/gateway/hono/routes/phone.d.ts +4 -0
- package/dist/src/gateway/hono/routes/phone.js +445 -0
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/runtime-tools.js +2 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/server.js +1 -0
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -0
- package/dist/src/gateway/service.d.ts +2 -0
- package/dist/src/gateway/service.js +17 -12
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/knowledge-memory/repository.js +5 -0
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/memory-learning/forget-capture.js +12 -3
- package/dist/src/memory-learning/forgotten-history.d.ts +4 -0
- package/dist/src/memory-learning/forgotten-history.js +71 -4
- package/dist/src/memory-learning/work-capture.d.ts +1 -0
- package/dist/src/memory-learning/work-capture.js +28 -17
- package/dist/src/personal-agent/prompts.js +3 -2
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/phone/adb-driver.d.ts +35 -0
- package/dist/src/phone/adb-driver.js +368 -0
- package/dist/src/phone/cloud-adb.d.ts +34 -0
- package/dist/src/phone/cloud-adb.js +223 -0
- package/dist/src/phone/cloud-phones.d.ts +29 -0
- package/dist/src/phone/cloud-phones.js +141 -0
- package/dist/src/phone/cloud-scrcpy.d.ts +20 -0
- package/dist/src/phone/cloud-scrcpy.js +122 -0
- package/dist/src/phone/contracts.d.ts +204 -0
- package/dist/src/phone/contracts.js +115 -0
- package/dist/src/phone/interactive-session.d.ts +34 -0
- package/dist/src/phone/interactive-session.js +164 -0
- package/dist/src/phone/live-provider.d.ts +57 -0
- package/dist/src/phone/live-provider.js +18 -0
- package/dist/src/phone/live-state.d.ts +28 -0
- package/dist/src/phone/live-state.js +71 -0
- package/dist/src/phone/model-adapter.d.ts +25 -0
- package/dist/src/phone/model-adapter.js +340 -0
- package/dist/src/phone/repository.d.ts +19 -0
- package/dist/src/phone/repository.js +100 -0
- package/dist/src/phone/runtime.d.ts +83 -0
- package/dist/src/phone/runtime.js +896 -0
- package/dist/src/phone/scrcpy.d.ts +62 -0
- package/dist/src/phone/scrcpy.js +345 -0
- package/dist/src/phone/stream-gateway.d.ts +26 -0
- package/dist/src/phone/stream-gateway.js +210 -0
- package/dist/src/process/phone-process.d.ts +4 -0
- package/dist/src/process/phone-process.js +38 -0
- package/dist/src/providers/extension-stream-bridge.js +8 -1
- package/dist/src/providers/model-call.js +6 -2
- package/dist/src/providers/model-catalog-persistence.js +3 -0
- package/dist/src/providers/model-catalog-types.d.ts +3 -0
- package/dist/src/providers/model-reference-auditor.js +5 -1
- package/dist/src/providers/model-registry.js +3 -0
- package/dist/src/runtime-tools/archive.d.ts +2 -2
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/runtime-tools/downloader.d.ts +2 -2
- package/dist/src/runtime-tools/errors.d.ts +3 -3
- package/dist/src/runtime-tools/phone-dependencies.d.ts +40 -0
- package/dist/src/runtime-tools/phone-dependencies.js +188 -0
- package/dist/src/runtime-tools/phone-dependency-catalog.d.ts +16 -0
- package/dist/src/runtime-tools/phone-dependency-catalog.js +51 -0
- package/dist/src/runtime-tools/types.d.ts +1 -0
- package/dist/src/storage/sqlite/context-extraction-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/context-extraction-repository.js +12 -2
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/task-research-result.js +19 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/usage/cloud-receipts.d.ts +5 -1
- package/dist/src/usage/cloud-receipts.js +10 -4
- package/dist/src/usage/cloud-wire.d.ts +37 -0
- package/dist/src/usage/cloud-wire.js +181 -0
- package/dist/src/usage/recorder.js +5 -4
- package/dist/src/user-model/capture/semantic.js +2 -2
- package/dist/src/voice/platform-catalog.d.ts +3 -0
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +9 -4
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BI7OTo-T.js +0 -1
- package/dist/gateway/static/root/assets/agents-RIXL0p7_.js +0 -77
- package/dist/gateway/static/root/assets/app-management-settings-panel-BGzhSS6H.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-DtEZq4b2.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-DZqBof2D.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CI-yQnSj.js +0 -8
- package/dist/gateway/static/root/assets/browser-automations-page-Xzdif447.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-Bhu-83eC.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-B9b5KCBb.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BIc0Zlsw.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CQEfpLdj.js +0 -8
- package/dist/gateway/static/root/assets/channels-DQbEoo_o.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-C9xMfwXK.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-eh-xpMPK.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-B_-j-D4W.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CxG_FcQ6.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-CTe7Molh.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-DYJmgMUg.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Dafw95ol.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-C13P4lQd.js +0 -1
- package/dist/gateway/static/root/assets/highlight-code-CslBKXdS.js +0 -1
- package/dist/gateway/static/root/assets/home-page-B_XrkGmA.js +0 -2
- package/dist/gateway/static/root/assets/imports-page--cuF5vwU.js +0 -1
- package/dist/gateway/static/root/assets/index-6YjAt50A.js +0 -710
- package/dist/gateway/static/root/assets/index-caRW34rg.css +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-5g2PxgBs.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-B6U1HQpp.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-B9mq03SK.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-2W_qJsha.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-61Il2HQR.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-C4gZsNBL.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-XqJIaaRV.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-Chdwrjni.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-mQl9BftY.js +0 -1
- package/dist/gateway/static/root/assets/personal-settings-panel-BgcJLmZN.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-FvwSxZPB.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CGOyx7zX.js +0 -7
- package/dist/gateway/static/root/assets/projects-page-Dd11tbRX.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Bintk9nL.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-api-CY3R7unQ.js +0 -5
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-CbmiiLsq.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BBlEP7y3.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BCQUth4g.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-v4P0IAkG.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DMzej6z2.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-B20x7EE9.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-C_ulsnv7.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-PTRGMKkq.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DEPwo4vf.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-CVJt7IXC.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-DgqLD8Y5.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BwK37aob.js +0 -2
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { PhoneError, init_contracts } from "./contracts.js";
|
|
2
|
+
//#region src/phone/interactive-session.ts
|
|
3
|
+
init_contracts();
|
|
4
|
+
/** Shared device source with bounded video gating and ordered, fenced input. */
|
|
5
|
+
var PhoneInteractiveSession = class {
|
|
6
|
+
viewers = /* @__PURE__ */ new Map();
|
|
7
|
+
queue = Promise.resolve();
|
|
8
|
+
pending = 0;
|
|
9
|
+
seq = /* @__PURE__ */ new Map();
|
|
10
|
+
packets = [];
|
|
11
|
+
bytes = 0;
|
|
12
|
+
checkedAt = 0;
|
|
13
|
+
allowed = false;
|
|
14
|
+
closed = false;
|
|
15
|
+
timer;
|
|
16
|
+
unsubscribe;
|
|
17
|
+
config;
|
|
18
|
+
started;
|
|
19
|
+
gesture;
|
|
20
|
+
verification;
|
|
21
|
+
constructor(provider, checkScreen, authorize, onGesture = () => {}) {
|
|
22
|
+
this.provider = provider;
|
|
23
|
+
this.checkScreen = checkScreen;
|
|
24
|
+
this.authorize = authorize;
|
|
25
|
+
this.onGesture = onGesture;
|
|
26
|
+
}
|
|
27
|
+
start() {
|
|
28
|
+
return this.started ??= (async () => {
|
|
29
|
+
await this.checkScreen();
|
|
30
|
+
this.checkedAt = Date.now();
|
|
31
|
+
this.allowed = true;
|
|
32
|
+
this.unsubscribe = this.provider.subscribe((packet) => {
|
|
33
|
+
if (packet.config) this.config = packet;
|
|
34
|
+
this.packets.push(packet);
|
|
35
|
+
this.bytes += packet.data.length;
|
|
36
|
+
if (this.bytes > 2 * 1024 * 1024) {
|
|
37
|
+
this.packets = [];
|
|
38
|
+
this.bytes = 0;
|
|
39
|
+
for (const viewer of this.viewers.values()) viewer.key = false;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
await this.provider.start();
|
|
43
|
+
this.poll();
|
|
44
|
+
})();
|
|
45
|
+
}
|
|
46
|
+
verifyScreen() {
|
|
47
|
+
return this.verification ??= this.checkScreen().then(() => {
|
|
48
|
+
this.checkedAt = Date.now();
|
|
49
|
+
this.allowed = true;
|
|
50
|
+
}, (error) => {
|
|
51
|
+
this.allowed = false;
|
|
52
|
+
throw error;
|
|
53
|
+
}).finally(() => {
|
|
54
|
+
this.verification = void 0;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async poll() {
|
|
58
|
+
if (this.closed) return;
|
|
59
|
+
const packets = this.packets;
|
|
60
|
+
this.packets = [];
|
|
61
|
+
this.bytes = 0;
|
|
62
|
+
try {
|
|
63
|
+
const wasAllowed = this.allowed;
|
|
64
|
+
await this.verifyScreen();
|
|
65
|
+
if (this.closed) return;
|
|
66
|
+
if (!wasAllowed) this.provider.refresh();
|
|
67
|
+
for (const packet of packets) for (const viewer of this.viewers.values()) {
|
|
68
|
+
if (packet.geometry && packet.geometry.version !== this.provider.geometry.version) continue;
|
|
69
|
+
if (packet.config) {
|
|
70
|
+
viewer.key = false;
|
|
71
|
+
viewer.packet(packet);
|
|
72
|
+
} else if (packet.key || viewer.key) {
|
|
73
|
+
if (!viewer.key && this.config) viewer.packet(this.config);
|
|
74
|
+
viewer.key = true;
|
|
75
|
+
viewer.packet(packet);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} catch (error) {
|
|
79
|
+
this.allowed = false;
|
|
80
|
+
this.packets = [];
|
|
81
|
+
this.bytes = 0;
|
|
82
|
+
await this.revoke().catch(() => {});
|
|
83
|
+
const code = error instanceof PhoneError ? error.code : "PHONE_VIDEO_DISCONNECTED";
|
|
84
|
+
for (const viewer of this.viewers.values()) {
|
|
85
|
+
viewer.key = false;
|
|
86
|
+
viewer.fault(code);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (!this.closed) this.timer = setTimeout(() => void this.poll(), 35);
|
|
90
|
+
}
|
|
91
|
+
subscribe(client, packet, fault) {
|
|
92
|
+
if (this.viewers.has(client) || this.viewers.size >= 4) throw new PhoneError("PHONE_VIEW_BUSY", "Phone viewer connection limit reached", 409);
|
|
93
|
+
this.viewers.set(client, {
|
|
94
|
+
packet,
|
|
95
|
+
fault,
|
|
96
|
+
key: false
|
|
97
|
+
});
|
|
98
|
+
this.provider.refresh();
|
|
99
|
+
return () => {
|
|
100
|
+
this.viewers.delete(client);
|
|
101
|
+
this.seq.delete(client);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
input(client, input) {
|
|
105
|
+
this.authorize(client, input.epoch);
|
|
106
|
+
if (this.closed || !this.allowed) throw new PhoneError("PHONE_SCREEN_UNVERIFIED", "Wait for an authorized phone frame", 409);
|
|
107
|
+
if (input.seq <= (this.seq.get(client) ?? 0)) throw new PhoneError("PHONE_INPUT_SEQUENCE", "Stale input sequence", 409);
|
|
108
|
+
if (this.pending >= 8) throw new PhoneError("PHONE_INPUT_BACKPRESSURE", "Input queue full; release and start a new gesture", 409);
|
|
109
|
+
this.seq.set(client, input.seq);
|
|
110
|
+
this.pending++;
|
|
111
|
+
const work = this.queue.catch(() => {}).then(async () => {
|
|
112
|
+
this.authorize(client, input.epoch);
|
|
113
|
+
if (Date.now() - this.checkedAt > 300) await this.verifyScreen();
|
|
114
|
+
this.authorize(client, input.epoch);
|
|
115
|
+
if (!this.allowed || this.closed) throw new PhoneError("PHONE_APP_DENIED", "Phone screen is unavailable", 403);
|
|
116
|
+
await this.provider.pointer(input);
|
|
117
|
+
if (input.phase === "down") this.gesture = {
|
|
118
|
+
x: input.x,
|
|
119
|
+
y: input.y,
|
|
120
|
+
at: Date.now()
|
|
121
|
+
};
|
|
122
|
+
else if (input.phase === "up" || input.phase === "cancel") {
|
|
123
|
+
const start = this.gesture;
|
|
124
|
+
this.gesture = void 0;
|
|
125
|
+
if (start) this.onGesture(Math.hypot(start.x - input.x, start.y - input.y) > 18 ? "swipe" : Date.now() - start.at > 600 ? "longPress" : "tap");
|
|
126
|
+
}
|
|
127
|
+
}).finally(() => {
|
|
128
|
+
this.pending--;
|
|
129
|
+
});
|
|
130
|
+
this.queue = work;
|
|
131
|
+
return work;
|
|
132
|
+
}
|
|
133
|
+
async revoke() {
|
|
134
|
+
const work = this.queue.catch(() => {}).then(async () => {
|
|
135
|
+
await this.provider.revoke();
|
|
136
|
+
this.gesture = void 0;
|
|
137
|
+
});
|
|
138
|
+
this.queue = work;
|
|
139
|
+
await work;
|
|
140
|
+
}
|
|
141
|
+
async close() {
|
|
142
|
+
if (this.closed) return;
|
|
143
|
+
this.closed = true;
|
|
144
|
+
clearTimeout(this.timer);
|
|
145
|
+
await this.revoke().catch(() => {});
|
|
146
|
+
this.unsubscribe?.();
|
|
147
|
+
for (const viewer of this.viewers.values()) viewer.fault("PHONE_VIDEO_ENDED");
|
|
148
|
+
this.viewers.clear();
|
|
149
|
+
this.packets = [];
|
|
150
|
+
this.config = void 0;
|
|
151
|
+
await this.provider.close();
|
|
152
|
+
}
|
|
153
|
+
get viewerCount() {
|
|
154
|
+
return this.viewers.size;
|
|
155
|
+
}
|
|
156
|
+
verifyGeometry(version) {
|
|
157
|
+
return this.allowed && Date.now() - this.checkedAt < 300 && version === this.provider.geometry.version;
|
|
158
|
+
}
|
|
159
|
+
authorizeClient(client, epoch) {
|
|
160
|
+
this.authorize(client, epoch);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { PhoneInteractiveSession };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Vendor adapters own their media transport; the runtime always owns the lease. */
|
|
3
|
+
export type PhoneMediaDescriptor = {
|
|
4
|
+
kind: 'scrcpy-h264';
|
|
5
|
+
protocolVersion: 1;
|
|
6
|
+
continuousTouch: true;
|
|
7
|
+
maxPointers: 1;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'vendor-sdk';
|
|
10
|
+
provider: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
expiresAt: number;
|
|
13
|
+
controlRevocation: 'confirmed' | 'ttl';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'snapshot';
|
|
16
|
+
continuousTouch: false;
|
|
17
|
+
};
|
|
18
|
+
export declare const PhonePointerSchema: z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"pointer">;
|
|
20
|
+
phase: z.ZodEnum<{
|
|
21
|
+
cancel: "cancel";
|
|
22
|
+
move: "move";
|
|
23
|
+
down: "down";
|
|
24
|
+
up: "up";
|
|
25
|
+
}>;
|
|
26
|
+
seq: z.ZodNumber;
|
|
27
|
+
epoch: z.ZodNumber;
|
|
28
|
+
geometry: z.ZodNumber;
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type PhonePointer = z.infer<typeof PhonePointerSchema>;
|
|
33
|
+
export type PhoneVideoPacket = {
|
|
34
|
+
data: Buffer;
|
|
35
|
+
config: boolean;
|
|
36
|
+
key: boolean;
|
|
37
|
+
pts: number;
|
|
38
|
+
geometry?: PhoneVideoGeometry;
|
|
39
|
+
};
|
|
40
|
+
export type PhoneVideoGeometry = {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
version: number;
|
|
44
|
+
codec: string;
|
|
45
|
+
};
|
|
46
|
+
export interface PhoneInteractiveProvider {
|
|
47
|
+
readonly descriptor: PhoneMediaDescriptor;
|
|
48
|
+
readonly geometry: PhoneVideoGeometry;
|
|
49
|
+
foreground(signal: AbortSignal): Promise<string>;
|
|
50
|
+
start(): Promise<void>;
|
|
51
|
+
subscribe(packet: (packet: PhoneVideoPacket) => void): () => void;
|
|
52
|
+
pointer(input: PhonePointer): Promise<void>;
|
|
53
|
+
refresh(): void;
|
|
54
|
+
/** Must resolve only after the transport has released all accepted touches. */
|
|
55
|
+
revoke(): Promise<void>;
|
|
56
|
+
close(): Promise<void>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/phone/live-provider.ts
|
|
3
|
+
const PhonePointerSchema = z.object({
|
|
4
|
+
type: z.literal("pointer"),
|
|
5
|
+
phase: z.enum([
|
|
6
|
+
"down",
|
|
7
|
+
"move",
|
|
8
|
+
"up",
|
|
9
|
+
"cancel"
|
|
10
|
+
]),
|
|
11
|
+
seq: z.number().int().positive(),
|
|
12
|
+
epoch: z.number().int().positive(),
|
|
13
|
+
geometry: z.number().int().positive(),
|
|
14
|
+
x: z.number().finite().min(0).max(1e3),
|
|
15
|
+
y: z.number().finite().min(0).max(1e3)
|
|
16
|
+
}).strict();
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PhonePointerSchema };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type PhoneObservation } from './contracts.js';
|
|
2
|
+
/** Active execution time excludes explicit human intervention. */
|
|
3
|
+
export declare class PhoneOperationBudget {
|
|
4
|
+
readonly controller: AbortController;
|
|
5
|
+
private remaining;
|
|
6
|
+
constructor(durationMs?: number);
|
|
7
|
+
private started;
|
|
8
|
+
private timer?;
|
|
9
|
+
resume(): void;
|
|
10
|
+
pause(): void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
export type PhoneLiveFrame = Omit<PhoneObservation, 'elements' | 'frameId'> & {
|
|
14
|
+
seq: number;
|
|
15
|
+
};
|
|
16
|
+
export declare class PhoneFrameCache {
|
|
17
|
+
private history;
|
|
18
|
+
private frame?;
|
|
19
|
+
private seq;
|
|
20
|
+
set(observation: PhoneObservation): void;
|
|
21
|
+
get(): PhoneLiveFrame | undefined;
|
|
22
|
+
layout(observation: PhoneObservation): string;
|
|
23
|
+
metadata(seq: number | undefined): Omit<PhoneLiveFrame, "frame"> & {
|
|
24
|
+
layout: string;
|
|
25
|
+
};
|
|
26
|
+
invalidate(): void;
|
|
27
|
+
clear(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { PhoneError, init_contracts } from "./contracts.js";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
//#region src/phone/live-state.ts
|
|
4
|
+
init_contracts();
|
|
5
|
+
/** Active execution time excludes explicit human intervention. */
|
|
6
|
+
var PhoneOperationBudget = class {
|
|
7
|
+
controller = new AbortController();
|
|
8
|
+
remaining;
|
|
9
|
+
constructor(durationMs = 3e5) {
|
|
10
|
+
this.remaining = durationMs;
|
|
11
|
+
}
|
|
12
|
+
started = 0;
|
|
13
|
+
timer;
|
|
14
|
+
resume() {
|
|
15
|
+
if (this.timer || this.controller.signal.aborted) return;
|
|
16
|
+
this.started = Date.now();
|
|
17
|
+
this.timer = setTimeout(() => this.controller.abort(new PhoneError("PHONE_OPERATION_TIMEOUT", "The phone goal reached its active execution limit. The session is paused; inspect the current screen before continuing.", 409)), this.remaining);
|
|
18
|
+
this.timer.unref();
|
|
19
|
+
}
|
|
20
|
+
pause() {
|
|
21
|
+
if (!this.timer) return;
|
|
22
|
+
clearTimeout(this.timer);
|
|
23
|
+
this.timer = void 0;
|
|
24
|
+
this.remaining = Math.max(0, this.remaining - (Date.now() - this.started));
|
|
25
|
+
}
|
|
26
|
+
dispose() {
|
|
27
|
+
this.pause();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var PhoneFrameCache = class {
|
|
31
|
+
history = [];
|
|
32
|
+
frame;
|
|
33
|
+
seq = 0;
|
|
34
|
+
set(observation) {
|
|
35
|
+
this.frame?.frame.fill(0);
|
|
36
|
+
this.frame = {
|
|
37
|
+
seq: ++this.seq,
|
|
38
|
+
capturedAt: observation.capturedAt,
|
|
39
|
+
width: observation.width,
|
|
40
|
+
height: observation.height,
|
|
41
|
+
rotation: observation.rotation,
|
|
42
|
+
package: observation.package,
|
|
43
|
+
frame: Buffer.from(observation.frame)
|
|
44
|
+
};
|
|
45
|
+
const { frame: _pixels, ...metadata } = this.frame;
|
|
46
|
+
this.history.push({
|
|
47
|
+
...metadata,
|
|
48
|
+
layout: this.layout(observation)
|
|
49
|
+
});
|
|
50
|
+
this.history = this.history.filter((frame) => Date.now() - frame.capturedAt <= 1e4).slice(-128);
|
|
51
|
+
}
|
|
52
|
+
get() {
|
|
53
|
+
return this.frame;
|
|
54
|
+
}
|
|
55
|
+
layout(observation) {
|
|
56
|
+
return createHash("sha256").update(JSON.stringify(observation.elements)).digest("hex");
|
|
57
|
+
}
|
|
58
|
+
metadata(seq) {
|
|
59
|
+
return this.history.find((frame) => frame.seq === seq);
|
|
60
|
+
}
|
|
61
|
+
invalidate() {
|
|
62
|
+
this.frame?.frame.fill(0);
|
|
63
|
+
this.frame = void 0;
|
|
64
|
+
}
|
|
65
|
+
clear() {
|
|
66
|
+
this.invalidate();
|
|
67
|
+
this.history = [];
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { PhoneFrameCache, PhoneOperationBudget };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Config } from '../config/schema.js';
|
|
2
|
+
import { type PhoneAction, type PhoneDecision, type PhoneObservation } from './contracts.js';
|
|
3
|
+
export declare function phoneModelProfile(model: unknown): "autoglm-phone-v1" | "structured-phone-v1";
|
|
4
|
+
export declare function validatePhoneModelChange(next: {
|
|
5
|
+
primary: string;
|
|
6
|
+
} | null | undefined, previous?: {
|
|
7
|
+
primary: string;
|
|
8
|
+
} | null): void;
|
|
9
|
+
/** Parse only a function name and literal keyword arguments; model text is never executable code. */
|
|
10
|
+
export declare function parseAutoGlmResponse(raw: string, allowedApps: string[]): PhoneDecision;
|
|
11
|
+
export interface PhonePrediction {
|
|
12
|
+
goal: string;
|
|
13
|
+
observation: PhoneObservation;
|
|
14
|
+
allowedApps: string[];
|
|
15
|
+
history: PhoneAction['type'][];
|
|
16
|
+
scenario?: 'settings-about';
|
|
17
|
+
}
|
|
18
|
+
export interface PhoneModelAdapter {
|
|
19
|
+
predict(input: PhonePrediction, signal: AbortSignal): Promise<PhoneDecision>;
|
|
20
|
+
}
|
|
21
|
+
export declare function isAboutScreen(observation: PhoneObservation): boolean;
|
|
22
|
+
export declare class MockPhoneModel implements PhoneModelAdapter {
|
|
23
|
+
predict(input: PhonePrediction, signal: AbortSignal): Promise<PhoneDecision>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createPhoneModel(modelRef: string, config: Config, agentId: string): Promise<PhoneModelAdapter>;
|