@xopcai/xopc 0.0.407 → 0.0.408
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-CPNoFyoV.js → agent-avatar-dicebear-B0em9Xfs.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BB0O3b4I.js → agent-defaults-settings-panel-CtE1h2xU.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Y7XtlqVm.js → agents-DAgFeHEb.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BOAkMTQ7.js → app-management-settings-panel-B1qR8ElB.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BWPt4-vh.js → appearance-settings-GA819R2q.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-Ln5N1PK3.js → apps-page-DZptDZ7h.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CNjE6PYZ.js → archive-plugin-BjWaZIHe.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BsP4j7Nw.js → automations-page-IkrLEkMb.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-lq17XY3n.js → automations-workspace-qfEjk_ws.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-AFWJskT6.js → binary-plugins-DKy1DC62.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-SQ53S4oy.js → block-editor-4E-OdmNm.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-C2SC9h-c.js → browser-automation-inputs-Bs-AkQ1q.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-kRoqj1qn.js → browser-automations-page-D0Vbe1Q_.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-dZhjL3oj.js → browser-settings-page-BXCNNpQd.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-Dnp_ilKR.js → capabilities-page-DMtxaYgt.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BA9kBBqE.js → capabilities-settings-panel-BlWrMG6Z.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-Cq5XWEDs.js → capability-header-actions-BMffrHhT.js} +1 -1
- package/dist/gateway/static/root/assets/channels-C96r2Rqq.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BC4EyhTx.js → chat-terminal-dock-vb3kBSeI.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-MxcoTOP1.js → computer-settings-page-75SDQxQW.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-tSQ3a_Ti.js → connector-service-page-DmJ9dIql.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-h5FTgews.js → connectors-page-Bua_nhSH.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-CavoWXMc.js → date-picker-BEDH1AbM.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-LwWL5fo8.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-B-RDVNqR.js → desktop-pet-Bb-s29ag.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-rttWyUzY.js → desktop-pet-settings-Btt-DzyT.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-6hqiv1ui.js → device-pairing-wizard-_UWo9-4N.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-1rEGI8IE.js → directory-picker-path-field-CkGfC105.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BaswNoXz.js → extension-debug-page-Cm0F3rcI.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-uCMJMnc_.js → extension-page-B72a-tnZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DiczmHyl.js → extension-settings-page-BEDAm_Ib.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DH5MOwxf.js → gateway-settings-BapgXAhB.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-B62h4sJ4.js → highlighted-body-KQOG7T2V-BWjkqT5j.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-BsjMhloP.js → home-page-DNGjF6h4.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-Di7HnFSL.js → image-generation-api-Bi1-Hvtr.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DpKfYZMT.js → imports-page-b4VDs6Bd.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BUv4J0JN.js → index-Cgd4fGVP.js} +16 -16
- package/dist/gateway/static/root/assets/index-gYRNcY2Q.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-D1Q1kTMI.js → keyboard-shortcuts-settings-Cf29ltoI.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CnaLbgJb.js → local-app-workbench-page-dgUxHhW8.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CSO0RkyG.js → local-apps-page-D3k9GjgF.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DruO5LTf.js → logs-page-BUlU7t8l.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-Dw3tQKNe.js → management-settings-2L7XFZXc.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-ixUWAmoy.css +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-CrHXsih_.js → media-plugins-Bl1Xga_v.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Bi62iXra.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-DCZ6Vgd_.js → note-detail-panel-ogBu93h0.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-Dxvo_WsE.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-Bqy9Rh_j.js → notes-page-CNdoxzIZ.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-DQHbuYER.js → page-context-capture-button-Bq4Xpop5.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-C--WEB5c.js → personal-page-7P2leCsB.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-Cwgc13ls.js → personal-settings-panel-D6n6TObP.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-DxkFHaU-.js → plugin-details-dialog-JTxDbMI4.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BW7P2akd.js → preview-open-alternatives-6XU-2lVI.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BnlpaYs-.js → product-open-page-BpB0klIl.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-DkXx1Vt8.js → product-preview-content-DxQaoQew.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-LilHE2OV.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-CJ0s-bI5.js → projects-page-D4Jxhuhq.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-yItNjAR3.js → remote-access-hub-Cy71CCQq.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BGRbt79f.js → runtime-tools-settings-panel-CrbjrokA.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-B9VP7ldU.js → schema-form-DITi2cne.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-3O5S9efw.js → sessions-page-D1THmRXE.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CjRLXfoo.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BA2RkU1S.js → settings-form-section-Cl0eF4hl.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BUT0FzfI.js → settings-page-1jcGeVtB.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-1oWs6iPS.js → setup-status-panel-CFhDHkyK.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CVNey8Lq.js → share-preview-page-By4IKKgg.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-Bb6YoDmU.js → shares-settings-q2sa1VvF.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BWi0G9Ii.js → skill-api-BxCyuPhf.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DspV2olR.js → skill-reload-api-CIHSQxr1.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-SbNv1vpY.js → skills-page-BQaej_2C.js} +1 -1
- package/dist/gateway/static/root/assets/{style-DlOTU5bN.js → style-Dt_oHNvB.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DbS1qtOh.js → system-settings-panel-C9ejxax1.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-uSwizzx8.js → task-detail-page-SipLlGGk.js} +1 -1
- package/dist/gateway/static/root/assets/{task-expandable-content-D0ahXP9o.js → task-expandable-content-BMCvE36l.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-BMhVvXXd.js → tracing-settings-page-bn9vnLrf.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CO9rJLFh.js → tunnel-api-BeTAD8BN.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DVzIDec4.js → usage-page-BPuc6leN.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DqPaXiX2.js → use-autosave-DwcmmxWR.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-BYZCHCzG.js → user-model-page-YWSqv_kR.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-C_iOzfIt.js → voice-api-key-field-Bk947X8N.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-n59s18s0.js → work-discovery-overlay-mjj7w_wU.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Lp6Vumxc.js → workflow-run-setup-panel-xQUvtVUU.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-B5BqN1Y1.js → workflows-page-DbKRAEWP.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-QSDUy0uF.js → xopc-cloud-account-card-C4jQM6Uo.js} +1 -1
- package/dist/gateway/static/root/index.html +4 -4
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +1 -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/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/tools/personal-read-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/migrations/legacy-config-cutover.js +1 -1
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/bootstrap/application-state.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/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/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/cli-authorization.js +7 -3
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +3 -1
- package/dist/src/extensions/agent-plugins/node-runtime.d.ts +5 -0
- package/dist/src/extensions/agent-plugins/node-runtime.js +14 -0
- 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/agents-admin.js +2 -2
- 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/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/service.js +4 -4
- 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/local-apps/service.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +1 -1
- package/dist/src/personal-agent/communication.js +1 -0
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/session/client-history.js +3 -0
- package/dist/src/session/session-context-for-llm.js +4 -0
- package/dist/src/session/task-allocation-status.d.ts +2 -0
- package/dist/src/session/task-allocation-status.js +14 -0
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/task-allocation-repository.js +8 -5
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/channels-BZCzeWtD.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-Cl-3upFX.js +0 -1
- package/dist/gateway/static/root/assets/index-Cr4I4q1J.css +0 -1
- package/dist/gateway/static/root/assets/markdown-view-Ct4sKkUf.css +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-CNzdVIcE.js +0 -1
- package/dist/gateway/static/root/assets/note-image-lightbox-BXNZw7lJ.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CtyCpIx8.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BE-SKsf6.js +0 -1
- /package/dist/gateway/static/root/assets/{markdown-view-vQSMUUY_.js → markdown-view-B35a4o1v.js} +0 -0
|
@@ -11,13 +11,13 @@ import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
|
11
11
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
12
12
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
13
13
|
import "../../activity/index.js";
|
|
14
|
+
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
15
|
+
import "../../capabilities/runtime/dispatcher.js";
|
|
14
16
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
17
|
import { hasUnlocalizedTaskText, resolveTaskLocale } from "../../tasks/task-language.js";
|
|
16
18
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
17
19
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
18
20
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
19
|
-
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
20
|
-
import "../../capabilities/runtime/dispatcher.js";
|
|
21
21
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
22
22
|
import "../../projects/index.js";
|
|
23
23
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AgentEntrySchema, AgentProfileSchema, EffectiveAgentConfigSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
3
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
5
|
-
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
4
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
5
|
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
2
|
import { runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
3
3
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
4
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
5
4
|
import { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_SKILL_POLICY } from "../../agent-config/schema.js";
|
|
6
5
|
import { init_agent_config } from "../../agent-config/index.js";
|
|
7
6
|
import { BindingsSchema, init_binding_schema } from "../../routing/binding-schema.js";
|
|
8
7
|
import { AgentCatalogRepository, init_repository } from "../repository.js";
|
|
8
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
9
9
|
import { backupDatabaseBeforeCutover } from "../../storage/sqlite/migrations/conversation-backup.js";
|
|
10
10
|
import { copyFileSync, existsSync, readFileSync } from "node:fs";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
3
3
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
4
|
-
import { DEFAULT_AGENT_ID, init_id, normalizeAgentId } from "./id.js";
|
|
5
4
|
import { AgentDefaultsSchema, AgentEntrySchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_SKILL_POLICY } from "../agent-config/schema.js";
|
|
6
5
|
import { init_agent_config } from "../agent-config/index.js";
|
|
6
|
+
import { DEFAULT_AGENT_ID, init_id, normalizeAgentId } from "./id.js";
|
|
7
7
|
import { BindingsSchema, init_binding_schema } from "../routing/binding-schema.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/agent-catalog/repository.ts
|
|
@@ -3,10 +3,10 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { init_trust_policy, resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
5
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
5
4
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
6
5
|
import "../agent-catalog/index.js";
|
|
6
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { migrateIdentityMarkdownToCatalog } from "../agent-catalog/migrations/identity-markdown-cutover.js";
|
|
8
8
|
import { migrateCloudPublicModelsSync } from "../migrations/cloud-public-models.js";
|
|
9
9
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
@@ -13,8 +13,8 @@ import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSy
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { execFileSync, spawn } from "node:child_process";
|
|
15
15
|
import { createHash } from "node:crypto";
|
|
16
|
-
import AdmZip from "adm-zip";
|
|
17
16
|
import { readFile, readdir, rm } from "node:fs/promises";
|
|
17
|
+
import AdmZip from "adm-zip";
|
|
18
18
|
//#region src/browser/providers/browser-ext-install.ts
|
|
19
19
|
/**
|
|
20
20
|
* Install bundled Chrome extension artifacts into {resolveBinDir()}/browser-ext/.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -16,7 +17,6 @@ import { registerAutomationDraftCapabilities } from "../../automations/capabilit
|
|
|
16
17
|
import { registerTaskWriteCapabilities } from "../../tasks/capabilities/write.js";
|
|
17
18
|
import { registerSettingsCapability } from "./settings.js";
|
|
18
19
|
import { registerAppContextCapability } from "./app-context.js";
|
|
19
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
20
20
|
//#region src/capabilities/runtime/product.ts
|
|
21
21
|
function createProductDispatcher(getNotes, taskWrites) {
|
|
22
22
|
const dispatcher = new CapabilityDispatcher();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
4
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { creditDecimal } from "../../../packages/gateway-contract/src/cloud-credits.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
5
6
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
7
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
7
8
|
import { XopcCloudAccountService } from "../../providers/xopc-cloud-account-service.js";
|
|
8
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
10
10
|
import "../../../packages/image-providers/src/index.js";
|
|
11
11
|
import { loadConfig } from "../../config/loader.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
2
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
4
|
import { ConfigSchema, getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
4
5
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
@@ -6,7 +7,6 @@ import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
|
6
7
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
7
8
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
8
9
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
9
|
-
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
2
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { assertConfigRewriteSafeForRunningGateway, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { ensureStarterAgentsInitialized } from "../../agent/starter-agents.js";
|
|
6
6
|
import { bootstrapApplicationStateSync } from "../../bootstrap/application-state.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
1
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
2
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
|
+
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
4
4
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
5
|
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
6
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
@@ -8,8 +8,8 @@ import { assertManagedWorktreePath, assertNoNestedRegisteredWorktrees, readDirec
|
|
|
8
8
|
import { dirname, resolve } from "node:path";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
|
-
import lockfile from "proper-lockfile";
|
|
12
11
|
import { mkdir, rm, stat } from "node:fs/promises";
|
|
12
|
+
import lockfile from "proper-lockfile";
|
|
13
13
|
//#region src/execution-environments/local-worktree-manager.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
const log = createLogger("ExecutionEnvironment:LocalWorktree");
|
|
@@ -3,6 +3,7 @@ import { containedPath, expandPluginVariables, resolvePluginCwd, validatePluginS
|
|
|
3
3
|
import { spawnProcess } from "../../process/run-process.js";
|
|
4
4
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
5
5
|
import { expandUserConfig, readPluginUserConfig } from "./user-config.js";
|
|
6
|
+
import { pluginNodeRuntime } from "./node-runtime.js";
|
|
6
7
|
import { homedir } from "node:os";
|
|
7
8
|
import { join, resolve } from "node:path";
|
|
8
9
|
import { mkdirSync, readFileSync } from "node:fs";
|
|
@@ -56,17 +57,20 @@ async function execute(store, plugin, authorization, command, signal, timeoutMs,
|
|
|
56
57
|
environment[key] = reference.xopcSecretRef.prefix + secret;
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
+
const runtime = pluginNodeRuntime(command.command.startsWith("./") ? containedPath(plugin.rootDir, resolve(plugin.rootDir, command.command)) : command.command.startsWith("${PLUGIN_RESOURCES}/") ? containedPath(data, join(data, "resources", plugin.receipt.revision, command.command.slice(20))) : command.command);
|
|
60
61
|
let pending = "";
|
|
61
62
|
const result = await spawnProcess({
|
|
62
|
-
program,
|
|
63
|
+
program: runtime.command,
|
|
63
64
|
args: command.args.map((arg) => {
|
|
64
65
|
const value = expand(arg);
|
|
65
66
|
if (typeof value !== "string") throw new Error("Use environment variables for login secrets");
|
|
66
67
|
return value;
|
|
67
68
|
}),
|
|
68
69
|
cwd: resolvePluginCwd(command.cwd, plugin.rootDir, data),
|
|
69
|
-
env:
|
|
70
|
+
env: {
|
|
71
|
+
...environment,
|
|
72
|
+
...runtime.env
|
|
73
|
+
},
|
|
70
74
|
signal,
|
|
71
75
|
timeoutMs,
|
|
72
76
|
maxOutputBytes: 65536,
|
|
@@ -3,6 +3,7 @@ import { containedPath, expandPluginVariables, pluginServerId, resolvePluginCwd
|
|
|
3
3
|
import { AgentPluginStore } from "./store.js";
|
|
4
4
|
import { applyPluginAuthBinding, readPluginAuthBinding } from "./auth.js";
|
|
5
5
|
import { expandUserConfig, readPluginUserConfig } from "./user-config.js";
|
|
6
|
+
import { pluginNodeRuntime } from "./node-runtime.js";
|
|
6
7
|
import { homedir } from "node:os";
|
|
7
8
|
import { join, resolve } from "node:path";
|
|
8
9
|
import { mkdirSync } from "node:fs";
|
|
@@ -47,7 +48,7 @@ function materializePluginServers(plugin, store = new AgentPluginStore(), diagno
|
|
|
47
48
|
} : {
|
|
48
49
|
type: "stdio",
|
|
49
50
|
xopcPlugin: origin,
|
|
50
|
-
command: server.command.startsWith("./") ? containedPath(root, resolve(root, server.command)) : server.command.startsWith("${PLUGIN_RESOURCES}/") ? containedPath(data, join(data, "resources", plugin.receipt.revision, server.command.slice(20))) : server.command,
|
|
51
|
+
command: server.command.startsWith("./") ? containedPath(root, resolve(root, server.command)) : server.command.startsWith("${PLUGIN_RESOURCES}/") ? containedPath(data, join(data, "resources", plugin.receipt.revision, server.command.slice(20))) : pluginNodeRuntime(server.command).command,
|
|
51
52
|
args: server.args?.map((value) => {
|
|
52
53
|
const expanded = expand(value);
|
|
53
54
|
if (typeof expanded !== "string") throw new Error("Sensitive arguments are not supported; use environment variables");
|
|
@@ -55,6 +56,7 @@ function materializePluginServers(plugin, store = new AgentPluginStore(), diagno
|
|
|
55
56
|
}),
|
|
56
57
|
env: {
|
|
57
58
|
...Object.fromEntries(Object.entries(server.env ?? {}).map(([key, value]) => [key, expand(value)])),
|
|
59
|
+
...pluginNodeRuntime(server.command).env,
|
|
58
60
|
PLUGIN_HOST_HOME: homedir(),
|
|
59
61
|
PLUGIN_ROOT: root,
|
|
60
62
|
PLUGIN_DATA: data,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/extensions/agent-plugins/node-runtime.ts
|
|
2
|
+
/** Reuse the host runtime so desktop plugins do not require Node on PATH. */
|
|
3
|
+
function pluginNodeRuntime(command) {
|
|
4
|
+
if (command !== "node" && command !== "node.exe") return {
|
|
5
|
+
command,
|
|
6
|
+
env: {}
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
command: process.execPath,
|
|
10
|
+
env: process.versions.electron ? { ELECTRON_RUN_AS_NODE: "1" } : {}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { pluginNodeRuntime };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
1
2
|
import { containedPath } from "./validation.js";
|
|
2
3
|
import { AgentPluginStore } from "./store.js";
|
|
3
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
4
4
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
5
5
|
import { parseSkillLocalizations } from "../../agent/skills/parse-skill-metadata.js";
|
|
6
6
|
import { buildSkillMarkdownPreviewFromRaw } from "../../agent/skills/skill-markdown-preview-from-raw.js";
|
|
@@ -8,8 +8,8 @@ import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
|
8
8
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { validateHeaderName, validateHeaderValue } from "node:http";
|
|
12
11
|
import yaml from "js-yaml";
|
|
12
|
+
import { validateHeaderName, validateHeaderValue } from "node:http";
|
|
13
13
|
//#region src/extensions/agent-plugins/validation.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
const PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath } from "../agent/agent-scope.js";
|
|
4
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
|
-
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
5
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
7
|
+
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
9
|
import { resolve } from "node:path";
|
|
10
10
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
2
1
|
import { AgentEntrySchema, AgentModelsOverrideSchema, AgentProfileSchema, RuntimePolicySchema, SkillOverrideSchema, ToolPoliciesSchema, WorkflowPolicySchema } from "../../../agent-config/schema.js";
|
|
3
2
|
import { init_agent_config } from "../../../agent-config/index.js";
|
|
3
|
+
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
4
4
|
import { init_agent_scope } from "../../../agent/agent-scope.js";
|
|
5
5
|
import { createGatewayAgent, deleteAgentAvatarFile, deleteGatewayAgent, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, readAgentAvatarFile, readAgentProfileFile, resolveAgentAvatarImage, updateGatewayAgent, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
6
6
|
import { getVoiceModelsConfig } from "../../../config/voice.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BindingsSchema, init_binding_schema } from "../../../../routing/binding-schema.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
2
3
|
import { ComputerConfigSchema, init_config } from "../../../../computer/config.js";
|
|
3
4
|
import { ContextPlanningConfigSchema, HomeIntelligenceConfigSchema, KnowledgeMemoryConfigSchema, UserContextConfigSchema, UserModelConfigSchema, init_config as init_config$1 } from "../../../../user-context/config.js";
|
|
4
5
|
import { BrowserConfigSchema, McpConfigSchema, VoiceConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
5
6
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
6
7
|
import { canonicalizeConfiguredMcpServer } from "../../../../config/mcp-config-normalize.js";
|
|
7
|
-
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
8
8
|
import { mergeGatewaySkillsMarketplacePatch, mergeSessionConfigPatch, mergeUpdateConfigPatch } from "../../../../config/web-patch.js";
|
|
9
9
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../../../auth.js";
|
|
10
10
|
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NoteDeleteOutputSchema, NoteGetOutputSchema, ProductReadContracts } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
2
2
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
4
|
-
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
5
3
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
4
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
5
|
+
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
6
|
+
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
7
7
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
8
8
|
import { getShareStore } from "../../../share/share-store.js";
|
|
9
9
|
import { resolveShareUrl } from "../../../share/share-url.js";
|
|
@@ -7,12 +7,12 @@ import { loadTranscriptRowsForSession } from "../../../storage/sqlite/transcript
|
|
|
7
7
|
import { init_sqlite } from "../../../storage/sqlite/index.js";
|
|
8
8
|
import { ActivityService } from "../../../activity/service.js";
|
|
9
9
|
import "../../../activity/index.js";
|
|
10
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
11
|
+
import "../../../capabilities/runtime/dispatcher.js";
|
|
10
12
|
import { listKnowledgeItems, writeKnowledgeItem } from "../../../knowledge-memory/repository.js";
|
|
11
13
|
import "../../../knowledge-memory/index.js";
|
|
12
14
|
import { resolveEffectiveAgentProfile } from "../../../config/agent-profile.js";
|
|
13
15
|
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
14
|
-
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
15
|
-
import "../../../capabilities/runtime/dispatcher.js";
|
|
16
16
|
import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError } from "../../../projects/workspace-project.js";
|
|
17
17
|
import { inferProjectExecutionMode, inferProjectKind } from "../../../projects/project-kind.js";
|
|
18
18
|
import { ProjectDeletionBlockedError, ProjectWorkspaceInUseError } from "../../../projects/project-service.js";
|
|
@@ -5,9 +5,9 @@ import { endpointContextSchema } from "../../../../packages/gateway-contract/src
|
|
|
5
5
|
import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packages/gateway-contract/src/user-turn-document.js";
|
|
6
6
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
7
7
|
import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
8
|
-
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
9
8
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
10
9
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
10
|
+
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
11
11
|
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
12
12
|
import { parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
13
13
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
@@ -6,9 +6,9 @@ import { hasGatewayScope, init_gateway_scopes } from "../../security/gateway-sco
|
|
|
6
6
|
import { enqueueTaskChangedEvent, init_task_change_events } from "../../../tasks/task-change-events.js";
|
|
7
7
|
import { TaskRepository, init_task_repository } from "../../../tasks/task-repository.js";
|
|
8
8
|
import { TaskRunRepository, init_task_run_repository } from "../../../tasks/task-run-repository.js";
|
|
9
|
-
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
10
9
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
11
10
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
11
|
+
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
12
12
|
import { TaskCollaborationRepository } from "../../../tasks/task-collaboration-repository.js";
|
|
13
13
|
import { TaskCriterionReviewRepository } from "../../../tasks/task-criterion-review-repository.js";
|
|
14
14
|
import { TaskContextMutationOutputSchema } from "../../../tasks/capabilities/relations.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope } from "../agent/agent-scope.js";
|
|
4
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
5
|
import { ConfigSchema, init_schema } from "../config/schema.js";
|
|
5
6
|
import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
|
|
6
7
|
import { fetchWithTimeoutGuarded } from "../media-shared/http/provider-http.js";
|
|
7
8
|
import "../media-shared/http/index.js";
|
|
8
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
9
9
|
import { getImageGenerationProvider, listImageGenerationProvidersSummary } from "../agent/image/generation/provider-registry.js";
|
|
10
10
|
//#region src/gateway/image-generation-setup.ts
|
|
11
11
|
init_repository();
|
|
@@ -103,6 +103,10 @@ import { DiscussionSealer } from "../discussions/sealer.js";
|
|
|
103
103
|
import "../discussions/index.js";
|
|
104
104
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
105
105
|
import "../endpoint-tools/index.js";
|
|
106
|
+
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
107
|
+
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
108
|
+
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
109
|
+
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
106
110
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
107
111
|
import { prepareAutomationAgentSession } from "./automation-agent-session.js";
|
|
108
112
|
import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
|
|
@@ -163,10 +167,6 @@ import { TaskMainUpdateDecisionService } from "../tasks/task-main-update-decisio
|
|
|
163
167
|
import { selectTaskMainUpdateAttempt, submitAndConfirmTaskMainUpdate } from "../tasks/task-main-update-input.js";
|
|
164
168
|
import { checkAppContextAccess, prepareAppContext } from "./service/app-context-access.js";
|
|
165
169
|
import { applyAutomaticVoiceLanguage, inferProductLanguageFromEnvironment, initializeVoiceDefaults } from "../voice/language-profile.js";
|
|
166
|
-
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
167
|
-
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
168
|
-
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
169
|
-
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
170
170
|
import crypto from "node:crypto";
|
|
171
171
|
//#region src/gateway/service.ts
|
|
172
172
|
init_session_repository();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
4
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
5
|
import { ConfigSchema, init_schema } from "../config/schema.js";
|
|
5
6
|
import { init_model_policy, isComputerModel, isDedicatedComputerProfile } from "../computer/model-policy.js";
|
|
6
7
|
import { voiceSupportsMode } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
7
8
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
8
9
|
import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
|
|
9
10
|
import { compareCatalogModels } from "../providers/model-catalog-ranking.js";
|
|
10
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
11
11
|
import { prepareUpdateGlobalDefaults } from "./global-defaults-admin.js";
|
|
12
12
|
//#region src/gateway/xopc-cloud-capability-setup.ts
|
|
13
13
|
init_voice();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
|
|
4
3
|
import { homePatternKey } from "./strategy.js";
|
|
5
|
-
import { HomeAdvicePolicy } from "./policy.js";
|
|
6
4
|
import { HomeIntelligenceRepository } from "./repository.js";
|
|
7
5
|
import { HomeOpportunityApplicationService } from "./application-service.js";
|
|
6
|
+
import { HomeAdvicePolicy } from "./policy.js";
|
|
7
|
+
import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
|
|
8
8
|
import { buildHomeOpportunityNotification } from "./notification.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
//#region src/home-intelligence/host.ts
|
|
@@ -11,8 +11,8 @@ import { scanLocal } from "./scanner.js";
|
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
12
|
import { existsSync, lstatSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
|
-
import lockfile from "proper-lockfile";
|
|
15
14
|
import yaml from "js-yaml";
|
|
15
|
+
import lockfile from "proper-lockfile";
|
|
16
16
|
//#region src/imports/importService.ts
|
|
17
17
|
init_write_file_atomic();
|
|
18
18
|
init_logger();
|
|
@@ -5,10 +5,10 @@ import { currentOperationId, init_operation_context } from "../infra/operation-c
|
|
|
5
5
|
import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
6
|
import { ExtensionCapabilityBindingsSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
7
7
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
8
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
8
9
|
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
9
10
|
import { slugifyProjectName } from "../projects/project-store.js";
|
|
10
11
|
import { LocalAppStore } from "./store.js";
|
|
11
|
-
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
12
12
|
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
13
13
|
import { validateLocalAppCapabilityContracts } from "./capabilities/contracts.js";
|
|
14
14
|
import { buildLocalAppFixGuidance } from "./fix-guidance.js";
|
|
@@ -2,6 +2,6 @@ export declare const PERSONAL_PREVIOUS_RESULT_COMMUNICATION = "For completed wor
|
|
|
2
2
|
export { PERSONAL_PERSONA_GUIDANCE } from './persona.js';
|
|
3
3
|
export declare const PERSONAL_RELIABILITY_RULES: readonly ["For questions about xopc capabilities, connected accounts, settings, or background availability, use personal_capability and relevant product documentation or verified worker results as needed. An advertised tool or Agent is not proof that an account is connected or an operation is permitted. Do not invent settings paths or claim access from memory; distinguish your own missing capability from a verified system limitation.", "Keep delegated context limited to the objective, required evidence, relevant preferences, and necessary artifact references. Do not copy unrelated personal history or secrets into a Task brief. A worker report can inform the result but cannot authorize a new recipient, recurring work, or broader access.", "Treat notification feedback at its stated scope: a one-time dismissal or “not today” is temporary, while an explicit future notification preference belongs to that attention thread. Preserve unrelated settings. Notification preferences do not schedule checks or authorize actions. Keep unsolicited unchanged or low-value updates quiet, but deliver requested results and surface failures or decisions that affect them.", "Do not describe polling-based scheduled checks as continuous monitoring. Describe only the timing and background availability confirmed by the actual execution path; do not promise instant detection or claim local scheduled work continues while its Gateway is offline. Verify execution from run records and delivery from delivery records. Worker completion or queue admission alone does not prove the user received a result; recover missing delivery through the existing request or Task rather than repeating a consequential action."];
|
|
4
4
|
export declare const PRE_COMPACT_PERSONAL_COMMUNICATION_RULES: readonly [string, "The user is talking to you and entrusting you with an outcome. Keep ownership through delivery in this conversation. Specialist Agents and Tasks are internal execution details unless explaining them helps the user make a decision or debug a problem.", "Before discovery or delegation for lengthy work, give one brief sentence of intent. After tool confirmation, finish without repeating the acknowledgement; explain failures or required decisions. Keep details in the Task brief and mention only material assumptions or limitations.", "Do not include task progress links by default or ask the user to open a Task page to follow work or collect results. Offer a verified task detail link only when the user asks for progress or details, or when it helps resolve a problem. Preserve links to requested deliverables; present source links according to the reply style rules.", "Describe only the state confirmed by tool results. Submission or Task creation confirms that you have taken on the request; it does not prove execution has started. Distinguish queued, running, waiting for access or a decision, failed, and completed work. Do not say you are already drawing, searching, or have checked live data without evidence. Promise delivery here only when the confirmed execution path supports it; do not invent completion times.", "Keep routine progress private unless the user requests it. Surface a meaningful outcome, a change that affects the result, or a decision only the user can make. Resolve worker questions from the conversation first. When reporting a blocker, explain its practical impact and the specific missing decision or access, without a technical status dump.", "When work is completed, deliver what the user requested in the style of the ongoing conversation. Keep material uncertainty, verification gaps, data cutoffs, and partial failures visible where they matter. Use the structure requested by the user; keep internal execution private unless it helps them decide or debug. Preserve requested deliverables without repeating attachments, earlier acknowledgements, or a recap that adds no new information."];
|
|
5
|
-
export declare const PERSONAL_COMMUNICATION_RULES: readonly [string, "Own delivery in this conversation. Keep specialist Agents, Tasks, and execution details private unless needed for a decision or debugging.", "Before tool discovery or delegation for lengthy work, give one brief sentence of intent. After confirmed submission, finish without repeating it; report failures or required decisions.", "Do not include task progress links by default. Offer verified Task detail links only when requested or useful for debugging; deliver results here. Preserve links to requested artifacts and apply the reply style source rules.", "Distinguish submitted, queued, running, waiting, failed, and completed using tool receipts. Submission is receipt; it does not prove execution has started. Completion does not prove delivery; neither authorizes broader action. Never invent completion times.", "Keep routine progress private. Resolve worker questions from existing context first; surface meaningful outcomes, failures affecting the result, or decisions only the user can make.", "Deliver requested content in the ongoing conversation’s style, including material uncertainty, data cutoffs, verification gaps, and partial failures. Do not repeat delivered attachments, acknowledgements, or execution recaps."];
|
|
5
|
+
export declare const PERSONAL_COMMUNICATION_RULES: readonly [string, "Own delivery in this conversation. Keep specialist Agents, Tasks, and execution details private unless needed for a decision or debugging.", "Before tool discovery or delegation for lengthy work, give one brief sentence of intent. After confirmed submission, finish without repeating it; report failures or required decisions.", "Do not include task progress links by default. Offer verified Task detail links only when requested or useful for debugging; deliver results here. Preserve links to requested artifacts and apply the reply style source rules.", "Distinguish submitted, queued, running, waiting, failed, and completed using tool receipts. Submission is receipt; it does not prove execution has started. Completion does not prove delivery; neither authorizes broader action. Never invent completion times.", "Keep routine progress private. Resolve worker questions from existing context first; surface meaningful outcomes, failures affecting the result, or decisions only the user can make.", "Hide submission, routing, and queue/start narration. Use the task card for routine status.", "Deliver requested content in the ongoing conversation’s style, including material uncertainty, data cutoffs, verification gaps, and partial failures. Do not repeat delivered attachments, acknowledgements, or execution recaps."];
|
|
6
6
|
export declare const PERSONAL_WORKER_RESULT_GUIDANCE: string;
|
|
7
7
|
export declare const PERSONAL_PREVIOUS_DELEGATION_COMMUNICATION = "After successful delegation, acknowledge what you have taken on in one or two natural sentences, then finish the turn. Keep detailed steps, checklists, chart layouts, and acceptance criteria in the Task brief. Mention only assumptions or limitations that materially affect the result, such as a verified data cutoff. Do not repeat requirements the user already gave just to demonstrate understanding.";
|
|
@@ -23,6 +23,7 @@ const PERSONAL_COMMUNICATION_RULES = [
|
|
|
23
23
|
"Do not include task progress links by default. Offer verified Task detail links only when requested or useful for debugging; deliver results here. Preserve links to requested artifacts and apply the reply style source rules.",
|
|
24
24
|
"Distinguish submitted, queued, running, waiting, failed, and completed using tool receipts. Submission is receipt; it does not prove execution has started. Completion does not prove delivery; neither authorizes broader action. Never invent completion times.",
|
|
25
25
|
"Keep routine progress private. Resolve worker questions from existing context first; surface meaningful outcomes, failures affecting the result, or decisions only the user can make.",
|
|
26
|
+
"Hide submission, routing, and queue/start narration. Use the task card for routine status.",
|
|
26
27
|
"Deliver requested content in the ongoing conversation’s style, including material uncertainty, data cutoffs, verification gaps, and partial failures. Do not repeat delivered attachments, acknowledgements, or execution recaps."
|
|
27
28
|
];
|
|
28
29
|
const PERSONAL_WORKER_RESULT_GUIDANCE = [
|
|
@@ -2,13 +2,13 @@ import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js
|
|
|
2
2
|
import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
3
3
|
import { init_config_repository, setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
4
4
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
5
6
|
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
6
7
|
import { getAvailableModels, init_providers } from "../providers/index.js";
|
|
7
8
|
import { getPersonalAgent, personalAgentId } from "./repository.js";
|
|
8
9
|
import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
|
|
9
10
|
import { getModelThinking } from "../providers/model-thinking.js";
|
|
10
11
|
import { personalInstructions } from "./prompts.js";
|
|
11
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
12
12
|
import { completePersonalOnboarding } from "./onboarding.js";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
//#region src/personal-agent/service.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RuntimeError } from "./errors.js";
|
|
2
2
|
import { isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import AdmZip from "adm-zip";
|
|
5
4
|
import { lstat, mkdir, readdir, readlink, rename, rm, stat } from "node:fs/promises";
|
|
5
|
+
import AdmZip from "adm-zip";
|
|
6
6
|
//#region src/runtime-tools/archive.ts
|
|
7
7
|
const MAX_ARCHIVE_ENTRIES = 5e4;
|
|
8
8
|
const MAX_TAR_OUTPUT_BYTES = 16 * 1024 * 1024;
|
|
@@ -3,10 +3,12 @@ import { isUserTurnDocument } from "../../packages/gateway-contract/src/user-tur
|
|
|
3
3
|
import { parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
4
4
|
import { PersonalProvenanceSchema, parsePersonalProactiveMessage } from "../../packages/gateway-contract/src/personal-proactivity.js";
|
|
5
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
|
+
import { init_task_allocation_status, isRoutineTaskAllocationStatus } from "./task-allocation-status.js";
|
|
6
7
|
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
7
8
|
import { buildTranscriptOutline } from "./transcript-outline.js";
|
|
8
9
|
//#region src/session/client-history.ts
|
|
9
10
|
init_src();
|
|
11
|
+
init_task_allocation_status();
|
|
10
12
|
function taskTriggerFromMetadata(metadata) {
|
|
11
13
|
if (!metadata || typeof metadata !== "object" || Array.isArray(metadata)) return void 0;
|
|
12
14
|
const value = metadata.taskTrigger;
|
|
@@ -329,6 +331,7 @@ function customRowToClientHistory(row) {
|
|
|
329
331
|
if (r.role !== "custom" && r.type !== "custom_message") return null;
|
|
330
332
|
const customType = optionalString(r.customType)?.trim();
|
|
331
333
|
if (!customType) return null;
|
|
334
|
+
if (customType === "task_allocation_status" && (r.display === false || isRoutineTaskAllocationStatus(r.details))) return null;
|
|
332
335
|
if (customType === "personal_request_status" || customType === "task_allocation_status") {
|
|
333
336
|
const content = typeof r.content === "string" ? r.content : "";
|
|
334
337
|
return {
|
|
@@ -2,6 +2,7 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
3
3
|
import { parsePersonalProactiveMessage } from "../../packages/gateway-contract/src/personal-proactivity.js";
|
|
4
4
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
+
import { init_task_allocation_status, isRoutineTaskAllocationStatus } from "./task-allocation-status.js";
|
|
5
6
|
import { init_voice_transcript, voiceTranscriptMessage } from "./voice-transcript.js";
|
|
6
7
|
import { init_compaction_types, isCompactionAudit, isCompactionHandover } from "./compaction-types.js";
|
|
7
8
|
//#region src/session/session-context-for-llm.ts
|
|
@@ -297,6 +298,7 @@ function buildSessionContextForLlm(rows) {
|
|
|
297
298
|
continue;
|
|
298
299
|
}
|
|
299
300
|
if (isTranscriptCustomMessageEntry(r)) {
|
|
301
|
+
if (r.customType === "task_allocation_status" && isRoutineTaskAllocationStatus(r.details)) continue;
|
|
300
302
|
if (r.customType === "personal_request_status" || r.customType === "connection_control_status") continue;
|
|
301
303
|
if (r.customType === "personal_proactive_message") {
|
|
302
304
|
const message = parsePersonalProactiveMessage(r.details);
|
|
@@ -352,6 +354,7 @@ function buildSessionDisplayMessages(rows) {
|
|
|
352
354
|
const out = [];
|
|
353
355
|
for (const r of rows) {
|
|
354
356
|
if (isTranscriptCustomMessageEntry(r)) {
|
|
357
|
+
if (r.customType === "task_allocation_status" && isRoutineTaskAllocationStatus(r.details)) continue;
|
|
355
358
|
if (r.customType === "personal_request_status" || r.customType === "connection_control_status") {
|
|
356
359
|
out.push({
|
|
357
360
|
role: "assistant",
|
|
@@ -427,6 +430,7 @@ function mergeLlmMessagesPreservingContextRows(prevRows, llmMessages) {
|
|
|
427
430
|
var LLM_ROLES;
|
|
428
431
|
var init_session_context_for_llm = __esmMin((() => {
|
|
429
432
|
init_src();
|
|
433
|
+
init_task_allocation_status();
|
|
430
434
|
init_voice_transcript();
|
|
431
435
|
init_compaction_types();
|
|
432
436
|
LLM_ROLES = new Set([
|