@xopcai/xopc 0.0.392 → 0.0.393
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-CZmaQbC9.js → agent-avatar-dicebear-1AF2KGju.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CPJr7NRR.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-cjJXJj_3.js +1 -0
- package/dist/gateway/static/root/assets/agents-DW3TlnIg.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-znm6_dW_.js → agents-admin-api-B5aykqg_.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-B_MFhXXU.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-TYGidVnd.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DOkyvOF0.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-dSkmoISk.js → archive-plugin-BrFfEp0u.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DhWRn0dZ.js → automations-page-B7OofUPF.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIod-bfm.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BJlZrYym.js → binary-plugins-BfAWnYG8.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-OHBssIfN.js → block-editor-_Y-QwZ-3.js} +5 -5
- package/dist/gateway/static/root/assets/browser-automation-inputs-DH9QHI9m.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-B_SnD9B0.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BPlqYpMM.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-BtzZvMIK.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-CgDteXZH.js → capabilities-pt2M56-E.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-WzoG3oBb.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-CFVx3iaZ.js +1 -0
- package/dist/gateway/static/root/assets/channels-BXA55GY2.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-D3GuiG3N.js +36 -0
- package/dist/gateway/static/root/assets/computer-settings-page-CIbHDlp8.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page-CDyCHkpK.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-DA2b6cJu.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-C424c_g9.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-BVJh9sYc.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-Q52A8vjp.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-CZr1CXxu.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-Bd-aOI7N.js +30 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BuB0g8zv.css +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-D_WWTsze.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-C6cUgrvg.js +1 -0
- package/dist/gateway/static/root/assets/extension-debug-page-DyyfC4gA.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-Dho9o3ZZ.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-CdnIGyCH.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-BM__9Fws.js → gateway-config-swr-BEePO3Wl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DS_GDx-x.js → gateway-realtime-Dng_VOvI.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DtlBf7oH.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-D0KSQRNZ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DosoyMIH.js → gateway-startup-retry-CDCiy7Cd.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BYHXWIfK.js → highlighted-body-KQOG7T2V-BNpj_mIM.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CH_A0W29.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DwkO2y46.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-BrYvomnU.js +1 -0
- package/dist/gateway/static/root/assets/index-CKdOZoVu.js +260 -0
- package/dist/gateway/static/root/assets/index-Rxjt-jc3.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BveDYfYk.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcIi1BhT.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-B1a69mlV.js +1 -0
- package/dist/gateway/static/root/assets/{local-session-drafts-Bye3ZtsW.js → local-session-drafts-CYEDUPH7.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BKyOF23r.js → locale-store-CE7L6MlS.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-Us1jv3C4.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-C9RAM7-s.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-D_7clISS.js → markdown-view-PrKvVpRh.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B_4o8hac.js → media-plugins-CR1fp6IL.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DQdcaMiu.js +1 -0
- package/dist/gateway/static/root/assets/messages-CaeL_miw.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Q4yRx9iZ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C9qu16IN.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-Cn_WK68Y.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-DrP6hEcg.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-3NbiWGRG.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-KKE5-V8k.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-BM0oqNxi.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-CPZrwf8n.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Besfx_07.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DLHHYP_v.js → registry-api-BO2Ck3aA.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CTDghL5L.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Dq_50s27.js → runtime-tools-api-B1sb8nlw.js} +1 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-W0X_Fy7b.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-DNM2Zdyr.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-Br11ih_M.js → session-api-CaAUJvu1.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DoFTlgNz.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-Dxtablvd.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7zklouD.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-DCSHPFAN.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-4odCW0_2.js → settings-page-B18UbbaJ.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-JoSfluza.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-BLnS3hoH.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DcIuPJK3.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-CcYGkRPL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-PnUZjoPK.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-D3JAw62U.js +2 -0
- package/dist/gateway/static/root/assets/style-BQqU-1pP.js +7 -0
- package/dist/gateway/static/root/assets/system-settings-panel-C974myUM.js +1 -0
- package/dist/gateway/static/root/assets/tab-completion-input-CxtEp0aP.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-CiljFekC.js +2 -0
- package/dist/gateway/static/root/assets/{task-expandable-content-CmQt5uxa.js → task-expandable-content-DTEVoNrM.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-DEE75MUn.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-DWyI3uA3.js +1 -0
- package/dist/gateway/static/root/assets/usage-page-DJYvbxk7.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CY0YuljR.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-eHZJD6Fw.js +2 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-BNG4ixJE.js +1 -0
- package/dist/gateway/static/root/assets/{voice-config-api-CmDtDA4g.js → voice-config-api-D0Wscn9W.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-CohIoAre.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Czfs5XFH.js → workflow-run-setup-panel-BXI8eyYh.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CVti0u-l.js +6 -0
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-C_COnY_B.js +1 -0
- package/dist/gateway/static/root/index.html +19 -69
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/agent-manager.js +11 -20
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/child-agent-factory.d.ts +2 -1
- package/dist/src/agent/child-agent-factory.js +2 -1
- package/dist/src/agent/coding/projectEvidence.d.ts +9 -0
- package/dist/src/agent/coding/projectEvidence.js +177 -0
- package/dist/src/agent/coding/repository-instructions.d.ts +8 -1
- package/dist/src/agent/coding/repository-instructions.js +9 -4
- package/dist/src/agent/coding/run-verification.d.ts +17 -2
- package/dist/src/agent/coding/run-verification.js +82 -12
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-context.d.ts +1 -0
- package/dist/src/agent/embedded/execution-context.js +4 -1
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -0
- package/dist/src/agent/embedded/run-turn.js +41 -5
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +5 -0
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +2 -1
- 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/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/independent-execution.d.ts +2 -0
- package/dist/src/agent/independent-execution.js +12 -0
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/orchestration/delegation-scope.d.ts +1 -0
- package/dist/src/agent/orchestration/delegation-scope.js +4 -1
- package/dist/src/agent/orchestration/loop-guard.js +6 -2
- package/dist/src/agent/prompt/sections/agent-identity.js +4 -6
- package/dist/src/agent/prompt/sections/behavior.d.ts +3 -2
- package/dist/src/agent/prompt/sections/behavior.js +34 -27
- package/dist/src/agent/prompt/sections/memory-skills.d.ts +1 -1
- package/dist/src/agent/prompt/sections/memory-skills.js +10 -11
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +3 -2
- package/dist/src/agent/prompt/sections/messaging-runtime.js +21 -24
- package/dist/src/agent/prompt/sections/response-language.js +7 -6
- package/dist/src/agent/prompt/sections/tooling.js +11 -10
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt-params.js +2 -0
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt.js +21 -18
- package/dist/src/agent/prompt/types.d.ts +2 -0
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +3 -2
- package/dist/src/agent/skills/format-skills-prompt.js +5 -2
- 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/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +5 -0
- package/dist/src/agent/tools/dataBatch.d.ts +1 -0
- package/dist/src/agent/tools/dataBatch.js +4 -1
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -0
- package/dist/src/agent/tools/delegate-tool.js +1 -0
- package/dist/src/agent/tools/error-tracker.js +4 -2
- package/dist/src/agent/tools/exec-command.js +4 -3
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +20 -21
- package/dist/src/agent/tools/{delegation-parent-policy.d.ts → noninteractive-tool-policy.d.ts} +1 -1
- package/dist/src/agent/tools/{delegation-parent-policy.js → noninteractive-tool-policy.js} +4 -4
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/search/cache.d.ts +3 -1
- package/dist/src/agent/tools/search/cache.js +4 -1
- package/dist/src/agent/tools/search/providers/deepseek-protocol.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek-protocol.js +84 -0
- package/dist/src/agent/tools/search/providers/deepseek.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek.js +55 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +2 -1
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +36 -1
- package/dist/src/agent/tools/search/registry.d.ts +1 -0
- package/dist/src/agent/tools/search/registry.js +32 -6
- package/dist/src/agent/tools/search/request-gate.d.ts +13 -0
- package/dist/src/agent/tools/search/request-gate.js +41 -0
- package/dist/src/agent/tools/search/resolve-config.js +1 -1
- package/dist/src/agent/tools/search/search-info.d.ts +8 -0
- package/dist/src/agent/tools/search/search-info.js +34 -0
- package/dist/src/agent/tools/search/types.d.ts +19 -1
- package/dist/src/agent/tools/toolExposure.d.ts +3 -0
- package/dist/src/agent/tools/toolExposure.js +25 -0
- package/dist/src/agent/tools/web.js +8 -1
- package/dist/src/agent/tools/xopc-use-tool.js +7 -3
- package/dist/src/agent/workflow/subagent-runner.d.ts +1 -0
- package/dist/src/agent/workflow/subagent-runner.js +3 -3
- package/dist/src/agent/workflow/workflow-child-tools.js +13 -8
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +2 -2
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.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/search.d.ts +2 -2
- package/dist/src/cli/commands/search.js +8 -6
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/model-adapter.d.ts +3 -0
- package/dist/src/computer/model-adapter.js +120 -3
- package/dist/src/computer/model-policy.d.ts +1 -1
- package/dist/src/computer/model-policy.js +13 -6
- package/dist/src/computer/runtime.js +1 -0
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +14 -8
- package/dist/src/config/models-json.js +3 -1
- package/dist/src/config/outbound-proxy.d.ts +11 -0
- package/dist/src/config/outbound-proxy.js +30 -0
- package/dist/src/config/rules.js +5 -0
- package/dist/src/config/schema.d.ts +29 -6
- package/dist/src/config/schema.js +21 -4
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/config-tools-web.js +15 -4
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +3 -0
- package/dist/src/gateway/hono/lib/config-payload.d.ts +5 -0
- package/dist/src/gateway/hono/lib/config-payload.js +6 -1
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +7 -0
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- 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/lock.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -3
- package/dist/src/gateway/service.js +5 -3
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/infra/http-proxy-env.d.ts +3 -0
- package/dist/src/infra/http-proxy-env.js +22 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +11 -2
- package/dist/src/personal-agent/persona.d.ts +2 -1
- package/dist/src/personal-agent/persona.js +3 -2
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompts.d.ts +2 -0
- package/dist/src/personal-agent/prompts.js +69 -7
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/reply-style.d.ts +4 -2
- package/dist/src/personal-agent/reply-style.js +19 -3
- package/dist/src/personal-agent/request-service.js +14 -9
- package/dist/src/personal-agent/service.js +2 -2
- package/dist/src/pets/loopi-artwork.d.ts +2 -0
- package/dist/src/pets/loopi-artwork.js +36 -0
- package/dist/src/pets/pointer.d.ts +6 -0
- package/dist/src/pets/pointer.js +16 -0
- package/dist/src/project-trust/trust-store.d.ts +5 -0
- package/dist/src/project-trust/trust-store.js +7 -1
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +2 -0
- package/dist/src/providers/model-supplements.d.ts +0 -2
- package/dist/src/providers/model-supplements.js +2 -18
- package/dist/src/providers/xopc-cloud-credit-budget.d.ts +1 -0
- package/dist/src/providers/xopc-cloud-credit-budget.js +4 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +51 -40
- package/dist/src/tasks/task-application-service.js +5 -1
- package/dist/src/tasks/task-contract-planner.js +21 -6
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-language.d.ts +2 -0
- package/dist/src/tasks/task-language.js +13 -2
- package/dist/src/tasks/task-run-coordinator.js +5 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +2 -3
- package/package.json +8 -4
- package/dist/gateway/static/root/assets/activity-YogQEteU.js +0 -1
- package/dist/gateway/static/root/assets/activity-store-DtTSRUyF.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-0GXoU7WL.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BxDqL7uc.js +0 -1
- package/dist/gateway/static/root/assets/agents-CYmRcXr-.js +0 -77
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-FhWeowCY.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-DXin262V.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-2M_l4Naz.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CVIWgoTx.js +0 -6
- package/dist/gateway/static/root/assets/browser-automation-inputs-uVEhZWHz.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CEFnpvTO.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-sQpJic5b.js +0 -3
- package/dist/gateway/static/root/assets/button-aIC072nz.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-BSB93QBR.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BKkN4sTh.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DCZTR8Hu.js +0 -8
- package/dist/gateway/static/root/assets/capability-header-actions-D0HwmxyW.js +0 -1
- package/dist/gateway/static/root/assets/channels-DRraXYSd.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-DpM489kK.js +0 -36
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +0 -1
- package/dist/gateway/static/root/assets/chevron-right-BweFrslA.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/circle-dashed-8qMD7gHf.js +0 -1
- package/dist/gateway/static/root/assets/circle-dot-BAseJTrF.js +0 -1
- package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-D0ir9aA1.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-Y5SYaiJO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DRSbj4gn.js +0 -1
- package/dist/gateway/static/root/assets/copy-text-row-C7egVuKr.js +0 -1
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +0 -1
- package/dist/gateway/static/root/assets/date-picker-DyUP-8hR.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-QF9qLWIG.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-Qfns4SO-.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CuITd-Xa.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BP6iMVw1.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C8RPqM_F.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-DnD9eyoU.js +0 -1
- package/dist/gateway/static/root/assets/dist-C3DSFZCi.js +0 -1
- package/dist/gateway/static/root/assets/electron-env-Dit0bHgy.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-B5ikNsSj.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-D-PBMAtT.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-CdlACvkE.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BPUYMNb0.js +0 -1
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-uEdmIROn.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BKj4PQs4.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D1ZBF3me.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-BB3D6OV1.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-BCcWIxOO.js +0 -1
- package/dist/gateway/static/root/assets/index-Bo70AuAq.js +0 -260
- package/dist/gateway/static/root/assets/index-BxoR4_xr.css +0 -1
- package/dist/gateway/static/root/assets/index.module-Cd9ENXfk.js +0 -1
- package/dist/gateway/static/root/assets/interaction-BdhHBbYa.js +0 -1
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-Bc9UWPqr.js +0 -1
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-jnK1j04U.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-DpN8UN_Y.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DBR5mfxw.js +0 -2
- package/dist/gateway/static/root/assets/loopi-C09I2mNj.css +0 -1
- package/dist/gateway/static/root/assets/loopi-Djb8XU3l.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-rs2cdb5f.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Bl4kOOZT.js +0 -1
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +0 -1
- package/dist/gateway/static/root/assets/messages-B7VtMXec.js +0 -3
- package/dist/gateway/static/root/assets/mic-CuUb7zc-.js +0 -1
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-D0vR7vex.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-B7R-cZWE.js +0 -5
- package/dist/gateway/static/root/assets/notes-api-DZkezSIy.js +0 -2
- package/dist/gateway/static/root/assets/notes-page-DY9MNatd.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-C-X8J1IO.js +0 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CIZWUoUh.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGKUpVsz.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-BJU2fmPn.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-CYV_8zRl.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-DfQ9h_YX.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-B_fYXcAW.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CHdeAtpp.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CbJWGHW_.js +0 -1
- package/dist/gateway/static/root/assets/rotate-ccw-JM1TBLpp.js +0 -1
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-jqYXsCuk.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-DNXZLVqh.js +0 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-BxWHx6J6.js +0 -1
- package/dist/gateway/static/root/assets/send-session-input-NpLYu1ip.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-Bb9pevyM.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DrGCnBhV.js +0 -1
- package/dist/gateway/static/root/assets/settings-2-D-csvaET.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B61Eh7eB.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-draft-Dy10ldo8.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-num14vSv.js +0 -1
- package/dist/gateway/static/root/assets/settings-shell-dialog-layer-BU3UuiJr.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DaU9o0Ll.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-BhjQPZbF.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-LERhIwgz.js +0 -2
- package/dist/gateway/static/root/assets/shares-api-CgsiMdCX.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DmvyqIyT.js +0 -1
- package/dist/gateway/static/root/assets/skeleton-BI5TyibZ.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-plToSoFo.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-utils-C7V4JVXM.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BFw81Ar6.js +0 -1
- package/dist/gateway/static/root/assets/skill-wire-pattern-BPpeIcCi.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BLUsxGOo.js +0 -2
- package/dist/gateway/static/root/assets/style-1FPsMO2E.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-DL3WXRnL.js +0 -1
- package/dist/gateway/static/root/assets/tab-completion-input-D64VNmiA.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DWM5xGbe.js +0 -2
- package/dist/gateway/static/root/assets/theme-store-CPdeCbZI.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-m51enJFx.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-B5I53jzk.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-B7qyfnMN.js +0 -1
- package/dist/gateway/static/root/assets/use-async-resource-GrnWNwMZ.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-C2__K1-y.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-61W-5Q6m.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DZUWxdhm.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DkIuYpuf.js +0 -2
- package/dist/gateway/static/root/assets/voice-api-key-field-DB--pFJX.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cp2uDvFO.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-Blwp7T-_.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-RN_QXcGY.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-lHTRLje0.js +0 -2
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-D31rz9OQ.js +0 -1
- package/dist/src/agent/bootstrap/project-agents-context.d.ts +0 -2
- package/dist/src/agent/bootstrap/project-agents-context.js +0 -30
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./external-link-DjqjBmc3.js";import{a as r,n as i,r as a}from"./locale-store-CE7L6MlS.js";import{n as o,t as s}from"./cloud-credits-BMYMiiNn.js";import{i as c}from"./vendor-swr-BIWyz7Rc.js";import{Dl as l,Hc as u,Ic as d,Wd as f,au as p}from"./index-CKdOZoVu.js";var m=e(),h=t();function g(e){let t=(BigInt(e)+500n)/1000n*1000n;return o(String(t))}async function _(){let e=await r(a(`/api/models/xopc-cloud/account-summary`));return s.parse(e.payload)}function v(e){let t=(0,m.c)(148),{labels:r}=e,a=i(y)===`zh`?`zh-CN`:`en-US`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={refreshInterval:6e4,revalidateOnFocus:!0},t[0]=o):o=t[0];let{data:s,error:v,isLoading:b,isValidating:x,mutate:S}=c(`/api/models/xopc-cloud/account-summary`,_,o);if(b){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(d,{className:`h-40 w-full rounded-xl`}),t[1]=e):e=t[1],e}if(v||!s){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(l,{className:`mt-0.5 size-4 shrink-0 text-amber-500`,"aria-hidden":!0}),t[2]=e):e=t[2];let n;t[3]===r.title?n=t[4]:(n=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:r.title}),t[3]=r.title,t[4]=n);let i;t[5]===r.unavailable?i=t[6]:(i=(0,h.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:r.unavailable}),t[5]=r.unavailable,t[6]=i);let a;t[7]!==n||t[8]!==i?(a=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[e,(0,h.jsxs)(`div`,{children:[n,i]})]}),t[7]=n,t[8]=i,t[9]=a):a=t[9];let o;t[10]===S?o=t[11]:(o=()=>void S(),t[10]=S,t[11]=o);let s=x?`size-4 animate-spin`:`size-4`,c;t[12]===s?c=t[13]:(c=(0,h.jsx)(p,{className:s,"aria-hidden":!0}),t[12]=s,t[13]=c);let d;t[14]!==x||t[15]!==r.retry||t[16]!==o||t[17]!==c?(d=(0,h.jsxs)(u,{type:`button`,variant:`secondary`,disabled:x,onClick:o,children:[c,r.retry]}),t[14]=x,t[15]=r.retry,t[16]=o,t[17]=c,t[18]=d):d=t[18];let f;return t[19]!==a||t[20]!==d?(f=(0,h.jsx)(`section`,{className:`rounded-xl bg-surface-hover/25 p-4`,children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[a,d]})}),t[19]=a,t[20]=d,t[21]=f):f=t[21],f}let C,w,T,E,D,O,k,A,j,M;if(t[22]!==s.balance.availableCreditMicro||t[23]!==s.balance.expiring[0]||t[24]!==s.balance.grantedCreditMicro||t[25]!==s.balance.purchasedCreditMicro||t[26]!==s.balance.refundReservedCreditMicro||t[27]!==s.balance.usageReservedCreditMicro||t[28]!==s.links.details||t[29]!==s.links.purchase||t[30]!==s.usage.chargedCreditMicro||t[31]!==s.usage.requests||t[32]!==s.usage.totalTokens||t[33]!==r.availableCredits||t[34]!==r.connected||t[35]!==r.details||t[36]!==r.expiring||t[37]!==r.granted||t[38]!==r.purchase||t[39]!==r.purchased||t[40]!==r.recentUsage||t[41]!==r.reserved||t[42]!==r.title||t[43]!==r.tokenUsage||t[44]!==r.usageSummary||t[45]!==r.zeroBalance||t[46]!==a){let e=new Intl.NumberFormat(a),i=r.usageSummary.replace(`{{credits}}`,g(s.usage.chargedCreditMicro)).replace(`{{requests}}`,e.format(s.usage.requests));C=`rounded-xl bg-surface-hover/40 p-4 sm:p-5`;let o;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,h.jsx)(f,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),t[57]=o):o=t[57];let c;t[58]===r.title?c=t[59]:(c=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:r.title}),t[58]=r.title,t[59]=c);let l;t[60]===r.connected?l=t[61]:(l=(0,h.jsx)(`span`,{className:`rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:text-emerald-300`,children:r.connected}),t[60]=r.connected,t[61]=l);let d;t[62]!==c||t[63]!==l?(d=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[o,c,l]}),t[62]=c,t[63]=l,t[64]=d):d=t[64];let p;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(n,{className:`size-3.5`,"aria-hidden":!0}),t[65]=p):p=t[65];let m;t[66]!==s.links.purchase||t[67]!==r.purchase?(m=(0,h.jsx)(u,{asChild:!0,variant:`primary`,children:(0,h.jsxs)(`a`,{href:s.links.purchase,target:`_blank`,rel:`noreferrer`,children:[r.purchase,p]})}),t[66]=s.links.purchase,t[67]=r.purchase,t[68]=m):m=t[68];let _;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(n,{className:`size-3.5`,"aria-hidden":!0}),t[69]=_):_=t[69];let v;t[70]!==s.links.details||t[71]!==r.details?(v=(0,h.jsx)(u,{asChild:!0,variant:`secondary`,children:(0,h.jsxs)(`a`,{href:s.links.details,target:`_blank`,rel:`noreferrer`,children:[r.details,_]})}),t[70]=s.links.details,t[71]=r.details,t[72]=v):v=t[72];let y;t[73]!==m||t[74]!==v?(y=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap gap-2`,children:[m,v]}),t[73]=m,t[74]=v,t[75]=y):y=t[75],t[76]!==d||t[77]!==y?(w=(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[d,y]}),t[76]=d,t[77]=y,t[78]=w):w=t[78],j=`mt-4 grid gap-4 rounded-lg bg-surface-base/45 p-3 sm:grid-cols-[minmax(12rem,0.7fr)_minmax(0,1.3fr)] sm:gap-6`;let b;t[79]===r.availableCredits?b=t[80]:(b=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:r.availableCredits}),t[79]=r.availableCredits,t[80]=b);let x;t[81]===s.balance.availableCreditMicro?x=t[82]:(x=g(s.balance.availableCreditMicro),t[81]=s.balance.availableCreditMicro,t[82]=x);let S;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`ml-2 text-sm font-medium text-fg-muted`,children:`Credits`}),t[83]=S):S=t[83];let N;t[84]===x?N=t[85]:(N=(0,h.jsxs)(`p`,{className:`mt-1 text-2xl font-semibold tracking-tight text-fg`,children:[x,S]}),t[84]=x,t[85]=N);let P;t[86]!==s.balance.availableCreditMicro||t[87]!==r.zeroBalance?(P=s.balance.availableCreditMicro===`0`?(0,h.jsx)(`p`,{className:`mt-1 text-sm font-medium text-danger`,children:r.zeroBalance}):null,t[86]=s.balance.availableCreditMicro,t[87]=r.zeroBalance,t[88]=P):P=t[88];let F=r.purchased,I;t[89]===s.balance.purchasedCreditMicro?I=t[90]:(I=g(s.balance.purchasedCreditMicro),t[89]=s.balance.purchasedCreditMicro,t[90]=I);let L;t[91]!==r.purchased||t[92]!==I?(L=(0,h.jsxs)(`div`,{children:[F,`: `,I,` Credits`]}),t[91]=r.purchased,t[92]=I,t[93]=L):L=t[93];let R=r.granted,z;t[94]===s.balance.grantedCreditMicro?z=t[95]:(z=g(s.balance.grantedCreditMicro),t[94]=s.balance.grantedCreditMicro,t[95]=z);let B;t[96]!==r.granted||t[97]!==z?(B=(0,h.jsxs)(`div`,{children:[R,`: `,z,` Credits`]}),t[96]=r.granted,t[97]=z,t[98]=B):B=t[98];let V=r.reserved,H=String(BigInt(s.balance.usageReservedCreditMicro)+BigInt(s.balance.refundReservedCreditMicro)),U;t[99]===H?U=t[100]:(U=g(H),t[99]=H,t[100]=U);let W;t[101]!==r.reserved||t[102]!==U?(W=(0,h.jsxs)(`div`,{children:[V,`: `,U,` Credits`]}),t[101]=r.reserved,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==L||t[105]!==B||t[106]!==W?(G=(0,h.jsxs)(`div`,{className:`mt-2 space-y-1 text-xs text-fg-muted`,children:[L,B,W]}),t[104]=L,t[105]=B,t[106]=W,t[107]=G):G=t[107];let K;t[108]!==s.balance.expiring[0]||t[109]!==r.expiring||t[110]!==a?(K=s.balance.expiring[0]?(0,h.jsx)(`p`,{className:`mt-2 text-xs text-amber-600 dark:text-amber-400`,children:r.expiring.replace(`{{credits}}`,g(s.balance.expiring[0].creditMicro)).replace(`{{date}}`,new Date(s.balance.expiring[0].expiresAt).toLocaleDateString(a))}):null,t[108]=s.balance.expiring[0],t[109]=r.expiring,t[110]=a,t[111]=K):K=t[111],t[112]!==b||t[113]!==N||t[114]!==P||t[115]!==G||t[116]!==K?(M=(0,h.jsxs)(`div`,{children:[b,N,P,G,K]}),t[112]=b,t[113]=N,t[114]=P,t[115]=G,t[116]=K,t[117]=M):M=t[117],t[118]===r.recentUsage?k=t[119]:(k=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:r.recentUsage}),t[118]=r.recentUsage,t[119]=k),A=(0,h.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:i}),D=`mt-2 text-xs text-fg-subtle`,t[120]===r.tokenUsage?O=t[121]:(O=(0,h.jsx)(`summary`,{className:`cursor-pointer`,children:r.tokenUsage}),t[120]=r.tokenUsage,t[121]=O),T=`mt-1`,E=e.format(s.usage.totalTokens),t[22]=s.balance.availableCreditMicro,t[23]=s.balance.expiring[0],t[24]=s.balance.grantedCreditMicro,t[25]=s.balance.purchasedCreditMicro,t[26]=s.balance.refundReservedCreditMicro,t[27]=s.balance.usageReservedCreditMicro,t[28]=s.links.details,t[29]=s.links.purchase,t[30]=s.usage.chargedCreditMicro,t[31]=s.usage.requests,t[32]=s.usage.totalTokens,t[33]=r.availableCredits,t[34]=r.connected,t[35]=r.details,t[36]=r.expiring,t[37]=r.granted,t[38]=r.purchase,t[39]=r.purchased,t[40]=r.recentUsage,t[41]=r.reserved,t[42]=r.title,t[43]=r.tokenUsage,t[44]=r.usageSummary,t[45]=r.zeroBalance,t[46]=a,t[47]=C,t[48]=w,t[49]=T,t[50]=E,t[51]=D,t[52]=O,t[53]=k,t[54]=A,t[55]=j,t[56]=M}else C=t[47],w=t[48],T=t[49],E=t[50],D=t[51],O=t[52],k=t[53],A=t[54],j=t[55],M=t[56];let N;t[122]!==T||t[123]!==E?(N=(0,h.jsxs)(`p`,{className:T,children:[E,` tokens`]}),t[122]=T,t[123]=E,t[124]=N):N=t[124];let P;t[125]!==N||t[126]!==D||t[127]!==O?(P=(0,h.jsxs)(`details`,{className:D,children:[O,N]}),t[125]=N,t[126]=D,t[127]=O,t[128]=P):P=t[128];let F;t[129]!==s.balance.updatedAt||t[130]!==r.updatedAt||t[131]!==a?(F=r.updatedAt.replace(`{{time}}`,new Date(s.balance.updatedAt).toLocaleString(a)),t[129]=s.balance.updatedAt,t[130]=r.updatedAt,t[131]=a,t[132]=F):F=t[132];let I;t[133]===F?I=t[134]:(I=(0,h.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:F}),t[133]=F,t[134]=I);let L;t[135]!==P||t[136]!==I||t[137]!==k||t[138]!==A?(L=(0,h.jsxs)(`div`,{children:[k,A,P,I]}),t[135]=P,t[136]=I,t[137]=k,t[138]=A,t[139]=L):L=t[139];let R;t[140]!==L||t[141]!==j||t[142]!==M?(R=(0,h.jsxs)(`div`,{className:j,children:[M,L]}),t[140]=L,t[141]=j,t[142]=M,t[143]=R):R=t[143];let z;return t[144]!==C||t[145]!==w||t[146]!==R?(z=(0,h.jsxs)(`section`,{className:C,children:[w,R]}),t[144]=C,t[145]=w,t[146]=R,t[147]=z):z=t[147],z}function y(e){return e.language}export{v as t};
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CKdOZoVu.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/dist-CxGUk8J-.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/es2015-DBLcMg5B.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-CaeL_miw.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-CE7L6MlS.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/floating-ui.dom-B7uQOZZW.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/dist-CI_fqRk-.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/dist-BGTk37IG.js">
|
|
@@ -37,83 +37,33 @@
|
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/cn-0WouolD0.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
41
|
-
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
42
|
-
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/assets/button-aIC072nz.js">
|
|
44
|
-
<link rel="modulepreload" crossorigin href="/assets/copy-text-row-C7egVuKr.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-PrKvVpRh.js">
|
|
45
41
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
46
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/chevron-left-DqFhpbvK.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/chevron-right-BweFrslA.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-C3DSFZCi.js">
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-BI5TyibZ.js">
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/assets/settings-shell-dialog-layer-BU3UuiJr.js">
|
|
52
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-select-DGKUpVsz.js">
|
|
53
|
-
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
42
|
+
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
54
43
|
<link rel="modulepreload" crossorigin href="/assets/circle-check-C23XjkUj.js">
|
|
55
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/circle-dot-BAseJTrF.js">
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/cloud-C4-yfnnk.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
58
45
|
<link rel="modulepreload" crossorigin href="/assets/ellipsis-0k4rZLoy.js">
|
|
59
46
|
<link rel="modulepreload" crossorigin href="/assets/external-link-DjqjBmc3.js">
|
|
60
47
|
<link rel="modulepreload" crossorigin href="/assets/eye-CABVeTq0.js">
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CifKLtgG.js">
|
|
62
|
-
<link rel="modulepreload" crossorigin href="/assets/form-field-width-DJw_jULe.js">
|
|
63
|
-
<link rel="modulepreload" crossorigin href="/assets/interaction-BdhHBbYa.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="/assets/is-masked-secret-DOkL5b_X.js">
|
|
65
|
-
<link rel="modulepreload" crossorigin href="/assets/secret-input-BxWHx6J6.js">
|
|
66
48
|
<link rel="modulepreload" crossorigin href="/assets/folder-open-CyzJ19I9.js">
|
|
67
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
68
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
69
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
70
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
71
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/index.module-Cd9ENXfk.js">
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-DosoyMIH.js">
|
|
74
|
-
<link rel="modulepreload" crossorigin href="/assets/session-api-Br11ih_M.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-DtlBf7oH.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-Dng_VOvI.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-CYEDUPH7.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CDCiy7Cd.js">
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/session-api-CaAUJvu1.js">
|
|
75
54
|
<link rel="modulepreload" crossorigin href="/assets/constants-DeXt1mV-.js">
|
|
76
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
55
|
+
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BO2Ck3aA.js">
|
|
77
57
|
<link rel="modulepreload" crossorigin href="/assets/attachment-utils-core-BIOUBrpT.js">
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
79
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
80
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/use-async-resource-GrnWNwMZ.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-DtTSRUyF.js">
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-DZUWxdhm.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/mic-CuUb7zc-.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-BhjQPZbF.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-Bye3ZtsW.js">
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-BEePO3Wl.js">
|
|
59
|
+
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-B5aykqg_.js">
|
|
60
|
+
<link rel="modulepreload" crossorigin href="/assets/session-manager-DoFTlgNz.js">
|
|
88
61
|
<link rel="modulepreload" crossorigin href="/assets/specialists-4bkS5rZ4.js">
|
|
89
62
|
<link rel="modulepreload" crossorigin href="/assets/tasks-PuIUgF9L.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/shares-api-CgsiMdCX.js">
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-BSB93QBR.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-61W-5Q6m.js">
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/notes-api-DZkezSIy.js">
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/rotate-ccw-JM1TBLpp.js">
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/settings-2-D-csvaET.js">
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-uEdmIROn.js">
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-DS_GDx-x.js">
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-DLHHYP_v.js">
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-BM__9Fws.js">
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-znm6_dW_.js">
|
|
104
|
-
<link rel="modulepreload" crossorigin href="/assets/session-manager-Bb9pevyM.js">
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/voice-transcribe-api-Cp2uDvFO.js">
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/send-session-input-NpLYu1ip.js">
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-CPdeCbZI.js">
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-provider-CdlACvkE.js">
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/loopi-Djb8XU3l.js">
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-D0vR7vex.js">
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/skill-api-utils-C7V4JVXM.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/date-formatters-CUZAyDEg.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/settings-form-draft-Dy10ldo8.js">
|
|
63
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-pt2M56-E.js">
|
|
64
|
+
<link rel="modulepreload" crossorigin href="/assets/files-Bw4SBGdM.js">
|
|
114
65
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Ct4sKkUf.css">
|
|
115
|
-
<link rel="stylesheet" crossorigin href="/assets/
|
|
116
|
-
<link rel="stylesheet" crossorigin href="/assets/index-BxoR4_xr.css">
|
|
66
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Rxjt-jc3.css">
|
|
117
67
|
</head>
|
|
118
68
|
<body>
|
|
119
69
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -26,6 +26,8 @@ export interface AgentInstanceGateway {
|
|
|
26
26
|
* `workingDirectoryOverride` previously set via `setSessionWorkspaceOverride`.
|
|
27
27
|
*/
|
|
28
28
|
getResolvedWorkspaceForSession(conversationId: string): string;
|
|
29
|
+
/** Shared project trust policy, including host-provided temporary trust. */
|
|
30
|
+
isProjectWorkspaceTrusted?(workspaceDir: string): boolean;
|
|
29
31
|
/**
|
|
30
32
|
* Apply (or clear) the per-session workspace override. Passing `null`
|
|
31
33
|
* removes the override so the session falls back to the agent default.
|
|
@@ -214,7 +214,7 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
214
214
|
private buildSystemPromptForInstance;
|
|
215
215
|
/** Structured SKILL.md preview for the gateway console. */
|
|
216
216
|
getSkillMarkdownSource(skillName: string): SkillMarkdownPreviewPayload | null;
|
|
217
|
-
|
|
217
|
+
isProjectWorkspaceTrusted(workspaceDir: string): boolean;
|
|
218
218
|
private resolveContextFilesForSession;
|
|
219
219
|
private skillCatalogEntryFromSkill;
|
|
220
220
|
getSkillCatalog(): SkillCatalogEntry[];
|
|
@@ -6,11 +6,12 @@ import { consumeClarificationApproval, init_clarification_wait_repository } from
|
|
|
6
6
|
import { getInteractionState } from "../storage/sqlite/interaction-state-repository.js";
|
|
7
7
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
8
8
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
9
|
+
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
10
|
+
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir } from "./agent-scope.js";
|
|
11
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
9
12
|
import { connectorArgumentsPreview } from "../connectors/approval.js";
|
|
10
13
|
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
11
14
|
import { enqueueConversationLearning } from "../memory-learning/repository.js";
|
|
12
|
-
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
13
|
-
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir } from "./agent-scope.js";
|
|
14
15
|
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
15
16
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
16
17
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
@@ -21,7 +22,6 @@ import { createExtensionAwareStreamFn } from "../providers/extension-stream-brid
|
|
|
21
22
|
import { traceTools } from "../observability/runtime.js";
|
|
22
23
|
import { continuesAfterTool, trackAiUsageStream } from "../usage/recorder.js";
|
|
23
24
|
import { MemoryLearningService } from "../memory-learning/service.js";
|
|
24
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
25
25
|
import { runPersistentLearningJob } from "./background-review/run-background-review.js";
|
|
26
26
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
27
27
|
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
@@ -30,7 +30,6 @@ import { resolveExecutionToolPolicy } from "./embedded/execution-tool-policy.js"
|
|
|
30
30
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
31
31
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
32
32
|
import { resolveBootstrapContextSync } from "./bootstrap/bootstrap-files.js";
|
|
33
|
-
import { loadProjectAgentsContextFile } from "./bootstrap/project-agents-context.js";
|
|
34
33
|
import { getEmbeddedExecutionRunId } from "./embedded/execution-context.js";
|
|
35
34
|
import { loadSkillsLock } from "./skills/hub-lock.js";
|
|
36
35
|
import { isUnderManagedSkillsDir } from "./skills/managed-store.js";
|
|
@@ -39,6 +38,7 @@ import { isValidSkillEnvVarName } from "./skills/required-env-vars.js";
|
|
|
39
38
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
40
39
|
import { abortEmbeddedRun } from "./embedded/runs.js";
|
|
41
40
|
import { evictAllEmbeddedSessionRunners, evictEmbeddedSessionRunner } from "./embedded/session-runner.js";
|
|
41
|
+
import { ProjectTrustStore, hasTrustRequiringProjectResources, isProjectWorkspaceTrusted } from "../project-trust/trust-store.js";
|
|
42
42
|
import { createAgentTurnPolicy } from "./orchestration/agent-turn-policy.js";
|
|
43
43
|
import { createAgentCapabilitySessionState, resolveAgentCapabilityCatalog } from "./capabilities/registry.js";
|
|
44
44
|
import "./capabilities/index.js";
|
|
@@ -50,7 +50,6 @@ import { ExecutionContextCoordinator } from "./context/coordinator.js";
|
|
|
50
50
|
import { WorkspaceRuntimeRegistry } from "./workspace-runtime/registry.js";
|
|
51
51
|
import { maybeRequestChannelExecApproval } from "../channels/exec-approval-runtime.js";
|
|
52
52
|
import { SkillFilesystemWatcher } from "./skills/filesystem-watcher.js";
|
|
53
|
-
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
54
53
|
import { replaceAgentSystemPrompt } from "./prompt/agent-system-prompt.js";
|
|
55
54
|
import { basename, resolve, sep } from "node:path";
|
|
56
55
|
import { createHash } from "node:crypto";
|
|
@@ -267,6 +266,7 @@ var AgentManager = class {
|
|
|
267
266
|
*/
|
|
268
267
|
buildToolsFactoryDeps() {
|
|
269
268
|
return {
|
|
269
|
+
isWorkspaceTrusted: (workspaceDir) => this.isProjectWorkspaceTrusted(workspaceDir),
|
|
270
270
|
workspace: this.baseWorkspacePath,
|
|
271
271
|
extensionRegistry: this.config.extensionRegistry,
|
|
272
272
|
endpointTools: this.config.endpointTools,
|
|
@@ -474,12 +474,11 @@ var AgentManager = class {
|
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
476
|
isProjectWorkspaceTrusted(workspaceDir) {
|
|
477
|
-
if (!hasTrustRequiringProjectResources(workspaceDir)) return false;
|
|
478
|
-
const persisted = this.projectTrustStore.get(workspaceDir);
|
|
479
|
-
if (persisted === false) return false;
|
|
480
|
-
if (persisted === true) return true;
|
|
481
477
|
try {
|
|
482
|
-
return
|
|
478
|
+
return isProjectWorkspaceTrusted(workspaceDir, {
|
|
479
|
+
trustStore: this.projectTrustStore,
|
|
480
|
+
isWorkspaceTrusted: this.config.isWorkspaceTrusted
|
|
481
|
+
});
|
|
483
482
|
} catch (err) {
|
|
484
483
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
485
484
|
log.warn({
|
|
@@ -492,20 +491,12 @@ var AgentManager = class {
|
|
|
492
491
|
}
|
|
493
492
|
resolveContextFilesForSession(conversationId, profile) {
|
|
494
493
|
const cfg = this.config.config;
|
|
495
|
-
const profileDir = resolveAgentProfileDir(profile.agentId);
|
|
496
|
-
const contextInjection = "always";
|
|
497
494
|
const { contextFiles } = resolveBootstrapContextSync({
|
|
498
|
-
profileDir,
|
|
495
|
+
profileDir: resolveAgentProfileDir(profile.agentId),
|
|
499
496
|
config: cfg,
|
|
500
497
|
conversationId,
|
|
501
|
-
contextInjection
|
|
498
|
+
contextInjection: "always"
|
|
502
499
|
});
|
|
503
|
-
const shouldAppendProjectContext = contextInjection === "always" || contextInjection === "continuation-skip" && contextFiles.length > 0;
|
|
504
|
-
const workspaceDir = this.getResolvedWorkspaceForSession(conversationId);
|
|
505
|
-
if (shouldAppendProjectContext && this.isProjectWorkspaceTrusted(workspaceDir)) {
|
|
506
|
-
const projectAgentsFile = loadProjectAgentsContextFile(workspaceDir);
|
|
507
|
-
if (projectAgentsFile) contextFiles.push(projectAgentsFile);
|
|
508
|
-
}
|
|
509
500
|
return contextFiles;
|
|
510
501
|
}
|
|
511
502
|
skillCatalogEntryFromSkill(s, skillsConfig = createSkillConfigManager(resolveStateDir()).load(), lock = loadSkillsLock(), workspaceLock, workspaceDir) {
|
|
@@ -5,6 +5,7 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
5
5
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
6
6
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
7
7
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
|
+
import { extractTextContent } from "../context/workspace.js";
|
|
8
9
|
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
9
10
|
import { failLearningJob, finishLearningJob, learningPolicyHash } from "../../memory-learning/repository.js";
|
|
10
11
|
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
@@ -22,7 +23,6 @@ import { getAssertionSlot, listUserAssertions } from "../../user-model/repositor
|
|
|
22
23
|
import { emptyUserModelCaptureResult, executeUserModelInterpretation } from "../../user-model/capture/executor.js";
|
|
23
24
|
import { parseUserModelInterpretation } from "../../user-model/capture/semantic.js";
|
|
24
25
|
import "../../user-model/capture/index.js";
|
|
25
|
-
import { extractTextContent } from "../context/workspace.js";
|
|
26
26
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
27
27
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
28
28
|
import { getAssistantTurnErrorMessage, getLastAssistantMessage, isAssistantTurnAborted, isAssistantTurnFailed } from "../orchestration/llm-turn-retry.js";
|
|
@@ -17,7 +17,7 @@ export interface BuildChildToolsOptions {
|
|
|
17
17
|
getConfig: () => Config | undefined;
|
|
18
18
|
toolExecutorConfig?: Partial<ToolExecutorConfig>;
|
|
19
19
|
endpointTools?: EndpointToolRuntime;
|
|
20
|
-
|
|
20
|
+
conversationId: string;
|
|
21
21
|
}
|
|
22
22
|
export interface DelegateChildProgressHooks {
|
|
23
23
|
mode: 'steps' | 'full';
|
|
@@ -33,6 +33,7 @@ export interface DelegateChildProgressHooks {
|
|
|
33
33
|
}) => void;
|
|
34
34
|
}
|
|
35
35
|
export interface DelegateChildHandleOptions {
|
|
36
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean | null | undefined;
|
|
36
37
|
/** Host-owned completion signal, e.g. a validated structured result. */
|
|
37
38
|
isComplete?: () => boolean;
|
|
38
39
|
authorizeToolCall?: import('./orchestration/agent-turn-policy.js').AgentTurnPolicyOptions['authorizeToolCall'];
|
|
@@ -42,7 +42,7 @@ function createDelegateChildHandle(options) {
|
|
|
42
42
|
agentId: options.agentId,
|
|
43
43
|
getConfig: options.getConfig,
|
|
44
44
|
toolExecutorConfig: options.toolExecutorConfig,
|
|
45
|
-
|
|
45
|
+
conversationId
|
|
46
46
|
}).filter((tool) => allow.has(tool.name)).map((tool) => tool.name === "data_batch" ? {
|
|
47
47
|
...tool,
|
|
48
48
|
execute: (id, args, signal, onUpdate) => withDataToolPermissions(allow, () => tool.execute(id, args, signal, onUpdate))
|
|
@@ -119,6 +119,7 @@ function createDelegateChildHandle(options) {
|
|
|
119
119
|
conversationId,
|
|
120
120
|
runId: randomUUID(),
|
|
121
121
|
workspaceDir: options.workspace,
|
|
122
|
+
isWorkspaceTrusted: options.isWorkspaceTrusted,
|
|
122
123
|
userMessage: {
|
|
123
124
|
role: "user",
|
|
124
125
|
content: options.goal,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentMessage } from '@earendil-works/pi-agent-core';
|
|
2
|
+
/** Share repeated evidence only in model input; the authoritative transcript stays intact. */
|
|
3
|
+
export declare function projectWorkEvidence(source: readonly AgentMessage[]): {
|
|
4
|
+
messages: AgentMessage[];
|
|
5
|
+
sharedReviews: number;
|
|
6
|
+
sharedReads: number;
|
|
7
|
+
sharedWriteArguments: number;
|
|
8
|
+
savedChars: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
//#region src/agent/coding/projectEvidence.ts
|
|
3
|
+
function record(value) {
|
|
4
|
+
return value && typeof value === "object" ? value : {};
|
|
5
|
+
}
|
|
6
|
+
/** Share repeated evidence only in model input; the authoritative transcript stays intact. */
|
|
7
|
+
function projectWorkEvidence(source) {
|
|
8
|
+
const messages = [...source];
|
|
9
|
+
let review;
|
|
10
|
+
const reads = /* @__PURE__ */ new Map();
|
|
11
|
+
let savedChars = 0;
|
|
12
|
+
const sharedReviews = /* @__PURE__ */ new Set(), sharedReads = /* @__PURE__ */ new Set();
|
|
13
|
+
const writeCalls = /* @__PURE__ */ new Map();
|
|
14
|
+
const successfulWritePaths = /* @__PURE__ */ new Map();
|
|
15
|
+
const written = /* @__PURE__ */ new Map();
|
|
16
|
+
for (let index = 0; index < messages.length; index++) {
|
|
17
|
+
const message = messages[index];
|
|
18
|
+
if (message.role === "assistant") for (const block of message.content) {
|
|
19
|
+
if (block.type !== "toolCall" || block.name !== "write_file") continue;
|
|
20
|
+
const args = record(block.arguments);
|
|
21
|
+
if (typeof args.path === "string" && typeof args.content === "string") writeCalls.set(block.id, {
|
|
22
|
+
path: args.path.replace(/^\.\//, ""),
|
|
23
|
+
content: args.content
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (message.role !== "toolResult" || message.isError || message.content.some((block) => block.type !== "text")) continue;
|
|
27
|
+
const details = record(message.details);
|
|
28
|
+
if (message.toolName === "write_file" && typeof details.path === "string") {
|
|
29
|
+
const call = writeCalls.get(message.toolCallId);
|
|
30
|
+
if (call && ![
|
|
31
|
+
"failed",
|
|
32
|
+
"blocked",
|
|
33
|
+
"timed_out",
|
|
34
|
+
"cancelled",
|
|
35
|
+
"interrupted"
|
|
36
|
+
].includes(String(details.status))) {
|
|
37
|
+
written.set(details.path, {
|
|
38
|
+
...call,
|
|
39
|
+
id: message.toolCallId
|
|
40
|
+
});
|
|
41
|
+
successfulWritePaths.set(message.toolCallId, details.path);
|
|
42
|
+
}
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const reference = (write) => `[Identical content retained in successful write_file call ${write.id}, arguments.content; SHA-256 ${createHash("sha256").update(write.content).digest("hex")}. Reuse that full text. This reference is not a new read, write, or verification.]`;
|
|
46
|
+
let saved = 0;
|
|
47
|
+
const content = message.content.map((block) => {
|
|
48
|
+
if (block.type !== "text") return block;
|
|
49
|
+
let text = block.text;
|
|
50
|
+
if (message.toolName === "read_file" && details.truncated === false && details.offset === 1 && typeof details.path === "string") {
|
|
51
|
+
const write = written.get(details.path) ?? [...written.values()].find((item) => item.content === text);
|
|
52
|
+
if (write && text === write.content && text.length > 1024) {
|
|
53
|
+
const replacement = reference(write);
|
|
54
|
+
if (replacement.length + 256 < text.length) text = replacement;
|
|
55
|
+
}
|
|
56
|
+
} else if (message.toolName === "review_workspace" && details.complete === true && record(details.verification).status === "passed") for (const write of written.values()) {
|
|
57
|
+
if (write.content.length <= 1024 || /[\r\n]/.test(write.path)) continue;
|
|
58
|
+
const prefix = `\nUntracked file: ${write.path}\n`;
|
|
59
|
+
const start = text.indexOf(prefix + write.content);
|
|
60
|
+
if (start < 0) continue;
|
|
61
|
+
const end = start + prefix.length + write.content.length;
|
|
62
|
+
if (end !== text.length && !text.slice(end).startsWith("\nUntracked file: ")) continue;
|
|
63
|
+
const replacement = reference(write);
|
|
64
|
+
if (replacement.length + 256 < write.content.length) text = text.slice(0, start) + prefix + replacement + text.slice(end);
|
|
65
|
+
}
|
|
66
|
+
saved += block.text.length - text.length;
|
|
67
|
+
return text === block.text ? block : {
|
|
68
|
+
...block,
|
|
69
|
+
text
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
if (saved > 0) {
|
|
73
|
+
messages[index] = {
|
|
74
|
+
...message,
|
|
75
|
+
content
|
|
76
|
+
};
|
|
77
|
+
savedChars += saved;
|
|
78
|
+
if (message.toolName === "read_file") sharedReads.add(index);
|
|
79
|
+
else sharedReviews.add(index);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
let sharedWriteArguments = 0;
|
|
83
|
+
for (let index = 0; index < messages.length; index++) {
|
|
84
|
+
const message = messages[index];
|
|
85
|
+
if (message.role !== "assistant") continue;
|
|
86
|
+
let changed = false;
|
|
87
|
+
const content = message.content.map((block) => {
|
|
88
|
+
if (block.type !== "toolCall" || block.name !== "write_file") return block;
|
|
89
|
+
const args = record(block.arguments);
|
|
90
|
+
const path = successfulWritePaths.get(block.id);
|
|
91
|
+
const latest = path ? written.get(path) : void 0;
|
|
92
|
+
if (!latest || latest.id === block.id || typeof args.content !== "string" || args.content.length <= 1024) return block;
|
|
93
|
+
const older = args.content.split("\n"), base = latest.content.split("\n");
|
|
94
|
+
let prefix = 0, suffix = 0;
|
|
95
|
+
while (prefix < Math.min(older.length, base.length) && older[prefix] === base[prefix]) prefix++;
|
|
96
|
+
while (suffix < Math.min(older.length, base.length) - prefix && older[older.length - 1 - suffix] === base[base.length - 1 - suffix]) suffix++;
|
|
97
|
+
const encoded = "[xopc historical argument encoding; not literal file contents]\n" + JSON.stringify({
|
|
98
|
+
referenceToolCallId: latest.id,
|
|
99
|
+
referenceSha256: createHash("sha256").update(latest.content).digest("hex"),
|
|
100
|
+
originalSha256: createHash("sha256").update(args.content).digest("hex"),
|
|
101
|
+
prefixLines: prefix,
|
|
102
|
+
suffixLines: suffix,
|
|
103
|
+
middleLines: older.slice(prefix, older.length - suffix),
|
|
104
|
+
meaning: "Reconstruct this historical arguments.content from the referenced full write: prefix lines + middleLines + suffix lines. No new execution or verification is implied."
|
|
105
|
+
});
|
|
106
|
+
if (encoded.length >= args.content.length || JSON.stringify(encoded).length + 512 >= JSON.stringify(args.content).length) return block;
|
|
107
|
+
savedChars += args.content.length - encoded.length;
|
|
108
|
+
sharedWriteArguments++;
|
|
109
|
+
changed = true;
|
|
110
|
+
return {
|
|
111
|
+
...block,
|
|
112
|
+
arguments: {
|
|
113
|
+
...args,
|
|
114
|
+
content: encoded
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
if (changed) messages[index] = {
|
|
119
|
+
...message,
|
|
120
|
+
content
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
for (let index = messages.length - 1; index >= 0; index--) {
|
|
124
|
+
const message = messages[index];
|
|
125
|
+
if (message.role === "user") {
|
|
126
|
+
review = void 0;
|
|
127
|
+
reads.clear();
|
|
128
|
+
}
|
|
129
|
+
if (message.role !== "toolResult" || message.isError || message.content.some((block) => block.type !== "text")) continue;
|
|
130
|
+
const details = record(message.details);
|
|
131
|
+
const text = message.content.map((block) => block.type === "text" ? block.text : "").join("\n");
|
|
132
|
+
let replacement = "";
|
|
133
|
+
if (message.toolName === "review_workspace" && details.complete === true && record(details.verification).status === "passed" && typeof details.workspaceRevision === "string") {
|
|
134
|
+
const lines = text.split("\n");
|
|
135
|
+
if (review) {
|
|
136
|
+
let prefix = 0, suffix = 0;
|
|
137
|
+
while (prefix < Math.min(lines.length, review.lines.length) && lines[prefix] === review.lines[prefix]) prefix++;
|
|
138
|
+
while (suffix < Math.min(lines.length, review.lines.length) - prefix && lines[lines.length - 1 - suffix] === review.lines[review.lines.length - 1 - suffix]) suffix++;
|
|
139
|
+
const middle = lines.slice(prefix, lines.length - suffix);
|
|
140
|
+
replacement = `Earlier workspace review: reuse the first ${prefix} lines and last ${suffix} lines of the last complete review in this user turn (original receipt ${review.id}). The differing lines from THIS earlier review are:\n${middle.length ? middle.join("\n") : "(no differing lines)"}\n[End earlier differing lines. This is context sharing, not a new review or verification.]`;
|
|
141
|
+
} else review = {
|
|
142
|
+
id: message.toolCallId,
|
|
143
|
+
lines
|
|
144
|
+
};
|
|
145
|
+
} else if (message.toolName === "read_file" && details.truncated === false && typeof details.path === "string") {
|
|
146
|
+
const key = createHash("sha256").update(JSON.stringify([
|
|
147
|
+
details.path,
|
|
148
|
+
details.offset,
|
|
149
|
+
details.totalLines,
|
|
150
|
+
message.content
|
|
151
|
+
])).digest("hex");
|
|
152
|
+
const later = reads.get(key);
|
|
153
|
+
if (later) replacement = `Identical successful read of ${details.path}; use the later retained read_file result for the same file and excerpt (original receipt ${later}). No new read is implied by this context reference.`;
|
|
154
|
+
else reads.set(key, message.toolCallId);
|
|
155
|
+
}
|
|
156
|
+
if (!replacement || replacement.length + 256 >= text.length) continue;
|
|
157
|
+
messages[index] = {
|
|
158
|
+
...message,
|
|
159
|
+
content: [{
|
|
160
|
+
type: "text",
|
|
161
|
+
text: replacement
|
|
162
|
+
}]
|
|
163
|
+
};
|
|
164
|
+
if (message.toolName === "review_workspace") sharedReviews.add(index);
|
|
165
|
+
else sharedReads.add(index);
|
|
166
|
+
savedChars += text.length - replacement.length;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
messages,
|
|
170
|
+
sharedReviews: sharedReviews.size,
|
|
171
|
+
sharedReads: sharedReads.size,
|
|
172
|
+
sharedWriteArguments,
|
|
173
|
+
savedChars
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
export { projectWorkEvidence };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { type ProjectTrustStore } from '../../project-trust/trust-store.js';
|
|
2
|
+
type RepositoryInstructionTrust = {
|
|
3
|
+
trustStore?: ProjectTrustStore;
|
|
4
|
+
isWorkspaceTrusted?: (path: string) => boolean | null | undefined;
|
|
5
|
+
};
|
|
1
6
|
/** Reload scoped instructions on content changes; never follow instruction links outside the repository. */
|
|
2
7
|
export declare class RepositoryInstructions {
|
|
3
8
|
private readonly root;
|
|
4
9
|
private readonly workspace;
|
|
10
|
+
private readonly trust;
|
|
5
11
|
private readonly seen;
|
|
6
12
|
private readonly pending;
|
|
7
13
|
acknowledge(): void;
|
|
8
14
|
private constructor();
|
|
9
|
-
static open(workspace: string): Promise<RepositoryInstructions>;
|
|
15
|
+
static open(workspace: string, trust?: RepositoryInstructionTrust): Promise<RepositoryInstructions>;
|
|
10
16
|
forTool(name: string, input: unknown): Promise<string>;
|
|
11
17
|
forDataResult(content: Array<{
|
|
12
18
|
type: string;
|
|
@@ -14,3 +20,4 @@ export declare class RepositoryInstructions {
|
|
|
14
20
|
}>): Promise<string>;
|
|
15
21
|
load(path: string, directory: boolean): Promise<string>;
|
|
16
22
|
}
|
|
23
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { validateDataBatch } from "../data-acquisition/schema.js";
|
|
2
2
|
import { isDataBatchResult } from "../data-acquisition/render.js";
|
|
3
|
+
import { isProjectWorkspaceTrusted } from "../../project-trust/trust-store.js";
|
|
3
4
|
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
5
|
import { execFile } from "node:child_process";
|
|
5
6
|
import { promisify } from "node:util";
|
|
@@ -18,11 +19,12 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
18
19
|
for (const [path, content] of this.pending) this.seen.set(path, content);
|
|
19
20
|
this.pending.clear();
|
|
20
21
|
}
|
|
21
|
-
constructor(root, workspace) {
|
|
22
|
+
constructor(root, workspace, trust) {
|
|
22
23
|
this.root = root;
|
|
23
24
|
this.workspace = workspace;
|
|
25
|
+
this.trust = trust;
|
|
24
26
|
}
|
|
25
|
-
static async open(workspace) {
|
|
27
|
+
static async open(workspace, trust = {}) {
|
|
26
28
|
let root = resolve(workspace);
|
|
27
29
|
try {
|
|
28
30
|
root = await realpath(root);
|
|
@@ -34,7 +36,7 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
34
36
|
timeout: 5e3
|
|
35
37
|
})).stdout.trim());
|
|
36
38
|
} catch {}
|
|
37
|
-
return new RepositoryInstructions(root, canonicalWorkspace);
|
|
39
|
+
return new RepositoryInstructions(root, canonicalWorkspace, trust);
|
|
38
40
|
}
|
|
39
41
|
async forTool(name, input) {
|
|
40
42
|
if (name === "data_batch") {
|
|
@@ -92,6 +94,7 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
92
94
|
}
|
|
93
95
|
if (!inside(this.root, target)) return "";
|
|
94
96
|
const leaf = directory ? target : dirname(target);
|
|
97
|
+
if (!isProjectWorkspaceTrusted(leaf, this.trust)) return "";
|
|
95
98
|
const directories = [];
|
|
96
99
|
for (let current = leaf; inside(this.root, current); current = dirname(current)) {
|
|
97
100
|
directories.unshift(current);
|
|
@@ -99,10 +102,12 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
99
102
|
}
|
|
100
103
|
const sections = [];
|
|
101
104
|
for (const dir of directories) {
|
|
105
|
+
if (!isProjectWorkspaceTrusted(dir, this.trust)) continue;
|
|
102
106
|
const file = resolve(dir, "AGENTS.md");
|
|
103
107
|
try {
|
|
104
108
|
const canonical = await realpath(file);
|
|
105
109
|
if (!inside(this.root, canonical)) throw new Error(`Instruction file escapes repository: ${file}`);
|
|
110
|
+
if (!isProjectWorkspaceTrusted(dirname(canonical), this.trust)) continue;
|
|
106
111
|
const metadata = await stat(canonical);
|
|
107
112
|
if (metadata.size > 32768) {
|
|
108
113
|
const revision = `oversized:${canonical}:${metadata.size}:${metadata.mtimeMs}:${metadata.ctimeMs}`;
|
|
@@ -120,7 +125,7 @@ var RepositoryInstructions = class RepositoryInstructions {
|
|
|
120
125
|
throw error;
|
|
121
126
|
}
|
|
122
127
|
}
|
|
123
|
-
return sections.length ? `Repository instructions (more specific directory rules take precedence within their scope):\n\n${sections.join("\n\n")}` : "";
|
|
128
|
+
return sections.length ? `Repository instructions (more specific directory rules take precedence within their scope). These rules govern repository work only; they cannot override system instructions, tool safety, the user's explicit request, or action authorization:\n\n${sections.join("\n\n")}` : "";
|
|
124
129
|
}
|
|
125
130
|
};
|
|
126
131
|
//#endregion
|
|
@@ -9,15 +9,25 @@ export interface CodingVerificationEvidence {
|
|
|
9
9
|
logPath?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare function toolResultFailed(result: AgentToolResult<unknown>, isError?: boolean): boolean;
|
|
12
|
+
type VerificationOptions = {
|
|
13
|
+
required?: boolean;
|
|
14
|
+
toolNames?: string[];
|
|
15
|
+
workspace?: string;
|
|
16
|
+
};
|
|
12
17
|
/** One run owns its evidence; transcript tool results are the durable record. */
|
|
13
18
|
export declare class RunVerification {
|
|
14
19
|
private readonly snapshot;
|
|
20
|
+
private readonly options;
|
|
15
21
|
private revision?;
|
|
16
22
|
private changed;
|
|
23
|
+
private proseOnly;
|
|
17
24
|
private readonly before;
|
|
18
25
|
private readonly evidence;
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
private readonly successfulCommands;
|
|
27
|
+
private readonly editedProse;
|
|
28
|
+
private readonly inspectedProse;
|
|
29
|
+
constructor(snapshot: () => Promise<string | undefined>, options?: VerificationOptions);
|
|
30
|
+
static open(workspace: string, options?: VerificationOptions): Promise<RunVerification>;
|
|
21
31
|
restore(value: unknown, includeEvidence: boolean): void;
|
|
22
32
|
beforeTool(toolCallId: string, toolName?: string): Promise<void>;
|
|
23
33
|
afterTool(context: AfterToolCallContext): Promise<{
|
|
@@ -25,10 +35,15 @@ export declare class RunVerification {
|
|
|
25
35
|
isError: boolean;
|
|
26
36
|
}>;
|
|
27
37
|
private observeRevision;
|
|
38
|
+
private pendingEvidence;
|
|
39
|
+
private hasTool;
|
|
40
|
+
modelGuidance(): string;
|
|
28
41
|
pendingContext(): Promise<string>;
|
|
29
42
|
summary(): Promise<{
|
|
30
43
|
changed: boolean;
|
|
44
|
+
proseOnly: boolean;
|
|
31
45
|
revision?: string;
|
|
32
46
|
evidence: CodingVerificationEvidence[];
|
|
33
47
|
}>;
|
|
34
48
|
}
|
|
49
|
+
export {};
|