synorch 0.2.0 → 0.4.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -1
- package/README.md +338 -28
- package/dist/application/doctor-service.d.ts +16 -0
- package/dist/application/doctor-service.d.ts.map +1 -1
- package/dist/application/doctor-service.js +230 -32
- package/dist/application/doctor-service.js.map +1 -1
- package/dist/application/generated-skill-doctor.d.ts +9 -0
- package/dist/application/generated-skill-doctor.d.ts.map +1 -0
- package/dist/application/generated-skill-doctor.js +433 -0
- package/dist/application/generated-skill-doctor.js.map +1 -0
- package/dist/application/project-discovery.d.ts +26 -1
- package/dist/application/project-discovery.d.ts.map +1 -1
- package/dist/application/project-discovery.js +99 -6
- package/dist/application/project-discovery.js.map +1 -1
- package/dist/application/safe-path.d.ts +19 -0
- package/dist/application/safe-path.d.ts.map +1 -0
- package/dist/application/safe-path.js +35 -0
- package/dist/application/safe-path.js.map +1 -0
- package/dist/application/size-ceiling.d.ts +15 -0
- package/dist/application/size-ceiling.d.ts.map +1 -0
- package/dist/application/size-ceiling.js +32 -0
- package/dist/application/size-ceiling.js.map +1 -0
- package/dist/application/structure-service.d.ts.map +1 -1
- package/dist/application/structure-service.js +10 -1
- package/dist/application/structure-service.js.map +1 -1
- package/dist/build-info.json +4 -0
- package/dist/cli.js +135 -18
- package/dist/cli.js.map +1 -1
- package/dist/domain/canonical-contracts.d.ts +69 -0
- package/dist/domain/canonical-contracts.d.ts.map +1 -0
- package/dist/domain/canonical-contracts.js +92 -0
- package/dist/domain/canonical-contracts.js.map +1 -0
- package/dist/domain/generated-skill.d.ts +55 -0
- package/dist/domain/generated-skill.d.ts.map +1 -0
- package/dist/domain/generated-skill.js +90 -0
- package/dist/domain/generated-skill.js.map +1 -0
- package/dist/domain/generation.d.ts +15 -2
- package/dist/domain/generation.d.ts.map +1 -1
- package/dist/domain/observation-ledger.d.ts +118 -0
- package/dist/domain/observation-ledger.d.ts.map +1 -0
- package/dist/domain/observation-ledger.js +183 -0
- package/dist/domain/observation-ledger.js.map +1 -0
- package/dist/domain/product.d.ts +1 -1
- package/dist/domain/product.d.ts.map +1 -1
- package/dist/domain/product.js +1 -1
- package/dist/domain/product.js.map +1 -1
- package/dist/domain/relative-path.d.ts +21 -0
- package/dist/domain/relative-path.d.ts.map +1 -0
- package/dist/domain/relative-path.js +43 -0
- package/dist/domain/relative-path.js.map +1 -0
- package/dist/domain/skill-packs.d.ts.map +1 -1
- package/dist/domain/skill-packs.js +1 -0
- package/dist/domain/skill-packs.js.map +1 -1
- package/dist/domain/suggest.d.ts +5 -0
- package/dist/domain/suggest.d.ts.map +1 -0
- package/dist/domain/suggest.js +32 -0
- package/dist/domain/suggest.js.map +1 -0
- package/dist/domain/zod-issues.d.ts +21 -0
- package/dist/domain/zod-issues.d.ts.map +1 -0
- package/dist/domain/zod-issues.js +27 -0
- package/dist/domain/zod-issues.js.map +1 -0
- package/dist/harness/auth/api-key.d.ts +13 -0
- package/dist/harness/auth/api-key.d.ts.map +1 -0
- package/dist/harness/auth/api-key.js +87 -0
- package/dist/harness/auth/api-key.js.map +1 -0
- package/dist/harness/auth/claude-bridge.d.ts +22 -0
- package/dist/harness/auth/claude-bridge.d.ts.map +1 -0
- package/dist/harness/auth/claude-bridge.js +92 -0
- package/dist/harness/auth/claude-bridge.js.map +1 -0
- package/dist/harness/auth/command.d.ts +17 -0
- package/dist/harness/auth/command.d.ts.map +1 -0
- package/dist/harness/auth/command.js +223 -0
- package/dist/harness/auth/command.js.map +1 -0
- package/dist/harness/auth/credential-store.d.ts +30 -0
- package/dist/harness/auth/credential-store.d.ts.map +1 -0
- package/dist/harness/auth/credential-store.js +270 -0
- package/dist/harness/auth/credential-store.js.map +1 -0
- package/dist/harness/auth/index.d.ts +13 -0
- package/dist/harness/auth/index.d.ts.map +1 -0
- package/dist/harness/auth/index.js +10 -0
- package/dist/harness/auth/index.js.map +1 -0
- package/dist/harness/auth/json-file.d.ts +8 -0
- package/dist/harness/auth/json-file.d.ts.map +1 -0
- package/dist/harness/auth/json-file.js +57 -0
- package/dist/harness/auth/json-file.js.map +1 -0
- package/dist/harness/auth/jwt.d.ts +11 -0
- package/dist/harness/auth/jwt.d.ts.map +1 -0
- package/dist/harness/auth/jwt.js +37 -0
- package/dist/harness/auth/jwt.js.map +1 -0
- package/dist/harness/auth/keychain.d.ts +39 -0
- package/dist/harness/auth/keychain.d.ts.map +1 -0
- package/dist/harness/auth/keychain.js +191 -0
- package/dist/harness/auth/keychain.js.map +1 -0
- package/dist/harness/auth/locks.d.ts +19 -0
- package/dist/harness/auth/locks.d.ts.map +1 -0
- package/dist/harness/auth/locks.js +102 -0
- package/dist/harness/auth/locks.js.map +1 -0
- package/dist/harness/auth/notices.d.ts +6 -0
- package/dist/harness/auth/notices.d.ts.map +1 -0
- package/dist/harness/auth/notices.js +29 -0
- package/dist/harness/auth/notices.js.map +1 -0
- package/dist/harness/auth/openai-chatgpt.d.ts +32 -0
- package/dist/harness/auth/openai-chatgpt.d.ts.map +1 -0
- package/dist/harness/auth/openai-chatgpt.js +446 -0
- package/dist/harness/auth/openai-chatgpt.js.map +1 -0
- package/dist/harness/auth/profile-state.d.ts +25 -0
- package/dist/harness/auth/profile-state.d.ts.map +1 -0
- package/dist/harness/auth/profile-state.js +77 -0
- package/dist/harness/auth/profile-state.js.map +1 -0
- package/dist/harness/auth/providers.d.ts +27 -0
- package/dist/harness/auth/providers.d.ts.map +1 -0
- package/dist/harness/auth/providers.js +66 -0
- package/dist/harness/auth/providers.js.map +1 -0
- package/dist/harness/auth/resolved-credential.d.ts +11 -0
- package/dist/harness/auth/resolved-credential.d.ts.map +1 -0
- package/dist/harness/auth/resolved-credential.js +35 -0
- package/dist/harness/auth/resolved-credential.js.map +1 -0
- package/dist/harness/cli/appearance.d.ts +28 -0
- package/dist/harness/cli/appearance.d.ts.map +1 -0
- package/dist/harness/cli/appearance.js +123 -0
- package/dist/harness/cli/appearance.js.map +1 -0
- package/dist/harness/cli/args.d.ts +429 -0
- package/dist/harness/cli/args.d.ts.map +1 -0
- package/dist/harness/cli/args.js +372 -0
- package/dist/harness/cli/args.js.map +1 -0
- package/dist/harness/cli/attachments.d.ts +44 -0
- package/dist/harness/cli/attachments.d.ts.map +1 -0
- package/dist/harness/cli/attachments.js +176 -0
- package/dist/harness/cli/attachments.js.map +1 -0
- package/dist/harness/cli/canonical.d.ts +64 -0
- package/dist/harness/cli/canonical.d.ts.map +1 -0
- package/dist/harness/cli/canonical.js +455 -0
- package/dist/harness/cli/canonical.js.map +1 -0
- package/dist/harness/cli/claude-native-approvals.d.ts +45 -0
- package/dist/harness/cli/claude-native-approvals.d.ts.map +1 -0
- package/dist/harness/cli/claude-native-approvals.js +183 -0
- package/dist/harness/cli/claude-native-approvals.js.map +1 -0
- package/dist/harness/cli/command-grants.d.ts +23 -0
- package/dist/harness/cli/command-grants.d.ts.map +1 -0
- package/dist/harness/cli/command-grants.js +76 -0
- package/dist/harness/cli/command-grants.js.map +1 -0
- package/dist/harness/cli/config-command.d.ts +98 -0
- package/dist/harness/cli/config-command.d.ts.map +1 -0
- package/dist/harness/cli/config-command.js +561 -0
- package/dist/harness/cli/config-command.js.map +1 -0
- package/dist/harness/cli/config.d.ts +429 -0
- package/dist/harness/cli/config.d.ts.map +1 -0
- package/dist/harness/cli/config.js +504 -0
- package/dist/harness/cli/config.js.map +1 -0
- package/dist/harness/cli/conversation.d.ts +35 -0
- package/dist/harness/cli/conversation.d.ts.map +1 -0
- package/dist/harness/cli/conversation.js +3755 -0
- package/dist/harness/cli/conversation.js.map +1 -0
- package/dist/harness/cli/doctor.d.ts +32 -0
- package/dist/harness/cli/doctor.d.ts.map +1 -0
- package/dist/harness/cli/doctor.js +329 -0
- package/dist/harness/cli/doctor.js.map +1 -0
- package/dist/harness/cli/effort-command.d.ts +41 -0
- package/dist/harness/cli/effort-command.d.ts.map +1 -0
- package/dist/harness/cli/effort-command.js +133 -0
- package/dist/harness/cli/effort-command.js.map +1 -0
- package/dist/harness/cli/extensions/agents.d.ts +40 -0
- package/dist/harness/cli/extensions/agents.d.ts.map +1 -0
- package/dist/harness/cli/extensions/agents.js +66 -0
- package/dist/harness/cli/extensions/agents.js.map +1 -0
- package/dist/harness/cli/extensions/catalog.d.ts +134 -0
- package/dist/harness/cli/extensions/catalog.d.ts.map +1 -0
- package/dist/harness/cli/extensions/catalog.js +213 -0
- package/dist/harness/cli/extensions/catalog.js.map +1 -0
- package/dist/harness/cli/extensions/claude-home.d.ts +33 -0
- package/dist/harness/cli/extensions/claude-home.d.ts.map +1 -0
- package/dist/harness/cli/extensions/claude-home.js +78 -0
- package/dist/harness/cli/extensions/claude-home.js.map +1 -0
- package/dist/harness/cli/extensions/controller.d.ts +51 -0
- package/dist/harness/cli/extensions/controller.d.ts.map +1 -0
- package/dist/harness/cli/extensions/controller.js +67 -0
- package/dist/harness/cli/extensions/controller.js.map +1 -0
- package/dist/harness/cli/extensions/hooks.d.ts +164 -0
- package/dist/harness/cli/extensions/hooks.d.ts.map +1 -0
- package/dist/harness/cli/extensions/hooks.js +442 -0
- package/dist/harness/cli/extensions/hooks.js.map +1 -0
- package/dist/harness/cli/extensions/index.d.ts +10 -0
- package/dist/harness/cli/extensions/index.d.ts.map +1 -0
- package/dist/harness/cli/extensions/index.js +10 -0
- package/dist/harness/cli/extensions/index.js.map +1 -0
- package/dist/harness/cli/extensions/markdown.d.ts +46 -0
- package/dist/harness/cli/extensions/markdown.d.ts.map +1 -0
- package/dist/harness/cli/extensions/markdown.js +139 -0
- package/dist/harness/cli/extensions/markdown.js.map +1 -0
- package/dist/harness/cli/extensions/plugins.d.ts +160 -0
- package/dist/harness/cli/extensions/plugins.d.ts.map +1 -0
- package/dist/harness/cli/extensions/plugins.js +645 -0
- package/dist/harness/cli/extensions/plugins.js.map +1 -0
- package/dist/harness/cli/extensions/tool-hooks.d.ts +28 -0
- package/dist/harness/cli/extensions/tool-hooks.d.ts.map +1 -0
- package/dist/harness/cli/extensions/tool-hooks.js +63 -0
- package/dist/harness/cli/extensions/tool-hooks.js.map +1 -0
- package/dist/harness/cli/extensions-command.d.ts +64 -0
- package/dist/harness/cli/extensions-command.d.ts.map +1 -0
- package/dist/harness/cli/extensions-command.js +639 -0
- package/dist/harness/cli/extensions-command.js.map +1 -0
- package/dist/harness/cli/help.d.ts +9 -0
- package/dist/harness/cli/help.d.ts.map +1 -0
- package/dist/harness/cli/help.js +191 -0
- package/dist/harness/cli/help.js.map +1 -0
- package/dist/harness/cli/index.d.ts +52 -0
- package/dist/harness/cli/index.d.ts.map +1 -0
- package/dist/harness/cli/index.js +297 -0
- package/dist/harness/cli/index.js.map +1 -0
- package/dist/harness/cli/inspect.d.ts +40 -0
- package/dist/harness/cli/inspect.d.ts.map +1 -0
- package/dist/harness/cli/inspect.js +185 -0
- package/dist/harness/cli/inspect.js.map +1 -0
- package/dist/harness/cli/mcp-command.d.ts +61 -0
- package/dist/harness/cli/mcp-command.d.ts.map +1 -0
- package/dist/harness/cli/mcp-command.js +519 -0
- package/dist/harness/cli/mcp-command.js.map +1 -0
- package/dist/harness/cli/memory-desk.d.ts +28 -0
- package/dist/harness/cli/memory-desk.d.ts.map +1 -0
- package/dist/harness/cli/memory-desk.js +275 -0
- package/dist/harness/cli/memory-desk.js.map +1 -0
- package/dist/harness/cli/model-picker.d.ts +44 -0
- package/dist/harness/cli/model-picker.d.ts.map +1 -0
- package/dist/harness/cli/model-picker.js +267 -0
- package/dist/harness/cli/model-picker.js.map +1 -0
- package/dist/harness/cli/onboarding.d.ts +29 -0
- package/dist/harness/cli/onboarding.d.ts.map +1 -0
- package/dist/harness/cli/onboarding.js +101 -0
- package/dist/harness/cli/onboarding.js.map +1 -0
- package/dist/harness/cli/orchestrate-tool.d.ts +60 -0
- package/dist/harness/cli/orchestrate-tool.d.ts.map +1 -0
- package/dist/harness/cli/orchestrate-tool.js +167 -0
- package/dist/harness/cli/orchestrate-tool.js.map +1 -0
- package/dist/harness/cli/orchestration-view.d.ts +57 -0
- package/dist/harness/cli/orchestration-view.d.ts.map +1 -0
- package/dist/harness/cli/orchestration-view.js +371 -0
- package/dist/harness/cli/orchestration-view.js.map +1 -0
- package/dist/harness/cli/outcome.d.ts +11 -0
- package/dist/harness/cli/outcome.d.ts.map +1 -0
- package/dist/harness/cli/outcome.js +70 -0
- package/dist/harness/cli/outcome.js.map +1 -0
- package/dist/harness/cli/panels/common.d.ts +30 -0
- package/dist/harness/cli/panels/common.d.ts.map +1 -0
- package/dist/harness/cli/panels/common.js +143 -0
- package/dist/harness/cli/panels/common.js.map +1 -0
- package/dist/harness/cli/panels/mcp.d.ts +18 -0
- package/dist/harness/cli/panels/mcp.d.ts.map +1 -0
- package/dist/harness/cli/panels/mcp.js +132 -0
- package/dist/harness/cli/panels/mcp.js.map +1 -0
- package/dist/harness/cli/panels/plugins.d.ts +8 -0
- package/dist/harness/cli/panels/plugins.d.ts.map +1 -0
- package/dist/harness/cli/panels/plugins.js +114 -0
- package/dist/harness/cli/panels/plugins.js.map +1 -0
- package/dist/harness/cli/panels/session.d.ts +54 -0
- package/dist/harness/cli/panels/session.d.ts.map +1 -0
- package/dist/harness/cli/panels/session.js +221 -0
- package/dist/harness/cli/panels/session.js.map +1 -0
- package/dist/harness/cli/panels/skills.d.ts +16 -0
- package/dist/harness/cli/panels/skills.d.ts.map +1 -0
- package/dist/harness/cli/panels/skills.js +146 -0
- package/dist/harness/cli/panels/skills.js.map +1 -0
- package/dist/harness/cli/project-profile.d.ts +87 -0
- package/dist/harness/cli/project-profile.d.ts.map +1 -0
- package/dist/harness/cli/project-profile.js +709 -0
- package/dist/harness/cli/project-profile.js.map +1 -0
- package/dist/harness/cli/project-scope.d.ts +2 -0
- package/dist/harness/cli/project-scope.d.ts.map +1 -0
- package/dist/harness/cli/project-scope.js +55 -0
- package/dist/harness/cli/project-scope.js.map +1 -0
- package/dist/harness/cli/renderers.d.ts +75 -0
- package/dist/harness/cli/renderers.d.ts.map +1 -0
- package/dist/harness/cli/renderers.js +162 -0
- package/dist/harness/cli/renderers.js.map +1 -0
- package/dist/harness/cli/rewind.d.ts +54 -0
- package/dist/harness/cli/rewind.d.ts.map +1 -0
- package/dist/harness/cli/rewind.js +80 -0
- package/dist/harness/cli/rewind.js.map +1 -0
- package/dist/harness/cli/role-policy.d.ts +8 -0
- package/dist/harness/cli/role-policy.d.ts.map +1 -0
- package/dist/harness/cli/role-policy.js +53 -0
- package/dist/harness/cli/role-policy.js.map +1 -0
- package/dist/harness/cli/run-summary.d.ts +16 -0
- package/dist/harness/cli/run-summary.d.ts.map +1 -0
- package/dist/harness/cli/run-summary.js +105 -0
- package/dist/harness/cli/run-summary.js.map +1 -0
- package/dist/harness/cli/runtime.d.ts +182 -0
- package/dist/harness/cli/runtime.d.ts.map +1 -0
- package/dist/harness/cli/runtime.js +999 -0
- package/dist/harness/cli/runtime.js.map +1 -0
- package/dist/harness/cli/scripted-script.d.ts +50 -0
- package/dist/harness/cli/scripted-script.d.ts.map +1 -0
- package/dist/harness/cli/scripted-script.js +110 -0
- package/dist/harness/cli/scripted-script.js.map +1 -0
- package/dist/harness/cli/session-git.d.ts +76 -0
- package/dist/harness/cli/session-git.d.ts.map +1 -0
- package/dist/harness/cli/session-git.js +146 -0
- package/dist/harness/cli/session-git.js.map +1 -0
- package/dist/harness/cli/session.d.ts +22 -0
- package/dist/harness/cli/session.d.ts.map +1 -0
- package/dist/harness/cli/session.js +203 -0
- package/dist/harness/cli/session.js.map +1 -0
- package/dist/harness/cli/slash-commands.d.ts +85 -0
- package/dist/harness/cli/slash-commands.d.ts.map +1 -0
- package/dist/harness/cli/slash-commands.js +114 -0
- package/dist/harness/cli/slash-commands.js.map +1 -0
- package/dist/harness/cli/startup-notices.d.ts +32 -0
- package/dist/harness/cli/startup-notices.d.ts.map +1 -0
- package/dist/harness/cli/startup-notices.js +93 -0
- package/dist/harness/cli/startup-notices.js.map +1 -0
- package/dist/harness/cli/terminal.d.ts +32 -0
- package/dist/harness/cli/terminal.d.ts.map +1 -0
- package/dist/harness/cli/terminal.js +21 -0
- package/dist/harness/cli/terminal.js.map +1 -0
- package/dist/harness/cli/transparency.d.ts +39 -0
- package/dist/harness/cli/transparency.d.ts.map +1 -0
- package/dist/harness/cli/transparency.js +491 -0
- package/dist/harness/cli/transparency.js.map +1 -0
- package/dist/harness/cli/trust.d.ts +40 -0
- package/dist/harness/cli/trust.d.ts.map +1 -0
- package/dist/harness/cli/trust.js +133 -0
- package/dist/harness/cli/trust.js.map +1 -0
- package/dist/harness/cli/usage-stats.d.ts +57 -0
- package/dist/harness/cli/usage-stats.d.ts.map +1 -0
- package/dist/harness/cli/usage-stats.js +341 -0
- package/dist/harness/cli/usage-stats.js.map +1 -0
- package/dist/harness/context/compaction.d.ts +69 -0
- package/dist/harness/context/compaction.d.ts.map +1 -0
- package/dist/harness/context/compaction.js +149 -0
- package/dist/harness/context/compaction.js.map +1 -0
- package/dist/harness/context/context-builder.d.ts +76 -0
- package/dist/harness/context/context-builder.d.ts.map +1 -0
- package/dist/harness/context/context-builder.js +367 -0
- package/dist/harness/context/context-builder.js.map +1 -0
- package/dist/harness/context/history.d.ts +31 -0
- package/dist/harness/context/history.d.ts.map +1 -0
- package/dist/harness/context/history.js +105 -0
- package/dist/harness/context/history.js.map +1 -0
- package/dist/harness/context/index.d.ts +11 -0
- package/dist/harness/context/index.d.ts.map +1 -0
- package/dist/harness/context/index.js +9 -0
- package/dist/harness/context/index.js.map +1 -0
- package/dist/harness/context/instructions.d.ts +30 -0
- package/dist/harness/context/instructions.d.ts.map +1 -0
- package/dist/harness/context/instructions.js +82 -0
- package/dist/harness/context/instructions.js.map +1 -0
- package/dist/harness/context/model-view.d.ts +46 -0
- package/dist/harness/context/model-view.d.ts.map +1 -0
- package/dist/harness/context/model-view.js +136 -0
- package/dist/harness/context/model-view.js.map +1 -0
- package/dist/harness/context/scope.d.ts +9 -0
- package/dist/harness/context/scope.d.ts.map +1 -0
- package/dist/harness/context/scope.js +50 -0
- package/dist/harness/context/scope.js.map +1 -0
- package/dist/harness/context/skills.d.ts +75 -0
- package/dist/harness/context/skills.d.ts.map +1 -0
- package/dist/harness/context/skills.js +109 -0
- package/dist/harness/context/skills.js.map +1 -0
- package/dist/harness/context/tokens.d.ts +10 -0
- package/dist/harness/context/tokens.d.ts.map +1 -0
- package/dist/harness/context/tokens.js +39 -0
- package/dist/harness/context/tokens.js.map +1 -0
- package/dist/harness/contracts/auth.d.ts +214 -0
- package/dist/harness/contracts/auth.d.ts.map +1 -0
- package/dist/harness/contracts/auth.js +120 -0
- package/dist/harness/contracts/auth.js.map +1 -0
- package/dist/harness/contracts/choice.d.ts +115 -0
- package/dist/harness/contracts/choice.d.ts.map +1 -0
- package/dist/harness/contracts/choice.js +115 -0
- package/dist/harness/contracts/choice.js.map +1 -0
- package/dist/harness/contracts/common.d.ts +119 -0
- package/dist/harness/contracts/common.d.ts.map +1 -0
- package/dist/harness/contracts/common.js +66 -0
- package/dist/harness/contracts/common.js.map +1 -0
- package/dist/harness/contracts/digest.d.ts +59 -0
- package/dist/harness/contracts/digest.d.ts.map +1 -0
- package/dist/harness/contracts/digest.js +88 -0
- package/dist/harness/contracts/digest.js.map +1 -0
- package/dist/harness/contracts/errors.d.ts +70 -0
- package/dist/harness/contracts/errors.d.ts.map +1 -0
- package/dist/harness/contracts/errors.js +87 -0
- package/dist/harness/contracts/errors.js.map +1 -0
- package/dist/harness/contracts/events.d.ts +3094 -0
- package/dist/harness/contracts/events.d.ts.map +1 -0
- package/dist/harness/contracts/events.js +426 -0
- package/dist/harness/contracts/events.js.map +1 -0
- package/dist/harness/contracts/evidence.d.ts +286 -0
- package/dist/harness/contracts/evidence.d.ts.map +1 -0
- package/dist/harness/contracts/evidence.js +234 -0
- package/dist/harness/contracts/evidence.js.map +1 -0
- package/dist/harness/contracts/ids.d.ts +77 -0
- package/dist/harness/contracts/ids.d.ts.map +1 -0
- package/dist/harness/contracts/ids.js +126 -0
- package/dist/harness/contracts/ids.js.map +1 -0
- package/dist/harness/contracts/index.d.ts +23 -0
- package/dist/harness/contracts/index.d.ts.map +1 -0
- package/dist/harness/contracts/index.js +23 -0
- package/dist/harness/contracts/index.js.map +1 -0
- package/dist/harness/contracts/jsonl.d.ts +3386 -0
- package/dist/harness/contracts/jsonl.d.ts.map +1 -0
- package/dist/harness/contracts/jsonl.js +87 -0
- package/dist/harness/contracts/jsonl.js.map +1 -0
- package/dist/harness/contracts/memory.d.ts +271 -0
- package/dist/harness/contracts/memory.d.ts.map +1 -0
- package/dist/harness/contracts/memory.js +152 -0
- package/dist/harness/contracts/memory.js.map +1 -0
- package/dist/harness/contracts/model.d.ts +1201 -0
- package/dist/harness/contracts/model.d.ts.map +1 -0
- package/dist/harness/contracts/model.js +386 -0
- package/dist/harness/contracts/model.js.map +1 -0
- package/dist/harness/contracts/packets.d.ts +945 -0
- package/dist/harness/contracts/packets.d.ts.map +1 -0
- package/dist/harness/contracts/packets.js +535 -0
- package/dist/harness/contracts/packets.js.map +1 -0
- package/dist/harness/contracts/panel.d.ts +140 -0
- package/dist/harness/contracts/panel.d.ts.map +1 -0
- package/dist/harness/contracts/panel.js +19 -0
- package/dist/harness/contracts/panel.js.map +1 -0
- package/dist/harness/contracts/paths.d.ts +58 -0
- package/dist/harness/contracts/paths.d.ts.map +1 -0
- package/dist/harness/contracts/paths.js +204 -0
- package/dist/harness/contracts/paths.js.map +1 -0
- package/dist/harness/contracts/policy.d.ts +459 -0
- package/dist/harness/contracts/policy.d.ts.map +1 -0
- package/dist/harness/contracts/policy.js +338 -0
- package/dist/harness/contracts/policy.js.map +1 -0
- package/dist/harness/contracts/projection.d.ts +111 -0
- package/dist/harness/contracts/projection.d.ts.map +1 -0
- package/dist/harness/contracts/projection.js +2 -0
- package/dist/harness/contracts/projection.js.map +1 -0
- package/dist/harness/contracts/renderer.d.ts +291 -0
- package/dist/harness/contracts/renderer.d.ts.map +1 -0
- package/dist/harness/contracts/renderer.js +36 -0
- package/dist/harness/contracts/renderer.js.map +1 -0
- package/dist/harness/contracts/roles.d.ts +28 -0
- package/dist/harness/contracts/roles.d.ts.map +1 -0
- package/dist/harness/contracts/roles.js +36 -0
- package/dist/harness/contracts/roles.js.map +1 -0
- package/dist/harness/contracts/runtime.d.ts +283 -0
- package/dist/harness/contracts/runtime.d.ts.map +1 -0
- package/dist/harness/contracts/runtime.js +13 -0
- package/dist/harness/contracts/runtime.js.map +1 -0
- package/dist/harness/contracts/state.d.ts +124 -0
- package/dist/harness/contracts/state.d.ts.map +1 -0
- package/dist/harness/contracts/state.js +172 -0
- package/dist/harness/contracts/state.js.map +1 -0
- package/dist/harness/contracts/store.d.ts +117 -0
- package/dist/harness/contracts/store.d.ts.map +1 -0
- package/dist/harness/contracts/store.js +54 -0
- package/dist/harness/contracts/store.js.map +1 -0
- package/dist/harness/contracts/tools.d.ts +296 -0
- package/dist/harness/contracts/tools.d.ts.map +1 -0
- package/dist/harness/contracts/tools.js +117 -0
- package/dist/harness/contracts/tools.js.map +1 -0
- package/dist/harness/contracts/views.d.ts +468 -0
- package/dist/harness/contracts/views.d.ts.map +1 -0
- package/dist/harness/contracts/views.js +2 -0
- package/dist/harness/contracts/views.js.map +1 -0
- package/dist/harness/core/driver.d.ts +53 -0
- package/dist/harness/core/driver.d.ts.map +1 -0
- package/dist/harness/core/driver.js +566 -0
- package/dist/harness/core/driver.js.map +1 -0
- package/dist/harness/core/envelope.d.ts +11 -0
- package/dist/harness/core/envelope.d.ts.map +1 -0
- package/dist/harness/core/envelope.js +35 -0
- package/dist/harness/core/envelope.js.map +1 -0
- package/dist/harness/core/index.d.ts +7 -0
- package/dist/harness/core/index.d.ts.map +1 -0
- package/dist/harness/core/index.js +5 -0
- package/dist/harness/core/index.js.map +1 -0
- package/dist/harness/core/projection.d.ts +10 -0
- package/dist/harness/core/projection.d.ts.map +1 -0
- package/dist/harness/core/projection.js +268 -0
- package/dist/harness/core/projection.js.map +1 -0
- package/dist/harness/core/recovery.d.ts +14 -0
- package/dist/harness/core/recovery.d.ts.map +1 -0
- package/dist/harness/core/recovery.js +115 -0
- package/dist/harness/core/recovery.js.map +1 -0
- package/dist/harness/core/stream.d.ts +23 -0
- package/dist/harness/core/stream.d.ts.map +1 -0
- package/dist/harness/core/stream.js +102 -0
- package/dist/harness/core/stream.js.map +1 -0
- package/dist/harness/core/testing.d.ts +80 -0
- package/dist/harness/core/testing.d.ts.map +1 -0
- package/dist/harness/core/testing.js +258 -0
- package/dist/harness/core/testing.js.map +1 -0
- package/dist/harness/mcp/approvals.d.ts +14 -0
- package/dist/harness/mcp/approvals.d.ts.map +1 -0
- package/dist/harness/mcp/approvals.js +60 -0
- package/dist/harness/mcp/approvals.js.map +1 -0
- package/dist/harness/mcp/client.d.ts +74 -0
- package/dist/harness/mcp/client.d.ts.map +1 -0
- package/dist/harness/mcp/client.js +214 -0
- package/dist/harness/mcp/client.js.map +1 -0
- package/dist/harness/mcp/config.d.ts +156 -0
- package/dist/harness/mcp/config.d.ts.map +1 -0
- package/dist/harness/mcp/config.js +180 -0
- package/dist/harness/mcp/config.js.map +1 -0
- package/dist/harness/mcp/errors.d.ts +24 -0
- package/dist/harness/mcp/errors.d.ts.map +1 -0
- package/dist/harness/mcp/errors.js +67 -0
- package/dist/harness/mcp/errors.js.map +1 -0
- package/dist/harness/mcp/index.d.ts +9 -0
- package/dist/harness/mcp/index.d.ts.map +1 -0
- package/dist/harness/mcp/index.js +9 -0
- package/dist/harness/mcp/index.js.map +1 -0
- package/dist/harness/mcp/manager.d.ts +115 -0
- package/dist/harness/mcp/manager.d.ts.map +1 -0
- package/dist/harness/mcp/manager.js +361 -0
- package/dist/harness/mcp/manager.js.map +1 -0
- package/dist/harness/mcp/oauth.d.ts +54 -0
- package/dist/harness/mcp/oauth.d.ts.map +1 -0
- package/dist/harness/mcp/oauth.js +253 -0
- package/dist/harness/mcp/oauth.js.map +1 -0
- package/dist/harness/mcp/tools.d.ts +24 -0
- package/dist/harness/mcp/tools.d.ts.map +1 -0
- package/dist/harness/mcp/tools.js +142 -0
- package/dist/harness/mcp/tools.js.map +1 -0
- package/dist/harness/memory/bootstrap.d.ts +55 -0
- package/dist/harness/memory/bootstrap.d.ts.map +1 -0
- package/dist/harness/memory/bootstrap.js +124 -0
- package/dist/harness/memory/bootstrap.js.map +1 -0
- package/dist/harness/memory/desk.d.ts +74 -0
- package/dist/harness/memory/desk.d.ts.map +1 -0
- package/dist/harness/memory/desk.js +211 -0
- package/dist/harness/memory/desk.js.map +1 -0
- package/dist/harness/memory/graph.d.ts +24 -0
- package/dist/harness/memory/graph.d.ts.map +1 -0
- package/dist/harness/memory/graph.js +92 -0
- package/dist/harness/memory/graph.js.map +1 -0
- package/dist/harness/memory/index.d.ts +12 -0
- package/dist/harness/memory/index.d.ts.map +1 -0
- package/dist/harness/memory/index.js +10 -0
- package/dist/harness/memory/index.js.map +1 -0
- package/dist/harness/memory/markdown-memory-store.d.ts +122 -0
- package/dist/harness/memory/markdown-memory-store.d.ts.map +1 -0
- package/dist/harness/memory/markdown-memory-store.js +419 -0
- package/dist/harness/memory/markdown-memory-store.js.map +1 -0
- package/dist/harness/memory/memory-command.d.ts +22 -0
- package/dist/harness/memory/memory-command.d.ts.map +1 -0
- package/dist/harness/memory/memory-command.js +335 -0
- package/dist/harness/memory/memory-command.js.map +1 -0
- package/dist/harness/memory/memory-index.d.ts +71 -0
- package/dist/harness/memory/memory-index.d.ts.map +1 -0
- package/dist/harness/memory/memory-index.js +206 -0
- package/dist/harness/memory/memory-index.js.map +1 -0
- package/dist/harness/memory/note-format.d.ts +20 -0
- package/dist/harness/memory/note-format.d.ts.map +1 -0
- package/dist/harness/memory/note-format.js +69 -0
- package/dist/harness/memory/note-format.js.map +1 -0
- package/dist/harness/memory/obsidian.d.ts +14 -0
- package/dist/harness/memory/obsidian.d.ts.map +1 -0
- package/dist/harness/memory/obsidian.js +64 -0
- package/dist/harness/memory/obsidian.js.map +1 -0
- package/dist/harness/memory/redaction.d.ts +15 -0
- package/dist/harness/memory/redaction.d.ts.map +1 -0
- package/dist/harness/memory/redaction.js +64 -0
- package/dist/harness/memory/redaction.js.map +1 -0
- package/dist/harness/memory/relations.d.ts +29 -0
- package/dist/harness/memory/relations.d.ts.map +1 -0
- package/dist/harness/memory/relations.js +117 -0
- package/dist/harness/memory/relations.js.map +1 -0
- package/dist/harness/memory/vault.d.ts +35 -0
- package/dist/harness/memory/vault.d.ts.map +1 -0
- package/dist/harness/memory/vault.js +194 -0
- package/dist/harness/memory/vault.js.map +1 -0
- package/dist/harness/orchestration/approval.d.ts +29 -0
- package/dist/harness/orchestration/approval.d.ts.map +1 -0
- package/dist/harness/orchestration/approval.js +86 -0
- package/dist/harness/orchestration/approval.js.map +1 -0
- package/dist/harness/orchestration/artifact-review.d.ts +219 -0
- package/dist/harness/orchestration/artifact-review.d.ts.map +1 -0
- package/dist/harness/orchestration/artifact-review.js +319 -0
- package/dist/harness/orchestration/artifact-review.js.map +1 -0
- package/dist/harness/orchestration/attempt-log.d.ts +53 -0
- package/dist/harness/orchestration/attempt-log.d.ts.map +1 -0
- package/dist/harness/orchestration/attempt-log.js +138 -0
- package/dist/harness/orchestration/attempt-log.js.map +1 -0
- package/dist/harness/orchestration/budget.d.ts +110 -0
- package/dist/harness/orchestration/budget.d.ts.map +1 -0
- package/dist/harness/orchestration/budget.js +197 -0
- package/dist/harness/orchestration/budget.js.map +1 -0
- package/dist/harness/orchestration/capabilities.d.ts +6 -0
- package/dist/harness/orchestration/capabilities.d.ts.map +1 -0
- package/dist/harness/orchestration/capabilities.js +80 -0
- package/dist/harness/orchestration/capabilities.js.map +1 -0
- package/dist/harness/orchestration/claims.d.ts +148 -0
- package/dist/harness/orchestration/claims.d.ts.map +1 -0
- package/dist/harness/orchestration/claims.js +64 -0
- package/dist/harness/orchestration/claims.js.map +1 -0
- package/dist/harness/orchestration/control-plane.d.ts +18 -0
- package/dist/harness/orchestration/control-plane.d.ts.map +1 -0
- package/dist/harness/orchestration/control-plane.js +74 -0
- package/dist/harness/orchestration/control-plane.js.map +1 -0
- package/dist/harness/orchestration/coordinator.d.ts +132 -0
- package/dist/harness/orchestration/coordinator.d.ts.map +1 -0
- package/dist/harness/orchestration/coordinator.js +1628 -0
- package/dist/harness/orchestration/coordinator.js.map +1 -0
- package/dist/harness/orchestration/delegation.d.ts +80 -0
- package/dist/harness/orchestration/delegation.d.ts.map +1 -0
- package/dist/harness/orchestration/delegation.js +81 -0
- package/dist/harness/orchestration/delegation.js.map +1 -0
- package/dist/harness/orchestration/evidence.d.ts +124 -0
- package/dist/harness/orchestration/evidence.d.ts.map +1 -0
- package/dist/harness/orchestration/evidence.js +576 -0
- package/dist/harness/orchestration/evidence.js.map +1 -0
- package/dist/harness/orchestration/factories.d.ts +13 -0
- package/dist/harness/orchestration/factories.d.ts.map +1 -0
- package/dist/harness/orchestration/factories.js +20 -0
- package/dist/harness/orchestration/factories.js.map +1 -0
- package/dist/harness/orchestration/git.d.ts +77 -0
- package/dist/harness/orchestration/git.d.ts.map +1 -0
- package/dist/harness/orchestration/git.js +214 -0
- package/dist/harness/orchestration/git.js.map +1 -0
- package/dist/harness/orchestration/index.d.ts +25 -0
- package/dist/harness/orchestration/index.d.ts.map +1 -0
- package/dist/harness/orchestration/index.js +23 -0
- package/dist/harness/orchestration/index.js.map +1 -0
- package/dist/harness/orchestration/isolation.d.ts +181 -0
- package/dist/harness/orchestration/isolation.d.ts.map +1 -0
- package/dist/harness/orchestration/isolation.js +1357 -0
- package/dist/harness/orchestration/isolation.js.map +1 -0
- package/dist/harness/orchestration/paths.d.ts +18 -0
- package/dist/harness/orchestration/paths.d.ts.map +1 -0
- package/dist/harness/orchestration/paths.js +56 -0
- package/dist/harness/orchestration/paths.js.map +1 -0
- package/dist/harness/orchestration/plan.d.ts +219 -0
- package/dist/harness/orchestration/plan.d.ts.map +1 -0
- package/dist/harness/orchestration/plan.js +537 -0
- package/dist/harness/orchestration/plan.js.map +1 -0
- package/dist/harness/orchestration/planner.d.ts +137 -0
- package/dist/harness/orchestration/planner.d.ts.map +1 -0
- package/dist/harness/orchestration/planner.js +162 -0
- package/dist/harness/orchestration/planner.js.map +1 -0
- package/dist/harness/orchestration/recorder.d.ts +23 -0
- package/dist/harness/orchestration/recorder.d.ts.map +1 -0
- package/dist/harness/orchestration/recorder.js +50 -0
- package/dist/harness/orchestration/recorder.js.map +1 -0
- package/dist/harness/orchestration/scheduler.d.ts +40 -0
- package/dist/harness/orchestration/scheduler.d.ts.map +1 -0
- package/dist/harness/orchestration/scheduler.js +157 -0
- package/dist/harness/orchestration/scheduler.js.map +1 -0
- package/dist/harness/orchestration/testing.d.ts +233 -0
- package/dist/harness/orchestration/testing.d.ts.map +1 -0
- package/dist/harness/orchestration/testing.js +734 -0
- package/dist/harness/orchestration/testing.js.map +1 -0
- package/dist/harness/orchestration/verification-preflight.d.ts +46 -0
- package/dist/harness/orchestration/verification-preflight.d.ts.map +1 -0
- package/dist/harness/orchestration/verification-preflight.js +104 -0
- package/dist/harness/orchestration/verification-preflight.js.map +1 -0
- package/dist/harness/orchestration/worker-control.d.ts +64 -0
- package/dist/harness/orchestration/worker-control.d.ts.map +1 -0
- package/dist/harness/orchestration/worker-control.js +199 -0
- package/dist/harness/orchestration/worker-control.js.map +1 -0
- package/dist/harness/orchestration/worker-manager.d.ts +225 -0
- package/dist/harness/orchestration/worker-manager.d.ts.map +1 -0
- package/dist/harness/orchestration/worker-manager.js +1347 -0
- package/dist/harness/orchestration/worker-manager.js.map +1 -0
- package/dist/harness/orchestration/workspace-digest.d.ts +39 -0
- package/dist/harness/orchestration/workspace-digest.d.ts.map +1 -0
- package/dist/harness/orchestration/workspace-digest.js +147 -0
- package/dist/harness/orchestration/workspace-digest.js.map +1 -0
- package/dist/harness/policy/approval-broker.d.ts +13 -0
- package/dist/harness/policy/approval-broker.d.ts.map +1 -0
- package/dist/harness/policy/approval-broker.js +26 -0
- package/dist/harness/policy/approval-broker.js.map +1 -0
- package/dist/harness/policy/command-classifier.d.ts +29 -0
- package/dist/harness/policy/command-classifier.d.ts.map +1 -0
- package/dist/harness/policy/command-classifier.js +459 -0
- package/dist/harness/policy/command-classifier.js.map +1 -0
- package/dist/harness/policy/command-rules.d.ts +56 -0
- package/dist/harness/policy/command-rules.d.ts.map +1 -0
- package/dist/harness/policy/command-rules.js +588 -0
- package/dist/harness/policy/command-rules.js.map +1 -0
- package/dist/harness/policy/config.d.ts +27 -0
- package/dist/harness/policy/config.d.ts.map +1 -0
- package/dist/harness/policy/config.js +37 -0
- package/dist/harness/policy/config.js.map +1 -0
- package/dist/harness/policy/engine.d.ts +67 -0
- package/dist/harness/policy/engine.d.ts.map +1 -0
- package/dist/harness/policy/engine.js +483 -0
- package/dist/harness/policy/engine.js.map +1 -0
- package/dist/harness/policy/exec-allowlist.d.ts +66 -0
- package/dist/harness/policy/exec-allowlist.d.ts.map +1 -0
- package/dist/harness/policy/exec-allowlist.js +449 -0
- package/dist/harness/policy/exec-allowlist.js.map +1 -0
- package/dist/harness/policy/index.d.ts +10 -0
- package/dist/harness/policy/index.d.ts.map +1 -0
- package/dist/harness/policy/index.js +8 -0
- package/dist/harness/policy/index.js.map +1 -0
- package/dist/harness/policy/secret-patterns.d.ts +12 -0
- package/dist/harness/policy/secret-patterns.d.ts.map +1 -0
- package/dist/harness/policy/secret-patterns.js +48 -0
- package/dist/harness/policy/secret-patterns.js.map +1 -0
- package/dist/harness/policy/shell-parser.d.ts +40 -0
- package/dist/harness/policy/shell-parser.d.ts.map +1 -0
- package/dist/harness/policy/shell-parser.js +278 -0
- package/dist/harness/policy/shell-parser.js.map +1 -0
- package/dist/harness/policy/workspace-trust.d.ts +37 -0
- package/dist/harness/policy/workspace-trust.d.ts.map +1 -0
- package/dist/harness/policy/workspace-trust.js +164 -0
- package/dist/harness/policy/workspace-trust.js.map +1 -0
- package/dist/harness/providers/anthropic-messages.d.ts +48 -0
- package/dist/harness/providers/anthropic-messages.d.ts.map +1 -0
- package/dist/harness/providers/anthropic-messages.js +360 -0
- package/dist/harness/providers/anthropic-messages.js.map +1 -0
- package/dist/harness/providers/assembler.d.ts +29 -0
- package/dist/harness/providers/assembler.d.ts.map +1 -0
- package/dist/harness/providers/assembler.js +130 -0
- package/dist/harness/providers/assembler.js.map +1 -0
- package/dist/harness/providers/authenticated-stream.d.ts +9 -0
- package/dist/harness/providers/authenticated-stream.d.ts.map +1 -0
- package/dist/harness/providers/authenticated-stream.js +81 -0
- package/dist/harness/providers/authenticated-stream.js.map +1 -0
- package/dist/harness/providers/catalog.d.ts +75 -0
- package/dist/harness/providers/catalog.d.ts.map +1 -0
- package/dist/harness/providers/catalog.js +124 -0
- package/dist/harness/providers/catalog.js.map +1 -0
- package/dist/harness/providers/claude-code/adapter.d.ts +96 -0
- package/dist/harness/providers/claude-code/adapter.d.ts.map +1 -0
- package/dist/harness/providers/claude-code/adapter.js +863 -0
- package/dist/harness/providers/claude-code/adapter.js.map +1 -0
- package/dist/harness/providers/claude-code/mcp-relay.d.ts +2 -0
- package/dist/harness/providers/claude-code/mcp-relay.d.ts.map +1 -0
- package/dist/harness/providers/claude-code/mcp-relay.js +27 -0
- package/dist/harness/providers/claude-code/mcp-relay.js.map +1 -0
- package/dist/harness/providers/claude-code/mcp-server.d.ts +40 -0
- package/dist/harness/providers/claude-code/mcp-server.d.ts.map +1 -0
- package/dist/harness/providers/claude-code/mcp-server.js +171 -0
- package/dist/harness/providers/claude-code/mcp-server.js.map +1 -0
- package/dist/harness/providers/claude-code/native.d.ts +36 -0
- package/dist/harness/providers/claude-code/native.d.ts.map +1 -0
- package/dist/harness/providers/claude-code/native.js +153 -0
- package/dist/harness/providers/claude-code/native.js.map +1 -0
- package/dist/harness/providers/claude-code/process.d.ts +48 -0
- package/dist/harness/providers/claude-code/process.d.ts.map +1 -0
- package/dist/harness/providers/claude-code/process.js +128 -0
- package/dist/harness/providers/claude-code/process.js.map +1 -0
- package/dist/harness/providers/codex-app-server.d.ts +8 -0
- package/dist/harness/providers/codex-app-server.d.ts.map +1 -0
- package/dist/harness/providers/codex-app-server.js +45 -0
- package/dist/harness/providers/codex-app-server.js.map +1 -0
- package/dist/harness/providers/effort.d.ts +51 -0
- package/dist/harness/providers/effort.d.ts.map +1 -0
- package/dist/harness/providers/effort.js +108 -0
- package/dist/harness/providers/effort.js.map +1 -0
- package/dist/harness/providers/errors.d.ts +34 -0
- package/dist/harness/providers/errors.d.ts.map +1 -0
- package/dist/harness/providers/errors.js +143 -0
- package/dist/harness/providers/errors.js.map +1 -0
- package/dist/harness/providers/grammar.d.ts +17 -0
- package/dist/harness/providers/grammar.d.ts.map +1 -0
- package/dist/harness/providers/grammar.js +89 -0
- package/dist/harness/providers/grammar.js.map +1 -0
- package/dist/harness/providers/http-stream.d.ts +40 -0
- package/dist/harness/providers/http-stream.d.ts.map +1 -0
- package/dist/harness/providers/http-stream.js +134 -0
- package/dist/harness/providers/http-stream.js.map +1 -0
- package/dist/harness/providers/index.d.ts +20 -0
- package/dist/harness/providers/index.d.ts.map +1 -0
- package/dist/harness/providers/index.js +17 -0
- package/dist/harness/providers/index.js.map +1 -0
- package/dist/harness/providers/responses.d.ts +36 -0
- package/dist/harness/providers/responses.d.ts.map +1 -0
- package/dist/harness/providers/responses.js +435 -0
- package/dist/harness/providers/responses.js.map +1 -0
- package/dist/harness/providers/reviewer-route.d.ts +14 -0
- package/dist/harness/providers/reviewer-route.d.ts.map +1 -0
- package/dist/harness/providers/reviewer-route.js +31 -0
- package/dist/harness/providers/reviewer-route.js.map +1 -0
- package/dist/harness/providers/router.d.ts +50 -0
- package/dist/harness/providers/router.d.ts.map +1 -0
- package/dist/harness/providers/router.js +295 -0
- package/dist/harness/providers/router.js.map +1 -0
- package/dist/harness/providers/scripted.d.ts +22 -0
- package/dist/harness/providers/scripted.d.ts.map +1 -0
- package/dist/harness/providers/scripted.js +111 -0
- package/dist/harness/providers/scripted.js.map +1 -0
- package/dist/harness/providers/sse.d.ts +13 -0
- package/dist/harness/providers/sse.d.ts.map +1 -0
- package/dist/harness/providers/sse.js +82 -0
- package/dist/harness/providers/sse.js.map +1 -0
- package/dist/harness/providers/testing.d.ts +35 -0
- package/dist/harness/providers/testing.d.ts.map +1 -0
- package/dist/harness/providers/testing.js +93 -0
- package/dist/harness/providers/testing.js.map +1 -0
- package/dist/harness/providers/web-search.d.ts +110 -0
- package/dist/harness/providers/web-search.d.ts.map +1 -0
- package/dist/harness/providers/web-search.js +476 -0
- package/dist/harness/providers/web-search.js.map +1 -0
- package/dist/harness/store/blob-store.d.ts +4 -0
- package/dist/harness/store/blob-store.d.ts.map +1 -0
- package/dist/harness/store/blob-store.js +79 -0
- package/dist/harness/store/blob-store.js.map +1 -0
- package/dist/harness/store/durable-file.d.ts +17 -0
- package/dist/harness/store/durable-file.d.ts.map +1 -0
- package/dist/harness/store/durable-file.js +84 -0
- package/dist/harness/store/durable-file.js.map +1 -0
- package/dist/harness/store/event-store.d.ts +56 -0
- package/dist/harness/store/event-store.d.ts.map +1 -0
- package/dist/harness/store/event-store.js +210 -0
- package/dist/harness/store/event-store.js.map +1 -0
- package/dist/harness/store/index.d.ts +8 -0
- package/dist/harness/store/index.d.ts.map +1 -0
- package/dist/harness/store/index.js +4 -0
- package/dist/harness/store/index.js.map +1 -0
- package/dist/harness/store/layout.d.ts +12 -0
- package/dist/harness/store/layout.d.ts.map +1 -0
- package/dist/harness/store/layout.js +27 -0
- package/dist/harness/store/layout.js.map +1 -0
- package/dist/harness/store/lease.d.ts +37 -0
- package/dist/harness/store/lease.d.ts.map +1 -0
- package/dist/harness/store/lease.js +326 -0
- package/dist/harness/store/lease.js.map +1 -0
- package/dist/harness/store/segments.d.ts +49 -0
- package/dist/harness/store/segments.d.ts.map +1 -0
- package/dist/harness/store/segments.js +216 -0
- package/dist/harness/store/segments.js.map +1 -0
- package/dist/harness/store/session-store.d.ts +18 -0
- package/dist/harness/store/session-store.d.ts.map +1 -0
- package/dist/harness/store/session-store.js +319 -0
- package/dist/harness/store/session-store.js.map +1 -0
- package/dist/harness/tools/builtin/control-tools.d.ts +57 -0
- package/dist/harness/tools/builtin/control-tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/control-tools.js +72 -0
- package/dist/harness/tools/builtin/control-tools.js.map +1 -0
- package/dist/harness/tools/builtin/glob.d.ts +15 -0
- package/dist/harness/tools/builtin/glob.d.ts.map +1 -0
- package/dist/harness/tools/builtin/glob.js +164 -0
- package/dist/harness/tools/builtin/glob.js.map +1 -0
- package/dist/harness/tools/builtin/process-bg.d.ts +72 -0
- package/dist/harness/tools/builtin/process-bg.d.ts.map +1 -0
- package/dist/harness/tools/builtin/process-bg.js +360 -0
- package/dist/harness/tools/builtin/process-bg.js.map +1 -0
- package/dist/harness/tools/builtin/process-tools.d.ts +46 -0
- package/dist/harness/tools/builtin/process-tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/process-tools.js +263 -0
- package/dist/harness/tools/builtin/process-tools.js.map +1 -0
- package/dist/harness/tools/builtin/read-media.d.ts +10 -0
- package/dist/harness/tools/builtin/read-media.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read-media.js +128 -0
- package/dist/harness/tools/builtin/read-media.js.map +1 -0
- package/dist/harness/tools/builtin/read-tools.d.ts +29 -0
- package/dist/harness/tools/builtin/read-tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/read-tools.js +329 -0
- package/dist/harness/tools/builtin/read-tools.js.map +1 -0
- package/dist/harness/tools/builtin/shared.d.ts +47 -0
- package/dist/harness/tools/builtin/shared.d.ts.map +1 -0
- package/dist/harness/tools/builtin/shared.js +94 -0
- package/dist/harness/tools/builtin/shared.js.map +1 -0
- package/dist/harness/tools/builtin/todo.d.ts +38 -0
- package/dist/harness/tools/builtin/todo.d.ts.map +1 -0
- package/dist/harness/tools/builtin/todo.js +55 -0
- package/dist/harness/tools/builtin/todo.js.map +1 -0
- package/dist/harness/tools/builtin/web-common.d.ts +18 -0
- package/dist/harness/tools/builtin/web-common.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-common.js +53 -0
- package/dist/harness/tools/builtin/web-common.js.map +1 -0
- package/dist/harness/tools/builtin/web-fetch.d.ts +33 -0
- package/dist/harness/tools/builtin/web-fetch.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-fetch.js +173 -0
- package/dist/harness/tools/builtin/web-fetch.js.map +1 -0
- package/dist/harness/tools/builtin/web-html.d.ts +14 -0
- package/dist/harness/tools/builtin/web-html.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-html.js +314 -0
- package/dist/harness/tools/builtin/web-html.js.map +1 -0
- package/dist/harness/tools/builtin/web-net.d.ts +59 -0
- package/dist/harness/tools/builtin/web-net.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-net.js +347 -0
- package/dist/harness/tools/builtin/web-net.js.map +1 -0
- package/dist/harness/tools/builtin/web-search.d.ts +40 -0
- package/dist/harness/tools/builtin/web-search.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-search.js +60 -0
- package/dist/harness/tools/builtin/web-search.js.map +1 -0
- package/dist/harness/tools/builtin/web-state.d.ts +67 -0
- package/dist/harness/tools/builtin/web-state.d.ts.map +1 -0
- package/dist/harness/tools/builtin/web-state.js +227 -0
- package/dist/harness/tools/builtin/web-state.js.map +1 -0
- package/dist/harness/tools/builtin/write-tools.d.ts +18 -0
- package/dist/harness/tools/builtin/write-tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/write-tools.js +335 -0
- package/dist/harness/tools/builtin/write-tools.js.map +1 -0
- package/dist/harness/tools/environment.d.ts +9 -0
- package/dist/harness/tools/environment.d.ts.map +1 -0
- package/dist/harness/tools/environment.js +59 -0
- package/dist/harness/tools/environment.js.map +1 -0
- package/dist/harness/tools/file-ledger.d.ts +9 -0
- package/dist/harness/tools/file-ledger.d.ts.map +1 -0
- package/dist/harness/tools/file-ledger.js +26 -0
- package/dist/harness/tools/file-ledger.js.map +1 -0
- package/dist/harness/tools/gateway.d.ts +52 -0
- package/dist/harness/tools/gateway.d.ts.map +1 -0
- package/dist/harness/tools/gateway.js +435 -0
- package/dist/harness/tools/gateway.js.map +1 -0
- package/dist/harness/tools/index.d.ts +20 -0
- package/dist/harness/tools/index.d.ts.map +1 -0
- package/dist/harness/tools/index.js +17 -0
- package/dist/harness/tools/index.js.map +1 -0
- package/dist/harness/tools/patch.d.ts +51 -0
- package/dist/harness/tools/patch.d.ts.map +1 -0
- package/dist/harness/tools/patch.js +450 -0
- package/dist/harness/tools/patch.js.map +1 -0
- package/dist/harness/tools/process.d.ts +28 -0
- package/dist/harness/tools/process.d.ts.map +1 -0
- package/dist/harness/tools/process.js +263 -0
- package/dist/harness/tools/process.js.map +1 -0
- package/dist/harness/tools/redaction.d.ts +26 -0
- package/dist/harness/tools/redaction.d.ts.map +1 -0
- package/dist/harness/tools/redaction.js +77 -0
- package/dist/harness/tools/redaction.js.map +1 -0
- package/dist/harness/tools/registry.d.ts +26 -0
- package/dist/harness/tools/registry.d.ts.map +1 -0
- package/dist/harness/tools/registry.js +57 -0
- package/dist/harness/tools/registry.js.map +1 -0
- package/dist/harness/tools/sandbox.d.ts +23 -0
- package/dist/harness/tools/sandbox.d.ts.map +1 -0
- package/dist/harness/tools/sandbox.js +117 -0
- package/dist/harness/tools/sandbox.js.map +1 -0
- package/dist/harness/tools/testing.d.ts +42 -0
- package/dist/harness/tools/testing.d.ts.map +1 -0
- package/dist/harness/tools/testing.js +143 -0
- package/dist/harness/tools/testing.js.map +1 -0
- package/dist/harness/tools/text-file.d.ts +38 -0
- package/dist/harness/tools/text-file.d.ts.map +1 -0
- package/dist/harness/tools/text-file.js +90 -0
- package/dist/harness/tools/text-file.js.map +1 -0
- package/dist/harness/tools/windows-launch.d.ts +52 -0
- package/dist/harness/tools/windows-launch.d.ts.map +1 -0
- package/dist/harness/tools/windows-launch.js +261 -0
- package/dist/harness/tools/windows-launch.js.map +1 -0
- package/dist/harness/tools/workspace-path.d.ts +34 -0
- package/dist/harness/tools/workspace-path.d.ts.map +1 -0
- package/dist/harness/tools/workspace-path.js +133 -0
- package/dist/harness/tools/workspace-path.js.map +1 -0
- package/dist/harness/tui/approvals.d.ts +44 -0
- package/dist/harness/tui/approvals.d.ts.map +1 -0
- package/dist/harness/tui/approvals.js +127 -0
- package/dist/harness/tui/approvals.js.map +1 -0
- package/dist/harness/tui/auth-interaction.d.ts +36 -0
- package/dist/harness/tui/auth-interaction.d.ts.map +1 -0
- package/dist/harness/tui/auth-interaction.js +76 -0
- package/dist/harness/tui/auth-interaction.js.map +1 -0
- package/dist/harness/tui/choice-modal.d.ts +58 -0
- package/dist/harness/tui/choice-modal.d.ts.map +1 -0
- package/dist/harness/tui/choice-modal.js +244 -0
- package/dist/harness/tui/choice-modal.js.map +1 -0
- package/dist/harness/tui/conversation-view.d.ts +250 -0
- package/dist/harness/tui/conversation-view.d.ts.map +1 -0
- package/dist/harness/tui/conversation-view.js +1115 -0
- package/dist/harness/tui/conversation-view.js.map +1 -0
- package/dist/harness/tui/describe.d.ts +21 -0
- package/dist/harness/tui/describe.d.ts.map +1 -0
- package/dist/harness/tui/describe.js +110 -0
- package/dist/harness/tui/describe.js.map +1 -0
- package/dist/harness/tui/index.d.ts +30 -0
- package/dist/harness/tui/index.d.ts.map +1 -0
- package/dist/harness/tui/index.js +26 -0
- package/dist/harness/tui/index.js.map +1 -0
- package/dist/harness/tui/input/attachments.d.ts +20 -0
- package/dist/harness/tui/input/attachments.d.ts.map +1 -0
- package/dist/harness/tui/input/attachments.js +100 -0
- package/dist/harness/tui/input/attachments.js.map +1 -0
- package/dist/harness/tui/input/autocomplete.d.ts +41 -0
- package/dist/harness/tui/input/autocomplete.d.ts.map +1 -0
- package/dist/harness/tui/input/autocomplete.js +85 -0
- package/dist/harness/tui/input/autocomplete.js.map +1 -0
- package/dist/harness/tui/input/clipboard.d.ts +44 -0
- package/dist/harness/tui/input/clipboard.d.ts.map +1 -0
- package/dist/harness/tui/input/clipboard.js +181 -0
- package/dist/harness/tui/input/clipboard.js.map +1 -0
- package/dist/harness/tui/input/commands.d.ts +23 -0
- package/dist/harness/tui/input/commands.d.ts.map +1 -0
- package/dist/harness/tui/input/commands.js +71 -0
- package/dist/harness/tui/input/commands.js.map +1 -0
- package/dist/harness/tui/input/file-index.d.ts +49 -0
- package/dist/harness/tui/input/file-index.d.ts.map +1 -0
- package/dist/harness/tui/input/file-index.js +170 -0
- package/dist/harness/tui/input/file-index.js.map +1 -0
- package/dist/harness/tui/input/index.d.ts +8 -0
- package/dist/harness/tui/input/index.d.ts.map +1 -0
- package/dist/harness/tui/input/index.js +8 -0
- package/dist/harness/tui/input/index.js.map +1 -0
- package/dist/harness/tui/input/mouse.d.ts +68 -0
- package/dist/harness/tui/input/mouse.d.ts.map +1 -0
- package/dist/harness/tui/input/mouse.js +141 -0
- package/dist/harness/tui/input/mouse.js.map +1 -0
- package/dist/harness/tui/interrupt.d.ts +25 -0
- package/dist/harness/tui/interrupt.d.ts.map +1 -0
- package/dist/harness/tui/interrupt.js +49 -0
- package/dist/harness/tui/interrupt.js.map +1 -0
- package/dist/harness/tui/jsonl-renderer.d.ts +68 -0
- package/dist/harness/tui/jsonl-renderer.d.ts.map +1 -0
- package/dist/harness/tui/jsonl-renderer.js +172 -0
- package/dist/harness/tui/jsonl-renderer.js.map +1 -0
- package/dist/harness/tui/line-source.d.ts +39 -0
- package/dist/harness/tui/line-source.d.ts.map +1 -0
- package/dist/harness/tui/line-source.js +137 -0
- package/dist/harness/tui/line-source.js.map +1 -0
- package/dist/harness/tui/logo-art.d.ts +9 -0
- package/dist/harness/tui/logo-art.d.ts.map +1 -0
- package/dist/harness/tui/logo-art.js +24 -0
- package/dist/harness/tui/logo-art.js.map +1 -0
- package/dist/harness/tui/logo.d.ts +28 -0
- package/dist/harness/tui/logo.d.ts.map +1 -0
- package/dist/harness/tui/logo.js +88 -0
- package/dist/harness/tui/logo.js.map +1 -0
- package/dist/harness/tui/open-browser.d.ts +17 -0
- package/dist/harness/tui/open-browser.d.ts.map +1 -0
- package/dist/harness/tui/open-browser.js +45 -0
- package/dist/harness/tui/open-browser.js.map +1 -0
- package/dist/harness/tui/output-chunks.d.ts +8 -0
- package/dist/harness/tui/output-chunks.d.ts.map +1 -0
- package/dist/harness/tui/output-chunks.js +48 -0
- package/dist/harness/tui/output-chunks.js.map +1 -0
- package/dist/harness/tui/panels/index.d.ts +2 -0
- package/dist/harness/tui/panels/index.d.ts.map +1 -0
- package/dist/harness/tui/panels/index.js +2 -0
- package/dist/harness/tui/panels/index.js.map +1 -0
- package/dist/harness/tui/panels/panel-view.d.ts +98 -0
- package/dist/harness/tui/panels/panel-view.d.ts.map +1 -0
- package/dist/harness/tui/panels/panel-view.js +596 -0
- package/dist/harness/tui/panels/panel-view.js.map +1 -0
- package/dist/harness/tui/pi-tui-renderer.d.ts +363 -0
- package/dist/harness/tui/pi-tui-renderer.d.ts.map +1 -0
- package/dist/harness/tui/pi-tui-renderer.js +2696 -0
- package/dist/harness/tui/pi-tui-renderer.js.map +1 -0
- package/dist/harness/tui/plain-line-renderer.d.ts +102 -0
- package/dist/harness/tui/plain-line-renderer.d.ts.map +1 -0
- package/dist/harness/tui/plain-line-renderer.js +491 -0
- package/dist/harness/tui/plain-line-renderer.js.map +1 -0
- package/dist/harness/tui/render-queue.d.ts +34 -0
- package/dist/harness/tui/render-queue.d.ts.map +1 -0
- package/dist/harness/tui/render-queue.js +92 -0
- package/dist/harness/tui/render-queue.js.map +1 -0
- package/dist/harness/tui/sanitize.d.ts +9 -0
- package/dist/harness/tui/sanitize.d.ts.map +1 -0
- package/dist/harness/tui/sanitize.js +31 -0
- package/dist/harness/tui/sanitize.js.map +1 -0
- package/dist/harness/tui/style.d.ts +54 -0
- package/dist/harness/tui/style.d.ts.map +1 -0
- package/dist/harness/tui/style.js +64 -0
- package/dist/harness/tui/style.js.map +1 -0
- package/dist/harness/tui/terminal-lifecycle.d.ts +49 -0
- package/dist/harness/tui/terminal-lifecycle.d.ts.map +1 -0
- package/dist/harness/tui/terminal-lifecycle.js +100 -0
- package/dist/harness/tui/terminal-lifecycle.js.map +1 -0
- package/dist/harness/tui/theme.d.ts +77 -0
- package/dist/harness/tui/theme.d.ts.map +1 -0
- package/dist/harness/tui/theme.js +501 -0
- package/dist/harness/tui/theme.js.map +1 -0
- package/dist/harness/tui/tool-cards.d.ts +35 -0
- package/dist/harness/tui/tool-cards.d.ts.map +1 -0
- package/dist/harness/tui/tool-cards.js +122 -0
- package/dist/harness/tui/tool-cards.js.map +1 -0
- package/dist/harness/tui/tool-row.d.ts +51 -0
- package/dist/harness/tui/tool-row.d.ts.map +1 -0
- package/dist/harness/tui/tool-row.js +98 -0
- package/dist/harness/tui/tool-row.js.map +1 -0
- package/dist/harness/tui/views/board.d.ts +49 -0
- package/dist/harness/tui/views/board.d.ts.map +1 -0
- package/dist/harness/tui/views/board.js +293 -0
- package/dist/harness/tui/views/board.js.map +1 -0
- package/dist/harness/tui/views/cards.d.ts +8 -0
- package/dist/harness/tui/views/cards.d.ts.map +1 -0
- package/dist/harness/tui/views/cards.js +206 -0
- package/dist/harness/tui/views/cards.js.map +1 -0
- package/dist/harness/tui/views/components.d.ts +101 -0
- package/dist/harness/tui/views/components.d.ts.map +1 -0
- package/dist/harness/tui/views/components.js +186 -0
- package/dist/harness/tui/views/components.js.map +1 -0
- package/dist/harness/tui/views/diff.d.ts +11 -0
- package/dist/harness/tui/views/diff.d.ts.map +1 -0
- package/dist/harness/tui/views/diff.js +150 -0
- package/dist/harness/tui/views/diff.js.map +1 -0
- package/dist/harness/tui/views/graph.d.ts +49 -0
- package/dist/harness/tui/views/graph.d.ts.map +1 -0
- package/dist/harness/tui/views/graph.js +361 -0
- package/dist/harness/tui/views/graph.js.map +1 -0
- package/dist/harness/tui/views/index.d.ts +15 -0
- package/dist/harness/tui/views/index.d.ts.map +1 -0
- package/dist/harness/tui/views/index.js +15 -0
- package/dist/harness/tui/views/index.js.map +1 -0
- package/dist/harness/tui/views/kit.d.ts +112 -0
- package/dist/harness/tui/views/kit.d.ts.map +1 -0
- package/dist/harness/tui/views/kit.js +282 -0
- package/dist/harness/tui/views/kit.js.map +1 -0
- package/dist/harness/tui/views/trust-cards.d.ts +27 -0
- package/dist/harness/tui/views/trust-cards.d.ts.map +1 -0
- package/dist/harness/tui/views/trust-cards.js +181 -0
- package/dist/harness/tui/views/trust-cards.js.map +1 -0
- package/dist/harness/tui/views/usage.d.ts +4 -0
- package/dist/harness/tui/views/usage.d.ts.map +1 -0
- package/dist/harness/tui/views/usage.js +182 -0
- package/dist/harness/tui/views/usage.js.map +1 -0
- package/dist/harness/tui/views/worker.d.ts +47 -0
- package/dist/harness/tui/views/worker.d.ts.map +1 -0
- package/dist/harness/tui/views/worker.js +221 -0
- package/dist/harness/tui/views/worker.js.map +1 -0
- package/dist/harness/tui/welcome.d.ts +97 -0
- package/dist/harness/tui/welcome.d.ts.map +1 -0
- package/dist/harness/tui/welcome.js +271 -0
- package/dist/harness/tui/welcome.js.map +1 -0
- package/dist/harness/tui/wrap.d.ts +26 -0
- package/dist/harness/tui/wrap.d.ts.map +1 -0
- package/dist/harness/tui/wrap.js +38 -0
- package/dist/harness/tui/wrap.js.map +1 -0
- package/dist/infrastructure/build-info.d.ts +5 -0
- package/dist/infrastructure/build-info.d.ts.map +1 -0
- package/dist/infrastructure/build-info.js +21 -0
- package/dist/infrastructure/build-info.js.map +1 -0
- package/dist/infrastructure/frontmatter.d.ts +25 -0
- package/dist/infrastructure/frontmatter.d.ts.map +1 -0
- package/dist/infrastructure/frontmatter.js +75 -0
- package/dist/infrastructure/frontmatter.js.map +1 -0
- package/dist/templates/agent-manifests.d.ts +19 -0
- package/dist/templates/agent-manifests.d.ts.map +1 -0
- package/dist/templates/agent-manifests.js +302 -0
- package/dist/templates/agent-manifests.js.map +1 -0
- package/dist/templates/base-skills.d.ts +23 -0
- package/dist/templates/base-skills.d.ts.map +1 -0
- package/dist/templates/base-skills.js +477 -0
- package/dist/templates/base-skills.js.map +1 -0
- package/dist/templates/skill-creator-skill.d.ts +23 -0
- package/dist/templates/skill-creator-skill.d.ts.map +1 -0
- package/dist/templates/skill-creator-skill.js +235 -0
- package/dist/templates/skill-creator-skill.js.map +1 -0
- package/dist/templates/skill-references.d.ts +13 -0
- package/dist/templates/skill-references.d.ts.map +1 -0
- package/dist/templates/skill-references.js +280 -0
- package/dist/templates/skill-references.js.map +1 -0
- package/dist/templates/structure-templates.d.ts.map +1 -1
- package/dist/templates/structure-templates.js +20 -144
- package/dist/templates/structure-templates.js.map +1 -1
- package/dist/templates/task-conductor-skill.d.ts +1 -1
- package/dist/templates/task-conductor-skill.d.ts.map +1 -1
- package/dist/templates/task-conductor-skill.js +50 -22
- package/dist/templates/task-conductor-skill.js.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
import { mkdir, mkdtemp, realpath, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { CONTROL_PLANE_WRITE_PREFIX, createId, digestOf, effectivePolicySchema, execConfinementFor, EVENT_VERSIONS, isReservedWritePattern, READ_ONLY_ROLES, sessionEventSchema, sha256, StoreFailure, validateTransition, } from "../contracts/index.js";
|
|
5
|
+
import { createBudgetGateSlot } from "./budget.js";
|
|
6
|
+
import { createCoordinator } from "./coordinator.js";
|
|
7
|
+
import { createWorkerFactory } from "./factories.js";
|
|
8
|
+
import { runGit } from "./git.js";
|
|
9
|
+
import { matchesAny } from "./paths.js";
|
|
10
|
+
/**
|
|
11
|
+
* In-memory doubles for the seams I4 consumes (I1 store/driver, I2 router, I3 policy/broker).
|
|
12
|
+
* They validate what they are given against the frozen contracts, so a test that passes here
|
|
13
|
+
* exercises real event and policy shapes. They are test support only; nothing in the runtime
|
|
14
|
+
* imports this file.
|
|
15
|
+
*/
|
|
16
|
+
export const TEST_SANDBOX = {
|
|
17
|
+
backend: "policy-only",
|
|
18
|
+
platform: "other",
|
|
19
|
+
enforcement: "partial",
|
|
20
|
+
filesystem: "partial",
|
|
21
|
+
network: "partial",
|
|
22
|
+
process: "partial",
|
|
23
|
+
notes: [],
|
|
24
|
+
};
|
|
25
|
+
export function createMemoryBlobStore() {
|
|
26
|
+
const blobs = new Map();
|
|
27
|
+
return {
|
|
28
|
+
size: () => blobs.size,
|
|
29
|
+
async put(bytes, mediaType) {
|
|
30
|
+
const digest = sha256(bytes);
|
|
31
|
+
blobs.set(digest, { bytes: new Uint8Array(bytes), mediaType });
|
|
32
|
+
return { digest, size_bytes: bytes.byteLength, media_type: mediaType };
|
|
33
|
+
},
|
|
34
|
+
async get(digest) {
|
|
35
|
+
const blob = blobs.get(digest);
|
|
36
|
+
if (blob === undefined)
|
|
37
|
+
throw new StoreFailure("blob_missing", `no blob ${digest}`);
|
|
38
|
+
if (sha256(blob.bytes) !== digest)
|
|
39
|
+
throw new StoreFailure("blob_digest_mismatch", digest);
|
|
40
|
+
return blob.bytes;
|
|
41
|
+
},
|
|
42
|
+
async has(digest) {
|
|
43
|
+
return blobs.has(digest);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function createMemoryEventStore(sessionId = createId("session"), seed = []) {
|
|
48
|
+
const events = [...seed];
|
|
49
|
+
let closed = false;
|
|
50
|
+
return {
|
|
51
|
+
sessionId,
|
|
52
|
+
get lastSeq() {
|
|
53
|
+
return events.at(-1)?.seq ?? 0;
|
|
54
|
+
},
|
|
55
|
+
get events() {
|
|
56
|
+
return events;
|
|
57
|
+
},
|
|
58
|
+
get closed() {
|
|
59
|
+
return closed;
|
|
60
|
+
},
|
|
61
|
+
async append(draft) {
|
|
62
|
+
if (closed)
|
|
63
|
+
throw new StoreFailure("write_failed", "store is closed");
|
|
64
|
+
const event = sessionEventSchema.parse({
|
|
65
|
+
...draft,
|
|
66
|
+
schema_version: 1,
|
|
67
|
+
event_id: createId("event"),
|
|
68
|
+
session_id: sessionId,
|
|
69
|
+
seq: (events.at(-1)?.seq ?? 0) + 1,
|
|
70
|
+
timestamp: new Date().toISOString(),
|
|
71
|
+
});
|
|
72
|
+
events.push(event);
|
|
73
|
+
return event;
|
|
74
|
+
},
|
|
75
|
+
async *read(fromSeq = 1, toSeq = Number.MAX_SAFE_INTEGER) {
|
|
76
|
+
for (const event of [...events]) {
|
|
77
|
+
if (event.seq >= fromSeq && event.seq <= toSeq)
|
|
78
|
+
yield { status: "ok", event };
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
async close() {
|
|
82
|
+
closed = true;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function createMemorySessionStore() {
|
|
87
|
+
const stores = new Map();
|
|
88
|
+
const require = (sessionId) => {
|
|
89
|
+
const entry = stores.get(sessionId);
|
|
90
|
+
if (entry === undefined)
|
|
91
|
+
throw new StoreFailure("session_not_found", sessionId);
|
|
92
|
+
return entry;
|
|
93
|
+
};
|
|
94
|
+
const reopen = (store) => {
|
|
95
|
+
const fresh = createMemoryEventStore(store.sessionId, store.events);
|
|
96
|
+
return fresh;
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
store: (sessionId) => stores.get(sessionId)?.store,
|
|
100
|
+
manifests: () => [...stores.values()].map((entry) => entry.manifest),
|
|
101
|
+
async create(manifest) {
|
|
102
|
+
const full = { schema_version: 1, ...manifest };
|
|
103
|
+
const store = createMemoryEventStore(manifest.session_id);
|
|
104
|
+
stores.set(manifest.session_id, { manifest: full, store });
|
|
105
|
+
return store;
|
|
106
|
+
},
|
|
107
|
+
async openForWrite(sessionId) {
|
|
108
|
+
const entry = require(sessionId);
|
|
109
|
+
if (entry.store.closed) {
|
|
110
|
+
entry.store = reopen(entry.store);
|
|
111
|
+
}
|
|
112
|
+
return entry.store;
|
|
113
|
+
},
|
|
114
|
+
async openForRead(sessionId) {
|
|
115
|
+
const entry = require(sessionId);
|
|
116
|
+
return { sessionId, read: (fromSeq, toSeq) => entry.store.read(fromSeq, toSeq) };
|
|
117
|
+
},
|
|
118
|
+
async fork(sessionId, upToSeq) {
|
|
119
|
+
const entry = require(sessionId);
|
|
120
|
+
const forkId = createId("session");
|
|
121
|
+
const store = createMemoryEventStore(forkId);
|
|
122
|
+
stores.set(forkId, {
|
|
123
|
+
manifest: { ...entry.manifest, session_id: forkId, parent: { session_id: sessionId, up_to_seq: upToSeq } },
|
|
124
|
+
store,
|
|
125
|
+
});
|
|
126
|
+
return store;
|
|
127
|
+
},
|
|
128
|
+
async list(projectId) {
|
|
129
|
+
return [...stores.values()]
|
|
130
|
+
.filter((entry) => entry.manifest.project_id === projectId)
|
|
131
|
+
.map((entry) => ({ manifest: entry.manifest, lastSeq: entry.store.lastSeq, lastEventAt: entry.store.events.at(-1)?.timestamp, locked: false }));
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** A small, schema-valid stand-in for the I3 PolicyEngine: role matrix, write scope and reserved paths. */
|
|
136
|
+
export function createFakePolicyEngine(options = {}) {
|
|
137
|
+
const computed = [];
|
|
138
|
+
return {
|
|
139
|
+
computed,
|
|
140
|
+
compute(inputs) {
|
|
141
|
+
const readOnly = READ_ONLY_ROLES.includes(inputs.role);
|
|
142
|
+
const owned = inputs.taskScope?.owned ?? [];
|
|
143
|
+
const writeScope = readOnly
|
|
144
|
+
? []
|
|
145
|
+
: inputs.role === "orchestrator"
|
|
146
|
+
? owned.filter((pattern) => pattern.startsWith(CONTROL_PLANE_WRITE_PREFIX))
|
|
147
|
+
: owned;
|
|
148
|
+
const ask = inputs.mode === "ask";
|
|
149
|
+
const policy = effectivePolicySchema.parse({
|
|
150
|
+
schema_version: 1,
|
|
151
|
+
policy_version: 1,
|
|
152
|
+
mode: inputs.mode,
|
|
153
|
+
role: inputs.role,
|
|
154
|
+
run_id: inputs.runId,
|
|
155
|
+
...(inputs.taskId === undefined ? {} : { task_id: inputs.taskId }),
|
|
156
|
+
workspace_root: inputs.workspaceRoot,
|
|
157
|
+
write_scope: writeScope,
|
|
158
|
+
read_scope: inputs.taskScope !== undefined && inputs.taskScope.read.length + owned.length > 0 ? [...inputs.taskScope.read, ...owned] : ["**"],
|
|
159
|
+
forbidden: inputs.taskScope?.forbidden ?? [],
|
|
160
|
+
effects: {
|
|
161
|
+
read: "allow",
|
|
162
|
+
"workspace-write": readOnly || writeScope.length === 0 ? "deny" : ask ? "ask" : "allow",
|
|
163
|
+
exec: inputs.role === "orchestrator" || inputs.role === "explorer" ? "deny" : ask ? "ask" : "allow",
|
|
164
|
+
"external-write": "deny",
|
|
165
|
+
control: inputs.role === "orchestrator" ? "allow" : "deny",
|
|
166
|
+
},
|
|
167
|
+
external_write_allowlist: [],
|
|
168
|
+
network: { mode: "deny", hosts: [] },
|
|
169
|
+
sandbox: { backend: inputs.sandbox.backend, enforcement: inputs.sandbox.enforcement },
|
|
170
|
+
require_full_sandbox: false,
|
|
171
|
+
exec_confinement: execConfinementFor(inputs.sandbox.enforcement, inputs.mode),
|
|
172
|
+
verification_commands: [...(inputs.taskScope?.verification_commands ?? [])],
|
|
173
|
+
layers: [{ layer: "role", source: inputs.role, digest: digestOf({ role: inputs.role }) }],
|
|
174
|
+
});
|
|
175
|
+
computed.push(policy);
|
|
176
|
+
return policy;
|
|
177
|
+
},
|
|
178
|
+
evaluate(action, policy) {
|
|
179
|
+
const base = { action_digest: digestOf(action), policy_digest: digestOf(policy) };
|
|
180
|
+
if (options.lenient === true)
|
|
181
|
+
return { ...base, decision: "allow", reasons: [{ code: "lenient", layer: "platform", message: "test engine allows everything" }] };
|
|
182
|
+
for (const entry of action.paths.filter((candidate) => candidate.access === "write")) {
|
|
183
|
+
if (isReservedWritePattern(entry.path)) {
|
|
184
|
+
return { ...base, decision: "deny", rail: "reserved-path-write", reasons: [{ code: "reserved", layer: "platform", message: `${entry.path} is reserved` }] };
|
|
185
|
+
}
|
|
186
|
+
if (!matchesAny(entry.path, policy.write_scope) || matchesAny(entry.path, policy.forbidden)) {
|
|
187
|
+
return { ...base, decision: "deny", rail: "write-outside-scope", reasons: [{ code: "outside-scope", layer: "task", message: `${entry.path} is outside the write scope` }] };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const decision = policy.effects[action.effect];
|
|
191
|
+
return { ...base, decision, reasons: [{ code: `effect-${decision}`, layer: "role", message: `${action.effect} is ${decision} for ${policy.role}` }] };
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export function testRoute(provider, model, tier) {
|
|
196
|
+
return {
|
|
197
|
+
provider_id: provider,
|
|
198
|
+
model_id: model,
|
|
199
|
+
adapter_id: `${provider}-test`,
|
|
200
|
+
adapter_kind: "model",
|
|
201
|
+
auth_method: "api-key",
|
|
202
|
+
profile: "default",
|
|
203
|
+
...(tier === undefined ? {} : { tier }),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export function createScriptedRouter(options = {}) {
|
|
207
|
+
const resolved = [];
|
|
208
|
+
return {
|
|
209
|
+
resolved,
|
|
210
|
+
async resolve(request) {
|
|
211
|
+
const route = request.role === "reviewer"
|
|
212
|
+
? options.reviewer ?? testRoute("anthropic", "claude-test")
|
|
213
|
+
: request.role === "orchestrator"
|
|
214
|
+
? options.orchestrator ?? testRoute("openai", "gpt-orchestrator")
|
|
215
|
+
: options.worker ?? testRoute("openai", "gpt-worker");
|
|
216
|
+
const decision = {
|
|
217
|
+
tier: request.tier,
|
|
218
|
+
...(request.role === undefined ? {} : { role: request.role }),
|
|
219
|
+
route: { ...route, tier: request.tier },
|
|
220
|
+
source: "provider-default",
|
|
221
|
+
reason: "scripted test route",
|
|
222
|
+
fallback: { used: false },
|
|
223
|
+
};
|
|
224
|
+
resolved.push(decision);
|
|
225
|
+
return decision;
|
|
226
|
+
},
|
|
227
|
+
adapterFor() {
|
|
228
|
+
throw new Error("the scripted router has no adapters; use a scripted driver");
|
|
229
|
+
},
|
|
230
|
+
reportFailure() {
|
|
231
|
+
return undefined;
|
|
232
|
+
},
|
|
233
|
+
proposeProviderChange() {
|
|
234
|
+
throw new Error("the scripted router never blocks a route");
|
|
235
|
+
},
|
|
236
|
+
applyProviderChange() {
|
|
237
|
+
return undefined;
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
export function createScriptedBroker(decide, availability = "interactive") {
|
|
242
|
+
const requests = [];
|
|
243
|
+
return {
|
|
244
|
+
availability,
|
|
245
|
+
requests,
|
|
246
|
+
async request(request) {
|
|
247
|
+
requests.push(request);
|
|
248
|
+
return {
|
|
249
|
+
approval_id: request.approval_id,
|
|
250
|
+
subject_kind: request.subject_kind,
|
|
251
|
+
subject_digest: request.subject_digest,
|
|
252
|
+
decided_at: new Date().toISOString(),
|
|
253
|
+
...decide(request),
|
|
254
|
+
};
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
export function createHeadlessBroker() {
|
|
259
|
+
return createScriptedBroker((request) => ({ outcome: "unavailable", decided_by: "broker", mode: request.subject_kind === "plan" ? "ask" : "ask", reason: "headless" }), "headless");
|
|
260
|
+
}
|
|
261
|
+
export function createStaticToolRegistry(descriptors = []) {
|
|
262
|
+
return {
|
|
263
|
+
register() {
|
|
264
|
+
throw new Error("static registry");
|
|
265
|
+
},
|
|
266
|
+
get: () => undefined,
|
|
267
|
+
visibleTo: () => descriptors,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* A stand-in for the I1 AgentDriver: it records the user message, optionally builds the context
|
|
272
|
+
* with a real ContextBuilder, then runs a script that writes files and records tool calls and the
|
|
273
|
+
* final assistant message exactly as the real loop would.
|
|
274
|
+
*/
|
|
275
|
+
export function createScriptedDriverFactory(script, options = {}) {
|
|
276
|
+
const turns = [];
|
|
277
|
+
const steers = [];
|
|
278
|
+
const factory = ((events) => ({
|
|
279
|
+
steer(text) {
|
|
280
|
+
steers.push(text);
|
|
281
|
+
},
|
|
282
|
+
async runTurn(input, signal) {
|
|
283
|
+
const actor = input.role === "orchestrator"
|
|
284
|
+
? { kind: "orchestrator", role: "orchestrator" }
|
|
285
|
+
: { kind: "worker", role: input.role, ...(input.attemptId === undefined ? {} : { attempt_id: input.attemptId }) };
|
|
286
|
+
const ids = {
|
|
287
|
+
run_id: input.runId,
|
|
288
|
+
...(input.taskId === undefined ? {} : { task_id: input.taskId }),
|
|
289
|
+
...(input.attemptId === undefined ? {} : { attempt_id: input.attemptId }),
|
|
290
|
+
};
|
|
291
|
+
const append = (type, data, who = actor) => events.append({ type, data, event_version: EVENT_VERSIONS[type], actor: who, ...ids });
|
|
292
|
+
const turnId = createId("turn");
|
|
293
|
+
await append("turn/started", { turn_id: turnId, trigger: input.trigger });
|
|
294
|
+
if (input.userMessage !== undefined) {
|
|
295
|
+
await append("message/recorded", { role: "user", message: { role: "user", content: [{ type: "text", text: input.userMessage }] } });
|
|
296
|
+
}
|
|
297
|
+
const requestId = createId("request");
|
|
298
|
+
const context = options.context === undefined ? undefined : await options.context.build({ sessionId: input.sessionId, runId: input.runId, taskId: input.taskId, attemptId: input.attemptId, role: input.role, route: input.route, policy: input.policy, packet: input.packet, requestId }, signal);
|
|
299
|
+
turns.push({ input, context });
|
|
300
|
+
const stepId = createId("step");
|
|
301
|
+
await append("step/started", { step_id: stepId, turn_id: turnId, request_id: requestId });
|
|
302
|
+
const root = input.policy.workspace_root;
|
|
303
|
+
const outcome = await script({
|
|
304
|
+
input,
|
|
305
|
+
events,
|
|
306
|
+
signal,
|
|
307
|
+
root,
|
|
308
|
+
context,
|
|
309
|
+
async write(relativePath, content) {
|
|
310
|
+
const target = path.join(root, ...relativePath.split("/"));
|
|
311
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
312
|
+
await writeFile(target, content, "utf8");
|
|
313
|
+
},
|
|
314
|
+
async toolCall(name, result = {}) {
|
|
315
|
+
const toolCallId = createId("toolCall");
|
|
316
|
+
await append("tool/call_proposed", { tool_call_id: toolCallId, provider_call_id: `p-${toolCallId}`, tool_name: name, args_digest: digestOf({ name }) });
|
|
317
|
+
const ok = result.ok ?? true;
|
|
318
|
+
await append("tool/result_recorded", {
|
|
319
|
+
tool_call_id: toolCallId,
|
|
320
|
+
state: ok ? "succeeded" : "failed",
|
|
321
|
+
result: {
|
|
322
|
+
status: ok ? "ok" : "error",
|
|
323
|
+
text: result.text ?? (ok ? "ok" : "failed"),
|
|
324
|
+
truncated: false,
|
|
325
|
+
redactions: 0,
|
|
326
|
+
...(result.exitCode === undefined ? {} : { exit_code: result.exitCode }),
|
|
327
|
+
...(ok ? {} : { error: { code: "execution_failed", message: "failed" } }),
|
|
328
|
+
},
|
|
329
|
+
duration_ms: 1,
|
|
330
|
+
}, { kind: "system" });
|
|
331
|
+
return toolCallId;
|
|
332
|
+
},
|
|
333
|
+
async say(text) {
|
|
334
|
+
await append("message/recorded", { role: "assistant", request_id: requestId, message: { role: "assistant", content: [{ type: "text", text }] } });
|
|
335
|
+
},
|
|
336
|
+
async reply(json) {
|
|
337
|
+
await append("message/recorded", {
|
|
338
|
+
role: "assistant",
|
|
339
|
+
request_id: requestId,
|
|
340
|
+
message: { role: "assistant", content: [{ type: "text", text: `Done.\n\`\`\`json\n${JSON.stringify(json)}\n\`\`\`` }] },
|
|
341
|
+
});
|
|
342
|
+
},
|
|
343
|
+
async report(name, args, result = {}) {
|
|
344
|
+
const toolCallId = createId("toolCall");
|
|
345
|
+
const providerCallId = `p-${toolCallId}`;
|
|
346
|
+
await append("message/recorded", {
|
|
347
|
+
role: "assistant",
|
|
348
|
+
request_id: requestId,
|
|
349
|
+
message: { role: "assistant", content: [{ type: "tool_call", provider_call_id: providerCallId, tool_call_id: toolCallId, name, arguments: args }] },
|
|
350
|
+
});
|
|
351
|
+
await append("tool/call_proposed", { tool_call_id: toolCallId, request_id: requestId, provider_call_id: providerCallId, tool_name: name, args_digest: digestOf(args) });
|
|
352
|
+
const ok = result.ok ?? true;
|
|
353
|
+
await append("tool/result_recorded", {
|
|
354
|
+
tool_call_id: toolCallId,
|
|
355
|
+
state: ok ? "succeeded" : "denied",
|
|
356
|
+
result: ok
|
|
357
|
+
? { status: "ok", text: "report recorded", truncated: false, redactions: 0 }
|
|
358
|
+
: { status: "error", text: "", truncated: false, redactions: 0, error: { code: "invalid_arguments", message: "invalid report" } },
|
|
359
|
+
duration_ms: 1,
|
|
360
|
+
});
|
|
361
|
+
return toolCallId;
|
|
362
|
+
},
|
|
363
|
+
});
|
|
364
|
+
const final = signal.aborted ? "cancelled" : (outcome ?? "completed");
|
|
365
|
+
await append("step/ended", { step_id: stepId, state: final === "cancelled" ? "aborted" : "settled" }, { kind: "system" });
|
|
366
|
+
await append("turn/ended", { turn_id: turnId, outcome: final });
|
|
367
|
+
return { turnId, outcome: final, steps: 1 };
|
|
368
|
+
},
|
|
369
|
+
}));
|
|
370
|
+
Object.defineProperty(factory, "turns", { value: turns });
|
|
371
|
+
Object.defineProperty(factory, "steers", { value: steers });
|
|
372
|
+
return factory;
|
|
373
|
+
}
|
|
374
|
+
export function createScriptedPlanner(propose) {
|
|
375
|
+
const calls = [];
|
|
376
|
+
return {
|
|
377
|
+
calls,
|
|
378
|
+
async propose(input) {
|
|
379
|
+
calls.push(input);
|
|
380
|
+
return propose(input, calls.length);
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
/** A temporary workspace (optionally a git repository with an initial commit) and a fake home. */
|
|
385
|
+
export async function createTempWorkspace(files, options) {
|
|
386
|
+
const base = await realpath(await mkdtemp(path.join(tmpdir(), "synorch-i4-")));
|
|
387
|
+
const root = path.join(base, "workspace");
|
|
388
|
+
const home = path.join(base, "home");
|
|
389
|
+
await mkdir(root, { recursive: true });
|
|
390
|
+
await mkdir(home, { recursive: true });
|
|
391
|
+
for (const [relative, content] of Object.entries(files)) {
|
|
392
|
+
const target = path.join(root, ...relative.split("/"));
|
|
393
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
394
|
+
await writeFile(target, content, "utf8");
|
|
395
|
+
}
|
|
396
|
+
if (options.git) {
|
|
397
|
+
await runGit(["init", "-q"], root);
|
|
398
|
+
await runGit(["config", "user.email", "i4@synorch.test"], root);
|
|
399
|
+
await runGit(["config", "user.name", "Synorch I4"], root);
|
|
400
|
+
await runGit(["config", "core.autocrlf", "false"], root);
|
|
401
|
+
await runGit(["add", "-A"], root);
|
|
402
|
+
await runGit(["commit", "-q", "-m", "initial"], root);
|
|
403
|
+
}
|
|
404
|
+
return {
|
|
405
|
+
root,
|
|
406
|
+
home,
|
|
407
|
+
async cleanup() {
|
|
408
|
+
if (options.git)
|
|
409
|
+
await runGit(["worktree", "prune"], root).catch(() => undefined);
|
|
410
|
+
await rm(base, { recursive: true, force: true, maxRetries: 3 });
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Replays the lifecycle events of a log through the contract state machines the way I1's
|
|
416
|
+
* projection does: `run/created` starts a run in `created`, `plan/proposed` a plan in `draft`,
|
|
417
|
+
* `task/created` a task in `draft` and `attempt/started` an attempt in `running`. Every
|
|
418
|
+
* `*_state_changed` must start from the projected state and be a legal transition.
|
|
419
|
+
*/
|
|
420
|
+
export function replayTransitions(events) {
|
|
421
|
+
const problems = [];
|
|
422
|
+
const states = new Map();
|
|
423
|
+
const step = (machine, id, from, to, seq) => {
|
|
424
|
+
const key = `${machine}:${id}`;
|
|
425
|
+
const current = states.get(key);
|
|
426
|
+
if (current === undefined)
|
|
427
|
+
problems.push(`#${seq} ${machine} ${id} changes state before it exists`);
|
|
428
|
+
else if (current !== from)
|
|
429
|
+
problems.push(`#${seq} ${machine} ${id} claims ${from} but is ${current}`);
|
|
430
|
+
const check = validateTransition(machine, from, to);
|
|
431
|
+
if (!check.ok)
|
|
432
|
+
problems.push(`#${seq} ${check.message}`);
|
|
433
|
+
states.set(key, to);
|
|
434
|
+
};
|
|
435
|
+
for (const event of events) {
|
|
436
|
+
switch (event.type) {
|
|
437
|
+
case "run/created":
|
|
438
|
+
states.set(`run:${event.run_id ?? ""}`, "created");
|
|
439
|
+
break;
|
|
440
|
+
case "run/state_changed":
|
|
441
|
+
step("run", event.run_id ?? "", event.data.from, event.data.to, event.seq);
|
|
442
|
+
break;
|
|
443
|
+
case "plan/proposed":
|
|
444
|
+
states.set(`plan:${event.data.plan.plan_id}`, "proposed");
|
|
445
|
+
break;
|
|
446
|
+
case "plan/state_changed":
|
|
447
|
+
step("plan", event.data.plan_id, event.data.from, event.data.to, event.seq);
|
|
448
|
+
break;
|
|
449
|
+
case "task/created":
|
|
450
|
+
states.set(`task:${event.data.task_id}`, "draft");
|
|
451
|
+
break;
|
|
452
|
+
case "task/state_changed":
|
|
453
|
+
step("task", event.data.task_id, event.data.from, event.data.to, event.seq);
|
|
454
|
+
break;
|
|
455
|
+
case "attempt/started":
|
|
456
|
+
if (states.has(`attempt:${event.data.attempt_id}`))
|
|
457
|
+
problems.push(`#${event.seq} attempt ${event.data.attempt_id} started twice`);
|
|
458
|
+
states.set(`attempt:${event.data.attempt_id}`, "running");
|
|
459
|
+
break;
|
|
460
|
+
case "attempt/state_changed":
|
|
461
|
+
step("attempt", event.data.attempt_id, event.data.from, event.data.to, event.seq);
|
|
462
|
+
break;
|
|
463
|
+
default:
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
for (const [key, state] of states) {
|
|
468
|
+
if (key.startsWith("attempt:") && state === "running")
|
|
469
|
+
problems.push(`${key} never reached a terminal state`);
|
|
470
|
+
}
|
|
471
|
+
return problems;
|
|
472
|
+
}
|
|
473
|
+
export function digestFor(text) {
|
|
474
|
+
return sha256(text);
|
|
475
|
+
}
|
|
476
|
+
/** A plan candidate for the given planner input with sensible defaults per task. */
|
|
477
|
+
export function testPlan(input, tasks, overrides = {}) {
|
|
478
|
+
const risks = tasks.map((task) => task.risk ?? "standard");
|
|
479
|
+
return {
|
|
480
|
+
schema_version: 1,
|
|
481
|
+
plan_id: input.planId,
|
|
482
|
+
run_id: input.runId,
|
|
483
|
+
version: input.version,
|
|
484
|
+
goal: input.goal,
|
|
485
|
+
risk: risks.includes("high-risk") ? "high-risk" : risks.includes("standard") ? "standard" : "trivial",
|
|
486
|
+
scope: ["docs/**", "src/**"],
|
|
487
|
+
tasks: tasks.map((task) => ({
|
|
488
|
+
key: task.key,
|
|
489
|
+
role: task.role ?? "implementer",
|
|
490
|
+
objective: `Do ${task.key}`,
|
|
491
|
+
depends_on: task.depends_on ?? [],
|
|
492
|
+
owned_paths: task.owned_paths ?? [],
|
|
493
|
+
read_paths: task.read_paths ?? [],
|
|
494
|
+
risk: task.risk ?? "standard",
|
|
495
|
+
model_tier: "complex_worker",
|
|
496
|
+
acceptance_criteria: (task.criteria ?? [`${task.key} is done`]).map((statement, index) => ({ id: `AC-${index + 1}`, statement })),
|
|
497
|
+
verification: task.verification ?? [],
|
|
498
|
+
})),
|
|
499
|
+
expected_external_effects: [],
|
|
500
|
+
verification: [],
|
|
501
|
+
budget: { max_wall_time_seconds: 600, max_steps: 100 },
|
|
502
|
+
assumptions: [],
|
|
503
|
+
created_at: input.createdAt,
|
|
504
|
+
...overrides,
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
/** A well-formed worker claim citing `callId` for every criterion and verification command. */
|
|
508
|
+
export function workerClaim(context, callId, overrides = {}) {
|
|
509
|
+
const packet = context.input.packet;
|
|
510
|
+
return {
|
|
511
|
+
status: "completed",
|
|
512
|
+
summary: `completed ${packet?.objective ?? "task"}`,
|
|
513
|
+
acceptance_evidence: (packet?.acceptance_criteria ?? []).map((criterion) => ({
|
|
514
|
+
criterion_id: criterion.id,
|
|
515
|
+
evidence: [{ kind: "test-run", ref: callId, produced_by: "worker" }],
|
|
516
|
+
})),
|
|
517
|
+
commands_run: (packet?.verification.commands ?? []).map((command) => ({
|
|
518
|
+
command,
|
|
519
|
+
exit_code: 0,
|
|
520
|
+
evidence: { kind: "tool-call", ref: callId, produced_by: "worker" },
|
|
521
|
+
})),
|
|
522
|
+
decisions_made: [],
|
|
523
|
+
skipped_checks: [],
|
|
524
|
+
unresolved_risks: [],
|
|
525
|
+
recommended_context_updates: [],
|
|
526
|
+
...(packet?.role === "debugger" && packet.write_mode === "rca-only" ? { root_cause: "found" } : {}),
|
|
527
|
+
...overrides,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
/** A reviewer claim whose `met` verdicts are backed by the reviewer's own `callId`. */
|
|
531
|
+
export function reviewerClaim(context, callId, decision = "accept") {
|
|
532
|
+
return {
|
|
533
|
+
criteria: (context.input.packet?.acceptance_criteria ?? []).map((criterion) => ({
|
|
534
|
+
criterion_id: criterion.id,
|
|
535
|
+
verdict: decision === "accept" ? "met" : "not_met",
|
|
536
|
+
evidence: decision === "accept" ? [{ kind: "test-run", ref: callId, produced_by: "reviewer" }] : [],
|
|
537
|
+
})),
|
|
538
|
+
findings: decision === "accept" ? [] : [{ id: "F-1", severity: decision === "block" ? "blocker" : "major", summary: "needs work" }],
|
|
539
|
+
decision,
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
/** Wires a real coordinator, worker manager and isolation provider over in-memory seams. */
|
|
543
|
+
export function createTestRuntime(options) {
|
|
544
|
+
const sessions = createMemorySessionStore();
|
|
545
|
+
const blobs = createMemoryBlobStore();
|
|
546
|
+
const budgetGate = createBudgetGateSlot();
|
|
547
|
+
const context = options.context?.({ sessions, blobs, budgetGate });
|
|
548
|
+
const driver = createScriptedDriverFactory(options.script, context === undefined ? {} : { context });
|
|
549
|
+
const router = options.router ?? createScriptedRouter();
|
|
550
|
+
const policy = options.policy ?? createFakePolicyEngine();
|
|
551
|
+
const broker = options.broker ?? createScriptedBroker(() => ({ outcome: "allowed-for-scope", decided_by: "user", mode: "ask" }));
|
|
552
|
+
const workers = [];
|
|
553
|
+
const factory = createWorkerFactory({
|
|
554
|
+
sessions,
|
|
555
|
+
blobs,
|
|
556
|
+
router,
|
|
557
|
+
policy,
|
|
558
|
+
createDriver: driver,
|
|
559
|
+
sandbox: TEST_SANDBOX,
|
|
560
|
+
home: options.workspace.home,
|
|
561
|
+
...(options.verification === undefined ? {} : { verification: options.verification }),
|
|
562
|
+
});
|
|
563
|
+
const coordinator = createCoordinator({
|
|
564
|
+
sessions,
|
|
565
|
+
blobs,
|
|
566
|
+
router,
|
|
567
|
+
policy,
|
|
568
|
+
approvals: broker,
|
|
569
|
+
planner: options.planner,
|
|
570
|
+
sandbox: TEST_SANDBOX,
|
|
571
|
+
createWorkers: (scope, budget) => {
|
|
572
|
+
const manager = factory(scope, budget);
|
|
573
|
+
workers.push(manager);
|
|
574
|
+
return manager;
|
|
575
|
+
},
|
|
576
|
+
budgetGate,
|
|
577
|
+
...(options.delegation === undefined ? {} : { delegation: options.delegation }),
|
|
578
|
+
// Scripted runs default to the strict review mode so they exercise the review machinery; pass `review: "proportional"` for the default runtime behaviour.
|
|
579
|
+
limits: { review: "always", ...options.limits },
|
|
580
|
+
...(options.preferWorktree === undefined ? {} : { preferWorktree: options.preferWorktree }),
|
|
581
|
+
...(options.ledger === undefined ? {} : { ledger: options.ledger }),
|
|
582
|
+
});
|
|
583
|
+
return {
|
|
584
|
+
coordinator,
|
|
585
|
+
sessions,
|
|
586
|
+
blobs,
|
|
587
|
+
driver,
|
|
588
|
+
router,
|
|
589
|
+
policy,
|
|
590
|
+
broker,
|
|
591
|
+
budgetGate,
|
|
592
|
+
workers,
|
|
593
|
+
run: (goal = "Test goal", budget = { maxWallTimeSeconds: undefined, maxCostUsd: undefined }) => coordinator.run({
|
|
594
|
+
goal,
|
|
595
|
+
workspaceRoot: options.workspace.root,
|
|
596
|
+
policyMode: options.mode ?? "autonomous",
|
|
597
|
+
headless: options.headless ?? false,
|
|
598
|
+
resumeSessionId: undefined,
|
|
599
|
+
budget,
|
|
600
|
+
}, new AbortController().signal),
|
|
601
|
+
runEvents: (outcome) => sessions.store(outcome.sessionId)?.events ?? [],
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function textOfParts(message) {
|
|
605
|
+
return message.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n");
|
|
606
|
+
}
|
|
607
|
+
export function sloppyView(request) {
|
|
608
|
+
const lastUser = request.messages
|
|
609
|
+
.map((message, index) => ({ message, index }))
|
|
610
|
+
.filter((entry) => entry.message.role === "user" && textOfParts(entry.message) !== "")
|
|
611
|
+
.at(-1);
|
|
612
|
+
const since = lastUser === undefined ? request.messages : request.messages.slice(lastUser.index + 1);
|
|
613
|
+
const names = new Map();
|
|
614
|
+
for (const message of request.messages) {
|
|
615
|
+
for (const part of message.content)
|
|
616
|
+
if (part.type === "tool_call")
|
|
617
|
+
names.set(part.provider_call_id, part.name);
|
|
618
|
+
}
|
|
619
|
+
const results = since.flatMap((message) => message.content.flatMap((part) => part.type === "tool_result" ? [{ providerCallId: part.provider_call_id, name: names.get(part.provider_call_id), text: part.text, isError: part.is_error }] : []));
|
|
620
|
+
return {
|
|
621
|
+
request,
|
|
622
|
+
userText: lastUser === undefined ? "" : textOfParts(lastUser.message),
|
|
623
|
+
step: since.filter((message) => message.role === "assistant").length,
|
|
624
|
+
system: request.system.map((block) => block.text).join("\n"),
|
|
625
|
+
results,
|
|
626
|
+
last: results.at(-1),
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
export function createSloppyModelAdapter(turns, options) {
|
|
630
|
+
const providerId = (options.providerId ?? "scripted");
|
|
631
|
+
const requests = [];
|
|
632
|
+
const views = [];
|
|
633
|
+
const prefix = options.adapterId.replace(/[^A-Za-z0-9]/g, "");
|
|
634
|
+
let counter = 0;
|
|
635
|
+
const respond = (request) => {
|
|
636
|
+
const view = sloppyView(request);
|
|
637
|
+
views.push(view);
|
|
638
|
+
const turn = turns.find((candidate) => (typeof candidate.when === "function" ? candidate.when(view.userText) : candidate.when.test(view.userText)));
|
|
639
|
+
if (turn === undefined)
|
|
640
|
+
return { text: "I have nothing to add." };
|
|
641
|
+
const step = typeof turn.steps === "function" ? turn.steps(view) : turn.steps[view.step];
|
|
642
|
+
if (step === undefined)
|
|
643
|
+
return { text: turn.after ?? "Done." };
|
|
644
|
+
return typeof step === "function" ? step(view) : step;
|
|
645
|
+
};
|
|
646
|
+
async function* stream(request, signal) {
|
|
647
|
+
requests.push(request);
|
|
648
|
+
if (signal.aborted) {
|
|
649
|
+
yield { type: "error", error: { code: "cancelled", message: "request aborted by user", retryable: false } };
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
yield { type: "start", request_id: request.request_id, route: request.route };
|
|
653
|
+
let response;
|
|
654
|
+
try {
|
|
655
|
+
response = respond(request);
|
|
656
|
+
}
|
|
657
|
+
catch (error) {
|
|
658
|
+
yield { type: "error", error: { code: "provider_internal", message: error instanceof Error ? error.message : String(error), retryable: false } };
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
const calls = "calls" in response
|
|
662
|
+
? response.calls.map((call) => {
|
|
663
|
+
counter += 1;
|
|
664
|
+
return { ...call, id: `call_${prefix}${counter.toString(36).padStart(6, "0")}` };
|
|
665
|
+
})
|
|
666
|
+
: [];
|
|
667
|
+
const text = response.text === undefined || response.text === "" ? undefined : response.text;
|
|
668
|
+
const offset = text === undefined ? 0 : 1;
|
|
669
|
+
if (text !== undefined)
|
|
670
|
+
yield { type: "text_delta", index: 0, text };
|
|
671
|
+
for (const [index, call] of calls.entries())
|
|
672
|
+
yield { type: "tool_call_start", index: index + offset, provider_call_id: call.id, name: call.name };
|
|
673
|
+
for (const [index, call] of calls.entries()) {
|
|
674
|
+
yield { type: "tool_call_end", index: index + offset, provider_call_id: call.id, name: call.name, arguments: call.arguments };
|
|
675
|
+
}
|
|
676
|
+
yield {
|
|
677
|
+
type: "done",
|
|
678
|
+
stop_reason: calls.length > 0 ? "tool_use" : "stop",
|
|
679
|
+
message: {
|
|
680
|
+
role: "assistant",
|
|
681
|
+
content: [
|
|
682
|
+
...(text === undefined ? [] : [{ type: "text", text }]),
|
|
683
|
+
...calls.map((call) => ({ type: "tool_call", provider_call_id: call.id, name: call.name, arguments: call.arguments })),
|
|
684
|
+
],
|
|
685
|
+
},
|
|
686
|
+
usage: { input_tokens: Math.ceil(JSON.stringify(request).length / 5), output_tokens: 20, source: "provider-reported" },
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
return {
|
|
690
|
+
kind: "model",
|
|
691
|
+
adapterId: options.adapterId,
|
|
692
|
+
providerId,
|
|
693
|
+
authMethod: "api-key",
|
|
694
|
+
requests,
|
|
695
|
+
views,
|
|
696
|
+
async discoverCapabilities() {
|
|
697
|
+
return {
|
|
698
|
+
schema_version: 1,
|
|
699
|
+
provider_id: providerId,
|
|
700
|
+
adapter_id: options.adapterId,
|
|
701
|
+
adapter_kind: "model",
|
|
702
|
+
auth_method: "api-key",
|
|
703
|
+
auth_status: "connected",
|
|
704
|
+
billing: "unknown",
|
|
705
|
+
quota_visibility: "none",
|
|
706
|
+
loop_owner: "synorch",
|
|
707
|
+
tool_channel: "native",
|
|
708
|
+
policy_status: "permitted",
|
|
709
|
+
models: [],
|
|
710
|
+
probed_at: new Date(0).toISOString(),
|
|
711
|
+
source: "static-config",
|
|
712
|
+
};
|
|
713
|
+
},
|
|
714
|
+
prepare(request) {
|
|
715
|
+
return { ok: true, wireDigest: digestOf(request), warnings: [] };
|
|
716
|
+
},
|
|
717
|
+
stream(request, _credential, signal) {
|
|
718
|
+
return stream(request, signal);
|
|
719
|
+
},
|
|
720
|
+
async health() {
|
|
721
|
+
return { state: "ok", checked_at: new Date(0).toISOString(), detail: "sloppy scripted model" };
|
|
722
|
+
},
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/** `sha256:<hex>` digests in a text, in order of appearance. */
|
|
726
|
+
export function digestsIn(text) {
|
|
727
|
+
return [...text.matchAll(/sha256:[0-9a-f]{64}/g)].map((match) => match[0]);
|
|
728
|
+
}
|
|
729
|
+
/** The `[#n]` short ref a tool result starts with, when the runtime rendered one (ADR-18). */
|
|
730
|
+
export function shortRefOf(result) {
|
|
731
|
+
const match = result === undefined ? null : /^\[#(\d+)\]/.exec(result.text);
|
|
732
|
+
return match === null ? undefined : Number(match[1]);
|
|
733
|
+
}
|
|
734
|
+
//# sourceMappingURL=testing.js.map
|