mayura 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/adapter-code-docker/index.d.ts +1 -0
- package/adapter-code-docker/index.js +1 -0
- package/adapter-code-quickjs/index.d.ts +1 -0
- package/adapter-code-quickjs/index.js +1 -0
- package/adapter-mcp/index.d.ts +1 -0
- package/adapter-mcp/index.js +1 -0
- package/artifacts/files/index.d.ts +1 -0
- package/artifacts/files/index.js +1 -0
- package/artifacts/index.d.ts +1 -0
- package/artifacts/index.js +1 -0
- package/auth/better-auth/index.d.ts +1 -0
- package/auth/better-auth/index.js +1 -0
- package/auth/index.d.ts +1 -0
- package/auth/index.js +1 -0
- package/auth/testing/index.d.ts +1 -0
- package/auth/testing/index.js +1 -0
- package/browser/index.d.ts +1 -0
- package/browser/index.js +1 -0
- package/browser/local/index.d.ts +1 -0
- package/browser/local/index.js +1 -0
- package/browser/testing/index.d.ts +1 -0
- package/browser/testing/index.js +1 -0
- package/cli/deploy/index.d.ts +1 -0
- package/cli/deploy/index.js +1 -0
- package/cli/index.d.ts +1 -0
- package/cli/index.js +1 -0
- package/client/forms/index.d.ts +1 -0
- package/client/forms/index.js +1 -0
- package/client/headless/index.d.ts +1 -0
- package/client/headless/index.js +1 -0
- package/client/index.d.ts +1 -0
- package/client/index.js +1 -0
- package/client/workflows/index.d.ts +1 -0
- package/client/workflows/index.js +1 -0
- package/client-react/components/index.d.ts +1 -0
- package/client-react/components/index.js +1 -0
- package/client-react/index.d.ts +1 -0
- package/client-react/index.js +1 -0
- package/code-mode/index.d.ts +1 -0
- package/code-mode/index.js +1 -0
- package/code-mode-workflows/index.d.ts +1 -0
- package/code-mode-workflows/index.js +1 -0
- package/context/index.d.ts +1 -0
- package/context/index.js +1 -0
- package/core/host/index.d.ts +1 -0
- package/core/host/index.js +1 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/docs/README.md +10 -1
- package/docs/cli/deploy.md +154 -0
- package/docs/cli/overview.md +1 -0
- package/docs/cli/run.md +182 -182
- package/docs/guides/artifacts.md +29 -4
- package/docs/guides/authentication.md +246 -0
- package/docs/guides/browsers.md +189 -0
- package/docs/guides/deployment.md +45 -4
- package/docs/guides/files.md +188 -0
- package/docs/guides/model-providers.md +3 -0
- package/docs/guides/model-registry.md +184 -0
- package/docs/guides/observability.md +78 -1
- package/docs/guides/sandboxes.md +242 -0
- package/docs/guides/storage.md +195 -1
- package/docs/guides/testing.md +1 -0
- package/docs/guides/voice.md +100 -0
- package/docs/installation.md +16 -1
- package/docs/introduction.md +10 -5
- package/docs/project/security.md +8 -4
- package/docs/project/support.md +28 -7
- package/docs/project/versioning.md +9 -7
- package/docs/project/whats-new.md +78 -0
- package/docs/reference/entry-points.md +19 -1
- package/docs/reference/integrations.md +169 -0
- package/exporter-otlp/index.d.ts +1 -0
- package/exporter-otlp/index.js +1 -0
- package/exporter-otlp/opentelemetry/index.d.ts +1 -0
- package/exporter-otlp/opentelemetry/index.js +1 -0
- package/files/index.d.ts +1 -0
- package/files/index.js +1 -0
- package/guardrails/index.d.ts +1 -0
- package/guardrails/index.js +1 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/keys/index.d.ts +1 -0
- package/keys/index.js +1 -0
- package/keys/testing/index.d.ts +1 -0
- package/keys/testing/index.js +1 -0
- package/lib/adapter-code-docker/image/Dockerfile +1 -1
- package/lib/adapter-code-docker/package.json +1 -1
- package/lib/adapter-code-quickjs/package.json +1 -1
- package/lib/adapter-mcp/package.json +1 -1
- package/lib/artifacts/dist/files-store.d.ts +27 -0
- package/lib/artifacts/dist/files-store.d.ts.map +1 -0
- package/lib/artifacts/dist/files-store.js +390 -0
- package/lib/artifacts/dist/files-store.js.map +1 -0
- package/lib/artifacts/dist/files.d.ts +3 -0
- package/lib/artifacts/dist/files.d.ts.map +1 -0
- package/lib/artifacts/dist/files.js +2 -0
- package/lib/artifacts/dist/files.js.map +1 -0
- package/lib/artifacts/dist/index.d.ts +1 -0
- package/lib/artifacts/dist/index.d.ts.map +1 -1
- package/lib/artifacts/dist/index.js +1 -0
- package/lib/artifacts/dist/index.js.map +1 -1
- package/lib/artifacts/dist/local-store.d.ts.map +1 -1
- package/lib/artifacts/dist/local-store.js +14 -415
- package/lib/artifacts/dist/local-store.js.map +1 -1
- package/lib/artifacts/dist/shared.d.ts +86 -0
- package/lib/artifacts/dist/shared.d.ts.map +1 -0
- package/lib/artifacts/dist/shared.js +437 -0
- package/lib/artifacts/dist/shared.js.map +1 -0
- package/lib/artifacts/package.json +1 -1
- package/lib/artifacts/src/files-store.ts +352 -0
- package/lib/artifacts/src/files.ts +7 -0
- package/lib/artifacts/src/index.ts +1 -0
- package/lib/artifacts/src/local-store.ts +18 -359
- package/lib/artifacts/src/shared.ts +413 -0
- package/lib/auth/dist/better-auth.d.ts +103 -0
- package/lib/auth/dist/better-auth.d.ts.map +1 -0
- package/lib/auth/dist/better-auth.js +113 -0
- package/lib/auth/dist/better-auth.js.map +1 -0
- package/lib/auth/dist/identity.d.ts +68 -0
- package/lib/auth/dist/identity.d.ts.map +1 -0
- package/lib/auth/dist/identity.js +123 -0
- package/lib/auth/dist/identity.js.map +1 -0
- package/lib/auth/dist/index.d.ts +7 -0
- package/lib/auth/dist/index.d.ts.map +1 -0
- package/lib/auth/dist/index.js +4 -0
- package/lib/auth/dist/index.js.map +1 -0
- package/lib/auth/dist/jwt.d.ts +65 -0
- package/lib/auth/dist/jwt.d.ts.map +1 -0
- package/lib/auth/dist/jwt.js +120 -0
- package/lib/auth/dist/jwt.js.map +1 -0
- package/lib/auth/dist/keys.d.ts +80 -0
- package/lib/auth/dist/keys.d.ts.map +1 -0
- package/lib/auth/dist/keys.js +252 -0
- package/lib/auth/dist/keys.js.map +1 -0
- package/lib/auth/dist/testing.d.ts +32 -0
- package/lib/auth/dist/testing.d.ts.map +1 -0
- package/lib/auth/dist/testing.js +61 -0
- package/lib/auth/dist/testing.js.map +1 -0
- package/lib/auth/package.json +5 -0
- package/lib/auth/src/better-auth.ts +151 -0
- package/lib/auth/src/identity.ts +142 -0
- package/lib/auth/src/index.ts +6 -0
- package/lib/auth/src/jwt.ts +126 -0
- package/lib/auth/src/keys.ts +238 -0
- package/lib/auth/src/testing.ts +74 -0
- package/lib/browser/dist/browsers.d.ts +141 -0
- package/lib/browser/dist/browsers.d.ts.map +1 -0
- package/lib/browser/dist/browsers.js +639 -0
- package/lib/browser/dist/browsers.js.map +1 -0
- package/lib/browser/dist/cdp.d.ts +67 -0
- package/lib/browser/dist/cdp.d.ts.map +1 -0
- package/lib/browser/dist/cdp.js +176 -0
- package/lib/browser/dist/cdp.js.map +1 -0
- package/lib/browser/dist/connect.d.ts +17 -0
- package/lib/browser/dist/connect.d.ts.map +1 -0
- package/lib/browser/dist/connect.js +28 -0
- package/lib/browser/dist/connect.js.map +1 -0
- package/lib/browser/dist/contracts.d.ts +70 -0
- package/lib/browser/dist/contracts.d.ts.map +1 -0
- package/lib/browser/dist/contracts.js +48 -0
- package/lib/browser/dist/contracts.js.map +1 -0
- package/lib/browser/dist/index.d.ts +14 -0
- package/lib/browser/dist/index.d.ts.map +1 -0
- package/lib/browser/dist/index.js +8 -0
- package/lib/browser/dist/index.js.map +1 -0
- package/lib/browser/dist/keys.d.ts +13 -0
- package/lib/browser/dist/keys.d.ts.map +1 -0
- package/lib/browser/dist/keys.js +37 -0
- package/lib/browser/dist/keys.js.map +1 -0
- package/lib/browser/dist/local/fixtures.d.ts +18 -0
- package/lib/browser/dist/local/fixtures.d.ts.map +1 -0
- package/lib/browser/dist/local/fixtures.js +40 -0
- package/lib/browser/dist/local/fixtures.js.map +1 -0
- package/lib/browser/dist/local/index.d.ts +23 -0
- package/lib/browser/dist/local/index.d.ts.map +1 -0
- package/lib/browser/dist/local/index.js +136 -0
- package/lib/browser/dist/local/index.js.map +1 -0
- package/lib/browser/dist/origins.d.ts +12 -0
- package/lib/browser/dist/origins.d.ts.map +1 -0
- package/lib/browser/dist/origins.js +47 -0
- package/lib/browser/dist/origins.js.map +1 -0
- package/lib/browser/dist/per-run.d.ts +31 -0
- package/lib/browser/dist/per-run.d.ts.map +1 -0
- package/lib/browser/dist/per-run.js +46 -0
- package/lib/browser/dist/per-run.js.map +1 -0
- package/lib/browser/dist/snapshot.d.ts +35 -0
- package/lib/browser/dist/snapshot.d.ts.map +1 -0
- package/lib/browser/dist/snapshot.js +74 -0
- package/lib/browser/dist/snapshot.js.map +1 -0
- package/lib/browser/dist/testing.d.ts +31 -0
- package/lib/browser/dist/testing.d.ts.map +1 -0
- package/lib/browser/dist/testing.js +145 -0
- package/lib/browser/dist/testing.js.map +1 -0
- package/lib/browser/dist/tools.d.ts +34 -0
- package/lib/browser/dist/tools.d.ts.map +1 -0
- package/lib/browser/dist/tools.js +119 -0
- package/lib/browser/dist/tools.js.map +1 -0
- package/lib/browser/package.json +5 -0
- package/lib/browser/src/browsers.ts +599 -0
- package/lib/browser/src/cdp.ts +161 -0
- package/lib/browser/src/connect.ts +40 -0
- package/lib/browser/src/contracts.ts +100 -0
- package/lib/browser/src/index.ts +13 -0
- package/lib/browser/src/keys.ts +39 -0
- package/lib/browser/src/local/fixtures.ts +41 -0
- package/lib/browser/src/local/index.ts +121 -0
- package/lib/browser/src/origins.ts +49 -0
- package/lib/browser/src/per-run.ts +54 -0
- package/lib/browser/src/snapshot.ts +73 -0
- package/lib/browser/src/testing.ts +155 -0
- package/lib/browser/src/tools.ts +156 -0
- package/lib/cli/dist/bin.js +52 -0
- package/lib/cli/dist/bin.js.map +1 -1
- package/lib/cli/dist/deploy-index.d.ts +4 -0
- package/lib/cli/dist/deploy-index.d.ts.map +1 -0
- package/lib/cli/dist/deploy-index.js +5 -0
- package/lib/cli/dist/deploy-index.js.map +1 -0
- package/lib/cli/dist/deploy-targets.d.ts +36 -0
- package/lib/cli/dist/deploy-targets.d.ts.map +1 -0
- package/lib/cli/dist/deploy-targets.js +276 -0
- package/lib/cli/dist/deploy-targets.js.map +1 -0
- package/lib/cli/dist/deploy.d.ts +161 -0
- package/lib/cli/dist/deploy.d.ts.map +1 -0
- package/lib/cli/dist/deploy.js +452 -0
- package/lib/cli/dist/deploy.js.map +1 -0
- package/lib/cli/dist/files.d.ts +26 -0
- package/lib/cli/dist/files.d.ts.map +1 -0
- package/lib/cli/dist/files.js +179 -0
- package/lib/cli/dist/files.js.map +1 -0
- package/lib/cli/dist/index.d.ts.map +1 -1
- package/lib/cli/dist/index.js +4 -174
- package/lib/cli/dist/index.js.map +1 -1
- package/lib/cli/dist/output.d.ts.map +1 -1
- package/lib/cli/dist/output.js +54 -0
- package/lib/cli/dist/output.js.map +1 -1
- package/lib/cli/package.json +1 -1
- package/lib/cli/src/bin.ts +35 -0
- package/lib/cli/src/deploy-index.ts +11 -0
- package/lib/cli/src/deploy-targets.ts +277 -0
- package/lib/cli/src/deploy.ts +419 -0
- package/lib/cli/src/files.ts +137 -0
- package/lib/cli/src/index.ts +4 -122
- package/lib/cli/src/output.ts +44 -0
- package/lib/client/package.json +1 -1
- package/lib/client-react/package.json +1 -1
- package/lib/code-mode/dist/index.d.ts.map +1 -1
- package/lib/code-mode/dist/index.js +3 -3
- package/lib/code-mode/dist/index.js.map +1 -1
- package/lib/code-mode/package.json +1 -1
- package/lib/code-mode/src/index.ts +3 -3
- package/lib/code-mode-workflows/dist/index.d.ts.map +1 -1
- package/lib/code-mode-workflows/dist/index.js +2 -2
- package/lib/code-mode-workflows/dist/index.js.map +1 -1
- package/lib/code-mode-workflows/package.json +1 -1
- package/lib/code-mode-workflows/src/index.ts +2 -2
- package/lib/context/package.json +1 -1
- package/lib/core/dist/bytes.d.ts +13 -0
- package/lib/core/dist/bytes.d.ts.map +1 -0
- package/lib/core/dist/bytes.js +128 -0
- package/lib/core/dist/bytes.js.map +1 -0
- package/lib/core/dist/contracts.d.ts +4 -0
- package/lib/core/dist/contracts.d.ts.map +1 -1
- package/lib/core/dist/contracts.js.map +1 -1
- package/lib/core/dist/host.d.ts +2 -0
- package/lib/core/dist/host.d.ts.map +1 -1
- package/lib/core/dist/host.js +2 -0
- package/lib/core/dist/host.js.map +1 -1
- package/lib/core/dist/pricing.d.ts +20 -0
- package/lib/core/dist/pricing.d.ts.map +1 -0
- package/lib/core/dist/pricing.js +10 -0
- package/lib/core/dist/pricing.js.map +1 -0
- package/lib/core/package.json +1 -1
- package/lib/core/src/bytes.ts +101 -0
- package/lib/core/src/contracts.ts +7 -1
- package/lib/core/src/host.ts +2 -0
- package/lib/core/src/pricing.ts +24 -0
- package/lib/exporter-otlp/dist/contracts.d.ts +25 -3
- package/lib/exporter-otlp/dist/contracts.d.ts.map +1 -1
- package/lib/exporter-otlp/dist/contracts.js.map +1 -1
- package/lib/exporter-otlp/dist/index.d.ts +2 -2
- package/lib/exporter-otlp/dist/index.d.ts.map +1 -1
- package/lib/exporter-otlp/dist/index.js +1 -1
- package/lib/exporter-otlp/dist/index.js.map +1 -1
- package/lib/exporter-otlp/dist/opentelemetry.d.ts +53 -0
- package/lib/exporter-otlp/dist/opentelemetry.d.ts.map +1 -0
- package/lib/exporter-otlp/dist/opentelemetry.js +209 -0
- package/lib/exporter-otlp/dist/opentelemetry.js.map +1 -0
- package/lib/exporter-otlp/dist/otlp-http-json.d.ts.map +1 -1
- package/lib/exporter-otlp/dist/otlp-http-json.js +11 -4
- package/lib/exporter-otlp/dist/otlp-http-json.js.map +1 -1
- package/lib/exporter-otlp/dist/protobuf.d.ts +9 -0
- package/lib/exporter-otlp/dist/protobuf.d.ts.map +1 -0
- package/lib/exporter-otlp/dist/protobuf.js +188 -0
- package/lib/exporter-otlp/dist/protobuf.js.map +1 -0
- package/lib/exporter-otlp/dist/run-traces.d.ts +3 -1
- package/lib/exporter-otlp/dist/run-traces.d.ts.map +1 -1
- package/lib/exporter-otlp/dist/run-traces.js +31 -4
- package/lib/exporter-otlp/dist/run-traces.js.map +1 -1
- package/lib/exporter-otlp/dist/signals.d.ts +8 -1
- package/lib/exporter-otlp/dist/signals.d.ts.map +1 -1
- package/lib/exporter-otlp/dist/signals.js +93 -26
- package/lib/exporter-otlp/dist/signals.js.map +1 -1
- package/lib/exporter-otlp/package.json +1 -1
- package/lib/exporter-otlp/src/contracts.ts +30 -3
- package/lib/exporter-otlp/src/index.ts +4 -1
- package/lib/exporter-otlp/src/opentelemetry.ts +157 -0
- package/lib/exporter-otlp/src/otlp-http-json.ts +10 -3
- package/lib/exporter-otlp/src/protobuf.ts +123 -0
- package/lib/exporter-otlp/src/run-traces.ts +24 -5
- package/lib/exporter-otlp/src/signals.ts +86 -25
- package/lib/files/dist/contracts.d.ts +155 -0
- package/lib/files/dist/contracts.d.ts.map +1 -0
- package/lib/files/dist/contracts.js +41 -0
- package/lib/files/dist/contracts.js.map +1 -0
- package/lib/files/dist/index.d.ts +7 -0
- package/lib/files/dist/index.d.ts.map +1 -0
- package/lib/files/dist/index.js +7 -0
- package/lib/files/dist/index.js.map +1 -0
- package/lib/files/dist/memory.d.ts +9 -0
- package/lib/files/dist/memory.d.ts.map +1 -0
- package/lib/files/dist/memory.js +70 -0
- package/lib/files/dist/memory.js.map +1 -0
- package/lib/files/dist/s3.d.ts +34 -0
- package/lib/files/dist/s3.d.ts.map +1 -0
- package/lib/files/dist/s3.js +232 -0
- package/lib/files/dist/s3.js.map +1 -0
- package/lib/files/dist/sigv4.d.ts +31 -0
- package/lib/files/dist/sigv4.d.ts.map +1 -0
- package/lib/files/dist/sigv4.js +47 -0
- package/lib/files/dist/sigv4.js.map +1 -0
- package/lib/files/dist/store.d.ts +19 -0
- package/lib/files/dist/store.d.ts.map +1 -0
- package/lib/files/dist/store.js +257 -0
- package/lib/files/dist/store.js.map +1 -0
- package/lib/files/dist/tools.d.ts +21 -0
- package/lib/files/dist/tools.d.ts.map +1 -0
- package/lib/files/dist/tools.js +155 -0
- package/lib/files/dist/tools.js.map +1 -0
- package/lib/files/dist/transport.d.ts +9 -0
- package/lib/files/dist/transport.d.ts.map +1 -0
- package/lib/files/dist/transport.js +53 -0
- package/lib/files/dist/transport.js.map +1 -0
- package/lib/files/package.json +5 -0
- package/lib/files/src/contracts.ts +174 -0
- package/lib/files/src/index.ts +6 -0
- package/lib/files/src/memory.ts +65 -0
- package/lib/files/src/s3.ts +196 -0
- package/lib/files/src/sigv4.ts +65 -0
- package/lib/files/src/store.ts +216 -0
- package/lib/files/src/tools.ts +140 -0
- package/lib/files/src/transport.ts +33 -0
- package/lib/guardrails/package.json +1 -1
- package/lib/helpers/package.json +1 -1
- package/lib/keys/dist/conformance.d.ts +14 -0
- package/lib/keys/dist/conformance.d.ts.map +1 -0
- package/lib/keys/dist/conformance.js +141 -0
- package/lib/keys/dist/conformance.js.map +1 -0
- package/lib/keys/dist/format.d.ts +19 -0
- package/lib/keys/dist/format.d.ts.map +1 -0
- package/lib/keys/dist/format.js +62 -0
- package/lib/keys/dist/format.js.map +1 -0
- package/lib/keys/dist/index.d.ts +6 -0
- package/lib/keys/dist/index.d.ts.map +1 -0
- package/lib/keys/dist/index.js +4 -0
- package/lib/keys/dist/index.js.map +1 -0
- package/lib/keys/dist/manager.d.ts +142 -0
- package/lib/keys/dist/manager.d.ts.map +1 -0
- package/lib/keys/dist/manager.js +430 -0
- package/lib/keys/dist/manager.js.map +1 -0
- package/lib/keys/dist/testing.d.ts +11 -0
- package/lib/keys/dist/testing.d.ts.map +1 -0
- package/lib/keys/dist/testing.js +68 -0
- package/lib/keys/dist/testing.js.map +1 -0
- package/lib/keys/dist/verifier.d.ts +40 -0
- package/lib/keys/dist/verifier.d.ts.map +1 -0
- package/lib/keys/dist/verifier.js +28 -0
- package/lib/keys/dist/verifier.js.map +1 -0
- package/lib/keys/package.json +5 -0
- package/lib/keys/src/conformance.ts +141 -0
- package/lib/keys/src/format.ts +63 -0
- package/lib/keys/src/index.ts +5 -0
- package/lib/keys/src/manager.ts +450 -0
- package/lib/keys/src/testing.ts +56 -0
- package/lib/keys/src/verifier.ts +49 -0
- package/lib/memory/dist/index.js +3 -3
- package/lib/memory/dist/index.js.map +1 -1
- package/lib/memory/dist/native.js +4 -4
- package/lib/memory/dist/native.js.map +1 -1
- package/lib/memory/dist/validation.d.ts.map +1 -1
- package/lib/memory/dist/validation.js +3 -3
- package/lib/memory/dist/validation.js.map +1 -1
- package/lib/memory/dist/vectors.d.ts.map +1 -1
- package/lib/memory/dist/vectors.js +16 -8
- package/lib/memory/dist/vectors.js.map +1 -1
- package/lib/memory/package.json +1 -1
- package/lib/memory/src/index.ts +3 -3
- package/lib/memory/src/native.ts +4 -4
- package/lib/memory/src/validation.ts +3 -3
- package/lib/memory/src/vectors.ts +10 -8
- package/lib/memory-remote/dist/index.d.ts.map +1 -1
- package/lib/memory-remote/dist/index.js +4 -5
- package/lib/memory-remote/dist/index.js.map +1 -1
- package/lib/memory-remote/package.json +1 -1
- package/lib/memory-remote/src/index.ts +4 -5
- package/lib/observability/dist/validation.d.ts.map +1 -1
- package/lib/observability/dist/validation.js +10 -3
- package/lib/observability/dist/validation.js.map +1 -1
- package/lib/observability/package.json +1 -1
- package/lib/observability/src/validation.ts +6 -3
- package/lib/provider-anthropic/dist/index.d.ts.map +1 -1
- package/lib/provider-anthropic/dist/index.js +4 -1
- package/lib/provider-anthropic/dist/index.js.map +1 -1
- package/lib/provider-anthropic/package.json +1 -1
- package/lib/provider-anthropic/src/index.ts +3 -1
- package/lib/provider-openai/dist/index.js +3 -3
- package/lib/provider-openai/dist/index.js.map +1 -1
- package/lib/provider-openai/package.json +1 -1
- package/lib/provider-openai/src/index.ts +3 -3
- package/lib/runtime/dist/agent.d.ts +2 -0
- package/lib/runtime/dist/agent.d.ts.map +1 -1
- package/lib/runtime/dist/agent.js +6 -1
- package/lib/runtime/dist/agent.js.map +1 -1
- package/lib/runtime/dist/index.d.ts +1 -0
- package/lib/runtime/dist/index.d.ts.map +1 -1
- package/lib/runtime/dist/index.js +1 -0
- package/lib/runtime/dist/index.js.map +1 -1
- package/lib/runtime/dist/models.d.ts +110 -0
- package/lib/runtime/dist/models.d.ts.map +1 -0
- package/lib/runtime/dist/models.js +246 -0
- package/lib/runtime/dist/models.js.map +1 -0
- package/lib/runtime/dist/response.d.ts +5 -0
- package/lib/runtime/dist/response.d.ts.map +1 -1
- package/lib/runtime/dist/response.js +34 -4
- package/lib/runtime/dist/response.js.map +1 -1
- package/lib/runtime/dist/router.d.ts +4 -0
- package/lib/runtime/dist/router.d.ts.map +1 -1
- package/lib/runtime/dist/router.js +9 -9
- package/lib/runtime/dist/router.js.map +1 -1
- package/lib/runtime/dist/runtime.d.ts +0 -1
- package/lib/runtime/dist/runtime.d.ts.map +1 -1
- package/lib/runtime/dist/runtime.js +10 -3
- package/lib/runtime/dist/runtime.js.map +1 -1
- package/lib/runtime/package.json +1 -1
- package/lib/runtime/src/agent.ts +6 -1
- package/lib/runtime/src/index.ts +1 -0
- package/lib/runtime/src/models.ts +310 -0
- package/lib/runtime/src/response.ts +28 -4
- package/lib/runtime/src/router.ts +9 -9
- package/lib/runtime/src/runtime.ts +10 -3
- package/lib/sandbox/dist/command-backend.d.ts +29 -0
- package/lib/sandbox/dist/command-backend.d.ts.map +1 -0
- package/lib/sandbox/dist/command-backend.js +208 -0
- package/lib/sandbox/dist/command-backend.js.map +1 -0
- package/lib/sandbox/dist/contracts.d.ts +173 -0
- package/lib/sandbox/dist/contracts.d.ts.map +1 -0
- package/lib/sandbox/dist/contracts.js +48 -0
- package/lib/sandbox/dist/contracts.js.map +1 -0
- package/lib/sandbox/dist/docker/api.d.ts +12 -0
- package/lib/sandbox/dist/docker/api.d.ts.map +1 -0
- package/lib/sandbox/dist/docker/api.js +228 -0
- package/lib/sandbox/dist/docker/api.js.map +1 -0
- package/lib/sandbox/dist/docker/cli.d.ts +4 -0
- package/lib/sandbox/dist/docker/cli.d.ts.map +1 -0
- package/lib/sandbox/dist/docker/cli.js +128 -0
- package/lib/sandbox/dist/docker/cli.js.map +1 -0
- package/lib/sandbox/dist/docker/engine.d.ts +58 -0
- package/lib/sandbox/dist/docker/engine.d.ts.map +1 -0
- package/lib/sandbox/dist/docker/engine.js +30 -0
- package/lib/sandbox/dist/docker/engine.js.map +1 -0
- package/lib/sandbox/dist/docker/index.d.ts +39 -0
- package/lib/sandbox/dist/docker/index.d.ts.map +1 -0
- package/lib/sandbox/dist/docker/index.js +187 -0
- package/lib/sandbox/dist/docker/index.js.map +1 -0
- package/lib/sandbox/dist/docker/scripts.d.ts +15 -0
- package/lib/sandbox/dist/docker/scripts.d.ts.map +1 -0
- package/lib/sandbox/dist/docker/scripts.js +32 -0
- package/lib/sandbox/dist/docker/scripts.js.map +1 -0
- package/lib/sandbox/dist/index.d.ts +7 -0
- package/lib/sandbox/dist/index.d.ts.map +1 -0
- package/lib/sandbox/dist/index.js +7 -0
- package/lib/sandbox/dist/index.js.map +1 -0
- package/lib/sandbox/dist/per-run.d.ts +28 -0
- package/lib/sandbox/dist/per-run.d.ts.map +1 -0
- package/lib/sandbox/dist/per-run.js +46 -0
- package/lib/sandbox/dist/per-run.js.map +1 -0
- package/lib/sandbox/dist/sandboxes.d.ts +166 -0
- package/lib/sandbox/dist/sandboxes.d.ts.map +1 -0
- package/lib/sandbox/dist/sandboxes.js +538 -0
- package/lib/sandbox/dist/sandboxes.js.map +1 -0
- package/lib/sandbox/dist/scripts.d.ts +25 -0
- package/lib/sandbox/dist/scripts.d.ts.map +1 -0
- package/lib/sandbox/dist/scripts.js +72 -0
- package/lib/sandbox/dist/scripts.js.map +1 -0
- package/lib/sandbox/dist/testing.d.ts +53 -0
- package/lib/sandbox/dist/testing.d.ts.map +1 -0
- package/lib/sandbox/dist/testing.js +148 -0
- package/lib/sandbox/dist/testing.js.map +1 -0
- package/lib/sandbox/dist/tools.d.ts +41 -0
- package/lib/sandbox/dist/tools.d.ts.map +1 -0
- package/lib/sandbox/dist/tools.js +280 -0
- package/lib/sandbox/dist/tools.js.map +1 -0
- package/lib/sandbox/package.json +5 -0
- package/lib/sandbox/src/command-backend.ts +194 -0
- package/lib/sandbox/src/contracts.ts +168 -0
- package/lib/sandbox/src/docker/api.ts +172 -0
- package/lib/sandbox/src/docker/cli.ts +98 -0
- package/lib/sandbox/src/docker/engine.ts +69 -0
- package/lib/sandbox/src/docker/index.ts +192 -0
- package/lib/sandbox/src/docker/scripts.ts +36 -0
- package/lib/sandbox/src/index.ts +9 -0
- package/lib/sandbox/src/per-run.ts +54 -0
- package/lib/sandbox/src/sandboxes.ts +521 -0
- package/lib/sandbox/src/scripts.ts +76 -0
- package/lib/sandbox/src/testing.ts +166 -0
- package/lib/sandbox/src/tools.ts +284 -0
- package/lib/sdk/package.json +1 -1
- package/lib/server/package.json +1 -1
- package/lib/server-node/package.json +1 -1
- package/lib/skills/dist/index.d.ts.map +1 -1
- package/lib/skills/dist/index.js +2 -2
- package/lib/skills/dist/index.js.map +1 -1
- package/lib/skills/package.json +1 -1
- package/lib/skills/src/index.ts +2 -2
- package/lib/storage/package.json +1 -1
- package/lib/storage-contracts/dist/schema-digest.d.ts +3 -5
- package/lib/storage-contracts/dist/schema-digest.d.ts.map +1 -1
- package/lib/storage-contracts/dist/schema-digest.js +3 -58
- package/lib/storage-contracts/dist/schema-digest.js.map +1 -1
- package/lib/storage-contracts/package.json +1 -1
- package/lib/storage-contracts/src/schema-digest.ts +3 -40
- package/lib/storage-postgres/dist/driver.d.ts +18 -0
- package/lib/storage-postgres/dist/driver.d.ts.map +1 -0
- package/lib/storage-postgres/dist/driver.js +22 -0
- package/lib/storage-postgres/dist/driver.js.map +1 -0
- package/lib/storage-postgres/dist/postgres.d.ts +5 -2
- package/lib/storage-postgres/dist/postgres.d.ts.map +1 -1
- package/lib/storage-postgres/dist/postgres.js +8 -223
- package/lib/storage-postgres/dist/postgres.js.map +1 -1
- package/lib/storage-postgres/dist/store.d.ts +25 -0
- package/lib/storage-postgres/dist/store.d.ts.map +1 -0
- package/lib/storage-postgres/dist/store.js +237 -0
- package/lib/storage-postgres/dist/store.js.map +1 -0
- package/lib/storage-postgres/package.json +1 -1
- package/lib/storage-postgres/src/driver.ts +35 -0
- package/lib/storage-postgres/src/postgres.ts +10 -211
- package/lib/storage-postgres/src/store.ts +242 -0
- package/lib/storage-sql/dist/aggregate-session.d.ts.map +1 -1
- package/lib/storage-sql/dist/aggregate-session.js +13 -8
- package/lib/storage-sql/dist/aggregate-session.js.map +1 -1
- package/lib/storage-sql/dist/dialect.d.ts +29 -0
- package/lib/storage-sql/dist/dialect.d.ts.map +1 -0
- package/lib/storage-sql/dist/dialect.js +63 -0
- package/lib/storage-sql/dist/dialect.js.map +1 -0
- package/lib/storage-sql/dist/document/budget-rows.d.ts +5 -0
- package/lib/storage-sql/dist/document/budget-rows.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/budget-rows.js +36 -0
- package/lib/storage-sql/dist/document/budget-rows.js.map +1 -0
- package/lib/storage-sql/dist/document/execution-wait-rows.d.ts +5 -0
- package/lib/storage-sql/dist/document/execution-wait-rows.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/execution-wait-rows.js +66 -0
- package/lib/storage-sql/dist/document/execution-wait-rows.js.map +1 -0
- package/lib/storage-sql/dist/document/keys.d.ts +26 -0
- package/lib/storage-sql/dist/document/keys.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/keys.js +74 -0
- package/lib/storage-sql/dist/document/keys.js.map +1 -0
- package/lib/storage-sql/dist/document/layout.d.ts +66 -0
- package/lib/storage-sql/dist/document/layout.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/layout.js +43 -0
- package/lib/storage-sql/dist/document/layout.js.map +1 -0
- package/lib/storage-sql/dist/document/memory-backend.d.ts +11 -0
- package/lib/storage-sql/dist/document/memory-backend.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/memory-backend.js +48 -0
- package/lib/storage-sql/dist/document/memory-backend.js.map +1 -0
- package/lib/storage-sql/dist/document/memory.d.ts +5 -0
- package/lib/storage-sql/dist/document/memory.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/memory.js +372 -0
- package/lib/storage-sql/dist/document/memory.js.map +1 -0
- package/lib/storage-sql/dist/document/scheduled-rows.d.ts +31 -0
- package/lib/storage-sql/dist/document/scheduled-rows.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/scheduled-rows.js +155 -0
- package/lib/storage-sql/dist/document/scheduled-rows.js.map +1 -0
- package/lib/storage-sql/dist/document/scheduler-rows.d.ts +12 -0
- package/lib/storage-sql/dist/document/scheduler-rows.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/scheduler-rows.js +227 -0
- package/lib/storage-sql/dist/document/scheduler-rows.js.map +1 -0
- package/lib/storage-sql/dist/document/session.d.ts +119 -0
- package/lib/storage-sql/dist/document/session.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/session.js +203 -0
- package/lib/storage-sql/dist/document/session.js.map +1 -0
- package/lib/storage-sql/dist/document/store.d.ts +17 -0
- package/lib/storage-sql/dist/document/store.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/store.js +133 -0
- package/lib/storage-sql/dist/document/store.js.map +1 -0
- package/lib/storage-sql/dist/document/tree-rows.d.ts +5 -0
- package/lib/storage-sql/dist/document/tree-rows.d.ts.map +1 -0
- package/lib/storage-sql/dist/document/tree-rows.js +97 -0
- package/lib/storage-sql/dist/document/tree-rows.js.map +1 -0
- package/lib/storage-sql/dist/durable-budget-database.d.ts +7 -6
- package/lib/storage-sql/dist/durable-budget-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/durable-budget-database.js +34 -40
- package/lib/storage-sql/dist/durable-budget-database.js.map +1 -1
- package/lib/storage-sql/dist/durable-budget-persistence.d.ts +53 -0
- package/lib/storage-sql/dist/durable-budget-persistence.d.ts.map +1 -0
- package/lib/storage-sql/dist/durable-budget-persistence.js +43 -0
- package/lib/storage-sql/dist/durable-budget-persistence.js.map +1 -0
- package/lib/storage-sql/dist/execution-completions.d.ts +19 -1
- package/lib/storage-sql/dist/execution-completions.d.ts.map +1 -1
- package/lib/storage-sql/dist/execution-completions.js +21 -9
- package/lib/storage-sql/dist/execution-completions.js.map +1 -1
- package/lib/storage-sql/dist/execution-wait-database.d.ts +3 -3
- package/lib/storage-sql/dist/execution-wait-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/execution-wait-database.js +36 -60
- package/lib/storage-sql/dist/execution-wait-database.js.map +1 -1
- package/lib/storage-sql/dist/execution-wait-persistence.d.ts +71 -0
- package/lib/storage-sql/dist/execution-wait-persistence.d.ts.map +1 -0
- package/lib/storage-sql/dist/execution-wait-persistence.js +71 -0
- package/lib/storage-sql/dist/execution-wait-persistence.js.map +1 -0
- package/lib/storage-sql/dist/host.d.ts +22 -0
- package/lib/storage-sql/dist/host.d.ts.map +1 -1
- package/lib/storage-sql/dist/host.js +9 -0
- package/lib/storage-sql/dist/host.js.map +1 -1
- package/lib/storage-sql/dist/memory-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/memory-database.js +7 -8
- package/lib/storage-sql/dist/memory-database.js.map +1 -1
- package/lib/storage-sql/dist/scheduled-database.d.ts +3 -3
- package/lib/storage-sql/dist/scheduled-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/scheduled-database.js +50 -77
- package/lib/storage-sql/dist/scheduled-database.js.map +1 -1
- package/lib/storage-sql/dist/scheduled-persistence.d.ts +81 -0
- package/lib/storage-sql/dist/scheduled-persistence.d.ts.map +1 -0
- package/lib/storage-sql/dist/scheduled-persistence.js +83 -0
- package/lib/storage-sql/dist/scheduled-persistence.js.map +1 -0
- package/lib/storage-sql/dist/scheduler-database.d.ts +17 -8
- package/lib/storage-sql/dist/scheduler-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/scheduler-database.js +70 -113
- package/lib/storage-sql/dist/scheduler-database.js.map +1 -1
- package/lib/storage-sql/dist/scheduler-persistence.d.ts +87 -0
- package/lib/storage-sql/dist/scheduler-persistence.d.ts.map +1 -0
- package/lib/storage-sql/dist/scheduler-persistence.js +103 -0
- package/lib/storage-sql/dist/scheduler-persistence.js.map +1 -0
- package/lib/storage-sql/dist/scheduler-validation.d.ts.map +1 -1
- package/lib/storage-sql/dist/scheduler-validation.js +2 -2
- package/lib/storage-sql/dist/scheduler-validation.js.map +1 -1
- package/lib/storage-sql/dist/validation.d.ts.map +1 -1
- package/lib/storage-sql/dist/validation.js +4 -4
- package/lib/storage-sql/dist/validation.js.map +1 -1
- package/lib/storage-sql/dist/workflow-graph-discovery-index.d.ts.map +1 -1
- package/lib/storage-sql/dist/workflow-graph-discovery-index.js +16 -0
- package/lib/storage-sql/dist/workflow-graph-discovery-index.js.map +1 -1
- package/lib/storage-sql/dist/workflow-tree-database.d.ts +4 -4
- package/lib/storage-sql/dist/workflow-tree-database.d.ts.map +1 -1
- package/lib/storage-sql/dist/workflow-tree-database.js +216 -235
- package/lib/storage-sql/dist/workflow-tree-database.js.map +1 -1
- package/lib/storage-sql/dist/workflow-tree-persistence.d.ts +69 -0
- package/lib/storage-sql/dist/workflow-tree-persistence.d.ts.map +1 -0
- package/lib/storage-sql/dist/workflow-tree-persistence.js +77 -0
- package/lib/storage-sql/dist/workflow-tree-persistence.js.map +1 -0
- package/lib/storage-sql/dist/workflow-tree-validation.d.ts.map +1 -1
- package/lib/storage-sql/dist/workflow-tree-validation.js +2 -2
- package/lib/storage-sql/dist/workflow-tree-validation.js.map +1 -1
- package/lib/storage-sql/package.json +1 -1
- package/lib/storage-sql/src/aggregate-session.ts +15 -9
- package/lib/storage-sql/src/dialect.ts +63 -0
- package/lib/storage-sql/src/document/budget-rows.ts +35 -0
- package/lib/storage-sql/src/document/execution-wait-rows.ts +61 -0
- package/lib/storage-sql/src/document/keys.ts +63 -0
- package/lib/storage-sql/src/document/layout.ts +44 -0
- package/lib/storage-sql/src/document/memory-backend.ts +42 -0
- package/lib/storage-sql/src/document/memory.ts +294 -0
- package/lib/storage-sql/src/document/scheduled-rows.ts +138 -0
- package/lib/storage-sql/src/document/scheduler-rows.ts +188 -0
- package/lib/storage-sql/src/document/session.ts +204 -0
- package/lib/storage-sql/src/document/store.ts +131 -0
- package/lib/storage-sql/src/document/tree-rows.ts +88 -0
- package/lib/storage-sql/src/durable-budget-database.ts +36 -52
- package/lib/storage-sql/src/durable-budget-persistence.ts +82 -0
- package/lib/storage-sql/src/execution-completions.ts +28 -11
- package/lib/storage-sql/src/execution-wait-database.ts +47 -73
- package/lib/storage-sql/src/execution-wait-persistence.ts +114 -0
- package/lib/storage-sql/src/host.ts +22 -0
- package/lib/storage-sql/src/memory-database.ts +11 -8
- package/lib/storage-sql/src/scheduled-database.ts +67 -100
- package/lib/storage-sql/src/scheduled-persistence.ts +146 -0
- package/lib/storage-sql/src/scheduler-database.ts +79 -122
- package/lib/storage-sql/src/scheduler-persistence.ts +157 -0
- package/lib/storage-sql/src/scheduler-validation.ts +2 -2
- package/lib/storage-sql/src/validation.ts +4 -4
- package/lib/storage-sql/src/workflow-graph-discovery-index.ts +15 -0
- package/lib/storage-sql/src/workflow-tree-database.ts +118 -132
- package/lib/storage-sql/src/workflow-tree-persistence.ts +129 -0
- package/lib/storage-sql/src/workflow-tree-validation.ts +2 -2
- package/lib/storage-sqlite/package.json +1 -1
- package/lib/terminal/package.json +1 -1
- package/lib/testing/dist/files-conformance.d.ts +21 -0
- package/lib/testing/dist/files-conformance.d.ts.map +1 -0
- package/lib/testing/dist/files-conformance.js +155 -0
- package/lib/testing/dist/files-conformance.js.map +1 -0
- package/lib/testing/dist/index.d.ts +3 -0
- package/lib/testing/dist/index.d.ts.map +1 -1
- package/lib/testing/dist/index.js +3 -0
- package/lib/testing/dist/index.js.map +1 -1
- package/lib/testing/dist/model-conformance.d.ts +88 -0
- package/lib/testing/dist/model-conformance.d.ts.map +1 -0
- package/lib/testing/dist/model-conformance.js +177 -0
- package/lib/testing/dist/model-conformance.js.map +1 -0
- package/lib/testing/dist/voice-conformance.d.ts +61 -0
- package/lib/testing/dist/voice-conformance.d.ts.map +1 -0
- package/lib/testing/dist/voice-conformance.js +128 -0
- package/lib/testing/dist/voice-conformance.js.map +1 -0
- package/lib/testing/package.json +1 -1
- package/lib/testing/src/files-conformance.ts +153 -0
- package/lib/testing/src/index.ts +3 -0
- package/lib/testing/src/model-conformance.ts +217 -0
- package/lib/testing/src/voice-conformance.ts +139 -0
- package/lib/tools/package.json +1 -1
- package/lib/voice/dist/audio.d.ts +10 -0
- package/lib/voice/dist/audio.d.ts.map +1 -0
- package/lib/voice/dist/audio.js +44 -0
- package/lib/voice/dist/audio.js.map +1 -0
- package/lib/voice/dist/contracts.d.ts +140 -0
- package/lib/voice/dist/contracts.d.ts.map +1 -0
- package/lib/voice/dist/contracts.js +58 -0
- package/lib/voice/dist/contracts.js.map +1 -0
- package/lib/voice/dist/index.d.ts +6 -0
- package/lib/voice/dist/index.d.ts.map +1 -0
- package/lib/voice/dist/index.js +6 -0
- package/lib/voice/dist/index.js.map +1 -0
- package/lib/voice/dist/registry.d.ts +53 -0
- package/lib/voice/dist/registry.d.ts.map +1 -0
- package/lib/voice/dist/registry.js +218 -0
- package/lib/voice/dist/registry.js.map +1 -0
- package/lib/voice/dist/tools.d.ts +29 -0
- package/lib/voice/dist/tools.d.ts.map +1 -0
- package/lib/voice/dist/tools.js +92 -0
- package/lib/voice/dist/tools.js.map +1 -0
- package/lib/voice/dist/transport.d.ts +24 -0
- package/lib/voice/dist/transport.d.ts.map +1 -0
- package/lib/voice/dist/transport.js +90 -0
- package/lib/voice/dist/transport.js.map +1 -0
- package/lib/voice/package.json +5 -0
- package/lib/voice/src/audio.ts +38 -0
- package/lib/voice/src/contracts.ts +167 -0
- package/lib/voice/src/index.ts +5 -0
- package/lib/voice/src/registry.ts +215 -0
- package/lib/voice/src/tools.ts +91 -0
- package/lib/voice/src/transport.ts +73 -0
- package/lib/workflows/dist/definition.d.ts.map +1 -1
- package/lib/workflows/dist/definition.js +2 -2
- package/lib/workflows/dist/definition.js.map +1 -1
- package/lib/workflows/dist/operator-transports.d.ts.map +1 -1
- package/lib/workflows/dist/operator-transports.js +2 -1
- package/lib/workflows/dist/operator-transports.js.map +1 -1
- package/lib/workflows/package.json +1 -1
- package/lib/workflows/src/definition.ts +2 -2
- package/lib/workflows/src/operator-transports.ts +2 -1
- package/lib/workstream/package.json +1 -1
- package/llms-full.txt +2069 -76
- package/llms.txt +11 -2
- package/memory/index.d.ts +1 -0
- package/memory/index.js +1 -0
- package/memory-remote/index.d.ts +1 -0
- package/memory-remote/index.js +1 -0
- package/observability/index.d.ts +1 -0
- package/observability/index.js +1 -0
- package/package.json +166 -54
- package/provider-anthropic/index.d.ts +1 -0
- package/provider-anthropic/index.js +1 -0
- package/provider-openai/index.d.ts +1 -0
- package/provider-openai/index.js +1 -0
- package/runtime/index.d.ts +1 -0
- package/runtime/index.js +1 -0
- package/sandbox/docker/index.d.ts +1 -0
- package/sandbox/docker/index.js +1 -0
- package/sandbox/index.d.ts +1 -0
- package/sandbox/index.js +1 -0
- package/sandbox/testing/index.d.ts +1 -0
- package/sandbox/testing/index.js +1 -0
- package/sdk/index.d.ts +1 -0
- package/sdk/index.js +1 -0
- package/server/index.d.ts +1 -0
- package/server/index.js +1 -0
- package/server-node/index.d.ts +1 -0
- package/server-node/index.js +1 -0
- package/skills/index.d.ts +1 -0
- package/skills/index.js +1 -0
- package/storage/index.d.ts +1 -0
- package/storage/index.js +1 -0
- package/storage-contracts/index.d.ts +1 -0
- package/storage-contracts/index.js +1 -0
- package/storage-postgres/driver/index.d.ts +1 -0
- package/storage-postgres/driver/index.js +1 -0
- package/storage-postgres/index.d.ts +1 -0
- package/storage-postgres/index.js +1 -0
- package/storage-sql/host/index.d.ts +1 -0
- package/storage-sql/host/index.js +1 -0
- package/storage-sqlite/index.d.ts +1 -0
- package/storage-sqlite/index.js +1 -0
- package/terminal/index.d.ts +1 -0
- package/terminal/index.js +1 -0
- package/testing/index.d.ts +1 -0
- package/testing/index.js +1 -0
- package/tools/host/index.d.ts +1 -0
- package/tools/host/index.js +1 -0
- package/tools/index.d.ts +1 -0
- package/tools/index.js +1 -0
- package/voice/index.d.ts +1 -0
- package/voice/index.js +1 -0
- package/workflows/agents/index.d.ts +1 -0
- package/workflows/agents/index.js +1 -0
- package/workflows/children/index.d.ts +1 -0
- package/workflows/children/index.js +1 -0
- package/workflows/composites/index.d.ts +1 -0
- package/workflows/composites/index.js +1 -0
- package/workflows/ephemeral/index.d.ts +1 -0
- package/workflows/ephemeral/index.js +1 -0
- package/workflows/graphs/index.d.ts +1 -0
- package/workflows/graphs/index.js +1 -0
- package/workflows/index.d.ts +1 -0
- package/workflows/index.js +1 -0
- package/workflows/lifecycle/index.d.ts +1 -0
- package/workflows/lifecycle/index.js +1 -0
- package/workflows/loops/index.d.ts +1 -0
- package/workflows/loops/index.js +1 -0
- package/workflows/sagas/index.d.ts +1 -0
- package/workflows/sagas/index.js +1 -0
- package/workstream/executions/index.d.ts +1 -0
- package/workstream/executions/index.js +1 -0
- package/workstream/humans/index.d.ts +1 -0
- package/workstream/humans/index.js +1 -0
- package/workstream/index.d.ts +1 -0
- package/workstream/index.js +1 -0
- package/workstream/timers/index.d.ts +1 -0
- package/workstream/timers/index.js +1 -0
- package/workstream/webhooks/index.d.ts +1 -0
- package/workstream/webhooks/index.js +1 -0
package/docs/cli/run.md
CHANGED
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Serve, worker and migrate"
|
|
3
|
-
description: "Run your application in production with mayura serve, mayura worker and mayura migrate, and write the module they load."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
In production a Mayura application usually runs as separate processes: one or more **servers** that answer HTTP
|
|
7
|
-
requests, one or more **workers** that advance durable workflows, and a **migration** step that updates the storage
|
|
8
|
-
schema before new code starts. The CLI runs each of these from one application module that you write:
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
mayura migrate --app dist/src/app.js
|
|
12
|
-
mayura serve --app dist/src/app.js
|
|
13
|
-
mayura worker --app dist/src/app.js --probe-host 0.0.0.0 --probe-port 9090
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
The CLI owns only the process lifecycle: starting, handling Ctrl+C or `SIGTERM`, graceful shutdown and worker probes.
|
|
17
|
-
Your module wires its own storage, agents, workflows and authentication with its own installed `mayura` package.
|
|
18
|
-
|
|
19
|
-
## The application module
|
|
20
|
-
|
|
21
|
-
The module's default export is an object with up to four functions. Wrap it in `defineMayuraApplication` from
|
|
22
|
-
`mayura/cli`, which checks the shape:
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import { defineMayuraApplication } from 'mayura/cli';
|
|
26
|
-
import { listenProductionServer } from 'mayura/server-node';
|
|
27
|
-
import { createWorkflowWorker } from 'mayura/workflows';
|
|
28
|
-
|
|
29
|
-
// openServices, agents, authenticate and workerUnits stand for your own code: storage, agent
|
|
30
|
-
// registrations, token verification and the workflow runtimes the worker drives.
|
|
31
|
-
let services: Promise<Services> | undefined;
|
|
32
|
-
const ready = () => (services ??= openServices());
|
|
33
|
-
|
|
34
|
-
export default defineMayuraApplication({
|
|
35
|
-
async server() {
|
|
36
|
-
await ready();
|
|
37
|
-
return listenProductionServer({
|
|
38
|
-
publicOrigin: 'https://agents.example.com',
|
|
39
|
-
hostname: '0.0.0.0',
|
|
40
|
-
port: 8080,
|
|
41
|
-
tls: { terminatedBy: 'proxy' },
|
|
42
|
-
agents,
|
|
43
|
-
authenticate,
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
async worker() {
|
|
47
|
-
return createWorkflowWorker({ units: workerUnits(await ready()) });
|
|
48
|
-
},
|
|
49
|
-
async migrate() {
|
|
50
|
-
await ready();
|
|
51
|
-
return { schemaVersion: 1 };
|
|
52
|
-
},
|
|
53
|
-
async shutdown() {
|
|
54
|
-
if (services) await (await services).close();
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
| Function | Used by | Must return |
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| `server()` | `mayura serve` | A running server with `isAccepting()` and `close()`, such as the result of `listenProductionServer` from `mayura/server-node` |
|
|
62
|
-
| `worker()` | `mayura worker` | A worker with `start()`, `isReady()` and `drain()`, such as the result of `createWorkflowWorker` from `mayura/workflows` |
|
|
63
|
-
| `migrate()` | `mayura migrate` | Any JSON-serializable report, printed when the migration finishes |
|
|
64
|
-
| `shutdown()` | all three | Nothing. Runs last, after the server closes, the worker drains or the migration ends, for example to close storage. |
|
|
65
|
-
|
|
66
|
-
Define at least one function, and only these four. A command whose function is missing fails with `INVALID_CONFIG`,
|
|
67
|
-
for example `mayura worker` on a module without `worker`.
|
|
68
|
-
|
|
69
|
-
`--app` must name a single regular `.js` or `.mjs` file: build your TypeScript first. Directories, symbolic links and
|
|
70
|
-
other file types are refused, and the CLI imports nothing else. For a complete, working module, see `src/app.ts` in
|
|
71
|
-
any starter, such as
|
|
72
|
-
[approval-workflow](https://github.com/KartikeyAI/mayura/blob/main/packages/cli/starters/approval-workflow/src/app.ts).
|
|
73
|
-
|
|
74
|
-
## mayura serve
|
|
75
|
-
|
|
76
|
-
`mayura serve --app <module>` calls `server()` and keeps it running. On the first Ctrl+C or `SIGTERM` it closes the
|
|
77
|
-
server gracefully, then calls `shutdown()`. A second signal during shutdown forces the process to exit.
|
|
78
|
-
|
|
79
|
-
`listenProductionServer` stops accepting new requests, fails its readiness check so load balancers stop routing to
|
|
80
|
-
it, and drains in-flight requests before it closes. See [Deployment](../guides/deployment.md).
|
|
81
|
-
|
|
82
|
-
## mayura worker
|
|
83
|
-
|
|
84
|
-
`mayura worker --app <module>` calls `worker()`, then `start()`. On the first Ctrl+C or `SIGTERM` it drains the
|
|
85
|
-
worker, waiting for in-flight work to finish, then calls `shutdown()`.
|
|
86
|
-
|
|
87
|
-
| Option | Meaning |
|
|
88
|
-
|---|---|
|
|
89
|
-
| `--drain-timeout-ms <ms>` | How long draining may take, from 1 to 300000. Default 30000. |
|
|
90
|
-
| `--probe-port <port>` | Serve HTTP health probes on this port. Off by default. |
|
|
91
|
-
| `--probe-host <host>` | The address the probes listen on. Default `127.0.0.1`. |
|
|
92
|
-
|
|
93
|
-
With `--probe-port`, the worker answers two probes for your orchestrator:
|
|
94
|
-
|
|
95
|
-
- `GET /livez` returns 200 while the process is running, and 503 once it starts stopping.
|
|
96
|
-
- `GET /readyz` returns 200 while the worker reports itself ready, and 503 when it does not, for example while it is
|
|
97
|
-
draining. A worker with a leadership lease is ready only while it can confirm the lease in storage.
|
|
98
|
-
|
|
99
|
-
The probe listener comes from `mayura/server-node` in your application's own installation, so `mayura` must be
|
|
100
|
-
installed alongside the module. In a container, use `--probe-host 0.0.0.0` so the orchestrator can reach it.
|
|
101
|
-
|
|
102
|
-
When the worker stops, it reports whether the drain finished in time, and how much work was interrupted if it did not.
|
|
103
|
-
|
|
104
|
-
### Run once
|
|
105
|
-
|
|
106
|
-
With `--once`, the worker advances everything that is due and exits, instead of running until it is stopped. Use it
|
|
107
|
-
from a scheduled job (a Cloud Run job, a Kubernetes CronJob) or a scheduler that starts a process every minute:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
mayura worker --app dist/src/app.js --once --budget-ms 50000
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
It takes the leadership lease once, runs passes until every host has completed a sweep of its runs or the budget runs
|
|
114
|
-
out, then releases the lease and calls `shutdown()`. A pass that has started finishes, so keep the budget below your
|
|
115
|
-
platform's time limit by at least your longest tool's `timeoutMs`. Each host keeps its place in storage, so if a sweep
|
|
116
|
-
does not finish, the next run continues from there rather than starting over.
|
|
117
|
-
|
|
118
|
-
| Option | Meaning |
|
|
119
|
-
|---|---|
|
|
120
|
-
| `--once` | Advance what is due, then exit. Not with `--probe-port`, `--probe-host` or `--drain-timeout-ms`. |
|
|
121
|
-
| `--budget-ms <ms>` | Stop starting passes after this long, from 1000 to 3600000. Default 60000. |
|
|
122
|
-
|
|
123
|
-
It prints a report and its status:
|
|
124
|
-
|
|
125
|
-
| Status | Meaning | Exit code |
|
|
126
|
-
|---|---|---|
|
|
127
|
-
| `succeeded` | Every host completed a sweep. | 0 |
|
|
128
|
-
| `incomplete` | The budget ran out first; the next run continues. Run it more often or give it more time. | 0 |
|
|
129
|
-
| `standby` | Another replica holds the lease, so this run did nothing. | 0 |
|
|
130
|
-
| `held` | An operator holds the fleet, so nothing was driven. | 0 |
|
|
131
|
-
| `failed` | A pass failed, for example because storage was unavailable. | 1 |
|
|
132
|
-
|
|
133
|
-
The worker must come from `createWorkflowWorker`, whose `runOnce` this calls; in your own code, such as a scheduled
|
|
134
|
-
function, call `worker.runOnce({ budgetMs })` directly.
|
|
135
|
-
|
|
136
|
-
## mayura migrate
|
|
137
|
-
|
|
138
|
-
`mayura migrate --app <module>` calls `migrate()` once, then `shutdown()`, and exits. Nothing else starts. Run it
|
|
139
|
-
before deploying new code, for example as a release step or an init container:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
mayura migrate --app dist/src/app.js --json
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Migrations are explicit and one-way. Mayura's storage refuses data in a format or schema version it does not
|
|
146
|
-
support; see [Storage](../guides/storage.md).
|
|
147
|
-
|
|
148
|
-
## Output
|
|
149
|
-
|
|
150
|
-
In a terminal each command prints one line per stage:
|
|
151
|
-
|
|
152
|
-
```text
|
|
153
|
-
● Worker started, probes on 0.0.0.0:9090. Press Ctrl+C to stop.
|
|
154
|
-
● Stopping… (press Ctrl+C again to force)
|
|
155
|
-
✔ Stopped
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
When output is piped, as in most deployments, each stage is one JSON line, then the command's final JSON document:
|
|
159
|
-
|
|
160
|
-
```text
|
|
161
|
-
{"event":"worker-started","probe":{"hostname":"0.0.0.0","port":9090}}
|
|
162
|
-
{"event":"stopping"}
|
|
163
|
-
{"event":"stopped","drained":true,"interrupted":0}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
`serve` prints `serving`, `stopping` and `stopped` events. `migrate` prints `{ "status": "migrated", "report": <report> }`,
|
|
167
|
-
where the report is whatever your `migrate()` returned. See [CLI overview](overview.md) for exit codes and errors.
|
|
168
|
-
|
|
169
|
-
## Good to know
|
|
170
|
-
|
|
171
|
-
- `serve` and `worker` do not load `.env`. Set configuration in the real process environment. Only
|
|
172
|
-
[mayura dev](dev.md) reads `.env`.
|
|
173
|
-
- Run servers and workers as separate processes. With a leadership lease (`createWorkflowLeadership` from
|
|
174
|
-
`mayura/workflows`), several worker replicas can run without driving the same workflows twice.
|
|
175
|
-
|
|
176
|
-
## Related
|
|
177
|
-
|
|
178
|
-
- [Deployment](../guides/deployment.md)
|
|
179
|
-
- [Develop with mayura dev](dev.md)
|
|
180
|
-
- [Server and client](../guides/server-and-client.md)
|
|
181
|
-
- [Workflow operations](../guides/workflow-operations.md)
|
|
182
|
-
- [Storage](../guides/storage.md)
|
|
1
|
+
---
|
|
2
|
+
title: "Serve, worker and migrate"
|
|
3
|
+
description: "Run your application in production with mayura serve, mayura worker and mayura migrate, and write the module they load."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
In production a Mayura application usually runs as separate processes: one or more **servers** that answer HTTP
|
|
7
|
+
requests, one or more **workers** that advance durable workflows, and a **migration** step that updates the storage
|
|
8
|
+
schema before new code starts. The CLI runs each of these from one application module that you write:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
mayura migrate --app dist/src/app.js
|
|
12
|
+
mayura serve --app dist/src/app.js
|
|
13
|
+
mayura worker --app dist/src/app.js --probe-host 0.0.0.0 --probe-port 9090
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The CLI owns only the process lifecycle: starting, handling Ctrl+C or `SIGTERM`, graceful shutdown and worker probes.
|
|
17
|
+
Your module wires its own storage, agents, workflows and authentication with its own installed `mayura` package.
|
|
18
|
+
|
|
19
|
+
## The application module
|
|
20
|
+
|
|
21
|
+
The module's default export is an object with up to four functions. Wrap it in `defineMayuraApplication` from
|
|
22
|
+
`mayura/cli`, which checks the shape:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { defineMayuraApplication } from 'mayura/cli';
|
|
26
|
+
import { listenProductionServer } from 'mayura/server-node';
|
|
27
|
+
import { createWorkflowWorker } from 'mayura/workflows';
|
|
28
|
+
|
|
29
|
+
// openServices, agents, authenticate and workerUnits stand for your own code: storage, agent
|
|
30
|
+
// registrations, token verification and the workflow runtimes the worker drives.
|
|
31
|
+
let services: Promise<Services> | undefined;
|
|
32
|
+
const ready = () => (services ??= openServices());
|
|
33
|
+
|
|
34
|
+
export default defineMayuraApplication({
|
|
35
|
+
async server() {
|
|
36
|
+
await ready();
|
|
37
|
+
return listenProductionServer({
|
|
38
|
+
publicOrigin: 'https://agents.example.com',
|
|
39
|
+
hostname: '0.0.0.0',
|
|
40
|
+
port: 8080,
|
|
41
|
+
tls: { terminatedBy: 'proxy' },
|
|
42
|
+
agents,
|
|
43
|
+
authenticate,
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
async worker() {
|
|
47
|
+
return createWorkflowWorker({ units: workerUnits(await ready()) });
|
|
48
|
+
},
|
|
49
|
+
async migrate() {
|
|
50
|
+
await ready();
|
|
51
|
+
return { schemaVersion: 1 };
|
|
52
|
+
},
|
|
53
|
+
async shutdown() {
|
|
54
|
+
if (services) await (await services).close();
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
| Function | Used by | Must return |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `server()` | `mayura serve` | A running server with `isAccepting()` and `close()`, such as the result of `listenProductionServer` from `mayura/server-node` |
|
|
62
|
+
| `worker()` | `mayura worker` | A worker with `start()`, `isReady()` and `drain()`, such as the result of `createWorkflowWorker` from `mayura/workflows` |
|
|
63
|
+
| `migrate()` | `mayura migrate` | Any JSON-serializable report, printed when the migration finishes |
|
|
64
|
+
| `shutdown()` | all three | Nothing. Runs last, after the server closes, the worker drains or the migration ends, for example to close storage. |
|
|
65
|
+
|
|
66
|
+
Define at least one function, and only these four. A command whose function is missing fails with `INVALID_CONFIG`,
|
|
67
|
+
for example `mayura worker` on a module without `worker`.
|
|
68
|
+
|
|
69
|
+
`--app` must name a single regular `.js` or `.mjs` file: build your TypeScript first. Directories, symbolic links and
|
|
70
|
+
other file types are refused, and the CLI imports nothing else. For a complete, working module, see `src/app.ts` in
|
|
71
|
+
any starter, such as
|
|
72
|
+
[approval-workflow](https://github.com/KartikeyAI/mayura/blob/main/packages/cli/starters/approval-workflow/src/app.ts).
|
|
73
|
+
|
|
74
|
+
## mayura serve
|
|
75
|
+
|
|
76
|
+
`mayura serve --app <module>` calls `server()` and keeps it running. On the first Ctrl+C or `SIGTERM` it closes the
|
|
77
|
+
server gracefully, then calls `shutdown()`. A second signal during shutdown forces the process to exit.
|
|
78
|
+
|
|
79
|
+
`listenProductionServer` stops accepting new requests, fails its readiness check so load balancers stop routing to
|
|
80
|
+
it, and drains in-flight requests before it closes. See [Deployment](../guides/deployment.md).
|
|
81
|
+
|
|
82
|
+
## mayura worker
|
|
83
|
+
|
|
84
|
+
`mayura worker --app <module>` calls `worker()`, then `start()`. On the first Ctrl+C or `SIGTERM` it drains the
|
|
85
|
+
worker, waiting for in-flight work to finish, then calls `shutdown()`.
|
|
86
|
+
|
|
87
|
+
| Option | Meaning |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `--drain-timeout-ms <ms>` | How long draining may take, from 1 to 300000. Default 30000. |
|
|
90
|
+
| `--probe-port <port>` | Serve HTTP health probes on this port. Off by default. |
|
|
91
|
+
| `--probe-host <host>` | The address the probes listen on. Default `127.0.0.1`. |
|
|
92
|
+
|
|
93
|
+
With `--probe-port`, the worker answers two probes for your orchestrator:
|
|
94
|
+
|
|
95
|
+
- `GET /livez` returns 200 while the process is running, and 503 once it starts stopping.
|
|
96
|
+
- `GET /readyz` returns 200 while the worker reports itself ready, and 503 when it does not, for example while it is
|
|
97
|
+
draining. A worker with a leadership lease is ready only while it can confirm the lease in storage.
|
|
98
|
+
|
|
99
|
+
The probe listener comes from `mayura/server-node` in your application's own installation, so `mayura` must be
|
|
100
|
+
installed alongside the module. In a container, use `--probe-host 0.0.0.0` so the orchestrator can reach it.
|
|
101
|
+
|
|
102
|
+
When the worker stops, it reports whether the drain finished in time, and how much work was interrupted if it did not.
|
|
103
|
+
|
|
104
|
+
### Run once
|
|
105
|
+
|
|
106
|
+
With `--once`, the worker advances everything that is due and exits, instead of running until it is stopped. Use it
|
|
107
|
+
from a scheduled job (a Cloud Run job, a Kubernetes CronJob) or a scheduler that starts a process every minute:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
mayura worker --app dist/src/app.js --once --budget-ms 50000
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
It takes the leadership lease once, runs passes until every host has completed a sweep of its runs or the budget runs
|
|
114
|
+
out, then releases the lease and calls `shutdown()`. A pass that has started finishes, so keep the budget below your
|
|
115
|
+
platform's time limit by at least your longest tool's `timeoutMs`. Each host keeps its place in storage, so if a sweep
|
|
116
|
+
does not finish, the next run continues from there rather than starting over.
|
|
117
|
+
|
|
118
|
+
| Option | Meaning |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `--once` | Advance what is due, then exit. Not with `--probe-port`, `--probe-host` or `--drain-timeout-ms`. |
|
|
121
|
+
| `--budget-ms <ms>` | Stop starting passes after this long, from 1000 to 3600000. Default 60000. |
|
|
122
|
+
|
|
123
|
+
It prints a report and its status:
|
|
124
|
+
|
|
125
|
+
| Status | Meaning | Exit code |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `succeeded` | Every host completed a sweep. | 0 |
|
|
128
|
+
| `incomplete` | The budget ran out first; the next run continues. Run it more often or give it more time. | 0 |
|
|
129
|
+
| `standby` | Another replica holds the lease, so this run did nothing. | 0 |
|
|
130
|
+
| `held` | An operator holds the fleet, so nothing was driven. | 0 |
|
|
131
|
+
| `failed` | A pass failed, for example because storage was unavailable. | 1 |
|
|
132
|
+
|
|
133
|
+
The worker must come from `createWorkflowWorker`, whose `runOnce` this calls; in your own code, such as a scheduled
|
|
134
|
+
function, call `worker.runOnce({ budgetMs })` directly.
|
|
135
|
+
|
|
136
|
+
## mayura migrate
|
|
137
|
+
|
|
138
|
+
`mayura migrate --app <module>` calls `migrate()` once, then `shutdown()`, and exits. Nothing else starts. Run it
|
|
139
|
+
before deploying new code, for example as a release step or an init container:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
mayura migrate --app dist/src/app.js --json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Migrations are explicit and one-way. Mayura's storage refuses data in a format or schema version it does not
|
|
146
|
+
support; see [Storage](../guides/storage.md).
|
|
147
|
+
|
|
148
|
+
## Output
|
|
149
|
+
|
|
150
|
+
In a terminal each command prints one line per stage:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
● Worker started, probes on 0.0.0.0:9090. Press Ctrl+C to stop.
|
|
154
|
+
● Stopping… (press Ctrl+C again to force)
|
|
155
|
+
✔ Stopped
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
When output is piped, as in most deployments, each stage is one JSON line, then the command's final JSON document:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
{"event":"worker-started","probe":{"hostname":"0.0.0.0","port":9090}}
|
|
162
|
+
{"event":"stopping"}
|
|
163
|
+
{"event":"stopped","drained":true,"interrupted":0}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
`serve` prints `serving`, `stopping` and `stopped` events. `migrate` prints `{ "status": "migrated", "report": <report> }`,
|
|
167
|
+
where the report is whatever your `migrate()` returned. See [CLI overview](overview.md) for exit codes and errors.
|
|
168
|
+
|
|
169
|
+
## Good to know
|
|
170
|
+
|
|
171
|
+
- `serve` and `worker` do not load `.env`. Set configuration in the real process environment. Only
|
|
172
|
+
[mayura dev](dev.md) reads `.env`.
|
|
173
|
+
- Run servers and workers as separate processes. With a leadership lease (`createWorkflowLeadership` from
|
|
174
|
+
`mayura/workflows`), several worker replicas can run without driving the same workflows twice.
|
|
175
|
+
|
|
176
|
+
## Related
|
|
177
|
+
|
|
178
|
+
- [Deployment](../guides/deployment.md)
|
|
179
|
+
- [Develop with mayura dev](dev.md)
|
|
180
|
+
- [Server and client](../guides/server-and-client.md)
|
|
181
|
+
- [Workflow operations](../guides/workflow-operations.md)
|
|
182
|
+
- [Storage](../guides/storage.md)
|
package/docs/guides/artifacts.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Artifacts"
|
|
3
|
-
description: "Store files your agents produce on local disk with verified content, per-tenant isolation, safe downloads, audits and backups."
|
|
3
|
+
description: "Store files your agents produce on local disk or in S3, R2 and other file stores, with verified content, per-tenant isolation, safe downloads, audits and backups."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Agents and workflows often produce files: a generated report, an exported CSV, an image. `mayura/artifacts` stores
|
|
7
|
-
such files on the local filesystem. Each file is addressed by its SHA-256 digest, kept apart per tenant, checked again
|
|
7
|
+
such files on the local filesystem, or in any [file store](files.md) such as S3 or Cloudflare R2. Each file is addressed by its SHA-256 digest, kept apart per tenant, checked again
|
|
8
8
|
every time it is read, and handed out only as a download under a policy you choose. You get back a small JSON
|
|
9
9
|
reference, which you save next to your own records.
|
|
10
10
|
|
|
@@ -30,6 +30,31 @@ const reference = await artifacts.commit(staged);
|
|
|
30
30
|
const bytes = await artifacts.read(reference, scope);
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## In S3, R2 and other file stores
|
|
34
|
+
|
|
35
|
+
`createArtifactStore` keeps artifacts in a [file store](files.md) instead of on local disk, with the same methods, the
|
|
36
|
+
same references and the same checks. It runs wherever the file store does, edge runtimes included, and is also
|
|
37
|
+
available as `mayura/artifacts/files`, which does not load the local store.
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { createArtifactStore } from 'mayura/artifacts/files';
|
|
41
|
+
import { createFileStore, s3Files } from 'mayura/files';
|
|
42
|
+
|
|
43
|
+
const files = createFileStore(s3Files({
|
|
44
|
+
bucket: 'acme-artifacts',
|
|
45
|
+
region: 'us-east-1',
|
|
46
|
+
credentials: { accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '' },
|
|
47
|
+
}), { maxFileBytes: 64 * 1024 * 1024 });
|
|
48
|
+
|
|
49
|
+
const artifacts = createArtifactStore({ files: files.within('artifacts'), maxArtifactBytes: 10 * 1024 * 1024 });
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Give it a view of its own: it writes `staging/` and `objects/` under the view and reports anything else there as an
|
|
53
|
+
anomaly. The file store must keep preconditions (`conditionalWrites`), which commits and restores use to create each
|
|
54
|
+
object only once. References are the same in both stores, so a backup from one restores into the other. Reconciliation
|
|
55
|
+
uses each file's `etag` to skip files changed after planning; staging cleanup needs a store that reports when files
|
|
56
|
+
were written. Limits on staged and committed artifacts are checked by each process, not across processes.
|
|
57
|
+
|
|
33
58
|
## Store options
|
|
34
59
|
|
|
35
60
|
| Option | Default | Notes |
|
|
@@ -108,8 +133,8 @@ records that point at them.
|
|
|
108
133
|
|
|
109
134
|
- Holding a reference is not permission to read the file. Authenticate the caller, derive the scope from their
|
|
110
135
|
verified identity, and check they may see the record the artifact belongs to.
|
|
111
|
-
- The store is local to one host
|
|
112
|
-
malware,
|
|
136
|
+
- The local store is local to one host; use `createArtifactStore` over a file store to share artifacts between hosts.
|
|
137
|
+
Neither store scans for malware, encrypts files or schedules backups.
|
|
113
138
|
- Your database and the artifact folder are not updated in one transaction. Keep references in your records, and use
|
|
114
139
|
`reconcileStaging` and the reconciliation plan to clean up after crashes.
|
|
115
140
|
- To download from a remote source into any staging sink with a size limit and digest check, see `transferArtifact` in
|