@xopcai/xopc 0.0.277 → 0.0.282
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/_locales/en/messages.json +34 -4
- package/dist/browser-ext/_locales/zh_CN/messages.json +34 -4
- package/dist/browser-ext/dist/assets/{auth-ClQTK565.js → auth-DB30ywek.js} +18 -53
- package/dist/browser-ext/dist/assets/pcm-capture-worklet-CGN9Mlhg.js +39 -0
- package/dist/browser-ext/dist/assets/{sidepanel-CeGqObOa.css → sidepanel-BbSQr-6P.css} +40 -6
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +2 -2
- package/dist/browser-ext/dist/sidepanel.js +1219 -191
- package/dist/browser-ext/manifest.json +2 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-SJZ5fS17.js → activity-store-iPtG94qr.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Cavbls0E.js → agent-avatar-dicebear-Cny5rATT.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-OyQ8OVZv.js +1 -0
- package/dist/gateway/static/root/assets/{agents-DlDTItrB.js → agents-DJeh_Ewo.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CnJAVHBu.js → api-KMJzMqvZ.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-5gS0_LWl.js → app-management-settings-panel-ZqQKaZEI.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DHzZCJon.js → appearance-settings-CfXsQkKO.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-k-QnVhKW.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Ia98yZe3.js → archive-plugin-BrW53Hap.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DiWW88c8.js → attachment-load-DkfFWHiS.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BuhTeGRJ.js → automations-page-e-5we6kD.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DPnlkws1.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DDD48cJv.js → binary-plugins-CWIswfXA.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-0AWVCD3F.js → block-editor-CfeF1OmA.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DcVLoIzc.js → browser-automation-inputs-BTIufVbM.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BKOYX5xV.js → browser-automations-page-DnsuWKRu.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-C8xyhnxx.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CBllOLTT.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-C-A-VUE2.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-BTT2sIGg.js → channels-status-swr-DMYQNs-J.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CW9Byi8V.js → chat-terminal-dock-C_Fw1R3A.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-CtsMo3H4.js +2 -0
- package/dist/gateway/static/root/assets/{date-picker-gdYmKC8W.js → date-picker-CPFxjTrN.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-40BYmiMc.js → dependency-picker-C_5KqzjI.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-By1z6tKE.js → desktop-pet-DLJsC5D6.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-ByjJqx9H.js → desktop-pet-settings-BdI1iSgz.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BnvPLhc9.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DQO65KbM.js → extension-debug-page-BNS_TkZQ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Db32jip6.js → extension-page-DMSDZ7Mb.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CL8Wx8lf.js → extension-settings-page-CeGCWMt0.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-Cpmyrr6j.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-DKOTYUma.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CVTa5HSS.js → gateway-startup-retry-DoiPeb65.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CRXWu2q6.js → heartbeat-settings-gsdL_Yij.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CbeAdS1T.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DtMRG1oF.js → image-generation-api-CqjHWl2T.js} +1 -1
- package/dist/gateway/static/root/assets/index-B_Sg5BKz.css +2 -0
- package/dist/gateway/static/root/assets/index-enFXJJCU.js +74 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CjehhHPz.js → keyboard-shortcuts-settings-CCLtJ8s8.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DzC6SrXj.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CrIdaTrK.js → local-apps-page-3LdgP3NO.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BkJ7g35d.js → locale-store-1urrBBCQ.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-FfSwV_VH.js → logs-page-DHClKtm6.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-BakV5aOw.js → management-settings-BaCo9Nuo.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DF3aJP_5.js → markdown-view-BZmcFIWa.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Blv9U6Jp.js → media-plugins-BMjJppvG.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DYFcjtmG.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-hYO2jNhL.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-BT66x22W.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-BQfVtLLC.js → page-tabs-BCszXX_F.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-kjHFiO81.js → preview-open-alternatives-CyM0sanh.js} +1 -1
- package/dist/gateway/static/root/assets/proactive-page-CVDGA5sB.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BazdmFYo.js → product-open-page-lXAbj85Z.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Bp6TAMPM.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-UhOIiDcg.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CTq8EECj.js → registry-api-CxQstD00.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DJIkMFT4.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BhJlopSW.js → runtime-tools-settings-panel-BUFCgRdZ.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-cxoO_5I1.js → schema-form-B01ksA8M.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-CQOAwPDt.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CFuqbGI-.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BiRTWiBi.js → settings-form-section-DvnjZBa3.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-D-Cb71pq.js → settings-page-DZRkpbCh.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DVaEiAVY.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DciHfTay.js → share-preview-page-vz0UK56q.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-XiCqMDAe.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-C3D8WanU.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CxMWwR6A.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-CU7PALQB.js → skills-page.utils-BryVNYll.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-GpjNbqvM.js → system-settings-panel-mKFDe6aZ.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-Cb0RZNcJ.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-mV6Cm2vj.js → theme-store-Dc5s20V3.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-FcI3wKy3.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-LvCiBidm.js → use-autosave-CDgdtjTC.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-Cnshc-Un.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BlGysZxj.js → voice-api-key-field-Ce8cb5mN.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D3DdcH4H.js → voice-config-api-Mk78BrpP.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DvIQOR5x.js → work-discovery-overlay-CacFTtXe.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-JIp60bXT.js → workflow-run-setup-panel-V-5HuEUq.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-1OJimIfo.js +6 -0
- package/dist/gateway/static/root/index.html +10 -11
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/discussions.js +17 -0
- package/dist/packages/gateway-contract/src/proactive.js +4 -2
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- 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/project-context.d.ts +1 -0
- package/dist/src/agent/context/project-context.js +12 -4
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- 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 +4 -4
- 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.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/source-context/task-context.d.ts +3 -0
- package/dist/src/agent/source-context/task-context.js +24 -0
- package/dist/src/agent/source-context/types.d.ts +2 -2
- package/dist/src/agent/source-context/types.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +1 -0
- package/dist/src/agent/tools/apply-patch.js +25 -38
- package/dist/src/agent/tools/create-share-tool.js +11 -3
- package/dist/src/agent/tools/exec-command.js +2 -1
- 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 +3 -4
- 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 +8 -5
- 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 +4 -3
- package/dist/src/agent/tools/tool-paths.js +3 -1
- package/dist/src/agent/tools/write.js +4 -17
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- 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/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +21 -20
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/config/index.js +4 -4
- 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/discussions/action-tasks.d.ts +21 -0
- package/dist/src/discussions/action-tasks.js +93 -0
- package/dist/src/discussions/analyzer.d.ts +21 -1
- package/dist/src/discussions/analyzer.js +229 -62
- package/dist/src/discussions/audio-repair.d.ts +8 -0
- package/dist/src/discussions/audio-repair.js +41 -0
- package/dist/src/discussions/edits.d.ts +22 -0
- package/dist/src/discussions/edits.js +81 -0
- package/dist/src/discussions/errors.d.ts +4 -0
- package/dist/src/discussions/errors.js +10 -0
- package/dist/src/discussions/export.d.ts +2 -0
- package/dist/src/discussions/export.js +23 -0
- package/dist/src/discussions/index.js +3 -2
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/organizer-worker.js +14 -5
- package/dist/src/discussions/organizer.d.ts +1 -1
- package/dist/src/discussions/organizer.js +60 -24
- package/dist/src/discussions/reconcile.d.ts +22 -0
- package/dist/src/discussions/reconcile.js +55 -0
- package/dist/src/discussions/recording.d.ts +9 -0
- package/dist/src/discussions/recording.js +219 -0
- package/dist/src/discussions/recordingJobs.d.ts +14 -0
- package/dist/src/discussions/recordingJobs.js +69 -0
- package/dist/src/discussions/repository.d.ts +4 -2
- package/dist/src/discussions/repository.js +15 -10
- package/dist/src/discussions/revisions.d.ts +12 -0
- package/dist/src/discussions/revisions.js +36 -0
- package/dist/src/discussions/sealer.d.ts +1 -0
- package/dist/src/discussions/sealer.js +61 -11
- package/dist/src/discussions/service.d.ts +16 -15
- package/dist/src/discussions/service.js +177 -91
- package/dist/src/discussions/types.d.ts +4 -139
- package/dist/src/discussions/types.js +1 -11
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/files/file-service.d.ts +1 -0
- package/dist/src/files/file-service.js +77 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/lib/static-ui.js +1 -0
- package/dist/src/gateway/hono/routes/context-sources.js +1 -2
- package/dist/src/gateway/hono/routes/discussions.js +126 -19
- package/dist/src/gateway/hono/routes/files.js +1 -22
- package/dist/src/gateway/hono/routes/index.js +0 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/proactive-control.js +2 -36
- package/dist/src/gateway/hono/routes/project-understanding.d.ts +3 -0
- package/dist/src/gateway/hono/routes/project-understanding.js +65 -0
- package/dist/src/gateway/hono/routes/projects.js +20 -4
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
- package/dist/src/gateway/hono/routes/shares.js +22 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -1
- package/dist/src/gateway/hono/routes/work-discovery.d.ts +0 -2
- package/dist/src/gateway/hono/routes/work-discovery.js +2 -16
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +1 -2
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +28 -13
- package/dist/src/knowledge-memory/repository.d.ts +2 -0
- package/dist/src/knowledge-memory/repository.js +3 -1
- package/dist/src/media-understanding/audio-transcription-runner.d.ts +1 -0
- package/dist/src/media-understanding/audio-transcription-runner.js +1 -0
- package/dist/src/media-understanding/runner.js +1 -0
- package/dist/src/media-understanding/types.d.ts +8 -0
- package/dist/src/notes/service.d.ts +3 -1
- package/dist/src/notes/store.d.ts +3 -1
- package/dist/src/notes/store.js +5 -3
- package/dist/src/proactive/experience.d.ts +38 -21
- package/dist/src/proactive/experience.js +113 -12
- package/dist/src/proactive/inbox/cards.js +7 -1
- package/dist/src/proactive/maintenance.js +0 -1
- package/dist/src/proactive/scenarios/control.d.ts +0 -35
- package/dist/src/proactive/scenarios/control.js +7 -53
- package/dist/src/projects/project-store.js +6 -4
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/client-history.d.ts +1 -1
- package/dist/src/session/client-history.js +1 -1
- package/dist/src/share/share-store.js +5 -1
- package/dist/src/storage/sqlite/migrations/166_remove_proactive_previews.sql +1 -0
- package/dist/src/storage/sqlite/migrations/167_discussion_recording_chunks.sql +7 -0
- package/dist/src/storage/sqlite/migrations/168_discussion_evidence.sql +16 -0
- package/dist/src/storage/sqlite/migrations/169_discussion_action_tasks.sql +8 -0
- package/dist/src/storage/sqlite/migrations/170_discussion_edits.sql +8 -0
- package/dist/src/storage/sqlite/migrations/171_discussion_recording_jobs.sql +14 -0
- package/dist/src/storage/sqlite/migrations/172_project_understanding.sql +3 -0
- package/dist/src/storage/sqlite/migrations/173_mobile_discussion_source.sql +5 -0
- package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +20 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/home-query-service.js +2 -2
- package/dist/src/tasks/task-application-service.js +77 -3
- package/dist/src/tasks/task-context-assembler.js +1 -0
- package/dist/src/tasks/task-repository.d.ts +1 -0
- package/dist/src/tasks/task-repository.js +4 -0
- 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 +28 -5
- package/dist/src/voice/stt/transcribe-core.js +1 -0
- package/dist/src/voice/stt/types.d.ts +1 -0
- package/dist/src/work-discovery/analyzer.d.ts +1 -0
- package/dist/src/work-discovery/analyzer.js +28 -22
- package/dist/src/work-discovery/index.js +3 -3
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/project-understanding.d.ts +7 -0
- package/dist/src/work-discovery/project-understanding.js +38 -0
- package/dist/src/work-discovery/repository.d.ts +3 -1
- package/dist/src/work-discovery/repository.js +18 -5
- package/dist/src/work-discovery/service.d.ts +8 -0
- package/dist/src/work-discovery/service.js +163 -15
- package/dist/src/work-discovery/types.d.ts +2 -0
- package/dist/src/workflows/service/workflow-run-service.js +2 -2
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DyCyuJpi.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-__yzruGu.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DaisbmEh.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-C7zjxscU.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-7kZMT1r6.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-BKUh6hzO.js +0 -1
- package/dist/gateway/static/root/assets/config-reload-event-Bjh2zoKp.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-m8J-F3u8.js +0 -2
- package/dist/gateway/static/root/assets/device-pairing-wizard-CfWQfz7a.js +0 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-cd8owslz.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-wLly-Kc1.js +0 -1
- package/dist/gateway/static/root/assets/home-page-FqgSwpmy.js +0 -1
- package/dist/gateway/static/root/assets/index-5UchbidQ.js +0 -74
- package/dist/gateway/static/root/assets/index-CXF9-BpI.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-DtYZa4GK.js +0 -2
- package/dist/gateway/static/root/assets/messages-BGc-OJWg.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-JbvyGdEX.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-Dm7mE2FK.js +0 -8
- 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/project-detail-page-h00lfcVI.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-C2Bo1FAL.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-_bZYAl49.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-F7CHsvPa.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/shares-settings-BS2pnWO0.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DX344nVV.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BhfKUsv7.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-CElcQ9Sh.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Bhi_x_h4.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BydARq2C.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-B972t6zx.js +0 -6
- package/dist/src/proactive/scenarios/preview.d.ts +0 -13
- package/dist/src/proactive/scenarios/preview.js +0 -81
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
|
+
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
3
|
+
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
4
|
+
import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
2
5
|
import { resolve } from "node:path";
|
|
3
6
|
import { execFile } from "node:child_process";
|
|
4
|
-
import { lstat,
|
|
7
|
+
import { lstat, readlink, realpath } from "node:fs/promises";
|
|
5
8
|
import { promisify } from "node:util";
|
|
6
9
|
import { Type } from "@sinclair/typebox";
|
|
7
10
|
//#region src/agent/tools/review-workspace.ts
|
|
@@ -15,62 +18,125 @@ function createReviewWorkspaceTool(workspace) {
|
|
|
15
18
|
supportsParallel: true,
|
|
16
19
|
idempotent: true,
|
|
17
20
|
async execute(_id, _args, signal) {
|
|
18
|
-
let cwd = workspace;
|
|
21
|
+
let cwd = checkedFilePath(workspace, workspace, "read");
|
|
19
22
|
const git = async (args) => (await exec("git", [
|
|
20
23
|
"-c",
|
|
21
24
|
"core.fsmonitor=false",
|
|
22
25
|
...args
|
|
23
26
|
], {
|
|
24
27
|
cwd,
|
|
28
|
+
env: prepareSafeToolEnv(process.env),
|
|
25
29
|
signal,
|
|
26
30
|
timeout: 1e4,
|
|
27
31
|
maxBuffer: 8 * 1024 * 1024
|
|
28
32
|
})).stdout;
|
|
29
|
-
cwd = await realpath((await git(["rev-parse", "--show-toplevel"])).trim());
|
|
33
|
+
cwd = checkedFilePath(workspace, await realpath((await git(["rev-parse", "--show-toplevel"])).trim()), "read");
|
|
30
34
|
const startRevision = await readWorkspaceRevision(cwd);
|
|
31
35
|
const head = await git([
|
|
32
36
|
"rev-parse",
|
|
33
37
|
"--verify",
|
|
34
38
|
"HEAD"
|
|
35
39
|
]).catch(() => "");
|
|
36
|
-
const
|
|
40
|
+
const changedNames = head ? await git([
|
|
37
41
|
"diff",
|
|
42
|
+
"--no-renames",
|
|
43
|
+
"--name-only",
|
|
44
|
+
"-z",
|
|
45
|
+
"HEAD",
|
|
46
|
+
"--"
|
|
47
|
+
]) : (await Promise.all([git([
|
|
48
|
+
"diff",
|
|
49
|
+
"--name-only",
|
|
50
|
+
"-z",
|
|
51
|
+
"--cached",
|
|
52
|
+
"--"
|
|
53
|
+
]), git([
|
|
54
|
+
"diff",
|
|
55
|
+
"--name-only",
|
|
56
|
+
"-z",
|
|
57
|
+
"--"
|
|
58
|
+
])])).join("");
|
|
59
|
+
const safePaths = [];
|
|
60
|
+
let complete = true;
|
|
61
|
+
for (const path of new Set(changedNames.split("\0").filter(Boolean))) {
|
|
62
|
+
const file = resolve(cwd, path);
|
|
63
|
+
if (!evaluateFilePolicy({
|
|
64
|
+
workspaceRoot: workspace,
|
|
65
|
+
path: file,
|
|
66
|
+
operation: "read"
|
|
67
|
+
}).allowed) {
|
|
68
|
+
complete = false;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const info = await lstat(file).catch((error) => {
|
|
72
|
+
if (error.code === "ENOENT") return null;
|
|
73
|
+
throw error;
|
|
74
|
+
});
|
|
75
|
+
if (info && (!info.isFile() || info.nlink !== 1)) {
|
|
76
|
+
complete = false;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
safePaths.push(`:(literal)${path}`);
|
|
80
|
+
}
|
|
81
|
+
if (safePaths.length > 1e3) throw new Error("Too many changed files for a bounded workspace review");
|
|
82
|
+
const [diff, names] = await Promise.all([safePaths.length === 0 ? Promise.resolve("") : head ? git([
|
|
83
|
+
"diff",
|
|
84
|
+
"--no-renames",
|
|
38
85
|
"--no-ext-diff",
|
|
39
86
|
"--no-textconv",
|
|
40
87
|
"--binary",
|
|
41
88
|
"HEAD",
|
|
42
|
-
"--"
|
|
89
|
+
"--",
|
|
90
|
+
...safePaths
|
|
43
91
|
]) : Promise.all([git([
|
|
44
92
|
"diff",
|
|
93
|
+
"--no-renames",
|
|
45
94
|
"--no-ext-diff",
|
|
46
95
|
"--no-textconv",
|
|
47
96
|
"--binary",
|
|
48
97
|
"--cached",
|
|
49
|
-
"--"
|
|
98
|
+
"--",
|
|
99
|
+
...safePaths
|
|
50
100
|
]), git([
|
|
51
101
|
"diff",
|
|
102
|
+
"--no-renames",
|
|
52
103
|
"--no-ext-diff",
|
|
53
104
|
"--no-textconv",
|
|
54
105
|
"--binary",
|
|
55
|
-
"--"
|
|
106
|
+
"--",
|
|
107
|
+
...safePaths
|
|
56
108
|
])]).then((parts) => parts.join("\n")), git([
|
|
57
109
|
"ls-files",
|
|
58
110
|
"--others",
|
|
59
111
|
"--exclude-standard",
|
|
60
112
|
"-z"
|
|
61
113
|
])]);
|
|
62
|
-
let text = diff.slice(0, 2e5)
|
|
114
|
+
let text = diff.slice(0, 2e5);
|
|
115
|
+
complete &&= diff.length <= 2e5;
|
|
63
116
|
for (const path of names.split("\0").filter(Boolean)) {
|
|
64
117
|
signal?.throwIfAborted();
|
|
65
118
|
if (text.length >= 2e5) {
|
|
66
119
|
complete = false;
|
|
67
120
|
break;
|
|
68
121
|
}
|
|
69
|
-
const file = resolve(cwd, path)
|
|
122
|
+
const file = resolve(cwd, path);
|
|
123
|
+
if (!evaluateFilePolicy({
|
|
124
|
+
workspaceRoot: workspace,
|
|
125
|
+
path: file,
|
|
126
|
+
operation: "read"
|
|
127
|
+
}).allowed) {
|
|
128
|
+
complete = false;
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const info = await lstat(file);
|
|
132
|
+
if (info.isFile() && info.nlink !== 1) {
|
|
133
|
+
complete = false;
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
70
136
|
text += `\nUntracked file: ${path}\n`;
|
|
71
137
|
if (info.isSymbolicLink()) text += `Symlink to ${await readlink(file)}\n`;
|
|
72
138
|
else if (info.isFile() && info.size <= 5e4) {
|
|
73
|
-
const content =
|
|
139
|
+
const content = readWorkspaceFile(workspace, file, 5e4);
|
|
74
140
|
if (content.includes(0)) {
|
|
75
141
|
text += "(binary file; inspect separately)\n";
|
|
76
142
|
complete = false;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
|
+
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
2
3
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
3
4
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
5
|
+
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
4
6
|
import { persistToolMedia } from "./tool-media.js";
|
|
5
7
|
import { basename } from "node:path";
|
|
6
|
-
import { readFile } from "fs/promises";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
9
|
//#region src/agent/tools/send-media.ts
|
|
9
10
|
const SendMediaSchema = Type.Object({
|
|
10
|
-
filePath: Type.String({ description: "File to send. Relative paths are under the current agent workspace; absolute paths
|
|
11
|
+
filePath: Type.String({ description: "File to send. Relative paths are under the current agent workspace; absolute paths must remain inside the workspace." }),
|
|
11
12
|
mediaType: Type.Optional(Type.Enum({
|
|
12
13
|
photo: "photo",
|
|
13
14
|
video: "video",
|
|
@@ -42,7 +43,7 @@ function createSendMediaTool(workspace, bus, getContext) {
|
|
|
42
43
|
details: {}
|
|
43
44
|
};
|
|
44
45
|
try {
|
|
45
|
-
const fileBuffer =
|
|
46
|
+
const fileBuffer = readWorkspaceFile(workspace, resolved, MEDIA_MAX_BYTES);
|
|
46
47
|
const media = await persistToolMedia({
|
|
47
48
|
buffer: fileBuffer,
|
|
48
49
|
filePath: resolved,
|
|
@@ -16,7 +16,9 @@ function resolvePathUnderWorkspace(userPath, workspaceRoot) {
|
|
|
16
16
|
}
|
|
17
17
|
/** True if `userPath` is only a profile-system filename, e.g. `SOUL.md` or `.\SOUL.md` (basename matches). */
|
|
18
18
|
function isBareProfileMarkdownFileName(userPath) {
|
|
19
|
-
const
|
|
19
|
+
const normalized = userPath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
20
|
+
if (normalized.includes("/")) return false;
|
|
21
|
+
const b = basename(normalized);
|
|
20
22
|
if (!b || b === "." || b === "..") return false;
|
|
21
23
|
return PROFILE_SYSTEM_MARKDOWN_NAME_LOWER.has(b.toLowerCase());
|
|
22
24
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
|
+
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
2
3
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
3
4
|
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
4
5
|
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { mkdir, realpath, writeFile } from "fs/promises";
|
|
6
|
+
import { basename, relative, sep } from "path";
|
|
7
|
+
import { realpath } from "fs/promises";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/write.ts
|
|
10
10
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
@@ -37,18 +37,6 @@ function createWriteFileTool(workspace, options) {
|
|
|
37
37
|
};
|
|
38
38
|
const writesProfileFile = Boolean(options?.profileMarkdownRoot && isBareProfileMarkdownFileName(p.path));
|
|
39
39
|
const workspaceRoot = writesProfileFile ? options.profileMarkdownRoot : workspace;
|
|
40
|
-
const pathPolicy = evaluateFilePolicy({
|
|
41
|
-
operation: "write",
|
|
42
|
-
path: p.path,
|
|
43
|
-
workspaceRoot
|
|
44
|
-
});
|
|
45
|
-
if (!pathPolicy.allowed) return {
|
|
46
|
-
content: [{
|
|
47
|
-
type: "text",
|
|
48
|
-
text: `🚫 Sandbox: ${pathPolicy.reason}`
|
|
49
|
-
}],
|
|
50
|
-
details: { status: "failed" }
|
|
51
|
-
};
|
|
52
40
|
const contentBytes = Buffer.byteLength(p.content, "utf-8");
|
|
53
41
|
if (contentBytes > MAX_FILE_SIZE) return {
|
|
54
42
|
content: [{
|
|
@@ -58,8 +46,7 @@ function createWriteFileTool(workspace, options) {
|
|
|
58
46
|
details: { status: "failed" }
|
|
59
47
|
};
|
|
60
48
|
const target = writesProfileFile ? resolveProfileMarkdownPathIfBareName(p.path, options.profileMarkdownRoot) : resolvePathUnderWorkspace(p.path, workspace);
|
|
61
|
-
|
|
62
|
-
await writeFile(target, p.content, "utf-8");
|
|
49
|
+
writeWorkspaceFile(workspaceRoot, target, p.content);
|
|
63
50
|
const delivery = writesProfileFile ? void 0 : await Promise.all([realpath(workspace), realpath(target)]).then(([root, canonicalTarget]) => ({
|
|
64
51
|
version: 1,
|
|
65
52
|
operation: "updated",
|
|
@@ -9,6 +9,8 @@ import "../../storage/sqlite/index.js";
|
|
|
9
9
|
import { ObjectLinkService } from "../../activity/service.js";
|
|
10
10
|
import "../../activity/index.js";
|
|
11
11
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
12
|
+
import { CreateAutomationSchema, UpdateAutomationSchema } from "../../automations/domain/validation.js";
|
|
13
|
+
import "../../automations/index.js";
|
|
12
14
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
13
15
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
14
16
|
import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
@@ -20,8 +22,6 @@ import { TaskDependencyError, TaskDependencyService } from "../../tasks/task-dep
|
|
|
20
22
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
21
23
|
import { getCard } from "../../proactive/inbox/cards.js";
|
|
22
24
|
import { checkDelegation, delegationOverview, startDelegation } from "../../proactive/experience.js";
|
|
23
|
-
import { CreateAutomationSchema, UpdateAutomationSchema } from "../../automations/domain/validation.js";
|
|
24
|
-
import "../../automations/index.js";
|
|
25
25
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
26
26
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
27
27
|
import "../../tasks/index.js";
|
|
@@ -122,6 +122,10 @@ export declare const RuntimePolicySchema: z.ZodObject<{
|
|
|
122
122
|
mode: z.ZodLiteral<"docker">;
|
|
123
123
|
image: z.ZodString;
|
|
124
124
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
125
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
126
|
+
"read-only": "read-only";
|
|
127
|
+
"read-write": "read-write";
|
|
128
|
+
}>>;
|
|
125
129
|
}, z.core.$strict>], "mode">>;
|
|
126
130
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
127
131
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -192,6 +196,10 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
|
|
|
192
196
|
mode: z.ZodLiteral<"docker">;
|
|
193
197
|
image: z.ZodString;
|
|
194
198
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
199
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
200
|
+
"read-only": "read-only";
|
|
201
|
+
"read-write": "read-write";
|
|
202
|
+
}>>;
|
|
195
203
|
}, z.core.$strict>], "mode">>;
|
|
196
204
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
197
205
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -275,6 +283,10 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
275
283
|
mode: z.ZodLiteral<"docker">;
|
|
276
284
|
image: z.ZodString;
|
|
277
285
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
286
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
287
|
+
"read-only": "read-only";
|
|
288
|
+
"read-write": "read-write";
|
|
289
|
+
}>>;
|
|
278
290
|
}, z.core.$strict>], "mode">>;
|
|
279
291
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
280
292
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -348,6 +360,10 @@ export declare const AgentsConfigSchema: z.ZodObject<{
|
|
|
348
360
|
mode: z.ZodLiteral<"docker">;
|
|
349
361
|
image: z.ZodString;
|
|
350
362
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
363
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
364
|
+
"read-only": "read-only";
|
|
365
|
+
"read-write": "read-write";
|
|
366
|
+
}>>;
|
|
351
367
|
}, z.core.$strict>], "mode">>;
|
|
352
368
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
353
369
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -427,6 +443,10 @@ export declare const AgentsConfigSchema: z.ZodObject<{
|
|
|
427
443
|
mode: z.ZodLiteral<"docker">;
|
|
428
444
|
image: z.ZodString;
|
|
429
445
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
446
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
447
|
+
"read-only": "read-only";
|
|
448
|
+
"read-write": "read-write";
|
|
449
|
+
}>>;
|
|
430
450
|
}, z.core.$strict>], "mode">>;
|
|
431
451
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
432
452
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -506,6 +526,10 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
506
526
|
mode: z.ZodLiteral<"docker">;
|
|
507
527
|
image: z.ZodString;
|
|
508
528
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
529
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
530
|
+
"read-only": "read-only";
|
|
531
|
+
"read-write": "read-write";
|
|
532
|
+
}>>;
|
|
509
533
|
}, z.core.$strict>], "mode">>;
|
|
510
534
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
511
535
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -80,7 +80,8 @@ var init_schema = __esmMin((() => {
|
|
|
80
80
|
commandIsolation: z.discriminatedUnion("mode", [z.object({ mode: z.literal("host") }).strict(), z.object({
|
|
81
81
|
mode: z.literal("docker"),
|
|
82
82
|
image: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9./:_-]*@sha256:[a-f0-9]{64}$/),
|
|
83
|
-
network: z.boolean().default(false)
|
|
83
|
+
network: z.boolean().default(false),
|
|
84
|
+
workspaceAccess: z.enum(["read-only", "read-write"]).default("read-only")
|
|
84
85
|
}).strict()]).optional(),
|
|
85
86
|
maxTurns: z.number().int().positive().optional(),
|
|
86
87
|
timeoutMs: z.number().int().positive().optional(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
2
|
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
|
+
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
3
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
|
-
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
7
7
|
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
|
|
9
9
|
import "../native-messaging-host.js";
|
|
@@ -52,7 +52,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
52
52
|
id: "database-schema",
|
|
53
53
|
label: "Database schema",
|
|
54
54
|
status: "pass",
|
|
55
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
55
|
+
message: `SQLite schema v${status.dbVersion} (current release v173).`,
|
|
56
56
|
hints: []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
|
+
import { PROVIDER_ENV_MAP, init_env_keys } from "../../../../providers/env-keys.js";
|
|
3
|
+
import { getModelOAuthProviderIds, init_registry } from "../../../../auth/oauth/registry.js";
|
|
4
|
+
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
2
5
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
|
-
import {
|
|
6
|
+
import { getDefaultAgentId, init_resolve_route } from "../../../../routing/resolve-route.js";
|
|
4
7
|
import { existsSync } from "node:fs";
|
|
5
8
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
9
|
+
init_credentials();
|
|
10
|
+
init_registry();
|
|
11
|
+
init_resolve_route();
|
|
6
12
|
init_loader();
|
|
7
13
|
init_schema();
|
|
8
14
|
init_env_keys();
|
|
@@ -30,14 +36,6 @@ function collectProviderIdsFromConfig(cfg) {
|
|
|
30
36
|
}
|
|
31
37
|
return ids;
|
|
32
38
|
}
|
|
33
|
-
function anyProviderEnvPresent() {
|
|
34
|
-
for (const vars of Object.values(PROVIDER_ENV_MAP)) for (const v of vars) if (process.env[v]?.trim()) return true;
|
|
35
|
-
for (const [k, val] of Object.entries(process.env)) {
|
|
36
|
-
if (!val?.trim()) continue;
|
|
37
|
-
if (k.endsWith("_API_KEY") || k.endsWith("_TOKEN")) return true;
|
|
38
|
-
}
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
39
|
async function checkProviderAuth(ctx) {
|
|
42
40
|
if (!existsSync(ctx.configPath)) return {
|
|
43
41
|
id: "provider-auth",
|
|
@@ -58,20 +56,23 @@ async function checkProviderAuth(ctx) {
|
|
|
58
56
|
hints: []
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
const credentials = new CredentialResolver({
|
|
60
|
+
stateDir: ctx.stateDir,
|
|
61
|
+
agentId: getDefaultAgentId(cfg),
|
|
62
|
+
appConfig: cfg
|
|
63
|
+
});
|
|
64
|
+
const profiles = await credentials.listProfiles();
|
|
65
|
+
const checkIds = new Set([
|
|
66
|
+
...collectProviderIdsFromConfig(cfg),
|
|
67
|
+
...Object.keys(PROVIDER_ENV_MAP),
|
|
68
|
+
...getModelOAuthProviderIds(),
|
|
69
|
+
...profiles.map((profile) => profile.provider)
|
|
70
|
+
]);
|
|
71
|
+
for (const id of checkIds) if (await credentials.hasCredentials(id)) return {
|
|
71
72
|
id: "provider-auth",
|
|
72
73
|
label: "Provider auth",
|
|
73
74
|
status: "pass",
|
|
74
|
-
message: "
|
|
75
|
+
message: "At least one LLM provider credential is available.",
|
|
75
76
|
hints: []
|
|
76
77
|
};
|
|
77
78
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { getContextWithOpts } from "../context.js";
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, 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, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
8
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
-
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
9
|
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
|
-
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
10
|
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
11
|
+
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
13
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
16
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
@@ -2,10 +2,10 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
|
-
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
|
-
import {
|
|
6
|
+
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
8
7
|
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
8
|
+
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
9
9
|
import { dirname } from "path";
|
|
10
10
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
11
11
|
import { config } from "dotenv";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
|
+
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
4
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
@@ -106,6 +106,10 @@ export declare const AgentsConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
106
106
|
mode: z.ZodLiteral<"docker">;
|
|
107
107
|
image: z.ZodString;
|
|
108
108
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
110
|
+
"read-only": "read-only";
|
|
111
|
+
"read-write": "read-write";
|
|
112
|
+
}>>;
|
|
109
113
|
}, z.core.$strict>], "mode">>;
|
|
110
114
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
111
115
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -185,6 +189,10 @@ export declare const AgentsConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
185
189
|
mode: z.ZodLiteral<"docker">;
|
|
186
190
|
image: z.ZodString;
|
|
187
191
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
193
|
+
"read-only": "read-only";
|
|
194
|
+
"read-write": "read-write";
|
|
195
|
+
}>>;
|
|
188
196
|
}, z.core.$strict>], "mode">>;
|
|
189
197
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
190
198
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1582,6 +1590,10 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1582
1590
|
mode: z.ZodLiteral<"docker">;
|
|
1583
1591
|
image: z.ZodString;
|
|
1584
1592
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
1593
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
1594
|
+
"read-only": "read-only";
|
|
1595
|
+
"read-write": "read-write";
|
|
1596
|
+
}>>;
|
|
1585
1597
|
}, z.core.$strict>], "mode">>;
|
|
1586
1598
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
1587
1599
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1661,6 +1673,10 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1661
1673
|
mode: z.ZodLiteral<"docker">;
|
|
1662
1674
|
image: z.ZodString;
|
|
1663
1675
|
network: z.ZodDefault<z.ZodBoolean>;
|
|
1676
|
+
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
1677
|
+
"read-only": "read-only";
|
|
1678
|
+
"read-write": "read-write";
|
|
1679
|
+
}>>;
|
|
1664
1680
|
}, z.core.$strict>], "mode">>;
|
|
1665
1681
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
1666
1682
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function meetingActionTasks(id: string): {
|
|
2
|
+
actionId: string;
|
|
3
|
+
taskId: string;
|
|
4
|
+
phase: "backlog" | "ready" | "active" | "review" | "closed";
|
|
5
|
+
resolution: "cancelled" | "done" | "duplicate" | "wont_do";
|
|
6
|
+
deleted: boolean;
|
|
7
|
+
}[];
|
|
8
|
+
/** Task, contract, source context, outbox and conversion link commit together. */
|
|
9
|
+
export declare function convertMeetingAction(id: string, actionId: string, organizationRevision: number): {
|
|
10
|
+
existing: boolean;
|
|
11
|
+
actionId: string;
|
|
12
|
+
taskId: string;
|
|
13
|
+
phase: "backlog" | "ready" | "active" | "review" | "closed";
|
|
14
|
+
resolution: "cancelled" | "done" | "duplicate" | "wont_do";
|
|
15
|
+
deleted: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
actionId: string;
|
|
18
|
+
taskId: string;
|
|
19
|
+
existing: boolean;
|
|
20
|
+
deleted: boolean;
|
|
21
|
+
};
|