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,32 @@
|
|
|
1
|
+
import { type RendererKind } from "../contracts/index.ts";
|
|
2
|
+
import type { ColorMode } from "./args.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Renderer and colour selection for one invocation (CLI contract §3). `agent` never runs in JSONL:
|
|
5
|
+
* it is interactive by definition and falls back to plain lines without a terminal. Colour is
|
|
6
|
+
* decided against the stream the renderer writes human text to (stdout, or stderr in JSONL mode).
|
|
7
|
+
*/
|
|
8
|
+
export interface TerminalFacts {
|
|
9
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
10
|
+
readonly stdinIsTTY: boolean;
|
|
11
|
+
readonly stdoutIsTTY: boolean;
|
|
12
|
+
readonly stdoutHasColors: boolean;
|
|
13
|
+
readonly stderrHasColors: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TerminalRequest {
|
|
16
|
+
readonly jsonl: boolean;
|
|
17
|
+
readonly plain: boolean;
|
|
18
|
+
readonly color: ColorMode;
|
|
19
|
+
/** From user/workspace config once I5 stage B wires configuration; undefined until then. */
|
|
20
|
+
readonly configColor?: boolean | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface TerminalSettings {
|
|
23
|
+
readonly kind: RendererKind;
|
|
24
|
+
readonly color: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function resolveTerminalSettings(request: TerminalRequest, facts: TerminalFacts): TerminalSettings;
|
|
27
|
+
export interface ColorCapableStream {
|
|
28
|
+
readonly isTTY?: boolean;
|
|
29
|
+
hasColors?(): boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function streamHasColors(stream: ColorCapableStream): boolean;
|
|
32
|
+
//# sourceMappingURL=terminal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../src/harness/cli/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;GAIG;AAEH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,4FAA4F;IAC5F,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAexG;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,IAAI,OAAO,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEnE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { selectColor, selectRendererKind } from "../contracts/index.js";
|
|
2
|
+
export function resolveTerminalSettings(request, facts) {
|
|
3
|
+
const kind = selectRendererKind({
|
|
4
|
+
jsonl: request.jsonl,
|
|
5
|
+
plain: request.plain,
|
|
6
|
+
env: facts.env,
|
|
7
|
+
stdinIsTTY: facts.stdinIsTTY,
|
|
8
|
+
stdoutIsTTY: facts.stdoutIsTTY,
|
|
9
|
+
});
|
|
10
|
+
const color = selectColor({
|
|
11
|
+
flag: request.color,
|
|
12
|
+
config: request.configColor,
|
|
13
|
+
env: facts.env,
|
|
14
|
+
streamHasColors: kind === "jsonl" ? facts.stderrHasColors : facts.stdoutHasColors,
|
|
15
|
+
});
|
|
16
|
+
return { kind, color };
|
|
17
|
+
}
|
|
18
|
+
export function streamHasColors(stream) {
|
|
19
|
+
return stream.isTTY === true && typeof stream.hasColors === "function" && stream.hasColors();
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../../src/harness/cli/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;AA8B3F,MAAM,UAAU,uBAAuB,CAAC,OAAwB,EAAE,KAAoB;IACpF,MAAM,IAAI,GAAG,kBAAkB,CAAC;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;KAC/B,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,WAAW,CAAC;QACxB,IAAI,EAAE,OAAO,CAAC,KAAK;QACnB,MAAM,EAAE,OAAO,CAAC,WAAW;QAC3B,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,eAAe,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe;KAClF,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACzB,CAAC;AAOD,MAAM,UAAU,eAAe,CAAC,MAA0B;IACxD,OAAO,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type BlobStore, type SessionEvent } from "../contracts/index.ts";
|
|
2
|
+
import type { ContextView, DiffView, EvidenceView, WhyView } from "../contracts/views.ts";
|
|
3
|
+
export interface EvidenceRun {
|
|
4
|
+
readonly sessionId: string;
|
|
5
|
+
readonly events: readonly SessionEvent[];
|
|
6
|
+
}
|
|
7
|
+
export interface EvidenceSources {
|
|
8
|
+
readonly blobs: BlobStore;
|
|
9
|
+
/** The conversation's own events. */
|
|
10
|
+
readonly conversation: readonly SessionEvent[];
|
|
11
|
+
/** The conversation's worker runs, oldest first. */
|
|
12
|
+
readonly runs: readonly EvidenceRun[];
|
|
13
|
+
/** The conversation's direct edits (from `/diff`). */
|
|
14
|
+
readonly diff: DiffView;
|
|
15
|
+
}
|
|
16
|
+
/** Test, build and lint commands count as checks for a direct-mode turn. */
|
|
17
|
+
export declare function isCheckCommand(argv: readonly string[]): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* `/evidence [turn | <n>]`: the latest worker run or direct-mode turn (whichever is newer), the
|
|
20
|
+
* latest direct turn, or the n-th most recent worker run.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildEvidence(sources: EvidenceSources, argument: string): Promise<EvidenceView>;
|
|
23
|
+
export interface WhyFacts {
|
|
24
|
+
readonly mode: string;
|
|
25
|
+
readonly trust: string;
|
|
26
|
+
readonly sandbox: string;
|
|
27
|
+
readonly grants: readonly string[];
|
|
28
|
+
readonly planOn: boolean;
|
|
29
|
+
readonly noPermissionMode: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `/why [last | <n> | <tool> | model]`: the latest (or the n-th most recent, or the latest of one
|
|
33
|
+
* tool) policy decision — layer, rule, who answered a prompt, the mode and trust it ran under and
|
|
34
|
+
* what would change it — or why the conversation's model route was chosen.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildWhy(events: readonly SessionEvent[], argument: string, facts: WhyFacts): WhyView | string;
|
|
37
|
+
/** `/context`: every block of the last model request with its origin, why it is there and its token estimate. */
|
|
38
|
+
export declare function buildContextView(events: readonly SessionEvent[], blobs: BlobStore, windowTokens: number | undefined): Promise<ContextView | undefined>;
|
|
39
|
+
//# sourceMappingURL=transparency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transparency.d.ts","sourceRoot":"","sources":["../../../src/harness/cli/transparency.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EAGd,KAAK,YAAY,EAElB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAqC,WAAW,EAAiB,QAAQ,EAAE,YAAY,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA+CvJ,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/C,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAID,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAM/D;AAqND;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAmBrG;AAID,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC;AAwCD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAmD7G;AAcD,iHAAiH;AACjH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAqF5J"}
|
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import { completionPacketSchema, reviewPacketSchema, WORKSPACE_UNTRUSTED_CODE, } from "../contracts/index.js";
|
|
2
|
+
import { estimateTokens, toolTokens } from "../context/index.js";
|
|
3
|
+
import { rebuildModelRequest } from "../core/envelope.js";
|
|
4
|
+
import { artifactReviewRecordSchema, REVIEW_CRITERIA } from "../orchestration/artifact-review.js";
|
|
5
|
+
import { isTestCommand } from "../tui/conversation-view.js";
|
|
6
|
+
function snippet(text, length) {
|
|
7
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
8
|
+
return flat.length <= length ? flat : `${flat.slice(0, length - 1)}…`;
|
|
9
|
+
}
|
|
10
|
+
function ago(timestamp) {
|
|
11
|
+
const then = timestamp === undefined ? Number.NaN : Date.parse(timestamp);
|
|
12
|
+
if (!Number.isFinite(then))
|
|
13
|
+
return "earlier";
|
|
14
|
+
const seconds = Math.max(0, Math.round((Date.now() - then) / 1000));
|
|
15
|
+
if (seconds < 60)
|
|
16
|
+
return "just now";
|
|
17
|
+
if (seconds < 3600)
|
|
18
|
+
return `${Math.round(seconds / 60)}m ago`;
|
|
19
|
+
if (seconds < 86_400)
|
|
20
|
+
return `${Math.round(seconds / 3600)}h ago`;
|
|
21
|
+
return `${Math.round(seconds / 86_400)}d ago`;
|
|
22
|
+
}
|
|
23
|
+
async function readJson(blobs, digest, parse) {
|
|
24
|
+
try {
|
|
25
|
+
return parse(JSON.parse(new TextDecoder().decode(await blobs.get(digest))));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function lastLines(text, count) {
|
|
32
|
+
return text
|
|
33
|
+
.split(/\r?\n/)
|
|
34
|
+
.map((line) => line.trimEnd())
|
|
35
|
+
.filter((line) => line.trim() !== "")
|
|
36
|
+
.slice(-count)
|
|
37
|
+
.join("\n");
|
|
38
|
+
}
|
|
39
|
+
const CHECK_WORDS = /^(build|check|lint|typecheck|tsc|eslint|biome|ruff|mypy|clippy|vet)$/;
|
|
40
|
+
/** Test, build and lint commands count as checks for a direct-mode turn. */
|
|
41
|
+
export function isCheckCommand(argv) {
|
|
42
|
+
if (isTestCommand(argv))
|
|
43
|
+
return true;
|
|
44
|
+
return argv.some((word, index) => {
|
|
45
|
+
const base = word.toLowerCase().replace(/\.(cmd|exe)$/, "").split(/[\\/]/).pop() ?? "";
|
|
46
|
+
return CHECK_WORDS.test(base) || (index > 0 && /^(build|check|lint|typecheck)(:[\w:-]+)?$/.test(base));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function runGoal(run) {
|
|
50
|
+
const created = run.events.find((event) => event.type === "run/created");
|
|
51
|
+
const plan = run.events.find((event) => event.type === "plan/proposed");
|
|
52
|
+
return created?.data.goal ?? plan?.data.plan.goal ?? "worker run";
|
|
53
|
+
}
|
|
54
|
+
function runStatus(run) {
|
|
55
|
+
const state = [...run.events].reverse().find((event) => event.type === "run/state_changed");
|
|
56
|
+
return state?.data.to.replaceAll("_", " ") ?? "unknown";
|
|
57
|
+
}
|
|
58
|
+
/** The conversation split into turns (a user message and everything up to the next one). */
|
|
59
|
+
function directTurns(events) {
|
|
60
|
+
const turns = [];
|
|
61
|
+
let current;
|
|
62
|
+
for (const event of events) {
|
|
63
|
+
if (event.type === "message/recorded" && event.data.role === "user") {
|
|
64
|
+
if (current !== undefined)
|
|
65
|
+
turns.push(current);
|
|
66
|
+
const text = event.data.message?.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join(" ") ?? "";
|
|
67
|
+
current = { prompt: (text.replace(/^\[Synorch note:[^\]]*\]\s*/u, "").split("<synorch-attachments>")[0] ?? "").trim(), at: event.timestamp, events: [] };
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
current?.events.push(event);
|
|
71
|
+
}
|
|
72
|
+
if (current !== undefined)
|
|
73
|
+
turns.push(current);
|
|
74
|
+
return turns;
|
|
75
|
+
}
|
|
76
|
+
function turnHasWork(turn) {
|
|
77
|
+
return turn.events.some((event) => event.type === "checkpoint/recorded" ||
|
|
78
|
+
(event.type === "tool/policy_decided" && event.data.action.command !== undefined && isCheckCommand(event.data.action.command.argv)));
|
|
79
|
+
}
|
|
80
|
+
function directEvidence(turn, sources, restored) {
|
|
81
|
+
const changed = [...new Set(turn.events.flatMap((event) => (event.type === "checkpoint/recorded" && !restored.has(event.seq) ? event.data.files.map((file) => file.path) : [])))];
|
|
82
|
+
const criteria = [];
|
|
83
|
+
const results = new Map(turn.events.flatMap((event) => (event.type === "tool/result_recorded" ? [[event.data.tool_call_id, event]] : [])));
|
|
84
|
+
for (const event of turn.events) {
|
|
85
|
+
if (event.type !== "tool/policy_decided" || event.data.action.command === undefined || !isCheckCommand(event.data.action.command.argv))
|
|
86
|
+
continue;
|
|
87
|
+
const command = event.data.action.command.argv.join(" ");
|
|
88
|
+
const result = results.get(event.data.tool_call_id);
|
|
89
|
+
const exit = result?.data.result.exit_code;
|
|
90
|
+
const ran = result !== undefined && exit !== undefined;
|
|
91
|
+
const status = !ran ? "not_run" : exit === 0 ? "passed" : "failed";
|
|
92
|
+
const proof = {
|
|
93
|
+
kind: "command",
|
|
94
|
+
command,
|
|
95
|
+
...(exit === undefined ? {} : { exitCode: exit }),
|
|
96
|
+
runBy: "harness",
|
|
97
|
+
...(result === undefined ? {} : { durationMs: result.data.duration_ms }),
|
|
98
|
+
...(result === undefined || result.data.result.text.trim() === "" ? {} : { excerpt: lastLines(result.data.result.text, 3) }),
|
|
99
|
+
...(ran ? {} : { detail: result?.data.result.error?.message ?? (event.data.decision.decision === "deny" ? "refused by policy" : "did not run") }),
|
|
100
|
+
};
|
|
101
|
+
criteria.push({ text: `${isTestCommand(event.data.action.command.argv) ? "tests" : "check"}: ${command}`, status, proofs: [proof] });
|
|
102
|
+
}
|
|
103
|
+
if (!criteria.some((criterion) => criterion.text.startsWith("tests:"))) {
|
|
104
|
+
criteria.unshift({ text: "tests", status: "not_run", proofs: [{ kind: "note", text: "no test command ran in this turn; ask Synorch to run the tests, or run them yourself" }] });
|
|
105
|
+
}
|
|
106
|
+
const files = sources.diff.files.filter((file) => changed.includes(file.path));
|
|
107
|
+
for (const file of files)
|
|
108
|
+
criteria.push({ text: `changed ${file.path}`, status: "unverifiable", proofs: [{ kind: "file", path: file.path, note: `+${file.added} -${file.removed}${file.change === "modified" ? "" : ` (${file.change})`}` }] });
|
|
109
|
+
return {
|
|
110
|
+
kind: "evidence",
|
|
111
|
+
title: `turn "${snippet(turn.prompt, 50)}"`,
|
|
112
|
+
criteria,
|
|
113
|
+
review: { independent: false },
|
|
114
|
+
...(changed.length === 0 ? {} : { changedPaths: changed }),
|
|
115
|
+
...(files.length === 0 ? {} : { diffstat: { files: files.length, added: files.reduce((sum, file) => sum + file.added, 0), removed: files.reduce((sum, file) => sum + file.removed, 0) } }),
|
|
116
|
+
next: changed.length === 0 ? "nothing changed in this turn" : "direct edits are not independently reviewed: /review runs a reviewer on the uncommitted diff · /diff shows the lines",
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const REVIEW_VERDICT_VIEW = { approve: "accepted", changes_requested: "changes_requested", blocked: "rejected" };
|
|
120
|
+
/** A `/review` run (ADR-09 artifact review): criteria with the reviewer's own evidence, the verdict and findings. */
|
|
121
|
+
async function artifactReviewEvidence(run, blobs) {
|
|
122
|
+
const recorded = [...run.events].reverse().find((event) => event.type === "review/recorded");
|
|
123
|
+
if (recorded === undefined)
|
|
124
|
+
return undefined;
|
|
125
|
+
const record = await readJson(blobs, recorded.data.blob.digest, (value) => artifactReviewRecordSchema.parse(value));
|
|
126
|
+
if (record === undefined)
|
|
127
|
+
return undefined;
|
|
128
|
+
const reviewer = `${record.reviewer.provider_id}/${record.reviewer.model_id}`;
|
|
129
|
+
const verdict = record.verdict === undefined ? undefined : REVIEW_VERDICT_VIEW[record.verdict];
|
|
130
|
+
const criteria = record.criteria.map((criterion) => ({
|
|
131
|
+
text: `${criterion.name}: ${REVIEW_CRITERIA.find((entry) => entry.id === criterion.id)?.statement ?? criterion.id}`,
|
|
132
|
+
status: criterion.verdict === "met" ? "passed" : criterion.verdict === "not_met" ? "failed" : "unverifiable",
|
|
133
|
+
proofs: [
|
|
134
|
+
...criterion.evidence.map((ref) => ({ kind: "note", text: `${ref} (reviewer's own tool call)` })),
|
|
135
|
+
...(criterion.note === undefined ? [] : [{ kind: "note", text: criterion.note }]),
|
|
136
|
+
],
|
|
137
|
+
}));
|
|
138
|
+
criteria.push({
|
|
139
|
+
text: `artifact ${record.artifactDigest.slice(0, 19)}… pinned`,
|
|
140
|
+
status: record.status === "artifact_changed" ? "unverifiable" : "passed",
|
|
141
|
+
proofs: [{ kind: "note", text: record.status === "artifact_changed" ? "the artifact changed during review: the verdict covers the pinned version only" : "unchanged during review (digest recomputed after the reviewer finished)" }],
|
|
142
|
+
});
|
|
143
|
+
return {
|
|
144
|
+
kind: "evidence",
|
|
145
|
+
title: `review: ${snippet(record.target, 50)} (${runStatus(run)})`,
|
|
146
|
+
criteria,
|
|
147
|
+
review: {
|
|
148
|
+
independent: true,
|
|
149
|
+
reviewer,
|
|
150
|
+
...(verdict === undefined ? {} : { verdict }),
|
|
151
|
+
findings: record.findings.map((finding) => `${finding.severity} ${finding.path === undefined ? "" : `${finding.path}${finding.line === undefined ? "" : `:${finding.line}`} `}${finding.summary}`),
|
|
152
|
+
},
|
|
153
|
+
changedPaths: record.changedPaths,
|
|
154
|
+
...(record.findings.some((finding) => finding.severity !== "info") ? { next: "/review fix sends the findings to Synorch" } : {}),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
async function runEvidence(run, blobs) {
|
|
158
|
+
const reviewed = await artifactReviewEvidence(run, blobs);
|
|
159
|
+
if (reviewed !== undefined)
|
|
160
|
+
return reviewed;
|
|
161
|
+
const events = run.events;
|
|
162
|
+
const keys = new Map();
|
|
163
|
+
const states = new Map();
|
|
164
|
+
const attempts = new Map();
|
|
165
|
+
let plan;
|
|
166
|
+
for (const event of events) {
|
|
167
|
+
if (event.type === "task/created")
|
|
168
|
+
keys.set(event.data.task_id, event.data.key);
|
|
169
|
+
if (event.type === "task/state_changed")
|
|
170
|
+
states.set(event.data.task_id, event.data.to);
|
|
171
|
+
if (event.type === "attempt/started")
|
|
172
|
+
attempts.set(event.data.attempt_id, event.data.task_id);
|
|
173
|
+
if (event.type === "plan/proposed")
|
|
174
|
+
plan = event.data.plan;
|
|
175
|
+
}
|
|
176
|
+
const reviews = new Map();
|
|
177
|
+
const reviewEvents = events.filter((event) => event.type === "review/recorded");
|
|
178
|
+
for (const event of reviewEvents) {
|
|
179
|
+
const packet = await readJson(blobs, event.data.blob.digest, (value) => reviewPacketSchema.parse(value));
|
|
180
|
+
if (packet !== undefined)
|
|
181
|
+
reviews.set(event.data.task_id, packet);
|
|
182
|
+
}
|
|
183
|
+
const cited = new Map();
|
|
184
|
+
for (const event of events) {
|
|
185
|
+
if (event.type !== "attempt/completion_recorded")
|
|
186
|
+
continue;
|
|
187
|
+
const completion = await readJson(blobs, event.data.blob.digest, (value) => completionPacketSchema.parse(value));
|
|
188
|
+
const taskId = attempts.get(event.data.attempt_id);
|
|
189
|
+
if (completion !== undefined && taskId !== undefined)
|
|
190
|
+
cited.set(taskId, completion.acceptance_evidence);
|
|
191
|
+
}
|
|
192
|
+
const criteria = [];
|
|
193
|
+
for (const [taskId, key] of keys) {
|
|
194
|
+
const task = plan?.tasks.find((candidate) => candidate.key === key);
|
|
195
|
+
const review = reviews.get(taskId);
|
|
196
|
+
for (const criterion of task?.acceptance_criteria ?? []) {
|
|
197
|
+
const verdict = review?.criteria.find((entry) => entry.criterion_id === criterion.id);
|
|
198
|
+
const proofs = [];
|
|
199
|
+
for (const entry of cited.get(taskId)?.filter((item) => item.criterion_id === criterion.id) ?? []) {
|
|
200
|
+
for (const ref of entry.evidence)
|
|
201
|
+
proofs.push({ kind: "note", text: `${ref.kind} ${ref.ref} (cited by the ${ref.produced_by})`, inferred: ref.produced_by !== "harness" });
|
|
202
|
+
}
|
|
203
|
+
if (review !== undefined && verdict !== undefined) {
|
|
204
|
+
proofs.push({
|
|
205
|
+
kind: "review",
|
|
206
|
+
verdict: verdict.verdict === "met" ? "accepted" : verdict.verdict === "not_met" ? "rejected" : "changes_requested",
|
|
207
|
+
reviewer: review.reviewer_route.model_id,
|
|
208
|
+
independent: !review.independence.same_model,
|
|
209
|
+
});
|
|
210
|
+
if (verdict.note !== undefined)
|
|
211
|
+
proofs.push({ kind: "note", text: verdict.note });
|
|
212
|
+
}
|
|
213
|
+
const status = verdict === undefined ? (states.get(taskId) === "failed" ? "failed" : "unverifiable") : verdict.verdict === "met" ? "passed" : verdict.verdict === "not_met" ? "failed" : "unverifiable";
|
|
214
|
+
criteria.push({ text: `${key}: ${criterion.statement}`, status, proofs });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
for (const event of events) {
|
|
218
|
+
if (event.type !== "attempt/verification_ran")
|
|
219
|
+
continue;
|
|
220
|
+
criteria.push({
|
|
221
|
+
text: `${keys.get(event.data.task_id) ?? "task"}: check ${event.data.command}`,
|
|
222
|
+
status: event.data.status === "passed" ? "passed" : event.data.status === "failed" ? "failed" : "not_run",
|
|
223
|
+
proofs: [
|
|
224
|
+
{
|
|
225
|
+
kind: "command",
|
|
226
|
+
command: event.data.command,
|
|
227
|
+
...(event.data.exit_code === null ? {} : { exitCode: event.data.exit_code }),
|
|
228
|
+
runBy: "harness",
|
|
229
|
+
durationMs: event.data.duration_ms,
|
|
230
|
+
...(event.data.output_excerpt.trim() === "" ? {} : { excerpt: lastLines(event.data.output_excerpt, 3) }),
|
|
231
|
+
...(event.data.reason === undefined ? {} : { detail: event.data.reason }),
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const lastReview = [...reviews.values()].at(-1);
|
|
237
|
+
const lastDecision = reviewEvents.at(-1)?.data.decision;
|
|
238
|
+
const findings = [...reviews.values()].flatMap((review) => review.findings.map((finding) => `${finding.severity} ${finding.path === undefined ? "" : `${finding.path}${finding.line === undefined ? "" : `:${finding.line}`} `}${finding.summary}`));
|
|
239
|
+
const integrated = [...new Set(events.flatMap((event) => (event.type === "task/integrated" ? event.data.paths : [])))];
|
|
240
|
+
return {
|
|
241
|
+
kind: "evidence",
|
|
242
|
+
title: `workers: ${snippet(runGoal(run), 50)} (${runStatus(run)})`,
|
|
243
|
+
criteria,
|
|
244
|
+
review: lastReview === undefined
|
|
245
|
+
? { independent: false }
|
|
246
|
+
: {
|
|
247
|
+
independent: true,
|
|
248
|
+
reviewer: lastReview.reviewer_route.model_id,
|
|
249
|
+
verdict: lastDecision === "accept" ? "accepted" : lastDecision === "revise" ? "changes_requested" : "rejected",
|
|
250
|
+
findings,
|
|
251
|
+
},
|
|
252
|
+
...(integrated.length === 0 ? {} : { changedPaths: integrated }),
|
|
253
|
+
...(lastReview === undefined ? { next: "no independent review was recorded for this run" } : {}),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* `/evidence [turn | <n>]`: the latest worker run or direct-mode turn (whichever is newer), the
|
|
258
|
+
* latest direct turn, or the n-th most recent worker run.
|
|
259
|
+
*/
|
|
260
|
+
export async function buildEvidence(sources, argument) {
|
|
261
|
+
const restored = new Set(sources.conversation.flatMap((event) => (event.type === "checkpoint/restored" ? [event.data.checkpoint_seq] : [])));
|
|
262
|
+
const turns = directTurns(sources.conversation).filter(turnHasWork);
|
|
263
|
+
const runs = [...sources.runs].reverse();
|
|
264
|
+
const others = runs.map((run, index) => `${index + 1}. ${snippet(runGoal(run), 40)} · ${runStatus(run)} · ${ago(run.events.at(-1)?.timestamp)}`);
|
|
265
|
+
const wanted = argument.trim().toLowerCase();
|
|
266
|
+
const lastTurn = turns.at(-1);
|
|
267
|
+
const withOthers = (view) => (others.length === 0 ? view : { ...view, others: [...(lastTurn === undefined ? [] : ["turn"]), ...others] });
|
|
268
|
+
if (/^\d+$/.test(wanted)) {
|
|
269
|
+
const run = runs[Number(wanted) - 1];
|
|
270
|
+
if (run !== undefined)
|
|
271
|
+
return withOthers(await runEvidence(run, sources.blobs));
|
|
272
|
+
return { kind: "evidence", title: `no worker run ${wanted}`, criteria: [], next: runs.length === 0 ? "no worker runs in this conversation yet" : `/evidence 1…${runs.length}` };
|
|
273
|
+
}
|
|
274
|
+
const latestRun = runs[0];
|
|
275
|
+
const runAt = latestRun?.events.at(-1)?.timestamp ?? "";
|
|
276
|
+
const turnAt = lastTurn?.events.at(-1)?.timestamp ?? lastTurn?.at ?? "";
|
|
277
|
+
if (wanted !== "turn" && latestRun !== undefined && (lastTurn === undefined || runAt >= turnAt))
|
|
278
|
+
return withOthers(await runEvidence(latestRun, sources.blobs));
|
|
279
|
+
if (lastTurn !== undefined)
|
|
280
|
+
return withOthers(directEvidence(lastTurn, sources, restored));
|
|
281
|
+
return { kind: "evidence", title: "this conversation", criteria: [], review: { independent: false }, next: "nothing changed and no checks ran yet" };
|
|
282
|
+
}
|
|
283
|
+
function target(event) {
|
|
284
|
+
const action = event.data.action;
|
|
285
|
+
return action.command !== undefined ? action.command.argv.join(" ") : action.paths.map((entry) => entry.path).join(", ") || action.network_hosts.join(", ");
|
|
286
|
+
}
|
|
287
|
+
function subjectOf(event) {
|
|
288
|
+
return `${event.data.action.tool_name} ${snippet(target(event), 100)}`.trim();
|
|
289
|
+
}
|
|
290
|
+
const DECISION_WORD = { allow: "allowed", ask: "asked you", deny: "denied" };
|
|
291
|
+
function routeWhy(events) {
|
|
292
|
+
const decided = [...events].reverse().find((event) => event.type === "route/decided");
|
|
293
|
+
if (decided === undefined)
|
|
294
|
+
return undefined;
|
|
295
|
+
const decision = decided.data.decision;
|
|
296
|
+
const facts = [
|
|
297
|
+
{ label: "Tier", text: `${decision.tier}${decision.role === undefined ? "" : ` (role ${decision.role})`}` },
|
|
298
|
+
{ label: "Source", text: `${decision.source} configuration` },
|
|
299
|
+
{ label: "Reason", text: decision.reason },
|
|
300
|
+
{ label: "Adapter", text: decision.route.adapter_id },
|
|
301
|
+
{ label: "Fallback", text: decision.fallback.used ? `yes, from ${decision.fallback.from?.provider_id ?? "?"}/${decision.fallback.from?.model_id ?? "?"} (approved)` : "no" },
|
|
302
|
+
];
|
|
303
|
+
return {
|
|
304
|
+
kind: "why",
|
|
305
|
+
question: "Why this model?",
|
|
306
|
+
subject: `${decision.route.provider_id}/${decision.route.model_id}`,
|
|
307
|
+
decision: "allow",
|
|
308
|
+
reasons: [],
|
|
309
|
+
howToChange: [
|
|
310
|
+
{ command: "/model", effect: "every logged-in provider's models; switch this conversation" },
|
|
311
|
+
{ command: `/config routes.${decision.tier}`, effect: "change the default route for this tier" },
|
|
312
|
+
],
|
|
313
|
+
facts,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* `/why [last | <n> | <tool> | model]`: the latest (or the n-th most recent, or the latest of one
|
|
318
|
+
* tool) policy decision — layer, rule, who answered a prompt, the mode and trust it ran under and
|
|
319
|
+
* what would change it — or why the conversation's model route was chosen.
|
|
320
|
+
*/
|
|
321
|
+
export function buildWhy(events, argument, facts) {
|
|
322
|
+
const wanted = argument.trim().toLowerCase();
|
|
323
|
+
if (wanted === "model" || wanted === "route")
|
|
324
|
+
return routeWhy(events) ?? "No model route recorded yet in this conversation.";
|
|
325
|
+
const decided = [...events].reverse().filter((event) => event.type === "tool/policy_decided");
|
|
326
|
+
let chosen;
|
|
327
|
+
if (wanted === "" || wanted === "last")
|
|
328
|
+
chosen = decided[0];
|
|
329
|
+
else if (/^\d+$/.test(wanted))
|
|
330
|
+
chosen = decided[Number(wanted) - 1];
|
|
331
|
+
else
|
|
332
|
+
chosen = decided.find((event) => event.data.action.tool_name.toLowerCase().includes(wanted));
|
|
333
|
+
if (chosen === undefined) {
|
|
334
|
+
if (decided.length === 0)
|
|
335
|
+
return "No action recorded yet in this conversation. /why model explains the model route.";
|
|
336
|
+
return /^\d+$/.test(wanted) ? `Only ${decided.length} decision${decided.length === 1 ? "" : "s"} recorded; /why 1…${decided.length}` : `No ${wanted} action recorded in this conversation.`;
|
|
337
|
+
}
|
|
338
|
+
const action = chosen.data.action;
|
|
339
|
+
const decision = chosen.data.decision;
|
|
340
|
+
const index = events.indexOf(chosen);
|
|
341
|
+
const result = events.find((event) => event.type === "tool/result_recorded" && event.data.tool_call_id === chosen.data.tool_call_id);
|
|
342
|
+
const resultIndex = result === undefined ? events.length : events.indexOf(result);
|
|
343
|
+
const answered = events.slice(index, resultIndex).find((event) => event.type === "approval/decided");
|
|
344
|
+
const howToChange = [];
|
|
345
|
+
const add = (command, effect) => {
|
|
346
|
+
if (!howToChange.some((entry) => entry.command === command))
|
|
347
|
+
howToChange.push({ command, effect });
|
|
348
|
+
};
|
|
349
|
+
for (const reason of decision.reasons) {
|
|
350
|
+
// `/allow` extends only the conversation agent's partial-sandbox allowlist; a hard refusal (layer role) or a worker refusal is explained, never answered with /allow.
|
|
351
|
+
if (reason.code === "exec-not-allowlisted" && reason.layer === "sandbox" && action.role === "session" && decision.decision === "deny" && action.command !== undefined)
|
|
352
|
+
add(`/allow ${action.command.argv.slice(0, 2).join(" ")}`, "lets Synorch run commands starting with this prefix here");
|
|
353
|
+
if (reason.code === WORKSPACE_UNTRUSTED_CODE)
|
|
354
|
+
add("/trust", "lets build and test commands run in this folder");
|
|
355
|
+
if (reason.code === "approval-required" || reason.code === "permission-prompt")
|
|
356
|
+
add("/permissions auto (or Shift+Tab)", "fewer questions: auto asks only for risky commands, full asks nothing (hard rails still apply)");
|
|
357
|
+
if (reason.code === "exec-not-allowlisted" && facts.noPermissionMode)
|
|
358
|
+
add("--permission-mode auto", "asks you instead of refusing commands outside the allowlist");
|
|
359
|
+
if (reason.code === "sandbox-insufficient")
|
|
360
|
+
add("syn doctor --runtime", "shows why a full sandbox is required and missing");
|
|
361
|
+
}
|
|
362
|
+
if (facts.planOn && decision.decision === "deny" && decision.reasons.some((reason) => reason.code === "workspace-write-denied" || reason.code === "exec-denied"))
|
|
363
|
+
add("/plan (or Shift+Tab)", "leaves plan mode so edits and commands are allowed");
|
|
364
|
+
if (answered?.data.decision.outcome === "allowed-for-scope" && action.command !== undefined)
|
|
365
|
+
add("/permissions remove <prefix>", "removes an \"Always allow\" rule again");
|
|
366
|
+
if (decision.decision === "allow" && howToChange.length === 0 && action.command !== undefined && facts.grants.some((grant) => action.command?.argv.join(" ").startsWith(grant)))
|
|
367
|
+
add("/permissions remove <prefix>", "stops auto-allowing this command prefix");
|
|
368
|
+
const whyFacts = [
|
|
369
|
+
{ label: "Mode", text: facts.mode },
|
|
370
|
+
...(action.command === undefined ? [] : [{ label: "Trust", text: facts.trust }]),
|
|
371
|
+
{ label: "Sandbox", text: facts.sandbox },
|
|
372
|
+
...(answered === undefined ? [] : [{ label: "Answered", text: `${answered.data.decision.outcome.replaceAll("-", " ")} by ${answered.data.decision.decided_by === "user" ? "you" : answered.data.decision.decided_by}${answered.data.decision.reason === undefined ? "" : `: ${snippet(answered.data.decision.reason, 120)}`}` }]),
|
|
373
|
+
...(action.destructive ? [{ label: "Note", text: "destructive: asks in every mode" }] : []),
|
|
374
|
+
...(decision.rail === undefined ? [] : [{ label: "Rail", text: `${decision.rail} (hard rail, every mode)` }]),
|
|
375
|
+
...(result?.data.result.error === undefined ? [] : [{ label: "Result", text: snippet(result.data.result.error.message, 200) }]),
|
|
376
|
+
];
|
|
377
|
+
return {
|
|
378
|
+
kind: "why",
|
|
379
|
+
subject: `${subjectOf(chosen)}${result === undefined ? "" : ` (${result.data.state})`}`,
|
|
380
|
+
decision: decision.decision,
|
|
381
|
+
reasons: decision.reasons.map((reason) => ({ layer: reason.layer, code: reason.code, message: reason.message })),
|
|
382
|
+
howToChange,
|
|
383
|
+
facts: whyFacts,
|
|
384
|
+
recent: decided.slice(0, 6).map((event, position) => `${position + 1}. ${snippet(subjectOf(event), 60)} · ${DECISION_WORD[event.data.decision.decision]}`),
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
// ---- /context (UX-07) ---------------------------------------------------------------------------
|
|
388
|
+
function instructionLabel(blockId) {
|
|
389
|
+
if (blockId.startsWith("harness:"))
|
|
390
|
+
return `Synorch harness rules (${blockId.slice(8)})`;
|
|
391
|
+
if (blockId === "constitution")
|
|
392
|
+
return ".ai constitution";
|
|
393
|
+
if (blockId.startsWith("protocol:"))
|
|
394
|
+
return `protocol ${blockId.slice(9)}`;
|
|
395
|
+
if (blockId.startsWith("entrypoint:"))
|
|
396
|
+
return `${blockId.slice(11)} (repository guidance)`;
|
|
397
|
+
if (blockId === "project-profile")
|
|
398
|
+
return "Project profile (auto-detected: stack, package manager, commands)";
|
|
399
|
+
if (blockId.startsWith("role:"))
|
|
400
|
+
return `role manifest (${blockId.slice(5)})`;
|
|
401
|
+
return blockId;
|
|
402
|
+
}
|
|
403
|
+
/** `/context`: every block of the last model request with its origin, why it is there and its token estimate. */
|
|
404
|
+
export async function buildContextView(events, blobs, windowTokens) {
|
|
405
|
+
const request = [...events].reverse().find((event) => event.type === "model/request_prepared");
|
|
406
|
+
if (request === undefined)
|
|
407
|
+
return undefined;
|
|
408
|
+
const envelope = await rebuildModelRequest(request, blobs).catch(() => undefined);
|
|
409
|
+
const text = new Map((envelope?.system ?? []).map((block) => [block.id, block.text]));
|
|
410
|
+
const groups = [
|
|
411
|
+
{ title: "Instructions", items: [] },
|
|
412
|
+
{ title: "Skills", items: [] },
|
|
413
|
+
{ title: "Task packet", items: [] },
|
|
414
|
+
{ title: "Memory recalled", items: [] },
|
|
415
|
+
{ title: "Files inlined", items: [] },
|
|
416
|
+
{ title: "History", items: [] },
|
|
417
|
+
{ title: "Tools", items: [] },
|
|
418
|
+
];
|
|
419
|
+
const group = (title) => groups.find((entry) => entry.title === title)?.items ?? [];
|
|
420
|
+
const compaction = [...events].reverse().find((event) => event.type === "context/compacted");
|
|
421
|
+
let total = 0;
|
|
422
|
+
for (const block of request.data.context) {
|
|
423
|
+
total += block.tokens_estimate;
|
|
424
|
+
const base = { tokens: block.tokens_estimate, trust: block.trust, ...(block.truncated ? { truncated: true } : {}) };
|
|
425
|
+
const body = text.get(block.block_id) ?? "";
|
|
426
|
+
switch (block.source) {
|
|
427
|
+
case "harness":
|
|
428
|
+
case "constitution":
|
|
429
|
+
case "protocol":
|
|
430
|
+
case "role":
|
|
431
|
+
group("Instructions").push({ label: instructionLabel(block.block_id), detail: block.source === "harness" ? "harness priority" : "project instructions", ...base });
|
|
432
|
+
break;
|
|
433
|
+
case "skill-catalog": {
|
|
434
|
+
const count = body.split(/\r?\n/).filter((line) => /^\s*[-*]\s/.test(line)).length;
|
|
435
|
+
group("Skills").push({ label: "skill catalog", detail: count === 0 ? "names and triggers; load_skill loads one" : `${count} skills listed; load_skill loads one`, ...base });
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
case "skill":
|
|
439
|
+
group("Skills").push({ label: `skill ${block.block_id.replace(/^skill:/, "")}`, detail: "loaded in full (primary for the role or triggered by the request)", ...base });
|
|
440
|
+
break;
|
|
441
|
+
case "packet":
|
|
442
|
+
group("Task packet").push({ label: block.trust === "untrusted" ? "inlined sources" : "task packet", ...base });
|
|
443
|
+
break;
|
|
444
|
+
case "memory": {
|
|
445
|
+
const id = block.block_id.replace(/^memory:/, "");
|
|
446
|
+
const title = /^# (.+)$/m.exec(body)?.[1] ?? "";
|
|
447
|
+
const why = /^Why recalled: (.+)$/m.exec(body)?.[1];
|
|
448
|
+
group("Memory recalled").push({ label: `${id}${title === "" ? "" : ` ${title}`}`, ...(why === undefined ? {} : { detail: why }), ...base, ...(/^STALE:/m.test(body) ? { stale: true } : {}) });
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
case "compaction":
|
|
452
|
+
group("History").push({ label: "summary of earlier messages", detail: compaction === undefined ? "compacted" : `compacted ${compaction.data.trigger}: ~${compaction.data.tokens_before} → ~${compaction.data.tokens_after} tokens`, ...base });
|
|
453
|
+
break;
|
|
454
|
+
case "history": {
|
|
455
|
+
const messages = envelope?.messages.filter((message) => message.role !== "tool").length;
|
|
456
|
+
group("History").push({ label: "conversation messages", detail: `${messages === undefined ? "" : `${messages} messages `}${compaction === undefined ? "since the start" : "since the last compaction"}`, ...base });
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
case "tool-result":
|
|
460
|
+
group("History").push({ label: "tool results", detail: "output of the tools this conversation called (data)", ...base });
|
|
461
|
+
break;
|
|
462
|
+
default:
|
|
463
|
+
group("Instructions").push({ label: block.block_id, ...base });
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
// Files the user attached (@path) to the latest message: part of the history above, listed for provenance.
|
|
467
|
+
const lastUser = [...(envelope?.messages ?? [])].reverse().find((message) => message.role === "user");
|
|
468
|
+
const userText = lastUser?.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n") ?? "";
|
|
469
|
+
for (const match of userText.matchAll(/<(file|directory) path="([^"]+)"[^>]*>([\s\S]*?)<\/\1>/g)) {
|
|
470
|
+
const truncated = /^<file[^>]* truncated="true"/.test(match[0]);
|
|
471
|
+
group("Files inlined").push({ label: `${match[2] ?? "?"}${match[1] === "directory" ? "/" : ""}`, detail: "attached with @ in your last message (counted in history)", tokens: estimateTokens(match[3] ?? ""), trust: "untrusted", ...(truncated ? { truncated: true } : {}) });
|
|
472
|
+
}
|
|
473
|
+
if (envelope !== undefined && envelope.tools.length > 0) {
|
|
474
|
+
const tokens = toolTokens(envelope.tools);
|
|
475
|
+
total += tokens;
|
|
476
|
+
group("Tools").push({ label: `${envelope.tools.length} tool schemas`, detail: envelope.tools.map((tool) => tool.name).slice(0, 8).join(", ") + (envelope.tools.length > 8 ? ", …" : ""), tokens });
|
|
477
|
+
}
|
|
478
|
+
const memoryCount = group("Memory recalled").length;
|
|
479
|
+
return {
|
|
480
|
+
kind: "context",
|
|
481
|
+
model: `${request.data.route.provider_id}/${request.data.route.model_id}`,
|
|
482
|
+
totalTokens: total,
|
|
483
|
+
...(windowTokens === undefined ? {} : { windowTokens }),
|
|
484
|
+
groups: groups.filter((entry) => entry.items.length > 0),
|
|
485
|
+
notes: [
|
|
486
|
+
memoryCount === 0 ? "no memory was recalled for this request (/memory shows the ledger)" : "memory is data, not instructions · /memory retire <id> stops a note from being recalled",
|
|
487
|
+
"token counts are estimates (about 4 characters per token)",
|
|
488
|
+
],
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
//# sourceMappingURL=transparency.js.map
|