@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,394 @@
|
|
|
1
|
+
import type { Digest } from '@loopwright/core';
|
|
2
|
+
/** Error codes for every fail-closed decision-layer refusal, per the spec's error taxonomy. */
|
|
3
|
+
export type DecisionErrorCode = 'DECISION_POLICY_INVALID' | 'DECISION_DISCLOSURE_VIOLATION' | 'DECISION_STATE_TOO_LARGE' | 'DECISION_BATCH_SIZE_INVALID' | 'DECISION_PRIMITIVE_UNSUPPORTED' | 'DECISION_SCHEMA_INVALID' | 'DECISION_RESPONSE_INVALID' | 'DECISION_DEADLINE_EXCEEDED' | 'DECISION_TRANSPORT_ERROR' | 'DECISION_BUDGET_EXCEEDED' | 'DECISION_AUTHORITY_VIOLATION';
|
|
4
|
+
/** Fail-closed decision-layer error; `authorityViolation` is true only for authority refusals. */
|
|
5
|
+
export declare class DecisionError extends Error {
|
|
6
|
+
readonly code: DecisionErrorCode;
|
|
7
|
+
readonly authorityViolation: boolean;
|
|
8
|
+
constructor(code: DecisionErrorCode, message: string, authorityViolation?: boolean);
|
|
9
|
+
}
|
|
10
|
+
export type DecisionDisclosurePolicy = 'disabled' | 'repo-approved-redacted-evidence' | 'public-metadata-only';
|
|
11
|
+
export type DecisionFallbackUnavailableAction = 'blocked' | 'deterministic_default';
|
|
12
|
+
/** First-class System-One Decisions API provider profiles behind one canonical question domain (REVIEW-004). */
|
|
13
|
+
export type DecisionProviderKind = 'typesafe-jev' | 'openai-decisions' | 'startlux-decision' | 'microsoft-decision' | 'perplexity-decider' | 'cloudflare-clef' | 'liquid-d1';
|
|
14
|
+
/** Wire protocol families: keyed map questions/answers (`systemone`) vs positional arrays (`openai-decisions`). */
|
|
15
|
+
export type DecisionWireDialect = 'systemone' | 'openai-decisions';
|
|
16
|
+
export declare function getProviderDialect(provider: DecisionProviderKind): DecisionWireDialect;
|
|
17
|
+
export interface DecisionStartluxOptions {
|
|
18
|
+
readonly thinkMode?: 'instant' | 'auto';
|
|
19
|
+
readonly thinkBudget?: number;
|
|
20
|
+
readonly gate?: number;
|
|
21
|
+
readonly allowNone?: boolean;
|
|
22
|
+
readonly noneCheck?: boolean;
|
|
23
|
+
readonly noneProbabilityThreshold?: number;
|
|
24
|
+
}
|
|
25
|
+
/** Per-provider default endpoints, models, and API-key environment variable names (primary first). */
|
|
26
|
+
export declare const DECISION_PROVIDER_DEFAULTS: Readonly<Record<DecisionProviderKind, {
|
|
27
|
+
readonly endpoint: string;
|
|
28
|
+
readonly model: string;
|
|
29
|
+
}>>;
|
|
30
|
+
export declare const DECISION_PROVIDER_API_KEY_ENV: Readonly<Record<DecisionProviderKind, readonly string[]>>;
|
|
31
|
+
/** Repository operator's opt-in policy for System-One decision routing. */
|
|
32
|
+
export interface DecisionPolicyConfig {
|
|
33
|
+
readonly enabled: boolean;
|
|
34
|
+
readonly disclosurePolicy: DecisionDisclosurePolicy;
|
|
35
|
+
readonly minConfidence: number;
|
|
36
|
+
readonly confirmThreshold: number;
|
|
37
|
+
readonly hardDeadlineMs: number;
|
|
38
|
+
readonly maxAttempts: 1 | 2;
|
|
39
|
+
readonly fallbackRole: string | null;
|
|
40
|
+
readonly onFallbackUnavailable: DecisionFallbackUnavailableAction;
|
|
41
|
+
readonly provider: DecisionProviderKind;
|
|
42
|
+
readonly endpoint: string;
|
|
43
|
+
readonly model: string;
|
|
44
|
+
readonly startluxOptions: DecisionStartluxOptions | null;
|
|
45
|
+
readonly allowImages: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare const DEFAULT_DECISION_POLICY: DecisionPolicyConfig;
|
|
48
|
+
export declare const DECISION_ENDPOINT = "https://api.typesafe.ai/v1/systemone";
|
|
49
|
+
export declare const DECISION_POLICY_DOCUMENT_API_VERSION: "loopwright.dev/v1alpha1";
|
|
50
|
+
export declare const DECISION_POLICY_MAX_BYTES = 65536;
|
|
51
|
+
export declare const DECISION_MAX_QUESTIONS = 100;
|
|
52
|
+
export declare const DECISION_MAX_OPTIONS = 255;
|
|
53
|
+
export declare const DECISION_MIN_CRITERIA = 2;
|
|
54
|
+
export declare const DECISION_MAX_CRITERIA = 10;
|
|
55
|
+
export declare const DECISION_MAX_STATE_DEPTH = 16;
|
|
56
|
+
export declare const DECISION_MAX_STATE_BYTES = 65536;
|
|
57
|
+
export declare const DECISION_MAX_PUBLIC_METADATA_CHARS = 512;
|
|
58
|
+
export declare const DECISION_INPUT_COST_PER_MTOK_USD = 0.042;
|
|
59
|
+
export declare const DECISION_OUTPUT_COST_PER_MTOK_USD = 0;
|
|
60
|
+
export declare const DECISION_MAX_IMAGE_BASE64_CHARS = 6777216;
|
|
61
|
+
export declare const DECISION_MAX_IMAGES = 8;
|
|
62
|
+
export declare const DECISION_IMAGE_MEDIA_TYPES: readonly string[];
|
|
63
|
+
/** Redacted image input for multimodal decisions; only usable under `allowImages` with approved disclosure. */
|
|
64
|
+
export interface DecisionImageAsset {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly mediaType: 'image/png' | 'image/jpeg' | 'image/webp';
|
|
67
|
+
readonly data: string;
|
|
68
|
+
}
|
|
69
|
+
/** Structured question for the `choice` primitive; options are normalized to key-to-description records. */
|
|
70
|
+
export interface DecisionChoiceQuestion {
|
|
71
|
+
readonly type: 'choice';
|
|
72
|
+
readonly id: string;
|
|
73
|
+
readonly prompt: string;
|
|
74
|
+
readonly options: Readonly<Record<string, string>>;
|
|
75
|
+
readonly allowNone?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** Structured question for the `score` primitive; criteria run lowest (0) to highest (n - 1). */
|
|
78
|
+
export interface DecisionScoreQuestion {
|
|
79
|
+
readonly type: 'score';
|
|
80
|
+
readonly id: string;
|
|
81
|
+
readonly prompt: string;
|
|
82
|
+
readonly criteria: readonly string[];
|
|
83
|
+
}
|
|
84
|
+
/** Structured binary question for the `noul` primitive (`predicate` is accepted as an input alias);
|
|
85
|
+
* `threshold` defaults to `policy.minConfidence`. */
|
|
86
|
+
export interface DecisionNoulQuestion {
|
|
87
|
+
readonly type: 'noul';
|
|
88
|
+
readonly id: string;
|
|
89
|
+
readonly prompt: string;
|
|
90
|
+
readonly threshold?: number;
|
|
91
|
+
}
|
|
92
|
+
/** Structured bounding-box question; only valid under `allowImages` with a box-capable provider. */
|
|
93
|
+
export interface DecisionBoxQuestion {
|
|
94
|
+
readonly type: 'box';
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly prompt: string;
|
|
97
|
+
}
|
|
98
|
+
export type DecisionQuestion = DecisionChoiceQuestion | DecisionScoreQuestion | DecisionNoulQuestion | DecisionBoxQuestion;
|
|
99
|
+
/** Provider usage report (snake_case mirrors the wire payload). */
|
|
100
|
+
export interface DecisionProviderUsage {
|
|
101
|
+
readonly input_tokens: number;
|
|
102
|
+
readonly output_tokens: number;
|
|
103
|
+
}
|
|
104
|
+
/** Validated provider answer for a `choice` question; `choice: null` or a high `noneProbability` routes low. */
|
|
105
|
+
export interface DecisionChoiceOutput {
|
|
106
|
+
readonly type: 'choice';
|
|
107
|
+
readonly id: string;
|
|
108
|
+
readonly choice: string | null;
|
|
109
|
+
readonly confidence: number;
|
|
110
|
+
readonly probabilities: Readonly<Record<string, number>>;
|
|
111
|
+
readonly noneProbability?: number;
|
|
112
|
+
}
|
|
113
|
+
/** Validated provider answer for a `score` question. */
|
|
114
|
+
export interface DecisionScoreOutput {
|
|
115
|
+
readonly type: 'score';
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly score: number;
|
|
118
|
+
readonly normalizedScore: number;
|
|
119
|
+
readonly confidence: number;
|
|
120
|
+
readonly probabilities: readonly number[];
|
|
121
|
+
}
|
|
122
|
+
/** Validated provider answer for a `noul` question with derived confidence and affirmative boolean. */
|
|
123
|
+
export interface DecisionNoulOutput {
|
|
124
|
+
readonly type: 'noul';
|
|
125
|
+
readonly id: string;
|
|
126
|
+
readonly noul: number;
|
|
127
|
+
readonly confidence: number;
|
|
128
|
+
readonly threshold: number;
|
|
129
|
+
readonly affirmative: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface DecisionBoxCoordinates {
|
|
132
|
+
readonly top: number;
|
|
133
|
+
readonly bottom: number;
|
|
134
|
+
readonly left: number;
|
|
135
|
+
readonly right: number;
|
|
136
|
+
}
|
|
137
|
+
/** Validated provider answer for a `box` question with bounded [0, 1] coordinates. */
|
|
138
|
+
export interface DecisionBoxOutput {
|
|
139
|
+
readonly type: 'box';
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly box: DecisionBoxCoordinates;
|
|
142
|
+
readonly confidence: number;
|
|
143
|
+
}
|
|
144
|
+
export type DecisionQuestionOutput = DecisionChoiceOutput | DecisionScoreOutput | DecisionNoulOutput | DecisionBoxOutput;
|
|
145
|
+
export type DecisionConfidenceZone = 'high' | 'medium' | 'low';
|
|
146
|
+
export type DecisionZoneAction = 'accept_jev' | 'confirm_or_fallback' | 'fallback';
|
|
147
|
+
/** Where an accepted decision came from; heuristic results are computed without any transport call. */
|
|
148
|
+
export type DecisionSource = 'jev' | 'deterministic_fallback' | 'deterministic_heuristic' | 'user_override';
|
|
149
|
+
export type DecisionFallbackReason = 'policy_disabled' | 'deadline_exceeded' | 'transport_error' | 'budget_exceeded' | 'invalid_state' | 'disclosure_violation' | 'invalid_response' | 'unsupported_primitive' | 'low_confidence' | null;
|
|
150
|
+
export type DecisionMode = 'disabled' | 'jev' | 'confirm' | 'fallback';
|
|
151
|
+
export interface DecisionUsage {
|
|
152
|
+
readonly inputTokens: number;
|
|
153
|
+
readonly outputTokens: number;
|
|
154
|
+
}
|
|
155
|
+
/** One validated question answer plus its 3-zone classification. */
|
|
156
|
+
export interface DecisionQuestionOutcome {
|
|
157
|
+
readonly question: DecisionQuestion;
|
|
158
|
+
readonly output: DecisionQuestionOutput;
|
|
159
|
+
readonly zone: DecisionConfidenceZone;
|
|
160
|
+
readonly action: DecisionZoneAction;
|
|
161
|
+
}
|
|
162
|
+
/** Result of `evaluateDecision`: validated outcomes with the aggregate 3-zone routing decision. */
|
|
163
|
+
export interface DecisionEvaluation {
|
|
164
|
+
readonly mode: DecisionMode;
|
|
165
|
+
readonly source: DecisionSource;
|
|
166
|
+
readonly aggregateZone: DecisionConfidenceZone | null;
|
|
167
|
+
readonly aggregateAction: DecisionZoneAction | null;
|
|
168
|
+
readonly outcomes: readonly DecisionQuestionOutcome[];
|
|
169
|
+
readonly fallbackReason: DecisionFallbackReason;
|
|
170
|
+
readonly transportCalls: number;
|
|
171
|
+
readonly usage: DecisionUsage | null;
|
|
172
|
+
}
|
|
173
|
+
/** One speculative fan-out branch: a question plus its optional activation dependency. */
|
|
174
|
+
export interface DecisionFanOutBranch {
|
|
175
|
+
readonly branchId: string;
|
|
176
|
+
readonly question: DecisionQuestion;
|
|
177
|
+
readonly dependsOn: {
|
|
178
|
+
readonly questionId: string;
|
|
179
|
+
readonly value: string;
|
|
180
|
+
} | null;
|
|
181
|
+
}
|
|
182
|
+
/** Result of `evaluateSpeculativeFanOut`: active-path outcomes plus pruned-branch bookkeeping. */
|
|
183
|
+
export interface DecisionFanOutEvaluation extends DecisionEvaluation {
|
|
184
|
+
readonly totalQuestions: number;
|
|
185
|
+
readonly evaluatedBranchIds: readonly string[];
|
|
186
|
+
readonly ignoredBranchIds: readonly string[];
|
|
187
|
+
}
|
|
188
|
+
/** Pluggable transport request; `apiKey` is resolved and non-empty when the client dispatches. `headers`
|
|
189
|
+
* carries provider danger-zone flags such as `TypeSafe-Danger-Zone-Images: true`. */
|
|
190
|
+
export interface DecisionTransportRequest {
|
|
191
|
+
readonly endpoint: string;
|
|
192
|
+
readonly apiKey: string;
|
|
193
|
+
readonly body: string;
|
|
194
|
+
readonly signal: AbortSignal;
|
|
195
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
196
|
+
}
|
|
197
|
+
export interface DecisionTransportResponse {
|
|
198
|
+
readonly status: number;
|
|
199
|
+
readonly body: string;
|
|
200
|
+
}
|
|
201
|
+
export interface DecisionTransport {
|
|
202
|
+
send(request: DecisionTransportRequest): Promise<DecisionTransportResponse>;
|
|
203
|
+
}
|
|
204
|
+
export interface DecisionClientOptions {
|
|
205
|
+
readonly policy: DecisionPolicyConfig;
|
|
206
|
+
readonly transport?: DecisionTransport;
|
|
207
|
+
readonly sdkAdapter?: DecisionSdkAdapter;
|
|
208
|
+
readonly apiKey?: string;
|
|
209
|
+
readonly endpoint?: string;
|
|
210
|
+
readonly now?: () => number;
|
|
211
|
+
}
|
|
212
|
+
/** Structured request handed to an in-process provider SDK adapter (REVIEW-004). */
|
|
213
|
+
export interface DecisionSdkRequest {
|
|
214
|
+
readonly provider: DecisionProviderKind;
|
|
215
|
+
readonly dialect: DecisionWireDialect;
|
|
216
|
+
readonly model: string;
|
|
217
|
+
readonly endpoint: string;
|
|
218
|
+
readonly state: Record<string, unknown>;
|
|
219
|
+
readonly questions: readonly DecisionQuestion[];
|
|
220
|
+
readonly images?: readonly DecisionImageAsset[];
|
|
221
|
+
readonly wirePayload: Record<string, unknown>;
|
|
222
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
223
|
+
readonly signal: AbortSignal;
|
|
224
|
+
}
|
|
225
|
+
/** In-process bridge to an official provider SDK (`@typesafe-ai/sdk`, Vercel `experimental_decide`, `env.AI.run`, ...). */
|
|
226
|
+
export interface DecisionSdkAdapter {
|
|
227
|
+
evaluate(request: DecisionSdkRequest): Promise<unknown>;
|
|
228
|
+
}
|
|
229
|
+
export interface DecisionBudgetOptions {
|
|
230
|
+
readonly inputCostPerMtokUsd?: number;
|
|
231
|
+
readonly outputCostPerMtokUsd?: number;
|
|
232
|
+
readonly maxInputTokens?: number;
|
|
233
|
+
readonly maxCostUsd?: number;
|
|
234
|
+
}
|
|
235
|
+
export interface DecisionBudgetSnapshot {
|
|
236
|
+
readonly totalInputTokens: number;
|
|
237
|
+
readonly totalOutputTokens: number;
|
|
238
|
+
readonly unknownUsageCount: number;
|
|
239
|
+
readonly unknownUsageRetained: boolean;
|
|
240
|
+
readonly estimatedCostUsd: number;
|
|
241
|
+
}
|
|
242
|
+
/** Non-delegable authority intents that the decision layer must always refuse. */
|
|
243
|
+
export declare const DECISION_FORBIDDEN_AUTHORITY_INTENTS: readonly string[];
|
|
244
|
+
/** The only intents a Loopwright decision node may evaluate. */
|
|
245
|
+
export declare const DECISION_ALLOWED_AUTHORITY_INTENTS: readonly string[];
|
|
246
|
+
export type DecisionCapabilityTier = 'fast' | 'balanced' | 'strongest';
|
|
247
|
+
export interface DecisionTaskMetadata {
|
|
248
|
+
readonly taskId: string;
|
|
249
|
+
readonly taskKind: string;
|
|
250
|
+
readonly estimatedFilesCount: number;
|
|
251
|
+
readonly hasFailingTests: boolean;
|
|
252
|
+
readonly requiresArchitectureChange: boolean;
|
|
253
|
+
readonly candidateSkills: readonly string[];
|
|
254
|
+
readonly pinnedCapabilityTier?: DecisionCapabilityTier;
|
|
255
|
+
readonly pinnedRole?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface DecisionCapabilityResult {
|
|
258
|
+
readonly tier: DecisionCapabilityTier;
|
|
259
|
+
readonly role: string | null;
|
|
260
|
+
readonly skills: readonly string[];
|
|
261
|
+
readonly source: DecisionSource;
|
|
262
|
+
readonly zone: DecisionConfidenceZone | null;
|
|
263
|
+
readonly fallbackReason: DecisionFallbackReason;
|
|
264
|
+
readonly transportCalls: number;
|
|
265
|
+
readonly userOverridePreserved: boolean;
|
|
266
|
+
}
|
|
267
|
+
export interface DecisionCyclePrecheckInput {
|
|
268
|
+
readonly contractHash: Digest;
|
|
269
|
+
readonly expectedContractHash: Digest;
|
|
270
|
+
readonly baseRevision: string;
|
|
271
|
+
readonly expectedBaseRevision: string;
|
|
272
|
+
readonly leaseEpoch: string;
|
|
273
|
+
readonly expectedLeaseEpoch: string;
|
|
274
|
+
readonly leaseExpired: boolean;
|
|
275
|
+
readonly writableScopeViolations: readonly string[];
|
|
276
|
+
readonly remainingBudgetUsd: number;
|
|
277
|
+
readonly remainingCycles: number;
|
|
278
|
+
readonly contextUtilization: number;
|
|
279
|
+
readonly failedVerificationLoops: number;
|
|
280
|
+
}
|
|
281
|
+
export type DecisionCycleRoute = 'continue' | 'revise' | 'needs_review' | 'blocked';
|
|
282
|
+
export interface DecisionCycleAlignmentResult {
|
|
283
|
+
readonly route: DecisionCycleRoute;
|
|
284
|
+
readonly precheckPassed: boolean;
|
|
285
|
+
readonly source: DecisionSource;
|
|
286
|
+
readonly zone: DecisionConfidenceZone | null;
|
|
287
|
+
readonly fallbackReason: DecisionFallbackReason;
|
|
288
|
+
readonly transportCalls: number;
|
|
289
|
+
}
|
|
290
|
+
export interface DecisionSoftCompactionAdvisoryResult {
|
|
291
|
+
readonly advisoryDecision: 'compact' | 'defer' | null;
|
|
292
|
+
readonly hardTriggerActive: boolean;
|
|
293
|
+
readonly hardTriggerVetoRefused: boolean;
|
|
294
|
+
readonly source: DecisionSource;
|
|
295
|
+
readonly zone: DecisionConfidenceZone | null;
|
|
296
|
+
readonly fallbackReason: DecisionFallbackReason;
|
|
297
|
+
readonly transportCalls: number;
|
|
298
|
+
}
|
|
299
|
+
export type DecisionDiffTriageSeverity = 'blocking' | 'important' | 'nit';
|
|
300
|
+
export type DecisionDiffTriageRuleKind = 'noul' | 'score';
|
|
301
|
+
export interface DecisionDiffTriageRule {
|
|
302
|
+
readonly id: string;
|
|
303
|
+
readonly description: string;
|
|
304
|
+
readonly severity: DecisionDiffTriageSeverity;
|
|
305
|
+
readonly kind: DecisionDiffTriageRuleKind;
|
|
306
|
+
readonly threshold?: number;
|
|
307
|
+
}
|
|
308
|
+
export interface DecisionDiffSummary {
|
|
309
|
+
readonly changedFiles: readonly string[];
|
|
310
|
+
readonly addedLines: number;
|
|
311
|
+
readonly deletedLines: number;
|
|
312
|
+
readonly touchedPackages: readonly string[];
|
|
313
|
+
readonly redactedHunkSummaries: readonly string[];
|
|
314
|
+
}
|
|
315
|
+
export interface DecisionDiffTriageEscalation {
|
|
316
|
+
readonly ruleId: string;
|
|
317
|
+
readonly severity: DecisionDiffTriageSeverity;
|
|
318
|
+
readonly source: DecisionSource;
|
|
319
|
+
readonly advisoryOnly: true;
|
|
320
|
+
}
|
|
321
|
+
export interface DecisionDiffTriageResult {
|
|
322
|
+
readonly escalated: readonly DecisionDiffTriageEscalation[];
|
|
323
|
+
readonly verificationCertified: false;
|
|
324
|
+
readonly source: DecisionSource;
|
|
325
|
+
readonly zone: DecisionConfidenceZone | null;
|
|
326
|
+
readonly fallbackReason: DecisionFallbackReason;
|
|
327
|
+
readonly transportCalls: number;
|
|
328
|
+
}
|
|
329
|
+
export type DecisionBenchmarkArm = 'jev_off' | 'jev_on' | 'low_confidence_fallback';
|
|
330
|
+
export type DecisionBenchmarkCaseKind = 'capability_routing' | 'cycle_alignment' | 'soft_compaction' | 'diff_triage' | 'timeout_fallback' | 'authority_boundary';
|
|
331
|
+
/** Deterministic fixture answer for one benchmark question; `timeout` and `httpStatus` simulate failures. */
|
|
332
|
+
export type DecisionBenchmarkFixture = {
|
|
333
|
+
readonly choice?: string;
|
|
334
|
+
readonly noul?: number;
|
|
335
|
+
readonly score?: number;
|
|
336
|
+
readonly confidence?: number;
|
|
337
|
+
readonly noneProbability?: number;
|
|
338
|
+
} | {
|
|
339
|
+
readonly timeout: true;
|
|
340
|
+
} | {
|
|
341
|
+
readonly httpStatus: number;
|
|
342
|
+
};
|
|
343
|
+
export interface DecisionBenchmarkCase {
|
|
344
|
+
readonly id: string;
|
|
345
|
+
readonly kind: DecisionBenchmarkCaseKind;
|
|
346
|
+
readonly description: string;
|
|
347
|
+
readonly forbiddenAuthorityIntent?: string;
|
|
348
|
+
readonly task?: DecisionTaskMetadata;
|
|
349
|
+
readonly cycle?: DecisionCyclePrecheckInput;
|
|
350
|
+
readonly compaction?: {
|
|
351
|
+
readonly contextUtilization: number;
|
|
352
|
+
readonly failedVerificationLoops: number;
|
|
353
|
+
};
|
|
354
|
+
readonly diff?: {
|
|
355
|
+
readonly summary: DecisionDiffSummary;
|
|
356
|
+
readonly rules: readonly DecisionDiffTriageRule[];
|
|
357
|
+
};
|
|
358
|
+
readonly expected: {
|
|
359
|
+
readonly tier?: DecisionCapabilityTier;
|
|
360
|
+
readonly skills?: readonly string[];
|
|
361
|
+
readonly route?: DecisionCycleRoute;
|
|
362
|
+
readonly advisoryDecision?: 'compact' | 'defer' | null;
|
|
363
|
+
readonly escalatedRuleIds?: readonly string[];
|
|
364
|
+
};
|
|
365
|
+
readonly jevOnFixtures: Readonly<Record<string, DecisionBenchmarkFixture>>;
|
|
366
|
+
readonly fallbackFixtures: Readonly<Record<string, DecisionBenchmarkFixture>>;
|
|
367
|
+
}
|
|
368
|
+
export interface DecisionBenchmarkArmSummary {
|
|
369
|
+
readonly arm: DecisionBenchmarkArm;
|
|
370
|
+
readonly totalCases: number;
|
|
371
|
+
readonly passedCases: number;
|
|
372
|
+
readonly acceptancePassRate: number;
|
|
373
|
+
readonly falsePositiveEscalations: number;
|
|
374
|
+
readonly falseNegativeMisses: number;
|
|
375
|
+
readonly authorityViolationCount: number;
|
|
376
|
+
readonly fallbackCount: number;
|
|
377
|
+
readonly fallbackRate: number;
|
|
378
|
+
readonly totalInputTokens: number;
|
|
379
|
+
readonly totalOutputTokens: number;
|
|
380
|
+
readonly unknownUsageCount: number;
|
|
381
|
+
readonly estimatedCostUsd: number;
|
|
382
|
+
readonly wallTimeMs: number;
|
|
383
|
+
}
|
|
384
|
+
export interface DecisionBenchmarkReport {
|
|
385
|
+
readonly evidenceScope: 'controlled_offline_fixture';
|
|
386
|
+
readonly arms: readonly DecisionBenchmarkArmSummary[];
|
|
387
|
+
readonly jevOnVsOffDelta: {
|
|
388
|
+
readonly acceptancePassRateDelta: number;
|
|
389
|
+
readonly falsePositiveDelta: number;
|
|
390
|
+
readonly falseNegativeDelta: number;
|
|
391
|
+
readonly estimatedCostUsdDelta: number;
|
|
392
|
+
};
|
|
393
|
+
readonly recommendation: 'keep_optional_jev' | 'default_deterministic_only';
|
|
394
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** Fail-closed decision-layer error; `authorityViolation` is true only for authority refusals. */
|
|
2
|
+
export class DecisionError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
authorityViolation;
|
|
5
|
+
constructor(code, message, authorityViolation = false) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'DecisionError';
|
|
8
|
+
this.code = code;
|
|
9
|
+
this.authorityViolation = authorityViolation;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function getProviderDialect(provider) {
|
|
13
|
+
return provider === 'openai-decisions' ? 'openai-decisions' : 'systemone';
|
|
14
|
+
}
|
|
15
|
+
/** Per-provider default endpoints, models, and API-key environment variable names (primary first). */
|
|
16
|
+
export const DECISION_PROVIDER_DEFAULTS = Object.freeze({
|
|
17
|
+
'typesafe-jev': { endpoint: 'https://api.typesafe.ai/v1/systemone', model: 'jev-latest' },
|
|
18
|
+
'openai-decisions': { endpoint: 'https://api.openai.com/v1/decisions', model: 'gpt-6-luna' },
|
|
19
|
+
'startlux-decision': { endpoint: 'https://api.bamboonode.dev/v1/systemone', model: 'startlux-decision-27b-autothink' },
|
|
20
|
+
'microsoft-decision': { endpoint: 'https://models.inference.ai.azure.com/v1/systemone', model: 'microsoft-decision-1' },
|
|
21
|
+
'perplexity-decider': { endpoint: 'https://api.perplexity.ai/v1/decisions', model: 'pplx-decider-v1.2' },
|
|
22
|
+
'cloudflare-clef': { endpoint: 'https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/run/@cf/cloudflare/clef', model: '@cf/cloudflare/clef' },
|
|
23
|
+
'liquid-d1': { endpoint: 'https://api.liquid.ai/decisions/v1/systemone', model: 'liquid/d1-ultra' },
|
|
24
|
+
});
|
|
25
|
+
export const DECISION_PROVIDER_API_KEY_ENV = Object.freeze({
|
|
26
|
+
'typesafe-jev': Object.freeze(['TYPESAFE_API_KEY']),
|
|
27
|
+
'openai-decisions': Object.freeze(['OPENAI_API_KEY']),
|
|
28
|
+
'startlux-decision': Object.freeze(['STARTLUX_API_KEY']),
|
|
29
|
+
'microsoft-decision': Object.freeze(['MICROSOFT_DECISION_API_KEY', 'AZURE_API_KEY']),
|
|
30
|
+
'perplexity-decider': Object.freeze(['PERPLEXITY_API_KEY']),
|
|
31
|
+
'cloudflare-clef': Object.freeze(['CLOUDFLARE_API_TOKEN']),
|
|
32
|
+
'liquid-d1': Object.freeze(['LIQUID_API_KEY']),
|
|
33
|
+
});
|
|
34
|
+
export const DEFAULT_DECISION_POLICY = Object.freeze({
|
|
35
|
+
enabled: false,
|
|
36
|
+
disclosurePolicy: 'disabled',
|
|
37
|
+
minConfidence: 0.8,
|
|
38
|
+
confirmThreshold: 0.6,
|
|
39
|
+
hardDeadlineMs: 5000,
|
|
40
|
+
maxAttempts: 1,
|
|
41
|
+
fallbackRole: 'deterministic',
|
|
42
|
+
onFallbackUnavailable: 'blocked',
|
|
43
|
+
provider: 'typesafe-jev',
|
|
44
|
+
endpoint: 'https://api.typesafe.ai/v1/systemone',
|
|
45
|
+
model: 'jev-latest',
|
|
46
|
+
startluxOptions: null,
|
|
47
|
+
allowImages: false,
|
|
48
|
+
});
|
|
49
|
+
export const DECISION_ENDPOINT = 'https://api.typesafe.ai/v1/systemone';
|
|
50
|
+
export const DECISION_POLICY_DOCUMENT_API_VERSION = 'loopwright.dev/v1alpha1';
|
|
51
|
+
export const DECISION_POLICY_MAX_BYTES = 65_536;
|
|
52
|
+
export const DECISION_MAX_QUESTIONS = 100;
|
|
53
|
+
export const DECISION_MAX_OPTIONS = 255;
|
|
54
|
+
export const DECISION_MIN_CRITERIA = 2;
|
|
55
|
+
export const DECISION_MAX_CRITERIA = 10;
|
|
56
|
+
export const DECISION_MAX_STATE_DEPTH = 16;
|
|
57
|
+
export const DECISION_MAX_STATE_BYTES = 65_536;
|
|
58
|
+
export const DECISION_MAX_PUBLIC_METADATA_CHARS = 512;
|
|
59
|
+
export const DECISION_INPUT_COST_PER_MTOK_USD = 0.042;
|
|
60
|
+
export const DECISION_OUTPUT_COST_PER_MTOK_USD = 0;
|
|
61
|
+
export const DECISION_MAX_IMAGE_BASE64_CHARS = 6_777_216; // ~5 MiB decoded per asset
|
|
62
|
+
export const DECISION_MAX_IMAGES = 8;
|
|
63
|
+
export const DECISION_IMAGE_MEDIA_TYPES = Object.freeze(['image/png', 'image/jpeg', 'image/webp']);
|
|
64
|
+
/** Non-delegable authority intents that the decision layer must always refuse. */
|
|
65
|
+
export const DECISION_FORBIDDEN_AUTHORITY_INTENTS = Object.freeze([
|
|
66
|
+
'grant_execution_authority',
|
|
67
|
+
'certify_verification_evidence',
|
|
68
|
+
'skip_adversarial_review',
|
|
69
|
+
'approve_external_gate',
|
|
70
|
+
'override_pinned_model',
|
|
71
|
+
'veto_hard_compaction',
|
|
72
|
+
]);
|
|
73
|
+
/** The only intents a Loopwright decision node may evaluate. */
|
|
74
|
+
export const DECISION_ALLOWED_AUTHORITY_INTENTS = Object.freeze([
|
|
75
|
+
'route_capability_tier',
|
|
76
|
+
'select_skills',
|
|
77
|
+
'evaluate_cycle_alignment',
|
|
78
|
+
'advise_soft_compaction',
|
|
79
|
+
'triage_candidate_diff',
|
|
80
|
+
]);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type DecisionTransport } from '@loopwright/decisions';
|
|
2
|
+
import { boundUtf8Lines, buildDefaultAuthorPrompt, createTaskpackDecisionPort, insideRoot, mergeMcpServerDeclarations, parseMcpServersOverride, type BuildDefaultAuthorPromptOptions, type CreateTaskpackDecisionPortOptions, type SuiteMatrixCell, type SuiteResolutionResult } from '@loopwright/taskpack';
|
|
3
|
+
import { type RunReportInput } from './output-format.js';
|
|
4
|
+
import { SecretScrubber } from './token-broker.js';
|
|
5
|
+
import { type ActionEntrypointInput, type ActionEntrypointResult, type TaskpackCommentCommand, type TaskpackManifest, type TurnkeyMemorySummary } from './types.js';
|
|
6
|
+
export { boundUtf8Lines, buildDefaultAuthorPrompt, createTaskpackDecisionPort, insideRoot, mergeMcpServerDeclarations, parseMcpServersOverride, type BuildDefaultAuthorPromptOptions, type CreateTaskpackDecisionPortOptions, };
|
|
7
|
+
export interface SuiteActionEntrypointResult {
|
|
8
|
+
readonly kind: 'eligible' | 'deferred' | 'ignored';
|
|
9
|
+
readonly disposition: 'eligible' | 'deferred' | 'ignored';
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
readonly detail?: string | undefined;
|
|
12
|
+
readonly suite: SuiteResolutionResult;
|
|
13
|
+
readonly matrix: {
|
|
14
|
+
readonly include: readonly SuiteMatrixCell[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type TurnkeyActionEntrypointResult = ActionEntrypointResult | SuiteActionEntrypointResult;
|
|
18
|
+
export declare function serializeActionResultSummary(result: TurnkeyActionEntrypointResult, scrubber: SecretScrubber): string;
|
|
19
|
+
export interface TurnkeyActionExecutionReport {
|
|
20
|
+
readonly manifest: TaskpackManifest | null;
|
|
21
|
+
readonly report: RunReportInput;
|
|
22
|
+
readonly memory?: TurnkeyMemorySummary | undefined;
|
|
23
|
+
readonly scrubber: SecretScrubber;
|
|
24
|
+
}
|
|
25
|
+
export interface TurnkeyActionEntrypointInput extends ActionEntrypointInput {
|
|
26
|
+
readonly suitePath?: string | undefined;
|
|
27
|
+
readonly domain?: string | undefined;
|
|
28
|
+
readonly resolveSuiteOnly?: boolean | undefined;
|
|
29
|
+
readonly schedule?: string | undefined;
|
|
30
|
+
readonly githubOutputPath?: string | undefined;
|
|
31
|
+
readonly turnkey?: boolean | undefined;
|
|
32
|
+
readonly repositoryId?: number | undefined;
|
|
33
|
+
readonly installationId?: number | undefined;
|
|
34
|
+
readonly githubApiBaseUrl?: string | undefined;
|
|
35
|
+
readonly githubToken?: string | undefined;
|
|
36
|
+
readonly githubAppId?: string | number | undefined;
|
|
37
|
+
readonly githubAppPrivateKey?: string | undefined;
|
|
38
|
+
readonly githubAppInstallationId?: string | number | undefined;
|
|
39
|
+
readonly upstreamRecordsJson?: string | undefined;
|
|
40
|
+
readonly mcpServersJson?: string | undefined;
|
|
41
|
+
readonly gitRemoteUrl?: string | undefined;
|
|
42
|
+
readonly managedPrMatchesDiscoveredState?: boolean | undefined;
|
|
43
|
+
readonly output?: string | undefined;
|
|
44
|
+
readonly decisionTransport?: DecisionTransport | undefined;
|
|
45
|
+
readonly decisionApiKey?: string | undefined;
|
|
46
|
+
readonly progressSink?: ((line: string) => void) | undefined;
|
|
47
|
+
readonly onTurnkeyReport?: ((info: TurnkeyActionExecutionReport) => void) | undefined;
|
|
48
|
+
}
|
|
49
|
+
interface CommentEvaluation {
|
|
50
|
+
readonly command: TaskpackCommentCommand;
|
|
51
|
+
readonly guidance: string;
|
|
52
|
+
readonly login: string;
|
|
53
|
+
readonly authorAssociation: string;
|
|
54
|
+
readonly commandId: number;
|
|
55
|
+
readonly headSha: string;
|
|
56
|
+
}
|
|
57
|
+
export interface CommentEvaluationOptions {
|
|
58
|
+
readonly eventName: string;
|
|
59
|
+
readonly commentPrefixes: readonly string[];
|
|
60
|
+
readonly commentCommands: readonly TaskpackCommentCommand[];
|
|
61
|
+
readonly operatorAllowlist?: readonly string[] | undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Evaluate a comment/review event payload under the manifest trigger configuration. Bot authors (by
|
|
65
|
+
* `user.type` or a `[bot]` login suffix), non-created/non-submitted actions, comments outside pull
|
|
66
|
+
* requests, unknown prefixes, and commands outside the configured set are ignored; authorized actors with
|
|
67
|
+
* valid guidance yield a bound evaluation.
|
|
68
|
+
*/
|
|
69
|
+
export declare function evaluateCommentPayload(payload: unknown, options: CommentEvaluationOptions): CommentEvaluation | {
|
|
70
|
+
readonly blockedReason: string;
|
|
71
|
+
readonly detail?: string;
|
|
72
|
+
} | {
|
|
73
|
+
readonly ignoredReason: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Run the complete offline-testable Action flow: qualify the host, refuse interactive MCP authentication,
|
|
77
|
+
* load the target manifest (or multi-domain `TaskpackSuite`) under `policyProfile: 'github'`, validate
|
|
78
|
+
* `spec.triggers` strictly before preflight or upstream discovery, run isolated 3-way baseline alignment
|
|
79
|
+
* strictly before probing model candidates, compile, write trusted artifacts outside the checkout, scrub
|
|
80
|
+
* them, and optionally delegate execution with fresh-session fallback across remaining healthy model candidates.
|
|
81
|
+
*/
|
|
82
|
+
export declare function runGitHubActionEntrypoint(input: TurnkeyActionEntrypointInput & {
|
|
83
|
+
readonly suitePath?: undefined;
|
|
84
|
+
readonly resolveSuiteOnly?: false | undefined;
|
|
85
|
+
}): Promise<ActionEntrypointResult>;
|
|
86
|
+
export declare function runGitHubActionEntrypoint(input: TurnkeyActionEntrypointInput): Promise<TurnkeyActionEntrypointResult>;
|
|
87
|
+
/** Minimal GitHub Actions CLI shim: map INPUT_* environment variables and run the entrypoint. */
|
|
88
|
+
export declare function runActionCli(env?: NodeJS.ProcessEnv, options?: {
|
|
89
|
+
readonly openHostSessionAdapter?: ActionEntrypointInput['openHostSessionAdapter'];
|
|
90
|
+
}): Promise<number>;
|