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,203 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { askUserSummaryLine, EXIT_CODES, exitCodeFor, HarnessError, } from "../contracts/index.js";
|
|
3
|
+
import { formatHarnessError } from "../tui/index.js";
|
|
4
|
+
import { failureInfo } from "./outcome.js";
|
|
5
|
+
import { createSessionRenderer } from "./renderers.js";
|
|
6
|
+
import { headerFor, isResultOutcome, outcomeError, resultData, runEvents } from "./run-summary.js";
|
|
7
|
+
import { profileHintsFor } from "./canonical.js";
|
|
8
|
+
import { createRuntime } from "./runtime.js";
|
|
9
|
+
import { resolveTerminalSettings, streamHasColors } from "./terminal.js";
|
|
10
|
+
import { promptWorkspaceTrust } from "./trust.js";
|
|
11
|
+
function linked(outer) {
|
|
12
|
+
const controller = new AbortController();
|
|
13
|
+
if (outer?.aborted === true)
|
|
14
|
+
controller.abort(outer.reason);
|
|
15
|
+
else
|
|
16
|
+
outer?.addEventListener("abort", () => controller.abort(outer.reason), { once: true });
|
|
17
|
+
return controller;
|
|
18
|
+
}
|
|
19
|
+
function readAll(stream) {
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
let text = "";
|
|
22
|
+
const onData = (chunk) => {
|
|
23
|
+
text += typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
24
|
+
};
|
|
25
|
+
const onEnd = () => {
|
|
26
|
+
stream.removeListener("data", onData);
|
|
27
|
+
stream.removeListener("end", onEnd);
|
|
28
|
+
resolve(text);
|
|
29
|
+
};
|
|
30
|
+
stream.on("data", onData);
|
|
31
|
+
stream.on("end", onEnd);
|
|
32
|
+
stream.resume?.();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function requireOrchestratorRoute(runtime) {
|
|
36
|
+
if (runtime.config.router.rules.some((rule) => rule.tier === "orchestrator"))
|
|
37
|
+
return;
|
|
38
|
+
const hints = profileHintsFor(runtime.canonical, "orchestrator").map((hint) => `${hint.provider}/${hint.model}`);
|
|
39
|
+
throw new HarnessError({
|
|
40
|
+
code: "config_invalid",
|
|
41
|
+
message: `no model route is configured for tier orchestrator; add a routes entry to ${path.join(runtime.home, "config.yaml")} or pass --profile orchestrator=<provider>/<model>${hints.length === 0 ? "" : ` (the canonical model profiles suggest ${hints.join(" or ")})`}`,
|
|
42
|
+
workspace_effect: "none",
|
|
43
|
+
retry_safe: true,
|
|
44
|
+
next_command: "syn doctor --runtime",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function reportError(renderer, io, error) {
|
|
48
|
+
if (renderer?.kind === "jsonl") {
|
|
49
|
+
await renderer.fail(error);
|
|
50
|
+
await renderer.stop("error");
|
|
51
|
+
return renderer.exitCode ?? exitCodeFor(error.code);
|
|
52
|
+
}
|
|
53
|
+
await renderer?.stop("error");
|
|
54
|
+
io.stderr.write(formatHarnessError(error));
|
|
55
|
+
return exitCodeFor(error.code);
|
|
56
|
+
}
|
|
57
|
+
/** The one-line red notice of `--permission-mode full` (ADR-08 revision 2026-09-24). */
|
|
58
|
+
const FULL_ACCESS_RUN_NOTICE = "Full access: workers edit and run any command in their worktree without asking (hard rails still apply); the workspace is trusted for this run only (not saved)";
|
|
59
|
+
function describeOutcome(outcome) {
|
|
60
|
+
return `Run ${outcome.runId} ${outcome.status} (exit ${outcome.exitCode}); session ${outcome.sessionId}\n${outcome.summary}\n`;
|
|
61
|
+
}
|
|
62
|
+
/** The `ask_user` binding when a human is attached; undefined when nobody can answer (headless, JSONL). */
|
|
63
|
+
function userPromptFor(renderer) {
|
|
64
|
+
const input = renderer.input;
|
|
65
|
+
if (renderer.kind === "jsonl" || renderer.approvals.availability !== "interactive" || input === undefined)
|
|
66
|
+
return undefined;
|
|
67
|
+
const controls = renderer.controls;
|
|
68
|
+
if (renderer.kind === "tui" && controls !== undefined) {
|
|
69
|
+
// The question owns the input (a picker for choices).
|
|
70
|
+
return async (question, options, signal) => {
|
|
71
|
+
const answer = await controls.ask(question, options, signal);
|
|
72
|
+
if (answer === undefined)
|
|
73
|
+
throw new DOMException("the question was cancelled", "AbortError");
|
|
74
|
+
return answer;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return async (question, options, signal) => {
|
|
78
|
+
const lines = [`Question from the orchestrator: ${question}`, ...(options === undefined || options.length === 0 ? [] : [`Options: ${options.join(" | ")}`]), "Type your answer and press Enter."];
|
|
79
|
+
for (const line of lines)
|
|
80
|
+
renderer.render({ kind: "notice", level: "info", message: line });
|
|
81
|
+
for (;;) {
|
|
82
|
+
const next = await input.next(signal);
|
|
83
|
+
if (!("text" in next))
|
|
84
|
+
throw new DOMException("the question was not answered", "AbortError");
|
|
85
|
+
if (next.text.trim() !== "")
|
|
86
|
+
return next.text;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export async function runCommand(parsed, io, overrides) {
|
|
91
|
+
const controller = linked(io.signal);
|
|
92
|
+
const workspaceRoot = path.resolve(io.cwd, parsed.common.target ?? ".");
|
|
93
|
+
let runtime;
|
|
94
|
+
let failure;
|
|
95
|
+
try {
|
|
96
|
+
runtime = await createRuntime({
|
|
97
|
+
workspaceRoot,
|
|
98
|
+
env: io.env,
|
|
99
|
+
policyMode: parsed.session.policy,
|
|
100
|
+
routes: parsed.session.profiles,
|
|
101
|
+
efforts: parsed.session.efforts,
|
|
102
|
+
overrides,
|
|
103
|
+
trustWorkspace: parsed.trustWorkspace,
|
|
104
|
+
// Headless auto asks nothing, so it equals the default-deny policy; only full access changes a run.
|
|
105
|
+
...(parsed.session.permission === "full" ? { permissionMode: "full" } : {}),
|
|
106
|
+
});
|
|
107
|
+
requireOrchestratorRoute(runtime);
|
|
108
|
+
// K3: a run's workers see the MCP tools from their first step; failures stay in `syn mcp list`.
|
|
109
|
+
await runtime.mcp.startSession();
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
failure = failureInfo(error);
|
|
113
|
+
}
|
|
114
|
+
const settings = resolveTerminalSettings({ jsonl: parsed.jsonl, plain: parsed.common.plain, color: parsed.common.color, configColor: runtime?.config.color }, {
|
|
115
|
+
env: io.env,
|
|
116
|
+
stdinIsTTY: io.stdinIsTTY,
|
|
117
|
+
stdoutIsTTY: io.stdout.isTTY === true,
|
|
118
|
+
stdoutHasColors: streamHasColors(io.stdout),
|
|
119
|
+
stderrHasColors: streamHasColors(io.stderr),
|
|
120
|
+
});
|
|
121
|
+
const renderer = await createSessionRenderer(io, {
|
|
122
|
+
kind: settings.kind,
|
|
123
|
+
color: settings.color,
|
|
124
|
+
policyMode: parsed.session.policy,
|
|
125
|
+
streamDeltas: parsed.streamDeltas,
|
|
126
|
+
wantsInput: false,
|
|
127
|
+
interactive: io.stdinIsTTY,
|
|
128
|
+
onInterrupt: () => controller.abort(),
|
|
129
|
+
onExit: () => controller.abort(),
|
|
130
|
+
});
|
|
131
|
+
if (runtime === undefined || failure !== undefined)
|
|
132
|
+
return reportError(renderer, io, failure ?? failureInfo(new Error("runtime unavailable")));
|
|
133
|
+
const events = [];
|
|
134
|
+
const unsubscribe = runtime.subscribe((event) => {
|
|
135
|
+
if (event.kind === "session-event")
|
|
136
|
+
events.push(event.event);
|
|
137
|
+
renderer.render(event);
|
|
138
|
+
});
|
|
139
|
+
const coordinator = runtime.createCoordinator(runtime.brokerFor(renderer.approvals));
|
|
140
|
+
const stopNotices = coordinator.onEvent((event) => {
|
|
141
|
+
if (event.kind === "notice")
|
|
142
|
+
renderer.render(event);
|
|
143
|
+
});
|
|
144
|
+
const prompt = userPromptFor(renderer);
|
|
145
|
+
const controls = renderer.controls;
|
|
146
|
+
// K5: in the TUI structured questions open the choice modal and leave one summary line; elsewhere they are asked as numbered text.
|
|
147
|
+
const choose = renderer.kind === "tui" && controls !== undefined
|
|
148
|
+
? async (question, signal) => {
|
|
149
|
+
const answer = await controls.choose(question, signal);
|
|
150
|
+
renderer.render({ kind: "notice", level: "info", message: askUserSummaryLine(question, answer) });
|
|
151
|
+
return answer;
|
|
152
|
+
}
|
|
153
|
+
: undefined;
|
|
154
|
+
const unbind = prompt === undefined ? () => undefined : runtime.bindUserPrompt(prompt, choose);
|
|
155
|
+
const onSigint = () => controller.abort();
|
|
156
|
+
const sigintProcess = renderer.kind === "jsonl" || io.process === undefined ? io.process : undefined;
|
|
157
|
+
sigintProcess?.on?.("SIGINT", onSigint);
|
|
158
|
+
try {
|
|
159
|
+
await renderer.start(headerFor(runtime));
|
|
160
|
+
if (runtime.permissionMode() === "full")
|
|
161
|
+
renderer.render({ kind: "notice", level: "error", message: FULL_ACCESS_RUN_NOTICE });
|
|
162
|
+
const goal = parsed.goalFromStdin && io.stdin !== undefined ? (await readAll(io.stdin)).trim() : parsed.goal;
|
|
163
|
+
if (goal === "")
|
|
164
|
+
return await reportError(renderer, io, { code: "usage_invalid", message: "the goal read from stdin is empty", workspace_effect: "none", retry_safe: true });
|
|
165
|
+
await promptWorkspaceTrust(runtime, renderer, controller.signal);
|
|
166
|
+
const outcome = await coordinator.run({
|
|
167
|
+
goal,
|
|
168
|
+
workspaceRoot: runtime.workspaceRoot,
|
|
169
|
+
policyMode: parsed.session.policy,
|
|
170
|
+
headless: renderer.approvals.availability === "headless",
|
|
171
|
+
resumeSessionId: undefined,
|
|
172
|
+
budget: runtime.config.budget,
|
|
173
|
+
}, controller.signal);
|
|
174
|
+
const mine = runEvents(events, outcome.runId);
|
|
175
|
+
if (renderer.kind === "jsonl") {
|
|
176
|
+
if (isResultOutcome(outcome))
|
|
177
|
+
await renderer.result(resultData(outcome, mine));
|
|
178
|
+
else
|
|
179
|
+
await renderer.fail(outcomeError(outcome));
|
|
180
|
+
await renderer.stop(outcome.exitCode === EXIT_CODES.cancelled ? "signal" : "completed");
|
|
181
|
+
return outcome.exitCode;
|
|
182
|
+
}
|
|
183
|
+
await renderer.stop(outcome.exitCode === EXIT_CODES.success ? "completed" : "error");
|
|
184
|
+
io.stdout.write(describeOutcome(outcome));
|
|
185
|
+
if (!isResultOutcome(outcome))
|
|
186
|
+
io.stderr.write(formatHarnessError(outcomeError(outcome)));
|
|
187
|
+
return outcome.exitCode;
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
return await reportError(renderer, io, failureInfo(controller.signal.aborted && !(error instanceof HarnessError) ? new DOMException("aborted", "AbortError") : error));
|
|
191
|
+
}
|
|
192
|
+
finally {
|
|
193
|
+
sigintProcess?.removeListener?.("SIGINT", onSigint);
|
|
194
|
+
// K4.2: background processes of the run's workers never outlive the command (K3: nor MCP servers).
|
|
195
|
+
runtime.processes.killAllSync();
|
|
196
|
+
runtime.mcp.killAllSync();
|
|
197
|
+
void runtime.mcp.close();
|
|
198
|
+
unbind();
|
|
199
|
+
unsubscribe();
|
|
200
|
+
stopNotices();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/harness/cli/session.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,YAAY,GAKb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAoB,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAyC,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAA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O,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACrF,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1C,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;YAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1F,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,WAAW,CAAC,QAAQ,EAAE,EAAE,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACzK,CAAC;YAAS,CAAC;QACR,aAA4C,EAAE,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACpF,mGAAmG;QACnG,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACzB,MAAM,EAAE,CAAC;QACT,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { CommandPaletteEntry, SessionEvent } from "../contracts/index.ts";
|
|
2
|
+
export declare function tasksReport(events: readonly SessionEvent[]): string[];
|
|
3
|
+
export declare function contextReport(events: readonly SessionEvent[]): string[];
|
|
4
|
+
/**
|
|
5
|
+
* What a conversation command may do. `cli/conversation.ts` implements it; the registry below is
|
|
6
|
+
* the single source for the handlers, `/help` and the renderer's command palette (`setCommands`).
|
|
7
|
+
*/
|
|
8
|
+
export interface ConversationCommandHost {
|
|
9
|
+
print(lines: readonly string[]): void;
|
|
10
|
+
/** `/help` as a command browser (TUI panel); absent prints `conversationHelp()`. */
|
|
11
|
+
help?(): Promise<void>;
|
|
12
|
+
cancel(): void;
|
|
13
|
+
planMode(goal: string): Promise<void>;
|
|
14
|
+
go(mode: string): Promise<void>;
|
|
15
|
+
workers(goal: string): Promise<void>;
|
|
16
|
+
/** K3 `/runs [id | cancel [id]]`: background worker runs. */
|
|
17
|
+
runs(argument: string): Promise<void>;
|
|
18
|
+
/** K1.7 `/worker [key] [message | --pause | --resume | --cancel]`. */
|
|
19
|
+
worker(argument: string): Promise<void>;
|
|
20
|
+
undo(): Promise<void>;
|
|
21
|
+
allow(argument: string): Promise<void>;
|
|
22
|
+
trust(): Promise<void>;
|
|
23
|
+
/** `/status`: mode, sandbox, MCP servers and the notices of this session's start. */
|
|
24
|
+
status(): Promise<void>;
|
|
25
|
+
model(argument: string): Promise<void>;
|
|
26
|
+
/** K6 `/effort [level] [--tier <tier>]`: set, or with no level pick, a tier's reasoning effort for this session. */
|
|
27
|
+
effort(argument: string): Promise<void>;
|
|
28
|
+
review(argument: string): Promise<void>;
|
|
29
|
+
commit(argument: string): Promise<void>;
|
|
30
|
+
usage(): Promise<void>;
|
|
31
|
+
cost(): Promise<void>;
|
|
32
|
+
/** K4.2 `/ps [kill <handle|all>]`: background processes. */
|
|
33
|
+
ps(argument: string): Promise<void>;
|
|
34
|
+
/** K3 `/mcp`: MCP servers, their tools and state; reconnect, enable, disable, approve. */
|
|
35
|
+
mcp(argument: string): Promise<void>;
|
|
36
|
+
/** K7 `/skills`: skills and markdown commands with source and state; show, enable, disable. */
|
|
37
|
+
skills(argument: string): Promise<void>;
|
|
38
|
+
/** K7 `/plugins`: installed plugins (Synorch and Claude Code); install, remove, enable, disable. */
|
|
39
|
+
plugins(argument: string): Promise<void>;
|
|
40
|
+
/** K2 `/evidence [turn | <n>]`. */
|
|
41
|
+
evidence(argument: string): Promise<void>;
|
|
42
|
+
why(argument: string): Promise<void>;
|
|
43
|
+
compact(focus: string): Promise<void>;
|
|
44
|
+
report(name: "context" | "permissions" | "tasks" | "memory" | "diff" | "log", argument: string): Promise<void>;
|
|
45
|
+
clear(): Promise<void>;
|
|
46
|
+
resume(argument: string): Promise<void>;
|
|
47
|
+
/** K3 `/fork [name]`: continue in a branch of this conversation; the original stays resumable. */
|
|
48
|
+
fork(argument: string): Promise<void>;
|
|
49
|
+
/** K3 `/rewind` (Esc Esc): fork from before an earlier message, optionally restoring the files Synorch changed since. */
|
|
50
|
+
rewind(): Promise<void>;
|
|
51
|
+
mouse(argument: string): Promise<void>;
|
|
52
|
+
graph(): Promise<void>;
|
|
53
|
+
/** `/config [key [value]]`: the settings screen, or read / set one key (user configuration). */
|
|
54
|
+
config(argument: string): Promise<void>;
|
|
55
|
+
/** K8 `/theme [name]`, `/welcome [style]`, `/setup`: appearance with live preview (saved to the user config). */
|
|
56
|
+
theme(argument: string): Promise<void>;
|
|
57
|
+
welcome(argument: string): Promise<void>;
|
|
58
|
+
setup(): Promise<void>;
|
|
59
|
+
/** `/init [--yes]`: materialize the Synorch `.ai/` structure into the repository (preview first). */
|
|
60
|
+
init(argument: string): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
export interface SlashCommand {
|
|
63
|
+
/** With the leading slash, lower case: `/model`. */
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly description: string;
|
|
66
|
+
/** `<required>` makes the palette complete instead of submit; `[optional]` submits. */
|
|
67
|
+
readonly argsHint?: string;
|
|
68
|
+
readonly aliases?: readonly string[];
|
|
69
|
+
/** Runs at once while the agent works; other commands wait for the turn to end. */
|
|
70
|
+
readonly whileBusy?: boolean;
|
|
71
|
+
/** Executed by the interactive renderer itself (`/mouse`, `/exit`): kept out of the palette rows the session pushes. */
|
|
72
|
+
readonly rendererLocal?: boolean;
|
|
73
|
+
/** Resolves true when the user asked to leave the session. */
|
|
74
|
+
run(host: ConversationCommandHost, argument: string): Promise<boolean | void>;
|
|
75
|
+
}
|
|
76
|
+
export declare const CONVERSATION_COMMANDS: readonly SlashCommand[];
|
|
77
|
+
export declare function findConversationCommand(name: string): SlashCommand | undefined;
|
|
78
|
+
/** The reply to an unknown slash command: the closest registered command when one is plausibly meant. */
|
|
79
|
+
export declare function unknownConversationCommand(name: string, sep: string): string;
|
|
80
|
+
/** Palette rows for the interactive renderer (`controls.setCommands`, K1-U1): names without the slash; renderer-local commands stay the renderer's. */
|
|
81
|
+
export declare function conversationPaletteEntries(): CommandPaletteEntry[];
|
|
82
|
+
/** K7: names a skill or markdown command cannot take (a built-in command always wins), without the slash. */
|
|
83
|
+
export declare function reservedCommandNames(): ReadonlySet<string>;
|
|
84
|
+
export declare function conversationHelp(): string[];
|
|
85
|
+
//# sourceMappingURL=slash-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../../src/harness/cli/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAgB/E,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,EAAE,CAUrE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,EAAE,CAUvE;AAID;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,oFAAoF;IACpF,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI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oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,wHAAwH;IACxH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,8DAA8D;IAC9D,GAAG,CAAC,IAAI,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CAC/E;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,YAAY,EA4CxD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAG9E;AAED,yGAAyG;AACzG,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAI5E;AAED,uJAAuJ;AACvJ,wBAAgB,0BAA0B,IAAI,mBAAmB,EAAE,CAOlE;AAED,6GAA6G;AAC7G,wBAAgB,oBAAoB,IAAI,WAAW,CAAC,MAAM,CAAC,CAE1D;AAED,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAO3C"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { closestMatch } from "../../domain/suggest.js";
|
|
2
|
+
/**
|
|
3
|
+
* In-session commands of `syn agent` (cli-experience.md): the command registry and the two
|
|
4
|
+
* read-only reports (`/tasks`, `/context` fallback) built from what the session recorded.
|
|
5
|
+
*/
|
|
6
|
+
function latest(events, type) {
|
|
7
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
8
|
+
const event = events[index];
|
|
9
|
+
if (event?.type === type)
|
|
10
|
+
return event;
|
|
11
|
+
}
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
export function tasksReport(events) {
|
|
15
|
+
const created = events.filter((event) => event.type === "task/created");
|
|
16
|
+
if (created.length === 0)
|
|
17
|
+
return ["no tasks yet"];
|
|
18
|
+
return created.map((task) => {
|
|
19
|
+
const last = events.filter((event) => event.type === "task/state_changed" && event.data.task_id === task.data.task_id).at(-1);
|
|
20
|
+
const state = last?.type === "task/state_changed" ? last.data.to : "draft";
|
|
21
|
+
const owned = task.data.owned_paths.length === 0 ? "read-only" : task.data.owned_paths.join(", ");
|
|
22
|
+
const after = task.data.depends_on.length === 0 ? "" : ` after ${task.data.depends_on.join(", ")}`;
|
|
23
|
+
return `${task.data.key} ${task.data.task_id} ${state} (${task.data.role}; ${owned})${after}`;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function contextReport(events) {
|
|
27
|
+
const request = latest(events, "model/request_prepared");
|
|
28
|
+
if (request === undefined)
|
|
29
|
+
return ["no model request yet"];
|
|
30
|
+
const total = request.data.context.reduce((sum, block) => sum + block.tokens_estimate, 0);
|
|
31
|
+
const compaction = latest(events, "context/compacted");
|
|
32
|
+
return [
|
|
33
|
+
`request ${request.data.request_id} to ${request.data.route.provider_id}/${request.data.route.model_id}: ~${total} tokens`,
|
|
34
|
+
...request.data.context.map((block) => `- ${block.source} (${block.trust}) ~${block.tokens_estimate}${block.truncated ? " truncated" : ""}`),
|
|
35
|
+
compaction === undefined ? "no compaction" : `last compaction ${compaction.data.trigger}: ${compaction.data.tokens_before} -> ${compaction.data.tokens_after} tokens`,
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
export const CONVERSATION_COMMANDS = [
|
|
39
|
+
{ name: "/help", description: "commands and keys", whileBusy: true, run: async (host) => (host.help === undefined ? host.print(conversationHelp()) : host.help()) },
|
|
40
|
+
{ name: "/plan", argsHint: "[goal]", description: "plan mode: read-only, discuss and plan before changing anything (Shift+Tab cycles modes)", whileBusy: true, run: (host, argument) => host.planMode(argument) },
|
|
41
|
+
{ name: "/go", argsHint: "[workers]", description: "leave plan mode and carry out the plan here, or with workers", run: (host, argument) => host.go(argument) },
|
|
42
|
+
{ name: "/workers", argsHint: "<goal>", description: "run a large goal with parallel workers and an independent reviewer; alone: list the workers", whileBusy: true, run: (host, argument) => host.workers(argument) },
|
|
43
|
+
{ name: "/runs", argsHint: "[id | cancel [id]]", description: "background worker runs: status and progress; one run's tasks; cancel one", whileBusy: true, run: (host, argument) => host.runs(argument) },
|
|
44
|
+
{ name: "/worker", argsHint: "[key] [message | --pause | --resume | --cancel]", description: "one worker: its assignment and recent activity, or message / pause / resume / cancel it", whileBusy: true, run: (host, argument) => host.worker(argument) },
|
|
45
|
+
{ name: "/model", argsHint: "[tier] [provider/model] [--save]", description: "every logged-in provider's models; set a tier's model for this session (--save keeps it)", run: (host, argument) => host.model(argument) },
|
|
46
|
+
{ name: "/effort", argsHint: "[level] [--tier <tier>]", description: "reasoning effort of the conversation model (low … max, ultra); alone: pick one. Applies to the next request", whileBusy: true, run: (host, argument) => host.effort(argument) },
|
|
47
|
+
{ name: "/review", argsHint: "[--staged | <commit> | <from>..<to> | run-<n> | fix] [focus]", description: "independent reviewer (fresh context, another provider when logged in) on the uncommitted diff, staged changes, a commit/range or a worker run; runs in the background, verdict card + findings", whileBusy: true, run: (host, argument) => host.review(argument) },
|
|
48
|
+
{ name: "/commit", argsHint: "[message]", description: "diff summary and a proposed message; commits only after you confirm", run: (host, argument) => host.commit(argument) },
|
|
49
|
+
{ name: "/undo", description: "revert the last edit Synorch made (files only)", run: (host) => host.undo() },
|
|
50
|
+
{ name: "/allow", argsHint: "[prefix | -r prefix]", description: "let Synorch run commands starting with <prefix> here", whileBusy: true, run: (host, argument) => host.allow(argument) },
|
|
51
|
+
{ name: "/trust", description: "trust this folder so build/test commands may run", run: (host) => host.trust() },
|
|
52
|
+
{ name: "/status", description: "session status: model, mode, sandbox, MCP servers and startup notices", whileBusy: true, run: (host) => host.status() },
|
|
53
|
+
{ name: "/usage", description: "requests, tokens, quota and estimated cost (session and today)", whileBusy: true, run: (host) => host.usage() },
|
|
54
|
+
{ name: "/cost", description: "this session's estimated cost and tokens", whileBusy: true, run: (host) => host.cost() },
|
|
55
|
+
{ name: "/evidence", argsHint: "[turn | n]", description: "proof for the last turn or worker run: criteria, checks Synorch ran, review verdict and findings", whileBusy: true, run: (host, argument) => host.evidence(argument) },
|
|
56
|
+
{ name: "/why", argsHint: "[last | n | tool | model]", description: "why an action was allowed, asked or refused (mode, rule, layer) and what would change it; /why model: why this route", whileBusy: true, run: (host, argument) => host.why(argument) },
|
|
57
|
+
{ name: "/compact", argsHint: "[focus]", description: "summarize older messages to free context", run: (host, argument) => host.compact(argument) },
|
|
58
|
+
{ name: "/context", description: "why this context: instructions, skills, memory, files and history the model received, with token estimates", whileBusy: true, run: (host, argument) => host.report("context", argument) },
|
|
59
|
+
{ name: "/clear", description: "start a fresh conversation (this one stays resumable)", run: (host) => host.clear() },
|
|
60
|
+
{ name: "/resume", argsHint: "[n | session id]", description: "pick a recent conversation (forks included) and switch to it", run: (host, argument) => host.resume(argument) },
|
|
61
|
+
{ name: "/fork", argsHint: "[name]", description: "branch this conversation here and continue in the branch (the original stays resumable)", run: (host, argument) => host.fork(argument) },
|
|
62
|
+
{ name: "/rewind", description: "go back to an earlier message: fork from before it, optionally restore files (Esc Esc)", run: (host) => host.rewind() },
|
|
63
|
+
{ name: "/init", argsHint: "[--yes]", description: "write the Synorch .ai/ structure into this repo to customize it (preview first; never needed to use Synorch)", run: (host, argument) => host.init(argument) },
|
|
64
|
+
{ name: "/memory", argsHint: "[init | review | edit <id> | retire <id> | open [id] | graph]", description: "memory ledger and decision desk: what Synorch remembers, proposals to accept / edit / reject / defer", whileBusy: true, run: (host, argument) => host.report("memory", argument) },
|
|
65
|
+
{ name: "/mouse", argsHint: "[on|off]", description: "toggle mouse capture (scroll / select)", whileBusy: true, rendererLocal: true, run: (host, argument) => host.mouse(argument) },
|
|
66
|
+
{ name: "/diff", description: "files changed by Synorch in this conversation", whileBusy: true, run: (host, argument) => host.report("diff", argument) },
|
|
67
|
+
{ name: "/mcp", argsHint: "[<name> | tools | reconnect | login | logout | enable | disable | approve <name>]", description: "MCP servers (external tools such as Playwright): state, details, tools, sign in, reconnect, enable / disable, approve a project server", whileBusy: true, run: (host, argument) => host.mcp(argument) },
|
|
68
|
+
{ name: "/skills", argsHint: "[show | enable | disable <name>]", description: "skills and slash commands (yours, the repo's, plugins', Claude Code's): source, state; /<name> runs one", whileBusy: true, run: (host, argument) => host.skills(argument) },
|
|
69
|
+
{ name: "/plugins", argsHint: "[show | install <spec> | remove | enable | disable <name> | hooks]", description: "plugins (Claude Code format): what each adds; install, remove, enable / disable, approve hooks", whileBusy: true, run: (host, argument) => host.plugins(argument) },
|
|
70
|
+
{ name: "/agents", argsHint: "[show <id>]", description: "plugin agents: worker personas the orchestrator may assign to a task", whileBusy: true, run: (host, argument) => host.plugins(`agents ${argument}`.trim()) },
|
|
71
|
+
{ name: "/ps", argsHint: "[kill <handle|all>]", description: "background processes (dev servers, watchers); stop one or all", whileBusy: true, run: (host, argument) => host.ps(argument) },
|
|
72
|
+
{ name: "/graph", description: "the plan graph of the current or last worker run", whileBusy: true, run: (host) => host.graph() },
|
|
73
|
+
{ name: "/tasks", description: "tasks of this conversation's worker runs", whileBusy: true, run: (host, argument) => host.report("tasks", argument) },
|
|
74
|
+
{ name: "/permissions", argsHint: "[ask|auto|full|plan | allow <prefix> | remove <prefix>]", description: "permission mode, allow rules and trust; switch mode or edit rules", whileBusy: true, run: (host, argument) => host.report("permissions", argument) },
|
|
75
|
+
{ name: "/config", argsHint: "[key [value]]", description: "settings: routes, permission mode, budget, mouse, glyphs (saved to your user config)", whileBusy: true, run: (host, argument) => host.config(argument) },
|
|
76
|
+
{ name: "/theme", argsHint: "[name]", description: "colour theme with a live preview (synorch, light, high-contrast, mono, nord, dracula, gruvbox, catppuccin or yours)", whileBusy: true, run: (host, argument) => host.theme(argument) },
|
|
77
|
+
{ name: "/welcome", argsHint: "[full|compact|minimal|off]", description: "customize the welcome header: style, logo, facts, tips (live preview)", whileBusy: true, run: (host, argument) => host.welcome(argument) },
|
|
78
|
+
{ name: "/setup", description: "the first-run setup again: theme, welcome screen, symbols", whileBusy: true, run: (host) => host.setup() },
|
|
79
|
+
{ name: "/log", argsHint: "[n]", description: "raw event log of this conversation (debug)", whileBusy: true, run: (host, argument) => host.report("log", argument) },
|
|
80
|
+
{ name: "/cancel", description: "stop the current work (the conversation stays resumable)", whileBusy: true, run: async (host) => host.cancel() },
|
|
81
|
+
{ name: "/exit", aliases: ["/quit"], description: "leave (resume with syn agent --continue)", whileBusy: true, rendererLocal: true, run: async () => true },
|
|
82
|
+
];
|
|
83
|
+
export function findConversationCommand(name) {
|
|
84
|
+
const lower = name.toLowerCase();
|
|
85
|
+
return CONVERSATION_COMMANDS.find((command) => command.name === lower || command.aliases?.includes(lower) === true);
|
|
86
|
+
}
|
|
87
|
+
/** The reply to an unknown slash command: the closest registered command when one is plausibly meant. */
|
|
88
|
+
export function unknownConversationCommand(name, sep) {
|
|
89
|
+
const names = CONVERSATION_COMMANDS.flatMap((command) => [command.name, ...(command.aliases ?? [])]);
|
|
90
|
+
const match = name.startsWith("/") ? closestMatch(name.slice(1), names.map((candidate) => candidate.slice(1))) : undefined;
|
|
91
|
+
return match === undefined ? `Unknown command ${name} ${sep} /help lists the commands` : `Unknown command ${name} ${sep} did you mean /${match}?`;
|
|
92
|
+
}
|
|
93
|
+
/** Palette rows for the interactive renderer (`controls.setCommands`, K1-U1): names without the slash; renderer-local commands stay the renderer's. */
|
|
94
|
+
export function conversationPaletteEntries() {
|
|
95
|
+
return CONVERSATION_COMMANDS.filter((command) => command.rendererLocal !== true).map(({ name, description, argsHint, aliases }) => ({
|
|
96
|
+
name: name.slice(1),
|
|
97
|
+
description,
|
|
98
|
+
...(argsHint === undefined ? {} : { argsHint }),
|
|
99
|
+
...(aliases === undefined ? {} : { aliases: aliases.map((alias) => alias.slice(1)) }),
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
/** K7: names a skill or markdown command cannot take (a built-in command always wins), without the slash. */
|
|
103
|
+
export function reservedCommandNames() {
|
|
104
|
+
return new Set(CONVERSATION_COMMANDS.flatMap((command) => [command.name, ...(command.aliases ?? [])]).map((name) => name.slice(1)));
|
|
105
|
+
}
|
|
106
|
+
export function conversationHelp() {
|
|
107
|
+
const label = (command) => `${command.name}${command.argsHint === undefined ? "" : ` ${command.argsHint}`}`;
|
|
108
|
+
const width = Math.max(...CONVERSATION_COMMANDS.map((command) => label(command).length));
|
|
109
|
+
return [
|
|
110
|
+
...CONVERSATION_COMMANDS.map((command) => `${label(command).padEnd(width + 2)}${command.description}`),
|
|
111
|
+
"Keys: Esc interrupts the turn (workers keep running in the background; /runs cancel stops them) · Ctrl+G board/graph · Down selects a worker · Shift+Tab cycles ask/auto/full/plan · Enter while working steers · @path attaches a file · Ctrl+C twice exits",
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=slash-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../../src/harness/cli/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;GAGG;AAEH,SAAS,MAAM,CAAiC,MAA+B,EAAE,IAAO;IACtF,KAAK,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,EAAE,IAAI,KAAK,IAAI;YAAE,OAAO,KAA2C,CAAC;IAC/E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAA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CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACtF,CAAC,CAAC,CAAC;AACN,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtI,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,MAAM,KAAK,GAAG,CAAC,OAAqB,EAAU,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;IAClI,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,OAAO;QACL,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QACtG,8PAA8P;KAC/P,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { McpServerStatus } from "../mcp/index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* A clean first screen: welcome, the first-run setup, then at most two short notice lines. Notices
|
|
4
|
+
* raised while the session starts are held until the setup is done (and MCP servers had a moment to
|
|
5
|
+
* settle), then shown; more than two collapse into one "N notices · /status" line. Everything stays
|
|
6
|
+
* readable in `/status`.
|
|
7
|
+
*/
|
|
8
|
+
export interface StartupNotice {
|
|
9
|
+
readonly level: "info" | "warning";
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly context?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class StartupNotices {
|
|
14
|
+
private readonly held;
|
|
15
|
+
private readonly seen;
|
|
16
|
+
private open;
|
|
17
|
+
private readonly emit;
|
|
18
|
+
private readonly sep;
|
|
19
|
+
constructor(emit: (notice: StartupNotice) => void, sep: string);
|
|
20
|
+
/** Every notice of this session start, for `/status`. */
|
|
21
|
+
get all(): readonly StartupNotice[];
|
|
22
|
+
add(notice: StartupNotice): void;
|
|
23
|
+
flush(): void;
|
|
24
|
+
}
|
|
25
|
+
/** Project servers waiting for approval, as one line with the real command. */
|
|
26
|
+
export declare function approvalNotice(pending: readonly string[], sep: string): StartupNotice | undefined;
|
|
27
|
+
/** After the session's MCP start: one dim line for every server needing sign-in, one line for failures. */
|
|
28
|
+
export declare function mcpStartNotices(status: readonly McpServerStatus[], sep: string): StartupNotice[];
|
|
29
|
+
export type AcknowledgedNotice = "sandbox-partial";
|
|
30
|
+
export declare function acknowledgedNotices(home: string): Promise<ReadonlySet<string>>;
|
|
31
|
+
export declare function acknowledgeNotice(home: string, id: AcknowledgedNotice): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=startup-notices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-notices.d.ts","sourceRoot":"","sources":["../../../src/harness/cli/startup-notices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAuB;IAC5C,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkC;IACvD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;gBAEV,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,EAAE,GAAG,EAAE,MAAM;IAKrE,yDAAyD;IACzD,IAAW,GAAG,IAAI,SAAS,aAAa,EAAE,CAEzC;IAEM,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAMhC,KAAK,IAAI,IAAI;CAarB;AAUD,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAGjG;AAED,2GAA2G;AAC3G,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,EAAE,CAShG;AAMD,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAEnD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAOpF;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU3F"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
const MAX_LINES = 2;
|
|
4
|
+
export class StartupNotices {
|
|
5
|
+
held = [];
|
|
6
|
+
seen = [];
|
|
7
|
+
open = true;
|
|
8
|
+
emit;
|
|
9
|
+
sep;
|
|
10
|
+
constructor(emit, sep) {
|
|
11
|
+
this.emit = emit;
|
|
12
|
+
this.sep = sep;
|
|
13
|
+
}
|
|
14
|
+
/** Every notice of this session start, for `/status`. */
|
|
15
|
+
get all() {
|
|
16
|
+
return this.seen.filter((notice) => notice.context !== true);
|
|
17
|
+
}
|
|
18
|
+
add(notice) {
|
|
19
|
+
this.seen.push(notice);
|
|
20
|
+
if (this.open)
|
|
21
|
+
this.held.push(notice);
|
|
22
|
+
else
|
|
23
|
+
this.emit(notice);
|
|
24
|
+
}
|
|
25
|
+
flush() {
|
|
26
|
+
if (!this.open)
|
|
27
|
+
return;
|
|
28
|
+
this.open = false;
|
|
29
|
+
const all = this.held.splice(0);
|
|
30
|
+
// Context lines (the project profile, the memory summary) are the quiet status, not notices.
|
|
31
|
+
for (const notice of all)
|
|
32
|
+
if (notice.context === true)
|
|
33
|
+
this.emit(notice);
|
|
34
|
+
const held = all.filter((notice) => notice.context !== true);
|
|
35
|
+
if (held.length <= MAX_LINES) {
|
|
36
|
+
for (const notice of held)
|
|
37
|
+
this.emit(notice);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.emit({ level: held.some((notice) => notice.level === "warning") ? "warning" : "info", text: `${held.length} notices ${this.sep} /status` });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function names(list, limit = 3) {
|
|
44
|
+
return list.length <= limit ? list.join(", ") : `${list.slice(0, limit).join(", ")} +${list.length - limit}`;
|
|
45
|
+
}
|
|
46
|
+
function commands(verb, list) {
|
|
47
|
+
return list.length <= 2 ? list.map((name) => `/mcp ${verb} ${name}`).join(", ") : `/mcp ${verb} <name> (/mcp lists them)`;
|
|
48
|
+
}
|
|
49
|
+
/** Project servers waiting for approval, as one line with the real command. */
|
|
50
|
+
export function approvalNotice(pending, sep) {
|
|
51
|
+
if (pending.length === 0)
|
|
52
|
+
return undefined;
|
|
53
|
+
return { level: "info", text: `MCP ${names(pending)} (this repo) ${pending.length === 1 ? "is" : "are"} off until approved ${sep} ${commands("approve", pending)}` };
|
|
54
|
+
}
|
|
55
|
+
/** After the session's MCP start: one dim line for every server needing sign-in, one line for failures. */
|
|
56
|
+
export function mcpStartNotices(status, sep) {
|
|
57
|
+
const notices = [];
|
|
58
|
+
const signIn = status.filter((entry) => entry.state === "needs-auth").map((entry) => entry.name);
|
|
59
|
+
if (signIn.length > 0)
|
|
60
|
+
notices.push({ level: "info", text: `${names(signIn)} ${signIn.length === 1 ? "needs" : "need"} sign-in ${sep} ${commands("login", signIn)}` });
|
|
61
|
+
const failed = status.filter((entry) => entry.state === "failed");
|
|
62
|
+
const [only] = failed;
|
|
63
|
+
if (failed.length === 1 && only !== undefined)
|
|
64
|
+
notices.push({ level: "warning", text: `MCP ${only.name} did not start: ${only.error ?? "unknown error"} ${sep} /mcp ${only.name}` });
|
|
65
|
+
else if (failed.length > 1)
|
|
66
|
+
notices.push({ level: "warning", text: `MCP ${names(failed.map((entry) => entry.name))} did not start ${sep} /mcp` });
|
|
67
|
+
return notices;
|
|
68
|
+
}
|
|
69
|
+
// ---- once-per-machine acknowledgements (user state) ---------------------------------------------
|
|
70
|
+
const NOTICE_STATE_FILE = path.join("state", "notices.json");
|
|
71
|
+
export async function acknowledgedNotices(home) {
|
|
72
|
+
try {
|
|
73
|
+
const parsed = JSON.parse(await readFile(path.join(home, NOTICE_STATE_FILE), "utf8"));
|
|
74
|
+
return new Set(Array.isArray(parsed.acknowledged) ? parsed.acknowledged.filter((entry) => typeof entry === "string") : []);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return new Set();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export async function acknowledgeNotice(home, id) {
|
|
81
|
+
try {
|
|
82
|
+
const current = await acknowledgedNotices(home);
|
|
83
|
+
if (current.has(id))
|
|
84
|
+
return;
|
|
85
|
+
const file = path.join(home, NOTICE_STATE_FILE);
|
|
86
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
87
|
+
await writeFile(file, `${JSON.stringify({ acknowledged: [...current, id] }, null, 2)}\n`, "utf8");
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// A notice shown twice is harmless.
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=startup-notices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-notices.js","sourceRoot":"","sources":["../../../src/harness/cli/startup-notices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAAM,OAAO,cAAc;IACR,IAAI,GAAoB,EAAE,CAAC;IAC3B,IAAI,GAAoB,EAAE,CAAC;IACpC,IAAI,GAAG,IAAI,CAAC;IACH,IAAI,CAAkC;IACtC,GAAG,CAAS;IAE7B,YAAmB,IAAqC,EAAE,GAAW;QACnE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,yDAAyD;IACzD,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;IAC/D,CAAC;IAEM,GAAG,CAAC,MAAqB;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;;YACjC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;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