@sema-ai/core 1.275.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5433 -0
- package/LICENSE +27 -0
- package/NOTICE.md +30 -0
- package/README.md +1040 -0
- package/dist/agents/agent-definition.d.ts +10 -0
- package/dist/agents/agent-definition.d.ts.map +1 -0
- package/dist/agents/agent-definition.js +18 -0
- package/dist/agents/agent-definition.js.map +1 -0
- package/dist/agents/builtin-agents.d.ts +69 -0
- package/dist/agents/builtin-agents.d.ts.map +1 -0
- package/dist/agents/builtin-agents.js +177 -0
- package/dist/agents/builtin-agents.js.map +1 -0
- package/dist/agents/cascade.d.ts +101 -0
- package/dist/agents/cascade.d.ts.map +1 -0
- package/dist/agents/cascade.js +189 -0
- package/dist/agents/cascade.js.map +1 -0
- package/dist/agents/observer.d.ts +209 -0
- package/dist/agents/observer.d.ts.map +1 -0
- package/dist/agents/observer.js +495 -0
- package/dist/agents/observer.js.map +1 -0
- package/dist/agents/repair-loop.d.ts +236 -0
- package/dist/agents/repair-loop.d.ts.map +1 -0
- package/dist/agents/repair-loop.js +293 -0
- package/dist/agents/repair-loop.js.map +1 -0
- package/dist/agents/session-util.d.ts +8 -0
- package/dist/agents/session-util.d.ts.map +1 -0
- package/dist/agents/session-util.js +9 -0
- package/dist/agents/session-util.js.map +1 -0
- package/dist/agents/subagent-steps.d.ts +93 -0
- package/dist/agents/subagent-steps.d.ts.map +1 -0
- package/dist/agents/subagent-steps.js +206 -0
- package/dist/agents/subagent-steps.js.map +1 -0
- package/dist/agents/subagent.d.ts +441 -0
- package/dist/agents/subagent.d.ts.map +1 -0
- package/dist/agents/subagent.js +2492 -0
- package/dist/agents/subagent.js.map +1 -0
- package/dist/agents/suspend-guard.d.ts +35 -0
- package/dist/agents/suspend-guard.d.ts.map +1 -0
- package/dist/agents/suspend-guard.js +48 -0
- package/dist/agents/suspend-guard.js.map +1 -0
- package/dist/agents/teacher.d.ts +137 -0
- package/dist/agents/teacher.d.ts.map +1 -0
- package/dist/agents/teacher.js +575 -0
- package/dist/agents/teacher.js.map +1 -0
- package/dist/agents/team.d.ts +211 -0
- package/dist/agents/team.d.ts.map +1 -0
- package/dist/agents/team.js +293 -0
- package/dist/agents/team.js.map +1 -0
- package/dist/agents/tool-filter.d.ts +29 -0
- package/dist/agents/tool-filter.d.ts.map +1 -0
- package/dist/agents/tool-filter.js +50 -0
- package/dist/agents/tool-filter.js.map +1 -0
- package/dist/agents/verify.d.ts +177 -0
- package/dist/agents/verify.d.ts.map +1 -0
- package/dist/agents/verify.js +305 -0
- package/dist/agents/verify.js.map +1 -0
- package/dist/bench/metrics.d.ts +714 -0
- package/dist/bench/metrics.d.ts.map +1 -0
- package/dist/bench/metrics.js +618 -0
- package/dist/bench/metrics.js.map +1 -0
- package/dist/bin/sema-tb.d.ts +3 -0
- package/dist/bin/sema-tb.d.ts.map +1 -0
- package/dist/bin/sema-tb.js +516 -0
- package/dist/bin/sema-tb.js.map +1 -0
- package/dist/bin/tb-env.d.ts +13 -0
- package/dist/bin/tb-env.d.ts.map +1 -0
- package/dist/bin/tb-env.js +26 -0
- package/dist/bin/tb-env.js.map +1 -0
- package/dist/brain/anthropic.d.ts +46 -0
- package/dist/brain/anthropic.d.ts.map +1 -0
- package/dist/brain/anthropic.js +830 -0
- package/dist/brain/anthropic.js.map +1 -0
- package/dist/brain/circuit-breaker.d.ts +46 -0
- package/dist/brain/circuit-breaker.d.ts.map +1 -0
- package/dist/brain/circuit-breaker.js +173 -0
- package/dist/brain/circuit-breaker.js.map +1 -0
- package/dist/brain/degrading.d.ts +98 -0
- package/dist/brain/degrading.d.ts.map +1 -0
- package/dist/brain/degrading.js +249 -0
- package/dist/brain/degrading.js.map +1 -0
- package/dist/brain/errors.d.ts +31 -0
- package/dist/brain/errors.d.ts.map +1 -0
- package/dist/brain/errors.js +58 -0
- package/dist/brain/errors.js.map +1 -0
- package/dist/brain/failover.d.ts +18 -0
- package/dist/brain/failover.d.ts.map +1 -0
- package/dist/brain/failover.js +118 -0
- package/dist/brain/failover.js.map +1 -0
- package/dist/brain/model-presets.d.ts +36 -0
- package/dist/brain/model-presets.d.ts.map +1 -0
- package/dist/brain/model-presets.js +54 -0
- package/dist/brain/model-presets.js.map +1 -0
- package/dist/brain/openai.d.ts +43 -0
- package/dist/brain/openai.d.ts.map +1 -0
- package/dist/brain/openai.js +784 -0
- package/dist/brain/openai.js.map +1 -0
- package/dist/brain/reasoning.d.ts +138 -0
- package/dist/brain/reasoning.d.ts.map +1 -0
- package/dist/brain/reasoning.js +146 -0
- package/dist/brain/reasoning.js.map +1 -0
- package/dist/brain/repetition.d.ts +60 -0
- package/dist/brain/repetition.d.ts.map +1 -0
- package/dist/brain/repetition.js +121 -0
- package/dist/brain/repetition.js.map +1 -0
- package/dist/brain/request-params.d.ts +29 -0
- package/dist/brain/request-params.d.ts.map +1 -0
- package/dist/brain/request-params.js +78 -0
- package/dist/brain/request-params.js.map +1 -0
- package/dist/brain/retry.d.ts +18 -0
- package/dist/brain/retry.d.ts.map +1 -0
- package/dist/brain/retry.js +42 -0
- package/dist/brain/retry.js.map +1 -0
- package/dist/brain/routing.d.ts +19 -0
- package/dist/brain/routing.d.ts.map +1 -0
- package/dist/brain/routing.js +44 -0
- package/dist/brain/routing.js.map +1 -0
- package/dist/brain/status-sink.d.ts +46 -0
- package/dist/brain/status-sink.d.ts.map +1 -0
- package/dist/brain/status-sink.js +36 -0
- package/dist/brain/status-sink.js.map +1 -0
- package/dist/brain/stream-engine.d.ts +85 -0
- package/dist/brain/stream-engine.d.ts.map +1 -0
- package/dist/brain/stream-engine.js +391 -0
- package/dist/brain/stream-engine.js.map +1 -0
- package/dist/brain/timeout.d.ts +44 -0
- package/dist/brain/timeout.d.ts.map +1 -0
- package/dist/brain/timeout.js +41 -0
- package/dist/brain/timeout.js.map +1 -0
- package/dist/brain/tool-call-repair.d.ts +15 -0
- package/dist/brain/tool-call-repair.d.ts.map +1 -0
- package/dist/brain/tool-call-repair.js +67 -0
- package/dist/brain/tool-call-repair.js.map +1 -0
- package/dist/brain/walltime.d.ts +14 -0
- package/dist/brain/walltime.d.ts.map +1 -0
- package/dist/brain/walltime.js +14 -0
- package/dist/brain/walltime.js.map +1 -0
- package/dist/core/arg-summary.d.ts +19 -0
- package/dist/core/arg-summary.d.ts.map +1 -0
- package/dist/core/arg-summary.js +96 -0
- package/dist/core/arg-summary.js.map +1 -0
- package/dist/core/ask-question.d.ts +113 -0
- package/dist/core/ask-question.d.ts.map +1 -0
- package/dist/core/ask-question.js +246 -0
- package/dist/core/ask-question.js.map +1 -0
- package/dist/core/auto-compaction.d.ts +341 -0
- package/dist/core/auto-compaction.d.ts.map +1 -0
- package/dist/core/auto-compaction.js +495 -0
- package/dist/core/auto-compaction.js.map +1 -0
- package/dist/core/auto-promote.d.ts +126 -0
- package/dist/core/auto-promote.d.ts.map +1 -0
- package/dist/core/auto-promote.js +171 -0
- package/dist/core/auto-promote.js.map +1 -0
- package/dist/core/background-shell.d.ts +128 -0
- package/dist/core/background-shell.d.ts.map +1 -0
- package/dist/core/background-shell.js +42 -0
- package/dist/core/background-shell.js.map +1 -0
- package/dist/core/cache-break-detector.d.ts +63 -0
- package/dist/core/cache-break-detector.d.ts.map +1 -0
- package/dist/core/cache-break-detector.js +0 -0
- package/dist/core/cache-break-detector.js.map +1 -0
- package/dist/core/canonical-json.d.ts +45 -0
- package/dist/core/canonical-json.d.ts.map +1 -0
- package/dist/core/canonical-json.js +132 -0
- package/dist/core/canonical-json.js.map +1 -0
- package/dist/core/checkpoint-store.d.ts +1101 -0
- package/dist/core/checkpoint-store.d.ts.map +1 -0
- package/dist/core/checkpoint-store.js +514 -0
- package/dist/core/checkpoint-store.js.map +1 -0
- package/dist/core/consolidate-scope.d.ts +94 -0
- package/dist/core/consolidate-scope.d.ts.map +1 -0
- package/dist/core/consolidate-scope.js +158 -0
- package/dist/core/consolidate-scope.js.map +1 -0
- package/dist/core/context-edit.d.ts +82 -0
- package/dist/core/context-edit.d.ts.map +1 -0
- package/dist/core/context-edit.js +149 -0
- package/dist/core/context-edit.js.map +1 -0
- package/dist/core/context-guard.d.ts +43 -0
- package/dist/core/context-guard.d.ts.map +1 -0
- package/dist/core/context-guard.js +171 -0
- package/dist/core/context-guard.js.map +1 -0
- package/dist/core/dynamic-recall.d.ts +100 -0
- package/dist/core/dynamic-recall.d.ts.map +1 -0
- package/dist/core/dynamic-recall.js +108 -0
- package/dist/core/dynamic-recall.js.map +1 -0
- package/dist/core/exec-gate.d.ts +74 -0
- package/dist/core/exec-gate.d.ts.map +1 -0
- package/dist/core/exec-gate.js +143 -0
- package/dist/core/exec-gate.js.map +1 -0
- package/dist/core/exec-output-tail.d.ts +37 -0
- package/dist/core/exec-output-tail.d.ts.map +1 -0
- package/dist/core/exec-output-tail.js +63 -0
- package/dist/core/exec-output-tail.js.map +1 -0
- package/dist/core/file-snapshot-store.d.ts +137 -0
- package/dist/core/file-snapshot-store.d.ts.map +1 -0
- package/dist/core/file-snapshot-store.js +319 -0
- package/dist/core/file-snapshot-store.js.map +1 -0
- package/dist/core/git-worktree-env.d.ts +41 -0
- package/dist/core/git-worktree-env.d.ts.map +1 -0
- package/dist/core/git-worktree-env.js +64 -0
- package/dist/core/git-worktree-env.js.map +1 -0
- package/dist/core/hooks.d.ts +372 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +269 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/lsp-diagnostics.d.ts +74 -0
- package/dist/core/lsp-diagnostics.d.ts.map +1 -0
- package/dist/core/lsp-diagnostics.js +125 -0
- package/dist/core/lsp-diagnostics.js.map +1 -0
- package/dist/core/lsp-protocol.d.ts +28 -0
- package/dist/core/lsp-protocol.d.ts.map +1 -0
- package/dist/core/lsp-protocol.js +179 -0
- package/dist/core/lsp-protocol.js.map +1 -0
- package/dist/core/lsp-session.d.ts +56 -0
- package/dist/core/lsp-session.d.ts.map +1 -0
- package/dist/core/lsp-session.js +185 -0
- package/dist/core/lsp-session.js.map +1 -0
- package/dist/core/lsp.d.ts +132 -0
- package/dist/core/lsp.d.ts.map +1 -0
- package/dist/core/lsp.js +147 -0
- package/dist/core/lsp.js.map +1 -0
- package/dist/core/mcp.d.ts +294 -0
- package/dist/core/mcp.d.ts.map +1 -0
- package/dist/core/mcp.js +992 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/media-byte-cap.d.ts +34 -0
- package/dist/core/media-byte-cap.d.ts.map +1 -0
- package/dist/core/media-byte-cap.js +76 -0
- package/dist/core/media-byte-cap.js.map +1 -0
- package/dist/core/memory-engine/data-plane.d.ts +103 -0
- package/dist/core/memory-engine/data-plane.d.ts.map +1 -0
- package/dist/core/memory-engine/data-plane.js +272 -0
- package/dist/core/memory-engine/data-plane.js.map +1 -0
- package/dist/core/memory-engine/dual-root.d.ts +40 -0
- package/dist/core/memory-engine/dual-root.d.ts.map +1 -0
- package/dist/core/memory-engine/dual-root.js +95 -0
- package/dist/core/memory-engine/dual-root.js.map +1 -0
- package/dist/core/memory-engine/engine.d.ts +161 -0
- package/dist/core/memory-engine/engine.d.ts.map +1 -0
- package/dist/core/memory-engine/engine.js +1110 -0
- package/dist/core/memory-engine/engine.js.map +1 -0
- package/dist/core/memory-engine/file-backend.d.ts +162 -0
- package/dist/core/memory-engine/file-backend.d.ts.map +1 -0
- package/dist/core/memory-engine/file-backend.js +948 -0
- package/dist/core/memory-engine/file-backend.js.map +1 -0
- package/dist/core/memory-engine/frontmatter.d.ts +24 -0
- package/dist/core/memory-engine/frontmatter.d.ts.map +1 -0
- package/dist/core/memory-engine/frontmatter.js +135 -0
- package/dist/core/memory-engine/frontmatter.js.map +1 -0
- package/dist/core/memory-engine/index.d.ts +13 -0
- package/dist/core/memory-engine/index.d.ts.map +1 -0
- package/dist/core/memory-engine/index.js +28 -0
- package/dist/core/memory-engine/index.js.map +1 -0
- package/dist/core/memory-engine/layout.d.ts +123 -0
- package/dist/core/memory-engine/layout.d.ts.map +1 -0
- package/dist/core/memory-engine/layout.js +643 -0
- package/dist/core/memory-engine/layout.js.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts +22 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.js +271 -0
- package/dist/core/memory-engine/memory-backend-contract.js.map +1 -0
- package/dist/core/memory-engine/migrate.d.ts +17 -0
- package/dist/core/memory-engine/migrate.d.ts.map +1 -0
- package/dist/core/memory-engine/migrate.js +35 -0
- package/dist/core/memory-engine/migrate.js.map +1 -0
- package/dist/core/memory-engine/scan.d.ts +20 -0
- package/dist/core/memory-engine/scan.d.ts.map +1 -0
- package/dist/core/memory-engine/scan.js +84 -0
- package/dist/core/memory-engine/scan.js.map +1 -0
- package/dist/core/memory-engine/scope-contract.d.ts +104 -0
- package/dist/core/memory-engine/scope-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/scope-contract.js +288 -0
- package/dist/core/memory-engine/scope-contract.js.map +1 -0
- package/dist/core/memory-engine/sync-client.d.ts +100 -0
- package/dist/core/memory-engine/sync-client.d.ts.map +1 -0
- package/dist/core/memory-engine/sync-client.js +328 -0
- package/dist/core/memory-engine/sync-client.js.map +1 -0
- package/dist/core/memory-engine/sync.d.ts +97 -0
- package/dist/core/memory-engine/sync.d.ts.map +1 -0
- package/dist/core/memory-engine/sync.js +91 -0
- package/dist/core/memory-engine/sync.js.map +1 -0
- package/dist/core/memory-engine/types.d.ts +279 -0
- package/dist/core/memory-engine/types.d.ts.map +1 -0
- package/dist/core/memory-engine/types.js +9 -0
- package/dist/core/memory-engine/types.js.map +1 -0
- package/dist/core/memory-recall.d.ts +261 -0
- package/dist/core/memory-recall.d.ts.map +1 -0
- package/dist/core/memory-recall.js +600 -0
- package/dist/core/memory-recall.js.map +1 -0
- package/dist/core/memory-vector.d.ts +24 -0
- package/dist/core/memory-vector.d.ts.map +1 -0
- package/dist/core/memory-vector.js +51 -0
- package/dist/core/memory-vector.js.map +1 -0
- package/dist/core/memory.d.ts +502 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +881 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/message-utils.d.ts +7 -0
- package/dist/core/message-utils.d.ts.map +1 -0
- package/dist/core/message-utils.js +10 -0
- package/dist/core/message-utils.js.map +1 -0
- package/dist/core/oracle-isolation.d.ts +85 -0
- package/dist/core/oracle-isolation.d.ts.map +1 -0
- package/dist/core/oracle-isolation.js +121 -0
- package/dist/core/oracle-isolation.js.map +1 -0
- package/dist/core/permission-rules.d.ts +102 -0
- package/dist/core/permission-rules.d.ts.map +1 -0
- package/dist/core/permission-rules.js +357 -0
- package/dist/core/permission-rules.js.map +1 -0
- package/dist/core/present-plan-tool.d.ts +28 -0
- package/dist/core/present-plan-tool.d.ts.map +1 -0
- package/dist/core/present-plan-tool.js +119 -0
- package/dist/core/present-plan-tool.js.map +1 -0
- package/dist/core/pricing.d.ts +48 -0
- package/dist/core/pricing.d.ts.map +1 -0
- package/dist/core/pricing.js +46 -0
- package/dist/core/pricing.js.map +1 -0
- package/dist/core/property-harness.d.ts +126 -0
- package/dist/core/property-harness.d.ts.map +1 -0
- package/dist/core/property-harness.js +192 -0
- package/dist/core/property-harness.js.map +1 -0
- package/dist/core/push-queue.d.ts +10 -0
- package/dist/core/push-queue.d.ts.map +1 -0
- package/dist/core/push-queue.js +42 -0
- package/dist/core/push-queue.js.map +1 -0
- package/dist/core/remote-env.d.ts +432 -0
- package/dist/core/remote-env.d.ts.map +1 -0
- package/dist/core/remote-env.js +77 -0
- package/dist/core/remote-env.js.map +1 -0
- package/dist/core/roles.d.ts +74 -0
- package/dist/core/roles.d.ts.map +1 -0
- package/dist/core/roles.js +272 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/runner/active-skill-scope.d.ts +64 -0
- package/dist/core/runner/active-skill-scope.d.ts.map +1 -0
- package/dist/core/runner/active-skill-scope.js +197 -0
- package/dist/core/runner/active-skill-scope.js.map +1 -0
- package/dist/core/runner/assemble-result.d.ts +191 -0
- package/dist/core/runner/assemble-result.d.ts.map +1 -0
- package/dist/core/runner/assemble-result.js +250 -0
- package/dist/core/runner/assemble-result.js.map +1 -0
- package/dist/core/runner/call-cap.d.ts +130 -0
- package/dist/core/runner/call-cap.d.ts.map +1 -0
- package/dist/core/runner/call-cap.js +151 -0
- package/dist/core/runner/call-cap.js.map +1 -0
- package/dist/core/runner/grounding-signal.d.ts +12 -0
- package/dist/core/runner/grounding-signal.d.ts.map +1 -0
- package/dist/core/runner/grounding-signal.js +94 -0
- package/dist/core/runner/grounding-signal.js.map +1 -0
- package/dist/core/runner/image.d.ts +23 -0
- package/dist/core/runner/image.d.ts.map +1 -0
- package/dist/core/runner/image.js +151 -0
- package/dist/core/runner/image.js.map +1 -0
- package/dist/core/runner/memory-consolidation.d.ts +112 -0
- package/dist/core/runner/memory-consolidation.d.ts.map +1 -0
- package/dist/core/runner/memory-consolidation.js +372 -0
- package/dist/core/runner/memory-consolidation.js.map +1 -0
- package/dist/core/runner/prepare-task.d.ts +583 -0
- package/dist/core/runner/prepare-task.d.ts.map +1 -0
- package/dist/core/runner/prepare-task.js +3612 -0
- package/dist/core/runner/prepare-task.js.map +1 -0
- package/dist/core/runner/prompt-suggestions.d.ts +33 -0
- package/dist/core/runner/prompt-suggestions.d.ts.map +1 -0
- package/dist/core/runner/prompt-suggestions.js +116 -0
- package/dist/core/runner/prompt-suggestions.js.map +1 -0
- package/dist/core/runner/runtask.d.ts +274 -0
- package/dist/core/runner/runtask.d.ts.map +1 -0
- package/dist/core/runner/runtask.js +4606 -0
- package/dist/core/runner/runtask.js.map +1 -0
- package/dist/core/runner/session-rule-policy.d.ts +28 -0
- package/dist/core/runner/session-rule-policy.d.ts.map +1 -0
- package/dist/core/runner/session-rule-policy.js +110 -0
- package/dist/core/runner/session-rule-policy.js.map +1 -0
- package/dist/core/runner/strict-output-schema.d.ts +36 -0
- package/dist/core/runner/strict-output-schema.d.ts.map +1 -0
- package/dist/core/runner/strict-output-schema.js +365 -0
- package/dist/core/runner/strict-output-schema.js.map +1 -0
- package/dist/core/runner/synthetic-tools.d.ts +72 -0
- package/dist/core/runner/synthetic-tools.d.ts.map +1 -0
- package/dist/core/runner/synthetic-tools.js +203 -0
- package/dist/core/runner/synthetic-tools.js.map +1 -0
- package/dist/core/runner/tool-disclosure.d.ts +117 -0
- package/dist/core/runner/tool-disclosure.d.ts.map +1 -0
- package/dist/core/runner/tool-disclosure.js +0 -0
- package/dist/core/runner/tool-disclosure.js.map +1 -0
- package/dist/core/runner/turn-attachments.d.ts +381 -0
- package/dist/core/runner/turn-attachments.d.ts.map +1 -0
- package/dist/core/runner/turn-attachments.js +596 -0
- package/dist/core/runner/turn-attachments.js.map +1 -0
- package/dist/core/runner/usage-accounting.d.ts +35 -0
- package/dist/core/runner/usage-accounting.d.ts.map +1 -0
- package/dist/core/runner/usage-accounting.js +45 -0
- package/dist/core/runner/usage-accounting.js.map +1 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +17 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/safety-axis-vocab.d.ts +33 -0
- package/dist/core/safety-axis-vocab.d.ts.map +1 -0
- package/dist/core/safety-axis-vocab.js +35 -0
- package/dist/core/safety-axis-vocab.js.map +1 -0
- package/dist/core/safety-merge-corpus.d.ts +48 -0
- package/dist/core/safety-merge-corpus.d.ts.map +1 -0
- package/dist/core/safety-merge-corpus.js +203 -0
- package/dist/core/safety-merge-corpus.js.map +1 -0
- package/dist/core/scheduler.d.ts +126 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +54 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/secret-env.d.ts +23 -0
- package/dist/core/secret-env.d.ts.map +1 -0
- package/dist/core/secret-env.js +35 -0
- package/dist/core/secret-env.js.map +1 -0
- package/dist/core/select-model.d.ts +26 -0
- package/dist/core/select-model.d.ts.map +1 -0
- package/dist/core/select-model.js +58 -0
- package/dist/core/select-model.js.map +1 -0
- package/dist/core/sensitive-path-policy.d.ts +24 -0
- package/dist/core/sensitive-path-policy.d.ts.map +1 -0
- package/dist/core/sensitive-path-policy.js +96 -0
- package/dist/core/sensitive-path-policy.js.map +1 -0
- package/dist/core/session-policy-store.d.ts +102 -0
- package/dist/core/session-policy-store.d.ts.map +1 -0
- package/dist/core/session-policy-store.js +177 -0
- package/dist/core/session-policy-store.js.map +1 -0
- package/dist/core/session-reconcile.d.ts +63 -0
- package/dist/core/session-reconcile.d.ts.map +1 -0
- package/dist/core/session-reconcile.js +71 -0
- package/dist/core/session-reconcile.js.map +1 -0
- package/dist/core/session-store.d.ts +99 -0
- package/dist/core/session-store.d.ts.map +1 -0
- package/dist/core/session-store.js +298 -0
- package/dist/core/session-store.js.map +1 -0
- package/dist/core/session.d.ts +144 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +56 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/spec-contract.d.ts +147 -0
- package/dist/core/spec-contract.d.ts.map +1 -0
- package/dist/core/spec-contract.js +340 -0
- package/dist/core/spec-contract.js.map +1 -0
- package/dist/core/strategy-store.d.ts +50 -0
- package/dist/core/strategy-store.d.ts.map +1 -0
- package/dist/core/strategy-store.js +100 -0
- package/dist/core/strategy-store.js.map +1 -0
- package/dist/core/stub-env.d.ts +35 -0
- package/dist/core/stub-env.d.ts.map +1 -0
- package/dist/core/stub-env.js +69 -0
- package/dist/core/stub-env.js.map +1 -0
- package/dist/core/task-notification.d.ts +115 -0
- package/dist/core/task-notification.d.ts.map +1 -0
- package/dist/core/task-notification.js +247 -0
- package/dist/core/task-notification.js.map +1 -0
- package/dist/core/task-outcome.d.ts +80 -0
- package/dist/core/task-outcome.d.ts.map +1 -0
- package/dist/core/task-outcome.js +40 -0
- package/dist/core/task-outcome.js.map +1 -0
- package/dist/core/task-registry.d.ts +349 -0
- package/dist/core/task-registry.d.ts.map +1 -0
- package/dist/core/task-registry.js +1751 -0
- package/dist/core/task-registry.js.map +1 -0
- package/dist/core/tighten-task-spec.d.ts +27 -0
- package/dist/core/tighten-task-spec.d.ts.map +1 -0
- package/dist/core/tighten-task-spec.js +95 -0
- package/dist/core/tighten-task-spec.js.map +1 -0
- package/dist/core/tool-detach.d.ts +31 -0
- package/dist/core/tool-detach.d.ts.map +1 -0
- package/dist/core/tool-detach.js +62 -0
- package/dist/core/tool-detach.js.map +1 -0
- package/dist/core/tool-errors.d.ts +72 -0
- package/dist/core/tool-errors.d.ts.map +1 -0
- package/dist/core/tool-errors.js +194 -0
- package/dist/core/tool-errors.js.map +1 -0
- package/dist/core/tool-name-aliases.d.ts +5 -0
- package/dist/core/tool-name-aliases.d.ts.map +1 -0
- package/dist/core/tool-name-aliases.js +130 -0
- package/dist/core/tool-name-aliases.js.map +1 -0
- package/dist/core/tool-policy.d.ts +295 -0
- package/dist/core/tool-policy.d.ts.map +1 -0
- package/dist/core/tool-policy.js +567 -0
- package/dist/core/tool-policy.js.map +1 -0
- package/dist/core/tool-result-budget.d.ts +44 -0
- package/dist/core/tool-result-budget.d.ts.map +1 -0
- package/dist/core/tool-result-budget.js +140 -0
- package/dist/core/tool-result-budget.js.map +1 -0
- package/dist/core/tool-result-store.d.ts +136 -0
- package/dist/core/tool-result-store.d.ts.map +1 -0
- package/dist/core/tool-result-store.js +219 -0
- package/dist/core/tool-result-store.js.map +1 -0
- package/dist/core/tools.d.ts +14 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +98 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/trace.d.ts +340 -0
- package/dist/core/trace.d.ts.map +1 -0
- package/dist/core/trace.js +12 -0
- package/dist/core/trace.js.map +1 -0
- package/dist/core/types.d.ts +2828 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/untrusted-egress.d.ts +32 -0
- package/dist/core/untrusted-egress.d.ts.map +1 -0
- package/dist/core/untrusted-egress.js +49 -0
- package/dist/core/untrusted-egress.js.map +1 -0
- package/dist/core/untrusted-text.d.ts +64 -0
- package/dist/core/untrusted-text.d.ts.map +1 -0
- package/dist/core/untrusted-text.js +119 -0
- package/dist/core/untrusted-text.js.map +1 -0
- package/dist/core/warm-resume.d.ts +23 -0
- package/dist/core/warm-resume.d.ts.map +1 -0
- package/dist/core/warm-resume.js +28 -0
- package/dist/core/warm-resume.js.map +1 -0
- package/dist/core/with-retry.d.ts +43 -0
- package/dist/core/with-retry.d.ts.map +1 -0
- package/dist/core/with-retry.js +59 -0
- package/dist/core/with-retry.js.map +1 -0
- package/dist/core/workflow-journal-store.d.ts +44 -0
- package/dist/core/workflow-journal-store.d.ts.map +1 -0
- package/dist/core/workflow-journal-store.js +47 -0
- package/dist/core/workflow-journal-store.js.map +1 -0
- package/dist/core/workflow-run-store-contract.d.ts +31 -0
- package/dist/core/workflow-run-store-contract.d.ts.map +1 -0
- package/dist/core/workflow-run-store-contract.js +191 -0
- package/dist/core/workflow-run-store-contract.js.map +1 -0
- package/dist/core/workflow-run-store.d.ts +149 -0
- package/dist/core/workflow-run-store.d.ts.map +1 -0
- package/dist/core/workflow-run-store.js +110 -0
- package/dist/core/workflow-run-store.js.map +1 -0
- package/dist/engine/compaction/compaction.d.ts +139 -0
- package/dist/engine/compaction/compaction.d.ts.map +1 -0
- package/dist/engine/compaction/compaction.js +1030 -0
- package/dist/engine/compaction/compaction.js.map +1 -0
- package/dist/engine/compaction/utils.d.ts +45 -0
- package/dist/engine/compaction/utils.d.ts.map +1 -0
- package/dist/engine/compaction/utils.js +203 -0
- package/dist/engine/compaction/utils.js.map +1 -0
- package/dist/engine/execution-env/kill-tree.d.ts +20 -0
- package/dist/engine/execution-env/kill-tree.d.ts.map +1 -0
- package/dist/engine/execution-env/kill-tree.js +183 -0
- package/dist/engine/execution-env/kill-tree.js.map +1 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +133 -0
- package/dist/engine/execution-env/node-execution-env.d.ts.map +1 -0
- package/dist/engine/execution-env/node-execution-env.js +1031 -0
- package/dist/engine/execution-env/node-execution-env.js.map +1 -0
- package/dist/engine/harness/agent-harness.d.ts +174 -0
- package/dist/engine/harness/agent-harness.d.ts.map +1 -0
- package/dist/engine/harness/agent-harness.js +1053 -0
- package/dist/engine/harness/agent-harness.js.map +1 -0
- package/dist/engine/harness/messages.d.ts +17 -0
- package/dist/engine/harness/messages.d.ts.map +1 -0
- package/dist/engine/harness/messages.js +122 -0
- package/dist/engine/harness/messages.js.map +1 -0
- package/dist/engine/harness/types.d.ts +713 -0
- package/dist/engine/harness/types.d.ts.map +1 -0
- package/dist/engine/harness/types.js +100 -0
- package/dist/engine/harness/types.js.map +1 -0
- package/dist/engine/llm/diagnostics.d.ts +23 -0
- package/dist/engine/llm/diagnostics.d.ts.map +1 -0
- package/dist/engine/llm/diagnostics.js +32 -0
- package/dist/engine/llm/diagnostics.js.map +1 -0
- package/dist/engine/llm/event-stream.d.ts +25 -0
- package/dist/engine/llm/event-stream.d.ts.map +1 -0
- package/dist/engine/llm/event-stream.js +103 -0
- package/dist/engine/llm/event-stream.js.map +1 -0
- package/dist/engine/llm/index.d.ts +12 -0
- package/dist/engine/llm/index.d.ts.map +1 -0
- package/dist/engine/llm/index.js +12 -0
- package/dist/engine/llm/index.js.map +1 -0
- package/dist/engine/llm/types.d.ts +753 -0
- package/dist/engine/llm/types.d.ts.map +1 -0
- package/dist/engine/llm/types.js +2 -0
- package/dist/engine/llm/types.js.map +1 -0
- package/dist/engine/llm/validation.d.ts +8 -0
- package/dist/engine/llm/validation.d.ts.map +1 -0
- package/dist/engine/llm/validation.js +318 -0
- package/dist/engine/llm/validation.js.map +1 -0
- package/dist/engine/loop/agent-loop.d.ts +74 -0
- package/dist/engine/loop/agent-loop.d.ts.map +1 -0
- package/dist/engine/loop/agent-loop.js +1490 -0
- package/dist/engine/loop/agent-loop.js.map +1 -0
- package/dist/engine/loop/runtime-deps.d.ts +17 -0
- package/dist/engine/loop/runtime-deps.d.ts.map +1 -0
- package/dist/engine/loop/runtime-deps.js +21 -0
- package/dist/engine/loop/runtime-deps.js.map +1 -0
- package/dist/engine/loop/types.d.ts +609 -0
- package/dist/engine/loop/types.d.ts.map +1 -0
- package/dist/engine/loop/types.js +2 -0
- package/dist/engine/loop/types.js.map +1 -0
- package/dist/engine/lsp/frame-decoder.d.ts +16 -0
- package/dist/engine/lsp/frame-decoder.d.ts.map +1 -0
- package/dist/engine/lsp/frame-decoder.js +53 -0
- package/dist/engine/lsp/frame-decoder.js.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts +105 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.js +343 -0
- package/dist/engine/lsp/node-lsp-manager.js.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts +37 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.js +185 -0
- package/dist/engine/lsp/stdio-lsp-transport.js.map +1 -0
- package/dist/engine/session/import-validate.d.ts +44 -0
- package/dist/engine/session/import-validate.d.ts.map +1 -0
- package/dist/engine/session/import-validate.js +92 -0
- package/dist/engine/session/import-validate.js.map +1 -0
- package/dist/engine/session/memory-repo.d.ts +25 -0
- package/dist/engine/session/memory-repo.d.ts.map +1 -0
- package/dist/engine/session/memory-repo.js +59 -0
- package/dist/engine/session/memory-repo.js.map +1 -0
- package/dist/engine/session/memory-storage.d.ts +14 -0
- package/dist/engine/session/memory-storage.d.ts.map +1 -0
- package/dist/engine/session/memory-storage.js +17 -0
- package/dist/engine/session/memory-storage.js.map +1 -0
- package/dist/engine/session/repo-utils.d.ts +11 -0
- package/dist/engine/session/repo-utils.d.ts.map +1 -0
- package/dist/engine/session/repo-utils.js +40 -0
- package/dist/engine/session/repo-utils.js.map +1 -0
- package/dist/engine/session/session.d.ts +34 -0
- package/dist/engine/session/session.d.ts.map +1 -0
- package/dist/engine/session/session.js +227 -0
- package/dist/engine/session/session.js.map +1 -0
- package/dist/engine/session/storage-base.d.ts +38 -0
- package/dist/engine/session/storage-base.d.ts.map +1 -0
- package/dist/engine/session/storage-base.js +157 -0
- package/dist/engine/session/storage-base.js.map +1 -0
- package/dist/engine/session/timestamps.d.ts +3 -0
- package/dist/engine/session/timestamps.d.ts.map +1 -0
- package/dist/engine/session/timestamps.js +15 -0
- package/dist/engine/session/timestamps.js.map +1 -0
- package/dist/engine/session/uuid.d.ts +2 -0
- package/dist/engine/session/uuid.d.ts.map +1 -0
- package/dist/engine/session/uuid.js +50 -0
- package/dist/engine/session/uuid.js.map +1 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +374 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/harness.d.ts +26 -0
- package/dist/internal/harness.d.ts.map +1 -0
- package/dist/internal/harness.js +24 -0
- package/dist/internal/harness.js.map +1 -0
- package/dist/internal/llm.d.ts +9 -0
- package/dist/internal/llm.d.ts.map +1 -0
- package/dist/internal/llm.js +8 -0
- package/dist/internal/llm.js.map +1 -0
- package/dist/orchestration/builtin-workflows.d.ts +44 -0
- package/dist/orchestration/builtin-workflows.d.ts.map +1 -0
- package/dist/orchestration/builtin-workflows.js +165 -0
- package/dist/orchestration/builtin-workflows.js.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts +24 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.js +106 -0
- package/dist/orchestration/dev-vm-script-runner.js.map +1 -0
- package/dist/orchestration/goal.d.ts +97 -0
- package/dist/orchestration/goal.d.ts.map +1 -0
- package/dist/orchestration/goal.js +248 -0
- package/dist/orchestration/goal.js.map +1 -0
- package/dist/orchestration/run-spec.d.ts +63 -0
- package/dist/orchestration/run-spec.d.ts.map +1 -0
- package/dist/orchestration/run-spec.js +274 -0
- package/dist/orchestration/run-spec.js.map +1 -0
- package/dist/orchestration/run-workflow-tool.d.ts +187 -0
- package/dist/orchestration/run-workflow-tool.d.ts.map +1 -0
- package/dist/orchestration/run-workflow-tool.js +612 -0
- package/dist/orchestration/run-workflow-tool.js.map +1 -0
- package/dist/orchestration/workflow-governance.d.ts +70 -0
- package/dist/orchestration/workflow-governance.d.ts.map +1 -0
- package/dist/orchestration/workflow-governance.js +176 -0
- package/dist/orchestration/workflow-governance.js.map +1 -0
- package/dist/orchestration/workflow-meta.d.ts +41 -0
- package/dist/orchestration/workflow-meta.d.ts.map +1 -0
- package/dist/orchestration/workflow-meta.js +426 -0
- package/dist/orchestration/workflow-meta.js.map +1 -0
- package/dist/orchestration/workflow-observe.d.ts +77 -0
- package/dist/orchestration/workflow-observe.d.ts.map +1 -0
- package/dist/orchestration/workflow-observe.js +177 -0
- package/dist/orchestration/workflow-observe.js.map +1 -0
- package/dist/orchestration/workflow-primitives.d.ts +31 -0
- package/dist/orchestration/workflow-primitives.d.ts.map +1 -0
- package/dist/orchestration/workflow-primitives.js +104 -0
- package/dist/orchestration/workflow-primitives.js.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts +34 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.js +301 -0
- package/dist/orchestration/workflow-sandbox-conformance.js.map +1 -0
- package/dist/orchestration/workflow-script-runner.d.ts +127 -0
- package/dist/orchestration/workflow-script-runner.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-runner.js +48 -0
- package/dist/orchestration/workflow-script-runner.js.map +1 -0
- package/dist/orchestration/workflow-script-store.d.ts +99 -0
- package/dist/orchestration/workflow-script-store.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-store.js +133 -0
- package/dist/orchestration/workflow-script-store.js.map +1 -0
- package/dist/orchestration/workflow-size-guideline.d.ts +50 -0
- package/dist/orchestration/workflow-size-guideline.d.ts.map +1 -0
- package/dist/orchestration/workflow-size-guideline.js +78 -0
- package/dist/orchestration/workflow-size-guideline.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +624 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +1596 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/prompts/default.d.ts +474 -0
- package/dist/prompts/default.d.ts.map +1 -0
- package/dist/prompts/default.js +676 -0
- package/dist/prompts/default.js.map +1 -0
- package/dist/prompts/supervisor.d.ts +60 -0
- package/dist/prompts/supervisor.d.ts.map +1 -0
- package/dist/prompts/supervisor.js +162 -0
- package/dist/prompts/supervisor.js.map +1 -0
- package/dist/scenarios/env.d.ts +41 -0
- package/dist/scenarios/env.d.ts.map +1 -0
- package/dist/scenarios/env.js +65 -0
- package/dist/scenarios/env.js.map +1 -0
- package/dist/scenarios/full-body.d.ts +47 -0
- package/dist/scenarios/full-body.d.ts.map +1 -0
- package/dist/scenarios/full-body.js +36 -0
- package/dist/scenarios/full-body.js.map +1 -0
- package/dist/scenarios/scenario-registry.d.ts +107 -0
- package/dist/scenarios/scenario-registry.d.ts.map +1 -0
- package/dist/scenarios/scenario-registry.js +192 -0
- package/dist/scenarios/scenario-registry.js.map +1 -0
- package/dist/scenarios/teacher-quickstart.d.ts +41 -0
- package/dist/scenarios/teacher-quickstart.d.ts.map +1 -0
- package/dist/scenarios/teacher-quickstart.js +32 -0
- package/dist/scenarios/teacher-quickstart.js.map +1 -0
- package/dist/server/http.d.ts +36 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +144 -0
- package/dist/server/http.js.map +1 -0
- package/dist/stores/file/checkpoint-store.d.ts +62 -0
- package/dist/stores/file/checkpoint-store.d.ts.map +1 -0
- package/dist/stores/file/checkpoint-store.js +250 -0
- package/dist/stores/file/checkpoint-store.js.map +1 -0
- package/dist/stores/file/file-snapshot-store.d.ts +43 -0
- package/dist/stores/file/file-snapshot-store.d.ts.map +1 -0
- package/dist/stores/file/file-snapshot-store.js +374 -0
- package/dist/stores/file/file-snapshot-store.js.map +1 -0
- package/dist/stores/file/fs-atomic.d.ts +95 -0
- package/dist/stores/file/fs-atomic.d.ts.map +1 -0
- package/dist/stores/file/fs-atomic.js +415 -0
- package/dist/stores/file/fs-atomic.js.map +1 -0
- package/dist/stores/file/index.d.ts +98 -0
- package/dist/stores/file/index.d.ts.map +1 -0
- package/dist/stores/file/index.js +109 -0
- package/dist/stores/file/index.js.map +1 -0
- package/dist/stores/file/memory-store.d.ts +95 -0
- package/dist/stores/file/memory-store.d.ts.map +1 -0
- package/dist/stores/file/memory-store.js +393 -0
- package/dist/stores/file/memory-store.js.map +1 -0
- package/dist/stores/file/session-policy-store.d.ts +24 -0
- package/dist/stores/file/session-policy-store.d.ts.map +1 -0
- package/dist/stores/file/session-policy-store.js +123 -0
- package/dist/stores/file/session-policy-store.js.map +1 -0
- package/dist/stores/file/session-store.d.ts +34 -0
- package/dist/stores/file/session-store.d.ts.map +1 -0
- package/dist/stores/file/session-store.js +175 -0
- package/dist/stores/file/session-store.js.map +1 -0
- package/dist/stores/file/tool-result-store.d.ts +23 -0
- package/dist/stores/file/tool-result-store.d.ts.map +1 -0
- package/dist/stores/file/tool-result-store.js +61 -0
- package/dist/stores/file/tool-result-store.js.map +1 -0
- package/dist/stores/file/workflow-journal-store.d.ts +36 -0
- package/dist/stores/file/workflow-journal-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-journal-store.js +157 -0
- package/dist/stores/file/workflow-journal-store.js.map +1 -0
- package/dist/stores/file/workflow-run-store.d.ts +58 -0
- package/dist/stores/file/workflow-run-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-run-store.js +178 -0
- package/dist/stores/file/workflow-run-store.js.map +1 -0
- package/dist/stores/pg.d.ts +210 -0
- package/dist/stores/pg.d.ts.map +1 -0
- package/dist/stores/pg.js +652 -0
- package/dist/stores/pg.js.map +1 -0
- package/dist/tools/fs/encoding.d.ts +51 -0
- package/dist/tools/fs/encoding.d.ts.map +1 -0
- package/dist/tools/fs/encoding.js +74 -0
- package/dist/tools/fs/encoding.js.map +1 -0
- package/dist/tools/fs/gh-rate-limit.d.ts +19 -0
- package/dist/tools/fs/gh-rate-limit.d.ts.map +1 -0
- package/dist/tools/fs/gh-rate-limit.js +35 -0
- package/dist/tools/fs/gh-rate-limit.js.map +1 -0
- package/dist/tools/fs/index.d.ts +246 -0
- package/dist/tools/fs/index.d.ts.map +1 -0
- package/dist/tools/fs/index.js +2130 -0
- package/dist/tools/fs/index.js.map +1 -0
- package/dist/tools/fs/pdf.d.ts +106 -0
- package/dist/tools/fs/pdf.d.ts.map +1 -0
- package/dist/tools/fs/pdf.js +178 -0
- package/dist/tools/fs/pdf.js.map +1 -0
- package/dist/tools/fs/repo-map.d.ts +15 -0
- package/dist/tools/fs/repo-map.d.ts.map +1 -0
- package/dist/tools/fs/repo-map.js +251 -0
- package/dist/tools/fs/repo-map.js.map +1 -0
- package/dist/tools/fs/safety.d.ts +168 -0
- package/dist/tools/fs/safety.d.ts.map +1 -0
- package/dist/tools/fs/safety.js +479 -0
- package/dist/tools/fs/safety.js.map +1 -0
- package/dist/tools/fs/search.d.ts +118 -0
- package/dist/tools/fs/search.d.ts.map +1 -0
- package/dist/tools/fs/search.js +650 -0
- package/dist/tools/fs/search.js.map +1 -0
- package/dist/tools/gitea-issue.d.ts +39 -0
- package/dist/tools/gitea-issue.d.ts.map +1 -0
- package/dist/tools/gitea-issue.js +91 -0
- package/dist/tools/gitea-issue.js.map +1 -0
- package/dist/tools/monitor.d.ts +64 -0
- package/dist/tools/monitor.d.ts.map +1 -0
- package/dist/tools/monitor.js +135 -0
- package/dist/tools/monitor.js.map +1 -0
- package/dist/tools/scheduler-tools.d.ts +48 -0
- package/dist/tools/scheduler-tools.d.ts.map +1 -0
- package/dist/tools/scheduler-tools.js +449 -0
- package/dist/tools/scheduler-tools.js.map +1 -0
- package/dist/tools/sql-adapters.d.ts +32 -0
- package/dist/tools/sql-adapters.d.ts.map +1 -0
- package/dist/tools/sql-adapters.js +31 -0
- package/dist/tools/sql-adapters.js.map +1 -0
- package/dist/tools/sql.d.ts +36 -0
- package/dist/tools/sql.d.ts.map +1 -0
- package/dist/tools/sql.js +131 -0
- package/dist/tools/sql.js.map +1 -0
- package/dist/tools/task-list.d.ts +26 -0
- package/dist/tools/task-list.d.ts.map +1 -0
- package/dist/tools/task-list.js +352 -0
- package/dist/tools/task-list.js.map +1 -0
- package/dist/tools/todo.d.ts +11 -0
- package/dist/tools/todo.d.ts.map +1 -0
- package/dist/tools/todo.js +126 -0
- package/dist/tools/todo.js.map +1 -0
- package/dist/tools/web.d.ts +59 -0
- package/dist/tools/web.d.ts.map +1 -0
- package/dist/tools/web.js +607 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/tools/worktree.d.ts +88 -0
- package/dist/tools/worktree.d.ts.map +1 -0
- package/dist/tools/worktree.js +434 -0
- package/dist/tools/worktree.js.map +1 -0
- package/docs/A1-ATTRIBUTION-ROUND1-2026-07-09.md +181 -0
- package/docs/AB-ORACLE-GATE-VERDICT-2026-07-10.md +100 -0
- package/docs/ANCHOR-GAP-INVENTORY-2026-07-09.md +143 -0
- package/docs/ARCHITECTURE.md +125 -0
- package/docs/BUGHUNT-2026-07-05-NIGHT.md +98 -0
- package/docs/BUILD.md +63 -0
- package/docs/CANCEL-ASYNC-ATTRIBUTION-2026-07-09.md +98 -0
- package/docs/CC-198-VS-201-DRIFT-2026-07-09.md +70 -0
- package/docs/CC-BASELINE-FAKE-ZERO-AUDIT-2026-07-09.md +51 -0
- package/docs/CC-DRIFT-198-206-AGENT-TYPES-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-CHANGELOG-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-REMINDERS-2026-07-10.md +96 -0
- package/docs/CC-DRIFT-198-206-ROADMAP-2026-07-10.md +110 -0
- package/docs/CC-DRIFT-198-206-TOOL-INVENTORY-2026-07-10.md +53 -0
- package/docs/CC-DRIFT-198-206-USAGE-CONSTANTS-2026-07-10.md +64 -0
- package/docs/CC-DRIFT-198-206-WORKFLOW-2026-07-10.md +83 -0
- package/docs/CC-PARITY-CHECKLIST.md +220 -0
- package/docs/CC-PARITY-DEEP-SWEEP-2026-07-07.md +149 -0
- package/docs/CC-SUBAGENT-PROMPT-STUDY-2026-07-09.md +219 -0
- package/docs/CC-TASK-REMINDER-CADENCE-STUDY-2026-07-09.md +396 -0
- package/docs/CC-TOOL-PARITY-SWEEP-2026-07.md +56 -0
- package/docs/CC-TOOL-PROMPT-DEEP-DIFF-2026-07-08.md +274 -0
- package/docs/CC-TOOLSURFACE-DEEP-DIVE-2026-07-07.md +197 -0
- package/docs/CC206-OBSERVER-ANCHORS-2026-07-11.md +463 -0
- package/docs/CC207-CORE-SWEEP-BACKLOG-2026-07-12.md +155 -0
- package/docs/CENTER-CONTROL-PLANE-SEAM.md +86 -0
- package/docs/CLEANUP-CONTRACT-ANCHOR-2026-07-09.md +83 -0
- package/docs/COLD-START-RSI-2026-07-09.md +72 -0
- package/docs/COMPACTION-LIVE-AUDIT-2026-07-09.md +114 -0
- package/docs/CONTEXT-lifecycle-extension-points-and-stop-attribution.md +71 -0
- package/docs/COREWARS-POLYGLOT-TRIAGE-2026-07-09.md +85 -0
- package/docs/DEADTARGET-OVERFULL-HBOX-2026-07-10.md +92 -0
- package/docs/DEADTARGET-PATH-TRACING-REVERSE-2026-07-10.md +87 -0
- package/docs/DEADTARGET-WINNING-AVG-COREWARS-2026-07-10.md +96 -0
- package/docs/DEEPSEEK-API-LIMITS-PROBE-2026-07-09.md +118 -0
- package/docs/DESIGN-140-MOCK-VERIFY-2026-07-11.md +79 -0
- package/docs/DESIGN-140-VERIFICATION-2026-07-11.md +43 -0
- package/docs/DESIGN-DRAFT-workflow-collab-2026-07-11.md +56 -0
- package/docs/DESIGN-ORACLE-GROUNDING-GATE-2026-07-10.md +167 -0
- package/docs/DESIGN-TFRAG-RECONCILE-SCAFFOLD-2026-07-09.md +102 -0
- package/docs/EXP-PA2-PE-DESIGN-2026-07-11.md +220 -0
- package/docs/EXT-DOGFOOD-2026-07-12.md +50 -0
- package/docs/FINAL-VERIFY-SURFACE-AUDIT-2026-07-09.md +44 -0
- package/docs/FRAG-RECON-INVESTIGATION-2026-07-09.md +183 -0
- package/docs/HANDOFF.md +121 -0
- package/docs/KNOWN-ISSUES.md +96 -0
- package/docs/LEGW-WINDOW-TAX-2026-07-10.md +82 -0
- package/docs/LIVE-PROBE-BATCH-2026-07-11.md +207 -0
- package/docs/M2-CERT-ATTRIBUTION-2026-07-10.md +61 -0
- package/docs/M25-LEG-VARIANCE-ATTRIBUTION-2026-07-10.md +81 -0
- package/docs/MAILMAN-TIMEOUT-ATTRIBUTION-2026-07-10.md +88 -0
- package/docs/MEMORY-BACKEND-DIALECT-NOTES.md +69 -0
- package/docs/MTEB-ESCAPE-HATCH-ATTRIBUTION-2026-07-09.md +57 -0
- package/docs/MTEB-LEADERBOARD-ATTRIBUTION-2026-07-10.md +134 -0
- package/docs/ORACLE-GATE-NEGATIVE-SAMPLE-2026-07-11.md +28 -0
- package/docs/PARITY-CONTEXT-TRANSACTIONS-2026-07-10.md +67 -0
- package/docs/PARITY-PROGRESS-MATRIX-2026-07-10.md +37 -0
- package/docs/PARITY-SPOT-AGENT-TYPES-2026-07-10.md +70 -0
- package/docs/PARITY-SPOT-REMINDERS-2026-07-10.md +144 -0
- package/docs/PARITY-SPOT-TOOL-INVENTORY-2026-07-10.md +61 -0
- package/docs/PARITY-SPOT-USAGE-CONSTANTS-2026-07-10.md +95 -0
- package/docs/PARITY-SPOT-WORKFLOW-2026-07-10.md +93 -0
- package/docs/PASSWORD-RECOVERY-PANEL-VERDICT-2026-07-10.md +62 -0
- package/docs/R8-R9-FINALIZE-COORDINATION-2026-07-09.md +124 -0
- package/docs/REPL-CODE-MODE-EVALUATION-2026-07-10.md +187 -0
- package/docs/REPORT-1249-TARGETED.md +48 -0
- package/docs/RESEARCH-3P-MEMORY-SWAP-2026-07-12.md +273 -0
- package/docs/ROADMAP.md +111 -0
- package/docs/RSI-CLOUD-DEPLOY-2026-07-06.md +289 -0
- package/docs/RSI-PROCESS-AI-COLDSTART-2026-07-11.md +68 -0
- package/docs/S18-THOROUGHNESS-AUDIT-2026-07-09.md +113 -0
- package/docs/SERVICE-INTEGRATION-GUIDE.md +298 -0
- package/docs/SUBAGENT-STREAM-RESILIENCE-PARITY-2026-07-10.md +118 -0
- package/docs/SWEBENCH-PRO-RECON-2026-07-11.md +31 -0
- package/docs/TB-EFFICIENCY-TELEMETRY-2026-07-08.md +114 -0
- package/docs/TB-FAILURE-AUTOPSY-2026-07-05-RERUN.md +67 -0
- package/docs/TB-FAIRNESS-AUDIT-2026-07-08.md +141 -0
- package/docs/TB-FULL-1257-2026-07-08.md +77 -0
- package/docs/TB-LEG-GAP-ATTRIBUTION-1261-1263-2026-07-11.md +154 -0
- package/docs/TB-REGRESSION-DAEMON-KILL-2026-07-08.md +58 -0
- package/docs/TB-RSI-CROSSCHECK-2026-07-06.md +68 -0
- package/docs/TB-RSI-LEDGER.md +30 -0
- package/docs/TB-STABLE-SET-2026-07-08.md +127 -0
- package/docs/TB21-RECON-2026-07-11.md +28 -0
- package/docs/TEST-DESIGN-BATCH-1-2-3.md +97 -0
- package/docs/THIRD-PARTY-INTEGRATION.md +45 -0
- package/docs/TOKEN-ESTIMATE-CALIBRATION-LIVE-2026-07-09.md +102 -0
- package/docs/audit-2026-06-10-/347/254/254/344/272/214/350/275/256-/347/251/272/347/231/275/345/214/272/344/270/216/345/277/230/346/216/245/347/272/277.md +147 -0
- package/docs/audit-2026-06-10-/350/256/241/347/256/227bug/346/211/253/346/217/217.md +163 -0
- package/docs/audit-2026-06-11-/344/277/256/345/244/215/345/244/215/345/256/241/344/270/216/345/233/236/345/275/222/344/270/223/346/211/253.md +95 -0
- package/docs/audit-2026-06-12-design71-P1/346/275/234/344/274/217/351/235/242/350/243/201/345/206/263/344/270/216/345/220/236/351/224/231/345/256/241/350/256/241.md +45 -0
- package/docs/audit-2026-06-12-/345/205/254/345/274/200/346/227/213/351/222/256/346/264/273/346/200/247/344/270/216vendored/346/255/273/350/267/257.md +63 -0
- package/docs/audit-2026-06-15/ADDENDUM-second-pass.md +88 -0
- package/docs/audit-2026-06-15/ARCHITECTURE-AND-ROADMAP.md +187 -0
- package/docs/audit-2026-06-15/DOC-CORRECTIONS.md +105 -0
- package/docs/audit-2026-06-15/INDEX.md +49 -0
- package/docs/audit-2026-06-15/ORCHESTRATION-STATUS.md +98 -0
- package/docs/audit-2026-06-15/PRODUCTION-ISSUES.md +189 -0
- package/docs/audit-2026-06-15/REFERENCES-literature.md +139 -0
- package/docs/audit-2026-06-15/VENDOR-REFACTOR-PLAN.md +96 -0
- package/docs/cc-probe-198/README.md +72 -0
- package/docs/cc-probe-198/STABILITY-AUDIT.md +118 -0
- package/docs/cc-probe-198/live-schema-monitor-worktree-2026-07-09.json +56 -0
- package/docs/cc-probe-198/mount-variants.json +536 -0
- package/docs/cc-probe-198/plan-mode-run.json +1 -0
- package/docs/cc-probe-198/probe-bash-bg.json +224 -0
- package/docs/cc-probe-198/probe-edit-mismatch.json +120 -0
- package/docs/cc-probe-198/probe-read-missing.json +62 -0
- package/docs/cc-probe-198/probe-search-empty.json +127 -0
- package/docs/cc-probe-198/probe-task-family.json +227 -0
- package/docs/cc-probe-198/probes.status +6 -0
- package/docs/cc-probe-198/raw-capture-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture-print.json +787 -0
- package/docs/cc-probe-198/raw-capture2-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture2-print.json +787 -0
- package/docs/cc-probe-198/system-prompt.txt +135 -0
- package/docs/cc-probe-198/tools-array.json +962 -0
- package/docs/durability-boundary.md +63 -0
- package/docs/fix-2026-06-10-/350/256/241/347/256/227bug/344/277/256/345/244/215-search/346/211/271.md +75 -0
- package/docs/fix-2026-06-11-/347/254/254/344/272/214/350/275/256-/344/277/256/345/244/215-search/346/211/271.md +62 -0
- package/docs/parity-sweep/REPORT-DYNAMIC.md +97 -0
- package/docs/parity-sweep/REPORT-STATIC-GGB.md +127 -0
- package/docs/parity-sweep/REPORT-STATIC-RWE.md +133 -0
- package/docs/vendor-history.md +385 -0
- package/docs/vendored-upstream-diff-2026-07.md +83 -0
- package/package.json +70 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cost computation (1.37). core never hardcodes provider pricing โ a deployment injects it via
|
|
3
|
+
* `RunnerDeps.pricing` or each `Model.cost`. All prices are **absolute per-1M-token USD**, not
|
|
4
|
+
* multipliers: each provider's adapter precomputes its discount into an absolute value
|
|
5
|
+
* (OpenAI/DeepSeek: the cache-hit price; Anthropic: baseร0.1 read / ร1.25 5min-write / ร2.0 1h-write).
|
|
6
|
+
*/
|
|
7
|
+
const per1M = (tokens, price) => price && tokens ? (tokens * price) / 1e6 : 0;
|
|
8
|
+
/**
|
|
9
|
+
* Cost in **integer micro-USD** (1e-6 USD) โ integer to avoid float-accumulation error in billing
|
|
10
|
+
* reconcile (Stripe/AWS-style). Convergent across providers: full-price input = `totalInputTokens`
|
|
11
|
+
* minus all cache tokens; cache read/write priced at their own absolute rates; output at its rate.
|
|
12
|
+
*
|
|
13
|
+
* DeepSeek (hit price as `cacheReadPer1M`, no cache-write) and OpenAI (no 1h write) fall out by their
|
|
14
|
+
* zero token counts; Anthropic uses all fields. This fixes P2 (cached charged at full price) by
|
|
15
|
+
* pricing the cache subset separately instead of trusting the brain's possibly-overstated cost total.
|
|
16
|
+
*/
|
|
17
|
+
export function computeCostMicroUsd(counts, pricing) {
|
|
18
|
+
// A-4: a cache subset with NO configured price falls back to FULL-PRICE input (the documented
|
|
19
|
+
// contract: "absent โ treated as full-price input"), not free. Only an EXPLICIT 0 means free.
|
|
20
|
+
// Previously the subset was unconditionally removed from fullInput AND priced via per1M(_, undefined)=0,
|
|
21
|
+
// so a cost table with just {input,output} (common for OpenAI auto-cache) billed cacheRead at 0 โ a
|
|
22
|
+
// warm loop (80-95% cacheRead) under-billed to ~1/5, defeating overBudget/cascade/verify cost ceilings.
|
|
23
|
+
const billedCacheRead = pricing.cacheReadPer1M !== undefined ? counts.cacheReadTokens : 0;
|
|
24
|
+
const billedCacheWrite = pricing.cacheWritePer1M !== undefined ? counts.cacheWriteTokens : 0;
|
|
25
|
+
const billedCacheWriteLong = pricing.cacheWriteLongPer1M !== undefined ? counts.cacheWriteTokensLong : 0;
|
|
26
|
+
// Cache subsets WITHOUT a price stay in fullInput (charged at the input rate); priced ones are removed.
|
|
27
|
+
const fullInput = Math.max(0, counts.totalInputTokens - billedCacheRead - billedCacheWrite - billedCacheWriteLong);
|
|
28
|
+
const usd = per1M(fullInput, pricing.inputPer1M) +
|
|
29
|
+
per1M(billedCacheRead, pricing.cacheReadPer1M) +
|
|
30
|
+
per1M(billedCacheWrite, pricing.cacheWritePer1M) +
|
|
31
|
+
per1M(billedCacheWriteLong, pricing.cacheWriteLongPer1M) +
|
|
32
|
+
per1M(counts.outputTokens, pricing.outputPer1M);
|
|
33
|
+
return Math.round(usd * 1e6);
|
|
34
|
+
}
|
|
35
|
+
/** Map a vendor `Model.cost` (already per-1M absolute) to `ModelPricing`. We don't emit 1h cache
|
|
36
|
+
* writes, so `cacheWriteLongPer1M` defaults to the 5-min write price (irrelevant while that count is 0). */
|
|
37
|
+
export function modelCostToPricing(cost) {
|
|
38
|
+
return {
|
|
39
|
+
inputPer1M: cost?.input ?? 0,
|
|
40
|
+
outputPer1M: cost?.output ?? 0,
|
|
41
|
+
cacheReadPer1M: cost?.cacheRead,
|
|
42
|
+
cacheWritePer1M: cost?.cacheWrite,
|
|
43
|
+
cacheWriteLongPer1M: cost?.cacheWrite,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/core/pricing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2BH,MAAM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AED;6GAC6G;AAC7G,MAAM,UAAU,kBAAkB,CAChC,IAA8F;IAE9F,OAAO;QACL,UAAU,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;QAC5B,WAAW,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;QAC9B,cAAc,EAAE,IAAI,EAAE,SAAS;QAC/B,eAAe,EAAE,IAAI,EAAE,UAAU;QACjC,mBAAmB,EAAE,IAAI,EAAE,UAAU;KACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property-harness (design/57 ยง9 / design/58) โ the **oracle-free** half of the trusted-oracle problem.
|
|
3
|
+
*
|
|
4
|
+
* From a **trusted contract** (supplied by the spec / leader โ NEVER the worker, so it dodges BUG8: a worker
|
|
5
|
+
* can't write `assert(true)` here) this derives executable **invariants** that hold for ANY correct
|
|
6
|
+
* implementation, with **no expected values** (no oracle โ dodging the "expected is LLM-computed" trap of a
|
|
7
|
+
* generated test) and **no LLM** (pure deterministic โ design/56's "execute > analyze"). Run against an
|
|
8
|
+
* implementation over many generated inputs, they catch the **structural-contract** bug class deterministically
|
|
9
|
+
* at **0 false positives** (probe-13: structural 16/16 caught, FP 0/12).
|
|
10
|
+
*
|
|
11
|
+
* It is a thin **complement** to the mechanical exit gate ({@link runExecGate}), not a replacement: it provably
|
|
12
|
+
* **cannot** catch value-semantic bugs โ wrong output that is still structurally valid (`abs โ square`,
|
|
13
|
+
* titlecase `don't โ Don'T`). Those still need a real test suite (MECH) or the L3 judge. The value is the
|
|
14
|
+
* **sound invariant library + the contractโinvariant derivation** centralized here (a profile re-deriving it
|
|
15
|
+
* risks unsound invariants = false positives = the thing that makes a gate harmful).
|
|
16
|
+
*
|
|
17
|
+
* Honest limits (two independent probes converged โ core probe-13 + search [52], both FP=0):
|
|
18
|
+
* - **The only false-positive risk is an UNFAITHFUL contract.** Each invariant is sound by construction, so a
|
|
19
|
+
* *correct* impl can't violate one โ UNLESS the contract misdescribes the intended behavior (declaring a
|
|
20
|
+
* property the correct impl doesn't have). The contract must faithfully describe intent (it is trusted input).
|
|
21
|
+
* - **Order/positional blindness.** `permutation`/`subset`/multiset-based invariants are order-agnostic, so a
|
|
22
|
+
* wrong-order-but-same-elements result (concat `b+a`, a mis-ordered flatten) passes. That is the value-semantic
|
|
23
|
+
* class โ catch it with a positional contract entry, a real test (MECH), or the judge.
|
|
24
|
+
* - **No contract โ no signal.** A function with no declared contract derives zero invariants (zero coverage);
|
|
25
|
+
* the catch comes from the *contract* you declare, not from the type alone โ this is not magic from signatures.
|
|
26
|
+
*
|
|
27
|
+
* Scope (design/58 ยง2): no typeโinput generation (caller supplies `genInput`), no multi-language rendering
|
|
28
|
+
* (this is the JS/TS reference; other languages render their own from {@link FunctionContract}), no
|
|
29
|
+
* non-termination detection (a sync infinite loop blocks {@link checkInvariants} โ gate it with the
|
|
30
|
+
* env/exec timeout via `runExecGate`; `totalNoThrow` only catches throws).
|
|
31
|
+
*/
|
|
32
|
+
/** Sound, oracle-free invariant kinds (design/58 ยง1.3). Each holds for ANY correct implementation. */
|
|
33
|
+
export type InvariantKind = "permutation" | "lengthPreserving" | "subset" | "distinctOutput" | "idempotent" | "involution" | "outputPredicate" | "rangeBound" | "nonNegative" | "nonEmptyPreserving" | "concatPreserving" | "chunkMaxLen" | "lengthEq" | "roundtrip" | "totalNoThrow";
|
|
34
|
+
/**
|
|
35
|
+
* The TRUSTED contract a function is expected to satisfy โ from the spec / leader, **never the worker** (BUG8).
|
|
36
|
+
* The predicate/bound fields carry trusted JS supplied by the spec author (not worker output), so the
|
|
37
|
+
* in-process model is safe for them.
|
|
38
|
+
*/
|
|
39
|
+
export interface FunctionContract {
|
|
40
|
+
/** Output is a permutation (same multiset) of the input collection โ sort / shuffle / reverse / rotate. */
|
|
41
|
+
permutation?: boolean;
|
|
42
|
+
/** `|output| === |input collection|`. */
|
|
43
|
+
lengthPreserving?: boolean;
|
|
44
|
+
/** Output is a sub-multiset of the input collection โ filter / take. */
|
|
45
|
+
subset?: boolean;
|
|
46
|
+
/** Output has no duplicate elements โ dedupe / unique. */
|
|
47
|
+
distinctOutput?: boolean;
|
|
48
|
+
/** `f(f(x))` deep-equals `f(x)` โ normalize / sort / dedupe. (Output type must equal input type.) */
|
|
49
|
+
idempotent?: boolean;
|
|
50
|
+
/** `f(f(x))` deep-equals `x` โ reverse / negate. (Output type must equal input type.) */
|
|
51
|
+
involution?: boolean;
|
|
52
|
+
/** Numeric output is `>= 0` โ abs / length / count. */
|
|
53
|
+
nonNegative?: boolean;
|
|
54
|
+
/** A non-empty input collection implies a non-empty output โ titlecase / dedupe. */
|
|
55
|
+
nonEmptyPreserving?: boolean;
|
|
56
|
+
/** Concatenating the output groups in order deep-equals the input collection โ chunk / split. */
|
|
57
|
+
concatPreserving?: boolean;
|
|
58
|
+
/** The function is an `{ encode, decode }` pair and `decode(encode(x))` deep-equals `x` โ serde / base62. */
|
|
59
|
+
roundtrip?: boolean;
|
|
60
|
+
/** The function must not throw on any valid-typed input. (Non-termination is NOT covered โ see file header.) */
|
|
61
|
+
totalNoThrow?: boolean;
|
|
62
|
+
/** Every output element satisfies this trusted predicate โ filter-by-P. */
|
|
63
|
+
outputPredicate?: (el: any) => boolean;
|
|
64
|
+
/** Numeric output lies within `[lo, hi]` computed from the input by this trusted fn โ clamp. */
|
|
65
|
+
rangeBound?: (input: any) => readonly [number, number];
|
|
66
|
+
/** Every output group has length in `(0, n]` where `n` is this trusted fn of the input โ chunk. */
|
|
67
|
+
chunkMaxLen?: (input: any) => number;
|
|
68
|
+
/** `|output| === ` this trusted fn of the input โ e.g. `countdown(n)` has length `n + 1`. */
|
|
69
|
+
lengthEq?: (input: any) => number;
|
|
70
|
+
/**
|
|
71
|
+
* Extract the input collection when the input WRAPS it โ e.g. `(x) => x.a` for `{ a, k }`. Default: the input
|
|
72
|
+
* IS the collection. ๐ด Required for the collection invariants when the input is a wrapper object, else they
|
|
73
|
+
* compare the output against the wrapper instead of the collection (probe-13 soundness fix).
|
|
74
|
+
*/
|
|
75
|
+
inputCollection?: (input: any) => unknown[];
|
|
76
|
+
}
|
|
77
|
+
/** One derived, runnable invariant. `check(fn, input)` returns `true` iff the invariant HOLDS. */
|
|
78
|
+
export interface Invariant {
|
|
79
|
+
kind: InvariantKind;
|
|
80
|
+
/** Human-readable description (surfaced in a violation). */
|
|
81
|
+
description: string;
|
|
82
|
+
/** For `roundtrip`, `fn` is the `{ encode, decode }` pair; otherwise a unary function. A throw propagates to the runner. */
|
|
83
|
+
check: (fn: any, input: any) => boolean;
|
|
84
|
+
}
|
|
85
|
+
/** A concrete invariant violation found by {@link checkInvariants}. */
|
|
86
|
+
export interface InvariantViolation {
|
|
87
|
+
kind: InvariantKind;
|
|
88
|
+
description: string;
|
|
89
|
+
/** The input that triggered it (the first one observed). */
|
|
90
|
+
input: unknown;
|
|
91
|
+
/** A-5 fold: the violation was detected via the check THROWING on a structurally wrong return value
|
|
92
|
+
* (e.g. `.length` of undefined) rather than returning false โ the impl's output doesn't even have
|
|
93
|
+
* the shape the contract implies. fn itself did NOT throw (that is `totalNoThrow`'s domain). */
|
|
94
|
+
evaluationThrew?: true;
|
|
95
|
+
}
|
|
96
|
+
/** The outcome of running invariants over generated inputs. */
|
|
97
|
+
export interface CheckResult {
|
|
98
|
+
/** True iff no invariant was violated across all trials. */
|
|
99
|
+
ok: boolean;
|
|
100
|
+
/** One entry per violated invariant (first triggering input). */
|
|
101
|
+
violations: InvariantViolation[];
|
|
102
|
+
/** How many inputs were tried. */
|
|
103
|
+
trials: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Derive the sound, oracle-free invariants implied by a trusted {@link FunctionContract}. Pure and
|
|
107
|
+
* deterministic. The collection invariants honor `contract.inputCollection` (default: the input is the
|
|
108
|
+
* collection) so a wrapper-object input (`{ a, k }`) is handled correctly.
|
|
109
|
+
*/
|
|
110
|
+
export declare function deriveInvariants(contract: FunctionContract): Invariant[];
|
|
111
|
+
/**
|
|
112
|
+
* Run derived `invariants` against `fn` over `opts.trials` generated inputs (default 200). Returns the
|
|
113
|
+
* violated invariants (first triggering input each).
|
|
114
|
+
*
|
|
115
|
+
* ๐ด Runs `fn` **in the caller's process** (design/58 ยง1.2). Pass only a TRUSTED `fn`, or invoke this INSIDE
|
|
116
|
+
* the worker's sandbox (a generated test the leader drops into the env and runs via `runExecGate`, gating on
|
|
117
|
+
* exit code). **Non-termination is NOT caught here** โ a sync infinite loop blocks the call; bound it with the
|
|
118
|
+
* env/exec timeout. An impl throw is detected by the self-contained `totalNoThrow` invariant (recorded ONLY
|
|
119
|
+
* when totality was contracted โ soundness over recall); the runner's `catch` is just a safety net so one
|
|
120
|
+
* pathological input can't crash the whole run. Note: `fn` is invoked once per invariant per trial (twice for
|
|
121
|
+
* `idempotent`/`involution`) โ pass a PURE function (the intended use); a side-effecting `fn` is amplified.
|
|
122
|
+
*/
|
|
123
|
+
export declare function checkInvariants(fn: unknown, genInput: (i: number) => unknown, invariants: Invariant[], opts?: {
|
|
124
|
+
trials?: number;
|
|
125
|
+
}): CheckResult;
|
|
126
|
+
//# sourceMappingURL=property-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-harness.d.ts","sourceRoot":"","sources":["../../src/core/property-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,sGAAsG;AACtG,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,kBAAkB,GAClB,QAAQ,GACR,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,oBAAoB,GACpB,kBAAkB,GAClB,aAAa,GACb,UAAU,GACV,WAAW,GACX,cAAc,CAAC;AAEnB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2GAA2G;IAC3G,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yCAAyC;IACzC,gBAAgB,CAAC,EA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EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,KAAK,EAAE,OAAO,CAAC;IACf;;qGAEiG;IACjG,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,EAAE,EAAE,OAAO,CAAC;IACZ,iEAAiE;IACjE,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAgDD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EAAE,CA0BxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,OAAO,EACX,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,EAChC,UAAU,EAAE,SAAS,EAAE,EACvB,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7B,WAAW,CAgCb"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property-harness (design/57 ยง9 / design/58) โ the **oracle-free** half of the trusted-oracle problem.
|
|
3
|
+
*
|
|
4
|
+
* From a **trusted contract** (supplied by the spec / leader โ NEVER the worker, so it dodges BUG8: a worker
|
|
5
|
+
* can't write `assert(true)` here) this derives executable **invariants** that hold for ANY correct
|
|
6
|
+
* implementation, with **no expected values** (no oracle โ dodging the "expected is LLM-computed" trap of a
|
|
7
|
+
* generated test) and **no LLM** (pure deterministic โ design/56's "execute > analyze"). Run against an
|
|
8
|
+
* implementation over many generated inputs, they catch the **structural-contract** bug class deterministically
|
|
9
|
+
* at **0 false positives** (probe-13: structural 16/16 caught, FP 0/12).
|
|
10
|
+
*
|
|
11
|
+
* It is a thin **complement** to the mechanical exit gate ({@link runExecGate}), not a replacement: it provably
|
|
12
|
+
* **cannot** catch value-semantic bugs โ wrong output that is still structurally valid (`abs โ square`,
|
|
13
|
+
* titlecase `don't โ Don'T`). Those still need a real test suite (MECH) or the L3 judge. The value is the
|
|
14
|
+
* **sound invariant library + the contractโinvariant derivation** centralized here (a profile re-deriving it
|
|
15
|
+
* risks unsound invariants = false positives = the thing that makes a gate harmful).
|
|
16
|
+
*
|
|
17
|
+
* Honest limits (two independent probes converged โ core probe-13 + search [52], both FP=0):
|
|
18
|
+
* - **The only false-positive risk is an UNFAITHFUL contract.** Each invariant is sound by construction, so a
|
|
19
|
+
* *correct* impl can't violate one โ UNLESS the contract misdescribes the intended behavior (declaring a
|
|
20
|
+
* property the correct impl doesn't have). The contract must faithfully describe intent (it is trusted input).
|
|
21
|
+
* - **Order/positional blindness.** `permutation`/`subset`/multiset-based invariants are order-agnostic, so a
|
|
22
|
+
* wrong-order-but-same-elements result (concat `b+a`, a mis-ordered flatten) passes. That is the value-semantic
|
|
23
|
+
* class โ catch it with a positional contract entry, a real test (MECH), or the judge.
|
|
24
|
+
* - **No contract โ no signal.** A function with no declared contract derives zero invariants (zero coverage);
|
|
25
|
+
* the catch comes from the *contract* you declare, not from the type alone โ this is not magic from signatures.
|
|
26
|
+
*
|
|
27
|
+
* Scope (design/58 ยง2): no typeโinput generation (caller supplies `genInput`), no multi-language rendering
|
|
28
|
+
* (this is the JS/TS reference; other languages render their own from {@link FunctionContract}), no
|
|
29
|
+
* non-termination detection (a sync infinite loop blocks {@link checkInvariants} โ gate it with the
|
|
30
|
+
* env/exec timeout via `runExecGate`; `totalNoThrow` only catches throws).
|
|
31
|
+
*/
|
|
32
|
+
// ---------- internal: a sound canonicalizer + multiset helpers (deterministic) ----------
|
|
33
|
+
/**
|
|
34
|
+
* Structural canonical string of a value โ the equality basis. `JSON.stringify` is unusable for a 0-FP
|
|
35
|
+
* guarantee (council): it THROWS on `BigInt` / circular refs (a throw a correct impl never made), is
|
|
36
|
+
* object-key-order-sensitive (`{a,b}` โ `{b,a}` โ false inequality), and maps `NaN`/`Infinity`/`-0` to
|
|
37
|
+
* `"null"`/`"0"` (collisions). This never throws, sorts object keys, and keeps `NaN`/`ยฑInfinity`/`-0`/
|
|
38
|
+
* `undefined`/`BigInt` distinct โ so a correct implementation can never be flagged by a serialization artifact.
|
|
39
|
+
*/
|
|
40
|
+
function canon(v, seen = new WeakSet()) {
|
|
41
|
+
if (v === null)
|
|
42
|
+
return "null";
|
|
43
|
+
if (v === undefined)
|
|
44
|
+
return "undefined";
|
|
45
|
+
const t = typeof v;
|
|
46
|
+
if (t === "number")
|
|
47
|
+
return Object.is(v, -0) ? "-0" : String(v); // String() gives NaN/Infinity/-Infinity
|
|
48
|
+
if (t === "bigint")
|
|
49
|
+
return `${v}n`;
|
|
50
|
+
if (t === "string")
|
|
51
|
+
return JSON.stringify(v);
|
|
52
|
+
if (t === "boolean")
|
|
53
|
+
return String(v);
|
|
54
|
+
if (t === "function" || t === "symbol")
|
|
55
|
+
return `[${t}]`;
|
|
56
|
+
if (Array.isArray(v)) {
|
|
57
|
+
if (seen.has(v))
|
|
58
|
+
return "[Circular]";
|
|
59
|
+
seen.add(v);
|
|
60
|
+
const s = `[${v.map((e) => canon(e, seen)).join(",")}]`;
|
|
61
|
+
seen.delete(v);
|
|
62
|
+
return s;
|
|
63
|
+
}
|
|
64
|
+
const o = v;
|
|
65
|
+
if (seen.has(o))
|
|
66
|
+
return "[Circular]";
|
|
67
|
+
seen.add(o);
|
|
68
|
+
const s = `{${Object.keys(o).sort().map((k) => `${JSON.stringify(k)}:${canon(o[k], seen)}`).join(",")}}`;
|
|
69
|
+
seen.delete(o);
|
|
70
|
+
return s;
|
|
71
|
+
}
|
|
72
|
+
const structEq = (a, b) => canon(a) === canon(b);
|
|
73
|
+
const multisetEq = (a, b) => structEq(a.map((x) => canon(x)).sort(), b.map((x) => canon(x)).sort());
|
|
74
|
+
function multisetSubset(out, inp) {
|
|
75
|
+
const c = new Map();
|
|
76
|
+
for (const x of inp) {
|
|
77
|
+
const k = canon(x);
|
|
78
|
+
c.set(k, (c.get(k) ?? 0) + 1);
|
|
79
|
+
}
|
|
80
|
+
for (const x of out) {
|
|
81
|
+
const k = canon(x);
|
|
82
|
+
const n = (c.get(k) ?? 0) - 1;
|
|
83
|
+
if (n < 0)
|
|
84
|
+
return false;
|
|
85
|
+
c.set(k, n);
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
const lenOf = (x) => (typeof x === "string" || Array.isArray(x) ? x.length : 0);
|
|
90
|
+
/**
|
|
91
|
+
* Derive the sound, oracle-free invariants implied by a trusted {@link FunctionContract}. Pure and
|
|
92
|
+
* deterministic. The collection invariants honor `contract.inputCollection` (default: the input is the
|
|
93
|
+
* collection) so a wrapper-object input (`{ a, k }`) is handled correctly.
|
|
94
|
+
*/
|
|
95
|
+
export function deriveInvariants(contract) {
|
|
96
|
+
const inv = [];
|
|
97
|
+
const call = (fn, x) => fn(x);
|
|
98
|
+
const coll = (x) => (contract.inputCollection ? contract.inputCollection(x) : x);
|
|
99
|
+
const add = (kind, description, check) => inv.push({ kind, description, check });
|
|
100
|
+
if (contract.permutation)
|
|
101
|
+
add("permutation", "output is a permutation of the input collection", (f, x) => multisetEq(call(f, x), coll(x)));
|
|
102
|
+
if (contract.lengthPreserving)
|
|
103
|
+
add("lengthPreserving", "|output| === |input collection|", (f, x) => call(f, x).length === coll(x).length);
|
|
104
|
+
if (contract.subset)
|
|
105
|
+
add("subset", "output is a sub-multiset of the input collection", (f, x) => multisetSubset(call(f, x), coll(x)));
|
|
106
|
+
if (contract.distinctOutput)
|
|
107
|
+
add("distinctOutput", "output has no duplicate elements", (f, x) => { const o = call(f, x); return new Set(o.map((e) => canon(e))).size === o.length; });
|
|
108
|
+
if (contract.idempotent)
|
|
109
|
+
add("idempotent", "f(f(x)) === f(x)", (f, x) => { const once = call(f, x); return structEq(call(f, once), once); });
|
|
110
|
+
if (contract.involution)
|
|
111
|
+
add("involution", "f(f(x)) === x", (f, x) => structEq(call(f, call(f, x)), x));
|
|
112
|
+
if (contract.outputPredicate)
|
|
113
|
+
add("outputPredicate", "every output element satisfies the contract predicate", (f, x) => call(f, x).every((e) => contract.outputPredicate(e)));
|
|
114
|
+
if (contract.rangeBound)
|
|
115
|
+
add("rangeBound", "output is within the contract range", (f, x) => { const o = call(f, x); const [lo, hi] = contract.rangeBound(x); return typeof o === "number" && o >= lo && o <= hi; });
|
|
116
|
+
if (contract.nonNegative)
|
|
117
|
+
add("nonNegative", "output >= 0", (f, x) => call(f, x) >= 0);
|
|
118
|
+
if (contract.nonEmptyPreserving)
|
|
119
|
+
add("nonEmptyPreserving", "non-empty input collection => non-empty output", (f, x) => (lenOf(coll(x)) > 0 ? lenOf(call(f, x)) > 0 : true));
|
|
120
|
+
if (contract.concatPreserving)
|
|
121
|
+
add("concatPreserving", "concatenation of output groups === input collection", (f, x) => structEq([].concat(...call(f, x)), coll(x)));
|
|
122
|
+
if (contract.chunkMaxLen)
|
|
123
|
+
add("chunkMaxLen", "every output group has length in (0, n]", (f, x) => { const n = contract.chunkMaxLen(x); return call(f, x).every((g) => g.length > 0 && g.length <= n); });
|
|
124
|
+
if (contract.lengthEq)
|
|
125
|
+
add("lengthEq", "|output| === the contract length", (f, x) => call(f, x).length === contract.lengthEq(x));
|
|
126
|
+
if (contract.roundtrip)
|
|
127
|
+
add("roundtrip", "decode(encode(x)) === x", (pair, x) => { const p = pair; return structEq(p.decode(p.encode(x)), x); });
|
|
128
|
+
// `totalNoThrow` is self-contained (council): it exercises the function and returns false on a throw โ the
|
|
129
|
+
// violation is recorded via the normal `!check` path, NOT by relying on the runner's catch. The `typeof`
|
|
130
|
+
// guard only avoids a TypeError on a non-function `fn` (e.g. a roundtrip pair).
|
|
131
|
+
if (contract.totalNoThrow)
|
|
132
|
+
add("totalNoThrow", "must not throw on a valid input", (f, x) => { try {
|
|
133
|
+
if (typeof f === "function")
|
|
134
|
+
f(x);
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
return false;
|
|
139
|
+
} });
|
|
140
|
+
return inv;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Run derived `invariants` against `fn` over `opts.trials` generated inputs (default 200). Returns the
|
|
144
|
+
* violated invariants (first triggering input each).
|
|
145
|
+
*
|
|
146
|
+
* ๐ด Runs `fn` **in the caller's process** (design/58 ยง1.2). Pass only a TRUSTED `fn`, or invoke this INSIDE
|
|
147
|
+
* the worker's sandbox (a generated test the leader drops into the env and runs via `runExecGate`, gating on
|
|
148
|
+
* exit code). **Non-termination is NOT caught here** โ a sync infinite loop blocks the call; bound it with the
|
|
149
|
+
* env/exec timeout. An impl throw is detected by the self-contained `totalNoThrow` invariant (recorded ONLY
|
|
150
|
+
* when totality was contracted โ soundness over recall); the runner's `catch` is just a safety net so one
|
|
151
|
+
* pathological input can't crash the whole run. Note: `fn` is invoked once per invariant per trial (twice for
|
|
152
|
+
* `idempotent`/`involution`) โ pass a PURE function (the intended use); a side-effecting `fn` is amplified.
|
|
153
|
+
*/
|
|
154
|
+
export function checkInvariants(fn, genInput, invariants, opts = {}) {
|
|
155
|
+
const trials = Math.max(1, Math.floor(opts.trials ?? 200));
|
|
156
|
+
const found = new Map();
|
|
157
|
+
for (let i = 0; i < trials; i++) {
|
|
158
|
+
const input = genInput(i);
|
|
159
|
+
for (const iv of invariants) {
|
|
160
|
+
if (found.has(iv.kind))
|
|
161
|
+
continue; // first triggering input is enough per kind
|
|
162
|
+
try {
|
|
163
|
+
if (!iv.check(fn, input))
|
|
164
|
+
found.set(iv.kind, { kind: iv.kind, description: iv.description, input });
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// A-5 fold (round-2 audit): a throw here has TWO possible sources and they must not be
|
|
168
|
+
// conflated. RE-PROBE fn(input) directly to tell them apart:
|
|
169
|
+
// - fn itself throws โ an impl throw: `totalNoThrow`'s domain (recorded only when totality
|
|
170
|
+
// was contracted โ soundness over recall). Skip, so it isn't misattributed to this kind.
|
|
171
|
+
// - fn returns normally โ the throw came from THIS check inspecting a structurally WRONG
|
|
172
|
+
// return value (`.map`/`.length`/spread on undefined/number โ the most common worker
|
|
173
|
+
// structural bug). That IS a violation of this kind: the output doesn't even have the
|
|
174
|
+
// shape the contract implies. Record it (closes the completeness gap where deterministic
|
|
175
|
+
// wrong-type returns sailed through as {ok:true} with zero signal).
|
|
176
|
+
// The probe costs one extra fn call on an already-pathological input; fn is contractually
|
|
177
|
+
// PURE (see the runner JSDoc), and the found-set caps this at one probe per kind.
|
|
178
|
+
try {
|
|
179
|
+
if (typeof fn === "function")
|
|
180
|
+
fn(input);
|
|
181
|
+
found.set(iv.kind, { kind: iv.kind, description: iv.description, input, evaluationThrew: true });
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
/* impl throw โ totalNoThrow's job (when contracted); not this kind's violation */
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const violations = [...found.values()];
|
|
190
|
+
return { ok: violations.length === 0, violations, trials };
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=property-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-harness.js","sourceRoot":"","sources":["../../src/core/property-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AA+FH,2FAA2F;AAC3F;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,CAAU,EAAE,OAAwB,IAAI,OAAO,EAAE;IAC9D,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAC9B,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IACxC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC;IACnB,IAAI,CAAC,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,C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AAe,EAAE,IAAI,EAAE,CAAC,CAAC;gBACnG,CAAC;gBAAC,MAAM,CAAC;oBACP,kFAAkF;gBACpF,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** A minimal async iterable you can push values into and close. Backpressure-free (buffers). */
|
|
2
|
+
export declare class PushQueue<T> implements AsyncIterable<T> {
|
|
3
|
+
private buffer;
|
|
4
|
+
private waiters;
|
|
5
|
+
private closed;
|
|
6
|
+
push(value: T): void;
|
|
7
|
+
close(): void;
|
|
8
|
+
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=push-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-queue.d.ts","sourceRoot":"","sources":["../../src/core/push-queue.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,qBAAa,SAAS,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IACnD,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,MAAM,CAAS;IAEvB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAYpB,KAAK,IAAI,IAAI;IAON,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;CAelD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** A minimal async iterable you can push values into and close. Backpressure-free (buffers). */
|
|
2
|
+
export class PushQueue {
|
|
3
|
+
buffer = [];
|
|
4
|
+
waiters = [];
|
|
5
|
+
closed = false;
|
|
6
|
+
push(value) {
|
|
7
|
+
if (this.closed) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const waiter = this.waiters.shift();
|
|
11
|
+
if (waiter) {
|
|
12
|
+
waiter({ value, done: false });
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.buffer.push(value);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
close() {
|
|
19
|
+
this.closed = true;
|
|
20
|
+
while (this.waiters.length > 0) {
|
|
21
|
+
this.waiters.shift()({ value: undefined, done: true });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async *[Symbol.asyncIterator]() {
|
|
25
|
+
for (;;) {
|
|
26
|
+
if (this.buffer.length > 0) {
|
|
27
|
+
yield this.buffer.shift();
|
|
28
|
+
}
|
|
29
|
+
else if (this.closed) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const r = await new Promise((resolve) => this.waiters.push(resolve));
|
|
34
|
+
if (r.done) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
yield r.value;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=push-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-queue.js","sourceRoot":"","sources":["../../src/core/push-queue.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,OAAO,SAAS;IACZ,MAAM,GAAQ,EAAE,CAAC;IACjB,OAAO,GAAuC,EAAE,CAAC;IACjD,MAAM,GAAG,KAAK,CAAC;IAEvB,IAAI,CAAC,KAAQ;QACX,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,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