create-windy 0.8.2 → 0.9.1
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/cli.js +855 -560
- package/package.json +1 -1
- package/template/.windy-template.json +2 -2
- package/template/apps/agent-server/Dockerfile +92 -22
- package/template/apps/agent-server/README.md +47 -85
- package/template/apps/agent-server/documents/office.py +216 -0
- package/template/apps/agent-server/documents/query_report.py +136 -0
- package/template/apps/agent-server/documents/smoke.py +177 -0
- package/template/apps/agent-server/documents/test_boundaries.py +185 -0
- package/template/apps/agent-server/host-contracts.ts +56 -0
- package/template/apps/agent-server/install-native.ts +167 -0
- package/template/apps/agent-server/main.ts +179 -0
- package/template/apps/agent-server/native/EXTENSIONS.md +46 -0
- package/template/apps/agent-server/native/admission.ts +73 -0
- package/template/apps/agent-server/native/authorization.test.ts +176 -0
- package/template/apps/agent-server/native/authorization.ts +118 -0
- package/template/apps/agent-server/native/boundary-io.ts +93 -0
- package/template/apps/agent-server/native/boundary-product.ts +107 -0
- package/template/apps/agent-server/native/boundary-project.test.ts +247 -0
- package/template/apps/agent-server/native/boundary-project.ts +188 -0
- package/template/apps/agent-server/native/boundary.ts +188 -0
- package/template/apps/agent-server/native/compaction-policy.test.ts +175 -0
- package/template/apps/agent-server/native/config.ts +95 -0
- package/template/apps/agent-server/native/conversation-instructions.ts +9 -0
- package/template/apps/agent-server/native/extensions.test.ts +190 -0
- package/template/apps/agent-server/native/extensions.ts +31 -0
- package/template/apps/agent-server/native/host-profile.test.ts +91 -0
- package/template/apps/agent-server/native/host-profile.ts +33 -0
- package/template/apps/agent-server/native/host-test-fixture.ts +13 -0
- package/template/apps/agent-server/native/http.ts +129 -0
- package/template/apps/agent-server/native/lifecycle.test.ts +285 -0
- package/template/apps/agent-server/native/lifecycle.ts +136 -0
- package/template/apps/agent-server/native/manager.ts +292 -0
- package/template/apps/agent-server/native/native.test.ts +207 -0
- package/template/apps/agent-server/native/office-preview.test.ts +50 -0
- package/template/apps/agent-server/native/office-preview.ts +25 -0
- package/template/apps/agent-server/native/parallel-harness.ts +242 -0
- package/template/apps/agent-server/native/parallel-mcp-fixture.ts +97 -0
- package/template/apps/agent-server/native/parallel.test.ts +256 -0
- package/template/apps/agent-server/native/profile-composition.test.ts +147 -0
- package/template/apps/agent-server/native/profile.ts +307 -0
- package/template/apps/agent-server/native/request.ts +61 -0
- package/template/apps/agent-server/native/session-conflict.test.ts +235 -0
- package/template/apps/agent-server/native/session-conflict.ts +21 -0
- package/template/apps/agent-server/native/shared-skills.test.ts +128 -0
- package/template/apps/agent-server/native/shared-skills.ts +240 -0
- package/template/apps/agent-server/native/socket-lifecycle.test.ts +48 -0
- package/template/apps/agent-server/native/socket.ts +130 -0
- package/template/apps/agent-server/native/storage-lifecycle.test.ts +217 -0
- package/template/apps/agent-server/native/storage.ts +188 -0
- package/template/apps/agent-server/native/stream-authorization.test.ts +89 -0
- package/template/apps/agent-server/native/worker.ts +77 -0
- package/template/apps/agent-server/native-download.test.ts +119 -0
- package/template/apps/agent-server/native-download.ts +145 -0
- package/template/apps/agent-server/package.json +63 -0
- package/template/apps/agent-server/plugins/access.mjs +126 -0
- package/template/apps/agent-server/plugins/branding/README.md +9 -0
- package/template/apps/agent-server/plugins/branding/brand.css +85 -0
- package/template/apps/agent-server/plugins/branding/client.js +338 -0
- package/template/apps/agent-server/plugins/branding/index.mjs +35 -0
- package/template/apps/agent-server/plugins/branding/loading.d.mts +2 -0
- package/template/apps/agent-server/plugins/branding/loading.mjs +66 -0
- package/template/apps/agent-server/plugins/branding/loading.test.ts +89 -0
- package/template/apps/agent-server/plugins/branding/package.json +21 -0
- package/template/apps/agent-server/plugins/branding.test.ts +294 -0
- package/template/apps/agent-server/plugins/compaction.mjs +83 -0
- package/template/apps/agent-server/plugins/compaction.test.ts +91 -0
- package/template/apps/agent-server/plugins/confine-network.py +57 -0
- package/template/apps/agent-server/plugins/default-skills.test.ts +62 -0
- package/template/apps/agent-server/plugins/downloads/README.md +28 -0
- package/template/apps/agent-server/plugins/downloads/client.js +126 -0
- package/template/apps/agent-server/plugins/downloads/downloads.test.ts +222 -0
- package/template/apps/agent-server/plugins/downloads/index.d.mts +19 -0
- package/template/apps/agent-server/plugins/downloads/index.mjs +180 -0
- package/template/apps/agent-server/plugins/downloads/package.json +20 -0
- package/template/apps/agent-server/plugins/drop-overlay/README.md +24 -0
- package/template/apps/agent-server/plugins/drop-overlay/drop-overlay.test.ts +199 -0
- package/template/apps/agent-server/plugins/drop-overlay/index.d.mts +8 -0
- package/template/apps/agent-server/plugins/drop-overlay/index.mjs +12 -0
- package/template/apps/agent-server/plugins/drop-overlay/style.css +102 -0
- package/template/apps/agent-server/plugins/locale/client.js +61 -0
- package/template/apps/agent-server/plugins/locale/index.d.mts +9 -0
- package/template/apps/agent-server/plugins/locale/index.mjs +16 -0
- package/template/apps/agent-server/plugins/locale/locale.test.ts +217 -0
- package/template/apps/agent-server/plugins/locale/package.json +19 -0
- package/template/apps/agent-server/plugins/parallel.mjs +146 -0
- package/template/apps/agent-server/plugins/preset-registry.d.mts +2 -0
- package/template/apps/agent-server/plugins/preset-registry.mjs +41 -0
- package/template/apps/agent-server/plugins/preset-registry.test.ts +46 -0
- package/template/apps/agent-server/plugins/questions.d.mts +25 -0
- package/template/apps/agent-server/plugins/questions.mjs +142 -0
- package/template/apps/agent-server/plugins/questions.test.ts +105 -0
- package/template/apps/agent-server/plugins/settings/README.md +17 -0
- package/template/apps/agent-server/plugins/settings/client.js +102 -0
- package/template/apps/agent-server/plugins/settings/index.mjs +17 -0
- package/template/apps/agent-server/plugins/settings/package.json +19 -0
- package/template/apps/agent-server/plugins/settings/settings.test.ts +129 -0
- package/template/apps/agent-server/plugins/settings-controller.d.mts +4 -0
- package/template/apps/agent-server/plugins/settings-controller.mjs +31 -0
- package/template/apps/agent-server/plugins/settings-controller.test.ts +17 -0
- package/template/apps/agent-server/plugins/settings-dispatch.test.ts +34 -0
- package/template/apps/agent-server/plugins/shared-skills.d.mts +15 -0
- package/template/apps/agent-server/plugins/shared-skills.mjs +82 -0
- package/template/apps/agent-server/plugins/shared-skills.test.ts +51 -0
- package/template/apps/agent-server/plugins/skill-library/README.md +11 -0
- package/template/apps/agent-server/plugins/skill-library/archive.test.ts +43 -0
- package/template/apps/agent-server/plugins/skill-library/bundle.mjs +234 -0
- package/template/apps/agent-server/plugins/skill-library/client-chunks.test.ts +107 -0
- package/template/apps/agent-server/plugins/skill-library/client-form-mount.test.ts +139 -0
- package/template/apps/agent-server/plugins/skill-library/client-form.test.ts +261 -0
- package/template/apps/agent-server/plugins/skill-library/client-ui.test.ts +268 -0
- package/template/apps/agent-server/plugins/skill-library/client-use.test.ts +158 -0
- package/template/apps/agent-server/plugins/skill-library/client.editor.js +93 -0
- package/template/apps/agent-server/plugins/skill-library/client.form.js +316 -0
- package/template/apps/agent-server/plugins/skill-library/client.js +348 -0
- package/template/apps/agent-server/plugins/skill-library/client.request.js +52 -0
- package/template/apps/agent-server/plugins/skill-library/client.transfer.js +48 -0
- package/template/apps/agent-server/plugins/skill-library/client.use.js +46 -0
- package/template/apps/agent-server/plugins/skill-library/default-roots.test.ts +84 -0
- package/template/apps/agent-server/plugins/skill-library/draft.d.mts +17 -0
- package/template/apps/agent-server/plugins/skill-library/draft.mjs +152 -0
- package/template/apps/agent-server/plugins/skill-library/draft.test.ts +287 -0
- package/template/apps/agent-server/plugins/skill-library/index.d.mts +49 -0
- package/template/apps/agent-server/plugins/skill-library/index.mjs +226 -0
- package/template/apps/agent-server/plugins/skill-library/package.json +24 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/README.md +27 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/UPSTREAM.md +54 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/boot.test.ts +150 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/client.js +146 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/client.test.ts +195 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/index.d.mts +9 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/index.mjs +30 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/metadata.test.ts +82 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/package.json +21 -0
- package/template/apps/agent-server/plugins/skill-library/presentation/react-boot.test.ts +162 -0
- package/template/apps/agent-server/plugins/skill-library/skills.test.ts +342 -0
- package/template/apps/agent-server/plugins/skill-library/storage.mjs +293 -0
- package/template/apps/agent-server/plugins/skill-library/style.css +229 -0
- package/template/apps/agent-server/plugins/skill-library/test-fixture.ts +77 -0
- package/template/apps/agent-server/plugins/skill-library/workflow.d.mts +18 -0
- package/template/apps/agent-server/plugins/skill-library/workflow.mjs +189 -0
- package/template/apps/agent-server/plugins/skill-library/workflow.test.ts +164 -0
- package/template/apps/agent-server/plugins/skills/README.md +5 -0
- package/template/apps/agent-server/plugins/skills/windy-data-summary/SKILL.md +14 -0
- package/template/apps/agent-server/plugins/skills/windy-extension-guide/SKILL.md +14 -0
- package/template/apps/agent-server/plugins/skills/windy-office/SKILL.md +14 -0
- package/template/apps/agent-server/plugins/skills/windy-skill-capture/SKILL.md +14 -0
- package/template/apps/agent-server/plugins/skills/windy-source-compare/SKILL.md +14 -0
- package/template/apps/agent-server/plugins/subprocess.mjs +40 -0
- package/template/apps/agent-server/plugins/theme/README.md +18 -0
- package/template/apps/agent-server/plugins/theme/client.js +18 -0
- package/template/apps/agent-server/plugins/theme/index.d.mts +9 -0
- package/template/apps/agent-server/plugins/theme/index.mjs +18 -0
- package/template/apps/agent-server/plugins/theme/package.json +19 -0
- package/template/apps/agent-server/plugins/theme/source-tokens.ts +82 -0
- package/template/apps/agent-server/plugins/theme/sync-tokens.ts +12 -0
- package/template/apps/agent-server/plugins/theme/theme.test.ts +193 -0
- package/template/apps/agent-server/plugins/theme/tokens.json +166 -0
- package/template/apps/agent-server/plugins/tool-catalog/README.md +79 -0
- package/template/apps/agent-server/plugins/tool-catalog/categories.mjs +111 -0
- package/template/apps/agent-server/plugins/tool-catalog/categories.test.ts +118 -0
- package/template/apps/agent-server/plugins/tool-catalog/client-cache.test.ts +264 -0
- package/template/apps/agent-server/plugins/tool-catalog/client.js +333 -0
- package/template/apps/agent-server/plugins/tool-catalog/client.test.ts +136 -0
- package/template/apps/agent-server/plugins/tool-catalog/discovery.d.mts +42 -0
- package/template/apps/agent-server/plugins/tool-catalog/discovery.mjs +242 -0
- package/template/apps/agent-server/plugins/tool-catalog/discovery.test.ts +229 -0
- package/template/apps/agent-server/plugins/tool-catalog/index.d.mts +5 -0
- package/template/apps/agent-server/plugins/tool-catalog/index.mjs +91 -0
- package/template/apps/agent-server/plugins/tool-catalog/package.json +23 -0
- package/template/apps/agent-server/plugins/tool-catalog/presentation.d.mts +21 -0
- package/template/apps/agent-server/plugins/tool-catalog/presentation.mjs +153 -0
- package/template/apps/agent-server/plugins/tool-catalog/presentation.test.ts +166 -0
- package/template/apps/agent-server/plugins/tool-catalog/routes.test.ts +209 -0
- package/template/apps/agent-server/plugins/tool-catalog/style.css +155 -0
- package/template/apps/agent-server/plugins/tool-catalog/use-tool.test.ts +160 -0
- package/template/apps/agent-server/plugins/tool-presentation/README.md +7 -0
- package/template/apps/agent-server/plugins/tool-presentation/build-client.ts +29 -0
- package/template/apps/agent-server/plugins/tool-presentation/client.js +312 -0
- package/template/apps/agent-server/plugins/tool-presentation/client.results.js +9 -0
- package/template/apps/agent-server/plugins/tool-presentation/client.test.ts +178 -0
- package/template/apps/agent-server/plugins/tool-presentation/index.mjs +10 -0
- package/template/apps/agent-server/plugins/tool-presentation/package.json +24 -0
- package/template/apps/agent-server/plugins/tool-presentation/result-discovery.mjs +43 -0
- package/template/apps/agent-server/plugins/tool-presentation/result-model.d.mts +51 -0
- package/template/apps/agent-server/plugins/tool-presentation/result-model.mjs +96 -0
- package/template/apps/agent-server/plugins/workspace/README.md +5 -0
- package/template/apps/agent-server/plugins/workspace/index.mjs +8 -0
- package/template/apps/agent-server/plugins/workspace/package.json +10 -0
- package/template/apps/agent-server/plugins/workspace/style.css +124 -0
- package/template/apps/agent-server/project/host.ts +13 -0
- package/template/apps/agent-server/runtime/artifacts.ts +115 -0
- package/template/apps/agent-server/runtime/audit.nodecheck.ts +60 -0
- package/template/apps/agent-server/runtime/capacity.ts +61 -0
- package/template/apps/agent-server/runtime/client-completion-budget.nodecheck.ts +92 -0
- package/template/apps/agent-server/runtime/compatibility.ts +33 -0
- package/template/apps/agent-server/runtime/completions.ts +320 -0
- package/template/apps/agent-server/runtime/config.ts +246 -0
- package/template/apps/agent-server/runtime/context-budget.ts +70 -0
- package/template/apps/agent-server/runtime/context-plugin.ts +306 -0
- package/template/apps/agent-server/runtime/context.nodecheck.ts +241 -0
- package/template/apps/agent-server/runtime/contracts.ts +201 -0
- package/template/apps/agent-server/runtime/dsh-engine.ts +196 -0
- package/template/apps/agent-server/runtime/evaluation-plugin.ts +115 -0
- package/template/apps/agent-server/runtime/evaluation.nodecheck.ts +194 -0
- package/template/apps/agent-server/runtime/events.ts +71 -0
- package/template/apps/agent-server/runtime/governance.ts +194 -0
- package/template/apps/agent-server/runtime/index.ts +339 -0
- package/template/apps/agent-server/runtime/internal-output.ts +37 -0
- package/template/apps/agent-server/runtime/isolation.nodecheck.ts +287 -0
- package/template/apps/agent-server/runtime/model-payload.ts +97 -0
- package/template/apps/agent-server/runtime/model-plugin.ts +308 -0
- package/template/apps/agent-server/runtime/model-route.ts +34 -0
- package/template/apps/agent-server/runtime/model-usage.ts +51 -0
- package/template/apps/agent-server/runtime/model-wire.ts +45 -0
- package/template/apps/agent-server/runtime/native-authorization.nodecheck.ts +126 -0
- package/template/apps/agent-server/runtime/native-completion.nodecheck.ts +81 -0
- package/template/apps/agent-server/runtime/output-validation.ts +66 -0
- package/template/apps/agent-server/runtime/production-capacity.nodecheck.ts +121 -0
- package/template/apps/agent-server/runtime/questions-workflow.nodecheck.ts +249 -0
- package/template/apps/agent-server/runtime/report-breakdown.ts +79 -0
- package/template/apps/agent-server/runtime/reporting.ts +219 -0
- package/template/apps/agent-server/runtime/run-completion.ts +39 -0
- package/template/apps/agent-server/runtime/run-request-digest.ts +18 -0
- package/template/apps/agent-server/runtime/runtime-test-fixtures.ts +264 -0
- package/template/apps/agent-server/runtime/runtime.nodecheck.ts +150 -0
- package/template/apps/agent-server/runtime/store-idempotency.nodecheck.ts +74 -0
- package/template/apps/agent-server/runtime/store.ts +324 -0
- package/template/apps/agent-server/runtime/structured-output-mode.nodecheck.ts +51 -0
- package/template/apps/agent-server/runtime/tool-name.ts +6 -0
- package/template/apps/agent-server/runtime/tool-plugin.ts +201 -0
- package/template/apps/agent-server/runtime/vision-readiness.ts +200 -0
- package/template/apps/agent-server/scripts/confinement-check.mjs +103 -0
- package/template/apps/agent-server/scripts/coordinator-check.mjs +344 -0
- package/template/apps/agent-server/scripts/documents-delivery-check.mjs +309 -0
- package/template/apps/agent-server/scripts/office-preview-check.mjs +92 -0
- package/template/apps/agent-server/scripts/test-confinement.ts +58 -0
- package/template/apps/agent-server/scripts/test-coordinator.ts +36 -0
- package/template/apps/agent-server/scripts/test-runtime.ts +46 -0
- package/template/apps/agent-server/tsconfig.json +21 -0
- package/template/apps/server/Dockerfile +3 -0
- package/template/apps/server/package.json +5 -1
- package/template/apps/server/scripts/check-dsh-platform-example.ts +251 -0
- package/template/apps/server/src/agent/admin-catalog-bootstrap.ts +25 -0
- package/template/apps/server/src/agent/agent-session-bootstrap.ts +7 -8
- package/template/apps/server/src/agent/agent-session-facade.ts +12 -0
- package/template/apps/server/src/agent/agent-session-validation.ts +43 -0
- package/template/apps/server/src/agent/dsh-runtime-wire.test.ts +33 -0
- package/template/apps/server/src/agent/governance-runtime.ts +41 -0
- package/template/apps/server/src/agent/operation-catalog.test.ts +202 -0
- package/template/apps/server/src/agent/operation-catalog.ts +135 -0
- package/template/apps/server/src/agent/remote-runtime-response.ts +1 -1
- package/template/apps/server/src/agent/run-browser-visibility.test.ts +59 -0
- package/template/apps/server/src/agent/run-browser-visibility.ts +11 -0
- package/template/apps/server/src/agent/run-contracts.ts +1 -0
- package/template/apps/server/src/agent/run-definition-support.ts +9 -0
- package/template/apps/server/src/agent/run-operation-policy.ts +1 -0
- package/template/apps/server/src/agent/run-route-response.ts +35 -0
- package/template/apps/server/src/agent/run-routes.ts +46 -43
- package/template/apps/server/src/agent/runtime-bootstrap.ts +21 -20
- package/template/apps/server/src/agent/runtime-disabled-composition.ts +28 -0
- package/template/apps/server/src/agent/runtime-tool-composition.ts +2 -0
- package/template/apps/server/src/agent/session-projection-facade.ts +8 -9
- package/template/apps/server/src/agent/session-projection-governance.ts +10 -0
- package/template/apps/server/src/agent/session-projection-view.ts +19 -16
- package/template/apps/server/src/agent/session-recording-reader.contract.test.ts +131 -0
- package/template/apps/server/src/agent/session-recording-reader.ts +62 -0
- package/template/apps/server/src/agent/tool-catalog-audit.ts +22 -0
- package/template/apps/server/src/agent/tool-catalog-availability.ts +21 -0
- package/template/apps/server/src/agent/tool-catalog-routes.test.ts +103 -0
- package/template/apps/server/src/agent/tool-catalog-routes.ts +62 -0
- package/template/apps/server/src/agent/tool-catalog.test.ts +122 -0
- package/template/apps/server/src/agent/tool-catalog.ts +44 -0
- package/template/apps/server/src/agent/tool-registry.ts +45 -14
- package/template/apps/server/src/agent/workbench-bootstrap.ts +39 -0
- package/template/apps/server/src/agent/workbench-event-projection.ts +115 -0
- package/template/apps/server/src/agent/workbench-facade.contract.test.ts +189 -0
- package/template/apps/server/src/agent/workbench-facade.ts +339 -0
- package/template/apps/server/src/agent/workbench-recording.contract.test.ts +328 -0
- package/template/apps/server/src/agent/workbench-routes.ts +97 -0
- package/template/apps/server/src/agent/workbench-run-integration.test.ts +231 -0
- package/template/apps/server/src/agent/workbench-run-reader.ts +187 -0
- package/template/apps/server/src/agent/workbench-safe-result.ts +61 -0
- package/template/apps/server/src/agent/workbench-sse.ts +50 -0
- package/template/apps/server/src/agent/workflow-runtime-bootstrap.ts +9 -0
- package/template/apps/server/src/agent-skills/access.ts +88 -0
- package/template/apps/server/src/agent-skills/bootstrap.ts +49 -0
- package/template/apps/server/src/agent-skills/builtin-registration.ts +83 -0
- package/template/apps/server/src/agent-skills/builtins.ts +19 -0
- package/template/apps/server/src/agent-skills/bundle-zip.ts +163 -0
- package/template/apps/server/src/agent-skills/bundle.test.ts +79 -0
- package/template/apps/server/src/agent-skills/bundle.ts +133 -0
- package/template/apps/server/src/agent-skills/contracts.ts +46 -0
- package/template/apps/server/src/agent-skills/drizzle-repository.ts +125 -0
- package/template/apps/server/src/agent-skills/input.ts +29 -0
- package/template/apps/server/src/agent-skills/postgres.integration.test.ts +348 -0
- package/template/apps/server/src/agent-skills/read-routes.test.ts +116 -0
- package/template/apps/server/src/agent-skills/reader.ts +108 -0
- package/template/apps/server/src/agent-skills/repository.ts +105 -0
- package/template/apps/server/src/agent-skills/routes.ts +176 -0
- package/template/apps/server/src/agent-skills/service.test.ts +295 -0
- package/template/apps/server/src/agent-skills/service.ts +301 -0
- package/template/apps/server/src/agent-workflow/preset-registry.test.ts +137 -0
- package/template/apps/server/src/agent-workflow/preset-registry.ts +191 -0
- package/template/apps/server/src/agent-workflow/preset-routes.test.ts +94 -0
- package/template/apps/server/src/agent-workflow/preset-routes.ts +45 -0
- package/template/apps/server/src/agent-workflow/query-service.ts +36 -0
- package/template/apps/server/src/agent-workflow/recording-projection.contract.test.ts +196 -0
- package/template/apps/server/src/agent-workflow/recording-projection.ts +86 -0
- package/template/apps/server/src/ai-runtime-report/service.test.ts +10 -7
- package/template/apps/server/src/ai-runtime-report/service.ts +1 -1
- package/template/apps/server/src/app/agent-workflow-presets.ts +4 -0
- package/template/apps/server/src/app/dsh-skill-draft-audit.test.ts +195 -0
- package/template/apps/server/src/app/dsh-skill-draft-audit.ts +115 -0
- package/template/apps/server/src/app/dsh-workbench-audit.test.ts +71 -0
- package/template/apps/server/src/app/dsh-workbench-audit.ts +34 -0
- package/template/apps/server/src/app/dsh-workbench-handshake.test.ts +63 -0
- package/template/apps/server/src/app/dsh-workbench-handshake.ts +48 -0
- package/template/apps/server/src/app/dsh-workbench-http.test.ts +96 -0
- package/template/apps/server/src/app/dsh-workbench-lan-origin.test.ts +114 -0
- package/template/apps/server/src/app/dsh-workbench-launch.test.ts +70 -0
- package/template/apps/server/src/app/dsh-workbench-origin.test.ts +54 -0
- package/template/apps/server/src/app/dsh-workbench-proxy.ts +205 -0
- package/template/apps/server/src/app/dsh-workbench-session-conflict.test.ts +61 -0
- package/template/apps/server/src/app/dsh-workbench-session.ts +59 -0
- package/template/apps/server/src/app/dsh-workbench-socket-audit.test.ts +115 -0
- package/template/apps/server/src/app/dsh-workbench-socket.test.ts +246 -0
- package/template/apps/server/src/app/dsh-workbench-socket.ts +272 -0
- package/template/apps/server/src/app/dsh-workbench-test-support.ts +158 -0
- package/template/apps/server/src/app/dsh-workbench.test.ts +213 -0
- package/template/apps/server/src/app/dsh-workbench.ts +279 -0
- package/template/apps/server/src/app/workbench-public-origin.ts +16 -0
- package/template/apps/server/src/data-governance/user-plaintext-routes.test.ts +3 -0
- package/template/apps/server/src/http-app.ts +31 -0
- package/template/apps/server/src/mcp/adapter.ts +1 -0
- package/template/apps/server/src/module-composition.test.ts +23 -0
- package/template/apps/server/src/module-composition.ts +9 -2
- package/template/apps/server/src/observability/bootstrap.ts +12 -0
- package/template/apps/server/src/observability/diagnostic-failure-recorder.ts +94 -0
- package/template/apps/server/src/observability/diagnostic-http-contract.test.ts +42 -0
- package/template/apps/server/src/observability/diagnostic-index.test.ts +89 -0
- package/template/apps/server/src/observability/diagnostic-index.ts +88 -0
- package/template/apps/server/src/observability/diagnostic-repository.ts +67 -0
- package/template/apps/server/src/platform-app-bootstrap.ts +42 -0
- package/template/apps/server/src/platform-http-runtime.ts +6 -0
- package/template/apps/server/src/runtime-development.test.ts +25 -0
- package/template/apps/server/src/runtime-development.ts +6 -44
- package/template/apps/server/src/system/diagnostic-routes.test.ts +78 -0
- package/template/apps/server/src/system/diagnostic-routes.ts +66 -0
- package/template/apps/web/Dockerfile +9 -1
- package/template/apps/web/dev/start.ts +21 -10
- package/template/apps/web/dsh-workbench-location.ts +21 -0
- package/template/apps/web/dsh-workbench-proxy.test.ts +121 -0
- package/template/apps/web/dsh-workbench-proxy.ts +194 -0
- package/template/apps/web/package.json +3 -1
- package/template/apps/web/server.ts +27 -6
- package/template/apps/web/src/composables/useLoginFlow.ts +13 -1
- package/template/apps/web/src/pages/errors/PlatformErrorPage.vue +6 -0
- package/template/apps/web/src/pages/errors/PlatformErrorPage.webtest.ts +14 -1
- package/template/apps/web/src/pages/errors/error-page-extension.ts +1 -0
- package/template/apps/web/src/pages/system/AgentDebugPage.vue +14 -0
- package/template/apps/web/src/pages/system/AgentNativePage.vue +44 -0
- package/template/apps/web/src/pages/system/AgentSessionPage.vue +29 -8
- package/template/apps/web/src/pages/system/AgentToolsPage.vue +76 -0
- package/template/apps/web/src/pages/system/AgentWorkflowPage.vue +20 -7
- package/template/apps/web/src/pages/system/DiagnosticLookupPage.vue +56 -0
- package/template/apps/web/src/pages/system/DiagnosticLookupPage.webtest.ts +99 -0
- package/template/apps/web/src/pages/system/SystemAgentSkillsPage.vue +88 -0
- package/template/apps/web/src/pages/system/components/DiagnosticRecordDetails.vue +52 -0
- package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillDetailDialog.vue +166 -0
- package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillGovernanceActionDialog.vue +51 -0
- package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillImportDialog.vue +320 -0
- package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillImportDialog.webtest.ts +96 -0
- package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillsTable.vue +69 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/AgentWorkbench.vue +236 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/DraftLeaveDialog.vue +34 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/ReplayEventDetail.vue +175 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/SessionReplayTimeline.vue +142 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/SessionReplayTimeline.webtest.ts +242 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/TestRunComposer.vue +97 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/ToolCatalogPanel.vue +100 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/ToolCatalogPanel.webtest.ts +55 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/ToolRuleDetail.vue +81 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/WorkbenchSessionList.vue +57 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/catalog-presenter.ts +20 -0
- package/template/apps/web/src/pages/system/components/agent-workbench/replay-presenter.ts +94 -0
- package/template/apps/web/src/pages/system/components/agent-workflow/WorkflowPresetCatalog.vue +82 -0
- package/template/apps/web/src/pages/system/components/agent-workflow/WorkflowPresetCatalog.webtest.ts +57 -0
- package/template/apps/web/src/pages/system/composables/useAgentSkillsGovernance.ts +105 -0
- package/template/apps/web/src/pages/system/composables/useAgentWorkbench.ts +298 -0
- package/template/apps/web/src/pages/system/composables/useAgentWorkbench.webtest.ts +164 -0
- package/template/apps/web/src/pages/system/composables/useAgentWorkflowPresets.ts +44 -0
- package/template/apps/web/src/pages/system/composables/useDiagnosticLookup.ts +64 -0
- package/template/apps/web/src/pages/system/composables/useSessionReplay.ts +48 -0
- package/template/apps/web/src/router/error-navigation.ts +3 -1
- package/template/apps/web/src/router/error-navigation.webtest.ts +14 -2
- package/template/apps/web/src/router/index.ts +8 -45
- package/template/apps/web/src/router/platform-admin-pages.ts +79 -0
- package/template/apps/web/src/router/platform-admin-route-bindings.ts +12 -0
- package/template/apps/web/src/services/agent-admin-api.ts +155 -0
- package/template/apps/web/src/services/agent-admin-api.webtest.ts +120 -0
- package/template/apps/web/src/services/agent-skills-api.ts +55 -0
- package/template/apps/web/src/services/agent-workbench-event.ts +60 -0
- package/template/apps/web/src/services/agent-workflow-api.ts +12 -0
- package/template/apps/web/src/services/diagnostics-api.ts +12 -0
- package/template/apps/web/src/services/http.ts +18 -0
- package/template/apps/web/src/services/http.webtest.ts +51 -0
- package/template/apps/web/vite.config.ts +39 -0
- package/template/deploy/dsh/README.md +5 -0
- package/template/deploy/dsh/documents/README.md +9 -0
- package/template/deploy/dsh/documents/requirements.in +6 -0
- package/template/deploy/dsh/documents/requirements.lock +72 -0
- package/template/docker-compose.yml +24 -10
- package/template/docs/adr/0004-embedded-dsh-runtime.md +9 -0
- package/template/docs/architecture/agent-admin-workbench-implementation.md +73 -0
- package/template/docs/architecture/agent-admin-workbench-plan.md +41 -0
- package/template/docs/architecture/agent-harness.md +6 -0
- package/template/docs/architecture/agent-runtime-compatibility.md +2 -0
- package/template/docs/architecture/embedded-dsh-integration.md +44 -0
- package/template/docs/development/dsh-plugins.md +55 -0
- package/template/docs/operations/dsh-agent-migration.md +98 -0
- package/template/docs/platform/agent-production-store.md +5 -78
- package/template/docs/platform/agent-runtime-observability.md +2 -0
- package/template/docs/platform/agent-runtime.md +2 -0
- package/template/docs/platform/agent-skills.md +25 -0
- package/template/package.json +4 -3
- package/template/packages/database/drizzle/0064_dsh_skills_diagnostics.sql +42 -0
- package/template/packages/database/drizzle/meta/0064_snapshot.json +15349 -0
- package/template/packages/database/drizzle/meta/_journal.json +7 -0
- package/template/packages/database/package.json +2 -2
- package/template/packages/database/src/schema/agent-skills.ts +65 -0
- package/template/packages/database/src/schema/diagnostics.ts +27 -0
- package/template/packages/database/src/schema/index.ts +8 -0
- package/template/packages/modules/package.json +1 -1
- package/template/packages/modules/src/ai-operation-composition.ts +9 -0
- package/template/packages/modules/src/ai-operation-visibility.test.ts +33 -0
- package/template/packages/modules/src/manifest.ts +2 -0
- package/template/packages/modules/src/system-admin-routes.ts +40 -0
- package/template/packages/modules/src/system-admin-ui-catalog.ts +24 -11
- package/template/packages/modules/src/system-agent-admin-bindings.ts +44 -0
- package/template/packages/modules/src/system-agent-admin-menus.ts +46 -0
- package/template/packages/modules/src/system-agent-admin-registration.test.ts +52 -0
- package/template/packages/modules/src/system-agent-audit-actions.ts +8 -0
- package/template/packages/modules/src/system-agent-dsh.ts +119 -0
- package/template/packages/modules/src/system-ai-api-bindings.ts +2 -0
- package/template/packages/modules/src/system-api-permissions.ts +9 -0
- package/template/packages/modules/src/system-audit-actions.ts +36 -0
- package/template/packages/modules/src/system-features.ts +24 -0
- package/template/packages/modules/src/system-module-audit-selection.ts +25 -0
- package/template/packages/modules/src/system-module-catalog.ts +22 -40
- package/template/packages/modules/src/system-module-ownership.ts +12 -0
- package/template/packages/modules/src/system-modules.ts +16 -3
- package/template/packages/modules/src/system-permissions.ts +15 -0
- package/template/packages/server-sdk/index.ts +2 -0
- package/template/packages/server-sdk/package.json +2 -2
- package/template/packages/server-sdk/src/agent-session-provider.ts +19 -0
- package/template/packages/shared/index.ts +14 -0
- package/template/packages/shared/package.json +1 -1
- package/template/packages/shared/src/agent-admin-catalog.ts +73 -0
- package/template/packages/shared/src/agent-skills.ts +68 -0
- package/template/packages/shared/src/agent-workbench.ts +100 -0
- package/template/packages/shared/src/agent-workflow-presets.ts +26 -0
- package/template/packages/shared/src/diagnostics.ts +13 -0
- package/template/packages/shared/src/rbac.ts +1 -0
- package/template/apps/agent-server/install-python-dependencies.sh +0 -92
- package/template/apps/agent-server/pyproject.toml +0 -51
- package/template/apps/agent-server/src/southwind_agent_server/__init__.py +0 -5
- package/template/apps/agent-server/src/southwind_agent_server/app.py +0 -344
- package/template/apps/agent-server/src/southwind_agent_server/approval_resolution.py +0 -30
- package/template/apps/agent-server/src/southwind_agent_server/artifact_input.py +0 -153
- package/template/apps/agent-server/src/southwind_agent_server/asgi.py +0 -8
- package/template/apps/agent-server/src/southwind_agent_server/attempt_context.py +0 -199
- package/template/apps/agent-server/src/southwind_agent_server/attempt_context_projection.py +0 -203
- package/template/apps/agent-server/src/southwind_agent_server/client_completion_contracts.py +0 -61
- package/template/apps/agent-server/src/southwind_agent_server/client_completion_governance.py +0 -82
- package/template/apps/agent-server/src/southwind_agent_server/client_completion_routes.py +0 -121
- package/template/apps/agent-server/src/southwind_agent_server/client_completion_runtime.py +0 -158
- package/template/apps/agent-server/src/southwind_agent_server/config.py +0 -267
- package/template/apps/agent-server/src/southwind_agent_server/context_message_digest.py +0 -24
- package/template/apps/agent-server/src/southwind_agent_server/context_version_contracts.py +0 -71
- package/template/apps/agent-server/src/southwind_agent_server/context_version_port.py +0 -307
- package/template/apps/agent-server/src/southwind_agent_server/contracts.py +0 -297
- package/template/apps/agent-server/src/southwind_agent_server/deterministic.py +0 -63
- package/template/apps/agent-server/src/southwind_agent_server/engine.py +0 -134
- package/template/apps/agent-server/src/southwind_agent_server/engine_capacity.py +0 -31
- package/template/apps/agent-server/src/southwind_agent_server/engine_identity.py +0 -2
- package/template/apps/agent-server/src/southwind_agent_server/fingerprint.py +0 -61
- package/template/apps/agent-server/src/southwind_agent_server/health_routes.py +0 -93
- package/template/apps/agent-server/src/southwind_agent_server/http_helpers.py +0 -62
- package/template/apps/agent-server/src/southwind_agent_server/lease.py +0 -15
- package/template/apps/agent-server/src/southwind_agent_server/multimodal.py +0 -76
- package/template/apps/agent-server/src/southwind_agent_server/openai_engine.py +0 -329
- package/template/apps/agent-server/src/southwind_agent_server/openai_engine_validation.py +0 -165
- package/template/apps/agent-server/src/southwind_agent_server/openai_provider.py +0 -345
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_insert.py +0 -37
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_queries.py +0 -235
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_replay.py +0 -44
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_status.py +0 -83
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_store.py +0 -336
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_summary.py +0 -304
- package/template/apps/agent-server/src/southwind_agent_server/postgres_store.py +0 -335
- package/template/apps/agent-server/src/southwind_agent_server/postgres_store_backend.py +0 -333
- package/template/apps/agent-server/src/southwind_agent_server/provider_audit.py +0 -144
- package/template/apps/agent-server/src/southwind_agent_server/provider_governance.py +0 -309
- package/template/apps/agent-server/src/southwind_agent_server/provider_output_guidance.py +0 -34
- package/template/apps/agent-server/src/southwind_agent_server/readiness_pin.py +0 -37
- package/template/apps/agent-server/src/southwind_agent_server/report_lifecycle.py +0 -218
- package/template/apps/agent-server/src/southwind_agent_server/report_metrics.py +0 -149
- package/template/apps/agent-server/src/southwind_agent_server/report_presenter.py +0 -300
- package/template/apps/agent-server/src/southwind_agent_server/report_routes.py +0 -132
- package/template/apps/agent-server/src/southwind_agent_server/report_store.py +0 -298
- package/template/apps/agent-server/src/southwind_agent_server/report_store_protocol.py +0 -75
- package/template/apps/agent-server/src/southwind_agent_server/report_types.py +0 -118
- package/template/apps/agent-server/src/southwind_agent_server/run_admission.py +0 -64
- package/template/apps/agent-server/src/southwind_agent_server/run_capacity.py +0 -59
- package/template/apps/agent-server/src/southwind_agent_server/runtime_budget.py +0 -74
- package/template/apps/agent-server/src/southwind_agent_server/runtime_compatibility.py +0 -89
- package/template/apps/agent-server/src/southwind_agent_server/runtime_factory.py +0 -105
- package/template/apps/agent-server/src/southwind_agent_server/runtime_logging.py +0 -57
- package/template/apps/agent-server/src/southwind_agent_server/service.py +0 -325
- package/template/apps/agent-server/src/southwind_agent_server/service_control.py +0 -64
- package/template/apps/agent-server/src/southwind_agent_server/service_errors.py +0 -4
- package/template/apps/agent-server/src/southwind_agent_server/service_execution.py +0 -34
- package/template/apps/agent-server/src/southwind_agent_server/service_tasks.py +0 -34
- package/template/apps/agent-server/src/southwind_agent_server/signal_events.py +0 -53
- package/template/apps/agent-server/src/southwind_agent_server/sqlite_catalog.py +0 -118
- package/template/apps/agent-server/src/southwind_agent_server/sqlite_errors.py +0 -2
- package/template/apps/agent-server/src/southwind_agent_server/sqlite_schema.py +0 -73
- package/template/apps/agent-server/src/southwind_agent_server/sqlite_serialization.py +0 -16
- package/template/apps/agent-server/src/southwind_agent_server/sqlite_store.py +0 -350
- package/template/apps/agent-server/src/southwind_agent_server/sse.py +0 -41
- package/template/apps/agent-server/src/southwind_agent_server/store.py +0 -255
- package/template/apps/agent-server/src/southwind_agent_server/store_cipher.py +0 -40
- package/template/apps/agent-server/src/southwind_agent_server/structured_logging.py +0 -145
- package/template/apps/agent-server/src/southwind_agent_server/telemetry.py +0 -93
- package/template/apps/agent-server/src/southwind_agent_server/tool_host.py +0 -152
- package/template/apps/agent-server/src/southwind_agent_server/trajectory.py +0 -137
- package/template/apps/agent-server/src/southwind_agent_server/unavailable_engine.py +0 -58
- package/template/apps/agent-server/src/southwind_agent_server/vision_probe.py +0 -87
- package/template/apps/agent-server/src/southwind_agent_server/vision_requirement.py +0 -28
- package/template/apps/agent-server/src/southwind_agent_server/vlm_readiness.py +0 -247
- package/template/apps/agent-server/tests/__init__.py +0 -1
- package/template/apps/agent-server/tests/openai_provider_test_support.py +0 -131
- package/template/apps/agent-server/tests/test_api.py +0 -305
- package/template/apps/agent-server/tests/test_artifact_input.py +0 -110
- package/template/apps/agent-server/tests/test_client_completion.py +0 -230
- package/template/apps/agent-server/tests/test_config.py +0 -106
- package/template/apps/agent-server/tests/test_fingerprint.py +0 -10
- package/template/apps/agent-server/tests/test_multimodal.py +0 -81
- package/template/apps/agent-server/tests/test_openai_provider.py +0 -320
- package/template/apps/agent-server/tests/test_postgres_report_status.py +0 -59
- package/template/apps/agent-server/tests/test_postgres_report_summary.py +0 -298
- package/template/apps/agent-server/tests/test_postgres_store.py +0 -135
- package/template/apps/agent-server/tests/test_provider_attempt_reporting.py +0 -140
- package/template/apps/agent-server/tests/test_provider_governance.py +0 -276
- package/template/apps/agent-server/tests/test_report_attempt_lifecycle.py +0 -126
- package/template/apps/agent-server/tests/test_report_resilience.py +0 -183
- package/template/apps/agent-server/tests/test_report_routes.py +0 -143
- package/template/apps/agent-server/tests/test_report_store.py +0 -347
- package/template/apps/agent-server/tests/test_report_summary_parity.py +0 -116
- package/template/apps/agent-server/tests/test_report_terminal_sync.py +0 -177
- package/template/apps/agent-server/tests/test_run_capacity.py +0 -112
- package/template/apps/agent-server/tests/test_run_operational_logging.py +0 -114
- package/template/apps/agent-server/tests/test_runtime_compatibility.py +0 -119
- package/template/apps/agent-server/tests/test_runtime_factory_readiness.py +0 -52
- package/template/apps/agent-server/tests/test_sqlite_store.py +0 -182
- package/template/apps/agent-server/tests/test_structured_logging.py +0 -142
- package/template/apps/agent-server/tests/test_telemetry.py +0 -25
- package/template/apps/agent-server/tests/test_tool_approval.py +0 -28
- package/template/apps/agent-server/tests/test_tool_structured_output.py +0 -347
- package/template/apps/agent-server/tests/test_trajectory.py +0 -91
- package/template/apps/agent-server/tests/test_vision_readiness_enforcement.py +0 -72
- package/template/apps/agent-server/tests/test_vlm_readiness.py +0 -106
- package/template/apps/agent-server/uv.lock +0 -831
package/dist/cli.js
CHANGED
|
@@ -206,6 +206,45 @@ var starterProfile = {
|
|
|
206
206
|
};
|
|
207
207
|
var projectLicenseKeys = ["UNLICENSED", "MIT", "Apache-2.0"];
|
|
208
208
|
|
|
209
|
+
// src/module-distribution-audit.ts
|
|
210
|
+
var auditDistribution = {
|
|
211
|
+
fileRoots: [
|
|
212
|
+
"apps/server/src/audit/drizzle-log-store.ts",
|
|
213
|
+
"apps/server/src/audit/recovery-queue.ts",
|
|
214
|
+
"apps/server/src/audit/recovery-queue.test.ts",
|
|
215
|
+
"apps/server/src/audit/reliable-writer.ts",
|
|
216
|
+
"apps/server/src/audit/reliable-writer.test.ts",
|
|
217
|
+
"apps/server/src/persistence.integration.test.ts",
|
|
218
|
+
"apps/server/src/system/audit-routes.ts",
|
|
219
|
+
"apps/server/src/observability/diagnostic-index.ts",
|
|
220
|
+
"apps/server/src/observability/diagnostic-index.test.ts",
|
|
221
|
+
"apps/server/src/observability/diagnostic-http-contract.test.ts",
|
|
222
|
+
"apps/server/src/observability/diagnostic-repository.ts",
|
|
223
|
+
"apps/server/src/observability/diagnostic-failure-recorder.ts",
|
|
224
|
+
"apps/server/src/system/diagnostic-routes.ts",
|
|
225
|
+
"apps/server/src/system/diagnostic-routes.test.ts",
|
|
226
|
+
"apps/web/src/pages/system/DiagnosticLookupPage.vue",
|
|
227
|
+
"apps/web/src/pages/system/DiagnosticLookupPage.webtest.ts",
|
|
228
|
+
"apps/web/src/pages/system/components/DiagnosticRecordDetails.vue",
|
|
229
|
+
"apps/web/src/pages/system/composables/useDiagnosticLookup.ts",
|
|
230
|
+
"apps/web/src/services/diagnostics-api.ts",
|
|
231
|
+
"packages/shared/src/diagnostics.ts",
|
|
232
|
+
"apps/server/src/system/audit-routes.test.ts",
|
|
233
|
+
"apps/web/src/pages/system/audit-log-presenter.ts",
|
|
234
|
+
"apps/web/src/pages/system/audit-time-range.ts",
|
|
235
|
+
"apps/web/src/pages/system/components/AuditActionCell.vue",
|
|
236
|
+
"apps/web/src/pages/system/components/AuditActionCell.webtest.ts",
|
|
237
|
+
"apps/web/src/pages/system/components/AuditLogDetailDialog.vue",
|
|
238
|
+
"apps/web/src/pages/system/components/AuditLogDetailDialog.webtest.ts",
|
|
239
|
+
"apps/web/src/pages/system/components/AuditLogFilters.vue",
|
|
240
|
+
"apps/web/src/pages/system/components/AuditLogFilters.webtest.ts"
|
|
241
|
+
],
|
|
242
|
+
documentation: ["docs/platform/audit-reliability.md"],
|
|
243
|
+
schemaFiles: ["packages/database/src/schema/diagnostics.ts"],
|
|
244
|
+
databaseTables: ["audit_logs", "diagnostic_events"],
|
|
245
|
+
databaseStatementTokens: ["idx_audit_logs_", "idx_diagnostic_events_"]
|
|
246
|
+
};
|
|
247
|
+
|
|
209
248
|
// src/module-distribution-validation.ts
|
|
210
249
|
function validateModuleDistributionCatalog(manifests) {
|
|
211
250
|
const names = new Set;
|
|
@@ -281,6 +320,8 @@ var agentOptionalModule = {
|
|
|
281
320
|
"system.workflow"
|
|
282
321
|
]),
|
|
283
322
|
registryDependencies: [
|
|
323
|
+
{ sourceName: "fflate", name: "fflate", version: "0.8.3" },
|
|
324
|
+
{ sourceName: "yaml", name: "yaml", version: "2.9.0" },
|
|
284
325
|
{
|
|
285
326
|
sourceName: "@modelcontextprotocol/sdk",
|
|
286
327
|
name: "@modelcontextprotocol/sdk",
|
|
@@ -294,15 +335,39 @@ var agentOptionalModule = {
|
|
|
294
335
|
],
|
|
295
336
|
fileRoots: [
|
|
296
337
|
"apps/agent-server",
|
|
338
|
+
"apps/server/scripts/check-dsh-platform-example.ts",
|
|
297
339
|
"apps/document-server",
|
|
298
340
|
"apps/speech-server",
|
|
299
341
|
"apps/embedding-server",
|
|
300
342
|
"apps/server/src/agent",
|
|
343
|
+
"apps/server/src/agent-skills",
|
|
344
|
+
"deploy/dsh",
|
|
301
345
|
"apps/server/src/agent-workflow",
|
|
302
346
|
"apps/server/src/ai-runtime-report",
|
|
303
347
|
"apps/server/src/ai-runtime-readiness",
|
|
304
348
|
"apps/server/src/app/ai-screenshot-intake-binding.ts",
|
|
305
349
|
"apps/server/src/app/agent-runtime-composition.ts",
|
|
350
|
+
"apps/server/src/app/workbench-public-origin.ts",
|
|
351
|
+
"apps/server/src/app/agent-workflow-presets.ts",
|
|
352
|
+
"apps/server/src/app/dsh-skill-draft-audit.test.ts",
|
|
353
|
+
"apps/server/src/app/dsh-skill-draft-audit.ts",
|
|
354
|
+
"apps/server/src/app/dsh-workbench-handshake.test.ts",
|
|
355
|
+
"apps/server/src/app/dsh-workbench-audit.ts",
|
|
356
|
+
"apps/server/src/app/dsh-workbench-audit.test.ts",
|
|
357
|
+
"apps/server/src/app/dsh-workbench-socket-audit.test.ts",
|
|
358
|
+
"apps/server/src/app/dsh-workbench-handshake.ts",
|
|
359
|
+
"apps/server/src/app/dsh-workbench-http.test.ts",
|
|
360
|
+
"apps/server/src/app/dsh-workbench-lan-origin.test.ts",
|
|
361
|
+
"apps/server/src/app/dsh-workbench-launch.test.ts",
|
|
362
|
+
"apps/server/src/app/dsh-workbench-origin.test.ts",
|
|
363
|
+
"apps/server/src/app/dsh-workbench-proxy.ts",
|
|
364
|
+
"apps/server/src/app/dsh-workbench-session-conflict.test.ts",
|
|
365
|
+
"apps/server/src/app/dsh-workbench-session.ts",
|
|
366
|
+
"apps/server/src/app/dsh-workbench-socket.test.ts",
|
|
367
|
+
"apps/server/src/app/dsh-workbench-socket.ts",
|
|
368
|
+
"apps/server/src/app/dsh-workbench-test-support.ts",
|
|
369
|
+
"apps/server/src/app/dsh-workbench.test.ts",
|
|
370
|
+
"apps/server/src/app/dsh-workbench.ts",
|
|
306
371
|
"apps/server/src/app/client-agent-host-auth-binding.ts",
|
|
307
372
|
"apps/server/src/app/client-agent-workflow-artifact-binding.ts",
|
|
308
373
|
"apps/server/src/app/document-output-artifact-bindings.ts",
|
|
@@ -324,7 +389,25 @@ var agentOptionalModule = {
|
|
|
324
389
|
"apps/server/src/module-host/tool-handlers.ts",
|
|
325
390
|
"apps/server/src/module-host/tool-handlers.test.ts",
|
|
326
391
|
"apps/server/src/module-host/module-secret-tool-boundary.test.ts",
|
|
392
|
+
"apps/web/dsh-workbench-proxy.ts",
|
|
393
|
+
"apps/web/dsh-workbench-proxy.test.ts",
|
|
394
|
+
"apps/web/dsh-workbench-location.ts",
|
|
327
395
|
"apps/web/src/pages/system/AiRuntimePage.vue",
|
|
396
|
+
"apps/web/src/pages/system/AgentToolsPage.vue",
|
|
397
|
+
"apps/web/src/pages/system/SystemAgentSkillsPage.vue",
|
|
398
|
+
"apps/web/src/pages/system/SystemAgentSkillsPage.webtest.ts",
|
|
399
|
+
"apps/web/src/pages/system/components/agent-skills",
|
|
400
|
+
"apps/web/src/pages/system/composables/useAgentSkillsGovernance.ts",
|
|
401
|
+
"apps/web/src/pages/system/composables/useAgentWorkflowPresets.ts",
|
|
402
|
+
"apps/web/src/services/agent-skills-api.ts",
|
|
403
|
+
"apps/web/src/pages/system/AgentDebugPage.vue",
|
|
404
|
+
"apps/web/src/pages/system/components/agent-workbench",
|
|
405
|
+
"apps/web/src/pages/system/composables/useAgentWorkbench.ts",
|
|
406
|
+
"apps/web/src/pages/system/composables/useAgentWorkbench.webtest.ts",
|
|
407
|
+
"apps/web/src/pages/system/composables/useSessionReplay.ts",
|
|
408
|
+
"apps/web/src/services/agent-admin-api.ts",
|
|
409
|
+
"apps/web/src/services/agent-admin-api.webtest.ts",
|
|
410
|
+
"apps/web/src/services/agent-workbench-event.ts",
|
|
328
411
|
"apps/web/src/pages/system/AgentSessionPage.vue",
|
|
329
412
|
"apps/web/src/pages/system/AgentSessionPage.webtest.ts",
|
|
330
413
|
"apps/web/src/pages/system/AgentWorkflowPage.vue",
|
|
@@ -344,8 +427,12 @@ var agentOptionalModule = {
|
|
|
344
427
|
"apps/web/src/services/ai-runtime-api.ts",
|
|
345
428
|
"apps/web/src/services/ai-runtime-api.webtest.ts",
|
|
346
429
|
"scripts/provision-speech-readiness.ts",
|
|
430
|
+
"packages/modules/src/system-agent-admin-registration.test.ts",
|
|
431
|
+
"packages/modules/src/system-agent-admin-menus.ts",
|
|
432
|
+
"packages/modules/src/system-agent-admin-bindings.ts",
|
|
347
433
|
"packages/modules/src/system-agent-audit-actions.ts",
|
|
348
434
|
"packages/modules/src/system-agent-tools.ts",
|
|
435
|
+
"packages/modules/src/system-agent-dsh.ts",
|
|
349
436
|
"packages/modules/src/system-agent-supervisor.ts",
|
|
350
437
|
"packages/modules/src/system-agent-supervisor.test.ts",
|
|
351
438
|
"packages/modules/src/system-ai-api-bindings.ts",
|
|
@@ -359,6 +446,10 @@ var agentOptionalModule = {
|
|
|
359
446
|
"packages/server-sdk/src/workflow-input-materialization-handler.ts",
|
|
360
447
|
"packages/database/src/agent-runtime-schema.test.ts",
|
|
361
448
|
"packages/database/src/ai-output-artifacts.test.ts",
|
|
449
|
+
"packages/shared/src/agent-admin-catalog.ts",
|
|
450
|
+
"packages/shared/src/agent-workbench.ts",
|
|
451
|
+
"packages/shared/src/agent-skills.ts",
|
|
452
|
+
"packages/shared/src/agent-workflow-presets.ts",
|
|
362
453
|
"packages/shared/src/agent-workflow-definition.ts",
|
|
363
454
|
"packages/shared/src/agent-workflow-delegation.ts",
|
|
364
455
|
"packages/shared/src/agent-workflow-evaluation.ts",
|
|
@@ -371,7 +462,14 @@ var agentOptionalModule = {
|
|
|
371
462
|
],
|
|
372
463
|
documentation: [
|
|
373
464
|
"docs/adr/0003-agent-session-event-source.md",
|
|
465
|
+
"docs/adr/0004-embedded-dsh-runtime.md",
|
|
466
|
+
"docs/architecture/agent-admin-workbench-plan.md",
|
|
467
|
+
"docs/architecture/agent-admin-workbench-implementation.md",
|
|
374
468
|
"docs/architecture/agent-harness.md",
|
|
469
|
+
"docs/architecture/embedded-dsh-integration.md",
|
|
470
|
+
"docs/platform/agent-skills.md",
|
|
471
|
+
"docs/operations/dsh-agent-migration.md",
|
|
472
|
+
"docs/development/dsh-plugins.md",
|
|
375
473
|
"docs/architecture/agent-runtime-compatibility.md",
|
|
376
474
|
"docs/architecture/agent-workflow.md",
|
|
377
475
|
"docs/architecture/durable-jobs.md",
|
|
@@ -401,6 +499,7 @@ var agentOptionalModule = {
|
|
|
401
499
|
],
|
|
402
500
|
schemaFiles: [
|
|
403
501
|
"packages/database/src/schema/agent-runtime.ts",
|
|
502
|
+
"packages/database/src/schema/agent-skills.ts",
|
|
404
503
|
"packages/database/src/schema/agent-context-message.ts",
|
|
405
504
|
"packages/database/src/schema/agent-session-receipt.ts",
|
|
406
505
|
"packages/database/src/schema/agent-session.ts",
|
|
@@ -415,6 +514,8 @@ var agentOptionalModule = {
|
|
|
415
514
|
],
|
|
416
515
|
databaseTables: [
|
|
417
516
|
"agent_operation_releases",
|
|
517
|
+
"agent_skill_versions",
|
|
518
|
+
"agent_skill_mutations",
|
|
418
519
|
"agent_runtime_runs",
|
|
419
520
|
"agent_runtime_events",
|
|
420
521
|
"agent_evaluation_results",
|
|
@@ -452,6 +553,9 @@ var agentOptionalModule = {
|
|
|
452
553
|
],
|
|
453
554
|
databaseStatementTokens: [
|
|
454
555
|
"idx_agent_context_sources_origin",
|
|
556
|
+
"idx_agent_skill_",
|
|
557
|
+
"uk_agent_skill_",
|
|
558
|
+
"ck_agent_skill_",
|
|
455
559
|
"idx_agent_memory_sources_origin",
|
|
456
560
|
"uk_agent_source_invalidations_sequence",
|
|
457
561
|
"agent_workflow_",
|
|
@@ -810,27 +914,7 @@ var platformModules = [
|
|
|
810
914
|
},
|
|
811
915
|
{
|
|
812
916
|
...module("system.audit", "\u5BA1\u8BA1\u65E5\u5FD7", "\u5BA1\u8BA1\u67E5\u8BE2\u3001\u53EF\u9760\u5199\u5165\u548C\u6062\u590D\u3002", "recommended", ["system"]),
|
|
813
|
-
|
|
814
|
-
"apps/server/src/audit/drizzle-log-store.ts",
|
|
815
|
-
"apps/server/src/audit/recovery-queue.ts",
|
|
816
|
-
"apps/server/src/audit/recovery-queue.test.ts",
|
|
817
|
-
"apps/server/src/audit/reliable-writer.ts",
|
|
818
|
-
"apps/server/src/audit/reliable-writer.test.ts",
|
|
819
|
-
"apps/server/src/persistence.integration.test.ts",
|
|
820
|
-
"apps/server/src/system/audit-routes.ts",
|
|
821
|
-
"apps/server/src/system/audit-routes.test.ts",
|
|
822
|
-
"apps/web/src/pages/system/audit-log-presenter.ts",
|
|
823
|
-
"apps/web/src/pages/system/audit-time-range.ts",
|
|
824
|
-
"apps/web/src/pages/system/components/AuditActionCell.vue",
|
|
825
|
-
"apps/web/src/pages/system/components/AuditActionCell.webtest.ts",
|
|
826
|
-
"apps/web/src/pages/system/components/AuditLogDetailDialog.vue",
|
|
827
|
-
"apps/web/src/pages/system/components/AuditLogDetailDialog.webtest.ts",
|
|
828
|
-
"apps/web/src/pages/system/components/AuditLogFilters.vue",
|
|
829
|
-
"apps/web/src/pages/system/components/AuditLogFilters.webtest.ts"
|
|
830
|
-
],
|
|
831
|
-
documentation: ["docs/platform/audit-reliability.md"],
|
|
832
|
-
databaseTables: ["audit_logs"],
|
|
833
|
-
databaseStatementTokens: ["idx_audit_logs_"]
|
|
917
|
+
...auditDistribution
|
|
834
918
|
},
|
|
835
919
|
{
|
|
836
920
|
...module("system.operations", "\u8FD0\u7EF4\u76D1\u63A7", "\u670D\u52A1\u3001\u6570\u636E\u5E93\u3001\u7F13\u5B58\u3001\u78C1\u76D8\u548C\u4F1A\u8BDD\u76D1\u63A7\u3002", "recommended", ["system", "system.configuration"]),
|
|
@@ -852,6 +936,8 @@ var platformModules = [
|
|
|
852
936
|
"apps/web/src/pages/system/components/OperationOnlineUsers.webtest.ts",
|
|
853
937
|
"apps/web/src/pages/system/components/OperationServiceMonitor.vue",
|
|
854
938
|
"apps/web/src/pages/system/components/OperationServiceMonitor.webtest.ts",
|
|
939
|
+
"apps/web/src/pages/system/composables/useSchedulerOperations.ts",
|
|
940
|
+
"apps/web/src/pages/system/composables/useSchedulerOperations.webtest.ts",
|
|
855
941
|
"apps/web/src/services/operations-api.ts"
|
|
856
942
|
],
|
|
857
943
|
documentation: ["docs/platform/operations-overview.md"]
|
|
@@ -1202,7 +1288,7 @@ import { lstat, open, readFile, rename, rm } from "fs/promises";
|
|
|
1202
1288
|
import { join } from "path";
|
|
1203
1289
|
var managedSecretKeys = [
|
|
1204
1290
|
"AGENT_SERVER_INTERNAL_TOKEN",
|
|
1205
|
-
"
|
|
1291
|
+
"AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET",
|
|
1206
1292
|
"AI_ARTIFACT_ENCRYPTION_SECRET",
|
|
1207
1293
|
"EMBEDDING_RUN_ENCRYPTION_SECRET",
|
|
1208
1294
|
"AI_OUTPUT_ARTIFACT_REFERENCE_SECRET"
|
|
@@ -1220,8 +1306,8 @@ async function initializeLocalEnvironment(projectRoot, generateSecret = defaultS
|
|
|
1220
1306
|
if (/^AGENT_SERVER_INTERNAL_TOKEN=[ \t\r]*$/m.test(content)) {
|
|
1221
1307
|
content = setEmptyVariable(content, "AGENT_SERVER_INTERNAL_TOKEN", generateSecret());
|
|
1222
1308
|
}
|
|
1223
|
-
if (/^
|
|
1224
|
-
content = setEmptyVariable(content, "
|
|
1309
|
+
if (/^AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET=[ \t\r]*$/m.test(content)) {
|
|
1310
|
+
content = setEmptyVariable(content, "AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET", generateSecret());
|
|
1225
1311
|
}
|
|
1226
1312
|
if (/^AI_ARTIFACT_ENCRYPTION_SECRET=[ \t\r]*$/m.test(content)) {
|
|
1227
1313
|
content = setEmptyVariable(content, "AI_ARTIFACT_ENCRYPTION_SECRET", generateSecret());
|
|
@@ -2695,7 +2781,8 @@ function isMissing2(error) {
|
|
|
2695
2781
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
2696
2782
|
}
|
|
2697
2783
|
|
|
2698
|
-
// src/docker-copy-
|
|
2784
|
+
// src/docker-copy-targets.ts
|
|
2785
|
+
var agentDockerfilePath = "apps/agent-server/Dockerfile";
|
|
2699
2786
|
var webDockerfilePath = "apps/web/Dockerfile";
|
|
2700
2787
|
var webEntryDirectory = "apps/web";
|
|
2701
2788
|
var serverDockerfilePath = "apps/server/Dockerfile";
|
|
@@ -2712,8 +2799,14 @@ var dockerfileCopyTargets = [
|
|
|
2712
2799
|
dockerfilePath: webDockerfilePath,
|
|
2713
2800
|
entryDirectory: webEntryDirectory,
|
|
2714
2801
|
includeBuildClosure: true
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
dockerfilePath: agentDockerfilePath,
|
|
2805
|
+
entryDirectory: "apps/agent-server",
|
|
2806
|
+
includeBuildClosure: false
|
|
2715
2807
|
}
|
|
2716
2808
|
];
|
|
2809
|
+
// src/docker-copy-sync.ts
|
|
2717
2810
|
async function snapshotWorkspacePackages(root, options = {}) {
|
|
2718
2811
|
const rootContent = await readSafeOptional(root, "package.json");
|
|
2719
2812
|
if (!rootContent) {
|
|
@@ -3224,31 +3317,6 @@ Skill \u4ECD\u53EF\u7528\u4E8E\u666E\u901A\u4E1A\u52A1\u6A21\u5757\u5F00\u53D1\u
|
|
|
3224
3317
|
`;
|
|
3225
3318
|
}
|
|
3226
3319
|
|
|
3227
|
-
// src/runtime-profile-opensearch.ts
|
|
3228
|
-
var openSearchComposeService = ` opensearch:
|
|
3229
|
-
profiles: ["search"]
|
|
3230
|
-
image: opensearchproject/opensearch:2.19.3
|
|
3231
|
-
environment:
|
|
3232
|
-
discovery.type: single-node
|
|
3233
|
-
DISABLE_INSTALL_DEMO_CONFIG: "true"
|
|
3234
|
-
DISABLE_SECURITY_PLUGIN: "true"
|
|
3235
|
-
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m"
|
|
3236
|
-
ports:
|
|
3237
|
-
- "127.0.0.1:19200:9200"
|
|
3238
|
-
volumes:
|
|
3239
|
-
- opensearch-data:/usr/share/opensearch/data
|
|
3240
|
-
healthcheck:
|
|
3241
|
-
test:
|
|
3242
|
-
[
|
|
3243
|
-
"CMD-SHELL",
|
|
3244
|
-
"curl -fsS http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow",
|
|
3245
|
-
]
|
|
3246
|
-
interval: 10s
|
|
3247
|
-
timeout: 5s
|
|
3248
|
-
retries: 12
|
|
3249
|
-
|
|
3250
|
-
`;
|
|
3251
|
-
|
|
3252
3320
|
// src/runtime-profile-compose-build.ts
|
|
3253
3321
|
var starterServerBuild = ` build:
|
|
3254
3322
|
context: .
|
|
@@ -3274,112 +3342,7 @@ function optionalComposeVolumes(includeAgent, includeSearch, includeStorage) {
|
|
|
3274
3342
|
`);
|
|
3275
3343
|
}
|
|
3276
3344
|
|
|
3277
|
-
// src/runtime-profile-
|
|
3278
|
-
var starterComposeBase = `services:
|
|
3279
|
-
postgres:
|
|
3280
|
-
image: pgvector/pgvector:pg18
|
|
3281
|
-
environment:
|
|
3282
|
-
POSTGRES_DB: windy
|
|
3283
|
-
POSTGRES_USER: windy
|
|
3284
|
-
POSTGRES_PASSWORD: \${POSTGRES_PASSWORD:?\u8BF7\u5728 .env \u4E2D\u8BBE\u7F6E POSTGRES_PASSWORD}
|
|
3285
|
-
ports:
|
|
3286
|
-
- "15432:5432"
|
|
3287
|
-
volumes:
|
|
3288
|
-
- postgres18-data:/var/lib/postgresql
|
|
3289
|
-
healthcheck:
|
|
3290
|
-
test: ["CMD-SHELL", "pg_isready -U windy -d windy"]
|
|
3291
|
-
interval: 10s
|
|
3292
|
-
timeout: 5s
|
|
3293
|
-
retries: 5
|
|
3294
|
-
|
|
3295
|
-
migrate:
|
|
3296
|
-
${starterServerBuild}
|
|
3297
|
-
command: ["bun", "run", "db:migrate"]
|
|
3298
|
-
environment:
|
|
3299
|
-
DATABASE_URL: postgresql://windy:\${POSTGRES_PASSWORD}@postgres:5432/windy
|
|
3300
|
-
volumes:
|
|
3301
|
-
- ./packages:/app/packages
|
|
3302
|
-
depends_on:
|
|
3303
|
-
postgres:
|
|
3304
|
-
condition: service_healthy
|
|
3305
|
-
|
|
3306
|
-
server:
|
|
3307
|
-
${starterServerBuild}
|
|
3308
|
-
command: ["bun", "run", "--cwd", "apps/server", "dev"]
|
|
3309
|
-
environment:
|
|
3310
|
-
NODE_ENV: development
|
|
3311
|
-
PORT: 9747
|
|
3312
|
-
DATABASE_URL: postgresql://windy:\${POSTGRES_PASSWORD}@postgres:5432/windy
|
|
3313
|
-
WINDY_BOOTSTRAP_ADMIN_PASSWORD: \${WINDY_BOOTSTRAP_ADMIN_PASSWORD:?\u8BF7\u5728 .env \u4E2D\u8BBE\u7F6E\u7BA1\u7406\u5458\u521D\u59CB\u5BC6\u7801}
|
|
3314
|
-
WINDY_AUDIT_QUEUE_FILE: /app/data/audit/recovery-queue.json
|
|
3315
|
-
__STORAGE_SERVER_ENV__
|
|
3316
|
-
WINDY_CONTAINERIZED: "1"
|
|
3317
|
-
BUN_CONFIG_NO_CLEAR_TERMINAL_ON_RELOAD: "true"
|
|
3318
|
-
WINDY_SYSTEM_USAGE_PATHS: /app/data/audit
|
|
3319
|
-
PLATFORM_ENABLE_AI: \${PLATFORM_ENABLE_AI:-false}
|
|
3320
|
-
AGENT_SERVER_URL: http://agent-server:8080
|
|
3321
|
-
WINDY_PUBLIC_BASE_URL: \${WINDY_PUBLIC_BASE_URL:-http://localhost:9747}
|
|
3322
|
-
AGENT_TOOL_HOST_URL: http://server:9747
|
|
3323
|
-
__TOOL_SANDBOX_SERVER_ENV__
|
|
3324
|
-
AGENT_SERVER_INTERNAL_TOKEN: \${AGENT_SERVER_INTERNAL_TOKEN:-}
|
|
3325
|
-
__AGENT_WORKFLOW_SERVER_ENV__
|
|
3326
|
-
AI_ARTIFACT_URL: http://server:9747/api/internal/ai/artifacts
|
|
3327
|
-
AI_ARTIFACT_ENCRYPTION_SECRET: \${AI_ARTIFACT_ENCRYPTION_SECRET:-}
|
|
3328
|
-
DOCUMENT_SERVER_URL: \${DOCUMENT_SERVER_URL:-}
|
|
3329
|
-
AI_OUTPUT_ARTIFACT_REFERENCE_SECRET: \${AI_OUTPUT_ARTIFACT_REFERENCE_SECRET:-}
|
|
3330
|
-
DOCUMENT_OUTPUT_ARTIFACT_SINK_IDENTITY: \${DOCUMENT_OUTPUT_ARTIFACT_SINK_IDENTITY:-}
|
|
3331
|
-
DOCUMENT_OUTPUT_ARTIFACT_SINK_RELEASE_DIGEST: \${DOCUMENT_OUTPUT_ARTIFACT_SINK_RELEASE_DIGEST:-}
|
|
3332
|
-
SPEECH_SERVER_URL: \${SPEECH_SERVER_URL:-}
|
|
3333
|
-
EMBEDDING_SERVER_URL: \${EMBEDDING_SERVER_URL:-}
|
|
3334
|
-
__OPENSEARCH_SERVER_ENV__
|
|
3335
|
-
ports:
|
|
3336
|
-
- "9747:9747"
|
|
3337
|
-
volumes:
|
|
3338
|
-
- ./apps/server:/app/apps/server
|
|
3339
|
-
- ./packages:/app/packages
|
|
3340
|
-
- server-audit-data:/app/data/audit
|
|
3341
|
-
__STORAGE_SERVER_VOLUME__
|
|
3342
|
-
__TOOL_SANDBOX_SERVER_VOLUME__
|
|
3343
|
-
depends_on:
|
|
3344
|
-
migrate:
|
|
3345
|
-
condition: service_completed_successfully
|
|
3346
|
-
|
|
3347
|
-
__OPENSEARCH_SERVICE__
|
|
3348
|
-
web:
|
|
3349
|
-
build:
|
|
3350
|
-
context: .
|
|
3351
|
-
dockerfile: apps/web/Dockerfile
|
|
3352
|
-
command: ["bun", "run", "--cwd", "apps/web", "dev"]
|
|
3353
|
-
environment:
|
|
3354
|
-
NODE_ENV: development
|
|
3355
|
-
WINDY_DEV_PORT: 18746
|
|
3356
|
-
WINDY_DEV_USE_POLLING: "1"
|
|
3357
|
-
API_UPSTREAM: http://server:9747
|
|
3358
|
-
VITE_DEV_HOST: 0.0.0.0
|
|
3359
|
-
ports:
|
|
3360
|
-
- "18746:18746"
|
|
3361
|
-
volumes:
|
|
3362
|
-
- ./apps/web:/app/apps/web
|
|
3363
|
-
- ./packages:/app/packages
|
|
3364
|
-
healthcheck:
|
|
3365
|
-
test:
|
|
3366
|
-
[
|
|
3367
|
-
"CMD",
|
|
3368
|
-
"bun",
|
|
3369
|
-
"-e",
|
|
3370
|
-
"const r=await fetch('http://127.0.0.1:18746/-/windy-dev');process.exit(r.ok?0:1)",
|
|
3371
|
-
]
|
|
3372
|
-
interval: 5s
|
|
3373
|
-
timeout: 3s
|
|
3374
|
-
retries: 6
|
|
3375
|
-
depends_on:
|
|
3376
|
-
- server
|
|
3377
|
-
|
|
3378
|
-
volumes:
|
|
3379
|
-
postgres18-data:
|
|
3380
|
-
server-audit-data:
|
|
3381
|
-
__OPTIONAL_VOLUMES__
|
|
3382
|
-
`;
|
|
3345
|
+
// src/runtime-profile-agent.ts
|
|
3383
3346
|
var agentComposeService = ` tool-sandbox-init:
|
|
3384
3347
|
profiles: ["agent"]
|
|
3385
3348
|
${starterServerBuild}
|
|
@@ -3428,23 +3391,38 @@ ${starterServerBuild}
|
|
|
3428
3391
|
context: .
|
|
3429
3392
|
dockerfile: apps/agent-server/Dockerfile
|
|
3430
3393
|
args:
|
|
3431
|
-
|
|
3394
|
+
WINDY_AGENT_NATIVE_REGISTRY: \${WINDY_AGENT_NATIVE_REGISTRY:-https://registry.npmjs.org}
|
|
3395
|
+
WINDY_PYPI_INDEX_URL: \${WINDY_PYPI_INDEX_URL:-https://pypi.org/simple}
|
|
3396
|
+
cap_drop: ["ALL"]
|
|
3397
|
+
cap_add: ["SETUID", "SETGID", "CHOWN", "DAC_OVERRIDE", "KILL"]
|
|
3398
|
+
security_opt:
|
|
3399
|
+
- no-new-privileges:true
|
|
3400
|
+
pids_limit: 512
|
|
3401
|
+
mem_limit: \${AGENT_SERVER_MEMORY_LIMIT:-4g}
|
|
3402
|
+
cpus: \${AGENT_SERVER_CPU_LIMIT:-2}
|
|
3432
3403
|
environment:
|
|
3433
3404
|
AGENT_SERVER_INTERNAL_TOKEN: \${AGENT_SERVER_INTERNAL_TOKEN:-}
|
|
3434
3405
|
AGENT_CONTEXT_HOST_URL: http://server:9747
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3406
|
+
AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET: \${AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET:-}
|
|
3407
|
+
AGENT_RUNTIME_DATABASE_PATH: /app/data/agent/embedded-dsh.sqlite
|
|
3408
|
+
AI_TOOL_HOST_URL: http://server:9747
|
|
3409
|
+
AI_ARTIFACT_URL: http://server:9747/api/internal/ai/artifacts
|
|
3410
|
+
AGENT_DSH_HOME: /app/data/agent/dsh
|
|
3411
|
+
AGENT_DSH_MAX_USERS: \${AGENT_DSH_MAX_USERS:-2}
|
|
3412
|
+
AGENT_DSH_USER_EXTENSIONS: \${AGENT_DSH_USER_EXTENSIONS:-1}
|
|
3413
|
+
AGENT_DSH_MAX_ACTIVE_RUNS: \${AGENT_DSH_MAX_ACTIVE_RUNS:-2}
|
|
3414
|
+
AGENT_DSH_WORKSPACE_MAX_BYTES: \${AGENT_DSH_WORKSPACE_MAX_BYTES:-536870912}
|
|
3441
3415
|
AI_PROVIDER_AUDIT_RETENTION_DAYS: \${AI_PROVIDER_AUDIT_RETENTION_DAYS:-90}
|
|
3442
3416
|
QWEN_API_URL: \${QWEN_API_URL:-}
|
|
3443
3417
|
QWEN_API_KEY: \${QWEN_API_KEY:-}
|
|
3444
3418
|
QWEN_MODEL: \${QWEN_MODEL:-}
|
|
3419
|
+
QWEN_STRUCTURED_OUTPUT_MODE: \${QWEN_STRUCTURED_OUTPUT_MODE:-json_schema}
|
|
3445
3420
|
AI_PROVIDER_HTTPS_HOST_ALLOWLIST: \${AI_PROVIDER_HTTPS_HOST_ALLOWLIST:-}
|
|
3446
|
-
AI_PROVIDER_CONNECT_TIMEOUT_MS: \${AI_PROVIDER_CONNECT_TIMEOUT_MS:-5000}
|
|
3447
3421
|
AI_PROVIDER_REQUEST_TIMEOUT_MS: \${AI_PROVIDER_REQUEST_TIMEOUT_MS:-60000}
|
|
3422
|
+
AI_PROVIDER_CONTEXT_TOKENS: \${AI_PROVIDER_CONTEXT_TOKENS:-}
|
|
3423
|
+
AI_PROVIDER_TOKENIZE_PATH: \${AI_PROVIDER_TOKENIZE_PATH:-}
|
|
3424
|
+
AI_PROVIDER_OUTPUT_RESERVE_TOKENS: \${AI_PROVIDER_OUTPUT_RESERVE_TOKENS:-4096}
|
|
3425
|
+
AI_PROVIDER_CONTEXT_SAFETY_TOKENS: \${AI_PROVIDER_CONTEXT_SAFETY_TOKENS:-512}
|
|
3448
3426
|
AI_PROVIDER_MAX_RESPONSE_BYTES: \${AI_PROVIDER_MAX_RESPONSE_BYTES:-2097152}
|
|
3449
3427
|
AI_PROVIDER_MAX_DURATION_SECONDS: \${AI_PROVIDER_MAX_DURATION_SECONDS:-300}
|
|
3450
3428
|
AI_PROVIDER_MAX_INPUT_BYTES: \${AI_PROVIDER_MAX_INPUT_BYTES:-67108864}
|
|
@@ -3464,7 +3442,6 @@ ${starterServerBuild}
|
|
|
3464
3442
|
condition: service_completed_successfully
|
|
3465
3443
|
server:
|
|
3466
3444
|
condition: service_started
|
|
3467
|
-
|
|
3468
3445
|
document-server:
|
|
3469
3446
|
profiles: ["document"]
|
|
3470
3447
|
build:
|
|
@@ -3561,122 +3538,268 @@ ${starterServerBuild}
|
|
|
3561
3538
|
condition: service_started
|
|
3562
3539
|
|
|
3563
3540
|
`;
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3541
|
+
|
|
3542
|
+
// src/runtime-profile-opensearch.ts
|
|
3543
|
+
var openSearchComposeService = ` opensearch:
|
|
3544
|
+
profiles: ["search"]
|
|
3545
|
+
image: opensearchproject/opensearch:2.19.3
|
|
3546
|
+
environment:
|
|
3547
|
+
discovery.type: single-node
|
|
3548
|
+
DISABLE_INSTALL_DEMO_CONFIG: "true"
|
|
3549
|
+
DISABLE_SECURITY_PLUGIN: "true"
|
|
3550
|
+
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m"
|
|
3551
|
+
ports:
|
|
3552
|
+
- "127.0.0.1:19200:9200"
|
|
3553
|
+
volumes:
|
|
3554
|
+
- opensearch-data:/usr/share/opensearch/data
|
|
3555
|
+
healthcheck:
|
|
3556
|
+
test:
|
|
3557
|
+
[
|
|
3558
|
+
"CMD-SHELL",
|
|
3559
|
+
"curl -fsS http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow",
|
|
3560
|
+
]
|
|
3561
|
+
interval: 10s
|
|
3562
|
+
timeout: 5s
|
|
3563
|
+
retries: 12
|
|
3564
|
+
|
|
3565
|
+
`;
|
|
3566
|
+
|
|
3567
|
+
// src/runtime-profile-files.ts
|
|
3568
|
+
var starterComposeBase = `services:
|
|
3569
|
+
postgres:
|
|
3570
|
+
image: pgvector/pgvector:pg18
|
|
3571
|
+
environment:
|
|
3572
|
+
POSTGRES_DB: windy
|
|
3573
|
+
POSTGRES_USER: windy
|
|
3574
|
+
POSTGRES_PASSWORD: \${POSTGRES_PASSWORD:?\u8BF7\u5728 .env \u4E2D\u8BBE\u7F6E POSTGRES_PASSWORD}
|
|
3575
|
+
ports:
|
|
3576
|
+
- "15432:5432"
|
|
3577
|
+
volumes:
|
|
3578
|
+
- postgres18-data:/var/lib/postgresql
|
|
3579
|
+
healthcheck:
|
|
3580
|
+
test: ["CMD-SHELL", "pg_isready -U windy -d windy"]
|
|
3581
|
+
interval: 10s
|
|
3582
|
+
timeout: 5s
|
|
3583
|
+
retries: 5
|
|
3584
|
+
|
|
3585
|
+
migrate:
|
|
3586
|
+
${starterServerBuild}
|
|
3587
|
+
command: ["bun", "run", "db:migrate"]
|
|
3588
|
+
environment:
|
|
3589
|
+
DATABASE_URL: postgresql://windy:\${POSTGRES_PASSWORD}@postgres:5432/windy
|
|
3590
|
+
volumes:
|
|
3591
|
+
- ./packages:/app/packages
|
|
3592
|
+
depends_on:
|
|
3593
|
+
postgres:
|
|
3594
|
+
condition: service_healthy
|
|
3595
|
+
|
|
3596
|
+
server:
|
|
3597
|
+
${starterServerBuild}
|
|
3598
|
+
command: ["bun", "run", "--cwd", "apps/server", "dev"]
|
|
3599
|
+
environment:
|
|
3600
|
+
NODE_ENV: development
|
|
3601
|
+
PORT: 9747
|
|
3602
|
+
DATABASE_URL: postgresql://windy:\${POSTGRES_PASSWORD}@postgres:5432/windy
|
|
3603
|
+
WINDY_BOOTSTRAP_ADMIN_PASSWORD: \${WINDY_BOOTSTRAP_ADMIN_PASSWORD:?\u8BF7\u5728 .env \u4E2D\u8BBE\u7F6E\u7BA1\u7406\u5458\u521D\u59CB\u5BC6\u7801}
|
|
3604
|
+
WINDY_AUDIT_QUEUE_FILE: /app/data/audit/recovery-queue.json
|
|
3605
|
+
__STORAGE_SERVER_ENV__
|
|
3606
|
+
WINDY_CONTAINERIZED: "1"
|
|
3607
|
+
BUN_CONFIG_NO_CLEAR_TERMINAL_ON_RELOAD: "true"
|
|
3608
|
+
WINDY_SYSTEM_USAGE_PATHS: /app/data/audit
|
|
3609
|
+
PLATFORM_ENABLE_AI: \${PLATFORM_ENABLE_AI:-false}
|
|
3610
|
+
AGENT_SERVER_URL: http://agent-server:8080
|
|
3611
|
+
WINDY_PUBLIC_BASE_URL: "\${WINDY_PUBLIC_BASE_URL:-}"
|
|
3612
|
+
AGENT_TOOL_HOST_URL: http://server:9747
|
|
3613
|
+
__TOOL_SANDBOX_SERVER_ENV__
|
|
3614
|
+
AGENT_SERVER_INTERNAL_TOKEN: \${AGENT_SERVER_INTERNAL_TOKEN:-}
|
|
3615
|
+
__AGENT_WORKFLOW_SERVER_ENV__
|
|
3616
|
+
AI_ARTIFACT_URL: http://server:9747/api/internal/ai/artifacts
|
|
3617
|
+
AI_ARTIFACT_ENCRYPTION_SECRET: \${AI_ARTIFACT_ENCRYPTION_SECRET:-}
|
|
3618
|
+
DOCUMENT_SERVER_URL: \${DOCUMENT_SERVER_URL:-}
|
|
3619
|
+
AI_OUTPUT_ARTIFACT_REFERENCE_SECRET: \${AI_OUTPUT_ARTIFACT_REFERENCE_SECRET:-}
|
|
3620
|
+
DOCUMENT_OUTPUT_ARTIFACT_SINK_IDENTITY: \${DOCUMENT_OUTPUT_ARTIFACT_SINK_IDENTITY:-}
|
|
3621
|
+
DOCUMENT_OUTPUT_ARTIFACT_SINK_RELEASE_DIGEST: \${DOCUMENT_OUTPUT_ARTIFACT_SINK_RELEASE_DIGEST:-}
|
|
3622
|
+
SPEECH_SERVER_URL: \${SPEECH_SERVER_URL:-}
|
|
3623
|
+
EMBEDDING_SERVER_URL: \${EMBEDDING_SERVER_URL:-}
|
|
3624
|
+
__OPENSEARCH_SERVER_ENV__
|
|
3625
|
+
ports:
|
|
3626
|
+
- "9747:9747"
|
|
3627
|
+
volumes:
|
|
3628
|
+
- ./apps/server:/app/apps/server
|
|
3629
|
+
- ./packages:/app/packages
|
|
3630
|
+
- server-audit-data:/app/data/audit
|
|
3631
|
+
__STORAGE_SERVER_VOLUME__
|
|
3632
|
+
__TOOL_SANDBOX_SERVER_VOLUME__
|
|
3633
|
+
depends_on:
|
|
3634
|
+
migrate:
|
|
3635
|
+
condition: service_completed_successfully
|
|
3636
|
+
|
|
3637
|
+
__OPENSEARCH_SERVICE__
|
|
3638
|
+
web:
|
|
3639
|
+
build:
|
|
3640
|
+
context: .
|
|
3641
|
+
dockerfile: apps/web/Dockerfile
|
|
3642
|
+
command: ["bun", "run", "--cwd", "apps/web", "dev"]
|
|
3643
|
+
environment:
|
|
3644
|
+
NODE_ENV: development
|
|
3645
|
+
WINDY_DEV_PORT: 18746
|
|
3646
|
+
WINDY_DEV_USE_POLLING: "1"
|
|
3647
|
+
API_UPSTREAM: http://server:9747
|
|
3648
|
+
VITE_DEV_HOST: 0.0.0.0
|
|
3649
|
+
ports:
|
|
3650
|
+
- "18746:18746"
|
|
3651
|
+
volumes:
|
|
3652
|
+
- ./apps/web:/app/apps/web
|
|
3653
|
+
- ./packages:/app/packages
|
|
3654
|
+
healthcheck:
|
|
3655
|
+
test:
|
|
3656
|
+
[
|
|
3657
|
+
"CMD",
|
|
3658
|
+
"bun",
|
|
3659
|
+
"-e",
|
|
3660
|
+
"const r=await fetch('http://127.0.0.1:18746/-/windy-dev');process.exit(r.ok?0:1)",
|
|
3661
|
+
]
|
|
3662
|
+
interval: 5s
|
|
3663
|
+
timeout: 3s
|
|
3664
|
+
retries: 6
|
|
3665
|
+
depends_on:
|
|
3666
|
+
- server
|
|
3667
|
+
|
|
3668
|
+
volumes:
|
|
3669
|
+
postgres18-data:
|
|
3670
|
+
server-audit-data:
|
|
3671
|
+
__OPTIONAL_VOLUMES__
|
|
3672
|
+
`;
|
|
3673
|
+
function starterComposeFor(includeAgent, includeSearch = true, includeStorage = true) {
|
|
3674
|
+
return starterComposeBase.replace(` web:
|
|
3675
|
+
`, `${includeAgent ? agentComposeService : ""} web:
|
|
3676
|
+
`).replace("__TOOL_SANDBOX_SERVER_ENV__", includeAgent ? " TOOL_SANDBOX_SOCKET: /run/windy-tool-sandbox/worker.sock" : "").replace("__AGENT_WORKFLOW_SERVER_ENV__", agentWorkflowServerEnvironment(includeAgent)).replace("__TOOL_SANDBOX_SERVER_VOLUME__", includeAgent ? " - tool-sandbox-ipc:/run/windy-tool-sandbox" : "").replace("__STORAGE_SERVER_ENV__", includeStorage ? " WINDY_STORAGE_ROOT: /app/data/storage" : "").replace("__STORAGE_SERVER_VOLUME__", includeStorage ? " - server-storage-data:/app/data/storage" : "").replace("__OPENSEARCH_SERVER_ENV__", includeSearch ? ` OPENSEARCH_URL: \${OPENSEARCH_URL:-}
|
|
3677
|
+
OPENSEARCH_USERNAME: \${OPENSEARCH_USERNAME:-}
|
|
3678
|
+
OPENSEARCH_PASSWORD: \${OPENSEARCH_PASSWORD:-}
|
|
3679
|
+
OPENSEARCH_WORK_ORDER_INDEX: \${OPENSEARCH_WORK_ORDER_INDEX:-windy-work-orders-v1}` : "").replace("__OPENSEARCH_SERVICE__", includeSearch ? openSearchComposeService : "").replace("__OPTIONAL_VOLUMES__", optionalComposeVolumes(includeAgent, includeSearch, includeStorage));
|
|
3680
|
+
}
|
|
3681
|
+
var starterCompose = starterComposeFor(true);
|
|
3682
|
+
// src/runtime-environment-example.ts
|
|
3683
|
+
function environmentExample(includeExample, includeAgent = true, includeSearch = true, includeStorage = true) {
|
|
3684
|
+
return `# \u590D\u5236\u4E3A .env \u540E\u586B\u5199\u3002\u4E0D\u8981\u63D0\u4EA4\u771F\u5B9E\u5BC6\u7801\u3002
|
|
3685
|
+
POSTGRES_PASSWORD=
|
|
3686
|
+
WINDY_BOOTSTRAP_ADMIN_PASSWORD=
|
|
3687
|
+
${includeStorage ? `
|
|
3688
|
+
# Compose \u9ED8\u8BA4\u628A Storage \u4E0E\u62A5\u544A\u6682\u5B58\u6301\u4E45\u5316\u5230 /app/data/storage\u3002
|
|
3689
|
+
# \u5982\u9700\u72EC\u7ACB\u6302\u8F7D\u62A5\u544A\u6682\u5B58\u76EE\u5F55\uFF0C\u8BF7\u540C\u65F6\u4FEE\u6539 Compose volume\u3002
|
|
3690
|
+
# WINDY_REPORT_STAGING_ROOT=/app/data/storage/report-staging
|
|
3691
|
+
` : ""}
|
|
3692
|
+
${includeAgent ? `
|
|
3693
|
+
# Agent profile \u4EC5\u7531\u670D\u52A1\u7AEF Agent Runtime \u8BFB\u53D6\uFF1B\u4E0D\u8981\u4F7F\u7528 VITE_ \u524D\u7F00\u3002
|
|
3694
|
+
PLATFORM_ENABLE_AI=false
|
|
3695
|
+
AGENT_SERVER_INTERNAL_TOKEN=
|
|
3696
|
+
AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET=
|
|
3697
|
+
# Model \u8282\u70B9\u542F\u7528\u524D\u5FC5\u987B\u586B\u5165\u7531\u8FD0\u7EF4\u51BB\u7ED3\u7684 deployment/model \u4EF7\u683C\u76EE\u5F55\uFF1B\u7F3A\u5931\u65F6 readiness \u660E\u786E unavailable\u3002
|
|
3698
|
+
WINDY_AGENT_WORKFLOW_MODEL_PRICING_JSON=
|
|
3699
|
+
# \u975E Compose \u90E8\u7F72\u9700\u6307\u5411 Windy Server\uFF1B\u957F\u671F Session \u7684\u6A21\u578B\u8C03\u7528\u4F1A fail closed\u3002
|
|
3700
|
+
# AGENT_CONTEXT_HOST_URL=http://server:9747
|
|
3701
|
+
# DSH \u534F\u8C03\u5668\u5F53\u524D\u4EC5\u652F\u6301\u5355\u526F\u672C\uFF1B\u4F7F\u7528\u65B0\u7684Agent\u4E13\u7528\u76EE\u5F55\uFF0C\u4E0D\u8BFB\u53D6\u65E7Python\u8FD0\u884C\u5E93\u3002
|
|
3702
|
+
# AGENT_RUNTIME_DATABASE_PATH=/app/data/agent/embedded-dsh.sqlite
|
|
3703
|
+
# AGENT_DSH_HOME=/app/data/agent/dsh
|
|
3704
|
+
AGENT_DSH_USER_EXTENSIONS=1
|
|
3705
|
+
# AGENT_DSH_MAX_USERS=2
|
|
3706
|
+
# AGENT_DSH_MAX_ACTIVE_RUNS=2
|
|
3707
|
+
# AGENT_DSH_WORKSPACE_MAX_BYTES=536870912
|
|
3708
|
+
# AGENT_SERVER_MEMORY_LIMIT=4g
|
|
3709
|
+
# AGENT_SERVER_CPU_LIMIT=2
|
|
3710
|
+
# \u6784\u5EFA\u671F\u955C\u50CF\u6E90\u4ECD\u9700\u7B26\u5408\u9501\u6587\u4EF6\u7684hash\uFF1B\u8FD0\u884C\u65F6\u4E0D\u4E0B\u8F7D\u539F\u751F\u4F9D\u8D56\u3002
|
|
3711
|
+
# WINDY_AGENT_NATIVE_REGISTRY=https://registry.npmjs.org
|
|
3712
|
+
# WINDY_PYPI_INDEX_URL=https://pypi.org/simple
|
|
3713
|
+
AI_ARTIFACT_ENCRYPTION_SECRET=
|
|
3714
|
+
# \u5F00\u53D1\u7559\u7A7A\u65F6\u5DE5\u4F5C\u53F0\u8DDF\u968F\u6D4F\u89C8\u5668\u540C\u6E90 Host\uFF0C\u652F\u6301 Web \u7AEF\u53E3\u548C\u52A8\u6001\u5C40\u57DF\u7F51\u5730\u5740\u3002
|
|
3715
|
+
# HTTPS \u53CD\u5411\u4EE3\u7406\u6216\u751F\u4EA7 Client Agent Session \u5FC5\u987B\u586B\u5199\u7528\u6237\u5B9E\u9645\u8BBF\u95EE\u7684 Web origin\u3002
|
|
3716
|
+
# WINDY_PUBLIC_BASE_URL=https://windy.example
|
|
3717
|
+
WINDY_PUBLIC_BASE_URL=
|
|
3718
|
+
DOCUMENT_SERVER_URL=
|
|
3719
|
+
DOCUMENT_ARTIFACT_URL=
|
|
3720
|
+
DOCUMENT_OUTPUT_ARTIFACT_URL=
|
|
3721
|
+
DOCUMENT_ADAPTER_URL=
|
|
3722
|
+
DOCUMENT_ADAPTER_TOKEN=
|
|
3723
|
+
DOCUMENT_DEPLOYMENT_KEY=
|
|
3724
|
+
DOCUMENT_DEPLOYMENT_IDENTITY=
|
|
3725
|
+
DOCUMENT_RELEASE_DIGEST=
|
|
3726
|
+
DOCUMENT_OFFERS_DIGEST=
|
|
3727
|
+
AI_OUTPUT_ARTIFACT_REFERENCE_SECRET=
|
|
3728
|
+
DOCUMENT_OUTPUT_ARTIFACT_SINK_IDENTITY=
|
|
3729
|
+
DOCUMENT_OUTPUT_ARTIFACT_SINK_RELEASE_DIGEST=
|
|
3730
|
+
# DOCUMENT_ADAPTER_CAPABILITIES=document.ocr,document.layout,document.table
|
|
3731
|
+
# DOCUMENT_MAX_UNITS=500
|
|
3732
|
+
SPEECH_SERVER_URL=
|
|
3733
|
+
SPEECH_ARTIFACT_URL=
|
|
3734
|
+
SPEECH_OUTPUT_ARTIFACT_URL=
|
|
3735
|
+
SPEECH_ADAPTER_URL=
|
|
3736
|
+
SPEECH_ADAPTER_TOKEN=
|
|
3737
|
+
SPEECH_DEPLOYMENT_KEY=
|
|
3738
|
+
SPEECH_DEPLOYMENT_IDENTITY=
|
|
3739
|
+
SPEECH_RELEASE_DIGEST=
|
|
3740
|
+
SPEECH_OFFERS_DIGEST=
|
|
3741
|
+
# SPEECH_ADAPTER_CAPABILITIES=speech.transcribe.batch,speech.translate,speech.vad,speech.timestamps
|
|
3742
|
+
# SPEECH_MAX_UNITS=100000
|
|
3743
|
+
# SPEECH_MAX_MEDIA_DURATION_SECONDS=86400
|
|
3744
|
+
# SPEECH_MAX_INPUT_ARTIFACT_BYTES=2147483648
|
|
3745
|
+
# SPEECH_MAX_INLINE_OUTPUT_BYTES=67108864
|
|
3746
|
+
# SPEECH_MAX_OUTPUT_ARTIFACT_BYTES=536870912
|
|
3747
|
+
# SPEECH_MAX_CONCURRENT_RUNS=1
|
|
3748
|
+
# SPEECH_MAX_QUEUE_DEPTH=0
|
|
3749
|
+
# SPEECH_READINESS_TIMEOUT_SECONDS=5
|
|
3750
|
+
# SPEECH_READINESS_TTL_SECONDS=60
|
|
3751
|
+
EMBEDDING_SERVER_URL=
|
|
3752
|
+
EMBEDDING_ARTIFACT_URL=
|
|
3753
|
+
EMBEDDING_RUN_ARTIFACT_URL=
|
|
3754
|
+
EMBEDDING_ADAPTER_URL=
|
|
3755
|
+
EMBEDDING_ADAPTER_TOKEN=
|
|
3756
|
+
EMBEDDING_DEPLOYMENT_KEY=
|
|
3757
|
+
EMBEDDING_DEPLOYMENT_IDENTITY=
|
|
3758
|
+
EMBEDDING_RELEASE_DIGEST=
|
|
3759
|
+
EMBEDDING_OFFERS_DIGEST=
|
|
3760
|
+
EMBEDDING_DEPLOYMENT_ALIAS=
|
|
3761
|
+
EMBEDDING_MODEL=
|
|
3762
|
+
EMBEDDING_MODEL_VERSION=
|
|
3763
|
+
EMBEDDING_DIMENSIONS=
|
|
3764
|
+
# EMBEDDING_NORMALIZED=true
|
|
3765
|
+
# EMBEDDING_CAPABILITIES=embedding.text,embedding.image
|
|
3766
|
+
# EMBEDDING_MAX_UNITS=256
|
|
3767
|
+
# EMBEDDING_MAX_DURATION_SECONDS=600
|
|
3768
|
+
# EMBEDDING_MAX_INPUT_BYTES=268435456
|
|
3769
|
+
# EMBEDDING_MAX_OUTPUT_BYTES=268435456
|
|
3770
|
+
# EMBEDDING_MAX_ARTIFACTS=16
|
|
3771
|
+
# EMBEDDING_MAX_PIXELS_PER_ARTIFACT=100000000
|
|
3772
|
+
EMBEDDING_RUN_ENCRYPTION_SECRET=
|
|
3773
|
+
# EMBEDDING_MAX_CONCURRENT_RUNS=1
|
|
3774
|
+
# EMBEDDING_MAX_QUEUE_DEPTH=0
|
|
3775
|
+
# EMBEDDING_READINESS_TIMEOUT_SECONDS=5
|
|
3776
|
+
# EMBEDDING_READINESS_TTL_SECONDS=60
|
|
3777
|
+
# EMBEDDING_RUN_TERMINAL_TTL_SECONDS=604800
|
|
3778
|
+
QWEN_API_URL=
|
|
3779
|
+
QWEN_API_KEY=
|
|
3780
|
+
QWEN_MODEL=
|
|
3781
|
+
# QWEN_STRUCTURED_OUTPUT_MODE=json_schema
|
|
3782
|
+
AI_PROVIDER_HTTPS_HOST_ALLOWLIST=
|
|
3783
|
+
# VLM Deployment \u793A\u4F8B\uFF1Atext-generation,vision\uFF1B\u8F93\u5165\u6A21\u6001\uFF1Atext,image
|
|
3784
|
+
# AI_PROVIDER_CAPABILITIES=text-generation
|
|
3785
|
+
# AI_PROVIDER_INPUT_MODALITIES=text
|
|
3786
|
+
# AI_PROVIDER_DEPLOYMENT_IDENTITY=
|
|
3787
|
+
# AI_PROVIDER_RELEASE_DIGEST=
|
|
3788
|
+
# AI_PROVIDER_READINESS_TTL_SECONDS=60
|
|
3789
|
+
# AI_PROVIDER_MAX_CONCURRENT_RUNS=1
|
|
3790
|
+
# AI_PROVIDER_MAX_QUEUE_DEPTH=0
|
|
3791
|
+
# AI_PROVIDER_AUDIT_RETENTION_DAYS=90
|
|
3792
|
+
# AI_PROVIDER_CONTEXT_TOKENS=
|
|
3793
|
+
# AI_PROVIDER_OUTPUT_RESERVE_TOKENS=4096
|
|
3794
|
+
# AI_PROVIDER_CONTEXT_SAFETY_TOKENS=512
|
|
3795
|
+
# AI_PROVIDER_TOKENIZE_PATH=
|
|
3796
|
+
# AI_PROVIDER_REQUEST_TIMEOUT_MS=60000
|
|
3797
|
+
# AI_PROVIDER_MAX_RESPONSE_BYTES=2097152
|
|
3798
|
+
# AI_PROVIDER_MAX_DURATION_SECONDS=300
|
|
3799
|
+
# AI_PROVIDER_MAX_INPUT_BYTES=67108864
|
|
3800
|
+
# AI_PROVIDER_MAX_ARTIFACTS=16
|
|
3801
|
+
# AI_PROVIDER_MAX_PIXELS_PER_ARTIFACT=100000000
|
|
3802
|
+
` : ""}
|
|
3680
3803
|
|
|
3681
3804
|
${includeSearch ? `# OpenSearch profile \u9ED8\u8BA4\u4E0D\u542F\u52A8\uFF1Bbun run dev:search \u4F1A\u53EA\u5411 Server \u6CE8\u5165\u5BB9\u5668\u5185\u5730\u5740\u3002
|
|
3682
3805
|
OPENSEARCH_URL=
|
|
@@ -3793,7 +3916,7 @@ bun run dev:server
|
|
|
3793
3916
|
|
|
3794
3917
|
${starterMcpAndSkillGuidance(includeAgent)}
|
|
3795
3918
|
${includeAgent ? `
|
|
3796
|
-
##
|
|
3919
|
+
## DSH Agent profile
|
|
3797
3920
|
|
|
3798
3921
|
Agent Runtime \u9ED8\u8BA4\u4E0D\u542F\u52A8\u3002\u5148\u5728\u4EC5\u4F9B\u672C\u673A\u4F7F\u7528\u7684 \`.env\` \u4E2D\u8BBE\u7F6E
|
|
3799
3922
|
\`PLATFORM_ENABLE_AI=true\`\u3001\`AGENT_SERVER_INTERNAL_TOKEN\`\u3001\`QWEN_API_URL\`\u3001
|
|
@@ -3807,7 +3930,10 @@ bun run dev:agent
|
|
|
3807
3930
|
\`QWEN_API_KEY\`\u3001Endpoint \u548C Host allowlist \u53EA\u8FDB\u5165 Agent Server\uFF0C\u4E0D\u4F1A\u8FDB\u5165 Web
|
|
3808
3931
|
\u73AF\u5883\u6216\u8FD4\u56DE\u7ED9\u5BA2\u6237\u7AEF\u3002\u516C\u7F51 HTTPS Endpoint \u7684\u4E3B\u673A\u5FC5\u987B\u663E\u5F0F\u52A0\u5165
|
|
3809
3932
|
\`AI_PROVIDER_HTTPS_HOST_ALLOWLIST\`\u3002\u8FD0\u884C\u4E0E\u6A21\u5757
|
|
3810
|
-
\u63A5\u5165\u7EC6\u8282\u89C1 [Agent Runtime \u63A5\u5165](./docs/platform/agent-runtime.md)\
|
|
3933
|
+
\u63A5\u5165\u7EC6\u8282\u89C1 [Agent Runtime \u63A5\u5165](./docs/platform/agent-runtime.md)\u53CA
|
|
3934
|
+
[DSH \u90E8\u7F72\u4E0E\u8FC1\u79FB](./docs/operations/dsh-agent-migration.md)\u3002Agent Server \u4EE5 Node 24.7+
|
|
3935
|
+
\u6267\u884C\uFF0C\u4F7F\u7528\u65B0 SQLite \u6570\u636E\u8DEF\u5F84\uFF1B\u539F\u751F\u5DE5\u4F5C\u53F0\u9700\u8981 Linux \u9694\u79BB\u80FD\u529B\u3002\u5168\u5C40\u5BB9\u91CF\u9ED8\u8BA4 1 \u65F6\u4E3A\u65E2\u6709
|
|
3936
|
+
\u8C03\u7528\u94FE\u9884\u7559\uFF0C\u5DE5\u4F5C\u53F0\u4F1A\u660E\u786E\u663E\u793A\u5BB9\u91CF\u672A\u5F00\u653E\u3002\u4E2A\u4EBA\u6269\u5C55\u9ED8\u8BA4\u5F00\u653E\uFF0C\u7531\u90E8\u7F72\u5F00\u5173\u63A7\u5236\u3002
|
|
3811
3937
|
|
|
3812
3938
|
Document Runtime \u540C\u6837\u9ED8\u8BA4\u5173\u95ED\u3002\u914D\u7F6E\u81F3\u5C11 32 \u5B57\u7B26\u7684
|
|
3813
3939
|
\`AI_ARTIFACT_ENCRYPTION_SECRET\`\u3001\u672C\u5730\u6216\u5185\u7F51 \`DOCUMENT_ADAPTER_URL\` \u53CA\u5176
|
|
@@ -4003,7 +4129,7 @@ function createStarterPackage(source, projectName, includeOxc = true, projectLic
|
|
|
4003
4129
|
private: true,
|
|
4004
4130
|
license: projectLicense,
|
|
4005
4131
|
packageManager: "bun@1.3.14",
|
|
4006
|
-
engines: { ...source.engines, bun: ">=1.3.14" },
|
|
4132
|
+
engines: { ...source.engines, bun: ">=1.3.14", node: ">=24.7.0" },
|
|
4007
4133
|
...includeOxc ? { "lint-staged": sourceLintStaged ?? defaultLintStaged } : {},
|
|
4008
4134
|
scripts: {
|
|
4009
4135
|
...includeOxc ? {
|
|
@@ -4016,20 +4142,23 @@ function createStarterPackage(source, projectName, includeOxc = true, projectLic
|
|
|
4016
4142
|
"dev:search": "OPENSEARCH_URL=http://opensearch:9200 docker compose --profile search up --build"
|
|
4017
4143
|
} : {},
|
|
4018
4144
|
...selectedModules.includes("system.agent") ? {
|
|
4019
|
-
"dev:agent": "docker compose --profile agent up --build",
|
|
4145
|
+
"dev:agent": "bun run docker:sync && docker compose --profile agent up --build",
|
|
4146
|
+
"check:agent": "bun run --cwd apps/agent-server typecheck",
|
|
4147
|
+
"test:agent": "bun run --cwd apps/agent-server test",
|
|
4020
4148
|
"dev:speech": "PLATFORM_ENABLE_AI=true SPEECH_SERVER_URL=http://speech-server:8091 docker compose --profile agent --profile speech up --build",
|
|
4021
4149
|
"speech:pins": "bun run scripts/provision-speech-readiness.ts"
|
|
4022
4150
|
} : {},
|
|
4023
4151
|
...generatorVersion ? { windy: "create-windy" } : {},
|
|
4024
4152
|
"dev:web": "bun run --cwd apps/web dev",
|
|
4025
4153
|
"dev:server": "bun run --cwd apps/server dev",
|
|
4026
|
-
build: "bun run --cwd apps/web build",
|
|
4154
|
+
build: selectedModules.includes("system.agent") ? "bun run --cwd apps/agent-server build && bun run --cwd apps/web build" : "bun run --cwd apps/web build",
|
|
4027
4155
|
"db:generate": "drizzle-kit generate --config drizzle.config.ts",
|
|
4028
4156
|
"db:migrate": "drizzle-kit migrate --config drizzle.config.ts",
|
|
4029
4157
|
"generate:crud": "bun run packages/crud-generator/src/cli.ts",
|
|
4030
4158
|
typecheck: [
|
|
4031
4159
|
"bun run --cwd apps/web typecheck",
|
|
4032
4160
|
"bun run --cwd apps/server typecheck",
|
|
4161
|
+
...selectedModules.includes("system.agent") ? ["bun run --cwd apps/agent-server typecheck"] : [],
|
|
4033
4162
|
"bun run --cwd packages/ai-client typecheck",
|
|
4034
4163
|
"bun run --cwd packages/jobs typecheck",
|
|
4035
4164
|
"bun run --cwd packages/shared typecheck",
|
|
@@ -4043,7 +4172,7 @@ function createStarterPackage(source, projectName, includeOxc = true, projectLic
|
|
|
4043
4172
|
format: "oxfmt",
|
|
4044
4173
|
"format:staged": "lint-staged"
|
|
4045
4174
|
} : {},
|
|
4046
|
-
test: "bun test && bun run --cwd apps/web test"
|
|
4175
|
+
test: "bun test && bun run --cwd apps/web test" + (selectedModules.includes("system.agent") ? " && bun run test:agent" : "")
|
|
4047
4176
|
},
|
|
4048
4177
|
devDependencies: {
|
|
4049
4178
|
...migrationCliDependencies,
|
|
@@ -4075,6 +4204,7 @@ var templateDirectories = [
|
|
|
4075
4204
|
".agents/skills/windy-business-module",
|
|
4076
4205
|
"apps/server",
|
|
4077
4206
|
"apps/agent-server",
|
|
4207
|
+
"deploy/dsh",
|
|
4078
4208
|
"apps/document-server",
|
|
4079
4209
|
"apps/speech-server",
|
|
4080
4210
|
"apps/embedding-server",
|
|
@@ -4095,8 +4225,15 @@ var templateDirectories = [
|
|
|
4095
4225
|
var templateDocumentationFiles = [
|
|
4096
4226
|
"docs/operations/legacy-data-migration.md",
|
|
4097
4227
|
"docs/adr/0003-agent-session-event-source.md",
|
|
4228
|
+
"docs/adr/0004-embedded-dsh-runtime.md",
|
|
4098
4229
|
"docs/architecture/admin-surface-boundary.md",
|
|
4099
4230
|
"docs/architecture/agent-harness.md",
|
|
4231
|
+
"docs/architecture/agent-admin-workbench-plan.md",
|
|
4232
|
+
"docs/architecture/agent-admin-workbench-implementation.md",
|
|
4233
|
+
"docs/architecture/embedded-dsh-integration.md",
|
|
4234
|
+
"docs/platform/agent-skills.md",
|
|
4235
|
+
"docs/operations/dsh-agent-migration.md",
|
|
4236
|
+
"docs/development/dsh-plugins.md",
|
|
4100
4237
|
"docs/architecture/agent-runtime-compatibility.md",
|
|
4101
4238
|
"docs/architecture/agent-workflow.md",
|
|
4102
4239
|
"docs/architecture/ai-egress.md",
|
|
@@ -6416,62 +6553,8 @@ function sentenceWithoutStop(value) {
|
|
|
6416
6553
|
import { rm as rm10 } from "fs/promises";
|
|
6417
6554
|
import { resolve as resolve8 } from "path";
|
|
6418
6555
|
|
|
6419
|
-
// src/update/
|
|
6420
|
-
import {
|
|
6421
|
-
import { join as join17 } from "path";
|
|
6422
|
-
|
|
6423
|
-
// src/update/process.ts
|
|
6424
|
-
import { spawn as spawn2 } from "child_process";
|
|
6425
|
-
var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
6426
|
-
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
6427
|
-
"GIT_CONFIG",
|
|
6428
|
-
"GIT_CONFIG_PARAMETERS",
|
|
6429
|
-
"GIT_CONFIG_COUNT",
|
|
6430
|
-
"GIT_OBJECT_DIRECTORY",
|
|
6431
|
-
"GIT_DIR",
|
|
6432
|
-
"GIT_WORK_TREE",
|
|
6433
|
-
"GIT_IMPLICIT_WORK_TREE",
|
|
6434
|
-
"GIT_GRAFT_FILE",
|
|
6435
|
-
"GIT_INDEX_FILE",
|
|
6436
|
-
"GIT_NO_REPLACE_OBJECTS",
|
|
6437
|
-
"GIT_REPLACE_REF_BASE",
|
|
6438
|
-
"GIT_PREFIX",
|
|
6439
|
-
"GIT_SHALLOW_FILE",
|
|
6440
|
-
"GIT_COMMON_DIR"
|
|
6441
|
-
];
|
|
6442
|
-
async function captureProcess(command, args, cwd, inherit = false) {
|
|
6443
|
-
return await new Promise((resolve6, reject) => {
|
|
6444
|
-
const child = spawn2(command, args, {
|
|
6445
|
-
cwd,
|
|
6446
|
-
env: withoutParentGitRepository(process.env),
|
|
6447
|
-
stdio: inherit ? "inherit" : ["ignore", "pipe", "pipe"]
|
|
6448
|
-
});
|
|
6449
|
-
let stdout2 = "";
|
|
6450
|
-
let stderr = "";
|
|
6451
|
-
child.stdout?.on("data", (chunk) => stdout2 += chunk.toString());
|
|
6452
|
-
child.stderr?.on("data", (chunk) => stderr += chunk.toString());
|
|
6453
|
-
child.once("error", reject);
|
|
6454
|
-
child.once("close", (code) => resolve6({ code: code ?? 1, stdout: stdout2, stderr }));
|
|
6455
|
-
});
|
|
6456
|
-
}
|
|
6457
|
-
async function assertProcess(command, args, cwd, inherit = false) {
|
|
6458
|
-
const result = await captureProcess(command, args, cwd, inherit);
|
|
6459
|
-
if (result.code !== 0) {
|
|
6460
|
-
const detail = result.stderr.trim() || result.stdout.trim();
|
|
6461
|
-
throw new Error(`${command} ${args.join(" ")} \u6267\u884C\u5931\u8D25${detail ? `\uFF1A${detail}` : ""}`);
|
|
6462
|
-
}
|
|
6463
|
-
return result;
|
|
6464
|
-
}
|
|
6465
|
-
function withoutParentGitRepository(source) {
|
|
6466
|
-
const environment = { ...source };
|
|
6467
|
-
for (const key of LOCAL_GIT_ENVIRONMENT_VARIABLES) {
|
|
6468
|
-
delete environment[key];
|
|
6469
|
-
}
|
|
6470
|
-
return environment;
|
|
6471
|
-
}
|
|
6472
|
-
|
|
6473
|
-
// src/update/transaction-cas.ts
|
|
6474
|
-
import { basename as basename8, dirname as dirname7 } from "path";
|
|
6556
|
+
// src/update/transaction-cas.ts
|
|
6557
|
+
import { basename as basename8, dirname as dirname7 } from "path";
|
|
6475
6558
|
|
|
6476
6559
|
// src/update/transaction-native-cas.ts
|
|
6477
6560
|
import { ptr as ptr3, read as read3, dlopen as dlopen4, FFIType as FFIType4 } from "bun:ffi";
|
|
@@ -8318,6 +8401,105 @@ async function applyTransaction(plan) {
|
|
|
8318
8401
|
};
|
|
8319
8402
|
}
|
|
8320
8403
|
|
|
8404
|
+
// src/update/sync-docker-command.ts
|
|
8405
|
+
async function synchronizeDockerfiles(projectDirectory) {
|
|
8406
|
+
const workspace = await snapshotWorkspacePackages(projectDirectory);
|
|
8407
|
+
const targets = dockerfileCopyTargets.filter((target) => target.entryDirectory !== "apps/agent-server" || workspace.packages.some(({ directory }) => directory === target.entryDirectory));
|
|
8408
|
+
const plans = await Promise.all(targets.map((target) => planDockerfileInProject(projectDirectory, target, {
|
|
8409
|
+
requireAnchors: true
|
|
8410
|
+
}).then((result) => ({ target, result }))));
|
|
8411
|
+
if (plans.some(({ result }) => !result.synced)) {
|
|
8412
|
+
throw new Error("\u9879\u76EE\u7F3A\u5C11\u53D7\u652F\u6301\u7684 Dockerfile\uFF0C\u65E0\u6CD5\u540C\u6B65 COPY \u6E05\u5355");
|
|
8413
|
+
}
|
|
8414
|
+
const changed = plans.filter(({ result }) => result.changed && result.content !== undefined);
|
|
8415
|
+
if (changed.length) {
|
|
8416
|
+
const membershipExpectations = [
|
|
8417
|
+
...workspace.membershipExpectations,
|
|
8418
|
+
...plans.flatMap(({ result }) => result.membershipExpectations)
|
|
8419
|
+
];
|
|
8420
|
+
await assertWorkspaceMembership(projectDirectory, membershipExpectations);
|
|
8421
|
+
const state = await applyMetadataTransaction({
|
|
8422
|
+
id: `sync-docker-${Date.now()}`,
|
|
8423
|
+
projectDirectory,
|
|
8424
|
+
guards: [
|
|
8425
|
+
...workspace.expectations,
|
|
8426
|
+
...plans.flatMap(({ result }) => result.expectations)
|
|
8427
|
+
],
|
|
8428
|
+
writes: changed.map(({ target, result }) => ({
|
|
8429
|
+
path: target.dockerfilePath,
|
|
8430
|
+
content: result.content
|
|
8431
|
+
}))
|
|
8432
|
+
});
|
|
8433
|
+
await finalizeOwnedTransaction({
|
|
8434
|
+
projectDirectory,
|
|
8435
|
+
ownerToken: state.ownerToken,
|
|
8436
|
+
expectations: changed.map(({ target, result }) => ({
|
|
8437
|
+
path: target.dockerfilePath,
|
|
8438
|
+
expected: {
|
|
8439
|
+
kind: "hash",
|
|
8440
|
+
value: hashContent(result.content)
|
|
8441
|
+
}
|
|
8442
|
+
})),
|
|
8443
|
+
workspaceMembershipExpectations: membershipExpectations
|
|
8444
|
+
});
|
|
8445
|
+
}
|
|
8446
|
+
console.log(changed.length ? "\u5DF2\u540C\u6B65 Server \u4E0E Web Dockerfile workspace COPY \u6E05\u5355" : "Server \u4E0E Web Dockerfile workspace COPY \u6E05\u5355\u5DF2\u662F\u6700\u65B0");
|
|
8447
|
+
}
|
|
8448
|
+
|
|
8449
|
+
// src/update/doctor.ts
|
|
8450
|
+
import { readFile as readFile12 } from "fs/promises";
|
|
8451
|
+
import { join as join17 } from "path";
|
|
8452
|
+
|
|
8453
|
+
// src/update/process.ts
|
|
8454
|
+
import { spawn as spawn2 } from "child_process";
|
|
8455
|
+
var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
8456
|
+
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
8457
|
+
"GIT_CONFIG",
|
|
8458
|
+
"GIT_CONFIG_PARAMETERS",
|
|
8459
|
+
"GIT_CONFIG_COUNT",
|
|
8460
|
+
"GIT_OBJECT_DIRECTORY",
|
|
8461
|
+
"GIT_DIR",
|
|
8462
|
+
"GIT_WORK_TREE",
|
|
8463
|
+
"GIT_IMPLICIT_WORK_TREE",
|
|
8464
|
+
"GIT_GRAFT_FILE",
|
|
8465
|
+
"GIT_INDEX_FILE",
|
|
8466
|
+
"GIT_NO_REPLACE_OBJECTS",
|
|
8467
|
+
"GIT_REPLACE_REF_BASE",
|
|
8468
|
+
"GIT_PREFIX",
|
|
8469
|
+
"GIT_SHALLOW_FILE",
|
|
8470
|
+
"GIT_COMMON_DIR"
|
|
8471
|
+
];
|
|
8472
|
+
async function captureProcess(command, args, cwd, inherit = false) {
|
|
8473
|
+
return await new Promise((resolve6, reject) => {
|
|
8474
|
+
const child = spawn2(command, args, {
|
|
8475
|
+
cwd,
|
|
8476
|
+
env: withoutParentGitRepository(process.env),
|
|
8477
|
+
stdio: inherit ? "inherit" : ["ignore", "pipe", "pipe"]
|
|
8478
|
+
});
|
|
8479
|
+
let stdout2 = "";
|
|
8480
|
+
let stderr = "";
|
|
8481
|
+
child.stdout?.on("data", (chunk) => stdout2 += chunk.toString());
|
|
8482
|
+
child.stderr?.on("data", (chunk) => stderr += chunk.toString());
|
|
8483
|
+
child.once("error", reject);
|
|
8484
|
+
child.once("close", (code) => resolve6({ code: code ?? 1, stdout: stdout2, stderr }));
|
|
8485
|
+
});
|
|
8486
|
+
}
|
|
8487
|
+
async function assertProcess(command, args, cwd, inherit = false) {
|
|
8488
|
+
const result = await captureProcess(command, args, cwd, inherit);
|
|
8489
|
+
if (result.code !== 0) {
|
|
8490
|
+
const detail = result.stderr.trim() || result.stdout.trim();
|
|
8491
|
+
throw new Error(`${command} ${args.join(" ")} \u6267\u884C\u5931\u8D25${detail ? `\uFF1A${detail}` : ""}`);
|
|
8492
|
+
}
|
|
8493
|
+
return result;
|
|
8494
|
+
}
|
|
8495
|
+
function withoutParentGitRepository(source) {
|
|
8496
|
+
const environment = { ...source };
|
|
8497
|
+
for (const key of LOCAL_GIT_ENVIRONMENT_VARIABLES) {
|
|
8498
|
+
delete environment[key];
|
|
8499
|
+
}
|
|
8500
|
+
return environment;
|
|
8501
|
+
}
|
|
8502
|
+
|
|
8321
8503
|
// src/update/legacy-adk-retirement.ts
|
|
8322
8504
|
import { lstat as lstat6, readFile as readFile11 } from "fs/promises";
|
|
8323
8505
|
import { join as join16 } from "path";
|
|
@@ -8530,7 +8712,10 @@ var recipes = [
|
|
|
8530
8712
|
to: "0.8.0"
|
|
8531
8713
|
},
|
|
8532
8714
|
{ id: "starter-0.8.0-to-0.8.1", from: "0.8.0", to: "0.8.1" },
|
|
8533
|
-
{ id: "starter-0.8.1-to-0.8.2", from: "0.8.1", to: "0.8.2" }
|
|
8715
|
+
{ id: "starter-0.8.1-to-0.8.2", from: "0.8.1", to: "0.8.2" },
|
|
8716
|
+
{ id: "starter-0.8.2-to-0.8.3", from: "0.8.2", to: "0.8.3" },
|
|
8717
|
+
{ id: "starter-0.8.3-to-0.9.0", from: "0.8.3", to: "0.9.0" },
|
|
8718
|
+
{ id: "starter-0.9.0-to-0.9.1", from: "0.9.0", to: "0.9.1" }
|
|
8534
8719
|
];
|
|
8535
8720
|
function resolveRecipeChain(sourceVersion, targetVersion) {
|
|
8536
8721
|
if (compareVersions2(sourceVersion, minimumSupportedUpdateVersion) < 0) {
|
|
@@ -8936,8 +9121,8 @@ async function readProjectName2(projectDirectory) {
|
|
|
8936
9121
|
}
|
|
8937
9122
|
|
|
8938
9123
|
// src/update/planner.ts
|
|
8939
|
-
import { readFile as
|
|
8940
|
-
import { dirname as dirname9, join as
|
|
9124
|
+
import { readFile as readFile23 } from "fs/promises";
|
|
9125
|
+
import { dirname as dirname9, join as join29 } from "path";
|
|
8941
9126
|
|
|
8942
9127
|
// src/update/docker-copy-update-plan.ts
|
|
8943
9128
|
async function deriveDockerfilePlans(files, snapshots, paths, targetWorkspaceManifests) {
|
|
@@ -9405,9 +9590,33 @@ async function readSnapshot(root, tag) {
|
|
|
9405
9590
|
}
|
|
9406
9591
|
|
|
9407
9592
|
// src/update/planner-file.ts
|
|
9408
|
-
import { readFile as
|
|
9409
|
-
import { join as
|
|
9593
|
+
import { readFile as readFile21 } from "fs/promises";
|
|
9594
|
+
import { join as join27 } from "path";
|
|
9410
9595
|
|
|
9596
|
+
// src/update/planner-file-support.ts
|
|
9597
|
+
function readyPlannedFile(path2, ownership, action, reason, expectedProjectContent, content) {
|
|
9598
|
+
return {
|
|
9599
|
+
path: path2,
|
|
9600
|
+
ownership,
|
|
9601
|
+
action,
|
|
9602
|
+
reason,
|
|
9603
|
+
expectedProjectContent,
|
|
9604
|
+
content
|
|
9605
|
+
};
|
|
9606
|
+
}
|
|
9607
|
+
function expectationForSnapshot(content) {
|
|
9608
|
+
return content ? { kind: "hash", value: hashContent(content) } : { kind: "missing" };
|
|
9609
|
+
}
|
|
9610
|
+
function conflict(path2, ownership, reason, expectedProjectContent) {
|
|
9611
|
+
return {
|
|
9612
|
+
path: path2,
|
|
9613
|
+
ownership,
|
|
9614
|
+
action: "preserve",
|
|
9615
|
+
reason: "\u5BA2\u6237\u5DF2\u4FEE\u6539",
|
|
9616
|
+
expectedProjectContent,
|
|
9617
|
+
conflict: reason
|
|
9618
|
+
};
|
|
9619
|
+
}
|
|
9411
9620
|
// src/update/merge.ts
|
|
9412
9621
|
import { mkdtemp as mkdtemp2, rm as rm6, writeFile as writeFile12 } from "fs/promises";
|
|
9413
9622
|
import { tmpdir as tmpdir2 } from "os";
|
|
@@ -9850,13 +10059,13 @@ function isObject(value) {
|
|
|
9850
10059
|
// src/update/planner-project-owned.ts
|
|
9851
10060
|
function planGeneratedProjectOwned(path2, source, target, ours, theirs, expected) {
|
|
9852
10061
|
if (!source && target) {
|
|
9853
|
-
return !ours && theirs ? ready(path2, "create", "\u6A21\u5757\u5B89\u88C5\u65B0\u589E\u9879\u76EE\u6269\u5C55\u70B9", expected, theirs) :
|
|
10062
|
+
return !ours && theirs ? ready(path2, "create", "\u6A21\u5757\u5B89\u88C5\u65B0\u589E\u9879\u76EE\u6269\u5C55\u70B9", expected, theirs) : conflict2(path2, "\u6A21\u5757\u65B0\u589E\u8DEF\u5F84\u5DF2\u88AB\u9879\u76EE\u5360\u7528", expected);
|
|
9854
10063
|
}
|
|
9855
10064
|
if (source && !target) {
|
|
9856
10065
|
if (!ours) {
|
|
9857
10066
|
return ready(path2, "preserve", "\u6A21\u5757\u8DEF\u5F84\u5DF2\u79FB\u9664", expected);
|
|
9858
10067
|
}
|
|
9859
|
-
return hashContent(ours) === source.hash ? ready(path2, "delete", "\u6A21\u5757\u5378\u8F7D\u79FB\u9664\u672A\u4FEE\u6539\u6269\u5C55\u70B9", expected) :
|
|
10068
|
+
return hashContent(ours) === source.hash ? ready(path2, "delete", "\u6A21\u5757\u5378\u8F7D\u79FB\u9664\u672A\u4FEE\u6539\u6269\u5C55\u70B9", expected) : conflict2(path2, "\u5BA2\u6237\u4FEE\u6539\u8FC7\u6A21\u5757\u6269\u5C55\u70B9\uFF0C\u62D2\u7EDD\u5378\u8F7D", expected);
|
|
9860
10069
|
}
|
|
9861
10070
|
if (!source || !target || !ours || !theirs) {
|
|
9862
10071
|
return ready(path2, "preserve", "\u9879\u76EE\u62E5\u6709\uFF0C\u6A21\u5757\u7EC4\u5408\u672A\u6539\u53D8", expected);
|
|
@@ -9867,7 +10076,7 @@ function planGeneratedProjectOwned(path2, source, target, ours, theirs, expected
|
|
|
9867
10076
|
if (source.hash === target.hash) {
|
|
9868
10077
|
return ready(path2, "preserve", "\u6A21\u5757\u7EC4\u5408\u672A\u6539\u53D8", expected);
|
|
9869
10078
|
}
|
|
9870
|
-
return hashContent(ours) === source.hash ? ready(path2, "update", "\u66F4\u65B0\u672A\u4FEE\u6539\u7684\u6A21\u5757\u7EC4\u5408\u6269\u5C55\u70B9", expected, theirs) :
|
|
10079
|
+
return hashContent(ours) === source.hash ? ready(path2, "update", "\u66F4\u65B0\u672A\u4FEE\u6539\u7684\u6A21\u5757\u7EC4\u5408\u6269\u5C55\u70B9", expected, theirs) : conflict2(path2, "\u5BA2\u6237\u4FEE\u6539\u8FC7\u6A21\u5757\u7EC4\u5408\u6269\u5C55\u70B9", expected);
|
|
9871
10080
|
}
|
|
9872
10081
|
function ready(path2, action, reason, expectedProjectContent, content) {
|
|
9873
10082
|
return {
|
|
@@ -9879,7 +10088,7 @@ function ready(path2, action, reason, expectedProjectContent, content) {
|
|
|
9879
10088
|
content
|
|
9880
10089
|
};
|
|
9881
10090
|
}
|
|
9882
|
-
function
|
|
10091
|
+
function conflict2(path2, reason, expectedProjectContent) {
|
|
9883
10092
|
return {
|
|
9884
10093
|
path: path2,
|
|
9885
10094
|
ownership: "project-owned",
|
|
@@ -9932,10 +10141,10 @@ function planClientWorkflowProjectOwned(input) {
|
|
|
9932
10141
|
}
|
|
9933
10142
|
function planBinding(input) {
|
|
9934
10143
|
if (!input.target)
|
|
9935
|
-
return
|
|
10144
|
+
return conflict3(input, "\u76EE\u6807\u7248\u672C\u7F3A\u5C11 Workflow binding seam");
|
|
9936
10145
|
const target = decode(input.target);
|
|
9937
10146
|
if (target !== immutableReleaseDefaultBinding) {
|
|
9938
|
-
return
|
|
10147
|
+
return conflict3(input, "\u76EE\u6807\u7248\u672C Workflow binding seam \u5951\u7EA6\u65E0\u6548");
|
|
9939
10148
|
}
|
|
9940
10149
|
if (!input.ours) {
|
|
9941
10150
|
return ready2(input, "create", "\u65B0\u589E\u9ED8\u8BA4\u5173\u95ED\u7684 Workflow binding seam", input.target);
|
|
@@ -9945,17 +10154,17 @@ function planBinding(input) {
|
|
|
9945
10154
|
return ready2(input, "preserve", "\u5DF2\u5305\u542B immutable release binding seam");
|
|
9946
10155
|
}
|
|
9947
10156
|
if (source !== legacyDefaultBinding) {
|
|
9948
|
-
return
|
|
10157
|
+
return conflict3(input, "Workflow binding seam \u4E0D\u662F 0.6.14 \u9ED8\u8BA4\u7A7A\u7248\u672C");
|
|
9949
10158
|
}
|
|
9950
10159
|
return ready2(input, "update", "\u5347\u7EA7\u9ED8\u8BA4\u7A7A Workflow binding seam", input.target);
|
|
9951
10160
|
}
|
|
9952
10161
|
function planComposition(input) {
|
|
9953
10162
|
if (!input.target) {
|
|
9954
|
-
return
|
|
10163
|
+
return conflict3(input, "\u76EE\u6807\u7248\u672C\u7F3A\u5C11 Agent Runtime Composition");
|
|
9955
10164
|
}
|
|
9956
10165
|
const target = decode(input.target);
|
|
9957
10166
|
if (hashContent(target) !== immutableReleaseCompositionHash) {
|
|
9958
|
-
return
|
|
10167
|
+
return conflict3(input, "\u76EE\u6807\u7248\u672C Agent Runtime Composition \u5951\u7EA6\u65E0\u6548");
|
|
9959
10168
|
}
|
|
9960
10169
|
if (!input.ours) {
|
|
9961
10170
|
return ready2(input, "create", "\u65B0\u589E Agent Runtime Composition", input.target);
|
|
@@ -9965,11 +10174,11 @@ function planComposition(input) {
|
|
|
9965
10174
|
return ready2(input, "preserve", "\u5DF2\u88C5\u914D Workflow Artifact binding");
|
|
9966
10175
|
}
|
|
9967
10176
|
if ([workflowArtifactImport, newOmit, workflowArtifactProperty].some((value) => source.includes(value))) {
|
|
9968
|
-
return
|
|
10177
|
+
return conflict3(input, "Agent Runtime Composition \u53EA\u5305\u542B\u90E8\u5206\u76EE\u6807\u88C5\u914D");
|
|
9969
10178
|
}
|
|
9970
10179
|
const runtimeConflict = validateLegacyRuntimeObject(source);
|
|
9971
10180
|
if (runtimeConflict)
|
|
9972
|
-
return
|
|
10181
|
+
return conflict3(input, runtimeConflict);
|
|
9973
10182
|
const replacements2 = [
|
|
9974
10183
|
{
|
|
9975
10184
|
anchor: hostAuthImport,
|
|
@@ -9989,7 +10198,7 @@ ${workflowArtifactProperty}`
|
|
|
9989
10198
|
let content = source;
|
|
9990
10199
|
for (const replacement of replacements2) {
|
|
9991
10200
|
if (occurrences(content, replacement.anchor) !== 1) {
|
|
9992
|
-
return
|
|
10201
|
+
return conflict3(input, `Agent Runtime Composition \u951A\u70B9\u4E0D\u552F\u4E00\uFF1A${replacement.anchor}`);
|
|
9993
10202
|
}
|
|
9994
10203
|
content = content.replace(replacement.anchor, replacement.value);
|
|
9995
10204
|
}
|
|
@@ -10005,7 +10214,7 @@ function ready2(input, action, reason, content) {
|
|
|
10005
10214
|
content
|
|
10006
10215
|
};
|
|
10007
10216
|
}
|
|
10008
|
-
function
|
|
10217
|
+
function conflict3(input, message) {
|
|
10009
10218
|
return {
|
|
10010
10219
|
path: input.path,
|
|
10011
10220
|
ownership: "project-owned",
|
|
@@ -10103,18 +10312,18 @@ function recipeCanManageMissingProjectOwnedPath(path2) {
|
|
|
10103
10312
|
async function planRecipeProjectOwned(input) {
|
|
10104
10313
|
if (input.path === clientWorkflowCompositionPath || input.path === clientWorkflowBindingPath) {
|
|
10105
10314
|
if (!input.target) {
|
|
10106
|
-
return
|
|
10315
|
+
return conflict4(input, "\u7248\u672C recipe \u6240\u9700\u7684\u76EE\u6807\u6587\u4EF6\u7F3A\u5931");
|
|
10107
10316
|
}
|
|
10108
10317
|
return planClientWorkflowProjectOwned({ ...input, target: input.target });
|
|
10109
10318
|
}
|
|
10110
10319
|
if (!input.ours) {
|
|
10111
|
-
return
|
|
10320
|
+
return conflict4(input, "\u7248\u672C recipe \u6240\u9700\u7684\u9879\u76EE\u951A\u70B9\u7F3A\u5931");
|
|
10112
10321
|
}
|
|
10113
10322
|
const source = new TextDecoder().decode(input.ours);
|
|
10114
10323
|
const target = input.target ? new TextDecoder().decode(input.target) : undefined;
|
|
10115
10324
|
const transformed = transformProjectOwnedAnchor(input.path, source, target);
|
|
10116
10325
|
if ("error" in transformed)
|
|
10117
|
-
return
|
|
10326
|
+
return conflict4(input, transformed.error);
|
|
10118
10327
|
if (transformed.content === source) {
|
|
10119
10328
|
return preserve(input, "\u5DF2\u5305\u542B\u7248\u672C recipe \u76EE\u6807\u5185\u5BB9");
|
|
10120
10329
|
}
|
|
@@ -10300,7 +10509,7 @@ function update(input, content) {
|
|
|
10300
10509
|
content
|
|
10301
10510
|
};
|
|
10302
10511
|
}
|
|
10303
|
-
function
|
|
10512
|
+
function conflict4(input, message) {
|
|
10304
10513
|
return {
|
|
10305
10514
|
path: input.path,
|
|
10306
10515
|
ownership: "project-owned",
|
|
@@ -10311,14 +10520,163 @@ function conflict3(input, message) {
|
|
|
10311
10520
|
};
|
|
10312
10521
|
}
|
|
10313
10522
|
|
|
10523
|
+
// src/update/dsh-platform-recipe.ts
|
|
10524
|
+
import { join as join26 } from "path";
|
|
10525
|
+
|
|
10526
|
+
// src/update/planner-snapshots.ts
|
|
10527
|
+
import { readFile as readFile20, stat as stat2 } from "fs/promises";
|
|
10528
|
+
import { join as join25 } from "path";
|
|
10529
|
+
async function snapshotProjectFiles(project, paths, seed) {
|
|
10530
|
+
const snapshots = new Map(seed);
|
|
10531
|
+
await Promise.all([...paths].filter((path2) => !snapshots.has(path2)).map(async (path2) => {
|
|
10532
|
+
snapshots.set(path2, await readOptional(join25(project, path2)));
|
|
10533
|
+
}));
|
|
10534
|
+
return snapshots;
|
|
10535
|
+
}
|
|
10536
|
+
async function snapshotProjectModes(project, paths) {
|
|
10537
|
+
return new Map(await Promise.all([...paths].map(async (path2) => [path2, await readModeOptional(join25(project, path2))])));
|
|
10538
|
+
}
|
|
10539
|
+
async function assertPlanSnapshots(project, expectations) {
|
|
10540
|
+
const changed = [];
|
|
10541
|
+
for (const expectation2 of expectations) {
|
|
10542
|
+
const actual = expectationForSnapshot(await readOptional(join25(project, expectation2.path)));
|
|
10543
|
+
if (JSON.stringify(actual) !== JSON.stringify(expectation2.expected)) {
|
|
10544
|
+
changed.push(expectation2.path);
|
|
10545
|
+
continue;
|
|
10546
|
+
}
|
|
10547
|
+
if ("mode" in expectation2 && await readModeOptional(join25(project, expectation2.path)) !== expectation2.mode) {
|
|
10548
|
+
changed.push(expectation2.path);
|
|
10549
|
+
}
|
|
10550
|
+
}
|
|
10551
|
+
if (changed.length) {
|
|
10552
|
+
throw new Error(`\u751F\u6210\u66F4\u65B0\u8BA1\u5212\u671F\u95F4\u5019\u9009\u6587\u4EF6\u53D1\u751F\u53D8\u5316\uFF1A${changed.join("\u3001")}`);
|
|
10553
|
+
}
|
|
10554
|
+
}
|
|
10555
|
+
async function readModeOptional(path2) {
|
|
10556
|
+
try {
|
|
10557
|
+
return (await stat2(path2)).mode & 511;
|
|
10558
|
+
} catch (error) {
|
|
10559
|
+
if (isMissing7(error))
|
|
10560
|
+
return;
|
|
10561
|
+
throw error;
|
|
10562
|
+
}
|
|
10563
|
+
}
|
|
10564
|
+
async function readSourceParentMode(path2) {
|
|
10565
|
+
try {
|
|
10566
|
+
const info = await stat2(path2);
|
|
10567
|
+
if (!info.isDirectory()) {
|
|
10568
|
+
throw new Error(`artifact \u6E90\u7801\u7236\u8DEF\u5F84\u4E0D\u662F\u76EE\u5F55\uFF1A${path2}`);
|
|
10569
|
+
}
|
|
10570
|
+
return info.mode & 493 | 493;
|
|
10571
|
+
} catch (error) {
|
|
10572
|
+
if (isMissing7(error))
|
|
10573
|
+
return 493;
|
|
10574
|
+
throw error;
|
|
10575
|
+
}
|
|
10576
|
+
}
|
|
10577
|
+
async function readOptional(path2) {
|
|
10578
|
+
try {
|
|
10579
|
+
return await readFile20(path2);
|
|
10580
|
+
} catch (error) {
|
|
10581
|
+
if (isMissing7(error))
|
|
10582
|
+
return;
|
|
10583
|
+
throw error;
|
|
10584
|
+
}
|
|
10585
|
+
}
|
|
10586
|
+
function isMissing7(error) {
|
|
10587
|
+
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
10588
|
+
}
|
|
10589
|
+
|
|
10590
|
+
// src/update/dsh-platform-recipe.ts
|
|
10591
|
+
var dshPlatformRecipeId = "dsh-platform-v1";
|
|
10592
|
+
var dshPlatformRecipePaths = new Set([
|
|
10593
|
+
"apps/server/src/app/agent-workflow-presets.ts",
|
|
10594
|
+
"apps/server/src/app/workbench-public-origin.ts",
|
|
10595
|
+
"apps/web/src/router/index.ts",
|
|
10596
|
+
"apps/web/src/router/platform-admin-pages.ts",
|
|
10597
|
+
"apps/web/src/router/platform-admin-route-bindings.ts",
|
|
10598
|
+
"apps/web/src/composables/useLoginFlow.ts",
|
|
10599
|
+
"apps/web/src/pages/system/AgentWorkflowPage.vue",
|
|
10600
|
+
"apps/web/src/services/agent-workflow-api.ts",
|
|
10601
|
+
"apps/web/vite.config.ts",
|
|
10602
|
+
"apps/web/server.ts",
|
|
10603
|
+
"apps/web/runtime-server.ts",
|
|
10604
|
+
"apps/web/dev/start.ts"
|
|
10605
|
+
]);
|
|
10606
|
+
function isDshPlatformRecipePath(path2) {
|
|
10607
|
+
return dshPlatformRecipePaths.has(path2) || path2.startsWith("apps/server/src/app/dsh-") && path2.endsWith(".ts");
|
|
10608
|
+
}
|
|
10609
|
+
async function isDshPlatformTransition(input) {
|
|
10610
|
+
if (!input.sourceModules.includes("system.agent") || !input.targetModules.includes("system.agent"))
|
|
10611
|
+
return false;
|
|
10612
|
+
const path2 = "apps/agent-server/package.json";
|
|
10613
|
+
const [base, target] = await Promise.all([
|
|
10614
|
+
readOptional(join26(input.baseDirectory, path2)),
|
|
10615
|
+
readOptional(join26(input.targetDirectory, path2))
|
|
10616
|
+
]);
|
|
10617
|
+
return hasDsh(target) && !hasDsh(base);
|
|
10618
|
+
}
|
|
10619
|
+
function planDshPlatformFile(input) {
|
|
10620
|
+
const common2 = {
|
|
10621
|
+
path: input.path,
|
|
10622
|
+
ownership: input.ownership,
|
|
10623
|
+
expectedProjectContent: input.expected
|
|
10624
|
+
};
|
|
10625
|
+
if (input.target && input.ours && hashContent(input.ours) === hashContent(input.target)) {
|
|
10626
|
+
return {
|
|
10627
|
+
...common2,
|
|
10628
|
+
action: "preserve",
|
|
10629
|
+
reason: "\u5DF2\u5305\u542B DSH \u5E73\u53F0\u63A5\u7EBF\u76EE\u6807\u5185\u5BB9"
|
|
10630
|
+
};
|
|
10631
|
+
}
|
|
10632
|
+
if (input.target && !input.ours && !input.base) {
|
|
10633
|
+
return {
|
|
10634
|
+
...common2,
|
|
10635
|
+
action: "create",
|
|
10636
|
+
reason: "DSH \u5E73\u53F0\u65B0\u589E\u9879\u76EE\u6269\u5C55\u70B9",
|
|
10637
|
+
content: input.target
|
|
10638
|
+
};
|
|
10639
|
+
}
|
|
10640
|
+
if (input.target && input.base && input.ours && hashContent(input.ours) === hashContent(input.base)) {
|
|
10641
|
+
return {
|
|
10642
|
+
...common2,
|
|
10643
|
+
action: "update",
|
|
10644
|
+
reason: "DSH \u5E73\u53F0\u5347\u7EA7\u7CBE\u786E\u6765\u6E90\u63A5\u7EBF",
|
|
10645
|
+
content: input.target
|
|
10646
|
+
};
|
|
10647
|
+
}
|
|
10648
|
+
return {
|
|
10649
|
+
...common2,
|
|
10650
|
+
action: "preserve",
|
|
10651
|
+
reason: "\u4FDD\u7559\u5BA2\u6237 DSH \u63A5\u7EBF",
|
|
10652
|
+
conflict: "DSH \u5E73\u53F0\u63A5\u7EBF\u4E0E\u7CBE\u786E\u6765\u6E90\u6216\u76EE\u6807\u4E0D\u4E00\u81F4\uFF1B\u8BF7\u5BA1\u6838\u9879\u76EE\u4FEE\u6539\u540E\u663E\u5F0F\u96C6\u6210\uFF0C\u7981\u6B62\u731C\u6D4B\u8986\u76D6"
|
|
10653
|
+
};
|
|
10654
|
+
}
|
|
10655
|
+
function hasDsh(content) {
|
|
10656
|
+
if (!content)
|
|
10657
|
+
return false;
|
|
10658
|
+
const value = JSON.parse(new TextDecoder().decode(content));
|
|
10659
|
+
return typeof value.dependencies?.["@deepseek-ai/dsh"] === "string";
|
|
10660
|
+
}
|
|
10661
|
+
|
|
10314
10662
|
// src/update/planner-file.ts
|
|
10315
|
-
async function planFile(path2, baseRoot, targetRoot, source, target, ours, provenance, targetContentOverride, manageGeneratedProjectOwned = false, forcePlatformBaseline = false, manageRecipeProjectOwned = false) {
|
|
10663
|
+
async function planFile(path2, baseRoot, targetRoot, source, target, ours, provenance, targetContentOverride, manageGeneratedProjectOwned = false, forcePlatformBaseline = false, manageRecipeProjectOwned = false, migrateDshPlatform = false) {
|
|
10316
10664
|
const [base, theirs] = await Promise.all([
|
|
10317
|
-
|
|
10318
|
-
targetContentOverride ? Promise.resolve(targetContentOverride) :
|
|
10665
|
+
readOptional2(join27(baseRoot, path2)),
|
|
10666
|
+
targetContentOverride ? Promise.resolve(targetContentOverride) : readOptional2(join27(targetRoot, path2))
|
|
10319
10667
|
]);
|
|
10320
10668
|
const ownership = source?.ownership ?? target?.ownership ?? classifyOwnership(path2);
|
|
10321
10669
|
const expected = expectationForSnapshot(ours);
|
|
10670
|
+
if (migrateDshPlatform && isDshPlatformRecipePath(path2)) {
|
|
10671
|
+
return planDshPlatformFile({
|
|
10672
|
+
path: path2,
|
|
10673
|
+
ownership,
|
|
10674
|
+
ours,
|
|
10675
|
+
base,
|
|
10676
|
+
target: theirs,
|
|
10677
|
+
expected
|
|
10678
|
+
});
|
|
10679
|
+
}
|
|
10322
10680
|
if (ownership === "project-owned") {
|
|
10323
10681
|
const hasExistingRecipeSource = source !== undefined && source.state !== "missing" && ours !== undefined;
|
|
10324
10682
|
if (manageRecipeProjectOwned && target && (hasExistingRecipeSource || recipeCanManageMissingProjectOwnedPath(path2))) {
|
|
@@ -10331,29 +10689,29 @@ async function planFile(path2, baseRoot, targetRoot, source, target, ours, prove
|
|
|
10331
10689
|
}
|
|
10332
10690
|
if (path2.startsWith("packages/database/drizzle/") && path2.endsWith(".sql")) {
|
|
10333
10691
|
if (source && !target) {
|
|
10334
|
-
return
|
|
10692
|
+
return conflict(path2, ownership, "\u5DF2\u53D1\u5E03 migration \u4E0D\u53EF\u5220\u9664", expected);
|
|
10335
10693
|
}
|
|
10336
10694
|
if (source && target && source.hash !== target.hash) {
|
|
10337
|
-
return
|
|
10695
|
+
return conflict(path2, ownership, "\u5DF2\u53D1\u5E03 migration \u4E0D\u53EF\u6539\u5199\uFF0C\u53EA\u80FD\u8FFD\u52A0\u65B0\u6587\u4EF6", expected);
|
|
10338
10696
|
}
|
|
10339
10697
|
}
|
|
10340
10698
|
if (!source && target) {
|
|
10341
10699
|
if (!ours) {
|
|
10342
10700
|
return readyPlannedFile(path2, ownership, "create", "\u76EE\u6807\u7248\u672C\u65B0\u589E", expected, theirs);
|
|
10343
10701
|
}
|
|
10344
|
-
return theirs && hashContent(ours) === target.hash ? readyPlannedFile(path2, ownership, "preserve", "\u5DF2\u5305\u542B\u76EE\u6807\u5185\u5BB9", expected) :
|
|
10702
|
+
return theirs && hashContent(ours) === target.hash ? readyPlannedFile(path2, ownership, "preserve", "\u5DF2\u5305\u542B\u76EE\u6807\u5185\u5BB9", expected) : conflict(path2, ownership, "\u76EE\u6807\u7248\u672C\u65B0\u589E\u8DEF\u5F84\u5DF2\u88AB\u9879\u76EE\u5360\u7528", expected);
|
|
10345
10703
|
}
|
|
10346
10704
|
if (source && !target) {
|
|
10347
10705
|
if (!ours) {
|
|
10348
10706
|
return readyPlannedFile(path2, ownership, "preserve", "\u9879\u76EE\u5DF2\u5220\u9664", expected);
|
|
10349
10707
|
}
|
|
10350
|
-
return hashContent(ours) === source.hash ? readyPlannedFile(path2, ownership, "delete", "\u76EE\u6807\u7248\u672C\u5220\u9664", expected) :
|
|
10708
|
+
return hashContent(ours) === source.hash ? readyPlannedFile(path2, ownership, "delete", "\u76EE\u6807\u7248\u672C\u5220\u9664", expected) : conflict(path2, ownership, "\u5BA2\u6237\u4FEE\u6539\u540E Windy \u53C8\u5220\u9664", expected);
|
|
10351
10709
|
}
|
|
10352
10710
|
if (source && target && !ours) {
|
|
10353
10711
|
return readyPlannedFile(path2, "project-owned", "preserve", "\u9879\u76EE\u5DF2\u5220\u9664", expected);
|
|
10354
10712
|
}
|
|
10355
10713
|
if (!source || !target || !ours || !theirs) {
|
|
10356
|
-
return
|
|
10714
|
+
return conflict(path2, ownership, "\u6587\u4EF6\u72B6\u6001\u4E0D\u5B8C\u6574\uFF0C\u4E0D\u80FD\u5B89\u5168\u63A8\u65AD", expected);
|
|
10357
10715
|
}
|
|
10358
10716
|
const oursChanged = hashContent(ours) !== source.hash;
|
|
10359
10717
|
const sourceArtifactHash = artifactHashOf(source);
|
|
@@ -10367,7 +10725,7 @@ async function planFile(path2, baseRoot, targetRoot, source, target, ours, prove
|
|
|
10367
10725
|
});
|
|
10368
10726
|
if (forceTargetBaseline && path2.endsWith("package.json") && base) {
|
|
10369
10727
|
const merged = mergePackageJson(base, ours, theirs);
|
|
10370
|
-
return merged.content ? readyPlannedFile(path2, ownership, "update", "package.json \u5B57\u6BB5\u7EA7\u5408\u5E76", expected, merged.content) :
|
|
10728
|
+
return merged.content ? readyPlannedFile(path2, ownership, "update", "package.json \u5B57\u6BB5\u7EA7\u5408\u5E76", expected, merged.content) : conflict(path2, ownership, `\u5B57\u6BB5\u51B2\u7A81\uFF1A${merged.conflicts.join("\u3001")}`, expected);
|
|
10371
10729
|
}
|
|
10372
10730
|
if (forceTargetBaseline) {
|
|
10373
10731
|
return readyPlannedFile(path2, ownership, "update", "\u5F3A\u5236\u91C7\u7528\u76EE\u6807\u5E73\u53F0\u57FA\u7EBF", expected, theirs);
|
|
@@ -10377,11 +10735,11 @@ async function planFile(path2, baseRoot, targetRoot, source, target, ours, prove
|
|
|
10377
10735
|
}
|
|
10378
10736
|
if (targetChanged && path2.endsWith("package.json") && base) {
|
|
10379
10737
|
const merged = mergePackageJson(base, ours, theirs);
|
|
10380
|
-
return merged.content ? readyPlannedFile(path2, ownership, "update", "package.json \u5B57\u6BB5\u7EA7\u5408\u5E76", expected, merged.content) :
|
|
10738
|
+
return merged.content ? readyPlannedFile(path2, ownership, "update", "package.json \u5B57\u6BB5\u7EA7\u5408\u5E76", expected, merged.content) : conflict(path2, ownership, `\u5B57\u6BB5\u51B2\u7A81\uFF1A${merged.conflicts.join("\u3001")}`, expected);
|
|
10381
10739
|
}
|
|
10382
10740
|
if (!oursChanged && targetChanged && adoptedProjectDelta && base) {
|
|
10383
10741
|
const merged = await mergeTextFile(base, ours, theirs);
|
|
10384
|
-
return merged.content ? readyPlannedFile(path2, ownership, "update", "\u4E09\u65B9\u5408\u5E76\u5DF2\u91C7\u7EB3\u9879\u76EE\u589E\u91CF", expected, merged.content) :
|
|
10742
|
+
return merged.content ? readyPlannedFile(path2, ownership, "update", "\u4E09\u65B9\u5408\u5E76\u5DF2\u91C7\u7EB3\u9879\u76EE\u589E\u91CF", expected, merged.content) : conflict(path2, ownership, merged.conflict || "\u4E09\u65B9\u5408\u5E76\u5931\u8D25", expected);
|
|
10385
10743
|
}
|
|
10386
10744
|
if (!oursChanged) {
|
|
10387
10745
|
return readyPlannedFile(path2, ownership, "update", "\u4EC5 Windy \u4FEE\u6539", expected, theirs);
|
|
@@ -10394,9 +10752,9 @@ async function planFile(path2, baseRoot, targetRoot, source, target, ours, prove
|
|
|
10394
10752
|
}
|
|
10395
10753
|
if (base) {
|
|
10396
10754
|
const merged = await mergeTextFile(base, ours, theirs);
|
|
10397
|
-
return merged.content ? readyPlannedFile(path2, ownership, "update", "\u4E09\u65B9\u5408\u5E76", expected, merged.content) :
|
|
10755
|
+
return merged.content ? readyPlannedFile(path2, ownership, "update", "\u4E09\u65B9\u5408\u5E76", expected, merged.content) : conflict(path2, ownership, merged.conflict || "\u4E09\u65B9\u5408\u5E76\u5931\u8D25", expected);
|
|
10398
10756
|
}
|
|
10399
|
-
return
|
|
10757
|
+
return conflict(path2, ownership, "\u5BA2\u6237\u548C Windy \u5747\u5DF2\u4FEE\u6539", expected);
|
|
10400
10758
|
}
|
|
10401
10759
|
function shouldForcePlatformBaseline(input) {
|
|
10402
10760
|
return input.forcePlatformBaseline && !input.oursChanged && input.base !== undefined && hashContent(input.base) !== input.sourceArtifactHash;
|
|
@@ -10404,32 +10762,9 @@ function shouldForcePlatformBaseline(input) {
|
|
|
10404
10762
|
function targetChangedSinceBase(sourceHash, base, target) {
|
|
10405
10763
|
return base && target ? hashContent(base) !== hashContent(target) : !!target && hashContent(target) !== sourceHash;
|
|
10406
10764
|
}
|
|
10407
|
-
function
|
|
10408
|
-
return {
|
|
10409
|
-
path: path2,
|
|
10410
|
-
ownership,
|
|
10411
|
-
action,
|
|
10412
|
-
reason,
|
|
10413
|
-
expectedProjectContent,
|
|
10414
|
-
content
|
|
10415
|
-
};
|
|
10416
|
-
}
|
|
10417
|
-
function expectationForSnapshot(content) {
|
|
10418
|
-
return content ? { kind: "hash", value: hashContent(content) } : { kind: "missing" };
|
|
10419
|
-
}
|
|
10420
|
-
function conflict4(path2, ownership, reason, expectedProjectContent) {
|
|
10421
|
-
return {
|
|
10422
|
-
path: path2,
|
|
10423
|
-
ownership,
|
|
10424
|
-
action: "preserve",
|
|
10425
|
-
reason: "\u5BA2\u6237\u5DF2\u4FEE\u6539",
|
|
10426
|
-
expectedProjectContent,
|
|
10427
|
-
conflict: reason
|
|
10428
|
-
};
|
|
10429
|
-
}
|
|
10430
|
-
async function readOptional(path2) {
|
|
10765
|
+
async function readOptional2(path2) {
|
|
10431
10766
|
try {
|
|
10432
|
-
return await
|
|
10767
|
+
return await readFile21(path2);
|
|
10433
10768
|
} catch (error) {
|
|
10434
10769
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
10435
10770
|
return;
|
|
@@ -10438,6 +10773,31 @@ async function readOptional(path2) {
|
|
|
10438
10773
|
}
|
|
10439
10774
|
}
|
|
10440
10775
|
|
|
10776
|
+
// src/update/planner-files.ts
|
|
10777
|
+
var metadataPaths = new Set([
|
|
10778
|
+
".windy/generation.json",
|
|
10779
|
+
".windy/files.json",
|
|
10780
|
+
".windy-template.json"
|
|
10781
|
+
]);
|
|
10782
|
+
async function planFiles(input) {
|
|
10783
|
+
const files = [];
|
|
10784
|
+
for (const path2 of [...input.paths].sort()) {
|
|
10785
|
+
if (metadataPaths.has(path2))
|
|
10786
|
+
continue;
|
|
10787
|
+
const forcedContent = input.migrations.forceUpdates.has(path2) ? input.migrations.contentOverrides.get(path2) : undefined;
|
|
10788
|
+
const ours = input.projectSnapshots.get(path2);
|
|
10789
|
+
const expected = expectationForSnapshot(ours);
|
|
10790
|
+
if (input.migrations.forcePreserves.has(path2)) {
|
|
10791
|
+
files.push(readyPlannedFile(path2, input.sourceEntries.get(path2)?.ownership ?? classifyOwnership(path2), "preserve", "\u4FDD\u7559\u9879\u76EE\u5DF2\u53D1\u5E03 migration \u5386\u53F2", expected));
|
|
10792
|
+
} else if (forcedContent) {
|
|
10793
|
+
files.push(readyPlannedFile(path2, input.targetEntries.get(path2)?.ownership ?? input.sourceEntries.get(path2)?.ownership ?? classifyOwnership(path2), "update", "\u5408\u5E76\u5E73\u53F0\u4E0E\u4E0B\u6E38 migration \u5386\u53F2", expected, forcedContent));
|
|
10794
|
+
} else {
|
|
10795
|
+
files.push(await planFile(path2, input.artifactSet.baseDirectory, input.artifactSet.targetDirectory, input.sourceEntries.get(path2), input.targetEntries.get(path2), ours, input.provenance, input.migrations.contentOverrides.get(path2), input.manageGeneratedProjectOwned, input.forcePlatformBaseline, input.recipeProjectOwnedPaths.has(path2), input.migrateDshPlatform));
|
|
10796
|
+
}
|
|
10797
|
+
}
|
|
10798
|
+
return files;
|
|
10799
|
+
}
|
|
10800
|
+
|
|
10441
10801
|
// src/update/planner-modules.ts
|
|
10442
10802
|
function resolveModuleRecipeIds(request) {
|
|
10443
10803
|
const lifecycle = request.lifecycle;
|
|
@@ -10480,70 +10840,6 @@ function hasExistingSourceForTest(path2, sourcePaths) {
|
|
|
10480
10840
|
return sourceExtensions.some((extension) => sourcePaths.has(`${stem}${extension}`));
|
|
10481
10841
|
}
|
|
10482
10842
|
|
|
10483
|
-
// src/update/planner-snapshots.ts
|
|
10484
|
-
import { readFile as readFile21, stat as stat2 } from "fs/promises";
|
|
10485
|
-
import { join as join26 } from "path";
|
|
10486
|
-
async function snapshotProjectFiles(project, paths, seed) {
|
|
10487
|
-
const snapshots = new Map(seed);
|
|
10488
|
-
await Promise.all([...paths].filter((path2) => !snapshots.has(path2)).map(async (path2) => {
|
|
10489
|
-
snapshots.set(path2, await readOptional2(join26(project, path2)));
|
|
10490
|
-
}));
|
|
10491
|
-
return snapshots;
|
|
10492
|
-
}
|
|
10493
|
-
async function snapshotProjectModes(project, paths) {
|
|
10494
|
-
return new Map(await Promise.all([...paths].map(async (path2) => [path2, await readModeOptional(join26(project, path2))])));
|
|
10495
|
-
}
|
|
10496
|
-
async function assertPlanSnapshots(project, expectations) {
|
|
10497
|
-
const changed = [];
|
|
10498
|
-
for (const expectation2 of expectations) {
|
|
10499
|
-
const actual = expectationForSnapshot(await readOptional2(join26(project, expectation2.path)));
|
|
10500
|
-
if (JSON.stringify(actual) !== JSON.stringify(expectation2.expected)) {
|
|
10501
|
-
changed.push(expectation2.path);
|
|
10502
|
-
continue;
|
|
10503
|
-
}
|
|
10504
|
-
if ("mode" in expectation2 && await readModeOptional(join26(project, expectation2.path)) !== expectation2.mode) {
|
|
10505
|
-
changed.push(expectation2.path);
|
|
10506
|
-
}
|
|
10507
|
-
}
|
|
10508
|
-
if (changed.length) {
|
|
10509
|
-
throw new Error(`\u751F\u6210\u66F4\u65B0\u8BA1\u5212\u671F\u95F4\u5019\u9009\u6587\u4EF6\u53D1\u751F\u53D8\u5316\uFF1A${changed.join("\u3001")}`);
|
|
10510
|
-
}
|
|
10511
|
-
}
|
|
10512
|
-
async function readModeOptional(path2) {
|
|
10513
|
-
try {
|
|
10514
|
-
return (await stat2(path2)).mode & 511;
|
|
10515
|
-
} catch (error) {
|
|
10516
|
-
if (isMissing7(error))
|
|
10517
|
-
return;
|
|
10518
|
-
throw error;
|
|
10519
|
-
}
|
|
10520
|
-
}
|
|
10521
|
-
async function readSourceParentMode(path2) {
|
|
10522
|
-
try {
|
|
10523
|
-
const info = await stat2(path2);
|
|
10524
|
-
if (!info.isDirectory()) {
|
|
10525
|
-
throw new Error(`artifact \u6E90\u7801\u7236\u8DEF\u5F84\u4E0D\u662F\u76EE\u5F55\uFF1A${path2}`);
|
|
10526
|
-
}
|
|
10527
|
-
return info.mode & 493 | 493;
|
|
10528
|
-
} catch (error) {
|
|
10529
|
-
if (isMissing7(error))
|
|
10530
|
-
return 493;
|
|
10531
|
-
throw error;
|
|
10532
|
-
}
|
|
10533
|
-
}
|
|
10534
|
-
async function readOptional2(path2) {
|
|
10535
|
-
try {
|
|
10536
|
-
return await readFile21(path2);
|
|
10537
|
-
} catch (error) {
|
|
10538
|
-
if (isMissing7(error))
|
|
10539
|
-
return;
|
|
10540
|
-
throw error;
|
|
10541
|
-
}
|
|
10542
|
-
}
|
|
10543
|
-
function isMissing7(error) {
|
|
10544
|
-
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
10545
|
-
}
|
|
10546
|
-
|
|
10547
10843
|
// src/update/preflight.ts
|
|
10548
10844
|
async function assertProjectReadyForUpdate(projectDirectory) {
|
|
10549
10845
|
await assertNoPendingUpdate(projectDirectory);
|
|
@@ -10564,12 +10860,45 @@ function resolveUpdateTargetModules(sourceModules, explicitTarget) {
|
|
|
10564
10860
|
});
|
|
10565
10861
|
}
|
|
10566
10862
|
|
|
10863
|
+
// src/update/legacy-python-agent-retirement.ts
|
|
10864
|
+
import { lstat as lstat8, readFile as readFile22 } from "fs/promises";
|
|
10865
|
+
import { join as join28 } from "path";
|
|
10866
|
+
var retiredKeys = [
|
|
10867
|
+
"AGENT_DATABASE_URL",
|
|
10868
|
+
"AGENT_RUN_STORE_PATH",
|
|
10869
|
+
"AGENT_RUN_ENCRYPTION_SECRET",
|
|
10870
|
+
"AI_PROVIDER_AUDIT_STORE_PATH",
|
|
10871
|
+
"AI_PROVIDER_CONNECT_TIMEOUT_MS",
|
|
10872
|
+
"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT",
|
|
10873
|
+
"OTEL_EXPORTER_OTLP_HEADERS"
|
|
10874
|
+
];
|
|
10875
|
+
async function inspectPythonAgentRetirement(projectDirectory) {
|
|
10876
|
+
const path2 = join28(projectDirectory, ".env");
|
|
10877
|
+
try {
|
|
10878
|
+
const stat3 = await lstat8(path2);
|
|
10879
|
+
if (stat3.isSymbolicLink() || !stat3.isFile())
|
|
10880
|
+
return [
|
|
10881
|
+
{
|
|
10882
|
+
kind: "external-environment",
|
|
10883
|
+
path: ".env",
|
|
10884
|
+
message: "\u672A\u8BFB\u53D6\u5916\u90E8\u6258\u7BA1\u6216\u975E\u5E38\u89C4 .env\uFF1B\u8BF7\u6838\u5BF9\u65E7 Python Agent \u4E13\u7528\u914D\u7F6E\uFF0C\u4F7F\u7528\u65B0 DSH \u5B58\u50A8\u4E0E\u52A0\u5BC6\u914D\u7F6E\u3002"
|
|
10885
|
+
}
|
|
10886
|
+
];
|
|
10887
|
+
const content = await readFile22(path2, "utf8");
|
|
10888
|
+
return retiredKeys.filter((key) => new RegExp(`^(?:export\\s+)?${key}\\s*=`, "m").test(content)).map((key) => ({
|
|
10889
|
+
kind: "environment-key",
|
|
10890
|
+
path: ".env",
|
|
10891
|
+
key,
|
|
10892
|
+
message: `${key} \u4E0D\u518D\u7531\u65B0 Agent Server \u8BFB\u53D6\uFF1B\u73AF\u5883\u4E0E\u65E7 Agent \u6570\u636E\u7531\u9879\u76EE\u6240\u6709\u8005\u5907\u4EFD\u540E\u4EBA\u5DE5\u6E05\u7406\uFF0C\u4E0D\u5F71\u54CD\u5176\u5B83\u670D\u52A1\u540C\u540D\u914D\u7F6E\u3002`
|
|
10893
|
+
}));
|
|
10894
|
+
} catch (error) {
|
|
10895
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
10896
|
+
return [];
|
|
10897
|
+
throw error;
|
|
10898
|
+
}
|
|
10899
|
+
}
|
|
10900
|
+
|
|
10567
10901
|
// src/update/planner.ts
|
|
10568
|
-
var metadataPaths = new Set([
|
|
10569
|
-
".windy/generation.json",
|
|
10570
|
-
".windy/files.json",
|
|
10571
|
-
".windy-template.json"
|
|
10572
|
-
]);
|
|
10573
10902
|
var oxcManagedPaths = new Set([
|
|
10574
10903
|
".oxfmtrc.json",
|
|
10575
10904
|
".oxlintrc.json",
|
|
@@ -10577,8 +10906,8 @@ var oxcManagedPaths = new Set([
|
|
|
10577
10906
|
]);
|
|
10578
10907
|
async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
10579
10908
|
await assertProjectReadyForUpdate(request.projectDirectory);
|
|
10580
|
-
const manifestPath =
|
|
10581
|
-
const expectedManifestHash = hashContent(await
|
|
10909
|
+
const manifestPath = join29(request.projectDirectory, ".windy/files.json");
|
|
10910
|
+
const expectedManifestHash = hashContent(await readFile23(manifestPath));
|
|
10582
10911
|
const generationSnapshot = await readGenerationProvenanceSnapshot(request.projectDirectory);
|
|
10583
10912
|
const provenance = generationSnapshot.provenance;
|
|
10584
10913
|
const targetModules = resolveUpdateTargetModules(provenance.modules.map(({ name }) => name), request.targetModules);
|
|
@@ -10590,7 +10919,17 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10590
10919
|
}
|
|
10591
10920
|
const versionRecipes = (dependencies.resolveVersionRecipes ?? resolveRecipeChain)(provenance.windyVersion, targetVersion);
|
|
10592
10921
|
const moduleRecipes = resolveModuleRecipeIds(request);
|
|
10593
|
-
const
|
|
10922
|
+
const migrateDshPlatform = await isDshPlatformTransition({
|
|
10923
|
+
baseDirectory: artifactSet.baseDirectory,
|
|
10924
|
+
targetDirectory: artifactSet.targetDirectory,
|
|
10925
|
+
sourceModules: provenance.modules.map(({ name }) => name),
|
|
10926
|
+
targetModules
|
|
10927
|
+
});
|
|
10928
|
+
const recipes2 = [
|
|
10929
|
+
...versionRecipes.map(({ id }) => id),
|
|
10930
|
+
...moduleRecipes,
|
|
10931
|
+
...migrateDshPlatform ? [dshPlatformRecipeId] : []
|
|
10932
|
+
];
|
|
10594
10933
|
const recipeProjectOwnedPaths = recipeManagedProjectOwnedPaths(recipes2);
|
|
10595
10934
|
const [rawSourceManifest, rawTargetManifest] = await Promise.all([
|
|
10596
10935
|
readManagedFilesManifest(request.projectDirectory),
|
|
@@ -10625,8 +10964,10 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10625
10964
|
const paths = new Set([...sourceEntries.keys(), ...targetEntries.keys()]);
|
|
10626
10965
|
for (const path2 of paths) {
|
|
10627
10966
|
if (!projectSnapshots.has(path2)) {
|
|
10628
|
-
projectSnapshots.set(path2, await
|
|
10629
|
-
|
|
10967
|
+
projectSnapshots.set(path2, await readOptional(join29(request.projectDirectory, path2)));
|
|
10968
|
+
}
|
|
10969
|
+
if (!projectModes.has(path2)) {
|
|
10970
|
+
projectModes.set(path2, await readModeOptional(join29(request.projectDirectory, path2)));
|
|
10630
10971
|
}
|
|
10631
10972
|
}
|
|
10632
10973
|
const files = await planFiles({
|
|
@@ -10639,7 +10980,8 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10639
10980
|
provenance,
|
|
10640
10981
|
manageGeneratedProjectOwned: request.targetModules !== undefined,
|
|
10641
10982
|
forcePlatformBaseline: request.forcePlatformBaseline === true,
|
|
10642
|
-
recipeProjectOwnedPaths
|
|
10983
|
+
recipeProjectOwnedPaths,
|
|
10984
|
+
migrateDshPlatform
|
|
10643
10985
|
});
|
|
10644
10986
|
preserveTestsForExistingProjectOwnedSources(files, sourceEntries);
|
|
10645
10987
|
await deriveDockerfilePlans(files, projectSnapshots, new Set([
|
|
@@ -10650,10 +10992,10 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10650
10992
|
for (const file of files) {
|
|
10651
10993
|
file.expectedProjectMode = projectModes.get(file.path);
|
|
10652
10994
|
if (file.action === "create" || file.action === "update") {
|
|
10653
|
-
file.mode = file.expectedProjectMode ?? await readModeOptional(
|
|
10995
|
+
file.mode = file.expectedProjectMode ?? await readModeOptional(join29(artifactSet.targetDirectory, file.path));
|
|
10654
10996
|
}
|
|
10655
10997
|
if (file.action === "create") {
|
|
10656
|
-
file.parentMode = await readSourceParentMode(
|
|
10998
|
+
file.parentMode = await readSourceParentMode(join29(artifactSet.targetDirectory, dirname9(file.path)));
|
|
10657
10999
|
}
|
|
10658
11000
|
}
|
|
10659
11001
|
const plannedPaths = new Set(files.map(({ path: path2 }) => path2));
|
|
@@ -10673,8 +11015,11 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10673
11015
|
...migrations.conflicts,
|
|
10674
11016
|
...files.flatMap((file) => file.conflict ? [`${file.path}\uFF1A${file.conflict}`] : [])
|
|
10675
11017
|
];
|
|
10676
|
-
const manualCleanup =
|
|
10677
|
-
|
|
11018
|
+
const manualCleanup = [
|
|
11019
|
+
...await inspectAdkRetirement(request.projectDirectory),
|
|
11020
|
+
...migrateDshPlatform ? await inspectPythonAgentRetirement(request.projectDirectory) : []
|
|
11021
|
+
];
|
|
11022
|
+
if (hashContent(await readFile23(manifestPath)) !== expectedManifestHash) {
|
|
10678
11023
|
throw new Error("\u751F\u6210\u66F4\u65B0\u8BA1\u5212\u671F\u95F4\u53D7\u7BA1\u6E05\u5355\u53D1\u751F\u53D8\u5316");
|
|
10679
11024
|
}
|
|
10680
11025
|
await assertPlanSnapshots(request.projectDirectory, [
|
|
@@ -10707,24 +11052,6 @@ async function createUpdatePlan(request, artifacts, dependencies = {}) {
|
|
|
10707
11052
|
lifecycle: request.lifecycle
|
|
10708
11053
|
};
|
|
10709
11054
|
}
|
|
10710
|
-
async function planFiles(input) {
|
|
10711
|
-
const files = [];
|
|
10712
|
-
for (const path2 of [...input.paths].sort()) {
|
|
10713
|
-
if (metadataPaths.has(path2))
|
|
10714
|
-
continue;
|
|
10715
|
-
const forcedContent = input.migrations.forceUpdates.has(path2) ? input.migrations.contentOverrides.get(path2) : undefined;
|
|
10716
|
-
const ours = input.projectSnapshots.get(path2);
|
|
10717
|
-
const expected = expectationForSnapshot(ours);
|
|
10718
|
-
if (input.migrations.forcePreserves.has(path2)) {
|
|
10719
|
-
files.push(readyPlannedFile(path2, input.sourceEntries.get(path2)?.ownership ?? classifyOwnership(path2), "preserve", "\u4FDD\u7559\u9879\u76EE\u5DF2\u53D1\u5E03 migration \u5386\u53F2", expected));
|
|
10720
|
-
} else if (forcedContent) {
|
|
10721
|
-
files.push(readyPlannedFile(path2, input.targetEntries.get(path2)?.ownership ?? input.sourceEntries.get(path2)?.ownership ?? classifyOwnership(path2), "update", "\u5408\u5E76\u5E73\u53F0\u4E0E\u4E0B\u6E38 migration \u5386\u53F2", expected, forcedContent));
|
|
10722
|
-
} else {
|
|
10723
|
-
files.push(await planFile(path2, input.artifactSet.baseDirectory, input.artifactSet.targetDirectory, input.sourceEntries.get(path2), input.targetEntries.get(path2), ours, input.provenance, input.migrations.contentOverrides.get(path2), input.manageGeneratedProjectOwned, input.forcePlatformBaseline, input.recipeProjectOwnedPaths.has(path2)));
|
|
10724
|
-
}
|
|
10725
|
-
}
|
|
10726
|
-
return files;
|
|
10727
|
-
}
|
|
10728
11055
|
function createUpdateId(from, to) {
|
|
10729
11056
|
return `${new Date().toISOString().replaceAll(/[:.]/g, "-")}-${from}-to-${to}`;
|
|
10730
11057
|
}
|
|
@@ -10800,9 +11127,9 @@ function frozenManifestHash(file, finalizedHashes) {
|
|
|
10800
11127
|
}
|
|
10801
11128
|
|
|
10802
11129
|
// src/update/format-stabilizer.ts
|
|
10803
|
-
import { mkdir as mkdir8, mkdtemp as mkdtemp3, readFile as
|
|
11130
|
+
import { mkdir as mkdir8, mkdtemp as mkdtemp3, readFile as readFile24, rm as rm7, writeFile as writeFile13 } from "fs/promises";
|
|
10804
11131
|
import { tmpdir as tmpdir3 } from "os";
|
|
10805
|
-
import { dirname as dirname10, extname as extname4, join as
|
|
11132
|
+
import { dirname as dirname10, extname as extname4, join as join30, resolve as resolve6, sep as sep5 } from "path";
|
|
10806
11133
|
var formattedExtensions = new Set([
|
|
10807
11134
|
".cjs",
|
|
10808
11135
|
".css",
|
|
@@ -10841,7 +11168,7 @@ async function stabilizeManagedContent(result2, execute, writeProjectFile) {
|
|
|
10841
11168
|
}
|
|
10842
11169
|
}
|
|
10843
11170
|
inputs.set(".windy/generation.json", new TextEncoder().encode(generationContent));
|
|
10844
|
-
const temporaryRoot = await mkdtemp3(
|
|
11171
|
+
const temporaryRoot = await mkdtemp3(join30(tmpdir3(), "windy-update-format-"));
|
|
10845
11172
|
try {
|
|
10846
11173
|
const stagedPaths = await stageInputs(temporaryRoot, inputs);
|
|
10847
11174
|
for (let offset = 0;offset < stagedPaths.length; offset += 80) {
|
|
@@ -10849,14 +11176,14 @@ async function stabilizeManagedContent(result2, execute, writeProjectFile) {
|
|
|
10849
11176
|
"x",
|
|
10850
11177
|
"oxfmt",
|
|
10851
11178
|
"--write",
|
|
10852
|
-
`--config=${
|
|
11179
|
+
`--config=${join30(result2.plan.projectDirectory, ".oxfmtrc.json")}`,
|
|
10853
11180
|
...stagedPaths.slice(offset, offset + 80)
|
|
10854
11181
|
], result2.plan.projectDirectory);
|
|
10855
11182
|
}
|
|
10856
11183
|
const hashes = plannedContentHashes(result2);
|
|
10857
11184
|
let formattedGeneration = generationContent;
|
|
10858
11185
|
for (const [path2, original] of inputs) {
|
|
10859
|
-
const formatted = await
|
|
11186
|
+
const formatted = await readFile24(safeTemporaryPath(temporaryRoot, path2));
|
|
10860
11187
|
if (path2 === ".windy/generation.json") {
|
|
10861
11188
|
formattedGeneration = formatted.toString();
|
|
10862
11189
|
continue;
|
|
@@ -10897,8 +11224,8 @@ function safeTemporaryPath(root, path2) {
|
|
|
10897
11224
|
}
|
|
10898
11225
|
|
|
10899
11226
|
// src/update/project-quality-verification.ts
|
|
10900
|
-
import { readFile as
|
|
10901
|
-
import { join as
|
|
11227
|
+
import { readFile as readFile25 } from "fs/promises";
|
|
11228
|
+
import { join as join31 } from "path";
|
|
10902
11229
|
var qualityScriptNames = ["lint", "typecheck", "test", "build"];
|
|
10903
11230
|
function skippedProjectQualityVerification() {
|
|
10904
11231
|
return {
|
|
@@ -10912,7 +11239,7 @@ function skippedProjectQualityVerification() {
|
|
|
10912
11239
|
};
|
|
10913
11240
|
}
|
|
10914
11241
|
async function runProjectQualityVerification(projectDirectory, execute) {
|
|
10915
|
-
const packageJson = JSON.parse(await
|
|
11242
|
+
const packageJson = JSON.parse(await readFile25(join31(projectDirectory, "package.json"), "utf8"));
|
|
10916
11243
|
const steps = [];
|
|
10917
11244
|
for (const name of qualityScriptNames) {
|
|
10918
11245
|
const stepName = `bun run ${name}`;
|
|
@@ -11790,39 +12117,7 @@ async function runLifecycleCommand(args, dependencies = {}) {
|
|
|
11790
12117
|
console.log("\u7528\u6CD5\uFF1Acreate-windy sync-docker [--cwd <project-directory>]");
|
|
11791
12118
|
return true;
|
|
11792
12119
|
}
|
|
11793
|
-
|
|
11794
|
-
requireAnchors: true
|
|
11795
|
-
}).then((result2) => ({ target, result: result2 }))));
|
|
11796
|
-
if (plans.some(({ result: result2 }) => !result2.synced)) {
|
|
11797
|
-
throw new Error("\u9879\u76EE\u7F3A\u5C11\u53D7\u652F\u6301\u7684 Dockerfile\uFF0C\u65E0\u6CD5\u540C\u6B65 COPY \u6E05\u5355");
|
|
11798
|
-
}
|
|
11799
|
-
const changed = plans.filter(({ result: result2 }) => result2.changed && result2.content !== undefined);
|
|
11800
|
-
if (changed.length) {
|
|
11801
|
-
const membershipExpectations = plans.flatMap(({ result: result2 }) => result2.membershipExpectations);
|
|
11802
|
-
await assertWorkspaceMembership(projectDirectory, membershipExpectations);
|
|
11803
|
-
const state = await applyMetadataTransaction({
|
|
11804
|
-
id: `sync-docker-${Date.now()}`,
|
|
11805
|
-
projectDirectory,
|
|
11806
|
-
guards: plans.flatMap(({ result: result2 }) => result2.expectations),
|
|
11807
|
-
writes: changed.map(({ target, result: result2 }) => ({
|
|
11808
|
-
path: target.dockerfilePath,
|
|
11809
|
-
content: result2.content
|
|
11810
|
-
}))
|
|
11811
|
-
});
|
|
11812
|
-
await finalizeOwnedTransaction({
|
|
11813
|
-
projectDirectory,
|
|
11814
|
-
ownerToken: state.ownerToken,
|
|
11815
|
-
expectations: changed.map(({ target, result: result2 }) => ({
|
|
11816
|
-
path: target.dockerfilePath,
|
|
11817
|
-
expected: {
|
|
11818
|
-
kind: "hash",
|
|
11819
|
-
value: hashContent(result2.content)
|
|
11820
|
-
}
|
|
11821
|
-
})),
|
|
11822
|
-
workspaceMembershipExpectations: membershipExpectations
|
|
11823
|
-
});
|
|
11824
|
-
}
|
|
11825
|
-
console.log(changed.length ? "\u5DF2\u540C\u6B65 Server \u4E0E Web Dockerfile workspace COPY \u6E05\u5355" : "Server \u4E0E Web Dockerfile workspace COPY \u6E05\u5355\u5DF2\u662F\u6700\u65B0");
|
|
12120
|
+
await synchronizeDockerfiles(projectDirectory);
|
|
11826
12121
|
return true;
|
|
11827
12122
|
}
|
|
11828
12123
|
if (command === "doctor") {
|
|
@@ -12021,20 +12316,20 @@ import {
|
|
|
12021
12316
|
cp,
|
|
12022
12317
|
mkdir as mkdir9,
|
|
12023
12318
|
mkdtemp as mkdtemp4,
|
|
12024
|
-
readFile as
|
|
12319
|
+
readFile as readFile27,
|
|
12025
12320
|
readdir as readdir9,
|
|
12026
12321
|
rename as rename2,
|
|
12027
12322
|
rm as rm11,
|
|
12028
12323
|
writeFile as writeFile14
|
|
12029
12324
|
} from "fs/promises";
|
|
12030
|
-
import { dirname as dirname11, join as
|
|
12325
|
+
import { dirname as dirname11, join as join32, relative as relative7 } from "path";
|
|
12031
12326
|
|
|
12032
12327
|
// src/module-schema/config.ts
|
|
12033
|
-
import { readFile as
|
|
12328
|
+
import { readFile as readFile26 } from "fs/promises";
|
|
12034
12329
|
import { isAbsolute as isAbsolute2, relative as relative6, resolve as resolve9 } from "path";
|
|
12035
12330
|
async function readModuleSchemaLineageConfig(projectDirectory, configPath) {
|
|
12036
12331
|
const absolutePath = resolveProjectPath(projectDirectory, configPath);
|
|
12037
|
-
const parsed = JSON.parse(await
|
|
12332
|
+
const parsed = JSON.parse(await readFile26(absolutePath, "utf8"));
|
|
12038
12333
|
if (!isConfig(parsed)) {
|
|
12039
12334
|
throw new Error("Module schema lineage \u914D\u7F6E\u65E0\u6548");
|
|
12040
12335
|
}
|
|
@@ -12168,17 +12463,17 @@ async function handoffModuleSchemaLineages(options) {
|
|
|
12168
12463
|
async function stageModuleLineages(project, temporaryRoot, config, execute) {
|
|
12169
12464
|
const outputs = [];
|
|
12170
12465
|
for (const [index, module2] of config.modules.entries()) {
|
|
12171
|
-
const output =
|
|
12466
|
+
const output = join32(temporaryRoot, `module-${index}`);
|
|
12172
12467
|
await mkdir9(output, { recursive: true });
|
|
12173
|
-
const generatedConfig =
|
|
12468
|
+
const generatedConfig = join32(temporaryRoot, `module-${index}.config.ts`);
|
|
12174
12469
|
await writeDrizzleConfig(generatedConfig, project, module2.schema, relative7(temporaryRoot, output));
|
|
12175
12470
|
await execute(generatedConfig, temporaryRoot);
|
|
12176
12471
|
const sqlFiles = await listSqlFiles(output);
|
|
12177
12472
|
if (sqlFiles.length !== 1) {
|
|
12178
12473
|
throw new Error(`${module2.key} baseline \u5FC5\u987B\u6070\u597D\u751F\u6210\u4E00\u4E2A migration`);
|
|
12179
12474
|
}
|
|
12180
|
-
await writeFile14(
|
|
12181
|
-
await writeFile14(
|
|
12475
|
+
await writeFile14(join32(output, sqlFiles[0]), metadataOnlySql("module"));
|
|
12476
|
+
await writeFile14(join32(output, "lineage.json"), `${JSON.stringify({
|
|
12182
12477
|
schemaVersion: 1,
|
|
12183
12478
|
moduleKey: module2.key,
|
|
12184
12479
|
schema: module2.schema,
|
|
@@ -12192,25 +12487,25 @@ async function stageModuleLineages(project, temporaryRoot, config, execute) {
|
|
|
12192
12487
|
}
|
|
12193
12488
|
async function stagePlatformLineage(project, temporaryRoot, config, execute) {
|
|
12194
12489
|
const source = resolveProjectPath(project, config.platform.out);
|
|
12195
|
-
const output =
|
|
12490
|
+
const output = join32(temporaryRoot, "platform");
|
|
12196
12491
|
await cp(source, output, { recursive: true });
|
|
12197
12492
|
const before = new Set(await listSqlFiles(output));
|
|
12198
|
-
const generatedConfig =
|
|
12493
|
+
const generatedConfig = join32(temporaryRoot, "platform.config.ts");
|
|
12199
12494
|
await writeDrizzleConfig(generatedConfig, project, config.platform.schema, relative7(temporaryRoot, output));
|
|
12200
12495
|
await execute(generatedConfig, temporaryRoot);
|
|
12201
12496
|
const created = (await listSqlFiles(output)).filter((path2) => !before.has(path2));
|
|
12202
12497
|
if (created.length !== 1) {
|
|
12203
12498
|
throw new Error("\u5E73\u53F0 lineage handoff \u5FC5\u987B\u6070\u597D\u751F\u6210\u4E00\u4E2A migration");
|
|
12204
12499
|
}
|
|
12205
|
-
const sqlPath =
|
|
12500
|
+
const sqlPath = join32(output, created[0]);
|
|
12206
12501
|
const allowed = config.modules.flatMap(({ legacyPlatformTables }) => legacyPlatformTables);
|
|
12207
|
-
validatePlatformHandoffSql(await
|
|
12502
|
+
validatePlatformHandoffSql(await readFile27(sqlPath, "utf8"), allowed);
|
|
12208
12503
|
await writeFile14(sqlPath, metadataOnlySql("platform"));
|
|
12209
12504
|
return output;
|
|
12210
12505
|
}
|
|
12211
12506
|
async function installStagedLineages(project, temporaryRoot, config, stagedModules, stagedPlatform) {
|
|
12212
12507
|
const platform = resolveProjectPath(project, config.platform.out);
|
|
12213
|
-
const backup =
|
|
12508
|
+
const backup = join32(temporaryRoot, "platform-backup");
|
|
12214
12509
|
const installed = [];
|
|
12215
12510
|
await rename2(platform, backup);
|
|
12216
12511
|
try {
|
|
@@ -12257,9 +12552,9 @@ async function validateSchemaSources(project, config) {
|
|
|
12257
12552
|
}
|
|
12258
12553
|
}
|
|
12259
12554
|
async function createTemporaryRoot(project) {
|
|
12260
|
-
const windy =
|
|
12555
|
+
const windy = join32(project, ".windy");
|
|
12261
12556
|
await mkdir9(windy, { recursive: true });
|
|
12262
|
-
return await mkdtemp4(
|
|
12557
|
+
return await mkdtemp4(join32(windy, "module-schema-handoff-"));
|
|
12263
12558
|
}
|
|
12264
12559
|
async function listSqlFiles(root) {
|
|
12265
12560
|
return (await readdir9(root)).filter((path2) => path2.endsWith(".sql")).sort();
|
|
@@ -12307,7 +12602,7 @@ import { resolve as resolve14 } from "path";
|
|
|
12307
12602
|
|
|
12308
12603
|
// src/package-configuration.ts
|
|
12309
12604
|
import { createHash as createHash5 } from "crypto";
|
|
12310
|
-
import { readFile as
|
|
12605
|
+
import { readFile as readFile28 } from "fs/promises";
|
|
12311
12606
|
import { isAbsolute as isAbsolute3, normalize, relative as relative8, resolve as resolve11, sep as sep6 } from "path";
|
|
12312
12607
|
|
|
12313
12608
|
// src/package-types.ts
|
|
@@ -12331,7 +12626,7 @@ async function readPackageConfiguration(projectDirectory) {
|
|
|
12331
12626
|
const path2 = resolve11(projectDirectory, configurationFile);
|
|
12332
12627
|
let source;
|
|
12333
12628
|
try {
|
|
12334
|
-
source = await
|
|
12629
|
+
source = await readFile28(path2, "utf8");
|
|
12335
12630
|
} catch (error) {
|
|
12336
12631
|
if (error.code === "ENOENT") {
|
|
12337
12632
|
throw new Error("\u672A\u58F0\u660E\u6253\u5305\u9002\u914D\u5668\uFF1A\u9879\u76EE\u6839\u76EE\u5F55\u7F3A\u5C11 windy.build.json", {
|
|
@@ -12662,7 +12957,7 @@ function failed(sourceRevision, diagnostic, artifacts2 = []) {
|
|
|
12662
12957
|
}
|
|
12663
12958
|
|
|
12664
12959
|
// src/package-plan.ts
|
|
12665
|
-
import { readFile as
|
|
12960
|
+
import { readFile as readFile29, realpath as realpath3, writeFile as writeFile15 } from "fs/promises";
|
|
12666
12961
|
import { dirname as dirname12, relative as relative10, resolve as resolve13 } from "path";
|
|
12667
12962
|
function resolvePackageProfile(configuration, profileKey) {
|
|
12668
12963
|
const profile = configuration.profiles.find(({ key }) => key === profileKey);
|
|
@@ -12742,7 +13037,7 @@ function assertFrozenPlanCurrent(input) {
|
|
|
12742
13037
|
}
|
|
12743
13038
|
async function readFrozenPackagePlan(path2) {
|
|
12744
13039
|
try {
|
|
12745
|
-
return parseFrozenPackagePlan(JSON.parse(await
|
|
13040
|
+
return parseFrozenPackagePlan(JSON.parse(await readFile29(path2, "utf8")));
|
|
12746
13041
|
} catch (error) {
|
|
12747
13042
|
if (error instanceof Error && error.message.startsWith("\u51BB\u7ED3\u6253\u5305\u8BA1\u5212"))
|
|
12748
13043
|
throw error;
|