@gpustack/loopwright 0.0.0-stage → 0.0.2
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/LICENSE +191 -0
- package/README.md +356 -2
- package/bin/loopwright.js +3 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter-v2.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter-v2.js +122 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter.d.ts +30 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter.js +340 -0
- package/node_modules/@loopwright/agent-pi/dist/admission.d.ts +25 -0
- package/node_modules/@loopwright/agent-pi/dist/admission.js +65 -0
- package/node_modules/@loopwright/agent-pi/dist/artifacts.d.ts +15 -0
- package/node_modules/@loopwright/agent-pi/dist/artifacts.js +76 -0
- package/node_modules/@loopwright/agent-pi/dist/boundary.d.ts +18 -0
- package/node_modules/@loopwright/agent-pi/dist/boundary.js +113 -0
- package/node_modules/@loopwright/agent-pi/dist/broker-channel.d.ts +4 -0
- package/node_modules/@loopwright/agent-pi/dist/broker-channel.js +121 -0
- package/node_modules/@loopwright/agent-pi/dist/candidate.d.ts +96 -0
- package/node_modules/@loopwright/agent-pi/dist/candidate.js +1712 -0
- package/node_modules/@loopwright/agent-pi/dist/capture.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/capture.js +146 -0
- package/node_modules/@loopwright/agent-pi/dist/cas.d.ts +51 -0
- package/node_modules/@loopwright/agent-pi/dist/cas.js +836 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog-api.d.ts +3 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog-api.js +2 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog.js +280 -0
- package/node_modules/@loopwright/agent-pi/dist/circuit-breaker-limits.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/circuit-breaker-limits.js +12 -0
- package/node_modules/@loopwright/agent-pi/dist/containers.d.ts +29 -0
- package/node_modules/@loopwright/agent-pi/dist/containers.js +160 -0
- package/node_modules/@loopwright/agent-pi/dist/context.d.ts +56 -0
- package/node_modules/@loopwright/agent-pi/dist/context.js +351 -0
- package/node_modules/@loopwright/agent-pi/dist/daemon.d.ts +8 -0
- package/node_modules/@loopwright/agent-pi/dist/daemon.js +52 -0
- package/node_modules/@loopwright/agent-pi/dist/deadline.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/deadline.js +18 -0
- package/node_modules/@loopwright/agent-pi/dist/decode-capture.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/decode-capture.js +287 -0
- package/node_modules/@loopwright/agent-pi/dist/descriptor.d.ts +12 -0
- package/node_modules/@loopwright/agent-pi/dist/descriptor.js +17 -0
- package/node_modules/@loopwright/agent-pi/dist/docker-absence.d.ts +2 -0
- package/node_modules/@loopwright/agent-pi/dist/docker-absence.js +9 -0
- package/node_modules/@loopwright/agent-pi/dist/errors.d.ts +7 -0
- package/node_modules/@loopwright/agent-pi/dist/errors.js +19 -0
- package/node_modules/@loopwright/agent-pi/dist/event-sequence.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/event-sequence.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/events.d.ts +19 -0
- package/node_modules/@loopwright/agent-pi/dist/events.js +132 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-guard.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-guard.js +25 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-lease.d.ts +24 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-lease.js +316 -0
- package/node_modules/@loopwright/agent-pi/dist/execution.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/execution.js +476 -0
- package/node_modules/@loopwright/agent-pi/dist/external-mcp.d.ts +87 -0
- package/node_modules/@loopwright/agent-pi/dist/external-mcp.js +526 -0
- package/node_modules/@loopwright/agent-pi/dist/factory-bootstrap.d.ts +15 -0
- package/node_modules/@loopwright/agent-pi/dist/factory-bootstrap.js +74 -0
- package/node_modules/@loopwright/agent-pi/dist/host-session.d.ts +51 -0
- package/node_modules/@loopwright/agent-pi/dist/host-session.js +2083 -0
- package/node_modules/@loopwright/agent-pi/dist/http-mcp.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/http-mcp.js +353 -0
- package/node_modules/@loopwright/agent-pi/dist/index.d.ts +7 -0
- package/node_modules/@loopwright/agent-pi/dist/index.js +4 -0
- package/node_modules/@loopwright/agent-pi/dist/lifecycle.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/lifecycle.js +11 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-process.d.ts +35 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-process.js +92 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-transport.d.ts +25 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-transport.js +63 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp.d.ts +23 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp.js +212 -0
- package/node_modules/@loopwright/agent-pi/dist/operation.d.ts +5 -0
- package/node_modules/@loopwright/agent-pi/dist/operation.js +28 -0
- package/node_modules/@loopwright/agent-pi/dist/policy-v2.d.ts +10 -0
- package/node_modules/@loopwright/agent-pi/dist/policy-v2.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/policy.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/policy.js +260 -0
- package/node_modules/@loopwright/agent-pi/dist/preflight.d.ts +60 -0
- package/node_modules/@loopwright/agent-pi/dist/preflight.js +700 -0
- package/node_modules/@loopwright/agent-pi/dist/progress-summary.d.ts +1 -0
- package/node_modules/@loopwright/agent-pi/dist/progress-summary.js +119 -0
- package/node_modules/@loopwright/agent-pi/dist/protocol.d.ts +17 -0
- package/node_modules/@loopwright/agent-pi/dist/protocol.js +131 -0
- package/node_modules/@loopwright/agent-pi/dist/provider.d.ts +62 -0
- package/node_modules/@loopwright/agent-pi/dist/provider.js +217 -0
- package/node_modules/@loopwright/agent-pi/dist/receipt.d.ts +3 -0
- package/node_modules/@loopwright/agent-pi/dist/receipt.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/recovery.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/recovery.js +188 -0
- package/node_modules/@loopwright/agent-pi/dist/resources.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/resources.js +81 -0
- package/node_modules/@loopwright/agent-pi/dist/response.d.ts +20 -0
- package/node_modules/@loopwright/agent-pi/dist/response.js +259 -0
- package/node_modules/@loopwright/agent-pi/dist/runtime-profile.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/runtime-profile.js +37 -0
- package/node_modules/@loopwright/agent-pi/dist/sdk-worker.d.ts +14 -0
- package/node_modules/@loopwright/agent-pi/dist/sdk-worker.js +633 -0
- package/node_modules/@loopwright/agent-pi/dist/sender.d.ts +46 -0
- package/node_modules/@loopwright/agent-pi/dist/sender.js +553 -0
- package/node_modules/@loopwright/agent-pi/dist/session-host.d.ts +21 -0
- package/node_modules/@loopwright/agent-pi/dist/session-host.js +315 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot-transfer.d.ts +14 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot-transfer.js +102 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot.d.ts +19 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot.js +121 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-process.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-process.js +85 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-worker.d.ts +2 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-worker.js +105 -0
- package/node_modules/@loopwright/agent-pi/dist/tools.d.ts +36 -0
- package/node_modules/@loopwright/agent-pi/dist/tools.js +128 -0
- package/node_modules/@loopwright/agent-pi/dist/types-v2.d.ts +71 -0
- package/node_modules/@loopwright/agent-pi/dist/types-v2.js +1 -0
- package/node_modules/@loopwright/agent-pi/dist/types.d.ts +314 -0
- package/node_modules/@loopwright/agent-pi/dist/types.js +1 -0
- package/node_modules/@loopwright/agent-pi/dist/usage.d.ts +18 -0
- package/node_modules/@loopwright/agent-pi/dist/usage.js +314 -0
- package/node_modules/@loopwright/agent-pi/dist/workspace-mcp.d.ts +27 -0
- package/node_modules/@loopwright/agent-pi/dist/workspace-mcp.js +142 -0
- package/node_modules/@loopwright/agent-pi/package.json +24 -0
- package/node_modules/@loopwright/agent-pi/runtime/Dockerfile +8 -0
- package/node_modules/@loopwright/agent-pi/runtime/seccomp.json +1 -0
- package/node_modules/@loopwright/cli/dist/arguments.d.ts +19 -0
- package/node_modules/@loopwright/cli/dist/arguments.js +358 -0
- package/node_modules/@loopwright/cli/dist/closure.d.ts +93 -0
- package/node_modules/@loopwright/cli/dist/closure.js +230 -0
- package/node_modules/@loopwright/cli/dist/draft.d.ts +9 -0
- package/node_modules/@loopwright/cli/dist/draft.js +106 -0
- package/node_modules/@loopwright/cli/dist/failure-matrix.d.ts +9 -0
- package/node_modules/@loopwright/cli/dist/failure-matrix.js +701 -0
- package/node_modules/@loopwright/cli/dist/index.d.ts +6 -0
- package/node_modules/@loopwright/cli/dist/index.js +5 -0
- package/node_modules/@loopwright/cli/dist/main.d.ts +22 -0
- package/node_modules/@loopwright/cli/dist/main.js +1855 -0
- package/node_modules/@loopwright/cli/package.json +16 -0
- package/node_modules/@loopwright/controller/dist/acceptance.d.ts +43 -0
- package/node_modules/@loopwright/controller/dist/acceptance.js +446 -0
- package/node_modules/@loopwright/controller/dist/benchmark-gate.d.ts +273 -0
- package/node_modules/@loopwright/controller/dist/benchmark-gate.js +3147 -0
- package/node_modules/@loopwright/controller/dist/budget-observations.d.ts +25 -0
- package/node_modules/@loopwright/controller/dist/budget-observations.js +139 -0
- package/node_modules/@loopwright/controller/dist/bundle.d.ts +26 -0
- package/node_modules/@loopwright/controller/dist/bundle.js +64 -0
- package/node_modules/@loopwright/controller/dist/capture.d.ts +89 -0
- package/node_modules/@loopwright/controller/dist/capture.js +587 -0
- package/node_modules/@loopwright/controller/dist/compile.d.ts +3 -0
- package/node_modules/@loopwright/controller/dist/compile.js +402 -0
- package/node_modules/@loopwright/controller/dist/config.d.ts +22 -0
- package/node_modules/@loopwright/controller/dist/config.js +255 -0
- package/node_modules/@loopwright/controller/dist/controller.d.ts +177 -0
- package/node_modules/@loopwright/controller/dist/controller.js +2135 -0
- package/node_modules/@loopwright/controller/dist/credentials.d.ts +29 -0
- package/node_modules/@loopwright/controller/dist/credentials.js +189 -0
- package/node_modules/@loopwright/controller/dist/deadlines.d.ts +18 -0
- package/node_modules/@loopwright/controller/dist/deadlines.js +71 -0
- package/node_modules/@loopwright/controller/dist/errors.d.ts +27 -0
- package/node_modules/@loopwright/controller/dist/errors.js +41 -0
- package/node_modules/@loopwright/controller/dist/events.d.ts +52 -0
- package/node_modules/@loopwright/controller/dist/events.js +228 -0
- package/node_modules/@loopwright/controller/dist/files.d.ts +51 -0
- package/node_modules/@loopwright/controller/dist/files.js +386 -0
- package/node_modules/@loopwright/controller/dist/finalize.d.ts +25 -0
- package/node_modules/@loopwright/controller/dist/finalize.js +32 -0
- package/node_modules/@loopwright/controller/dist/gate.d.ts +84 -0
- package/node_modules/@loopwright/controller/dist/gate.js +640 -0
- package/node_modules/@loopwright/controller/dist/git-objects.d.ts +11 -0
- package/node_modules/@loopwright/controller/dist/git-objects.js +59 -0
- package/node_modules/@loopwright/controller/dist/git-reader.d.ts +17 -0
- package/node_modules/@loopwright/controller/dist/git-reader.js +40 -0
- package/node_modules/@loopwright/controller/dist/handlers.d.ts +6 -0
- package/node_modules/@loopwright/controller/dist/handlers.js +45 -0
- package/node_modules/@loopwright/controller/dist/handoff.d.ts +71 -0
- package/node_modules/@loopwright/controller/dist/handoff.js +554 -0
- package/node_modules/@loopwright/controller/dist/index.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/index.js +21 -0
- package/node_modules/@loopwright/controller/dist/inspect.d.ts +30 -0
- package/node_modules/@loopwright/controller/dist/inspect.js +372 -0
- package/node_modules/@loopwright/controller/dist/interpolation.d.ts +9 -0
- package/node_modules/@loopwright/controller/dist/interpolation.js +79 -0
- package/node_modules/@loopwright/controller/dist/ownership.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/ownership.js +666 -0
- package/node_modules/@loopwright/controller/dist/parser.d.ts +5 -0
- package/node_modules/@loopwright/controller/dist/parser.js +200 -0
- package/node_modules/@loopwright/controller/dist/progress.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/progress.js +904 -0
- package/node_modules/@loopwright/controller/dist/publication.d.ts +60 -0
- package/node_modules/@loopwright/controller/dist/publication.js +329 -0
- package/node_modules/@loopwright/controller/dist/reconcile.d.ts +26 -0
- package/node_modules/@loopwright/controller/dist/reconcile.js +1378 -0
- package/node_modules/@loopwright/controller/dist/recovery.d.ts +10 -0
- package/node_modules/@loopwright/controller/dist/recovery.js +315 -0
- package/node_modules/@loopwright/controller/dist/refusal-record.d.ts +43 -0
- package/node_modules/@loopwright/controller/dist/refusal-record.js +150 -0
- package/node_modules/@loopwright/controller/dist/registry.d.ts +6 -0
- package/node_modules/@loopwright/controller/dist/registry.js +374 -0
- package/node_modules/@loopwright/controller/dist/repair.d.ts +31 -0
- package/node_modules/@loopwright/controller/dist/repair.js +102 -0
- package/node_modules/@loopwright/controller/dist/report.d.ts +64 -0
- package/node_modules/@loopwright/controller/dist/report.js +596 -0
- package/node_modules/@loopwright/controller/dist/retained.d.ts +284 -0
- package/node_modules/@loopwright/controller/dist/retained.js +193 -0
- package/node_modules/@loopwright/controller/dist/rules.d.ts +31 -0
- package/node_modules/@loopwright/controller/dist/rules.js +110 -0
- package/node_modules/@loopwright/controller/dist/run-eval.d.ts +115 -0
- package/node_modules/@loopwright/controller/dist/run-eval.js +959 -0
- package/node_modules/@loopwright/controller/dist/scheduler.d.ts +10 -0
- package/node_modules/@loopwright/controller/dist/scheduler.js +41 -0
- package/node_modules/@loopwright/controller/dist/schema.d.ts +17 -0
- package/node_modules/@loopwright/controller/dist/schema.js +78 -0
- package/node_modules/@loopwright/controller/dist/source.d.ts +69 -0
- package/node_modules/@loopwright/controller/dist/source.js +872 -0
- package/node_modules/@loopwright/controller/dist/step.d.ts +38 -0
- package/node_modules/@loopwright/controller/dist/step.js +1776 -0
- package/node_modules/@loopwright/controller/dist/storage.d.ts +90 -0
- package/node_modules/@loopwright/controller/dist/storage.js +1345 -0
- package/node_modules/@loopwright/controller/dist/submission.d.ts +51 -0
- package/node_modules/@loopwright/controller/dist/submission.js +292 -0
- package/node_modules/@loopwright/controller/dist/types.d.ts +585 -0
- package/node_modules/@loopwright/controller/dist/types.js +9 -0
- package/node_modules/@loopwright/controller/dist/verification.d.ts +124 -0
- package/node_modules/@loopwright/controller/dist/verification.js +1308 -0
- package/node_modules/@loopwright/controller/dist/verifier-protocol.d.ts +105 -0
- package/node_modules/@loopwright/controller/dist/verifier-protocol.js +1312 -0
- package/node_modules/@loopwright/controller/dist/verifier-worker.d.ts +1 -0
- package/node_modules/@loopwright/controller/dist/verifier-worker.js +33 -0
- package/node_modules/@loopwright/controller/package.json +12 -0
- package/node_modules/@loopwright/core/dist/acceptance.d.ts +108 -0
- package/node_modules/@loopwright/core/dist/acceptance.js +327 -0
- package/node_modules/@loopwright/core/dist/artifacts.d.ts +63 -0
- package/node_modules/@loopwright/core/dist/artifacts.js +356 -0
- package/node_modules/@loopwright/core/dist/boundary.d.ts +21 -0
- package/node_modules/@loopwright/core/dist/boundary.js +484 -0
- package/node_modules/@loopwright/core/dist/contracts.d.ts +287 -0
- package/node_modules/@loopwright/core/dist/contracts.js +694 -0
- package/node_modules/@loopwright/core/dist/diagnostics.d.ts +21 -0
- package/node_modules/@loopwright/core/dist/diagnostics.js +51 -0
- package/node_modules/@loopwright/core/dist/evidence.d.ts +92 -0
- package/node_modules/@loopwright/core/dist/evidence.js +85 -0
- package/node_modules/@loopwright/core/dist/graph.d.ts +8 -0
- package/node_modules/@loopwright/core/dist/graph.js +44 -0
- package/node_modules/@loopwright/core/dist/identity.d.ts +162 -0
- package/node_modules/@loopwright/core/dist/identity.js +80 -0
- package/node_modules/@loopwright/core/dist/index.d.ts +30 -0
- package/node_modules/@loopwright/core/dist/index.js +39 -0
- package/node_modules/@loopwright/core/dist/limits.d.ts +99 -0
- package/node_modules/@loopwright/core/dist/limits.js +59 -0
- package/node_modules/@loopwright/core/dist/results.d.ts +161 -0
- package/node_modules/@loopwright/core/dist/results.js +98 -0
- package/node_modules/@loopwright/core/dist/scope.d.ts +13 -0
- package/node_modules/@loopwright/core/dist/scope.js +154 -0
- package/node_modules/@loopwright/core/dist/scrubber.d.ts +13 -0
- package/node_modules/@loopwright/core/dist/scrubber.js +63 -0
- package/node_modules/@loopwright/core/dist/usage.d.ts +68 -0
- package/node_modules/@loopwright/core/dist/usage.js +56 -0
- package/node_modules/@loopwright/core/package.json +12 -0
- package/node_modules/@loopwright/decisions/dist/benchmark.d.ts +23 -0
- package/node_modules/@loopwright/decisions/dist/benchmark.js +337 -0
- package/node_modules/@loopwright/decisions/dist/client.d.ts +74 -0
- package/node_modules/@loopwright/decisions/dist/client.js +292 -0
- package/node_modules/@loopwright/decisions/dist/index.d.ts +15 -0
- package/node_modules/@loopwright/decisions/dist/index.js +8 -0
- package/node_modules/@loopwright/decisions/dist/nodes.d.ts +63 -0
- package/node_modules/@loopwright/decisions/dist/nodes.js +282 -0
- package/node_modules/@loopwright/decisions/dist/primitives.d.ts +36 -0
- package/node_modules/@loopwright/decisions/dist/primitives.js +300 -0
- package/node_modules/@loopwright/decisions/dist/redaction.d.ts +23 -0
- package/node_modules/@loopwright/decisions/dist/redaction.js +146 -0
- package/node_modules/@loopwright/decisions/dist/router.d.ts +55 -0
- package/node_modules/@loopwright/decisions/dist/router.js +248 -0
- package/node_modules/@loopwright/decisions/dist/schema.d.ts +25 -0
- package/node_modules/@loopwright/decisions/dist/schema.js +536 -0
- package/node_modules/@loopwright/decisions/dist/types.d.ts +394 -0
- package/node_modules/@loopwright/decisions/dist/types.js +80 -0
- package/node_modules/@loopwright/decisions/package.json +12 -0
- package/node_modules/@loopwright/github-app/dist/action.d.ts +90 -0
- package/node_modules/@loopwright/github-app/dist/action.js +2429 -0
- package/node_modules/@loopwright/github-app/dist/config.d.ts +23 -0
- package/node_modules/@loopwright/github-app/dist/config.js +297 -0
- package/node_modules/@loopwright/github-app/dist/digests.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/digests.js +1 -0
- package/node_modules/@loopwright/github-app/dist/index.d.ts +14 -0
- package/node_modules/@loopwright/github-app/dist/index.js +13 -0
- package/node_modules/@loopwright/github-app/dist/models-config.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/models-config.js +1 -0
- package/node_modules/@loopwright/github-app/dist/output-format.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/output-format.js +1 -0
- package/node_modules/@loopwright/github-app/dist/preflight.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/preflight.js +1 -0
- package/node_modules/@loopwright/github-app/dist/publisher.d.ts +58 -0
- package/node_modules/@loopwright/github-app/dist/publisher.js +1368 -0
- package/node_modules/@loopwright/github-app/dist/qualification.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/qualification.js +1 -0
- package/node_modules/@loopwright/github-app/dist/sandbox.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/sandbox.js +1 -0
- package/node_modules/@loopwright/github-app/dist/schema.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/schema.js +1 -0
- package/node_modules/@loopwright/github-app/dist/service.d.ts +52 -0
- package/node_modules/@loopwright/github-app/dist/service.js +1658 -0
- package/node_modules/@loopwright/github-app/dist/suite-pr-lookup.d.ts +90 -0
- package/node_modules/@loopwright/github-app/dist/suite-pr-lookup.js +392 -0
- package/node_modules/@loopwright/github-app/dist/taskpack.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/taskpack.js +1 -0
- package/node_modules/@loopwright/github-app/dist/tenant-queue.d.ts +44 -0
- package/node_modules/@loopwright/github-app/dist/tenant-queue.js +423 -0
- package/node_modules/@loopwright/github-app/dist/token-broker.d.ts +50 -0
- package/node_modules/@loopwright/github-app/dist/token-broker.js +262 -0
- package/node_modules/@loopwright/github-app/dist/turnkey-memory.d.ts +35 -0
- package/node_modules/@loopwright/github-app/dist/turnkey-memory.js +1654 -0
- package/node_modules/@loopwright/github-app/dist/turnkey.d.ts +16 -0
- package/node_modules/@loopwright/github-app/dist/turnkey.js +34 -0
- package/node_modules/@loopwright/github-app/dist/types.d.ts +220 -0
- package/node_modules/@loopwright/github-app/dist/types.js +14 -0
- package/node_modules/@loopwright/github-app/dist/upstreams.d.ts +13 -0
- package/node_modules/@loopwright/github-app/dist/upstreams.js +65 -0
- package/node_modules/@loopwright/github-app/dist/webhook.d.ts +34 -0
- package/node_modules/@loopwright/github-app/dist/webhook.js +241 -0
- package/node_modules/@loopwright/github-app/dist/yaml.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/yaml.js +1 -0
- package/node_modules/@loopwright/github-app/package.json +12 -0
- package/node_modules/@loopwright/hardware-runner/dist/config.d.ts +48 -0
- package/node_modules/@loopwright/hardware-runner/dist/config.js +719 -0
- package/node_modules/@loopwright/hardware-runner/dist/evaluator.d.ts +230 -0
- package/node_modules/@loopwright/hardware-runner/dist/evaluator.js +3178 -0
- package/node_modules/@loopwright/hardware-runner/dist/index.d.ts +13 -0
- package/node_modules/@loopwright/hardware-runner/dist/index.js +9 -0
- package/node_modules/@loopwright/hardware-runner/dist/provenance.d.ts +128 -0
- package/node_modules/@loopwright/hardware-runner/dist/provenance.js +1500 -0
- package/node_modules/@loopwright/hardware-runner/dist/queue.d.ts +81 -0
- package/node_modules/@loopwright/hardware-runner/dist/queue.js +1081 -0
- package/node_modules/@loopwright/hardware-runner/dist/relay-server.d.ts +13 -0
- package/node_modules/@loopwright/hardware-runner/dist/relay-server.js +2997 -0
- package/node_modules/@loopwright/hardware-runner/dist/types.d.ts +239 -0
- package/node_modules/@loopwright/hardware-runner/dist/types.js +12 -0
- package/node_modules/@loopwright/hardware-runner/dist/worker.d.ts +49 -0
- package/node_modules/@loopwright/hardware-runner/dist/worker.js +1646 -0
- package/node_modules/@loopwright/hardware-runner/package.json +12 -0
- package/node_modules/@loopwright/memory/dist/cas.d.ts +21 -0
- package/node_modules/@loopwright/memory/dist/cas.js +510 -0
- package/node_modules/@loopwright/memory/dist/compaction.d.ts +18 -0
- package/node_modules/@loopwright/memory/dist/compaction.js +110 -0
- package/node_modules/@loopwright/memory/dist/finalizer.d.ts +23 -0
- package/node_modules/@loopwright/memory/dist/finalizer.js +538 -0
- package/node_modules/@loopwright/memory/dist/index.d.ts +9 -0
- package/node_modules/@loopwright/memory/dist/index.js +8 -0
- package/node_modules/@loopwright/memory/dist/schema.d.ts +36 -0
- package/node_modules/@loopwright/memory/dist/schema.js +510 -0
- package/node_modules/@loopwright/memory/dist/selector.d.ts +7 -0
- package/node_modules/@loopwright/memory/dist/selector.js +157 -0
- package/node_modules/@loopwright/memory/dist/store.d.ts +51 -0
- package/node_modules/@loopwright/memory/dist/store.js +554 -0
- package/node_modules/@loopwright/memory/dist/types.d.ts +442 -0
- package/node_modules/@loopwright/memory/dist/types.js +8 -0
- package/node_modules/@loopwright/memory/dist/verifier.d.ts +5 -0
- package/node_modules/@loopwright/memory/dist/verifier.js +328 -0
- package/node_modules/@loopwright/memory/package.json +12 -0
- package/node_modules/@loopwright/state/dist/admission.d.ts +321 -0
- package/node_modules/@loopwright/state/dist/admission.js +199 -0
- package/node_modules/@loopwright/state/dist/boundary.d.ts +53 -0
- package/node_modules/@loopwright/state/dist/boundary.js +194 -0
- package/node_modules/@loopwright/state/dist/checkpoint.d.ts +16 -0
- package/node_modules/@loopwright/state/dist/checkpoint.js +84 -0
- package/node_modules/@loopwright/state/dist/clock.d.ts +8 -0
- package/node_modules/@loopwright/state/dist/clock.js +27 -0
- package/node_modules/@loopwright/state/dist/connection.d.ts +55 -0
- package/node_modules/@loopwright/state/dist/connection.js +391 -0
- package/node_modules/@loopwright/state/dist/errors.d.ts +13 -0
- package/node_modules/@loopwright/state/dist/errors.js +34 -0
- package/node_modules/@loopwright/state/dist/index.d.ts +3 -0
- package/node_modules/@loopwright/state/dist/index.js +1 -0
- package/node_modules/@loopwright/state/dist/journal.d.ts +119 -0
- package/node_modules/@loopwright/state/dist/journal.js +72 -0
- package/node_modules/@loopwright/state/dist/model.d.ts +40 -0
- package/node_modules/@loopwright/state/dist/model.js +58 -0
- package/node_modules/@loopwright/state/dist/ownership.d.ts +14 -0
- package/node_modules/@loopwright/state/dist/ownership.js +45 -0
- package/node_modules/@loopwright/state/dist/pages.d.ts +11 -0
- package/node_modules/@loopwright/state/dist/pages.js +41 -0
- package/node_modules/@loopwright/state/dist/receipts.d.ts +33 -0
- package/node_modules/@loopwright/state/dist/receipts.js +97 -0
- package/node_modules/@loopwright/state/dist/schema.d.ts +28 -0
- package/node_modules/@loopwright/state/dist/schema.js +41 -0
- package/node_modules/@loopwright/state/dist/settlement.d.ts +10 -0
- package/node_modules/@loopwright/state/dist/settlement.js +129 -0
- package/node_modules/@loopwright/state/dist/store.d.ts +52 -0
- package/node_modules/@loopwright/state/dist/store.js +100 -0
- package/node_modules/@loopwright/state/dist/types.d.ts +315 -0
- package/node_modules/@loopwright/state/dist/types.js +1 -0
- package/node_modules/@loopwright/state/package.json +12 -0
- package/node_modules/@loopwright/taskpack/dist/baseline-align.d.ts +195 -0
- package/node_modules/@loopwright/taskpack/dist/baseline-align.js +1847 -0
- package/node_modules/@loopwright/taskpack/dist/digests.d.ts +61 -0
- package/node_modules/@loopwright/taskpack/dist/digests.js +715 -0
- package/node_modules/@loopwright/taskpack/dist/index.d.ts +18 -0
- package/node_modules/@loopwright/taskpack/dist/index.js +17 -0
- package/node_modules/@loopwright/taskpack/dist/models-config.d.ts +112 -0
- package/node_modules/@loopwright/taskpack/dist/models-config.js +1026 -0
- package/node_modules/@loopwright/taskpack/dist/output-format.d.ts +28 -0
- package/node_modules/@loopwright/taskpack/dist/output-format.js +157 -0
- package/node_modules/@loopwright/taskpack/dist/preflight.d.ts +130 -0
- package/node_modules/@loopwright/taskpack/dist/preflight.js +1497 -0
- package/node_modules/@loopwright/taskpack/dist/qualification.d.ts +23 -0
- package/node_modules/@loopwright/taskpack/dist/qualification.js +120 -0
- package/node_modules/@loopwright/taskpack/dist/sandbox.d.ts +121 -0
- package/node_modules/@loopwright/taskpack/dist/sandbox.js +2605 -0
- package/node_modules/@loopwright/taskpack/dist/schema.d.ts +197 -0
- package/node_modules/@loopwright/taskpack/dist/schema.js +4189 -0
- package/node_modules/@loopwright/taskpack/dist/scrubber.d.ts +47 -0
- package/node_modules/@loopwright/taskpack/dist/scrubber.js +283 -0
- package/node_modules/@loopwright/taskpack/dist/suite.d.ts +124 -0
- package/node_modules/@loopwright/taskpack/dist/suite.js +3256 -0
- package/node_modules/@loopwright/taskpack/dist/taskpack.d.ts +154 -0
- package/node_modules/@loopwright/taskpack/dist/taskpack.js +3634 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey-memory.d.ts +122 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey-memory.js +483 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey.d.ts +437 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey.js +7313 -0
- package/node_modules/@loopwright/taskpack/dist/types.d.ts +1274 -0
- package/node_modules/@loopwright/taskpack/dist/types.js +99 -0
- package/node_modules/@loopwright/taskpack/dist/upstreams.d.ts +261 -0
- package/node_modules/@loopwright/taskpack/dist/upstreams.js +2242 -0
- package/node_modules/@loopwright/taskpack/dist/yaml.d.ts +18 -0
- package/node_modules/@loopwright/taskpack/dist/yaml.js +167 -0
- package/node_modules/@loopwright/taskpack/package.json +12 -0
- package/node_modules/@loopwright/taskpack-runner/dist/compile-taskpack.d.ts +137 -0
- package/node_modules/@loopwright/taskpack-runner/dist/compile-taskpack.js +474 -0
- package/node_modules/@loopwright/taskpack-runner/dist/corpus.d.ts +8 -0
- package/node_modules/@loopwright/taskpack-runner/dist/corpus.js +129 -0
- package/node_modules/@loopwright/taskpack-runner/dist/index.d.ts +13 -0
- package/node_modules/@loopwright/taskpack-runner/dist/index.js +7 -0
- package/node_modules/@loopwright/taskpack-runner/dist/intake.d.ts +149 -0
- package/node_modules/@loopwright/taskpack-runner/dist/intake.js +135 -0
- package/node_modules/@loopwright/taskpack-runner/dist/parity.d.ts +130 -0
- package/node_modules/@loopwright/taskpack-runner/dist/parity.js +927 -0
- package/node_modules/@loopwright/taskpack-runner/dist/python-bridge.d.ts +68 -0
- package/node_modules/@loopwright/taskpack-runner/dist/python-bridge.js +517 -0
- package/node_modules/@loopwright/taskpack-runner/dist/service.d.ts +149 -0
- package/node_modules/@loopwright/taskpack-runner/dist/service.js +1796 -0
- package/node_modules/@loopwright/taskpack-runner/dist/types.d.ts +29 -0
- package/node_modules/@loopwright/taskpack-runner/dist/types.js +11 -0
- package/node_modules/@loopwright/taskpack-runner/package.json +12 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/README.md +77 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/docs/support-records.md +57 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/docs/supported-runners.md +98 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/manifest.json +205 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/expand_matrix.sh +273 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/matrix.yaml +280 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/resolve_dockerfile.sh +24 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pyproject.toml +46 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/runtime_runner/runner.py.json +5270 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/discovery/legacy-support.md +86 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/github/service.py +401 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/proposals/analysis.json +95 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/proposals/ready.json +109 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_assemble.py +263 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_check_draft.py +333 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_checks.py +1099 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_discovery.py +817 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_proposal.py +658 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_publish.py +987 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_summary.py +107 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/agent.py +610 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/assemble.py +84 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/check_draft.py +94 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/checks.py +1002 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/discovery.py +789 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/model.py +557 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/progress.py +174 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/analysis.md +40 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/proposal.md +65 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/repair.md +17 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/proposal.py +903 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/publish.py +997 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/summary.py +131 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/tool-versions.json +133 -0
- package/node_modules/package-lock.json +3021 -0
- package/package-lock.json +3021 -0
- package/package.json +52 -4
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export declare const OVERLAY_LIMITS: Readonly<{
|
|
2
|
+
defaultMaxFiles: 128;
|
|
3
|
+
defaultMaxBytes: 4194304;
|
|
4
|
+
minMaxFiles: 1;
|
|
5
|
+
minMaxBytes: 1024;
|
|
6
|
+
maxMaxFiles: 16384;
|
|
7
|
+
maxMaxBytes: 17179869184;
|
|
8
|
+
}>;
|
|
9
|
+
export interface OverlayLimits {
|
|
10
|
+
readonly maxFiles: number;
|
|
11
|
+
readonly maxBytes: number;
|
|
12
|
+
}
|
|
13
|
+
export interface OverlayLimitsInput {
|
|
14
|
+
readonly maxFiles?: number;
|
|
15
|
+
readonly maxBytes?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface OverlayLimitOptions {
|
|
18
|
+
readonly overlay?: OverlayLimitsInput;
|
|
19
|
+
}
|
|
20
|
+
export declare const HANDOFF_LIMITS: Readonly<{
|
|
21
|
+
maxPerStep: 16;
|
|
22
|
+
maxPointers: 32;
|
|
23
|
+
minBytes: 64;
|
|
24
|
+
defaultBytes: 8192;
|
|
25
|
+
maxBytes: 65536;
|
|
26
|
+
maxAggregateBytes: 65536;
|
|
27
|
+
maxSourceBytes: 1048576;
|
|
28
|
+
maxHeadingChars: 256;
|
|
29
|
+
maxPointerChars: 512;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const VERIFIER_ARTIFACT_LIMITS: Readonly<{
|
|
32
|
+
prefix: ".loopwright-verifier";
|
|
33
|
+
maxFilesPerSlot: 64;
|
|
34
|
+
maxTotalFiles: 256;
|
|
35
|
+
maxFileBytes: 17179869184;
|
|
36
|
+
maxTotalBytes: 17179869184;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const LIMITS: Readonly<{
|
|
39
|
+
inputBytes: 1048576;
|
|
40
|
+
depth: 64;
|
|
41
|
+
string: 16384;
|
|
42
|
+
nodes: 65536;
|
|
43
|
+
properties: 128;
|
|
44
|
+
collection: 1024;
|
|
45
|
+
identifier: 64;
|
|
46
|
+
toolName: 128;
|
|
47
|
+
goal: 4096;
|
|
48
|
+
path: 1024;
|
|
49
|
+
segments: 64;
|
|
50
|
+
roles: 64;
|
|
51
|
+
resources: 128;
|
|
52
|
+
tools: 128;
|
|
53
|
+
patterns: 128;
|
|
54
|
+
patternWildcards: 16;
|
|
55
|
+
targets: 64;
|
|
56
|
+
graphNodes: 256;
|
|
57
|
+
graphEdges: 2048;
|
|
58
|
+
checks: 256;
|
|
59
|
+
evidence: 256;
|
|
60
|
+
manifest: 256;
|
|
61
|
+
overlayEntries: 128;
|
|
62
|
+
baselineEntries: 65536;
|
|
63
|
+
requests: 1024;
|
|
64
|
+
resolvedArtifacts: 512;
|
|
65
|
+
artifactBytes: 67108864;
|
|
66
|
+
resolvedBytes: 134217728;
|
|
67
|
+
metricEntries: 64;
|
|
68
|
+
metricKey: 64;
|
|
69
|
+
metricStringValue: 256;
|
|
70
|
+
metricThresholds: 32;
|
|
71
|
+
findings: 64;
|
|
72
|
+
findingTitle: 256;
|
|
73
|
+
findingEvidence: 2048;
|
|
74
|
+
artifactUri: 2048;
|
|
75
|
+
mediaType: 128;
|
|
76
|
+
maxReworks: 8;
|
|
77
|
+
handoffsPerStep: 16;
|
|
78
|
+
handoffPointers: 32;
|
|
79
|
+
handoffMinBytes: 64;
|
|
80
|
+
handoffDefaultBytes: 8192;
|
|
81
|
+
handoffMaxBytes: 65536;
|
|
82
|
+
handoffAggregateBytes: 65536;
|
|
83
|
+
handoffSourceBytes: 1048576;
|
|
84
|
+
handoffHeading: 256;
|
|
85
|
+
handoffPointer: 512;
|
|
86
|
+
ruleChangedPaths: 128;
|
|
87
|
+
ruleExtensions: 64;
|
|
88
|
+
ruleExtension: 33;
|
|
89
|
+
rulePhases: 4;
|
|
90
|
+
ruleFailedChecks: 64;
|
|
91
|
+
ruleFailureCodes: 64;
|
|
92
|
+
ruleFailureCode: 128;
|
|
93
|
+
suiteDomains: 32;
|
|
94
|
+
suiteStages: 16;
|
|
95
|
+
suiteManifestBytes: 65536;
|
|
96
|
+
baselineMaxConflictFiles: 64;
|
|
97
|
+
baselineMinConflictBytes: 1024;
|
|
98
|
+
baselineMaxConflictBytes: 262144;
|
|
99
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const OVERLAY_LIMITS = Object.freeze({
|
|
2
|
+
defaultMaxFiles: 128,
|
|
3
|
+
defaultMaxBytes: 4_194_304,
|
|
4
|
+
minMaxFiles: 1,
|
|
5
|
+
minMaxBytes: 1_024,
|
|
6
|
+
maxMaxFiles: 16_384,
|
|
7
|
+
maxMaxBytes: 17_179_869_184,
|
|
8
|
+
});
|
|
9
|
+
export const HANDOFF_LIMITS = Object.freeze({
|
|
10
|
+
maxPerStep: 16,
|
|
11
|
+
maxPointers: 32,
|
|
12
|
+
minBytes: 64,
|
|
13
|
+
defaultBytes: 8_192,
|
|
14
|
+
maxBytes: 65_536,
|
|
15
|
+
maxAggregateBytes: 65_536,
|
|
16
|
+
maxSourceBytes: 1_048_576,
|
|
17
|
+
maxHeadingChars: 256,
|
|
18
|
+
maxPointerChars: 512,
|
|
19
|
+
});
|
|
20
|
+
export const VERIFIER_ARTIFACT_LIMITS = Object.freeze({
|
|
21
|
+
prefix: '.loopwright-verifier',
|
|
22
|
+
maxFilesPerSlot: 64,
|
|
23
|
+
maxTotalFiles: 256,
|
|
24
|
+
maxFileBytes: OVERLAY_LIMITS.maxMaxBytes,
|
|
25
|
+
maxTotalBytes: OVERLAY_LIMITS.maxMaxBytes,
|
|
26
|
+
});
|
|
27
|
+
export const LIMITS = Object.freeze({
|
|
28
|
+
inputBytes: 1_048_576, depth: 64, string: 16_384, nodes: 65_536,
|
|
29
|
+
properties: 128, collection: 1_024, identifier: 64, toolName: 128,
|
|
30
|
+
goal: 4_096, path: 1_024, segments: 64, roles: 64, resources: 128,
|
|
31
|
+
tools: 128, patterns: 128, patternWildcards: 16, targets: 64, graphNodes: 256, graphEdges: 2_048,
|
|
32
|
+
checks: 256, evidence: 256, manifest: 256, overlayEntries: 128, baselineEntries: 65_536, requests: 1_024,
|
|
33
|
+
resolvedArtifacts: 512, artifactBytes: 67_108_864, resolvedBytes: 134_217_728,
|
|
34
|
+
metricEntries: 64, metricKey: 64, metricStringValue: 256, metricThresholds: 32,
|
|
35
|
+
findings: 64, findingTitle: 256, findingEvidence: 2_048,
|
|
36
|
+
artifactUri: 2_048, mediaType: 128, maxReworks: 8,
|
|
37
|
+
handoffsPerStep: HANDOFF_LIMITS.maxPerStep,
|
|
38
|
+
handoffPointers: HANDOFF_LIMITS.maxPointers,
|
|
39
|
+
handoffMinBytes: HANDOFF_LIMITS.minBytes,
|
|
40
|
+
handoffDefaultBytes: HANDOFF_LIMITS.defaultBytes,
|
|
41
|
+
handoffMaxBytes: HANDOFF_LIMITS.maxBytes,
|
|
42
|
+
handoffAggregateBytes: HANDOFF_LIMITS.maxAggregateBytes,
|
|
43
|
+
handoffSourceBytes: HANDOFF_LIMITS.maxSourceBytes,
|
|
44
|
+
handoffHeading: HANDOFF_LIMITS.maxHeadingChars,
|
|
45
|
+
handoffPointer: HANDOFF_LIMITS.maxPointerChars,
|
|
46
|
+
ruleChangedPaths: 128,
|
|
47
|
+
ruleExtensions: 64,
|
|
48
|
+
ruleExtension: 33,
|
|
49
|
+
rulePhases: 4,
|
|
50
|
+
ruleFailedChecks: 64,
|
|
51
|
+
ruleFailureCodes: 64,
|
|
52
|
+
ruleFailureCode: 128,
|
|
53
|
+
suiteDomains: 32,
|
|
54
|
+
suiteStages: 16,
|
|
55
|
+
suiteManifestBytes: 65_536,
|
|
56
|
+
baselineMaxConflictFiles: 64,
|
|
57
|
+
baselineMinConflictBytes: 1_024,
|
|
58
|
+
baselineMaxConflictBytes: 262_144,
|
|
59
|
+
});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { type Json } from './boundary.js';
|
|
2
|
+
import { type Infer } from './contracts.js';
|
|
3
|
+
import { type Result } from './diagnostics.js';
|
|
4
|
+
import { type ResolvedArtifactInput } from './artifacts.js';
|
|
5
|
+
import { type OverlayLimitOptions } from './limits.js';
|
|
6
|
+
declare const runStatusSchema: import("./contracts.js").Schema<"failed" | "blocked" | "completed" | "no_change" | "exhausted" | "expired" | "cancelled" | "reconcile_required">;
|
|
7
|
+
export type RunStatus = Infer<typeof runStatusSchema>;
|
|
8
|
+
declare const noChangeSchema: import("./contracts.js").Schema<{
|
|
9
|
+
readonly checkId: string;
|
|
10
|
+
readonly reason: "candidate_equals_source" | "no_applicable_update";
|
|
11
|
+
readonly evidenceId: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type NoChangeVerification = Infer<typeof noChangeSchema>;
|
|
14
|
+
declare const memoryShape: import("./contracts.js").Schema<{
|
|
15
|
+
readonly reason: string | null;
|
|
16
|
+
readonly status: "not_requested" | "pending" | "proposed" | "unavailable";
|
|
17
|
+
}>;
|
|
18
|
+
export type MemoryObservation = Infer<typeof memoryShape>;
|
|
19
|
+
declare const runShape: (value: Json, path: string) => {
|
|
20
|
+
readonly kind: "RunResult";
|
|
21
|
+
readonly apiVersion: "loopwright.dev/v1alpha1";
|
|
22
|
+
readonly metadata: {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
};
|
|
25
|
+
readonly spec: {
|
|
26
|
+
readonly subject: {
|
|
27
|
+
readonly repository: string;
|
|
28
|
+
readonly baseRevision: string;
|
|
29
|
+
readonly sourceRevision: string;
|
|
30
|
+
readonly contractHash: {
|
|
31
|
+
readonly hex: string;
|
|
32
|
+
readonly algorithm: "sha256";
|
|
33
|
+
};
|
|
34
|
+
readonly lockHash: {
|
|
35
|
+
readonly hex: string;
|
|
36
|
+
readonly algorithm: "sha256";
|
|
37
|
+
};
|
|
38
|
+
readonly candidateDigest: {
|
|
39
|
+
readonly hex: string;
|
|
40
|
+
readonly algorithm: "sha256";
|
|
41
|
+
};
|
|
42
|
+
readonly targetMatrixDigest: {
|
|
43
|
+
readonly hex: string;
|
|
44
|
+
readonly algorithm: "sha256";
|
|
45
|
+
} | null;
|
|
46
|
+
};
|
|
47
|
+
readonly status: "failed" | "blocked" | "completed" | "no_change" | "exhausted" | "expired" | "cancelled" | "reconcile_required";
|
|
48
|
+
readonly usage: {
|
|
49
|
+
readonly requests: readonly {
|
|
50
|
+
readonly requestId: string;
|
|
51
|
+
readonly inputTokens: import("./usage.js").Quantity;
|
|
52
|
+
readonly outputTokens: import("./usage.js").Quantity;
|
|
53
|
+
readonly costMicrousd: import("./usage.js").Quantity;
|
|
54
|
+
}[];
|
|
55
|
+
readonly totalTokens: {
|
|
56
|
+
readonly provenance: "unknown" | "reported" | "estimated";
|
|
57
|
+
readonly knownSubtotal: number;
|
|
58
|
+
readonly unknownCount: number;
|
|
59
|
+
readonly completeness: "complete" | "partial";
|
|
60
|
+
};
|
|
61
|
+
readonly inputTokens: {
|
|
62
|
+
readonly provenance: "unknown" | "reported" | "estimated";
|
|
63
|
+
readonly knownSubtotal: number;
|
|
64
|
+
readonly unknownCount: number;
|
|
65
|
+
readonly completeness: "complete" | "partial";
|
|
66
|
+
};
|
|
67
|
+
readonly outputTokens: {
|
|
68
|
+
readonly provenance: "unknown" | "reported" | "estimated";
|
|
69
|
+
readonly knownSubtotal: number;
|
|
70
|
+
readonly unknownCount: number;
|
|
71
|
+
readonly completeness: "complete" | "partial";
|
|
72
|
+
};
|
|
73
|
+
readonly costMicrousd: {
|
|
74
|
+
readonly provenance: "unknown" | "reported" | "estimated";
|
|
75
|
+
readonly knownSubtotal: number;
|
|
76
|
+
readonly unknownCount: number;
|
|
77
|
+
readonly completeness: "complete" | "partial";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly externalEffects: "unknown" | "none" | "confirmed";
|
|
81
|
+
readonly noChange: {
|
|
82
|
+
readonly checkId: string;
|
|
83
|
+
readonly reason: "candidate_equals_source" | "no_applicable_update";
|
|
84
|
+
readonly evidenceId: string;
|
|
85
|
+
} | null;
|
|
86
|
+
readonly verification: {
|
|
87
|
+
readonly kind: "VerificationResult";
|
|
88
|
+
readonly apiVersion: "loopwright.dev/v1alpha1";
|
|
89
|
+
readonly metadata: {
|
|
90
|
+
readonly id: string;
|
|
91
|
+
};
|
|
92
|
+
readonly spec: {
|
|
93
|
+
readonly required: readonly {
|
|
94
|
+
readonly checkId: string;
|
|
95
|
+
readonly detail: string | null;
|
|
96
|
+
readonly reason: "observed_pass" | "submitted_failed" | "submitted_blocked" | "submitted_not_run" | "missing_submission" | "missing_evidence" | "evidence_level_disallowed" | "artifact_missing" | "artifact_length_mismatch" | "artifact_digest_mismatch" | "hardware_provenance_mismatch" | "metric_threshold_failed";
|
|
97
|
+
readonly status: "passed" | "failed" | "blocked" | "not_run";
|
|
98
|
+
readonly evidenceId: string | null;
|
|
99
|
+
readonly findings?: readonly {
|
|
100
|
+
readonly evidence: string;
|
|
101
|
+
readonly title: string;
|
|
102
|
+
readonly severity: "critical" | "high" | "medium" | "low";
|
|
103
|
+
readonly path?: string | null;
|
|
104
|
+
readonly line?: number | null;
|
|
105
|
+
}[];
|
|
106
|
+
readonly metrics?: Readonly<Record<string, import("./contracts.js").MetricValue>>;
|
|
107
|
+
}[];
|
|
108
|
+
readonly subject: {
|
|
109
|
+
readonly repository: string;
|
|
110
|
+
readonly baseRevision: string;
|
|
111
|
+
readonly sourceRevision: string;
|
|
112
|
+
readonly contractHash: {
|
|
113
|
+
readonly hex: string;
|
|
114
|
+
readonly algorithm: "sha256";
|
|
115
|
+
};
|
|
116
|
+
readonly lockHash: {
|
|
117
|
+
readonly hex: string;
|
|
118
|
+
readonly algorithm: "sha256";
|
|
119
|
+
};
|
|
120
|
+
readonly candidateDigest: {
|
|
121
|
+
readonly hex: string;
|
|
122
|
+
readonly algorithm: "sha256";
|
|
123
|
+
};
|
|
124
|
+
readonly targetMatrixDigest: {
|
|
125
|
+
readonly hex: string;
|
|
126
|
+
readonly algorithm: "sha256";
|
|
127
|
+
} | null;
|
|
128
|
+
};
|
|
129
|
+
readonly optional: readonly {
|
|
130
|
+
readonly checkId: string;
|
|
131
|
+
readonly detail: string | null;
|
|
132
|
+
readonly reason: "observed_pass" | "submitted_failed" | "submitted_blocked" | "submitted_not_run" | "missing_submission" | "missing_evidence" | "evidence_level_disallowed" | "artifact_missing" | "artifact_length_mismatch" | "artifact_digest_mismatch" | "hardware_provenance_mismatch" | "metric_threshold_failed";
|
|
133
|
+
readonly status: "passed" | "failed" | "blocked" | "not_run";
|
|
134
|
+
readonly evidenceId: string | null;
|
|
135
|
+
readonly findings?: readonly {
|
|
136
|
+
readonly evidence: string;
|
|
137
|
+
readonly title: string;
|
|
138
|
+
readonly severity: "critical" | "high" | "medium" | "low";
|
|
139
|
+
readonly path?: string | null;
|
|
140
|
+
readonly line?: number | null;
|
|
141
|
+
}[];
|
|
142
|
+
readonly metrics?: Readonly<Record<string, import("./contracts.js").MetricValue>>;
|
|
143
|
+
}[];
|
|
144
|
+
readonly satisfied: boolean;
|
|
145
|
+
readonly diagnostics: readonly {
|
|
146
|
+
readonly path: string;
|
|
147
|
+
readonly code: "INPUT_TYPE" | "INPUT_UNSUPPORTED" | "INPUT_CYCLE" | "INPUT_ALIAS" | "LIMIT_BYTES" | "LIMIT_DEPTH" | "LIMIT_STRING" | "LIMIT_COLLECTION" | "LIMIT_NODES" | "JSON_SYNTAX" | "JSON_DUPLICATE_MEMBER" | "VERSION_UNSUPPORTED" | "KIND_MISMATCH" | "FIELD_REQUIRED" | "FIELD_UNKNOWN" | "VALUE_TYPE" | "VALUE_ENUM" | "VALUE_RANGE" | "IDENTIFIER_INVALID" | "PATH_INVALID" | "PATTERN_UNSUPPORTED" | "DUPLICATE_ID" | "DUPLICATE_EDGE" | "REFERENCE_UNKNOWN" | "GRAPH_CYCLE" | "LIMIT_GRAPH_NODES" | "LIMIT_GRAPH_EDGES" | "BUDGET_INCONSISTENT" | "HASH_MISMATCH" | "MANIFEST_AMBIGUOUS" | "IDENTITY_MISMATCH" | "EVIDENCE_DUPLICATE" | "EVIDENCE_CONTRADICTORY" | "ARTIFACT_DUPLICATE" | "LIMIT_ARTIFACT_BYTES" | "LIMIT_RESOLVED_BYTES" | "USAGE_OVERFLOW" | "RUN_ACCEPTANCE_REQUIRED" | "RUN_NO_CHANGE_REQUIRED" | "RUN_RECONCILIATION_REQUIRED" | "CHECK_MISSING" | "EVIDENCE_MISSING" | "EVIDENCE_LEVEL_DISALLOWED" | "ARTIFACT_MISSING" | "ARTIFACT_LENGTH_MISMATCH" | "ARTIFACT_DIGEST_MISMATCH" | "HARDWARE_PROVENANCE_MISMATCH" | "METRIC_THRESHOLD_FAILED";
|
|
148
|
+
readonly checkId: string | null;
|
|
149
|
+
}[];
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly memory: {
|
|
153
|
+
readonly reason: string | null;
|
|
154
|
+
readonly status: "not_requested" | "pending" | "proposed" | "unavailable";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export type RunResult = Infer<typeof runShape>;
|
|
159
|
+
export declare function runSchema(input: Json, path?: string): RunResult;
|
|
160
|
+
export declare function constructRunResult(input: unknown, artifacts: readonly ResolvedArtifactInput[], options?: OverlayLimitOptions): Result<RunResult>;
|
|
161
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { overlaySnapshotBounds, snapshotWithDeferredManifest } from './boundary.js';
|
|
2
|
+
import { arrayOf, document, enumeration, identifier, nullable, object, record, resolveOverlayOptions, text, } from './contracts.js';
|
|
3
|
+
import { attempt, fail } from './diagnostics.js';
|
|
4
|
+
import { manifestSchema } from './artifacts.js';
|
|
5
|
+
import { evaluateValidated, verificationSchema } from './acceptance.js';
|
|
6
|
+
import { claimSchema, evidenceSchema } from './evidence.js';
|
|
7
|
+
import { lockSchema, matchSubject, subjectSchema } from './identity.js';
|
|
8
|
+
import { LIMITS } from './limits.js';
|
|
9
|
+
import { requestsSchema, summarizeRequests, usageSummarySchema } from './usage.js';
|
|
10
|
+
const runStatusSchema = enumeration('completed', 'no_change', 'blocked', 'exhausted', 'expired', 'cancelled', 'failed', 'reconcile_required');
|
|
11
|
+
const effectsSchema = enumeration('none', 'confirmed', 'unknown');
|
|
12
|
+
const noChangeSchema = record({ checkId: identifier, evidenceId: identifier, reason: enumeration('candidate_equals_source', 'no_applicable_update') });
|
|
13
|
+
const memoryShape = record({ status: enumeration('not_requested', 'pending', 'proposed', 'unavailable'), reason: nullable(text()) });
|
|
14
|
+
function memorySchema(value, path) {
|
|
15
|
+
const memory = memoryShape(value, path);
|
|
16
|
+
if ((memory.status === 'pending' || memory.status === 'unavailable') && memory.reason === null)
|
|
17
|
+
fail('VALUE_RANGE', `${path}/reason`);
|
|
18
|
+
return memory;
|
|
19
|
+
}
|
|
20
|
+
const draftTrustedKeys = ['expectedLock', 'candidateManifest', 'eligibleEvidence', 'usage', 'externalEffects', 'noChange'];
|
|
21
|
+
function parseDraftTrusted(value, path, resolveManifest, explicitOverlay) {
|
|
22
|
+
const input = object(value, path);
|
|
23
|
+
for (const key of draftTrustedKeys) {
|
|
24
|
+
if (!Object.hasOwn(input, key))
|
|
25
|
+
fail('FIELD_REQUIRED', `${path}/${key}`);
|
|
26
|
+
}
|
|
27
|
+
for (const key of Object.keys(input).sort()) {
|
|
28
|
+
if (!draftTrustedKeys.includes(key))
|
|
29
|
+
fail('FIELD_UNKNOWN', path);
|
|
30
|
+
}
|
|
31
|
+
const expectedLock = lockSchema(input.expectedLock, `${path}/expectedLock`);
|
|
32
|
+
const effectiveOverlay = explicitOverlay ?? expectedLock.spec.contract.spec.budgets.overlay;
|
|
33
|
+
const manifestJson = resolveManifest(overlaySnapshotBounds(effectiveOverlay?.maxFiles));
|
|
34
|
+
const candidateManifest = manifestSchema(manifestJson, `${path}/candidateManifest`, effectiveOverlay?.maxFiles);
|
|
35
|
+
const eligibleEvidence = arrayOf(evidenceSchema, 0, LIMITS.evidence)(input.eligibleEvidence, `${path}/eligibleEvidence`);
|
|
36
|
+
const usage = requestsSchema(input.usage, `${path}/usage`);
|
|
37
|
+
const externalEffects = effectsSchema(input.externalEffects, `${path}/externalEffects`);
|
|
38
|
+
const noChange = nullable(noChangeSchema)(input.noChange, `${path}/noChange`);
|
|
39
|
+
const output = Object.create(null);
|
|
40
|
+
output.expectedLock = expectedLock;
|
|
41
|
+
output.candidateManifest = candidateManifest;
|
|
42
|
+
output.eligibleEvidence = eligibleEvidence;
|
|
43
|
+
output.usage = usage;
|
|
44
|
+
output.externalEffects = externalEffects;
|
|
45
|
+
output.noChange = noChange;
|
|
46
|
+
return output;
|
|
47
|
+
}
|
|
48
|
+
const candidateShape = record({ status: runStatusSchema, checks: arrayOf(claimSchema, 0, LIMITS.checks), memory: memorySchema });
|
|
49
|
+
function parseDraft(value, path, resolveManifest, explicitOverlay) {
|
|
50
|
+
return record({
|
|
51
|
+
trusted: (trustedValue, trustedPath) => parseDraftTrusted(trustedValue, trustedPath, resolveManifest, explicitOverlay),
|
|
52
|
+
candidate: candidateShape,
|
|
53
|
+
})(value, path);
|
|
54
|
+
}
|
|
55
|
+
const runShape = document('RunResult', record({ status: runStatusSchema, subject: subjectSchema,
|
|
56
|
+
verification: verificationSchema, usage: usageSummarySchema, externalEffects: effectsSchema,
|
|
57
|
+
noChange: nullable(noChangeSchema), memory: memorySchema }));
|
|
58
|
+
function consistentStatus(status, effects, noChange, verification, path, eligibleEvidence) {
|
|
59
|
+
if (effects === 'unknown' && status !== 'reconcile_required')
|
|
60
|
+
fail('RUN_RECONCILIATION_REQUIRED', path);
|
|
61
|
+
if (status === 'no_change') {
|
|
62
|
+
const row = noChange === null ? undefined : verification.spec.required.find(row => row.checkId === noChange.checkId);
|
|
63
|
+
if (noChange === null || !row || row.status !== 'passed' || row.evidenceId !== noChange.evidenceId)
|
|
64
|
+
fail('RUN_NO_CHANGE_REQUIRED', path);
|
|
65
|
+
// Serialized shape validation has no eligible-observation authority. Trusted
|
|
66
|
+
// construction always supplies this inventory and checks the method here.
|
|
67
|
+
if (eligibleEvidence !== null) {
|
|
68
|
+
const proof = eligibleEvidence.find(evidence => evidence.metadata.id === noChange.evidenceId);
|
|
69
|
+
if (!proof || proof.spec.checkId !== noChange.checkId || proof.spec.method !== 'verify_no_change')
|
|
70
|
+
fail('RUN_NO_CHANGE_REQUIRED', '/trusted/noChange');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (noChange !== null)
|
|
74
|
+
fail('RUN_NO_CHANGE_REQUIRED', path);
|
|
75
|
+
if ((status === 'completed' || status === 'no_change') && !verification.spec.satisfied)
|
|
76
|
+
fail('RUN_ACCEPTANCE_REQUIRED', path);
|
|
77
|
+
}
|
|
78
|
+
export function runSchema(input, path = '') {
|
|
79
|
+
const run = runShape(input, path), spec = run.spec;
|
|
80
|
+
matchSubject(spec.subject, spec.verification.spec.subject, `${path}/spec/verification/spec/subject`);
|
|
81
|
+
consistentStatus(spec.status, spec.externalEffects, spec.noChange, spec.verification, `${path}/spec/status`, null);
|
|
82
|
+
return run;
|
|
83
|
+
}
|
|
84
|
+
export function constructRunResult(input, artifacts, options) {
|
|
85
|
+
return attempt(() => {
|
|
86
|
+
const explicitOverlay = resolveOverlayOptions(options);
|
|
87
|
+
const deferred = snapshotWithDeferredManifest(input);
|
|
88
|
+
const draft = parseDraft(deferred.root, '', deferred.resolveManifest, explicitOverlay);
|
|
89
|
+
const usage = summarizeRequests(draft.trusted.usage, '/trusted/usage');
|
|
90
|
+
// Evaluate current trusted inputs, never a serialized matrix or type brand.
|
|
91
|
+
const verification = evaluateValidated({ trusted: draft.trusted, claims: draft.candidate.checks }, artifacts, '/candidate/checks', explicitOverlay ? { overlay: explicitOverlay } : undefined);
|
|
92
|
+
const { status, memory } = draft.candidate;
|
|
93
|
+
const { externalEffects, noChange } = draft.trusted;
|
|
94
|
+
consistentStatus(status, externalEffects, noChange, verification, '/candidate/status', draft.trusted.eligibleEvidence);
|
|
95
|
+
return { apiVersion: 'loopwright.dev/v1alpha1', kind: 'RunResult', metadata: { id: draft.trusted.expectedLock.spec.runId },
|
|
96
|
+
spec: { status, subject: structuredClone(verification.spec.subject), verification, usage, externalEffects, noChange, memory } };
|
|
97
|
+
});
|
|
98
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Result } from './diagnostics.js';
|
|
2
|
+
export interface VerifierArtifactPath {
|
|
3
|
+
readonly slotId: string;
|
|
4
|
+
readonly relativePath: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function isVerifierNamespacePath(name: string): boolean;
|
|
7
|
+
export declare function parseVerifierArtifactPath(name: string): VerifierArtifactPath | null;
|
|
8
|
+
export declare function relativeName(value: string, path: string): string;
|
|
9
|
+
export declare function scopePattern(value: string, path: string): string;
|
|
10
|
+
export declare function matches(pattern: string, name: string): boolean;
|
|
11
|
+
export declare function validateRelativePath(path: unknown): Result<string>;
|
|
12
|
+
export declare function validateScopePattern(pattern: unknown): Result<string>;
|
|
13
|
+
export declare function matchesScopePattern(pattern: unknown, path: unknown): Result<boolean>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { snapshot } from './boundary.js';
|
|
2
|
+
import { attempt, fail } from './diagnostics.js';
|
|
3
|
+
import { LIMITS, VERIFIER_ARTIFACT_LIMITS } from './limits.js';
|
|
4
|
+
const WINDOWS_RESERVED = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i;
|
|
5
|
+
const SLOT_IDENTIFIER_RE = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
6
|
+
export function isVerifierNamespacePath(name) {
|
|
7
|
+
if (typeof name !== 'string' || !name.length)
|
|
8
|
+
return false;
|
|
9
|
+
const slash = name.indexOf('/');
|
|
10
|
+
const first = slash === -1 ? name : name.slice(0, slash);
|
|
11
|
+
return first.toLowerCase() === VERIFIER_ARTIFACT_LIMITS.prefix;
|
|
12
|
+
}
|
|
13
|
+
function validVerifierSlotId(slotId) {
|
|
14
|
+
if (!validSegmentBase(slotId))
|
|
15
|
+
return false;
|
|
16
|
+
if (slotId.startsWith('check.')) {
|
|
17
|
+
const checkId = slotId.slice(6);
|
|
18
|
+
return checkId.length >= 1 && checkId.length <= LIMITS.identifier && SLOT_IDENTIFIER_RE.test(checkId);
|
|
19
|
+
}
|
|
20
|
+
return slotId.length >= 1 && slotId.length <= LIMITS.identifier && SLOT_IDENTIFIER_RE.test(slotId);
|
|
21
|
+
}
|
|
22
|
+
export function parseVerifierArtifactPath(name) {
|
|
23
|
+
if (typeof name !== 'string' || !name.length || name.length > LIMITS.path)
|
|
24
|
+
return null;
|
|
25
|
+
const segments = name.split('/');
|
|
26
|
+
if (segments.length < 3 || segments.length > LIMITS.segments)
|
|
27
|
+
return null;
|
|
28
|
+
if (segments[0] !== VERIFIER_ARTIFACT_LIMITS.prefix)
|
|
29
|
+
return null;
|
|
30
|
+
const slotId = segments[1];
|
|
31
|
+
if (!validVerifierSlotId(slotId))
|
|
32
|
+
return null;
|
|
33
|
+
for (let index = 2; index < segments.length; index++) {
|
|
34
|
+
const segment = segments[index];
|
|
35
|
+
if (!validSegmentBase(segment) || !/^[A-Za-z0-9._-]+$/.test(segment))
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return { slotId, relativePath: segments.slice(2).join('/') };
|
|
39
|
+
}
|
|
40
|
+
function validSegmentBase(segment) {
|
|
41
|
+
return segment.length > 0 && segment !== '.' && segment !== '..'
|
|
42
|
+
&& !segment.endsWith('.') && !WINDOWS_RESERVED.test(segment);
|
|
43
|
+
}
|
|
44
|
+
export function relativeName(value, path) {
|
|
45
|
+
if (!value.length || value.length > LIMITS.path)
|
|
46
|
+
fail('PATH_INVALID', path);
|
|
47
|
+
const segments = value.split('/');
|
|
48
|
+
if (segments.length > LIMITS.segments)
|
|
49
|
+
fail('PATH_INVALID', path);
|
|
50
|
+
for (const segment of segments) {
|
|
51
|
+
if (!validSegmentBase(segment) || !/^[A-Za-z0-9._-]+$/.test(segment))
|
|
52
|
+
fail('PATH_INVALID', path);
|
|
53
|
+
}
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
export function scopePattern(value, path) {
|
|
57
|
+
if (!value.length || value.length > LIMITS.path)
|
|
58
|
+
fail('PATH_INVALID', path);
|
|
59
|
+
if (value === '**')
|
|
60
|
+
return value;
|
|
61
|
+
const recursive = value.endsWith('/**');
|
|
62
|
+
const body = recursive ? value.slice(0, -3) : value;
|
|
63
|
+
if (!body.length)
|
|
64
|
+
fail('PATH_INVALID', path);
|
|
65
|
+
if (/[{}[\]!]/.test(body) || body.includes('**'))
|
|
66
|
+
fail('PATTERN_UNSUPPORTED', path);
|
|
67
|
+
const segments = body.split('/');
|
|
68
|
+
if (segments.length > LIMITS.segments)
|
|
69
|
+
fail('PATH_INVALID', path);
|
|
70
|
+
let wildcards = 0;
|
|
71
|
+
for (const segment of segments) {
|
|
72
|
+
if (!validSegmentBase(segment) || !/^[A-Za-z0-9._*?-]+$/.test(segment))
|
|
73
|
+
fail('PATH_INVALID', path);
|
|
74
|
+
for (let index = 0; index < segment.length; index++) {
|
|
75
|
+
const char = segment[index];
|
|
76
|
+
if (char === '*' || char === '?')
|
|
77
|
+
wildcards++;
|
|
78
|
+
}
|
|
79
|
+
if (wildcards > LIMITS.patternWildcards)
|
|
80
|
+
fail('PATTERN_UNSUPPORTED', path);
|
|
81
|
+
}
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
// Linear-space, non-exponential single-segment '*'/'?' matcher (never crosses '/').
|
|
85
|
+
function matchSegment(pattern, text) {
|
|
86
|
+
let pi = 0;
|
|
87
|
+
let ti = 0;
|
|
88
|
+
let starPi = -1;
|
|
89
|
+
let starTi = 0;
|
|
90
|
+
while (ti < text.length) {
|
|
91
|
+
if (pi < pattern.length && (pattern[pi] === '?' || pattern[pi] === text[ti])) {
|
|
92
|
+
pi++;
|
|
93
|
+
ti++;
|
|
94
|
+
}
|
|
95
|
+
else if (pi < pattern.length && pattern[pi] === '*') {
|
|
96
|
+
starPi = pi++;
|
|
97
|
+
starTi = ti;
|
|
98
|
+
}
|
|
99
|
+
else if (starPi !== -1) {
|
|
100
|
+
pi = starPi + 1;
|
|
101
|
+
ti = ++starTi;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
while (pi < pattern.length && pattern[pi] === '*')
|
|
108
|
+
pi++;
|
|
109
|
+
return pi === pattern.length;
|
|
110
|
+
}
|
|
111
|
+
export function matches(pattern, name) {
|
|
112
|
+
if (pattern === '**')
|
|
113
|
+
return true;
|
|
114
|
+
if (pattern.endsWith('/**')) {
|
|
115
|
+
const prefix = pattern.slice(0, -3);
|
|
116
|
+
if (!prefix.includes('*') && !prefix.includes('?')) {
|
|
117
|
+
return name === prefix || name.startsWith(prefix + '/');
|
|
118
|
+
}
|
|
119
|
+
const patternSegments = prefix.split('/');
|
|
120
|
+
const nameSegments = name.split('/');
|
|
121
|
+
if (nameSegments.length < patternSegments.length)
|
|
122
|
+
return false;
|
|
123
|
+
return patternSegments.every((segment, index) => matchSegment(segment, nameSegments[index]));
|
|
124
|
+
}
|
|
125
|
+
if (!pattern.includes('*') && !pattern.includes('?'))
|
|
126
|
+
return pattern === name;
|
|
127
|
+
const patternSegments = pattern.split('/');
|
|
128
|
+
const nameSegments = name.split('/');
|
|
129
|
+
if (nameSegments.length !== patternSegments.length)
|
|
130
|
+
return false;
|
|
131
|
+
return patternSegments.every((segment, index) => matchSegment(segment, nameSegments[index]));
|
|
132
|
+
}
|
|
133
|
+
function ownedString(input, path) {
|
|
134
|
+
const boxed = snapshot({ value: input });
|
|
135
|
+
const raw = boxed.value;
|
|
136
|
+
if (typeof raw !== 'string')
|
|
137
|
+
fail('VALUE_TYPE', path);
|
|
138
|
+
if (raw.length < 1 || raw.length > LIMITS.path)
|
|
139
|
+
fail('VALUE_RANGE', path);
|
|
140
|
+
return raw;
|
|
141
|
+
}
|
|
142
|
+
export function validateRelativePath(path) {
|
|
143
|
+
return attempt(() => relativeName(ownedString(path, '/path'), '/path'));
|
|
144
|
+
}
|
|
145
|
+
export function validateScopePattern(pattern) {
|
|
146
|
+
return attempt(() => scopePattern(ownedString(pattern, '/pattern'), '/pattern'));
|
|
147
|
+
}
|
|
148
|
+
export function matchesScopePattern(pattern, path) {
|
|
149
|
+
return attempt(() => {
|
|
150
|
+
const validPattern = scopePattern(ownedString(pattern, '/pattern'), '/pattern');
|
|
151
|
+
const validPath = relativeName(ownedString(path, '/path'), '/path');
|
|
152
|
+
return matches(validPattern, validPath);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decision-neutral credential tracker: registers secret material in raw, JSON-escaped, URL-encoded, and
|
|
3
|
+
* base64 forms and reports or replaces every form plus generic token patterns. It never throws; callers
|
|
4
|
+
* decide how to treat detected secrets.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SecretScrubber {
|
|
7
|
+
#private;
|
|
8
|
+
register(secret: string): void;
|
|
9
|
+
/** Replace every tracked credential form and generic token pattern with `[scrubbed]`. */
|
|
10
|
+
scrub(text: string): string;
|
|
11
|
+
/** Return true when any tracked credential form or generic token pattern appears in the value. */
|
|
12
|
+
containsSecret(value: string): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const GENERIC_SECRET_PATTERNS = Object.freeze([
|
|
2
|
+
/ghs_[A-Za-z0-9]{20,}/g,
|
|
3
|
+
/ghu_[A-Za-z0-9]{20,}/g,
|
|
4
|
+
/ghp_[A-Za-z0-9]{20,}/g,
|
|
5
|
+
/github_pat_[A-Za-z0-9_]{20,}/g,
|
|
6
|
+
/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/g,
|
|
7
|
+
/TYPESAFE_API_KEY/g,
|
|
8
|
+
/OPENAI_API_KEY/g,
|
|
9
|
+
/ANTHROPIC_API_KEY/g,
|
|
10
|
+
/STARTLUX_API_KEY/g,
|
|
11
|
+
/PERPLEXITY_API_KEY/g,
|
|
12
|
+
/CLOUDFLARE_API_TOKEN/g,
|
|
13
|
+
/LIQUID_API_KEY/g,
|
|
14
|
+
/AZURE_API_KEY/g,
|
|
15
|
+
/MICROSOFT_DECISION_API_KEY/g,
|
|
16
|
+
/AWS_SECRET_ACCESS_KEY/g,
|
|
17
|
+
]);
|
|
18
|
+
const MIN_FORM_LENGTH = 8;
|
|
19
|
+
/**
|
|
20
|
+
* Decision-neutral credential tracker: registers secret material in raw, JSON-escaped, URL-encoded, and
|
|
21
|
+
* base64 forms and reports or replaces every form plus generic token patterns. It never throws; callers
|
|
22
|
+
* decide how to treat detected secrets.
|
|
23
|
+
*/
|
|
24
|
+
export class SecretScrubber {
|
|
25
|
+
#forms = new Set();
|
|
26
|
+
register(secret) {
|
|
27
|
+
if (typeof secret !== 'string' || secret.length === 0)
|
|
28
|
+
return;
|
|
29
|
+
const forms = [
|
|
30
|
+
secret,
|
|
31
|
+
JSON.stringify(secret).slice(1, -1),
|
|
32
|
+
encodeURIComponent(secret),
|
|
33
|
+
Buffer.from(secret, 'utf8').toString('base64'),
|
|
34
|
+
];
|
|
35
|
+
for (const form of forms) {
|
|
36
|
+
if (form.length >= MIN_FORM_LENGTH)
|
|
37
|
+
this.#forms.add(form);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Replace every tracked credential form and generic token pattern with `[scrubbed]`. */
|
|
41
|
+
scrub(text) {
|
|
42
|
+
let output = text;
|
|
43
|
+
for (const form of this.#forms) {
|
|
44
|
+
output = output.split(form).join('[scrubbed]');
|
|
45
|
+
}
|
|
46
|
+
for (const pattern of GENERIC_SECRET_PATTERNS) {
|
|
47
|
+
output = output.replace(new RegExp(pattern.source, 'g'), '[scrubbed]');
|
|
48
|
+
}
|
|
49
|
+
return output;
|
|
50
|
+
}
|
|
51
|
+
/** Return true when any tracked credential form or generic token pattern appears in the value. */
|
|
52
|
+
containsSecret(value) {
|
|
53
|
+
for (const form of this.#forms) {
|
|
54
|
+
if (value.includes(form))
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
for (const pattern of GENERIC_SECRET_PATTERNS) {
|
|
58
|
+
if (new RegExp(pattern.source).test(value))
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|