@xopcai/xopc 0.0.351 → 0.0.353
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- 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-Dc0yBlKV.js → agent-avatar-dicebear-BVIuZcCP.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BXFins6I.js → agent-defaults-settings-panel-CcTnphqy.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-B-w6bJuj.js → agent-plugin-dialog-CdCzMPhC.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BiNKpndr.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-yUALtmym.js → agents-admin-api-Ck2x78jq.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C7QjGlMZ.js → app-management-settings-panel-BvGDN5J6.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CgApGxhN.js → appearance-settings-BhQYkuQj.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DWii4stP.js → apps-page-BQZJuM-C.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin--oP0UmoE.js → archive-plugin-BZXXJvpX.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DkV4w6xr.js → automations-page-C7VKkDb5.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DT95Uk9d.js → automations-workspace-y4qcvlg8.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-DIpBiw_8.js → binary-plugins-DoT3g5SP.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Di4X446B.js → block-editor-sqqrCafh.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-B0TlAcoB.js → browser-automation-inputs-CZOKsAaa.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-pKPvkGW8.js → browser-automations-page-TEeTmkGP.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-cJ200PlY.js → browser-settings-page--N4P7V0l.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-e-fO70DK.js → capabilities-BOrLei_L.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CPKbJUDL.js → capabilities-page-F7OAv-iz.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-D5xUFWBJ.js → capabilities-settings-panel-CaiIo1S1.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-9qDm8ioP.js → capability-header-actions-CR_O9_Vr.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CO_9_oIH.js → channels-Bb-8c4wl.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DCFwzHu2.js → chat-terminal-dock-Q99iKyiO.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-bwWQ3axN.js → computer-settings-page-QuXZBfky.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BIIP-gX4.js → connector-service-page-BIqzVqCO.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-C0b5Xbca.js → connectors-page-CZ24DSBJ.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DBio7OE6.js → date-picker-Ck-FmYEL.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-hyPm_1tB.js → dependency-picker-BjH8XrKb.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BDPfot60.js → desktop-pet-DyGxNAVW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C6IRO2iD.js → desktop-pet-settings-C1rKgB-S.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CUOh38IK.js → device-pairing-wizard-UrPcOU6Q.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-ljXXfuLL.js → directory-picker-path-field-BYxUgMZb.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DHw1dG1g.js → extension-debug-page-CGL0jpQA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BjLN3E6q.js → extension-page-DPWf-tYg.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BMp6v6zP.js → extension-settings-page-DZWBY39d.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CmjHbMj7.js → gateway-config-swr-B31I6Gbq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DzyR6LYb.js → gateway-realtime-D6ffOiPe.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DQuFWNjA.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-D76thCuX.js → gateway-settings-D5w5aYXK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CbOUnKv5.js → gateway-startup-retry-DVol958v.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-D1Tyeuul.js → home-page-DPQwxBGy.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-BmLpVntI.js → image-generation-api-TVgJfz9r.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CabovqRQ.js → imports-page-CnRWDtGz.js} +1 -1
- package/dist/gateway/static/root/assets/index-B-w6Rk9Z.css +1 -0
- package/dist/gateway/static/root/assets/{index-Bb32g7Ll.js → index-DU5Eb1V8.js} +20 -20
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DvN-2bcS.js → keyboard-shortcuts-settings-CoYdyBRh.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CSEzRWxs.js → local-app-workbench-page-hjFeYlIq.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-C3Wy2zG2.js → local-apps-page-CeBhXeoX.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-wiq_12oN.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-WMaCMm3_.js → locale-store-Y1aBayM_.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-YojQFX9o.js → logs-page-CzpZDjkA.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CNMk0HRn.js → management-settings-Beu_R_Rc.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Oe4rXk1N.js → markdown-view-BlzX7Ze5.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Ds7HF3EM.js → media-plugins-C9ya5rUH.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DPw2X06D.js +3 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-D8vQ_INI.js → note-detail-panel-D8bpTGwP.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-CIFcEPAd.js → notes-page-OmgXowUG.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-YKiYT0q2.js → page-context-capture-button-BjjjuLkz.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-ZUC486EH.js → page-tabs-_DiuzxyD.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Ca9tBmOg.js → preview-open-alternatives-BKvUadws.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BuGb8QPn.js → product-open-page-DUPsiVP9.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-C6Awj1Ql.js → project-detail-page-CWlCg2x5.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CmO8Gb9G.js → projects-page-NbVNo0tP.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DEePN1Rc.js → registry-api-DqDOrPQ0.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BsqHroXR.js → remote-access-hub-CD8HrqGC.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Cva9t35o.js → runtime-tools-settings-panel-C25xEYTK.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-3_61bQHN.js → scenes-page-DbWaemwR.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DWHFyKEB.js → schema-form-_3LQ4hyB.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bv-hCMKS.js → session-api-CTN4qwiN.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-BcDptzCN.js → session-manager-DsH1DZI_.js} +5 -5
- package/dist/gateway/static/root/assets/{sessions-page-BaHue2bK.js → sessions-page-B7ZUdXlb.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CpKzZMft.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BwdrtX6k.js → settings-form-section-DS80hVSY.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DqCJHcdG.js +1 -0
- package/dist/gateway/static/root/assets/{setup-status-panel-nMWHz-ra.js → setup-status-panel-De-kC3yJ.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DH0KHlev.js → share-preview-page-T-0g_rwr.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-KK-VNbMw.js → shares-settings-Dz33T3du.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BbNk-3Ig.js → skill-api-Cx6GGpSY.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DyJ-Duem.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-BQya9ygw.js → skills-page-B2iyN-kP.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-akm5mc8b.js → system-settings-panel-By3SZQR_.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-wLGUc7Nu.js → task-detail-page-4yHUTs4_.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-vZ7P_KIQ.js → tunnel-api-BoH0LBkw.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BV1KJ0EY.js → usage-page-dKU5X9zT.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DQdLcZfO.js → use-autosave-YKCwQvqT.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DnLTTyOE.js → user-model-page-Uht32LPP.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CJ-FjNHr.js → voice-api-key-field-DiqHIA8l.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DbjjZkIg.js → voice-config-api-BM75K3mR.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BA1AAqaW.js → work-discovery-overlay-BnfD6w0k.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BhIOKmjW.js → workflow-run-setup-panel-DSy57rBr.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-aYoObmuS.js → workflows-page-Cq3vRUbc.js} +1 -1
- package/dist/gateway/static/root/index.html +15 -15
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
- package/dist/src/agent/agent-manager.js +25 -11
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +0 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +3 -9
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +2 -4
- package/dist/src/agent/context/workspace-seed.d.ts +1 -7
- package/dist/src/agent/context/workspace-seed.js +4 -13
- package/dist/src/agent/context/workspace-templates/AGENTS.md +1 -1
- package/dist/src/agent/context/workspace.d.ts +1 -3
- package/dist/src/agent/context/workspace.js +3 -7
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/messaging/no-reply.d.ts +1 -0
- package/dist/src/agent/messaging/no-reply.js +4 -0
- package/dist/src/agent/messaging/outbound-coordinator.d.ts +0 -4
- package/dist/src/agent/messaging/outbound-coordinator.js +2 -4
- package/dist/src/agent/prompt/sections/agent-identity.d.ts +3 -0
- package/dist/src/agent/prompt/sections/agent-identity.js +13 -0
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +0 -5
- package/dist/src/agent/prompt/sections/messaging-runtime.js +2 -16
- package/dist/src/agent/prompt/sections/project-context.d.ts +0 -3
- package/dist/src/agent/prompt/sections/project-context.js +2 -9
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -0
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -8
- package/dist/src/agent/prompt/subagent-context.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +0 -4
- package/dist/src/agent/prompt/system-prompt-params.js +0 -2
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -2
- package/dist/src/agent/prompt/system-prompt.js +8 -9
- package/dist/src/agent/service.js +0 -1
- package/dist/src/agent/skills/hub-lock.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/starter-agents.d.ts +3 -4
- package/dist/src/agent/starter-agents.js +104 -90
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +7 -4
- package/dist/src/agent/tools/factory.d.ts +4 -2
- package/dist/src/agent/tools/factory.js +6 -3
- package/dist/src/agent/workflow/workflow-child-tools.js +2 -1
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.d.ts +5 -0
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.js +94 -0
- package/dist/src/agent-catalog/repository.js +7 -1
- package/dist/src/agent-catalog/service.js +2 -2
- package/dist/src/agent-config/resolver.js +2 -0
- package/dist/src/agent-config/schema.d.ts +21 -0
- package/dist/src/agent-config/schema.js +9 -4
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/events/event-repository.js +2 -1
- package/dist/src/bootstrap/application-state.js +2 -0
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +4 -7
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +0 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/init.js +0 -33
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/providers.js +1 -1
- package/dist/src/cli/templates.d.ts +1 -1
- package/dist/src/cli/templates.js +1 -23
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/paths.d.ts +0 -2
- package/dist/src/config/paths.js +1 -3
- package/dist/src/config/reload.d.ts +0 -1
- package/dist/src/config/reload.js +0 -4
- package/dist/src/config/rules.js +0 -5
- package/dist/src/config/schema.d.ts +0 -45
- package/dist/src/config/schema.js +2 -23
- package/dist/src/connectors/connection-recovery-service.js +5 -0
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.d.ts +2 -9
- package/dist/src/gateway/agents-admin.js +8 -32
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +8 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/device-push.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/host.d.ts +0 -2
- package/dist/src/gateway/host.js +2 -5
- package/dist/src/gateway/service.js +11 -11
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/notifications/device-store.d.ts +0 -1
- package/dist/src/notifications/device-store.js +2 -7
- package/dist/src/notifications/service.d.ts +0 -1
- package/dist/src/notifications/service.js +13 -82
- package/dist/src/session/execution-detail.js +16 -0
- package/dist/src/storage/sqlite/notes-repository.js +19 -4
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/audio/normalize.js +34 -1
- package/dist/src/voice/realtime/persona-context.d.ts +2 -2
- package/dist/src/voice/realtime/persona-context.js +19 -33
- package/package.json +11 -12
- package/dist/gateway/static/root/assets/agents-CuFzMN58.js +0 -70
- package/dist/gateway/static/root/assets/gateway-realtime-store-KyhksZSM.js +0 -1
- package/dist/gateway/static/root/assets/index-CPi50n0l.css +0 -1
- package/dist/gateway/static/root/assets/local-session-drafts-CxXjQ5Du.js +0 -1
- package/dist/gateway/static/root/assets/messages-sXePe3LQ.js +0 -3
- package/dist/gateway/static/root/assets/settings-advanced-gate-C4y4c2M7.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-B6YZFEye.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DUOG2Ig1.js +0 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +0 -3
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +0 -18
- package/dist/src/agent/context/workspace-templates/HEARTBEAT.md +0 -26
- package/dist/src/agent/context/workspace-templates/IDENTITY.md +0 -30
- package/dist/src/agent/service/parse-outbound-session-key.d.ts +0 -8
- package/dist/src/agent/service/parse-outbound-session-key.js +0 -44
- package/dist/src/heartbeat/active-hours.d.ts +0 -11
- package/dist/src/heartbeat/active-hours.js +0 -40
- package/dist/src/heartbeat/content-check.d.ts +0 -4
- package/dist/src/heartbeat/content-check.js +0 -17
- package/dist/src/heartbeat/event-prompt.d.ts +0 -4
- package/dist/src/heartbeat/event-prompt.js +0 -11
- package/dist/src/heartbeat/index.d.ts +0 -5
- package/dist/src/heartbeat/index.js +0 -6
- package/dist/src/heartbeat/tokens.d.ts +0 -15
- package/dist/src/heartbeat/tokens.js +0 -25
- package/dist/src/heartbeat/wake.d.ts +0 -13
- package/dist/src/heartbeat/wake.js +0 -46
|
@@ -492,21 +492,6 @@ export declare const GatewayModeSchema: z.ZodDefault<z.ZodEnum<{
|
|
|
492
492
|
local: "local";
|
|
493
493
|
remote: "remote";
|
|
494
494
|
}>>;
|
|
495
|
-
export declare const HeartbeatConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
496
|
-
enabled: z.ZodBoolean;
|
|
497
|
-
intervalMs: z.ZodNumber;
|
|
498
|
-
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
499
|
-
target: z.ZodOptional<z.ZodString>;
|
|
500
|
-
targetChatId: z.ZodOptional<z.ZodString>;
|
|
501
|
-
prompt: z.ZodOptional<z.ZodString>;
|
|
502
|
-
ackMaxChars: z.ZodOptional<z.ZodNumber>;
|
|
503
|
-
isolatedSession: z.ZodOptional<z.ZodBoolean>;
|
|
504
|
-
activeHours: z.ZodOptional<z.ZodObject<{
|
|
505
|
-
start: z.ZodString;
|
|
506
|
-
end: z.ZodString;
|
|
507
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
508
|
-
}, z.core.$strip>>;
|
|
509
|
-
}, z.core.$strip>>;
|
|
510
495
|
export declare const GatewayChannelConnectDeferModeSchema: z.ZodEnum<{
|
|
511
496
|
explicit: "explicit";
|
|
512
497
|
off: "off";
|
|
@@ -634,21 +619,6 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
634
619
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
635
620
|
}, z.core.$strict>>;
|
|
636
621
|
}, z.core.$strip>>>;
|
|
637
|
-
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
638
|
-
enabled: z.ZodBoolean;
|
|
639
|
-
intervalMs: z.ZodNumber;
|
|
640
|
-
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
641
|
-
target: z.ZodOptional<z.ZodString>;
|
|
642
|
-
targetChatId: z.ZodOptional<z.ZodString>;
|
|
643
|
-
prompt: z.ZodOptional<z.ZodString>;
|
|
644
|
-
ackMaxChars: z.ZodOptional<z.ZodNumber>;
|
|
645
|
-
isolatedSession: z.ZodOptional<z.ZodBoolean>;
|
|
646
|
-
activeHours: z.ZodOptional<z.ZodObject<{
|
|
647
|
-
start: z.ZodString;
|
|
648
|
-
end: z.ZodString;
|
|
649
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
650
|
-
}, z.core.$strip>>;
|
|
651
|
-
}, z.core.$strip>>>>;
|
|
652
622
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
653
623
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
654
624
|
stream: "stream";
|
|
@@ -1498,21 +1468,6 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1498
1468
|
allowLoopback: z.ZodOptional<z.ZodBoolean>;
|
|
1499
1469
|
}, z.core.$strict>>;
|
|
1500
1470
|
}, z.core.$strip>>>;
|
|
1501
|
-
heartbeat: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1502
|
-
enabled: z.ZodBoolean;
|
|
1503
|
-
intervalMs: z.ZodNumber;
|
|
1504
|
-
includeSystemPromptSection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1505
|
-
target: z.ZodOptional<z.ZodString>;
|
|
1506
|
-
targetChatId: z.ZodOptional<z.ZodString>;
|
|
1507
|
-
prompt: z.ZodOptional<z.ZodString>;
|
|
1508
|
-
ackMaxChars: z.ZodOptional<z.ZodNumber>;
|
|
1509
|
-
isolatedSession: z.ZodOptional<z.ZodBoolean>;
|
|
1510
|
-
activeHours: z.ZodOptional<z.ZodObject<{
|
|
1511
|
-
start: z.ZodString;
|
|
1512
|
-
end: z.ZodString;
|
|
1513
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
1514
|
-
}, z.core.$strip>>;
|
|
1515
|
-
}, z.core.$strip>>>>;
|
|
1516
1471
|
webchat: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
1517
1472
|
activityDetailDefault: z.ZodDefault<z.ZodEnum<{
|
|
1518
1473
|
stream: "stream";
|
|
@@ -41,7 +41,7 @@ function parseModelRef(ref) {
|
|
|
41
41
|
model: trimmed.slice(idx + 1).trim()
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema,
|
|
44
|
+
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayScenesConfigSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, UpdateConfigSchema, CommandsConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
45
45
|
var init_schema = __esmMin((() => {
|
|
46
46
|
init_config();
|
|
47
47
|
init_agent_config();
|
|
@@ -382,26 +382,6 @@ strict: z.boolean().optional() }).optional();
|
|
|
382
382
|
autoGenerate: false
|
|
383
383
|
});
|
|
384
384
|
GatewayModeSchema = z.enum(["local", "remote"]).default("local");
|
|
385
|
-
HeartbeatConfigSchema = z.object({
|
|
386
|
-
enabled: z.boolean(),
|
|
387
|
-
intervalMs: z.number(),
|
|
388
|
-
/** When false, heartbeat instructions are only sent during heartbeat polling turns (not in every chat system prompt). */
|
|
389
|
-
includeSystemPromptSection: z.boolean().optional().default(false),
|
|
390
|
-
target: z.string().optional(),
|
|
391
|
-
targetChatId: z.string().optional(),
|
|
392
|
-
prompt: z.string().optional(),
|
|
393
|
-
ackMaxChars: z.number().optional(),
|
|
394
|
-
isolatedSession: z.boolean().optional(),
|
|
395
|
-
activeHours: z.object({
|
|
396
|
-
start: z.string(),
|
|
397
|
-
end: z.string(),
|
|
398
|
-
timezone: z.string().optional()
|
|
399
|
-
}).optional()
|
|
400
|
-
}).default({
|
|
401
|
-
enabled: true,
|
|
402
|
-
intervalMs: 18e5,
|
|
403
|
-
includeSystemPromptSection: false
|
|
404
|
-
});
|
|
405
385
|
GatewayChannelConnectDeferModeSchema = z.enum([
|
|
406
386
|
"auto",
|
|
407
387
|
"off",
|
|
@@ -463,7 +443,6 @@ enabled: z.boolean().default(false) }).default({ enabled: false });
|
|
|
463
443
|
tailscale: GatewayTailscaleSchema.optional(),
|
|
464
444
|
tls: GatewayTlsSchema.optional(),
|
|
465
445
|
auth: GatewayAuthSchema.optional(),
|
|
466
|
-
heartbeat: z.preprocess(() => void 0, HeartbeatConfigSchema.optional()),
|
|
467
446
|
webchat: GatewayWebchatConfigSchema.optional(),
|
|
468
447
|
scenes: GatewayScenesConfigSchema.optional(),
|
|
469
448
|
corsOrigins: z.array(z.string()).optional(),
|
|
@@ -1143,4 +1122,4 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1143
1122
|
}));
|
|
1144
1123
|
//#endregion
|
|
1145
1124
|
init_schema();
|
|
1146
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema,
|
|
1125
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewayScenesConfigSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
@@ -102,6 +102,7 @@ var ConnectionRecoveryService = class {
|
|
|
102
102
|
const phase = !availability.available || need.connectionId && need.capabilityError ? "blocked" : need.connectionId === need.target.serverId ? "ready" : need.attempt && need.attempt.expiresAt > Date.now() ? "authorizing" : need.unavailable ? "reconnect" : "connect";
|
|
103
103
|
return {
|
|
104
104
|
...need,
|
|
105
|
+
authorizationMode: "desktop",
|
|
105
106
|
phase,
|
|
106
107
|
accounts: [],
|
|
107
108
|
alternatives: [],
|
|
@@ -127,6 +128,7 @@ var ConnectionRecoveryService = class {
|
|
|
127
128
|
const phase = !instance ? "install" : !digestMatches || unhealthy ? "blocked" : "ready";
|
|
128
129
|
return {
|
|
129
130
|
...need,
|
|
131
|
+
authorizationMode: "desktop",
|
|
130
132
|
...instance ? { connectionId: instance.instanceId } : {},
|
|
131
133
|
phase,
|
|
132
134
|
accounts: [],
|
|
@@ -136,6 +138,8 @@ var ConnectionRecoveryService = class {
|
|
|
136
138
|
}
|
|
137
139
|
const id = need.target.connectorId;
|
|
138
140
|
const instance = listConnectorInstances(this.deps.getConfig()).find((instance) => instance.connectorId === id);
|
|
141
|
+
const definition = (instance ? getInstalledConnectorDefinition(this.deps.getConfig(), instance.instanceId) : void 0) ?? getConnectorDefinition(id);
|
|
142
|
+
const authorizationMode = definition?.runtime.type === "composio" && definition.runtime.role === "toolkit" ? "browser" : "desktop";
|
|
139
143
|
const installation = getConnectorInstallation(`${id}-${wait.principalId}`);
|
|
140
144
|
const cli = instance?.materialized.type === "cli" ? getCliAdapter(instance.materialized.adapterId) : void 0;
|
|
141
145
|
const scopeBlocked = Math.max(1, ...need.capabilities.filter((capability) => cli || /^[A-Z]+_/.test(capability)).map((capability) => SCOPE_ORDER[cli ? cli.curatedActions[capability] ?? "read" : scopeForComposioAction(capability).scope])) > SCOPE_ORDER[installation?.maxScope ?? "read"];
|
|
@@ -166,6 +170,7 @@ var ConnectionRecoveryService = class {
|
|
|
166
170
|
})) : [];
|
|
167
171
|
return {
|
|
168
172
|
...need,
|
|
173
|
+
authorizationMode,
|
|
169
174
|
alternatives,
|
|
170
175
|
accountId: selected?.accountId ?? need.accountId,
|
|
171
176
|
connectionId: selected?.id ?? need.connectionId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, lstatSync, readFileSync, readdirSync, readlinkSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -7,7 +7,7 @@ export type GatewayAgentRow = {
|
|
|
7
7
|
name?: string;
|
|
8
8
|
description?: string;
|
|
9
9
|
language?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Avatar reference from the structured Agent profile. */
|
|
11
11
|
avatar?: string;
|
|
12
12
|
workspace: string;
|
|
13
13
|
/** Absolute directory for profile Markdown (`SOUL.md`, …) and gateway avatars: `agents/<id>/profile/`. */
|
|
@@ -26,14 +26,6 @@ export type GatewayAgentEffectiveConfigResponse = {
|
|
|
26
26
|
config: EffectiveAgentConfig;
|
|
27
27
|
sources: Record<string, 'system' | 'global' | 'agent'>;
|
|
28
28
|
};
|
|
29
|
-
/** Extract `**Avatar:**` value from profile IDENTITY.md (same line shape as the gateway console parser). */
|
|
30
|
-
export declare function extractAvatarFromIdentityMarkdown(content: string): string | undefined;
|
|
31
|
-
export declare function parseIdentityMarkdown(content: string): {
|
|
32
|
-
name?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
language?: string;
|
|
35
|
-
avatar?: string;
|
|
36
|
-
};
|
|
37
29
|
export declare function listGatewayAgents(_options?: {
|
|
38
30
|
locale?: string;
|
|
39
31
|
}): Promise<GatewayAgentsListResponse>;
|
|
@@ -64,6 +56,7 @@ export type UpdateAgentBody = {
|
|
|
64
56
|
setDefault?: boolean;
|
|
65
57
|
skills?: SkillOverride | null;
|
|
66
58
|
tools?: AgentEntry['tools'] | null;
|
|
59
|
+
toolAllowlist?: AgentEntry['toolAllowlist'] | null;
|
|
67
60
|
workflows?: AgentEntry['workflows'] | null;
|
|
68
61
|
runtime?: AgentEntry['runtime'] | null;
|
|
69
62
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
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 { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
5
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
5
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
7
6
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
8
7
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
9
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
10
|
-
import {
|
|
9
|
+
import { resolve } from "node:path";
|
|
11
10
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
12
11
|
//#region src/gateway/agents-admin.ts
|
|
13
12
|
/**
|
|
@@ -15,7 +14,6 @@ import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/prom
|
|
|
15
14
|
*/
|
|
16
15
|
init_agent_scope();
|
|
17
16
|
init_repository();
|
|
18
|
-
init_paths();
|
|
19
17
|
const EDITABLE_PROFILE_MARKDOWN_NAMES = new Set([...AGENT_PROFILE_MARKDOWN_SYSTEM_FILES]);
|
|
20
18
|
function collectAgentIdsForList() {
|
|
21
19
|
const entries = listAgentEntries().filter((e) => e.enabled !== false);
|
|
@@ -26,26 +24,6 @@ function collectAgentIdsForList() {
|
|
|
26
24
|
ids.add(defaultId);
|
|
27
25
|
return [...ids];
|
|
28
26
|
}
|
|
29
|
-
/** Extract `**Avatar:**` value from profile IDENTITY.md (same line shape as the gateway console parser). */
|
|
30
|
-
function extractAvatarFromIdentityMarkdown(content) {
|
|
31
|
-
return parseIdentityMarkdown(content).avatar || void 0;
|
|
32
|
-
}
|
|
33
|
-
function parseIdentityMarkdown(content) {
|
|
34
|
-
const out = {};
|
|
35
|
-
for (const line of content.split("\n")) {
|
|
36
|
-
const match = line.match(/^[-*]\s+\*\*(Name|Description|Language|Avatar):\*\*\s*(.*)/i);
|
|
37
|
-
if (match) {
|
|
38
|
-
const key = match[1]?.toLowerCase();
|
|
39
|
-
const v = match[2]?.trim() ?? "";
|
|
40
|
-
if (!v || /^_\(.*\)_$/.test(v)) continue;
|
|
41
|
-
if (key === "name") out.name = v;
|
|
42
|
-
if (key === "description") out.description = v;
|
|
43
|
-
if (key === "language") out.language = v;
|
|
44
|
-
if (key === "avatar") out.avatar = v;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return out;
|
|
48
|
-
}
|
|
49
27
|
async function listGatewayAgents(_options = {}) {
|
|
50
28
|
const defaultId = resolveDefaultAgentId();
|
|
51
29
|
const agents = [];
|
|
@@ -53,16 +31,13 @@ async function listGatewayAgents(_options = {}) {
|
|
|
53
31
|
const profile = resolveEffectiveAgentProfile(id);
|
|
54
32
|
const entry = listAgentEntries().find((e) => normalizeAgentId(e.id) === id);
|
|
55
33
|
if (!entry) continue;
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
identity = parseIdentityMarkdown(await readFile(join(resolveAgentProfileDir(id), WORKSPACE_FILES.IDENTITY), "utf-8"));
|
|
59
|
-
} catch {}
|
|
34
|
+
const identity = entry.profile;
|
|
60
35
|
agents.push({
|
|
61
36
|
id,
|
|
62
|
-
name:
|
|
63
|
-
...identity
|
|
64
|
-
...identity
|
|
65
|
-
...identity
|
|
37
|
+
name: identity?.name ?? id,
|
|
38
|
+
...identity?.description ? { description: identity.description } : {},
|
|
39
|
+
...identity?.language ? { language: identity.language } : {},
|
|
40
|
+
...identity?.avatar ? { avatar: identity.avatar } : {},
|
|
66
41
|
workspace: profile.resolvedWorkspacePath,
|
|
67
42
|
profileDir: resolveAgentProfileDir(id),
|
|
68
43
|
override: structuredClone(entry),
|
|
@@ -153,6 +128,7 @@ async function updateGatewayAgent(agentIdRaw, body) {
|
|
|
153
128
|
if (body.models !== void 0) patch.models = body.models ?? void 0;
|
|
154
129
|
if (body.skills !== void 0) patch.skills = body.skills ?? void 0;
|
|
155
130
|
if (body.tools !== void 0) patch.tools = body.tools ?? void 0;
|
|
131
|
+
if (body.toolAllowlist !== void 0) patch.toolAllowlist = body.toolAllowlist ?? void 0;
|
|
156
132
|
if (body.workflows !== void 0) patch.workflows = body.workflows ?? void 0;
|
|
157
133
|
if (body.runtime !== void 0) patch.runtime = body.runtime ?? void 0;
|
|
158
134
|
try {
|
|
@@ -459,4 +435,4 @@ async function deleteAgentAvatarFile(agentId) {
|
|
|
459
435
|
};
|
|
460
436
|
}
|
|
461
437
|
//#endregion
|
|
462
|
-
export { createGatewayAgent, deleteAgentAvatarFile, deleteGatewayAgent,
|
|
438
|
+
export { createGatewayAgent, deleteAgentAvatarFile, deleteGatewayAgent, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, readAgentAvatarFile, readAgentProfileFile, updateGatewayAgent, writeAgentAvatarFromBase64, writeAgentProfileFile };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
3
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
4
|
+
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
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, listAgentEntries, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
4
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
5
4
|
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, init_config } from "../../../user-context/config.js";
|
|
5
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
6
6
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
7
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
8
8
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentModelsOverrideSchema, AgentProfileSchema, RuntimePolicySchema, SkillOverrideSchema, ToolPoliciesSchema, WorkflowPolicySchema } from "../../../agent-config/schema.js";
|
|
1
|
+
import { AgentEntrySchema, AgentModelsOverrideSchema, AgentProfileSchema, RuntimePolicySchema, SkillOverrideSchema, ToolPoliciesSchema, WorkflowPolicySchema } from "../../../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../../../agent-config/index.js";
|
|
3
3
|
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
4
4
|
import { init_agent_scope } from "../../../agent/agent-scope.js";
|
|
@@ -105,6 +105,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
105
105
|
"models",
|
|
106
106
|
"skills",
|
|
107
107
|
"tools",
|
|
108
|
+
"toolAllowlist",
|
|
108
109
|
"workflows",
|
|
109
110
|
"runtime",
|
|
110
111
|
"setDefault"
|
|
@@ -132,6 +133,11 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
132
133
|
ok: false,
|
|
133
134
|
error: { message: "tools must be an object or null" }
|
|
134
135
|
}, 400);
|
|
136
|
+
const toolAllowlistPatch = body.toolAllowlist === null ? null : Object.hasOwn(body, "toolAllowlist") ? AgentEntrySchema.shape.toolAllowlist.safeParse(body.toolAllowlist) : void 0;
|
|
137
|
+
if (toolAllowlistPatch && toolAllowlistPatch !== null && !toolAllowlistPatch.success) return c.json({
|
|
138
|
+
ok: false,
|
|
139
|
+
error: { message: `toolAllowlist ${toolAllowlistPatch.error.issues[0]?.message ?? "is invalid"}` }
|
|
140
|
+
}, 400);
|
|
135
141
|
const modelsPatch = Object.hasOwn(body, "models") ? parsePatchModels(body.models) : void 0;
|
|
136
142
|
if (isParseError(modelsPatch)) return c.json({
|
|
137
143
|
ok: false,
|
|
@@ -166,6 +172,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
166
172
|
setDefault: body.setDefault === true,
|
|
167
173
|
...skillsPatch !== void 0 ? { skills: skillsPatch === null ? null : skillsPatch.data } : {},
|
|
168
174
|
...toolsPatch !== void 0 ? { tools: toolsPatch } : {},
|
|
175
|
+
...toolAllowlistPatch !== void 0 ? { toolAllowlist: toolAllowlistPatch === null ? null : toolAllowlistPatch.data } : {},
|
|
169
176
|
...workflowsPatch !== void 0 ? { workflows: workflowsPatch === null ? null : workflowsPatch.data } : {},
|
|
170
177
|
...runtimePatch !== void 0 ? { runtime: runtimePatch === null ? null : runtimePatch.data } : {}
|
|
171
178
|
});
|
|
@@ -20,6 +20,7 @@ import { createConnectorSetupSecretRequest, submitConnectorSetupSecret } from ".
|
|
|
20
20
|
import { recordConnectorHealthUsage } from "../../../connectors/usage.js";
|
|
21
21
|
import { getConnectorInstance, getInstalledConnectorDefinition, listConnectorInstances } from "../../../connectors/instances.js";
|
|
22
22
|
import { installConnector, installConnectorDefinition, uninstallConnector, updateConnectorConfig } from "../../../connectors/install.js";
|
|
23
|
+
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
23
24
|
import { resumeApprovedConnectorAction } from "../../../connectors/approval-resume.js";
|
|
24
25
|
import { getMcpOAuthManager } from "../../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
25
26
|
import { startConnectorAuthorization } from "../../../connectors/auth-provider-registry.js";
|
|
@@ -28,7 +29,6 @@ import { inspectManagedComposioStatus } from "../../../connectors/composio-manag
|
|
|
28
29
|
import { appendComposioTriggerEvent, listComposioTriggerEvents } from "../../../connectors/composio-triggers.js";
|
|
29
30
|
import { ingestLocalFolderSource } from "../../../connectors/connected-source-ingestion.js";
|
|
30
31
|
import { listUnderstandingSourceGrants, revokeUnderstandingSourceGrant } from "../../../user-context/sources/repository.js";
|
|
31
|
-
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
32
32
|
import { previewConnectorDefinition, testConnectorInstance } from "../../../connectors/health.js";
|
|
33
33
|
import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
34
34
|
import { projectComposioConnectionStatus } from "../../../connectors/runtime-status.js";
|
|
@@ -30,7 +30,7 @@ function parsePreferences(value) {
|
|
|
30
30
|
return result;
|
|
31
31
|
}
|
|
32
32
|
function parsePlatform(value) {
|
|
33
|
-
return value === "
|
|
33
|
+
return value === "harmonyos" ? value : null;
|
|
34
34
|
}
|
|
35
35
|
function parsePermission(value) {
|
|
36
36
|
return value === "granted" || value === "denied" || value === "unknown" ? value : null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
1
|
import { resolveEffectiveAgentConfigForAgent } from "../../../config/agent-profile.js";
|
|
2
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
4
4
|
import { computerModelProfile, init_model_policy, isDedicatedComputerModel } from "../../../computer/model-policy.js";
|
|
5
5
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
@@ -4,8 +4,6 @@ export declare function isLoopbackHost(host: string | undefined): boolean;
|
|
|
4
4
|
export declare function isAllInterfacesHost(host: string | undefined): boolean;
|
|
5
5
|
/** Vite dev server origins for the gateway console (`web/` defaults to port 3000). */
|
|
6
6
|
export declare const GATEWAY_DEV_CONSOLE_ORIGINS: readonly ["http://localhost:3000", "http://127.0.0.1:3000"];
|
|
7
|
-
/** Expo / React Native web dev server (Metro defaults to port 8081). */
|
|
8
|
-
export declare const GATEWAY_EXPO_DEV_ORIGINS: readonly ["http://localhost:8081", "http://127.0.0.1:8081"];
|
|
9
7
|
export type LanGatewayCandidate = {
|
|
10
8
|
url: string;
|
|
11
9
|
address: string;
|
package/dist/src/gateway/host.js
CHANGED
|
@@ -15,9 +15,6 @@ function isAllInterfacesHost(host) {
|
|
|
15
15
|
}
|
|
16
16
|
/** Vite dev server origins for the gateway console (`web/` defaults to port 3000). */
|
|
17
17
|
const GATEWAY_DEV_CONSOLE_ORIGINS = ["http://localhost:3000", "http://127.0.0.1:3000"];
|
|
18
|
-
/** Expo / React Native web dev server (Metro defaults to port 8081). */
|
|
19
|
-
const GATEWAY_EXPO_DEV_ORIGINS = ["http://localhost:8081", "http://127.0.0.1:8081"];
|
|
20
|
-
const GATEWAY_LOOPBACK_DEV_ORIGINS = [...GATEWAY_DEV_CONSOLE_ORIGINS, ...GATEWAY_EXPO_DEV_ORIGINS];
|
|
21
18
|
/** Non-internal IPv4 addresses that can serve this gateway on the local network. */
|
|
22
19
|
function enumerateLanGatewayCandidates(port) {
|
|
23
20
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -47,7 +44,7 @@ function buildDefaultCorsOrigins(params) {
|
|
|
47
44
|
const origins = new Set([
|
|
48
45
|
`http://localhost:${params.port}`,
|
|
49
46
|
`http://127.0.0.1:${params.port}`,
|
|
50
|
-
...
|
|
47
|
+
...GATEWAY_DEV_CONSOLE_ORIGINS
|
|
51
48
|
]);
|
|
52
49
|
const bindHost = params.bindHost?.trim();
|
|
53
50
|
if (bindHost && !isLoopbackHost(bindHost) && !isAllInterfacesHost(bindHost)) origins.add(`http://${bindHost}:${params.port}`);
|
|
@@ -90,4 +87,4 @@ function resolveAllowedBrowserOrigins(params) {
|
|
|
90
87
|
return origins;
|
|
91
88
|
}
|
|
92
89
|
//#endregion
|
|
93
|
-
export { GATEWAY_DEV_CONSOLE_ORIGINS,
|
|
90
|
+
export { GATEWAY_DEV_CONSOLE_ORIGINS, buildDefaultCorsOrigins, enumerateLanGatewayCandidates, isAllInterfacesHost, isLoopbackHost, originFromGatewayPublicUrl, resolveAllowedBrowserOrigins, resolveEffectiveGatewayPort, resolveGatewayCorsOrigins, resolveGatewayServiceListenPort };
|
|
@@ -18,13 +18,13 @@ import { getSessionConfig, init_config_repository } from "../storage/sqlite/conf
|
|
|
18
18
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
19
19
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
20
20
|
import { init_agent_scope, listAgentEntries, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
21
|
-
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
22
21
|
import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
|
|
23
22
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
24
23
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../routing/agent-session-key.js";
|
|
25
24
|
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
26
25
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
27
26
|
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
27
|
+
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
28
28
|
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
29
29
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
30
30
|
import { AI_USAGE_RETENTION_MS, markStaleAiUsageEventsUnknown, pruneAiUsageEvents } from "../storage/sqlite/ai-usage-repository.js";
|
|
@@ -74,12 +74,6 @@ import { ChatPreviewService } from "../chat-previews/service.js";
|
|
|
74
74
|
import "../chat-previews/index.js";
|
|
75
75
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
76
76
|
import "../config/index.js";
|
|
77
|
-
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
78
|
-
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
79
|
-
import "../knowledge/index.js";
|
|
80
|
-
import { ConnectionRecoveryService } from "../connectors/connection-recovery-service.js";
|
|
81
|
-
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
82
|
-
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
83
77
|
import { DiscussionService } from "../discussions/service.js";
|
|
84
78
|
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
85
79
|
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
@@ -88,6 +82,16 @@ import { DiscussionSealer } from "../discussions/sealer.js";
|
|
|
88
82
|
import "../discussions/index.js";
|
|
89
83
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
90
84
|
import "../endpoint-tools/index.js";
|
|
85
|
+
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
86
|
+
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
87
|
+
import "../knowledge/index.js";
|
|
88
|
+
import { ConnectionRecoveryService } from "../connectors/connection-recovery-service.js";
|
|
89
|
+
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
90
|
+
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
91
|
+
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
92
|
+
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
93
|
+
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
94
|
+
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
91
95
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
92
96
|
import { prepareAutomationAgentSession } from "./automation-agent-session.js";
|
|
93
97
|
import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
|
|
@@ -149,10 +153,6 @@ import { TaskMainUpdateDecisionService } from "../tasks/task-main-update-decisio
|
|
|
149
153
|
import { selectTaskMainUpdateAttempt, submitAndConfirmTaskMainUpdate } from "../tasks/task-main-update-input.js";
|
|
150
154
|
import { checkAppContextAccess, prepareAppContext } from "./service/app-context-access.js";
|
|
151
155
|
import { applyAutomaticVoiceLanguage, inferProductLanguageFromEnvironment, initializeVoiceDefaults } from "../voice/language-profile.js";
|
|
152
|
-
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
153
|
-
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
154
|
-
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
155
|
-
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
156
156
|
import crypto from "node:crypto";
|
|
157
157
|
//#region src/gateway/service.ts
|
|
158
158
|
init_session_repository();
|
|
@@ -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 } 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 } 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
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveConfigPath } from "../config/paths.js";
|
|
4
4
|
import { loadConfig } from "../config/loader.js";
|
|
5
|
-
import { resolveGatewayService } from "../daemon/service.js";
|
|
6
5
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
6
|
+
import { resolveGatewayService } from "../daemon/service.js";
|
|
7
7
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "./restart.js";
|
|
8
8
|
import { findVerifiedGatewayListenerPidsOnPortSync, signalVerifiedGatewayPidSync } from "./gateway-processes.js";
|
|
9
9
|
import { refreshGatewayServiceAfterUpdate } from "./update-service-refresh.js";
|
|
@@ -13,4 +13,3 @@ export declare function getNotificationDevice(deviceId: string): NotificationDev
|
|
|
13
13
|
export declare function listDeliverableNotificationDevices(now?: number): NotificationDevice[];
|
|
14
14
|
export declare function updateNotificationDevicePreferences(deviceId: string, patch: Partial<NotificationPreferences>): NotificationDevice | null;
|
|
15
15
|
export declare function removeNotificationDevice(deviceId: string): boolean;
|
|
16
|
-
export declare function disableNotificationDeviceForPushToken(pushToken: string): void;
|
|
@@ -70,7 +70,7 @@ function getNotificationDevice(deviceId) {
|
|
|
70
70
|
}
|
|
71
71
|
function listDeliverableNotificationDevices(now = Date.now()) {
|
|
72
72
|
return getSqliteDatabase().prepare(`SELECT * FROM device_push_endpoints
|
|
73
|
-
WHERE enabled = 1 AND permissions = 'granted' AND lease_expires_at > ?
|
|
73
|
+
WHERE enabled = 1 AND permissions = 'granted' AND platform = 'harmonyos' AND lease_expires_at > ?
|
|
74
74
|
ORDER BY updated_at DESC`).all(now).map(deviceFromRow);
|
|
75
75
|
}
|
|
76
76
|
function updateNotificationDevicePreferences(deviceId, patch) {
|
|
@@ -88,10 +88,5 @@ function updateNotificationDevicePreferences(deviceId, patch) {
|
|
|
88
88
|
function removeNotificationDevice(deviceId) {
|
|
89
89
|
return runSqliteWriteTransaction((db) => db.prepare("DELETE FROM device_push_endpoints WHERE device_id = ?").run(deviceId).changes > 0);
|
|
90
90
|
}
|
|
91
|
-
function disableNotificationDeviceForPushToken(pushToken) {
|
|
92
|
-
runSqliteWriteTransaction((db) => {
|
|
93
|
-
db.prepare("UPDATE device_push_endpoints SET enabled = 0, updated_at = ? WHERE push_token = ?").run(Date.now(), pushToken);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
91
|
//#endregion
|
|
97
|
-
export {
|
|
92
|
+
export { getNotificationDevice, listDeliverableNotificationDevices, registerNotificationDevice, removeNotificationDevice, updateNotificationDevicePreferences };
|