@cnc-tools/storm 0.9.1 → 0.11.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/bin/storm.js +11 -2
- package/dist/application.d.ts +5 -5
- package/dist/application.js +11 -9
- package/dist/bin/storm.js +32 -20
- package/dist/build-info.js +1 -1
- package/dist/chunks/chunk-3ZZVZPMG.js +10 -0
- package/dist/chunks/{chunk-WV6WQFC6.js → chunk-4EU4AH7E.js} +150 -26
- package/dist/chunks/chunk-4PRAB24Y.js +4400 -0
- package/dist/chunks/chunk-AMTYHUYB.js +257 -0
- package/dist/chunks/chunk-ETCZ6WP7.js +431 -0
- package/dist/chunks/chunk-FVMQKYTT.js +10 -0
- package/dist/chunks/chunk-GRMD7G4J.js +1267 -0
- package/dist/chunks/chunk-ICB4BZJX.js +22 -0
- package/dist/chunks/chunk-KR7WIYLG.js +2184 -0
- package/dist/chunks/chunk-L4ZPMSKQ.js +808 -0
- package/dist/chunks/chunk-NPPJ57W7.js +569 -0
- package/dist/chunks/chunk-O4BUT7BE.js +3361 -0
- package/dist/chunks/chunk-OJOKQRM6.js +1457 -0
- package/dist/chunks/chunk-SLNKW4ZM.js +40 -0
- package/dist/chunks/chunk-TRFEAYNC.js +1952 -0
- package/dist/chunks/chunk-VZZTHCBW.js +93 -0
- package/dist/chunks/chunk-WNIQA5J6.js +19 -0
- package/dist/chunks/chunk-WSIF7SR6.js +10 -0
- package/dist/chunks/{live-app-X3PW2W42.js → live-app-LOGYUBKB.js} +73 -20
- package/dist/command-tree.d.ts +3 -0
- package/dist/command-tree.js +3 -0
- package/dist/commands/dashboard.d.ts +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/exec/cleanup.d.ts +28 -44
- package/dist/commands/exec/cleanup.js +25 -55
- package/dist/commands/exec/command.d.ts +73 -545
- package/dist/commands/exec/command.js +65 -25
- package/dist/commands/exec/job-summary.d.ts +2 -2
- package/dist/commands/exec/job-summary.js +3 -3
- package/dist/commands/exec/live-view.d.ts +9 -9
- package/dist/commands/exec/live-view.js +49 -42
- package/dist/commands/exec/metadata.d.ts +0 -65
- package/dist/commands/exec/metadata.js +2 -61
- package/dist/commands/exec/mint-failed.d.ts +1 -1
- package/dist/commands/exec/mint-failed.js +8 -8
- package/dist/commands/exec/outcomes.d.ts +63 -468
- package/dist/commands/exec/outcomes.js +47 -75
- package/dist/commands/exec/plan-run.d.ts +148 -0
- package/dist/commands/exec/plan-run.js +121 -0
- package/dist/commands/exec/progress.d.ts +26 -16
- package/dist/commands/exec/progress.js +63 -42
- package/dist/commands/exec/redaction.d.ts +3 -3
- package/dist/commands/exec/redaction.js +4 -4
- package/dist/commands/exec/resource-flags.d.ts +50 -0
- package/dist/commands/exec/resource-flags.js +125 -0
- package/dist/commands/exec/resource-refusals.d.ts +64 -0
- package/dist/commands/exec/resource-refusals.js +58 -0
- package/dist/commands/exec/run-command.d.ts +87 -167
- package/dist/commands/exec/run-command.js +296 -418
- package/dist/commands/exec/run-metadata.d.ts +20 -43
- package/dist/commands/exec/run-metadata.js +18 -37
- package/dist/commands/exec/test-plan.d.ts +11 -0
- package/dist/commands/exec/test-plan.js +39 -0
- package/dist/commands/exec/tests-summary.d.ts +5 -5
- package/dist/commands/exec/tests-summary.js +2 -2
- package/dist/commands/exec/text.d.ts +8 -2
- package/dist/commands/exec/text.js +8 -0
- package/dist/commands/exec/view.d.ts +5 -7
- package/dist/commands/exec/view.js +22 -14
- package/dist/commands/exec/waterfall.d.ts +4 -9
- package/dist/commands/exec/waterfall.js +22 -26
- package/dist/commands/exec/worker-chart.d.ts +1 -1
- package/dist/commands/ext/metadata.d.ts +4 -0
- package/dist/commands/ext/metadata.js +8 -0
- package/dist/commands/runs/facts.d.ts +11 -6
- package/dist/commands/runs/facts.js +27 -15
- package/dist/commands/runs/list/command.d.ts +15 -8
- package/dist/commands/runs/list/command.js +39 -32
- package/dist/commands/runs/list/metadata.d.ts +16 -14
- package/dist/commands/runs/list/metadata.js +17 -15
- package/dist/commands/runs/list/outcomes.d.ts +6 -2
- package/dist/commands/runs/logs/command.d.ts +3 -4
- package/dist/commands/runs/logs/command.js +46 -41
- package/dist/commands/runs/logs/metadata.d.ts +17 -15
- package/dist/commands/runs/logs/metadata.js +20 -18
- package/dist/commands/runs/past-run.d.ts +3 -33
- package/dist/commands/runs/past-run.js +3 -52
- package/dist/commands/runs/show/command.d.ts +57 -42
- package/dist/commands/runs/show/command.js +93 -82
- package/dist/commands/runs/show/metadata.d.ts +20 -18
- package/dist/commands/runs/show/metadata.js +20 -18
- package/dist/commands/runs/show/outcomes.d.ts +27 -19
- package/dist/commands/runs/show/outcomes.js +8 -6
- package/dist/commands/vitest/command.d.ts +95 -560
- package/dist/commands/vitest/command.js +84 -100
- package/dist/commands/vitest/metadata.d.ts +0 -65
- package/dist/commands/vitest/metadata.js +2 -41
- package/dist/commands/vitest/outcomes.d.ts +44 -274
- package/dist/commands/vitest/outcomes.js +7 -14
- package/dist/config/credential-resolver.d.ts +134 -0
- package/dist/config/credential-resolver.js +70 -0
- package/dist/{credential/settle.d.ts → config/credential-settle.d.ts} +1 -2
- package/dist/config/errors.d.ts +1 -1
- package/dist/config/errors.js +5 -5
- package/dist/config/index.d.ts +7 -6
- package/dist/config/index.js +13 -9
- package/dist/config/load.d.ts +16 -13
- package/dist/config/load.js +55 -40
- package/dist/config/recipe-run.d.ts +26 -0
- package/dist/config/recipe-run.js +27 -0
- package/dist/config/resolve.d.ts +103 -15
- package/dist/config/resolve.js +137 -47
- package/dist/config/resolver.d.ts +40 -0
- package/dist/config/resolver.js +31 -0
- package/dist/config/schema.d.ts +13 -17
- package/dist/config/schema.js +14 -35
- package/dist/config/settings-file.d.ts +28 -16
- package/dist/config/settings-file.js +39 -24
- package/dist/config/typed-options.d.ts +21 -0
- package/dist/config/typed-options.js +28 -0
- package/dist/config-file/define.d.ts +33 -31
- package/dist/config-file/define.js +14 -4
- package/dist/config-file/toolchain.d.ts +1 -1
- package/dist/context.d.ts +60 -29
- package/dist/context.js +32 -13
- package/dist/core/before-run.d.ts +38 -0
- package/dist/core/before-run.js +44 -0
- package/dist/core/definition-lookup.d.ts +22 -0
- package/dist/core/definition-lookup.js +34 -0
- package/dist/core/events.d.ts +59 -64
- package/dist/core/gateways.d.ts +23 -164
- package/dist/core/index.d.ts +14 -15
- package/dist/core/index.js +13 -11
- package/dist/core/launcher-supplies.d.ts +11 -0
- package/dist/core/launcher-supplies.js +28 -0
- package/dist/core/live/terminal-command-gateway.d.ts +8 -0
- package/dist/core/live/terminal-command-gateway.js +49 -0
- package/dist/core/payload.d.ts +13 -14
- package/dist/core/payload.js +9 -8
- package/dist/core/presentations.d.ts +38 -37
- package/dist/core/presentations.js +48 -56
- package/dist/core/reports.d.ts +5 -0
- package/dist/core/reports.js +13 -0
- package/dist/core/resource-registry.d.ts +38 -0
- package/dist/core/resource-registry.js +30 -0
- package/dist/core/resource-reports.d.ts +69 -0
- package/dist/core/resource-reports.js +67 -0
- package/dist/core/resource.d.ts +135 -243
- package/dist/core/resource.js +7 -5
- package/dist/core/resources-of.d.ts +16 -0
- package/dist/core/resources-of.js +8 -0
- package/dist/core/resources.d.ts +97 -84
- package/dist/core/resources.js +166 -165
- package/dist/core/run-state.d.ts +30 -42
- package/dist/core/run-state.js +56 -60
- package/dist/core/run.d.ts +83 -90
- package/dist/core/run.js +109 -155
- package/dist/core/state-directory.js +4 -3
- package/dist/core/timeline.d.ts +42 -24
- package/dist/core/timeline.js +46 -27
- package/dist/core/timing.d.ts +3 -3
- package/dist/core/timing.js +1 -1
- package/dist/credential/events.d.ts +20 -0
- package/dist/credential/events.js +4 -0
- package/dist/credential/gateways.d.ts +1 -80
- package/dist/credential/index.d.ts +4 -5
- package/dist/credential/index.js +8 -5
- package/dist/credential/live/github-actions-token-response.js +1 -1
- package/dist/credential/live/vercel-cli-gateway.d.ts +2 -1
- package/dist/credential/live/vercel-cli-gateway.js +1 -1
- package/dist/credential/live/vercel-output.d.ts +1 -1
- package/dist/credential/source.d.ts +44 -75
- package/dist/credential/source.js +33 -28
- package/dist/credential/target.d.ts +1 -1
- package/dist/extension-commands.d.ts +20 -0
- package/dist/extension-commands.js +27 -0
- package/dist/extensions/github/definition.d.ts +26 -0
- package/dist/extensions/github/definition.js +29 -0
- package/dist/extensions/github/extension.d.ts +18 -0
- package/dist/extensions/github/extension.js +6 -0
- package/dist/{resources → extensions}/github/fixture-repo.d.ts +11 -8
- package/dist/{resources → extensions}/github/fixture-repo.js +8 -4
- package/dist/extensions/github/index.d.ts +13 -0
- package/dist/extensions/github/index.js +17 -0
- package/dist/extensions/github/lifecycle.d.ts +30 -0
- package/dist/extensions/github/lifecycle.js +69 -0
- package/dist/extensions/github/live/world.d.ts +6 -0
- package/dist/extensions/github/live/world.js +16 -0
- package/dist/extensions/github/options.d.ts +36 -0
- package/dist/extensions/github/options.js +36 -0
- package/dist/extensions/github/refusals.d.ts +32 -0
- package/dist/extensions/github/refusals.js +43 -0
- package/dist/extensions/github/release.d.ts +17 -0
- package/dist/extensions/github/release.js +34 -0
- package/dist/extensions/github/resource.d.ts +36 -0
- package/dist/extensions/github/resource.js +21 -0
- package/dist/extensions/github/run/payload.d.ts +27 -0
- package/dist/extensions/github/run/payload.js +42 -0
- package/dist/extensions/github/world.d.ts +15 -0
- package/dist/extensions/github/world.js +3 -0
- package/dist/extensions/story/command-tree.d.ts +6 -0
- package/dist/extensions/story/command-tree.js +21 -0
- package/dist/extensions/story/commands/app.d.ts +23 -0
- package/dist/extensions/story/commands/app.js +5 -0
- package/dist/extensions/story/commands/run/command.d.ts +211 -0
- package/dist/extensions/story/commands/run/command.js +259 -0
- package/dist/extensions/story/commands/run/metadata.d.ts +4 -0
- package/dist/extensions/story/commands/run/metadata.js +8 -0
- package/dist/extensions/story/commands/run/outcomes.d.ts +101 -0
- package/dist/extensions/story/commands/run/outcomes.js +73 -0
- package/dist/extensions/story/commands/tree.d.ts +2 -0
- package/dist/extensions/story/commands/tree.js +6 -0
- package/dist/extensions/story/extension.d.ts +2 -0
- package/dist/extensions/story/extension.js +8 -0
- package/dist/extensions/testserver/canceled.d.ts +7 -0
- package/dist/extensions/testserver/canceled.js +27 -0
- package/dist/extensions/testserver/command-tree.d.ts +6 -0
- package/dist/extensions/testserver/command-tree.js +20 -0
- package/dist/extensions/testserver/commands/app.d.ts +22 -0
- package/dist/extensions/testserver/commands/app.js +5 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/command.d.ts +277 -237
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/command.js +112 -141
- package/dist/extensions/testserver/commands/pool/create/metadata.d.ts +33 -0
- package/dist/extensions/testserver/commands/pool/create/metadata.js +55 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.d.ts +132 -112
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.js +6 -24
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/command.d.ts +3 -4
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/command.js +34 -28
- package/dist/extensions/testserver/commands/pool/list/metadata.d.ts +11 -0
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/metadata.js +7 -5
- package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.js +1 -1
- package/dist/extensions/testserver/commands/pool/metadata.d.ts +3 -0
- package/dist/extensions/testserver/commands/pool/metadata.js +7 -0
- package/dist/extensions/testserver/commands/tree.d.ts +2 -0
- package/dist/extensions/testserver/commands/tree.js +6 -0
- package/dist/{resources → extensions}/testserver/credential-facts.d.ts +6 -40
- package/dist/{resources → extensions}/testserver/credential-facts.js +13 -35
- package/dist/extensions/testserver/definition.d.ts +57 -0
- package/dist/extensions/testserver/definition.js +71 -0
- package/dist/{resources → extensions}/testserver/events.d.ts +5 -4
- package/dist/extensions/testserver/events.js +4 -0
- package/dist/extensions/testserver/extension.d.ts +46 -0
- package/dist/extensions/testserver/extension.js +68 -0
- package/dist/extensions/testserver/index.d.ts +20 -0
- package/dist/extensions/testserver/index.js +31 -0
- package/dist/extensions/testserver/lifecycle.d.ts +24 -0
- package/dist/extensions/testserver/lifecycle.js +116 -0
- package/dist/{core → extensions/testserver}/limit.js +1 -0
- package/dist/extensions/testserver/live/world.d.ts +8 -0
- package/dist/extensions/testserver/live/world.js +38 -0
- package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.d.ts +1 -1
- package/dist/extensions/testserver/options/index.d.ts +5 -0
- package/dist/extensions/testserver/options/index.js +11 -0
- package/dist/extensions/testserver/options/rules.d.ts +69 -0
- package/dist/extensions/testserver/options/rules.js +92 -0
- package/dist/extensions/testserver/options/sandboxes.d.ts +29 -0
- package/dist/extensions/testserver/options/sandboxes.js +33 -0
- package/dist/extensions/testserver/options/ttl.d.ts +23 -0
- package/dist/extensions/testserver/options/ttl.js +42 -0
- package/dist/{resources → extensions}/testserver/pool/channels.d.ts +3 -3
- package/dist/{resources → extensions}/testserver/pool/channels.js +2 -2
- package/dist/{resources → extensions}/testserver/pool/create.d.ts +1 -2
- package/dist/{resources → extensions}/testserver/pool/create.js +2 -1
- package/dist/{resources → extensions}/testserver/pool/index.d.ts +0 -1
- package/dist/{resources → extensions}/testserver/pool/index.js +2 -3
- package/dist/{resources → extensions}/testserver/pool/inspect.d.ts +1 -1
- package/dist/{resources → extensions}/testserver/pool/lease.d.ts +1 -1
- package/dist/extensions/testserver/pool/live/pool-store-gateway.d.ts +12 -0
- package/dist/{resources → extensions}/testserver/pool/live/pool-store-gateway.js +4 -4
- package/dist/{resources → extensions}/testserver/pool/pull-request.d.ts +8 -5
- package/dist/{resources → extensions}/testserver/pool/pull-request.js +2 -2
- package/dist/extensions/testserver/pr-build-facts.d.ts +156 -0
- package/dist/extensions/testserver/pr-build-facts.js +309 -0
- package/dist/extensions/testserver/presentation.d.ts +11 -0
- package/dist/{resources → extensions}/testserver/presentation.js +35 -56
- package/dist/{resources/testserver/lane.d.ts → extensions/testserver/progress.d.ts} +10 -6
- package/dist/{resources/testserver/lane.js → extensions/testserver/progress.js} +21 -16
- package/dist/extensions/testserver/provision.d.ts +160 -0
- package/dist/{resources/testserver/provider.js → extensions/testserver/provision.js} +80 -108
- package/dist/{resources → extensions}/testserver/pull-request/gateways.d.ts +1 -1
- package/dist/extensions/testserver/pull-request/gateways.js +5 -0
- package/dist/{resources → extensions}/testserver/pull-request/index.js +2 -2
- package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.d.ts +4 -4
- package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.js +4 -4
- package/dist/extensions/testserver/refusals.d.ts +72 -0
- package/dist/extensions/testserver/refusals.js +117 -0
- package/dist/extensions/testserver/release.d.ts +14 -0
- package/dist/extensions/testserver/release.js +26 -0
- package/dist/extensions/testserver/resource.d.ts +57 -0
- package/dist/extensions/testserver/resource.js +19 -0
- package/dist/extensions/testserver/result.d.ts +55 -0
- package/dist/extensions/testserver/result.js +98 -0
- package/dist/extensions/testserver/run/connection.d.ts +21 -0
- package/dist/extensions/testserver/run/connection.js +39 -0
- package/dist/extensions/testserver/run-sandbox.d.ts +16 -0
- package/dist/extensions/testserver/run-sandbox.js +11 -0
- package/dist/{resources → extensions}/testserver/sandbox/create.d.ts +1 -11
- package/dist/{resources → extensions}/testserver/sandbox/create.js +0 -15
- package/dist/{resources → extensions}/testserver/sandbox/gateways.d.ts +1 -1
- package/dist/{resources → extensions}/testserver/sandbox/index.d.ts +1 -3
- package/dist/extensions/testserver/sandbox/index.js +6 -0
- package/dist/extensions/testserver/testserver-sdk.d.ts +1 -0
- package/dist/extensions/testserver/testserver-sdk.js +4 -0
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.js +4 -4
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.d.ts +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.js +1 -1
- package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.js +1 -1
- package/dist/extensions/testserver/vitest/config.d.ts +30 -0
- package/dist/extensions/testserver/vitest/config.js +41 -0
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.d.ts +25 -14
- package/dist/{vitest → extensions/testserver/vitest}/container-scope.js +55 -17
- package/dist/extensions/testserver/vitest/container-start.d.ts +19 -0
- package/dist/extensions/testserver/vitest/container-start.js +31 -0
- package/dist/{vitest → extensions/testserver/vitest}/diagnostics.d.ts +66 -29
- package/dist/{vitest → extensions/testserver/vitest}/diagnostics.js +146 -50
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.d.ts +7 -5
- package/dist/{vitest → extensions/testserver/vitest}/fixtures.js +69 -26
- package/dist/extensions/testserver/vitest/index.d.ts +3 -0
- package/dist/extensions/testserver/vitest/index.js +10 -0
- package/dist/extensions/testserver/vitest/sandbox.d.ts +25 -0
- package/dist/extensions/testserver/vitest/sandbox.js +43 -0
- package/dist/{vitest → extensions/testserver/vitest}/types.d.ts +1 -1
- package/dist/extensions/testserver/world.d.ts +25 -0
- package/dist/extensions/testserver/world.js +4 -0
- package/dist/extensions.d.ts +144 -0
- package/dist/extensions.js +41 -0
- package/dist/forward-sigterm.d.ts +8 -0
- package/dist/forward-sigterm.js +18 -0
- package/dist/help-logo.js +5 -5
- package/dist/launch.js +46 -0
- package/dist/launcher-resolvers/index.d.ts +2 -0
- package/dist/launcher-resolvers/index.js +8 -0
- package/dist/launcher-resolvers/local-services.d.ts +57 -0
- package/dist/launcher-resolvers/local-services.js +7 -0
- package/dist/live-app.js +12 -7
- package/dist/local-services.d.ts +19 -0
- package/dist/local-services.js +37 -0
- package/dist/presentation.js +2 -2
- package/dist/run-directory/gateways.d.ts +167 -0
- package/dist/run-directory/gateways.js +2 -0
- package/dist/run-directory/index.d.ts +8 -0
- package/dist/run-directory/index.js +13 -0
- package/dist/run-directory/plan.d.ts +35 -0
- package/dist/run-directory/plan.js +24 -0
- package/dist/run-directory/reader.d.ts +70 -0
- package/dist/run-directory/reader.js +51 -0
- package/dist/run-directory/recording.d.ts +92 -0
- package/dist/run-directory/recording.js +85 -0
- package/dist/run-directory/run-collector.d.ts +36 -0
- package/dist/{commands/exec → run-directory}/run-collector.js +10 -12
- package/dist/{core → run-directory}/run-directory.d.ts +13 -14
- package/dist/{core → run-directory}/run-directory.js +11 -11
- package/dist/{commands/exec → run-directory}/run-record.d.ts +92 -61
- package/dist/run-directory/run-record.js +209 -0
- package/dist/run-directory/timeline-facts.d.ts +53 -0
- package/dist/run-directory/timeline-facts.js +76 -0
- package/dist/runner/base.js +1 -1
- package/dist/runner/context.js +1 -1
- package/dist/runner/events.d.ts +6 -5
- package/dist/runner/events.js +1 -1
- package/dist/runner/gateways.d.ts +11 -11
- package/dist/runner/gateways.js +1 -1
- package/dist/runner/index.d.ts +13 -17
- package/dist/runner/index.js +10 -14
- package/dist/runner/live/sandbox-gateway.js +4 -4
- package/dist/runner/live/terminal.d.ts +1 -1
- package/dist/runner/live/terminal.js +1 -1
- package/dist/runner/prepare.d.ts +40 -17
- package/dist/runner/prepare.js +17 -11
- package/dist/runner/ready.js +2 -2
- package/dist/runner/recipe.d.ts +38 -20
- package/dist/runner/recipe.js +31 -17
- package/dist/runner/{remote-command.d.ts → sandboxed-command.d.ts} +18 -19
- package/dist/runner/{remote-command.js → sandboxed-command.js} +21 -22
- package/dist/runner/scope.d.ts +21 -14
- package/dist/runner/scope.js +12 -10
- package/dist/runner/secrets.js +1 -1
- package/dist/runner/session.d.ts +100 -0
- package/dist/runner/session.js +109 -0
- package/dist/runner/snapshot-key.d.ts +1 -1
- package/dist/runner/snapshot-key.js +4 -4
- package/dist/runner/snapshot-save.d.ts +3 -2
- package/dist/runner/snapshot-save.js +8 -7
- package/dist/sdk/extension/ci.d.ts +2 -0
- package/dist/sdk/extension/ci.js +6 -0
- package/dist/sdk/extension/commands.d.ts +69 -0
- package/dist/sdk/extension/commands.js +31 -0
- package/dist/{credential/diagnosis.d.ts → sdk/extension/credential-diagnosis.d.ts} +1 -7
- package/dist/{credential/diagnosis.js → sdk/extension/credential-diagnosis.js} +2 -11
- package/dist/sdk/extension/credential-source.d.ts +132 -0
- package/dist/sdk/extension/credential-source.js +5 -0
- package/dist/{credential → sdk/extension}/credential.d.ts +8 -7
- package/dist/{credential → sdk/extension}/credential.js +9 -6
- package/dist/sdk/extension/index.d.ts +16 -0
- package/dist/sdk/extension/index.js +40 -0
- package/dist/sdk/extension/launcher-supplies.d.ts +24 -0
- package/dist/sdk/extension/launcher-supplies.js +3 -0
- package/dist/sdk/extension/lifecycle.d.ts +212 -0
- package/dist/sdk/extension/lifecycle.js +9 -0
- package/dist/sdk/extension/presentation.d.ts +31 -0
- package/dist/sdk/extension/presentation.js +7 -0
- package/dist/sdk/extension/progress.d.ts +75 -0
- package/dist/sdk/extension/progress.js +8 -0
- package/dist/sdk/extension/reports.d.ts +15 -0
- package/dist/sdk/extension/reports.js +5 -0
- package/dist/sdk/extension/resource-definition.d.ts +204 -0
- package/dist/sdk/extension/resource-definition.js +24 -0
- package/dist/sdk/extension/resource-factory.d.ts +10 -0
- package/dist/sdk/extension/resource-factory.js +15 -0
- package/dist/sdk/extension/resource.d.ts +60 -0
- package/dist/sdk/extension/resource.js +42 -0
- package/dist/sdk/extension/rules.d.ts +16 -0
- package/dist/sdk/extension/rules.js +30 -0
- package/dist/sdk/extension/span.d.ts +8 -0
- package/dist/sdk/extension/span.js +4 -0
- package/dist/sdk/extension/time.d.ts +11 -0
- package/dist/sdk/extension/time.js +4 -0
- package/dist/sdk/extension/token-request-facts.d.ts +39 -0
- package/dist/sdk/extension/token-request-facts.js +35 -0
- package/dist/sdk/index.d.ts +4 -7
- package/dist/sdk/index.js +7 -15
- package/dist/sdk/run/contract.d.ts +32 -0
- package/dist/sdk/run/contract.js +12 -0
- package/dist/sdk/run/launcher.d.ts +5 -0
- package/dist/sdk/run/launcher.js +6 -0
- package/dist/sdk/run/payload.d.ts +58 -0
- package/dist/sdk/run/payload.js +73 -0
- package/dist/sdk/run/present.d.ts +11 -0
- package/dist/sdk/run/present.js +4 -0
- package/dist/sdk/run/redact.d.ts +5 -0
- package/dist/sdk/run/redact.js +12 -0
- package/dist/story/align.d.ts +1 -1
- package/dist/story/align.js +1 -1
- package/dist/story/command-line.d.ts +6 -16
- package/dist/story/command-line.js +11 -23
- package/dist/story/errors.d.ts +1 -1
- package/dist/story/errors.js +1 -1
- package/dist/story/host.d.ts +1 -1
- package/dist/story/host.js +2 -2
- package/dist/story/index.d.ts +2 -2
- package/dist/story/index.js +4 -3
- package/dist/story/launch.d.ts +70 -0
- package/dist/story/launch.js +77 -0
- package/dist/story/report.d.ts +2 -2
- package/dist/story/report.js +3 -4
- package/dist/story/settle.d.ts +7 -7
- package/dist/story/settle.js +5 -5
- package/dist/story/start.d.ts +2 -2
- package/dist/time/duration.js +2 -2
- package/dist/time/index.js +2 -1
- package/dist/time/time.d.ts +2 -11
- package/dist/time/time.js +2 -2
- package/dist/{sdk → vendor/testserver-sdk}/container/api-request.d.ts +14 -2
- package/dist/vendor/testserver-sdk/container/api-request.js +68 -0
- package/dist/vendor/testserver-sdk/container/container.d.ts +199 -0
- package/dist/vendor/testserver-sdk/container/container.js +458 -0
- package/dist/vendor/testserver-sdk/container/external.d.ts +111 -0
- package/dist/vendor/testserver-sdk/container/external.js +76 -0
- package/dist/vendor/testserver-sdk/container/gateways.d.ts +156 -0
- package/dist/{sdk → vendor/testserver-sdk}/container/index.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/container/index.js +2 -1
- package/dist/vendor/testserver-sdk/container/live/container-gateway.d.ts +22 -0
- package/dist/vendor/testserver-sdk/container/live/container-gateway.js +165 -0
- package/dist/vendor/testserver-sdk/container/recorder.d.ts +69 -0
- package/dist/vendor/testserver-sdk/container/recorder.js +121 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/build.d.ts +33 -12
- package/dist/{sdk → vendor/testserver-sdk}/factories/build.js +36 -14
- package/dist/vendor/testserver-sdk/factories/definition.d.ts +39 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/definition.js +1 -1
- package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.d.ts +7 -4
- package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.js +10 -0
- package/dist/vendor/testserver-sdk/factories/gateways.d.ts +31 -0
- package/dist/vendor/testserver-sdk/factories/index.d.ts +4 -0
- package/dist/{sdk → vendor/testserver-sdk}/factories/index.js +3 -3
- package/dist/vendor/testserver-sdk/index.d.ts +6 -0
- package/dist/vendor/testserver-sdk/index.js +11 -0
- package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.js +8 -4
- package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.js +7 -2
- package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.d.ts +2 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/records.d.ts +10 -1
- package/dist/{sdk → vendor/testserver-sdk}/proxy/records.js +13 -0
- package/dist/{sdk → vendor/testserver-sdk}/records/index.d.ts +1 -1
- package/dist/{sdk → vendor/testserver-sdk}/records/records.d.ts +17 -1
- package/dist/vendor/testserver-sdk/testserver/external-ids.d.ts +38 -0
- package/dist/vendor/testserver-sdk/testserver/external-ids.js +46 -0
- package/dist/vendor/testserver-sdk/testserver/failure.d.ts +102 -0
- package/dist/vendor/testserver-sdk/testserver/failure.js +109 -0
- package/dist/vendor/testserver-sdk/testserver/index.d.ts +7 -0
- package/dist/vendor/testserver-sdk/testserver/index.js +11 -0
- package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.d.ts +8 -10
- package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.js +8 -6
- package/dist/vendor/testserver-sdk/testserver/routes.d.ts +60 -0
- package/dist/vendor/testserver-sdk/testserver/routes.js +84 -0
- package/dist/vendor/testserver-sdk/testserver/service-ids.d.ts +31 -0
- package/dist/{sdk → vendor/testserver-sdk}/testserver/service-ids.js +27 -4
- package/dist/vitest/config.d.ts +2 -28
- package/dist/vitest/config.js +6 -36
- package/dist/vitest/gateways.js +1 -1
- package/dist/vitest/index.d.ts +2 -3
- package/dist/vitest/index.js +5 -9
- package/dist/vitest/plan.d.ts +1 -16
- package/dist/vitest/plan.js +4 -36
- package/dist/vitest/test-events.d.ts +1 -18
- package/dist/vitest/test-events.js +2 -31
- package/package.json +52 -23
- package/skills/overview.md +12 -9
- package/skills/read-run-output.md +26 -3
- package/skills/testserver-builds.md +8 -8
- package/dist/chunks/chunk-5CQCRX2L.js +0 -5768
- package/dist/chunks/chunk-5U5Q6VZR.js +0 -556
- package/dist/chunks/chunk-7O6UN63H.js +0 -63
- package/dist/chunks/chunk-NX55IJ5S.js +0 -1842
- package/dist/chunks/chunk-OCZJE5XV.js +0 -910
- package/dist/chunks/chunk-RRQ2ZGSE.js +0 -1512
- package/dist/chunks/chunk-S5NAIZYS.js +0 -13
- package/dist/chunks/chunk-UHO5OCEX.js +0 -360
- package/dist/chunks/chunk-WBIHJM7D.js +0 -188
- package/dist/combine-errors.d.ts +0 -11
- package/dist/combine-errors.js +0 -19
- package/dist/commands/exec/run-collector.d.ts +0 -30
- package/dist/commands/exec/run-record.js +0 -152
- package/dist/commands/exec/testserver-flags.d.ts +0 -48
- package/dist/commands/exec/testserver-flags.js +0 -80
- package/dist/config/by-name.d.ts +0 -24
- package/dist/config/by-name.js +0 -26
- package/dist/config/resource-config.d.ts +0 -132
- package/dist/config/resource-config.js +0 -19
- package/dist/config/set.d.ts +0 -27
- package/dist/config/set.js +0 -71
- package/dist/core/command-provider.d.ts +0 -126
- package/dist/core/command-provider.js +0 -13
- package/dist/core/command-slots.d.ts +0 -73
- package/dist/core/command-slots.js +0 -140
- package/dist/core/keyed.d.ts +0 -12
- package/dist/core/keyed.js +0 -24
- package/dist/core/lane.d.ts +0 -46
- package/dist/core/lane.js +0 -5
- package/dist/core/mint.d.ts +0 -10
- package/dist/core/mint.js +0 -14
- package/dist/core/presentation.d.ts +0 -87
- package/dist/core/presentation.js +0 -5
- package/dist/core/provider.d.ts +0 -79
- package/dist/core/provider.js +0 -5
- package/dist/resource-commands.d.ts +0 -13
- package/dist/resource-commands.js +0 -22
- package/dist/resources/github/cleanup.d.ts +0 -23
- package/dist/resources/github/cleanup.js +0 -39
- package/dist/resources/github/command.d.ts +0 -126
- package/dist/resources/github/command.js +0 -117
- package/dist/resources/github/config.d.ts +0 -16
- package/dist/resources/github/config.js +0 -37
- package/dist/resources/github/events.d.ts +0 -26
- package/dist/resources/github/events.js +0 -2
- package/dist/resources/github/index.d.ts +0 -12
- package/dist/resources/github/index.js +0 -15
- package/dist/resources/github/live/gateways.d.ts +0 -6
- package/dist/resources/github/live/gateways.js +0 -13
- package/dist/resources/github/presentation.d.ts +0 -13
- package/dist/resources/github/presentation.js +0 -43
- package/dist/resources/github/provider.d.ts +0 -66
- package/dist/resources/github/provider.js +0 -58
- package/dist/resources/github/resource-provider.d.ts +0 -6
- package/dist/resources/github/resource-provider.js +0 -20
- package/dist/resources/github/resource.d.ts +0 -33
- package/dist/resources/github/resource.js +0 -12
- package/dist/resources/testserver/cleanup.d.ts +0 -14
- package/dist/resources/testserver/cleanup.js +0 -22
- package/dist/resources/testserver/command-tree.d.ts +0 -4
- package/dist/resources/testserver/command-tree.js +0 -12
- package/dist/resources/testserver/command.d.ts +0 -520
- package/dist/resources/testserver/command.js +0 -252
- package/dist/resources/testserver/commands/app.d.ts +0 -18
- package/dist/resources/testserver/commands/app.js +0 -3
- package/dist/resources/testserver/commands/create/metadata.d.ts +0 -31
- package/dist/resources/testserver/commands/create/metadata.js +0 -53
- package/dist/resources/testserver/commands/list/metadata.d.ts +0 -9
- package/dist/resources/testserver/config.d.ts +0 -18
- package/dist/resources/testserver/config.js +0 -88
- package/dist/resources/testserver/events.js +0 -4
- package/dist/resources/testserver/index.d.ts +0 -16
- package/dist/resources/testserver/index.js +0 -25
- package/dist/resources/testserver/live/gateways.d.ts +0 -8
- package/dist/resources/testserver/live/gateways.js +0 -39
- package/dist/resources/testserver/options.d.ts +0 -5
- package/dist/resources/testserver/options.js +0 -5
- package/dist/resources/testserver/pool/directory.d.ts +0 -4
- package/dist/resources/testserver/pool/directory.js +0 -5
- package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +0 -12
- package/dist/resources/testserver/pr-build-facts.d.ts +0 -130
- package/dist/resources/testserver/pr-build-facts.js +0 -261
- package/dist/resources/testserver/presentation.d.ts +0 -9
- package/dist/resources/testserver/provider.d.ts +0 -187
- package/dist/resources/testserver/pull-request/gateways.js +0 -5
- package/dist/resources/testserver/ran.d.ts +0 -92
- package/dist/resources/testserver/ran.js +0 -156
- package/dist/resources/testserver/resource-provider.d.ts +0 -12
- package/dist/resources/testserver/resource-provider.js +0 -32
- package/dist/resources/testserver/resource.d.ts +0 -36
- package/dist/resources/testserver/resource.js +0 -10
- package/dist/resources/testserver/run-sandbox.d.ts +0 -13
- package/dist/resources/testserver/run-sandbox.js +0 -6
- package/dist/resources/testserver/sandbox/index.js +0 -8
- package/dist/resources.d.ts +0 -702
- package/dist/resources.js +0 -83
- package/dist/sdk/container/api-request.js +0 -46
- package/dist/sdk/container/container.d.ts +0 -144
- package/dist/sdk/container/container.js +0 -346
- package/dist/sdk/container/gateways.d.ts +0 -108
- package/dist/sdk/container/live/container-gateway.d.ts +0 -17
- package/dist/sdk/container/live/container-gateway.js +0 -114
- package/dist/sdk/factories/definition.d.ts +0 -28
- package/dist/sdk/factories/gateways.d.ts +0 -25
- package/dist/sdk/factories/index.d.ts +0 -5
- package/dist/sdk/factories/live/factory-gateway.d.ts +0 -10
- package/dist/sdk/factories/live/factory-gateway.js +0 -29
- package/dist/sdk/host.d.ts +0 -2
- package/dist/sdk/host.js +0 -7
- package/dist/sdk/payload/index.d.ts +0 -2
- package/dist/sdk/payload/index.js +0 -4
- package/dist/sdk/payload/payload.d.ts +0 -47
- package/dist/sdk/payload/payload.js +0 -74
- package/dist/sdk/testserver/failure.d.ts +0 -73
- package/dist/sdk/testserver/failure.js +0 -61
- package/dist/sdk/testserver/index.d.ts +0 -5
- package/dist/sdk/testserver/index.js +0 -8
- package/dist/sdk/testserver/service-ids.d.ts +0 -19
- package/dist/story/mode.d.ts +0 -17
- package/dist/story/mode.js +0 -21
- package/dist/vitest/sandbox.d.ts +0 -22
- package/dist/vitest/sandbox.js +0 -41
- /package/dist/{credential/settle.js → config/credential-settle.js} +0 -0
- /package/dist/{resources → extensions}/github/gateways.d.ts +0 -0
- /package/dist/{resources → extensions}/github/gateways.js +0 -0
- /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.js +0 -0
- /package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.d.ts +0 -0
- /package/dist/{core → extensions/testserver}/limit.d.ts +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.d.ts +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.js +0 -0
- /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/gateways.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/gateways.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/host.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/host.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/inspect.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/lease.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/live/pool-records.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/live/pool-records.js +0 -0
- /package/dist/{resources → extensions}/testserver/pool/staleness.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pool/staleness.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/index.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/create-failure.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/create-failure.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/gateways.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.js +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/sse.d.ts +0 -0
- /package/dist/{resources → extensions}/testserver/sandbox/live/sse.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.js +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.d.ts +0 -0
- /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.d.ts +0 -0
- /package/dist/{vitest → extensions/testserver/vitest}/types.js +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.d.ts +0 -0
- /package/dist/{core → run-directory}/live/run-directory-gateway.js +0 -0
- /package/dist/sdk/{payload → run}/test-events.d.ts +0 -0
- /package/dist/sdk/{payload → run}/test-events.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/container/gateways.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/factories/gateways.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/body.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/body.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/records/records.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/index.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/index.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.js +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.d.ts +0 -0
- /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
// Command lines a harness splits without a shell: a story's command, and the executable
|
|
2
|
-
// place of the package's own, such as a port of the tool to another language. Pure.
|
|
1
|
+
// Command lines a harness splits without a shell: a story's command, and the executable `storm story run --bin` names
|
|
2
|
+
// in place of the package's own, such as a port of the tool to another language. Pure. It loads only Node builtins,
|
|
3
|
+
// never vitest, so `storm story run` resolves `--bin` with `resolveStoryExecutable` once, before the stories run.
|
|
3
4
|
import { isAbsolute, resolve } from "node:path";
|
|
4
|
-
/** A command line the harness can't split into words: the story or
|
|
5
|
+
/** A command line the harness can't split into words, or one that names no program: the story or `--bin` wrote it. */
|
|
5
6
|
export class InvalidCommandLine extends Error {
|
|
6
7
|
name = "InvalidCommandLine";
|
|
7
8
|
}
|
|
@@ -73,28 +74,15 @@ export function splitCommandLine(command) {
|
|
|
73
74
|
return words;
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
|
-
* The executable `
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
77
|
+
* The executable `commandLine` names, split as `splitCommandLine` splits a story's command: its first word is the
|
|
78
|
+
* program, and the rest come before the story's arguments. A program word with a `/` that isn't absolute resolves
|
|
79
|
+
* against `base`; a word without one stays as it is, for `PATH` to find. A command line that doesn't split, or holds
|
|
80
|
+
* only whitespace, throws `InvalidCommandLine`.
|
|
80
81
|
*/
|
|
81
|
-
export function
|
|
82
|
-
const
|
|
83
|
-
if (commandLine === undefined || commandLine === "")
|
|
84
|
-
return fallback;
|
|
85
|
-
let words;
|
|
86
|
-
try {
|
|
87
|
-
words = splitCommandLine(commandLine);
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
throw new Error(`${variable} ${errorText(error)}`, { cause: error });
|
|
91
|
-
}
|
|
92
|
-
const [program, ...args] = words;
|
|
82
|
+
export function resolveStoryExecutable(commandLine, base) {
|
|
83
|
+
const [program, ...args] = splitCommandLine(commandLine);
|
|
93
84
|
if (program === undefined)
|
|
94
|
-
throw new
|
|
85
|
+
throw new InvalidCommandLine(`${JSON.stringify(commandLine)} names no program`);
|
|
95
86
|
const file = program.includes("/") && !isAbsolute(program) ? resolve(base, program) : program;
|
|
96
87
|
return { file, args };
|
|
97
88
|
}
|
|
98
|
-
function errorText(error) {
|
|
99
|
-
return error instanceof Error ? error.message : String(error);
|
|
100
|
-
}
|
package/dist/story/errors.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class StoryDivergenceError extends Error {
|
|
|
6
6
|
readonly stale: readonly StoryStaleEntry[];
|
|
7
7
|
constructor(report: string, divergences: readonly StoryDivergence[], stale: readonly StoryStaleEntry[]);
|
|
8
8
|
}
|
|
9
|
-
/** A story's recording no longer fits it, and `
|
|
9
|
+
/** A story's recording no longer fits it, and the answers level `check` may not change it. */
|
|
10
10
|
export declare class StoryStaleError extends Error {
|
|
11
11
|
readonly name = "StoryStaleError";
|
|
12
12
|
readonly stale: readonly StoryStaleEntry[];
|
package/dist/story/errors.js
CHANGED
|
@@ -10,7 +10,7 @@ export class StoryDivergenceError extends Error {
|
|
|
10
10
|
this.stale = stale;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
/** A story's recording no longer fits it, and `
|
|
13
|
+
/** A story's recording no longer fits it, and the answers level `check` may not change it. */
|
|
14
14
|
export class StoryStaleError extends Error {
|
|
15
15
|
name = "StoryStaleError";
|
|
16
16
|
stale;
|
package/dist/story/host.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare module "vitest" {
|
|
|
9
9
|
export interface StoryHostOptions {
|
|
10
10
|
/** Each story's timeout; default the Vitest project's `testTimeout`. */
|
|
11
11
|
readonly timeout?: number;
|
|
12
|
-
/** Where `
|
|
12
|
+
/** Where the story launch comes from (`STORM_STORY`, which `storm story run` sets); default `process.env`. */
|
|
13
13
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
14
14
|
}
|
|
15
15
|
/** Declares one story, a Vitest test named `name`, whose body gets one handle per agent. */
|
package/dist/story/host.js
CHANGED
|
@@ -4,7 +4,7 @@ import { basename } from "node:path";
|
|
|
4
4
|
import { test } from "vitest";
|
|
5
5
|
import { recordingPath } from "./recording.js";
|
|
6
6
|
import { liveStoryRecordingGateway } from "./live/recording-gateway.js";
|
|
7
|
-
import {
|
|
7
|
+
import { storyAnswersLevel } from "./launch.js";
|
|
8
8
|
import { findOrphans, looksForOrphans } from "./orphans.js";
|
|
9
9
|
import { startStory } from "./start.js";
|
|
10
10
|
/**
|
|
@@ -25,7 +25,7 @@ export function createStory(harness, options = {}) {
|
|
|
25
25
|
test(name, { meta: { story: true }, ...(options.timeout === undefined ? {} : { timeout: options.timeout }) }, async (context) => {
|
|
26
26
|
const file = context.task.file.filepath;
|
|
27
27
|
const story = { file: basename(file), name: context.task.fullTestName };
|
|
28
|
-
const level =
|
|
28
|
+
const level = storyAnswersLevel(options.env ?? process.env);
|
|
29
29
|
const started = startStory(harness, { story, path: recordingPath(file, story.name), level, signal: context.signal }, liveStoryRecordingGateway);
|
|
30
30
|
const bodyEnded = await bodyEnd(() => body(started.handles), context.signal);
|
|
31
31
|
const orphans = await fileOrphans(context);
|
package/dist/story/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { recordingDirectory, recordingPath, parseRecording, type ParsedStoryRecording, STORY_RECORDING_SCHEMA_VERSION, type StoryRecording, type StoryCall, type StoryIdentity, } from "./recording.ts";
|
|
2
2
|
export { type AnyStoryTool, type StoryAgent, type StoryAgents, type StoryHandles, type StoryHarness, type StorySession, type StoryTool, type StoryToolCall, storyTool, } from "./definition.ts";
|
|
3
|
-
export { InvalidCommandLine, splitCommandLine, type StoryExecutable
|
|
3
|
+
export { InvalidCommandLine, splitCommandLine, type StoryExecutable } from "./command-line.ts";
|
|
4
4
|
export { StoryDivergenceError, StoryStaleError } from "./errors.ts";
|
|
5
5
|
export { createStory, type StoryFunction, type StoryHostOptions } from "./host.ts";
|
|
6
6
|
export type { StoryJson } from "./json.ts";
|
|
7
|
-
export {
|
|
7
|
+
export { type StoryAnswersLevel, type StoryExecutableOptions, storyExecutable } from "./launch.ts";
|
|
8
8
|
export type { StoryDivergence, StoryStaleEntry } from "./settle.ts";
|
package/dist/story/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Story core, exported as `@vercel/storm/story`: stories whose agents call tools, each call's observation kept in
|
|
2
2
|
// a recording beside the story file and compared on every later Vitest run. `README.md` beside this file is its design
|
|
3
3
|
// and authoring guide. It depends only on Node builtins, `zod`, and `vitest` (an optional peer dependency of
|
|
4
|
-
// `@vercel/storm`), and on nothing else in storm; `.oxlintrc.json` checks the boundary.
|
|
4
|
+
// `@vercel/storm`), and on nothing else in storm; `.oxlintrc.json` checks the boundary. The story launch, what
|
|
5
|
+
// `storm story run` hands the stories, is `launch.ts`, which loads no vitest, so the command imports it too.
|
|
5
6
|
export { recordingDirectory, recordingPath, parseRecording, STORY_RECORDING_SCHEMA_VERSION, } from "./recording.js";
|
|
6
7
|
export { storyTool, } from "./definition.js";
|
|
7
|
-
export { InvalidCommandLine, splitCommandLine
|
|
8
|
+
export { InvalidCommandLine, splitCommandLine } from "./command-line.js";
|
|
8
9
|
export { StoryDivergenceError, StoryStaleError } from "./errors.js";
|
|
9
10
|
export { createStory } from "./host.js";
|
|
10
|
-
export {
|
|
11
|
+
export { storyExecutable } from "./launch.js";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { StoryExecutable } from "./command-line.ts";
|
|
3
|
+
/** The environment variable that holds the story launch. */
|
|
4
|
+
export declare const STORY_LAUNCH_VARIABLE = "STORM_STORY";
|
|
5
|
+
/**
|
|
6
|
+
* The answers level: how much a story may change its recording.
|
|
7
|
+
*
|
|
8
|
+
* - `check` compares and writes nothing. A divergence or a stale entry fails the story.
|
|
9
|
+
* - `add` rewrites the recording so it fits the story again, when the only problems are stale entries: it records
|
|
10
|
+
* new calls, removes unmade ones, rewrites an unreadable recording and removes orphan recordings. A divergence
|
|
11
|
+
* still fails the story, and then nothing is written.
|
|
12
|
+
* - `accept` also accepts divergences, recording the new observations.
|
|
13
|
+
*/
|
|
14
|
+
export declare const storyAnswersLevelSchema: z.ZodEnum<{
|
|
15
|
+
accept: "accept";
|
|
16
|
+
add: "add";
|
|
17
|
+
check: "check";
|
|
18
|
+
}>;
|
|
19
|
+
/** The answers level (`storyAnswersLevelSchema`). */
|
|
20
|
+
export type StoryAnswersLevel = z.output<typeof storyAnswersLevelSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* The executable the stories invoke in place of the package's own (`--bin`), resolved (`resolveStoryExecutable`): its
|
|
23
|
+
* program, a relative one already resolved against the directory `storm story run` ran in, and the words it gets
|
|
24
|
+
* before a story's own arguments.
|
|
25
|
+
*/
|
|
26
|
+
export declare const storyExecutableSchema: z.ZodObject<{
|
|
27
|
+
file: z.ZodString;
|
|
28
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
declare const storyLaunchSchema: z.ZodObject<{
|
|
31
|
+
version: z.ZodLiteral<1>;
|
|
32
|
+
answers: z.ZodEnum<{
|
|
33
|
+
accept: "accept";
|
|
34
|
+
add: "add";
|
|
35
|
+
check: "check";
|
|
36
|
+
}>;
|
|
37
|
+
bin: z.ZodNullable<z.ZodObject<{
|
|
38
|
+
file: z.ZodString;
|
|
39
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
/** What `storm story run` hands the stories: its answers level and the executable `--bin` names. */
|
|
43
|
+
export type StoryLaunch = z.output<typeof storyLaunchSchema>;
|
|
44
|
+
/** The one variable that carries `launch`, to merge into the environment of the Vitest run the command starts. */
|
|
45
|
+
export declare function storyLaunchEnv(launch: StoryLaunch): Readonly<Record<string, string>>;
|
|
46
|
+
/**
|
|
47
|
+
* The story launch in `env`, or null when `env` holds none, as under a bare Vitest run or an IDE's test runner. A
|
|
48
|
+
* value that isn't JSON, or isn't a story launch this story core reads, such as one of another version, is a
|
|
49
|
+
* `TypeError` naming the variable.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readStoryLaunch(env: Readonly<Record<string, string | undefined>>): StoryLaunch | null;
|
|
52
|
+
/**
|
|
53
|
+
* The answers level the story launch in `env` names. Without one, as under a bare Vitest run or an IDE's test runner,
|
|
54
|
+
* in CI or not, the level is `check`: only `storm story run` writes a recording. A malformed launch is a `TypeError`
|
|
55
|
+
* naming its variable.
|
|
56
|
+
*/
|
|
57
|
+
export declare function storyAnswersLevel(env: Readonly<Record<string, string | undefined>>): StoryAnswersLevel;
|
|
58
|
+
/** Where `storyExecutable` reads the executable a harness invokes. */
|
|
59
|
+
export interface StoryExecutableOptions {
|
|
60
|
+
/** The environment the story launch is in, such as `process.env`. */
|
|
61
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
62
|
+
/** The executable when the story launch names none: the package's own. */
|
|
63
|
+
readonly fallback: StoryExecutable;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The executable `storm story run --bin` names, from the story launch in `env`, already resolved, or `fallback` when
|
|
67
|
+
* there is no launch or it names none. A malformed launch is a `TypeError` naming its variable.
|
|
68
|
+
*/
|
|
69
|
+
export declare function storyExecutable({ env, fallback }: StoryExecutableOptions): StoryExecutable;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The story launch: what `storm story run` hands the stories in the Vitest run it starts, as one private environment
|
|
2
|
+
// variable, `STORM_STORY`, holding JSON, and what the stories read of it: the answers level and the executable to
|
|
3
|
+
// invoke. It loads only Node builtins and zod, never vitest, so the command that writes it and the story code that
|
|
4
|
+
// reads it share it. People never set the variable by hand: the flags of `storm story run` are the settings.
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
/** The environment variable that holds the story launch. */
|
|
7
|
+
export const STORY_LAUNCH_VARIABLE = "STORM_STORY";
|
|
8
|
+
/**
|
|
9
|
+
* The answers level: how much a story may change its recording.
|
|
10
|
+
*
|
|
11
|
+
* - `check` compares and writes nothing. A divergence or a stale entry fails the story.
|
|
12
|
+
* - `add` rewrites the recording so it fits the story again, when the only problems are stale entries: it records
|
|
13
|
+
* new calls, removes unmade ones, rewrites an unreadable recording and removes orphan recordings. A divergence
|
|
14
|
+
* still fails the story, and then nothing is written.
|
|
15
|
+
* - `accept` also accepts divergences, recording the new observations.
|
|
16
|
+
*/
|
|
17
|
+
export const storyAnswersLevelSchema = z.enum(["check", "add", "accept"]);
|
|
18
|
+
/**
|
|
19
|
+
* The executable the stories invoke in place of the package's own (`--bin`), resolved (`resolveStoryExecutable`): its
|
|
20
|
+
* program, a relative one already resolved against the directory `storm story run` ran in, and the words it gets
|
|
21
|
+
* before a story's own arguments.
|
|
22
|
+
*/
|
|
23
|
+
export const storyExecutableSchema = z
|
|
24
|
+
.object({ file: z.string().min(1), args: z.array(z.string()).readonly() })
|
|
25
|
+
.strict();
|
|
26
|
+
const storyLaunchSchema = z
|
|
27
|
+
.object({
|
|
28
|
+
version: z.literal(1),
|
|
29
|
+
answers: storyAnswersLevelSchema,
|
|
30
|
+
/** The executable `--bin` names (`storyExecutableSchema`); null without `--bin`. */
|
|
31
|
+
bin: storyExecutableSchema.nullable(),
|
|
32
|
+
})
|
|
33
|
+
.strict();
|
|
34
|
+
/** The one variable that carries `launch`, to merge into the environment of the Vitest run the command starts. */
|
|
35
|
+
export function storyLaunchEnv(launch) {
|
|
36
|
+
return { [STORY_LAUNCH_VARIABLE]: JSON.stringify(storyLaunchSchema.parse(launch)) };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The story launch in `env`, or null when `env` holds none, as under a bare Vitest run or an IDE's test runner. A
|
|
40
|
+
* value that isn't JSON, or isn't a story launch this story core reads, such as one of another version, is a
|
|
41
|
+
* `TypeError` naming the variable.
|
|
42
|
+
*/
|
|
43
|
+
export function readStoryLaunch(env) {
|
|
44
|
+
const text = env[STORY_LAUNCH_VARIABLE];
|
|
45
|
+
if (text === undefined || text === "")
|
|
46
|
+
return null;
|
|
47
|
+
let value;
|
|
48
|
+
try {
|
|
49
|
+
value = JSON.parse(text);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
throw new TypeError(`story: ${STORY_LAUNCH_VARIABLE} isn't JSON: ${errorText(error)}`, { cause: error });
|
|
53
|
+
}
|
|
54
|
+
const parsed = storyLaunchSchema.safeParse(value);
|
|
55
|
+
if (!parsed.success) {
|
|
56
|
+
throw new TypeError(`story: ${STORY_LAUNCH_VARIABLE} isn't a story launch this story core reads (version 1, set by storm story run): ${text}`);
|
|
57
|
+
}
|
|
58
|
+
return parsed.data;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The answers level the story launch in `env` names. Without one, as under a bare Vitest run or an IDE's test runner,
|
|
62
|
+
* in CI or not, the level is `check`: only `storm story run` writes a recording. A malformed launch is a `TypeError`
|
|
63
|
+
* naming its variable.
|
|
64
|
+
*/
|
|
65
|
+
export function storyAnswersLevel(env) {
|
|
66
|
+
return readStoryLaunch(env)?.answers ?? "check";
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The executable `storm story run --bin` names, from the story launch in `env`, already resolved, or `fallback` when
|
|
70
|
+
* there is no launch or it names none. A malformed launch is a `TypeError` naming its variable.
|
|
71
|
+
*/
|
|
72
|
+
export function storyExecutable({ env, fallback }) {
|
|
73
|
+
return readStoryLaunch(env)?.bin ?? fallback;
|
|
74
|
+
}
|
|
75
|
+
function errorText(error) {
|
|
76
|
+
return error instanceof Error ? error.message : String(error);
|
|
77
|
+
}
|
package/dist/story/report.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StoryCall, StoryIdentity } from "./recording.ts";
|
|
2
|
-
import {
|
|
2
|
+
import type { StoryAnswersLevel } from "./launch.ts";
|
|
3
3
|
import type { StorySettlement } from "./settle.ts";
|
|
4
4
|
/** `user calls slot {"command":"list --json"}`, the input as compact JSON cut to 100 characters. */
|
|
5
5
|
export declare function describeCall(call: Pick<StoryCall, "agent" | "tool" | "input">): string;
|
|
@@ -21,7 +21,7 @@ export interface StoryApplied {
|
|
|
21
21
|
export declare function storyEventLines(settlement: StorySettlement, applied: StoryApplied): readonly string[];
|
|
22
22
|
export interface StoryReportInput {
|
|
23
23
|
readonly story: StoryIdentity;
|
|
24
|
-
readonly level:
|
|
24
|
+
readonly level: StoryAnswersLevel;
|
|
25
25
|
readonly settlement: StorySettlement;
|
|
26
26
|
/** Whether the story's body threw, so nothing was written. */
|
|
27
27
|
readonly bodyFailed: boolean;
|
package/dist/story/report.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// What a story says about its calls: one event line per call, the report of a failed story, and what a passing story
|
|
2
2
|
// changed. Pure.
|
|
3
3
|
import { describeObservationDiff } from "./diff.js";
|
|
4
|
-
import { STORY_RECORD_VARIABLE } from "./mode.js";
|
|
5
4
|
/** How much of a call's input its line keeps. */
|
|
6
5
|
const INPUT_CHARS = 100;
|
|
7
6
|
/** `user calls slot {"command":"list --json"}`, the input as compact JSON cut to 100 characters. */
|
|
@@ -51,7 +50,7 @@ function callStatus(each, written, accepted) {
|
|
|
51
50
|
*/
|
|
52
51
|
export function storyReport(input) {
|
|
53
52
|
const { settlement } = input;
|
|
54
|
-
const lines = [`story "${input.story.name}" (${input.story.file}), ${
|
|
53
|
+
const lines = [`story "${input.story.name}" (${input.story.file}), answers level ${input.level}:`];
|
|
55
54
|
for (const divergence of settlement.divergences) {
|
|
56
55
|
lines.push(` divergence: ${describeCall(divergence.live)}`);
|
|
57
56
|
for (const line of describeObservationDiff(divergence.recorded.observation, divergence.live.observation)) {
|
|
@@ -87,9 +86,9 @@ function summary(input) {
|
|
|
87
86
|
if (input.bodyFailed)
|
|
88
87
|
return `${counts} The story threw, so nothing was written.`;
|
|
89
88
|
if (divergences.length > 0) {
|
|
90
|
-
return `${counts} A divergence means the tool behaved differently. If that is intended, accept it with
|
|
89
|
+
return `${counts} A divergence means the tool behaved differently. If that is intended, accept it with --answers accept, through storm story run or the package's story script.`;
|
|
91
90
|
}
|
|
92
|
-
return `${counts} The recording no longer fits the story. Rewrite it with
|
|
91
|
+
return `${counts} The recording no longer fits the story. Rewrite it with --answers add, through storm story run or the package's story script.`;
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* What a passing story's end `applied`, or `undefined` when it changed nothing. Its first line counts what it did: the
|
package/dist/story/settle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StoryAlignedCall } from "./align.ts";
|
|
2
2
|
import type { StoryRecording, StoryCall, StoryIdentity } from "./recording.ts";
|
|
3
|
-
import type {
|
|
3
|
+
import type { StoryAnswersLevel } from "./launch.ts";
|
|
4
4
|
/** A recorded call and a live call with the same key and different observations: the tool behaved differently. */
|
|
5
5
|
export interface StoryDivergence {
|
|
6
6
|
readonly recorded: StoryCall;
|
|
@@ -52,7 +52,7 @@ export interface StorySettleInput {
|
|
|
52
52
|
readonly story: StoryIdentity;
|
|
53
53
|
/** The story's recording path, which an unreadable entry names. */
|
|
54
54
|
readonly path: string;
|
|
55
|
-
readonly level:
|
|
55
|
+
readonly level: StoryAnswersLevel;
|
|
56
56
|
/** Whether the story's body returned without throwing. */
|
|
57
57
|
readonly bodyPassed: boolean;
|
|
58
58
|
readonly read: RecordingRead;
|
|
@@ -74,9 +74,9 @@ export interface StorySettlement {
|
|
|
74
74
|
readonly change: RecordingChange;
|
|
75
75
|
/** Whether the end removes the orphan recordings, the `orphan` entries in `stale`. */
|
|
76
76
|
readonly removesOrphans: boolean;
|
|
77
|
-
/** Whether the divergences are recorded as the new observations (`
|
|
77
|
+
/** Whether the divergences are recorded as the new observations (the answers level `accept`). */
|
|
78
78
|
readonly accepted: boolean;
|
|
79
|
-
/** Why the story fails, beyond its body: a divergence, or a stale entry at `
|
|
79
|
+
/** Why the story fails, beyond its body: a divergence, or a stale entry at `check`. */
|
|
80
80
|
readonly failure: "divergence" | "stale" | undefined;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
@@ -85,10 +85,10 @@ export interface StorySettlement {
|
|
|
85
85
|
* entry. A story whose body threw changes nothing and fails with its own error; the recorded calls after its last
|
|
86
86
|
* aligned call count as unreached, not unmade. Otherwise, by level:
|
|
87
87
|
*
|
|
88
|
-
* - `
|
|
89
|
-
* - `
|
|
88
|
+
* - `check` changes nothing, and fails on a divergence, else on a stale entry.
|
|
89
|
+
* - `add` fails on a divergence, changing nothing; otherwise it writes the recording and removes the orphan
|
|
90
90
|
* recordings.
|
|
91
|
-
* - `
|
|
91
|
+
* - `accept` writes the recording and removes the orphan recordings, accepting any divergence.
|
|
92
92
|
*
|
|
93
93
|
* The recording written holds the live calls. A story that made no call has no recording, so writing it removes one
|
|
94
94
|
* that is there.
|
package/dist/story/settle.js
CHANGED
|
@@ -8,10 +8,10 @@ import { STORY_RECORDING_SCHEMA_VERSION } from "./recording.js";
|
|
|
8
8
|
* entry. A story whose body threw changes nothing and fails with its own error; the recorded calls after its last
|
|
9
9
|
* aligned call count as unreached, not unmade. Otherwise, by level:
|
|
10
10
|
*
|
|
11
|
-
* - `
|
|
12
|
-
* - `
|
|
11
|
+
* - `check` changes nothing, and fails on a divergence, else on a stale entry.
|
|
12
|
+
* - `add` fails on a divergence, changing nothing; otherwise it writes the recording and removes the orphan
|
|
13
13
|
* recordings.
|
|
14
|
-
* - `
|
|
14
|
+
* - `accept` writes the recording and removes the orphan recordings, accepting any divergence.
|
|
15
15
|
*
|
|
16
16
|
* The recording written holds the live calls. A story that made no call has no recording, so writing it removes one
|
|
17
17
|
* that is there.
|
|
@@ -38,14 +38,14 @@ export function settleStory(input) {
|
|
|
38
38
|
const leave = { change: { kind: "leave" }, removesOrphans: false, accepted: false };
|
|
39
39
|
if (!input.bodyPassed)
|
|
40
40
|
return { ...settled, ...leave, failure: undefined };
|
|
41
|
-
if (input.level === "
|
|
41
|
+
if (input.level === "check") {
|
|
42
42
|
return {
|
|
43
43
|
...settled,
|
|
44
44
|
...leave,
|
|
45
45
|
failure: divergences.length > 0 ? "divergence" : stale.length > 0 ? "stale" : undefined,
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
if (input.level === "
|
|
48
|
+
if (input.level === "add" && divergences.length > 0)
|
|
49
49
|
return { ...settled, ...leave, failure: "divergence" };
|
|
50
50
|
return {
|
|
51
51
|
...settled,
|
package/dist/story/start.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { StoryIdentity } from "./recording.ts";
|
|
2
2
|
import type { StoryAgents, StoryHandles, StoryHarness, StorySession } from "./definition.ts";
|
|
3
3
|
import type { StoryRecordingGateway } from "./gateways.ts";
|
|
4
|
-
import type {
|
|
4
|
+
import type { StoryAnswersLevel } from "./launch.ts";
|
|
5
5
|
export interface StoryStartOptions {
|
|
6
6
|
readonly story: StoryIdentity;
|
|
7
7
|
/** The story's recording path (`recordingPath`). */
|
|
8
8
|
readonly path: string;
|
|
9
|
-
readonly level:
|
|
9
|
+
readonly level: StoryAnswersLevel;
|
|
10
10
|
/**
|
|
11
11
|
* Aborts when the story is stopped, as by a timeout. A story stopped before its end compares as one whose body
|
|
12
12
|
* threw, so it changes nothing; one stopped while its end changes the recording stops before the next change.
|
package/dist/time/duration.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Durations as
|
|
2
|
-
//
|
|
1
|
+
// Durations as the runner's settings write them: a runner recipe's `timeout` and `keepSandbox` (and
|
|
2
|
+
// `--keep-sandbox`). A resource parses its own options' durations itself.
|
|
3
3
|
/** The shortest TTL storm gives a Vercel Sandbox: 10 minutes. */
|
|
4
4
|
export const MIN_TTL_MINUTES = 10;
|
|
5
5
|
/** The longest TTL storm gives a Vercel Sandbox: 5 hours, the longest a Vercel Sandbox lives. */
|
package/dist/time/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// The `time` module's public surface. Other modules import only from here.
|
|
2
|
-
// It holds the clock
|
|
2
|
+
// It holds the system clock and timer and duration parsing, and imports nothing of storm but the SDK's extension
|
|
3
|
+
// API, which declares the clock and the timer (`Clock`, `Timer`).
|
|
3
4
|
export { MAX_TTL_MINUTES, MIN_TTL_MINUTES, parseDuration, parseKeepTime, parseTtl } from "./duration.js";
|
|
4
5
|
export { systemClock, systemTimer } from "./time.js";
|
package/dist/time/time.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* `signal` aborts ends early, so a wait raced against other work and no longer needed doesn't keep the process alive.
|
|
4
|
-
*/
|
|
5
|
-
export interface Timer {
|
|
6
|
-
sleep(ms: number, signal?: AbortSignal): Promise<void>;
|
|
7
|
-
}
|
|
1
|
+
import type { Clock, Timer } from "../sdk/extension/index.ts";
|
|
2
|
+
export type { Clock, Timer };
|
|
8
3
|
/** The system timer, which really waits. Only `liveContext` passes it. */
|
|
9
4
|
export declare const systemTimer: Timer;
|
|
10
|
-
/** Tells the time. Tests pass one fixed at a known instant. */
|
|
11
|
-
export interface Clock {
|
|
12
|
-
now(): Date;
|
|
13
|
-
}
|
|
14
5
|
/** The system clock. Only `liveContext` passes it. */
|
|
15
6
|
export declare const systemClock: Clock;
|
package/dist/time/time.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Time as DI seams, not gateways: domain logic that waits takes a `Timer`, and domain logic that reads the
|
|
2
|
-
// time takes a `Clock
|
|
3
|
-
// them; tests pass fakes driven by hand.
|
|
2
|
+
// time takes a `Clock`, both declared by the extension API. Only `systemTimer` and `systemClock` touch real time, and
|
|
3
|
+
// only `liveContext` passes them; tests pass fakes driven by hand.
|
|
4
4
|
/** The system timer, which really waits. Only `liveContext` passes it. */
|
|
5
5
|
export const systemTimer = {
|
|
6
6
|
sleep: (ms, signal) => new Promise((resolve) => {
|
|
@@ -24,9 +24,21 @@ export declare function apiRequestRecord(request: {
|
|
|
24
24
|
export declare function hasNullBody(method: string, status: number): boolean;
|
|
25
25
|
/**
|
|
26
26
|
* The failure an answer with `status` is, when `fetch` refuses it: a 410 or 502 (the Testserver sandbox has expired
|
|
27
|
-
* or can't be reached) is an `http-error`,
|
|
28
|
-
*
|
|
27
|
+
* or can't be reached) is an `http-error`, Testserver's 503 for a stopped container (`httpFailure`) is
|
|
28
|
+
* `container-stopped`, and a status no `Response` can carry is `malformed`. `undefined` for any other, another 503
|
|
29
|
+
* included. The body is redacted whole before it is cut, so no secret is cut in half and left partly readable.
|
|
29
30
|
*/
|
|
30
31
|
export declare function refusedAnswer(status: number, body: Uint8Array, redact: (text: string) => string): TestserverFailure | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Throws the `TypeError` a request to the container gets before anything is sent, `caller` naming the method: for a
|
|
34
|
+
* `target` that doesn't start with `/` (`under` says what it is a path under), a `test-id` header of the caller's,
|
|
35
|
+
* since the SDK adds the test id itself, or a body it can't read whole (`readableWhole`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function checkContainerRequest(request: {
|
|
38
|
+
readonly caller: string;
|
|
39
|
+
readonly under: string;
|
|
40
|
+
readonly target: string;
|
|
41
|
+
readonly init: ContainerRequestInit | undefined;
|
|
42
|
+
}): void;
|
|
31
43
|
/** Whether `body` is one `container.fetch` can read whole at once: absent, or a `ContainerRequestBody`. */
|
|
32
44
|
export declare function readableWhole(body: unknown): boolean;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { splitTarget } from "../records/index.js";
|
|
2
|
+
import { excerpt, httpFailure, TEST_ID_HEADER } from "../testserver/index.js";
|
|
3
|
+
/** Statuses whose answer has no body, so a `Response` can't be built with one. */
|
|
4
|
+
const NULL_BODY_STATUSES = new Set([101, 103, 204, 205, 304]);
|
|
5
|
+
/** The record of an API request to `target` that started at `startedAt` and ended with `outcome`. */
|
|
6
|
+
export function apiRequestRecord(request) {
|
|
7
|
+
return {
|
|
8
|
+
method: request.method,
|
|
9
|
+
url: request.target,
|
|
10
|
+
...splitTarget(request.target),
|
|
11
|
+
authorization: request.authorization,
|
|
12
|
+
...(request.requestBody === undefined ? {} : { requestBody: request.requestBody }),
|
|
13
|
+
...(request.responseBody === undefined ? {} : { responseBody: request.responseBody }),
|
|
14
|
+
startedAt: request.startedAt,
|
|
15
|
+
durationMs: request.durationMs,
|
|
16
|
+
...request.outcome,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Whether an answer with `status` to a `method` request carries no body. */
|
|
20
|
+
export function hasNullBody(method, status) {
|
|
21
|
+
return method === "HEAD" || NULL_BODY_STATUSES.has(status);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The failure an answer with `status` is, when `fetch` refuses it: a 410 or 502 (the Testserver sandbox has expired
|
|
25
|
+
* or can't be reached) is an `http-error`, Testserver's 503 for a stopped container (`httpFailure`) is
|
|
26
|
+
* `container-stopped`, and a status no `Response` can carry is `malformed`. `undefined` for any other, another 503
|
|
27
|
+
* included. The body is redacted whole before it is cut, so no secret is cut in half and left partly readable.
|
|
28
|
+
*/
|
|
29
|
+
export function refusedAnswer(status, body, redact) {
|
|
30
|
+
const redacted = () => excerpt(redact(new TextDecoder().decode(body)));
|
|
31
|
+
if (status === 410 || status === 502)
|
|
32
|
+
return { kind: "http-error", status, body: redacted() };
|
|
33
|
+
if (status === 503) {
|
|
34
|
+
const failure = httpFailure(status, redacted());
|
|
35
|
+
return failure.kind === "container-stopped" ? failure : undefined;
|
|
36
|
+
}
|
|
37
|
+
if (status < 200 || status > 599)
|
|
38
|
+
return { kind: "malformed", detail: `status ${status}` };
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Throws the `TypeError` a request to the container gets before anything is sent, `caller` naming the method: for a
|
|
43
|
+
* `target` that doesn't start with `/` (`under` says what it is a path under), a `test-id` header of the caller's,
|
|
44
|
+
* since the SDK adds the test id itself, or a body it can't read whole (`readableWhole`).
|
|
45
|
+
*/
|
|
46
|
+
export function checkContainerRequest(request) {
|
|
47
|
+
const { caller, under, target, init } = request;
|
|
48
|
+
if (!target.startsWith("/")) {
|
|
49
|
+
throw new TypeError(`${caller} takes a path under ${under}, starting with "/", not ${JSON.stringify(target)}`);
|
|
50
|
+
}
|
|
51
|
+
if (new Headers(init?.headers).has(TEST_ID_HEADER)) {
|
|
52
|
+
throw new TypeError(`${caller} adds the ${TEST_ID_HEADER} header itself; don't send one of your own`);
|
|
53
|
+
}
|
|
54
|
+
if (!readableWhole(init?.body)) {
|
|
55
|
+
throw new TypeError(`${caller} reads a body whole before sending it: pass a string, ArrayBuffer, typed array, Blob, FormData or URLSearchParams, not a stream or an iterable`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Whether `body` is one `container.fetch` can read whole at once: absent, or a `ContainerRequestBody`. */
|
|
59
|
+
export function readableWhole(body) {
|
|
60
|
+
return (body === undefined ||
|
|
61
|
+
body === null ||
|
|
62
|
+
typeof body === "string" ||
|
|
63
|
+
body instanceof ArrayBuffer ||
|
|
64
|
+
ArrayBuffer.isView(body) ||
|
|
65
|
+
body instanceof Blob ||
|
|
66
|
+
body instanceof FormData ||
|
|
67
|
+
body instanceof URLSearchParams);
|
|
68
|
+
}
|