@xopcai/xopc 0.0.277 → 0.0.278
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/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Cavbls0E.js → agent-avatar-dicebear-lRVOwbrK.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-DyCyuJpi.js → agent-defaults-settings-panel-DAqn5DdL.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DlDTItrB.js → agents-DNQNTDkU.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-5gS0_LWl.js → app-management-settings-panel-oHTY5PDs.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DHzZCJon.js → appearance-settings-B0YnZ3ig.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-__yzruGu.js → apps-page-Bh0etSmL.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-Ia98yZe3.js → archive-plugin-D4x142le.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DiWW88c8.js → attachment-load-zibD2Hod.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BuhTeGRJ.js → automations-page-Dkp7gp_S.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DaisbmEh.js → automations-workspace-w4McwueN.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-DDD48cJv.js → binary-plugins-CfUzu1Hc.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-0AWVCD3F.js → block-editor-r5nCBBan.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BKOYX5xV.js → browser-automations-page-BnL4JnTM.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-C7zjxscU.js → browser-settings-page-DxX-t0EJ.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-7kZMT1r6.js → capabilities-settings-panel-CvacBQAI.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-BKUh6hzO.js → channels-settings-CJzSNo-L.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CW9Byi8V.js → chat-terminal-dock-CWVnJtBp.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-m8J-F3u8.js → connectors-page-DNBhBT0b.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-gdYmKC8W.js → date-picker-XjPSlgq_.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-40BYmiMc.js → dependency-picker-CkyfEP88.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-By1z6tKE.js → desktop-pet-BAE_NVx5.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-ByjJqx9H.js → desktop-pet-settings-BUw6V2R9.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CfWQfz7a.js → device-pairing-wizard-DsR5NQEC.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DQO65KbM.js → extension-debug-page-giBeIVUT.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Db32jip6.js → extension-page-Bqo9bNtx.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CL8Wx8lf.js → extension-settings-page-BX-6AA3k.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-wLly-Kc1.js → gateway-settings-Dil7vuyU.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CRXWu2q6.js → heartbeat-settings-DWFAopk_.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-FqgSwpmy.js → home-page-Dpeuvazg.js} +1 -1
- package/dist/gateway/static/root/assets/{index-5UchbidQ.js → index-B03HGpzt.js} +9 -9
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CjehhHPz.js → keyboard-shortcuts-settings-BKGPpBnV.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DtYZa4GK.js → local-app-workbench-page-CBtemxFc.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CrIdaTrK.js → local-apps-page-B06ToOxB.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-FfSwV_VH.js → logs-page-DibI1GsP.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BakV5aOw.js → management-settings-DJ6yMZCd.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Blv9U6Jp.js → media-plugins-CdrLNAks.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-JbvyGdEX.js → note-detail-panel-GOxomxOK.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-Dm7mE2FK.js → notes-page-CQBgk3_x.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-BQfVtLLC.js → page-tabs-B7LA4z-x.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-kjHFiO81.js → preview-open-alternatives-DTQRN7WR.js} +1 -1
- package/dist/gateway/static/root/assets/proactive-card-BF3741px.js +1 -0
- package/dist/gateway/static/root/assets/proactive-page-1EM217v0.js +1 -0
- package/dist/gateway/static/root/assets/{project-detail-page-h00lfcVI.js → project-detail-page-B1Pm-fQd.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-C2Bo1FAL.js → projects-page-DUrxyNR9.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-_bZYAl49.js → remote-access-hub-C6VzHUwx.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BhJlopSW.js → runtime-tools-settings-panel-D-DZf4I1.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-cxoO_5I1.js → schema-form-B-Yj9DVW.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-F7CHsvPa.js → sessions-page-DtemHfkv.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-ByEVQe0c.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BiRTWiBi.js → settings-form-section-BxPUqwY6.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-D-Cb71pq.js → settings-page-zLn8lIrs.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BwIrk3Jx.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DciHfTay.js → share-preview-page-DAc_FkVc.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BS2pnWO0.js → shares-settings-Dwdv6QyS.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DX344nVV.js → skill-reload-api-CDzQWN60.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-BhfKUsv7.js → skills-page-CO5XVkbY.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CU7PALQB.js → skills-page.utils-BR5bk2vT.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-GpjNbqvM.js → system-settings-panel-C0ptJutB.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DOjcKOzQ.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-Bhi_x_h4.js → tunnel-api-BABuQvGD.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-LvCiBidm.js → use-autosave-Dc5aN2px.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-BydARq2C.js → user-model-page-UhsSP_pC.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BlGysZxj.js → voice-api-key-field-CY0DpJui.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DvIQOR5x.js → work-discovery-overlay-Brg9yJBr.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-JIp60bXT.js → workflow-run-setup-panel-D3fq7boB.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-B972t6zx.js → workflows-page-S7XXNBWa.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +17 -17
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/run-background-review.js +4 -4
- package/dist/src/agent/commands/command-isolation.d.ts +1 -0
- package/dist/src/agent/commands/command-isolation.js +17 -1
- package/dist/src/agent/commands/commandMounts.d.ts +2 -0
- package/dist/src/agent/commands/commandMounts.js +32 -0
- package/dist/src/agent/context/coordinator.js +3 -3
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/execution-scope.js +2 -2
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/embedded/index.js +2 -2
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +5 -5
- package/dist/src/agent/embedded/run-turn.js +2 -2
- package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/mcp-provider.js +2 -2
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
- package/dist/src/agent/image/generation/providers/fal.js +1 -1
- package/dist/src/agent/image/generation/providers/google.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/index.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/index.js +2 -2
- package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +5 -5
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/sandbox/command-validator.js +0 -20
- package/dist/src/agent/sandbox/exec-policy.d.ts +1 -0
- package/dist/src/agent/sandbox/exec-policy.js +3 -3
- package/dist/src/agent/sandbox/fileAccess.d.ts +7 -0
- package/dist/src/agent/sandbox/fileAccess.js +100 -0
- package/dist/src/agent/sandbox/path-policy.d.ts +2 -0
- package/dist/src/agent/sandbox/path-policy.js +54 -17
- package/dist/src/agent/sandbox/sanitize-env-vars.js +10 -9
- package/dist/src/agent/service/direct-turn-helpers.js +6 -6
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +5 -5
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +19 -19
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +3 -3
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +5 -5
- package/dist/src/agent/tools/apply-patch.js +25 -38
- package/dist/src/agent/tools/create-share-tool.js +13 -5
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/exec-command.js +2 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +13 -13
- package/dist/src/agent/tools/find.js +5 -3
- package/dist/src/agent/tools/grep.js +21 -4
- package/dist/src/agent/tools/image-generate-tool.js +5 -6
- package/dist/src/agent/tools/index.js +5 -5
- package/dist/src/agent/tools/list-dir.js +2 -1
- package/dist/src/agent/tools/managed-job-tool.js +1 -0
- package/dist/src/agent/tools/publish-artifacts.js +4 -3
- package/dist/src/agent/tools/read.js +9 -6
- package/dist/src/agent/tools/repository-search.d.ts +2 -0
- package/dist/src/agent/tools/repository-search.js +51 -7
- package/dist/src/agent/tools/review-workspace.js +76 -10
- package/dist/src/agent/tools/send-media.js +5 -4
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/tool-paths.js +3 -1
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +6 -19
- package/dist/src/agent/tools/xopc-use-tool.js +6 -6
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent-config/schema.d.ts +24 -0
- package/dist/src/agent-config/schema.js +2 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +2 -2
- package/dist/src/chat-commands/context.js +2 -2
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +6 -6
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +21 -20
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/gateway/token.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +2 -2
- package/dist/src/cli/commands/runtime.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tui.js +1 -1
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/cli/extension-cli-register.js +4 -4
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +16 -0
- package/dist/src/connectors/connected-source-understanding.js +2 -2
- package/dist/src/connectors/connection-recovery-service.js +3 -3
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/extensions/api.js +3 -3
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/agents-admin.js +4 -4
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/browser.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +2 -2
- package/dist/src/gateway/hono/routes/media.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/proactive-control.js +4 -4
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +25 -4
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/status.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +4 -4
- package/dist/src/gateway/hono/routes/user-model.js +4 -4
- package/dist/src/gateway/hono/routes/voice.js +3 -3
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +10 -10
- package/dist/src/gateway/media-access.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +4 -4
- package/dist/src/gateway/service/marketplace-service.js +3 -3
- package/dist/src/gateway/service/run-gateway-agent.js +3 -3
- package/dist/src/gateway/service.js +36 -36
- package/dist/src/gateway/session-context-summary.js +2 -2
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +10 -10
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/media-shared/http/ssrf-guard.js +1 -1
- package/dist/src/notes/agent-context.js +3 -3
- package/dist/src/proactive/actions/service.js +1 -1
- package/dist/src/proactive/execution/agent-executor.js +1 -1
- package/dist/src/proactive/execution/context.js +1 -1
- package/dist/src/proactive/execution/worker.js +1 -1
- package/dist/src/proactive/experience.js +7 -2
- package/dist/src/proactive/follow-ups.js +1 -1
- package/dist/src/proactive/inbox/cards.js +2 -2
- package/dist/src/proactive/inbox/delivery.js +2 -2
- package/dist/src/proactive/inbox/digest.js +2 -2
- package/dist/src/proactive/inbox/notification-policy.js +1 -1
- package/dist/src/proactive/inbox/repository.js +1 -1
- package/dist/src/proactive/inbox/service.js +1 -1
- package/dist/src/proactive/index.js +1 -1
- package/dist/src/proactive/temporal/worker.js +1 -1
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +3 -3
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/share-store.js +6 -2
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +3 -3
- package/dist/src/tasks/index.js +3 -3
- package/dist/src/tasks/task-application-service.js +78 -4
- package/dist/src/tasks/task-context-assembler.js +2 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +9 -9
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -5
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +5 -5
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/voice/local/runtime-worker.js +1 -1
- package/dist/src/voice/realtime/memory-context.js +3 -3
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/local-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/speak-core.js +1 -1
- package/dist/src/work-discovery/service.js +3 -3
- package/dist/src/workflows/context/workflow-context.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +6 -6
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/proactive-card-Ap_wfos3.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-D1lEuanT.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DtZSUX4H.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-VPfBsNVv.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-CElcQ9Sh.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { 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 { init_agent_scope, normalizeAgentId } from "../../../agent/agent-scope.js";
|
|
4
|
-
import { deleteAgentAvatarFile, finalizeCreateAgentDirs, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, prepareCreateAgent, prepareDeleteAgent, prepareUpdateAgent, readAgentAvatarFile, readAgentProfileFile, runAfterDeletePurge, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
5
4
|
import { getVoiceModelsConfig } from "../../../config/voice.js";
|
|
5
|
+
import { deleteAgentAvatarFile, finalizeCreateAgentDirs, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, prepareCreateAgent, prepareDeleteAgent, prepareUpdateAgent, readAgentAvatarFile, readAgentProfileFile, runAfterDeletePurge, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
6
6
|
//#region src/gateway/hono/routes/agents.ts
|
|
7
7
|
init_agent_config();
|
|
8
8
|
init_agent_scope();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAllModels, getAvailableModels, init_providers } from "../../../providers/index.js";
|
|
2
|
-
import { ActivationPlanner } from "../../../extensions/activation-planner.js";
|
|
3
2
|
import { mergeActivationContext } from "../../../extensions/activation-context.js";
|
|
3
|
+
import { ActivationPlanner } from "../../../extensions/activation-planner.js";
|
|
4
4
|
import { fetchRegistry, listExtensions, searchExtensions } from "../../../extensions/marketplace.js";
|
|
5
5
|
import { buildWhenContextSnapshot } from "../../../extensions/when-context.js";
|
|
6
6
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { deleteBrowserTabBinding, getBrowserTabBinding, setBrowserTabBinding } from "../../../storage/sqlite/browser-tab-binding-repository.js";
|
|
2
2
|
import { browserTabBindingRequestSchema } from "../../../../packages/gateway-contract/src/browser-tab-binding.js";
|
|
3
3
|
import { getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
4
|
-
import "../../../../packages/browser-control-contract/src/index.js";
|
|
5
4
|
import { decideBrowserApproval, listBrowserApprovals } from "../../../browser/policy/approval-store.js";
|
|
5
|
+
import "../../../../packages/browser-control-contract/src/index.js";
|
|
6
6
|
import { createBrowserDriver } from "../../../browser/drivers/create-driver.js";
|
|
7
7
|
import { checkBrowserReadiness } from "../../../browser/readiness.js";
|
|
8
8
|
import { isLoopbackClientIp } from "../../security/loopback.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
1
2
|
import { effectiveWorkspacePathForSession } from "../../../session/session-workspace.js";
|
|
2
3
|
import { getProjectForSession } from "../../../projects/workspace.js";
|
|
4
|
+
import { buildReviewContext, resolveGitRoot } from "../../../review/review-git.js";
|
|
5
|
+
import "../../../chat-commands/index.js";
|
|
3
6
|
import { isRegisteredProvider } from "../../../agent/skills/marketplace/registry.js";
|
|
4
7
|
import "../../../agent/skills/skills-marketplace.js";
|
|
5
8
|
import { isSkillInstallTarget } from "../../../agent/skills/install-target.js";
|
|
6
|
-
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
7
|
-
import { buildReviewContext, resolveGitRoot } from "../../../review/review-git.js";
|
|
8
|
-
import "../../../chat-commands/index.js";
|
|
9
9
|
//#region src/gateway/hono/routes/commands-skills.ts
|
|
10
10
|
function parseMarketplaceProviderQuery(raw) {
|
|
11
11
|
const v = raw?.trim().toLowerCase();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_public_url, validatePublicUrl } from "../../../../config/public-url.js";
|
|
2
2
|
import { isValidIPv4 } from "../../../../config/gateway-bind.js";
|
|
3
|
+
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
3
4
|
import { mergeShareConfigPatch } from "../../../../share/share-config.js";
|
|
4
5
|
import { mergeSiteShareConfigPatch } from "../../../../share/site-share-config.js";
|
|
5
|
-
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
6
6
|
import { PATCH_OK, patchError } from "./result.js";
|
|
7
7
|
//#region src/gateway/hono/routes/config-patch/gateway.ts
|
|
8
8
|
init_public_url();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { canonicalizeConfiguredMcpServer, normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
2
|
-
import { loadMergedBundleMcpConfig } from "../../../agent/mcp/bundle-mcp-config.js";
|
|
3
1
|
import { isManagedConnectorServer } from "../../../connectors/materialize.js";
|
|
4
2
|
import { getWorkspacePath } from "../../../config/workspace-path-helpers.js";
|
|
3
|
+
import { canonicalizeConfiguredMcpServer, normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
4
|
+
import { loadMergedBundleMcpConfig } from "../../../agent/mcp/bundle-mcp-config.js";
|
|
5
5
|
import { getMcpOAuthManager } from "../../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
6
6
|
import { listBundleMcpServerCapabilitiesForGateway, listBundleMcpServerToolsForGateway } from "../../../agent/mcp/bundle-mcp-gateway.js";
|
|
7
7
|
//#region src/gateway/hono/routes/mcp.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../../chat-limits.js";
|
|
1
2
|
import { mimeTypeFromMediaPath, saveMediaBuffer } from "../../../media/store.js";
|
|
2
3
|
import { readMediaReference } from "../../../media/media-reference.js";
|
|
3
|
-
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../../chat-limits.js";
|
|
4
4
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
5
5
|
import { resolveScopedMediaReference } from "../../media-access.js";
|
|
6
6
|
//#region src/gateway/hono/routes/media.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
2
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
4
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
5
5
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
@@ -7,13 +7,13 @@ import { CredentialResolver, init_credentials } from "../../../auth/credentials.
|
|
|
7
7
|
import "../../../providers/constants.js";
|
|
8
8
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
9
9
|
import { PROVIDER_META, getAllModels, getAllProviders, getAvailableModels, getProviderAuthState, init_providers, isProviderConfigured, isProviderConfiguredSync } from "../../../providers/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import "../../../capabilities/readiness/index.js";
|
|
10
|
+
import { deleteCustomImageProvider, listCustomImageProviders, upsertCustomImageProvider } from "../../custom-image-providers.js";
|
|
12
11
|
import { getImageGenerationProvider, reloadImageGenerationProviders, resolveImageGenerationCredentialMode } from "../../../agent/image/generation/provider-registry.js";
|
|
12
|
+
import { getAgentImageGenerationConfig, getDefaultImageGenerationConfig, getImageGenerationCatalog, prepareDefaultImageGenerationSetup, prepareImageGenerationSetup, verifyImageGenerationCredential } from "../../image-generation-setup.js";
|
|
13
13
|
import { SessionConfigStore } from "../../../session/config-store.js";
|
|
14
|
+
import { buildCapabilityPlansForConfig } from "../../../capabilities/readiness/from-config.js";
|
|
15
|
+
import "../../../capabilities/readiness/index.js";
|
|
14
16
|
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
15
|
-
import { deleteCustomImageProvider, listCustomImageProviders, upsertCustomImageProvider } from "../../custom-image-providers.js";
|
|
16
|
-
import { getAgentImageGenerationConfig, getDefaultImageGenerationConfig, getImageGenerationCatalog, prepareDefaultImageGenerationSetup, prepareImageGenerationSetup, verifyImageGenerationCredential } from "../../image-generation-setup.js";
|
|
17
17
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
18
18
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
19
19
|
import { respondStartupUnavailable } from "../lib/startup-unavailable.js";
|
|
@@ -2,9 +2,9 @@ import { ObjectLinkService } from "../../../activity/service.js";
|
|
|
2
2
|
import { buildSessionKey, init_session_key } from "../../../routing/session-key.js";
|
|
3
3
|
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
4
4
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
5
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
5
6
|
import { getShareStore } from "../../../share/share-store.js";
|
|
6
7
|
import { resolveShareUrl } from "../../../share/share-url.js";
|
|
7
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
8
8
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
9
9
|
import { NoteShareService, NoteShareVersionConflictError } from "../../../share/note-share-service.js";
|
|
10
10
|
import { createReadStream } from "node:fs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getSqliteDatabase } from "../../../storage/sqlite/transaction.js";
|
|
2
2
|
import { ProactiveConflict, proactivePreferences, updateProactivePreferences } from "../../../proactive/policy/service.js";
|
|
3
|
+
import { recordProactivePresence } from "../../../proactive/policy/presence.js";
|
|
3
4
|
import { controlledSubscriptions, createControlledSubscription, requireSubscription, templateCatalog, updateControlledSubscription } from "../../../proactive/scenarios/control.js";
|
|
4
|
-
import { listMailFollowUps, mailFollowUpSources, startMailFollowUp, updateMailFollowUp } from "../../../proactive/follow-ups.js";
|
|
5
5
|
import { cardChanges, getCard, listCards, performCardAction } from "../../../proactive/inbox/cards.js";
|
|
6
|
-
import { checkDelegation, delegationOverview, startDelegation } from "../../../proactive/experience.js";
|
|
7
|
-
import { recordProactivePresence } from "../../../proactive/policy/presence.js";
|
|
8
6
|
import { digestCards } from "../../../proactive/inbox/digest.js";
|
|
7
|
+
import { listMailFollowUps, mailFollowUpSources, startMailFollowUp, updateMailFollowUp } from "../../../proactive/follow-ups.js";
|
|
8
|
+
import { checkDelegation, delegationOverview, startDelegation } from "../../../proactive/experience.js";
|
|
9
9
|
import { acknowledgeBrowserProbe, listBrowserProbes, prepareBrowserPush, registerBrowserPush, testBrowserPush, unregisterBrowserPush } from "../../../notifications/web-push.js";
|
|
10
10
|
import { ReadonlyProactiveAgentExecutor } from "../../../proactive/execution/agent-executor.js";
|
|
11
11
|
import { proactiveMetrics } from "../../../proactive/metrics.js";
|
|
@@ -127,7 +127,7 @@ function registerProactiveControlRoutes(app, deps) {
|
|
|
127
127
|
return c.json({
|
|
128
128
|
ok: true,
|
|
129
129
|
runs: getSqliteDatabase().prepare(`SELECT run_id AS id, status, outcome_reason AS reason,
|
|
130
|
-
started_at AS startedAt, completed_at AS completedAt, error_message AS error FROM proactive_runs WHERE subscription_id = ? ORDER BY started_at DESC LIMIT 30`).all(c.req.param("id"))
|
|
130
|
+
started_at AS startedAt, completed_at AS completedAt, error_message AS error, attempt, next_attempt_at AS nextAttemptAt FROM proactive_runs WHERE subscription_id = ? ORDER BY started_at DESC LIMIT 30`).all(c.req.param("id"))
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
133
|
app.get("/api/proactive/cards", (c) => c.json({
|
|
@@ -5,8 +5,6 @@ import "../../../storage/sqlite/index.js";
|
|
|
5
5
|
import { ActivityService } from "../../../activity/service.js";
|
|
6
6
|
import "../../../activity/index.js";
|
|
7
7
|
import { resolveEffectiveAgentProfile } from "../../../config/agent-profile.js";
|
|
8
|
-
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
9
|
-
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
10
8
|
import { ExecutionEnvironmentStore } from "../../../execution-environments/store.js";
|
|
11
9
|
import { listKnowledgeItems, writeKnowledgeItem } from "../../../knowledge-memory/repository.js";
|
|
12
10
|
import "../../../knowledge-memory/index.js";
|
|
@@ -16,6 +14,8 @@ import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId }
|
|
|
16
14
|
import { inferSuggestedProjectDefaultAgentId } from "../../../projects/project-agent-suggestion.js";
|
|
17
15
|
import { buildProjectLoopOverview } from "../../../projects/project-loop.js";
|
|
18
16
|
import "../../../projects/index.js";
|
|
17
|
+
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
18
|
+
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
19
19
|
import { TaskApplicationService } from "../../../tasks/task-application-service.js";
|
|
20
20
|
import { defineTaskContract } from "../../../tasks/task-contract-definition.js";
|
|
21
21
|
import { ProjectOperatingViewService, summarizeProjectOperatingView } from "../../../tasks/project-operating-view-service.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { deleteBrowserTabBinding } from "../../../storage/sqlite/browser-tab-binding-repository.js";
|
|
2
2
|
import { SessionDiscoveryQuerySchema } from "../../../../packages/gateway-contract/src/session-identity.js";
|
|
3
3
|
import { buildSessionKey, init_session_key } from "../../../routing/session-key.js";
|
|
4
|
+
import { SessionEnvironmentService } from "../../../execution-environments/session-environment-service.js";
|
|
4
5
|
import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
5
6
|
import "../../../projects/index.js";
|
|
6
7
|
import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
7
8
|
import { evictEmbeddedSessionRunner } from "../../../agent/embedded/session-runner.js";
|
|
8
|
-
import { SessionEnvironmentService } from "../../../execution-environments/session-environment-service.js";
|
|
9
9
|
import { deleteMediaUrisNoLongerReferenced } from "../../../media/session-references.js";
|
|
10
10
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
11
11
|
import { createGatewayRouteLogger, logRouteError } from "../lib/route-logger.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { loadCompactionSourceSnapshot } from "../../../storage/sqlite/transcript-repository.js";
|
|
2
2
|
import "../../../storage/sqlite/index.js";
|
|
3
|
-
import { FileServiceError } from "../../../files/file-service.js";
|
|
4
3
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
4
|
+
import { FileServiceError } from "../../../files/file-service.js";
|
|
5
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
6
|
+
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
5
7
|
import { SHARE_CONFIG_DEFAULTS } from "../../../share/share-types.js";
|
|
6
8
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
7
9
|
import { logShareAudit } from "../../../share/share-audit.js";
|
|
@@ -12,10 +14,8 @@ import { SessionShareService, SessionShareSnapshotConflictError } from "../../..
|
|
|
12
14
|
import { HostedPublicationPublisher, HostedSessionShareBuilder, HostedShareAuthorizationError, HostedShareBindingStore, HostedShareRemoteError } from "../../../share/hosted-session-share.js";
|
|
13
15
|
import { HostedStaticSitePublicationBuilder } from "../../../share/hosted-static-site-publication.js";
|
|
14
16
|
import { publishHostedStaticSite } from "../../../share/hosted-static-site-publish.js";
|
|
15
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
16
17
|
import { audienceDefaults, cleanupStagedSite, decideShareKind, forgetStagedSite, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../../share/share-auto.js";
|
|
17
18
|
import { deleteThumbnail, placeholderSvg, readThumbnail, scheduleThumbnail, thumbnailContentType, thumbnailExists } from "../../../share/share-thumbnail.js";
|
|
18
|
-
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
19
19
|
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
20
20
|
import { SHARED_HTML_CSP } from "../../security/csp.js";
|
|
21
21
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
@@ -1571,7 +1571,28 @@ function registerShareRoutes(authenticated, deps) {
|
|
|
1571
1571
|
const patch = {};
|
|
1572
1572
|
if (typeof body.extendTtlMs === "number") patch.extendTtlMs = body.extendTtlMs;
|
|
1573
1573
|
if (body.maxViews === null || typeof body.maxViews === "number") patch.maxViews = body.maxViews;
|
|
1574
|
-
const
|
|
1574
|
+
const existing = store.getById(id);
|
|
1575
|
+
if (patch.extendTtlMs !== void 0 && existing) {
|
|
1576
|
+
if (existing.revoked) return c.json({
|
|
1577
|
+
ok: false,
|
|
1578
|
+
error: { message: "This share was revoked and cannot be restored" }
|
|
1579
|
+
}, 409);
|
|
1580
|
+
if (existing.kind === "file" || existing.kind === "directory") {
|
|
1581
|
+
if (!(await store.validateFileIntegrity(existing)).valid) return c.json({
|
|
1582
|
+
ok: false,
|
|
1583
|
+
error: { message: "The original artifact is missing or was replaced. Generate a new artifact from the task." }
|
|
1584
|
+
}, 410);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
let updated;
|
|
1588
|
+
try {
|
|
1589
|
+
updated = store.update(id, patch);
|
|
1590
|
+
} catch (error) {
|
|
1591
|
+
return c.json({
|
|
1592
|
+
ok: false,
|
|
1593
|
+
error: { message: error instanceof Error ? error.message : "Cannot renew share" }
|
|
1594
|
+
}, 400);
|
|
1595
|
+
}
|
|
1575
1596
|
if (!updated) return c.json({
|
|
1576
1597
|
ok: false,
|
|
1577
1598
|
error: { message: "Not found" }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
2
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
2
3
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
3
4
|
import { getSiteShareStore } from "../../../share/site-share-store.js";
|
|
4
5
|
import { resolveSiteShareUrl } from "../../../share/share-url.js";
|
|
5
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
6
6
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/gateway/hono/routes/site-shares.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../../providers/index.js";
|
|
2
|
-
import { getGatewayAgentEffectiveConfig } from "../../agents-admin.js";
|
|
3
2
|
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
4
3
|
import { mergeSttConfigFromAppConfig } from "../../../voice/stt/config.js";
|
|
5
4
|
import "../../../voice/stt/index.js";
|
|
5
|
+
import { getGatewayAgentEffectiveConfig } from "../../agents-admin.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
//#region src/gateway/hono/routes/status.ts
|
|
8
8
|
init_providers();
|
|
@@ -4,14 +4,14 @@ import { TaskBoardPositionRequestSchema, TaskCommandRequestSchema, TaskContextIn
|
|
|
4
4
|
import { ProjectMonitoringUpdateSchema } from "../../../../packages/gateway-contract/src/project-monitoring.js";
|
|
5
5
|
import { enqueueTaskChangedEvent } from "../../../tasks/task-change-events.js";
|
|
6
6
|
import { TaskRunRepository } from "../../../tasks/task-run-repository.js";
|
|
7
|
-
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
8
|
-
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
9
|
-
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
10
7
|
import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
11
8
|
import { TaskContextRepository } from "../../../tasks/task-context-repository.js";
|
|
9
|
+
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
10
|
+
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
12
11
|
import { TaskDependencyError, TaskDependencyService } from "../../../tasks/task-dependency-service.js";
|
|
13
12
|
import { TaskApplicationService } from "../../../tasks/task-application-service.js";
|
|
14
13
|
import { ProjectMonitoringService } from "../../../tasks/project-monitoring-service.js";
|
|
14
|
+
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
15
15
|
import { ProjectOperatingViewService } from "../../../tasks/project-operating-view-service.js";
|
|
16
16
|
import { TaskValueMetricsService } from "../../../tasks/task-value-metrics-service.js";
|
|
17
17
|
import { TaskHandoffService } from "../../../tasks/task-handoff-service.js";
|
|
@@ -406,7 +406,7 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
406
406
|
latest: result.model
|
|
407
407
|
}, 409);
|
|
408
408
|
}
|
|
409
|
-
if (parsed.data.command?.type === "add_wait" && parsed.data.command.wait.kind === "paused" || parsed.data.command?.type === "close") {
|
|
409
|
+
if (parsed.data.command?.type === "add_wait" && parsed.data.command.wait.kind === "paused" || parsed.data.command?.type === "close" || parsed.data.command?.type === "resolve_wait" && parsed.data.command.resolution?.kind === "task_approval" && parsed.data.command.resolution.decision === "deny") {
|
|
410
410
|
const activeRun = runs.getActiveRoot(c.req.param("id"));
|
|
411
411
|
if (activeRun?.sessionKey) {
|
|
412
412
|
const liveRunId = deps.service.getActiveWebchatRunId(activeRun.sessionKey);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createCollaborationRule, getCollaborationRule, listCollaborationRules, setCollaborationRuleStatus } from "../../../storage/sqlite/collaboration-rule-repository.js";
|
|
2
|
-
import { getKnowledgeItem, listKnowledgeItems, searchKnowledgeItems, setKnowledgeStatus } from "../../../knowledge-memory/repository.js";
|
|
3
|
-
import "../../../knowledge-memory/index.js";
|
|
4
2
|
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus } from "../../../user-model/goals.js";
|
|
5
3
|
import { getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../../user-model/repository.js";
|
|
6
4
|
import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
|
|
7
5
|
import { bootstrapUserModel } from "../../../user-model/bootstrap.js";
|
|
8
6
|
import "../../../user-model/index.js";
|
|
7
|
+
import { getKnowledgeItem, listKnowledgeItems, searchKnowledgeItems, setKnowledgeStatus } from "../../../knowledge-memory/repository.js";
|
|
8
|
+
import "../../../knowledge-memory/index.js";
|
|
9
|
+
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
10
|
+
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
9
11
|
import { listMemoryMaintenanceRuns } from "../../../memory-maintenance/service.js";
|
|
10
12
|
import "../../../memory-maintenance/index.js";
|
|
11
|
-
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
12
|
-
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
13
13
|
import { userInfo } from "node:os";
|
|
14
14
|
//#region src/gateway/hono/routes/user-model.ts
|
|
15
15
|
function object(value) {
|
|
@@ -2,17 +2,17 @@ import { getDefaultModelSync, init_providers, resolveModel } from "../../../prov
|
|
|
2
2
|
import { completeWithResolvedCredentials } from "../../../providers/model-call.js";
|
|
3
3
|
import { resolveTtsProviderConfigSlice } from "../../../voice/tts/config-slice.js";
|
|
4
4
|
import { isTTSAvailable, resolveSpeechProvider } from "../../../voice/tts/factory.js";
|
|
5
|
-
import { speak, speakStream } from "../../../voice/tts/speak-core.js";
|
|
6
5
|
import { mergeTtsConfigFromAppConfig } from "../../../voice/tts/merge-config.js";
|
|
6
|
+
import { speak, speakStream } from "../../../voice/tts/speak-core.js";
|
|
7
7
|
import { getLocalVoiceRuntimeClient } from "../../../voice/local/runtime-client.js";
|
|
8
8
|
import { getAudioDecoderStatus } from "../../../voice/audio/normalize.js";
|
|
9
9
|
import { resolveSttProviderConfigSlice } from "../../../voice/stt/config-slice.js";
|
|
10
|
-
import { STTTranscriptionError, transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
11
10
|
import { isSTTAvailable } from "../../../voice/stt/availability.js";
|
|
11
|
+
import "../../../voice/tts/index.js";
|
|
12
|
+
import { STTTranscriptionError, transcribe } from "../../../voice/stt/transcribe-core.js";
|
|
12
13
|
import { mergeSttConfigFromAppConfig } from "../../../voice/stt/config.js";
|
|
13
14
|
import "../../../voice/stt/index.js";
|
|
14
15
|
import { listSttProvidersForApi } from "../../../voice/stt/list-providers.js";
|
|
15
|
-
import "../../../voice/tts/index.js";
|
|
16
16
|
import { withModelConfigLock } from "../../../session/model-config-lock.js";
|
|
17
17
|
import { createVoiceSessionRequestSchema } from "../../../../packages/realtime-protocol/src/voice.js";
|
|
18
18
|
import { resolveOmniRoute } from "../../../voice/realtime/omniRoute.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { init_agent_scope, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
2
|
+
import { validateWorkflowDefinitionInput } from "../../../workflows/domain/validation.js";
|
|
3
|
+
import { WorkflowNameConflictError, WorkflowRevisionConflictError, createWorkflowCatalog } from "../../../agent/workflow/catalog.js";
|
|
2
4
|
import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
3
5
|
import "../../../projects/index.js";
|
|
4
6
|
import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
5
|
-
import { validateWorkflowDefinitionInput } from "../../../workflows/domain/validation.js";
|
|
6
|
-
import { WorkflowNameConflictError, WorkflowRevisionConflictError, createWorkflowCatalog } from "../../../agent/workflow/catalog.js";
|
|
7
7
|
import "../../../workflows/domain/index.js";
|
|
8
8
|
import { resolveWorkflowRunArtifactsDir } from "../../../workflows/store/paths.js";
|
|
9
9
|
import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-service.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConfigSchema, init_schema } from "../config/schema.js";
|
|
2
2
|
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
|
|
4
3
|
import { fetchWithTimeoutGuarded } from "../media-shared/http/provider-http.js";
|
|
5
4
|
import "../media-shared/http/index.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
|
|
6
6
|
import { getImageGenerationProvider, listImageGenerationProvidersSummary } from "../agent/image/generation/provider-registry.js";
|
|
7
7
|
//#region src/gateway/image-generation-setup.ts
|
|
8
8
|
init_agent_scope();
|
package/dist/src/gateway/lock.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import net from "node:net";
|
|
5
|
-
import fs
|
|
5
|
+
import fs from "node:fs/promises";
|
|
6
6
|
import { homedir } from "os";
|
|
7
7
|
//#region src/gateway/lock.ts
|
|
8
8
|
/**
|
|
@@ -57,7 +57,7 @@ function isPidAlive(pid) {
|
|
|
57
57
|
function readLinuxStartTime(pid) {
|
|
58
58
|
if (process.platform !== "linux") return null;
|
|
59
59
|
try {
|
|
60
|
-
const raw =
|
|
60
|
+
const raw = fsSync.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
|
|
61
61
|
const closeParen = raw.lastIndexOf(")");
|
|
62
62
|
if (closeParen < 0) return null;
|
|
63
63
|
const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
|
|
@@ -69,7 +69,7 @@ function readLinuxStartTime(pid) {
|
|
|
69
69
|
}
|
|
70
70
|
async function readLockPayload(lockPath) {
|
|
71
71
|
try {
|
|
72
|
-
const raw = await fs
|
|
72
|
+
const raw = await fs.readFile(lockPath, "utf8");
|
|
73
73
|
const parsed = JSON.parse(raw);
|
|
74
74
|
if (typeof parsed.pid !== "number") return null;
|
|
75
75
|
if (typeof parsed.createdAt !== "string") return null;
|
|
@@ -105,11 +105,11 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
105
105
|
const staleMs = opts.staleMs ?? DEFAULT_STALE_MS;
|
|
106
106
|
const port = opts.port;
|
|
107
107
|
const lockPath = resolveLockPath(configPath);
|
|
108
|
-
await fs
|
|
108
|
+
await fs.mkdir(path.dirname(lockPath), { recursive: true });
|
|
109
109
|
const startedAt = Date.now();
|
|
110
110
|
let lastPayload = null;
|
|
111
111
|
while (Date.now() - startedAt < timeoutMs) try {
|
|
112
|
-
const handle = await fs
|
|
112
|
+
const handle = await fs.open(lockPath, "wx");
|
|
113
113
|
const startTime = process.platform === "linux" ? readLinuxStartTime(process.pid) : null;
|
|
114
114
|
const payload = {
|
|
115
115
|
pid: process.pid,
|
|
@@ -124,7 +124,7 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
124
124
|
configPath,
|
|
125
125
|
release: async () => {
|
|
126
126
|
await handle.close().catch(() => void 0);
|
|
127
|
-
await fs
|
|
127
|
+
await fs.rm(lockPath, { force: true });
|
|
128
128
|
console.log(`[GatewayLock] Lock released: lockPath=${lockPath}`);
|
|
129
129
|
}
|
|
130
130
|
};
|
|
@@ -135,7 +135,7 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
135
135
|
const ownerStatus = ownerPid ? await resolveOwnerStatus(ownerPid, lastPayload, port) : "unknown";
|
|
136
136
|
if (ownerStatus === "dead" && ownerPid) {
|
|
137
137
|
console.warn(`[GatewayLock] Cleaning up stale gateway lock: pid=${ownerPid}`);
|
|
138
|
-
await fs
|
|
138
|
+
await fs.rm(lockPath, { force: true });
|
|
139
139
|
continue;
|
|
140
140
|
}
|
|
141
141
|
if (ownerStatus !== "alive") {
|
|
@@ -145,14 +145,14 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
145
145
|
stale = Number.isFinite(createdAt) ? Date.now() - createdAt > staleMs : false;
|
|
146
146
|
}
|
|
147
147
|
if (!stale) try {
|
|
148
|
-
const st = await fs
|
|
148
|
+
const st = await fs.stat(lockPath);
|
|
149
149
|
stale = Date.now() - st.mtimeMs > staleMs;
|
|
150
150
|
} catch {
|
|
151
151
|
stale = false;
|
|
152
152
|
}
|
|
153
153
|
if (stale) {
|
|
154
154
|
console.warn(`[GatewayLock] Removing stale lock file: lockPath=${lockPath}`);
|
|
155
|
-
await fs
|
|
155
|
+
await fs.rm(lockPath, { force: true });
|
|
156
156
|
continue;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TaskRepository } from "../tasks/task-repository.js";
|
|
2
1
|
import { FileServiceError } from "../files/file-service.js";
|
|
2
|
+
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
3
|
+
import { TaskRepository } from "../tasks/task-repository.js";
|
|
3
4
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
4
5
|
import { pendingTranscriptReferencesMediaUri } from "../agent/inbound/attachment-pipeline.js";
|
|
5
|
-
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
6
6
|
import { messagesReferenceMediaUri } from "../media/session-references.js";
|
|
7
7
|
//#region src/gateway/media-access.ts
|
|
8
8
|
/** Resolve media only when the supplied session or task references it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import
|
|
3
|
+
import fsSync from "node:fs";
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import net from "node:net";
|
|
6
6
|
//#region src/gateway/ports.ts
|
|
@@ -54,7 +54,7 @@ function listPortListenersViaProc(port) {
|
|
|
54
54
|
for (const procFile of ["/proc/net/tcp", "/proc/net/tcp6"]) {
|
|
55
55
|
let content;
|
|
56
56
|
try {
|
|
57
|
-
content =
|
|
57
|
+
content = fsSync.readFileSync(procFile, "utf-8");
|
|
58
58
|
} catch {
|
|
59
59
|
continue;
|
|
60
60
|
}
|
|
@@ -68,7 +68,7 @@ function listPortListenersViaProc(port) {
|
|
|
68
68
|
if (inodeSet.size === 0) return results;
|
|
69
69
|
let pidDirs;
|
|
70
70
|
try {
|
|
71
|
-
pidDirs =
|
|
71
|
+
pidDirs = fsSync.readdirSync("/proc").filter((name) => /^\d+$/.test(name));
|
|
72
72
|
} catch {
|
|
73
73
|
return results;
|
|
74
74
|
}
|
|
@@ -76,14 +76,14 @@ function listPortListenersViaProc(port) {
|
|
|
76
76
|
const fdDir = `/proc/${pidStr}/fd`;
|
|
77
77
|
let fds;
|
|
78
78
|
try {
|
|
79
|
-
fds =
|
|
79
|
+
fds = fsSync.readdirSync(fdDir);
|
|
80
80
|
} catch {
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
83
|
for (const fd of fds) {
|
|
84
84
|
let target;
|
|
85
85
|
try {
|
|
86
|
-
target =
|
|
86
|
+
target = fsSync.readlinkSync(`${fdDir}/${fd}`);
|
|
87
87
|
} catch {
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
@@ -93,7 +93,7 @@ function listPortListenersViaProc(port) {
|
|
|
93
93
|
if (!results.some((p) => p.pid === pid)) {
|
|
94
94
|
let command;
|
|
95
95
|
try {
|
|
96
|
-
command =
|
|
96
|
+
command = fsSync.readFileSync(`/proc/${pidStr}/comm`, "utf-8").trim();
|
|
97
97
|
} catch {}
|
|
98
98
|
results.push({
|
|
99
99
|
pid,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveGatewayBindHost, resolveGatewayListenHosts } from "../config/gateway-bind.js";
|
|
2
1
|
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
2
|
+
import { resolveGatewayBindHost, resolveGatewayListenHosts } from "../config/gateway-bind.js";
|
|
3
3
|
import { resolveGatewayListenPlan } from "./listen.js";
|
|
4
4
|
import { GatewayService } from "./service.js";
|
|
5
5
|
import { handleSiteShareUpgrade } from "../share/site-share-router.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
4
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { init_providers } from "../../providers/index.js";
|
|
6
|
-
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
|
-
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
8
|
-
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
9
6
|
import { ConfigHotReloader } from "../../config/reload.js";
|
|
10
7
|
import "../../config/index.js";
|
|
8
|
+
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
11
9
|
import { computeBundledExtensionExtensionsPatch } from "../../extensions/bundled-extension-activation.js";
|
|
10
|
+
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
11
|
+
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
12
12
|
import { sanitizeTunnelConfig } from "../../tunnel/tunnel-config.js";
|
|
13
13
|
//#region src/gateway/service/config-coordinator.ts
|
|
14
14
|
init_providers();
|
|
@@ -2,12 +2,12 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
|
-
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
6
|
-
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
7
5
|
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
8
6
|
import { deleteManagedSkill, installSkillFromZip, listManagedSkillDirs } from "../../agent/skills/managed-store.js";
|
|
9
|
-
import { normalizeSkillInstallTarget } from "../../agent/skills/install-target.js";
|
|
10
7
|
import { getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
8
|
+
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
9
|
+
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
10
|
+
import { normalizeSkillInstallTarget } from "../../agent/skills/install-target.js";
|
|
11
11
|
import { existsSync, rmSync } from "node:fs";
|
|
12
12
|
//#region src/gateway/service/marketplace-service.ts
|
|
13
13
|
/**
|
|
@@ -6,11 +6,11 @@ import { updateInteractionStateFromMessage } from "../../storage/sqlite/interact
|
|
|
6
6
|
import { getConnectionResumeInput, isConnectionSuspended } from "../../storage/sqlite/connection-wait-repository.js";
|
|
7
7
|
import "../../storage/sqlite/index.js";
|
|
8
8
|
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
9
|
+
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
10
|
+
import "../chat-limits.js";
|
|
11
|
+
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
9
12
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
10
13
|
import { TaskRunCoordinator } from "../../tasks/task-run-coordinator.js";
|
|
11
|
-
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
12
|
-
import "../chat-limits.js";
|
|
13
|
-
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
14
14
|
import { ChatStreamMapper } from "../chat-stream/mapper.js";
|
|
15
15
|
import { resolveWebchatSessionKey } from "../resolve-webchat-session-key.js";
|
|
16
16
|
import { recordExplicitRelationshipFollowUp } from "../../user-context/relationship-continuity.js";
|