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,1115 @@
|
|
|
1
|
+
import { describeEvent } from "./describe.js";
|
|
2
|
+
import { sanitizeInline, sanitizeTerminalText } from "./sanitize.js";
|
|
3
|
+
export const GLYPH_SETS = {
|
|
4
|
+
rich: { name: "rich", bullet: "●", result: "⎿", ok: "✓", fail: "✗", warn: "!", user: ">", sep: "·", minus: "−", resume: "↻", ellipsis: "…", spinner: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], spinnerMs: 80 },
|
|
5
|
+
safe: { name: "safe", bullet: "●", result: "└", ok: "√", fail: "×", warn: "!", user: ">", sep: "·", minus: "-", resume: "~", ellipsis: "…", spinner: ["-", "\\", "|", "/"], spinnerMs: 120 },
|
|
6
|
+
ascii: { name: "ascii", bullet: "*", result: "\\_", ok: "+", fail: "x", warn: "!", user: ">", sep: "-", minus: "-", resume: "~", ellipsis: "...", spinner: ["-", "\\", "|", "/"], spinnerMs: 120 },
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* `SYN_GLYPHS` > automatic detection (TUI §11.1): plain or `TERM=dumb` → ascii; Windows Terminal,
|
|
10
|
+
* VS Code or WezTerm → rich; classic conhost → safe (no braille, no ⎿); everything else → rich.
|
|
11
|
+
*/
|
|
12
|
+
export function selectGlyphs(env, platform, plain) {
|
|
13
|
+
const wanted = env.SYN_GLYPHS?.trim().toLowerCase();
|
|
14
|
+
if (wanted === "rich" || wanted === "safe" || wanted === "ascii")
|
|
15
|
+
return GLYPH_SETS[wanted];
|
|
16
|
+
if (plain || env.TERM === "dumb")
|
|
17
|
+
return GLYPH_SETS.ascii;
|
|
18
|
+
if (platform === "win32") {
|
|
19
|
+
const modern = env.WT_SESSION !== undefined || ["vscode", "WezTerm", "Tabby", "Hyper"].includes(env.TERM_PROGRAM ?? "");
|
|
20
|
+
return modern ? GLYPH_SETS.rich : GLYPH_SETS.safe;
|
|
21
|
+
}
|
|
22
|
+
const locale = env.LC_ALL ?? env.LC_CTYPE ?? env.LANG;
|
|
23
|
+
if (locale !== undefined && locale !== "" && !/utf-?8/i.test(locale))
|
|
24
|
+
return GLYPH_SETS.ascii;
|
|
25
|
+
if (env.TERM === "linux")
|
|
26
|
+
return GLYPH_SETS.safe;
|
|
27
|
+
return GLYPH_SETS.rich;
|
|
28
|
+
}
|
|
29
|
+
const COORDINATION_TOOLS = new Set(["ask_user", "load_skill", "memory_propose", "plan_propose", "task_spawn", "task_status", "task_triage", "task_report", "review_report"]);
|
|
30
|
+
const PREVIEW_LINES = 8;
|
|
31
|
+
const DETAIL_LINES = 10;
|
|
32
|
+
export class ConversationPresenter {
|
|
33
|
+
options;
|
|
34
|
+
now;
|
|
35
|
+
tools = new Map();
|
|
36
|
+
/** Approval ids whose prompt offered "always allow <domain>" (K4.1). */
|
|
37
|
+
hostApprovals = new Set();
|
|
38
|
+
/** tool_call_id -> item id (a read group maps several calls to one item). */
|
|
39
|
+
toolItem = new Map();
|
|
40
|
+
assistant = new Map();
|
|
41
|
+
streamed = new Set();
|
|
42
|
+
counter = 0;
|
|
43
|
+
lastItem;
|
|
44
|
+
replaying = false;
|
|
45
|
+
turnStartedAt;
|
|
46
|
+
turnTokens = 0;
|
|
47
|
+
streamChars = 0;
|
|
48
|
+
activityVerb;
|
|
49
|
+
waiting = false;
|
|
50
|
+
contextTokens;
|
|
51
|
+
/** Highest window % per provider (this conversation's requests and its workers'). */
|
|
52
|
+
quotas = new Map();
|
|
53
|
+
requestProviders = new Map();
|
|
54
|
+
cost;
|
|
55
|
+
model;
|
|
56
|
+
effort;
|
|
57
|
+
contextWindow;
|
|
58
|
+
ledger = { files: new Map(), tests: undefined };
|
|
59
|
+
/** The turn's checklist item: later `todo` calls in the same turn update it in place. */
|
|
60
|
+
todoItem;
|
|
61
|
+
/** Enter was pressed and no turn has started yet: the activity line shows at once. */
|
|
62
|
+
submittedAt;
|
|
63
|
+
constructor(options) {
|
|
64
|
+
this.options = options;
|
|
65
|
+
this.now = options.now ?? (() => Date.now());
|
|
66
|
+
this.model = options.model;
|
|
67
|
+
this.contextWindow = options.contextWindowTokens;
|
|
68
|
+
}
|
|
69
|
+
/** Live facts of the conversation model (start, `/model`, `/effort`): `effort: null` clears it, undefined keeps it. */
|
|
70
|
+
configure(values) {
|
|
71
|
+
if (values.model !== undefined)
|
|
72
|
+
this.model = values.model;
|
|
73
|
+
if (values.effort !== undefined)
|
|
74
|
+
this.effort = values.effort ?? undefined;
|
|
75
|
+
if (values.contextWindowTokens !== undefined)
|
|
76
|
+
this.contextWindow = values.contextWindowTokens;
|
|
77
|
+
}
|
|
78
|
+
get glyphs() {
|
|
79
|
+
return this.options.glyphs;
|
|
80
|
+
}
|
|
81
|
+
/** Renders earlier events of a resumed conversation (the TUI shows past user messages too). */
|
|
82
|
+
replay(events) {
|
|
83
|
+
this.replaying = true;
|
|
84
|
+
try {
|
|
85
|
+
return events.flatMap((event) => this.apply({ kind: "session-event", event }));
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
this.replaying = false;
|
|
89
|
+
this.turnStartedAt = undefined;
|
|
90
|
+
this.activityVerb = undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
setWaiting(waiting) {
|
|
94
|
+
this.waiting = waiting;
|
|
95
|
+
}
|
|
96
|
+
/** The user just sent a message: show the activity line now, before the session reports the turn. */
|
|
97
|
+
markSubmitted() {
|
|
98
|
+
if (this.turnStartedAt === undefined)
|
|
99
|
+
this.submittedAt = this.now();
|
|
100
|
+
}
|
|
101
|
+
/** Drops a pending (not yet started) activity, e.g. when the session answered with an error. */
|
|
102
|
+
clearSubmitted() {
|
|
103
|
+
this.submittedAt = undefined;
|
|
104
|
+
}
|
|
105
|
+
/** The tool an approval prompt is about: its title and the edit it would make. */
|
|
106
|
+
pendingTool() {
|
|
107
|
+
const running = [...this.tools.values()].reverse().find((state) => state.status === "running");
|
|
108
|
+
if (running === undefined)
|
|
109
|
+
return undefined;
|
|
110
|
+
const added = running.pending.filter((line) => line.op === "+").length;
|
|
111
|
+
const removed = running.pending.filter((line) => line.op === "-").length;
|
|
112
|
+
return { title: running.title, stat: running.pending.length === 0 ? undefined : `+${added} ${this.options.glyphs.minus}${removed}`, preview: running.pending };
|
|
113
|
+
}
|
|
114
|
+
activity() {
|
|
115
|
+
if (this.turnStartedAt === undefined && this.submittedAt !== undefined) {
|
|
116
|
+
if (this.now() - this.submittedAt > 15_000)
|
|
117
|
+
this.submittedAt = undefined;
|
|
118
|
+
else
|
|
119
|
+
return { verb: "Thinking", detail: undefined, startedAt: this.submittedAt, tokens: 0, waiting: false };
|
|
120
|
+
}
|
|
121
|
+
if (this.turnStartedAt === undefined)
|
|
122
|
+
return undefined;
|
|
123
|
+
const verb = this.waiting ? { verb: "Waiting for you", detail: undefined } : (this.activityVerb ?? { verb: "Thinking", detail: undefined });
|
|
124
|
+
return { verb: verb.verb, detail: verb.detail, startedAt: this.turnStartedAt, tokens: this.turnTokens + Math.round(this.streamChars / 4), waiting: this.waiting };
|
|
125
|
+
}
|
|
126
|
+
footer() {
|
|
127
|
+
const window = this.contextWindow;
|
|
128
|
+
return {
|
|
129
|
+
model: this.model,
|
|
130
|
+
effort: this.effort,
|
|
131
|
+
contextPercent: this.contextTokens === undefined || window === undefined || window <= 0 ? undefined : Math.min(100, Math.round((this.contextTokens / window) * 100)),
|
|
132
|
+
...this.topQuota(),
|
|
133
|
+
costUsd: this.cost,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
topQuota() {
|
|
137
|
+
let top;
|
|
138
|
+
for (const entry of this.quotas)
|
|
139
|
+
if (top === undefined || entry[1] > top[1])
|
|
140
|
+
top = entry;
|
|
141
|
+
if (top === undefined)
|
|
142
|
+
return { quotaPercent: undefined };
|
|
143
|
+
return top[0] === "" ? { quotaPercent: top[1] } : { quotaPercent: top[1], quotaProvider: quotaProviderLabel(top[0]) };
|
|
144
|
+
}
|
|
145
|
+
noteQuota(provider, windows) {
|
|
146
|
+
const percent = maxQuota(windows);
|
|
147
|
+
if (percent !== undefined)
|
|
148
|
+
this.quotas.set(provider ?? "", percent);
|
|
149
|
+
}
|
|
150
|
+
apply(event) {
|
|
151
|
+
switch (event.kind) {
|
|
152
|
+
case "session-event":
|
|
153
|
+
return this.onEvent(event.event);
|
|
154
|
+
case "stream":
|
|
155
|
+
return this.onStream(event.requestId, event.event);
|
|
156
|
+
case "notice":
|
|
157
|
+
if (event.level !== "info")
|
|
158
|
+
this.submittedAt = undefined;
|
|
159
|
+
return [this.note(event.level, event.message)];
|
|
160
|
+
case "status":
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** A line the CLI adds itself (slash command output, trust decisions). */
|
|
165
|
+
note(level, text) {
|
|
166
|
+
// Leading indentation is layout (plan items, `Workspace` rows under an error): keep it, flatten the rest.
|
|
167
|
+
const item = { kind: "note", id: this.nextId(), level, text: `${/^ {0,8}/.exec(text)?.[0] ?? ""}${sanitizeInline(text, 2000)}` };
|
|
168
|
+
this.lastItem = item.id;
|
|
169
|
+
return { op: "append", item };
|
|
170
|
+
}
|
|
171
|
+
nextId() {
|
|
172
|
+
this.counter += 1;
|
|
173
|
+
return `v${this.counter}`;
|
|
174
|
+
}
|
|
175
|
+
onStream(requestId, event) {
|
|
176
|
+
if (event.type === "text_delta") {
|
|
177
|
+
this.streamed.add(requestId);
|
|
178
|
+
this.streamChars += event.text.length;
|
|
179
|
+
this.activityVerb = { verb: "Responding", detail: undefined };
|
|
180
|
+
const key = `${requestId}:${event.index}`;
|
|
181
|
+
const known = this.assistant.get(key);
|
|
182
|
+
if (known === undefined) {
|
|
183
|
+
const state = { id: this.nextId(), text: event.text };
|
|
184
|
+
this.assistant.set(key, state);
|
|
185
|
+
this.lastItem = state.id;
|
|
186
|
+
return [{ op: "append", item: { kind: "assistant", id: state.id, text: sanitizeTerminalText(state.text), done: false } }];
|
|
187
|
+
}
|
|
188
|
+
known.text += event.text;
|
|
189
|
+
return [{ op: "update", item: { kind: "assistant", id: known.id, text: sanitizeTerminalText(known.text), done: false } }];
|
|
190
|
+
}
|
|
191
|
+
if (event.type === "done") {
|
|
192
|
+
const ops = [];
|
|
193
|
+
event.message.content.forEach((part, index) => {
|
|
194
|
+
if (part.type !== "text")
|
|
195
|
+
return;
|
|
196
|
+
const known = this.assistant.get(`${requestId}:${index}`);
|
|
197
|
+
if (known === undefined)
|
|
198
|
+
return;
|
|
199
|
+
known.text = part.text;
|
|
200
|
+
ops.push({ op: "update", item: { kind: "assistant", id: known.id, text: sanitizeTerminalText(known.text), done: true } });
|
|
201
|
+
});
|
|
202
|
+
this.streamChars = 0;
|
|
203
|
+
if (this.activityVerb?.verb === "Responding")
|
|
204
|
+
this.activityVerb = undefined;
|
|
205
|
+
return ops;
|
|
206
|
+
}
|
|
207
|
+
if (event.type === "quota")
|
|
208
|
+
this.noteQuota(this.requestProviders.get(requestId), event.quota.windows);
|
|
209
|
+
return [];
|
|
210
|
+
}
|
|
211
|
+
onEvent(event) {
|
|
212
|
+
const debug = this.options.debug === true ? this.debugLine(event) : [];
|
|
213
|
+
return [...this.present(event), ...debug];
|
|
214
|
+
}
|
|
215
|
+
debugLine(event) {
|
|
216
|
+
const line = describeEvent(event);
|
|
217
|
+
return line === undefined ? [] : [this.note("debug", `[event] ${line.text}`)];
|
|
218
|
+
}
|
|
219
|
+
present(event) {
|
|
220
|
+
switch (event.type) {
|
|
221
|
+
case "turn/started":
|
|
222
|
+
this.ledger = { files: new Map(), tests: undefined };
|
|
223
|
+
this.todoItem = undefined;
|
|
224
|
+
if (!this.replaying) {
|
|
225
|
+
this.turnStartedAt = this.submittedAt ?? this.now();
|
|
226
|
+
this.submittedAt = undefined;
|
|
227
|
+
this.turnTokens = 0;
|
|
228
|
+
this.streamChars = 0;
|
|
229
|
+
this.activityVerb = undefined;
|
|
230
|
+
}
|
|
231
|
+
return [];
|
|
232
|
+
case "turn/ended":
|
|
233
|
+
return this.turnEnded(event);
|
|
234
|
+
case "message/recorded":
|
|
235
|
+
return this.message(event);
|
|
236
|
+
case "steer/queued":
|
|
237
|
+
return this.options.echoesUser && !this.replaying ? [] : [this.user(event.data.text)];
|
|
238
|
+
case "model/request_prepared":
|
|
239
|
+
this.contextTokens = event.data.context.reduce((sum, block) => sum + block.tokens_estimate, 0);
|
|
240
|
+
this.model ??= event.data.route.model_id;
|
|
241
|
+
this.requestProviders.set(event.data.request_id, event.data.route.provider_id);
|
|
242
|
+
return [];
|
|
243
|
+
case "provider/usage":
|
|
244
|
+
this.turnTokens += usageTokens(event.data.usage);
|
|
245
|
+
if (event.data.usage.cost_usd_estimate !== undefined)
|
|
246
|
+
this.cost = (this.cost ?? 0) + event.data.usage.cost_usd_estimate;
|
|
247
|
+
if (event.data.quota !== undefined)
|
|
248
|
+
this.noteQuota(event.data.provider_id ?? this.requestProviders.get(event.data.request_id), event.data.quota.windows);
|
|
249
|
+
this.requestProviders.delete(event.data.request_id);
|
|
250
|
+
return [];
|
|
251
|
+
case "model/response_failed":
|
|
252
|
+
if (event.data.error.code === "cancelled")
|
|
253
|
+
return [];
|
|
254
|
+
return [this.note("error", `${this.options.glyphs.fail} The model request failed: ${event.data.error.message}${event.data.error.retryable ? " · press Enter to try again" : ""}`)];
|
|
255
|
+
case "model/response_settled":
|
|
256
|
+
return event.data.stop_reason === "length" ? [this.note("warning", `${this.options.glyphs.warn} The reply was cut off (length limit)`)] : [];
|
|
257
|
+
case "tool/policy_decided":
|
|
258
|
+
return this.toolDecided(event);
|
|
259
|
+
case "tool/execution_started":
|
|
260
|
+
return this.toolStarted(event);
|
|
261
|
+
case "tool/result_recorded":
|
|
262
|
+
return this.toolFinished(event);
|
|
263
|
+
case "backend/tool_observed":
|
|
264
|
+
return this.backendTool(event);
|
|
265
|
+
case "approval/requested":
|
|
266
|
+
this.waiting = !this.replaying;
|
|
267
|
+
if (event.data.request.hosts !== undefined)
|
|
268
|
+
this.hostApprovals.add(event.data.request.approval_id);
|
|
269
|
+
return [];
|
|
270
|
+
case "approval/decided":
|
|
271
|
+
this.waiting = false;
|
|
272
|
+
// A domain grant has its own line (network/host_allowed).
|
|
273
|
+
if (this.hostApprovals.delete(event.data.decision.approval_id))
|
|
274
|
+
return [];
|
|
275
|
+
// The tool row already shows a one-off answer (it runs, or turns ✗ denied); only a lasting grant gets its own line.
|
|
276
|
+
return event.data.decision.decided_by === "user" && event.data.decision.outcome === "allowed-for-scope" ? [this.note("info", `${this.options.glyphs.ok} Allowed for the rest of this session`)] : [];
|
|
277
|
+
case "network/host_allowed":
|
|
278
|
+
return [this.note("info", `${this.options.glyphs.ok} Always allowed: ${event.data.host} (every project) ${this.options.glyphs.sep} /permissions lists and removes it`)];
|
|
279
|
+
case "web/searched":
|
|
280
|
+
return this.nativeSearch(event);
|
|
281
|
+
case "context/compacted":
|
|
282
|
+
// The footer's ctx% follows at once, not only at the next request.
|
|
283
|
+
this.contextTokens = event.data.tokens_after;
|
|
284
|
+
return [this.note("info", `${this.options.glyphs.bullet} Context compacted ${this.options.glyphs.sep} ${formatTokens(event.data.tokens_before)} → ${formatTokens(event.data.tokens_after)} tokens`)];
|
|
285
|
+
case "checkpoint/restored":
|
|
286
|
+
return [];
|
|
287
|
+
case "session/resumed":
|
|
288
|
+
return [];
|
|
289
|
+
default:
|
|
290
|
+
return [];
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
turnEnded(event) {
|
|
294
|
+
const started = this.turnStartedAt;
|
|
295
|
+
this.turnStartedAt = undefined;
|
|
296
|
+
this.submittedAt = undefined;
|
|
297
|
+
this.activityVerb = undefined;
|
|
298
|
+
this.waiting = false;
|
|
299
|
+
const ops = [];
|
|
300
|
+
const g = this.options.glyphs;
|
|
301
|
+
for (const state of this.tools.values()) {
|
|
302
|
+
if (state.status === "running") {
|
|
303
|
+
state.status = "cancelled";
|
|
304
|
+
state.summary = "interrupted · may have partly run";
|
|
305
|
+
ops.push({ op: "update", item: this.toolView(state) });
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
switch (event.data.outcome) {
|
|
309
|
+
case "cancelled":
|
|
310
|
+
if (!this.replaying)
|
|
311
|
+
ops.push(this.note("warning", `${g.result} Interrupted ${g.sep} tell Synorch what to do instead`));
|
|
312
|
+
break;
|
|
313
|
+
case "max_steps":
|
|
314
|
+
ops.push(this.note("warning", `${g.warn} Stopped: the turn reached its step limit ${g.sep} say "continue" to go on`));
|
|
315
|
+
break;
|
|
316
|
+
case "budget_exceeded":
|
|
317
|
+
ops.push(this.note("warning", `${g.warn} Stopped: the budget admits no further model request`));
|
|
318
|
+
break;
|
|
319
|
+
case "failed":
|
|
320
|
+
if (!this.replaying)
|
|
321
|
+
ops.push(this.note("error", `${g.fail} The turn stopped on an error ${g.sep} files are unchanged unless a tool line above says otherwise ${g.sep} say "try again", or /diff to check`));
|
|
322
|
+
break;
|
|
323
|
+
default:
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
const result = this.resultLine(event.data.outcome);
|
|
327
|
+
if (result !== undefined)
|
|
328
|
+
ops.push(result);
|
|
329
|
+
if (started !== undefined && !this.replaying) {
|
|
330
|
+
const elapsed = this.now() - started;
|
|
331
|
+
if (elapsed >= 10_000)
|
|
332
|
+
ops.push(this.note("info", ` worked ${formatElapsed(elapsed)} ${g.sep} ${formatTokens(this.turnTokens)} tokens`));
|
|
333
|
+
}
|
|
334
|
+
return ops;
|
|
335
|
+
}
|
|
336
|
+
/** `Changed src/a.ts (+8 −3) · Tests: 12 passed · /diff /evidence`; undefined when nothing changed or ran. */
|
|
337
|
+
resultLine(outcome) {
|
|
338
|
+
const g = this.options.glyphs;
|
|
339
|
+
const files = [...this.ledger.files.entries()];
|
|
340
|
+
const tests = this.ledger.tests;
|
|
341
|
+
if (files.length === 0 && tests === undefined)
|
|
342
|
+
return undefined;
|
|
343
|
+
const parts = [];
|
|
344
|
+
let tone = "ok";
|
|
345
|
+
if (files.length > 0) {
|
|
346
|
+
const added = files.reduce((sum, [, file]) => sum + file.added, 0);
|
|
347
|
+
const removed = files.reduce((sum, [, file]) => sum + file.removed, 0);
|
|
348
|
+
const names = files.length === 1 ? (files[0]?.[0] ?? "") : `${files.length} files`;
|
|
349
|
+
parts.push(`Changed ${names} (+${added} ${g.minus}${removed})`);
|
|
350
|
+
}
|
|
351
|
+
if (tests === undefined) {
|
|
352
|
+
parts.push("Tests: not run");
|
|
353
|
+
tone = "warning";
|
|
354
|
+
}
|
|
355
|
+
else if (tests.ok) {
|
|
356
|
+
parts.push(`Tests: ${tests.passed === undefined ? "passed" : `${tests.passed} passed`}`);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
parts.push(`Tests: ${tests.failed === undefined ? `failed (exit ${tests.exit ?? "?"})` : `${tests.failed} failed`}`);
|
|
360
|
+
tone = "error";
|
|
361
|
+
}
|
|
362
|
+
if ((outcome === "cancelled" || outcome === "failed") && tone === "ok")
|
|
363
|
+
tone = "warning";
|
|
364
|
+
parts.push(files.length > 0 ? "/diff /evidence" : "/evidence");
|
|
365
|
+
const item = { kind: "result", id: this.nextId(), text: parts.join(` ${g.sep} `), tone };
|
|
366
|
+
this.lastItem = item.id;
|
|
367
|
+
return { op: "append", item };
|
|
368
|
+
}
|
|
369
|
+
user(text) {
|
|
370
|
+
const item = { kind: "user", id: this.nextId(), text: sanitizeTerminalText(text) };
|
|
371
|
+
this.lastItem = item.id;
|
|
372
|
+
return { op: "append", item };
|
|
373
|
+
}
|
|
374
|
+
message(event) {
|
|
375
|
+
const message = event.data.message;
|
|
376
|
+
if (message === undefined)
|
|
377
|
+
return [];
|
|
378
|
+
if (message.role === "user") {
|
|
379
|
+
// A user message inside a step (request id) is the harness's own: a tool image for the model (K4.2).
|
|
380
|
+
if (event.data.request_id !== undefined)
|
|
381
|
+
return [];
|
|
382
|
+
if (this.options.echoesUser && !this.replaying)
|
|
383
|
+
return [];
|
|
384
|
+
const text = message.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n");
|
|
385
|
+
// A K3 completion turn carries only a harness note (no user text): nothing to show as the user's line.
|
|
386
|
+
const shown = stripHarnessNotes(text);
|
|
387
|
+
return shown.trim() === "" ? [] : [this.user(shown)];
|
|
388
|
+
}
|
|
389
|
+
if (message.role !== "assistant")
|
|
390
|
+
return [];
|
|
391
|
+
const ops = [];
|
|
392
|
+
const streamed = event.data.request_id !== undefined && this.streamed.has(event.data.request_id);
|
|
393
|
+
for (const part of message.content) {
|
|
394
|
+
if (part.type === "text" && !streamed && part.text.trim() !== "") {
|
|
395
|
+
const id = this.nextId();
|
|
396
|
+
this.lastItem = id;
|
|
397
|
+
ops.push({ op: "append", item: { kind: "assistant", id, text: sanitizeTerminalText(part.text), done: true } });
|
|
398
|
+
}
|
|
399
|
+
if (part.type === "tool_call")
|
|
400
|
+
ops.push(...this.toolProposed(part));
|
|
401
|
+
}
|
|
402
|
+
return ops;
|
|
403
|
+
}
|
|
404
|
+
toolProposed(part) {
|
|
405
|
+
if (COORDINATION_TOOLS.has(part.name) || part.tool_call_id === undefined)
|
|
406
|
+
return [];
|
|
407
|
+
const args = part.arguments;
|
|
408
|
+
if (part.name === "todo" && this.todoItem !== undefined) {
|
|
409
|
+
const existing = this.tools.get(this.todoItem);
|
|
410
|
+
if (existing !== undefined) {
|
|
411
|
+
existing.args = args;
|
|
412
|
+
existing.status = "running";
|
|
413
|
+
this.toolItem.set(part.tool_call_id, existing.id);
|
|
414
|
+
return [{ op: "update", item: this.toolView(existing) }];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (part.name === "read_file") {
|
|
418
|
+
const last = this.lastItem === undefined ? undefined : [...this.tools.values()].find((state) => state.id === this.lastItem && state.group !== undefined);
|
|
419
|
+
const file = stringArg(args, "path") ?? "?";
|
|
420
|
+
if (last !== undefined && last.group !== undefined && last.status !== "denied" && last.status !== "failed") {
|
|
421
|
+
last.group.push(file);
|
|
422
|
+
last.title = `Read ${last.group.length} files`;
|
|
423
|
+
last.summary = shortList(last.group.map((entry) => entry.split("/").at(-1) ?? entry));
|
|
424
|
+
last.status = "running";
|
|
425
|
+
this.toolItem.set(part.tool_call_id, last.id);
|
|
426
|
+
return [{ op: "update", item: this.toolView(last) }];
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const state = {
|
|
430
|
+
id: this.nextId(),
|
|
431
|
+
name: part.name,
|
|
432
|
+
args,
|
|
433
|
+
status: "running",
|
|
434
|
+
title: toolTitle(part.name, args),
|
|
435
|
+
summary: undefined,
|
|
436
|
+
preview: [],
|
|
437
|
+
detail: [],
|
|
438
|
+
stat: undefined,
|
|
439
|
+
group: part.name === "read_file" ? [stringArg(args, "path") ?? "?"] : undefined,
|
|
440
|
+
pending: pendingPreview(part.name, args),
|
|
441
|
+
};
|
|
442
|
+
this.tools.set(state.id, state);
|
|
443
|
+
this.toolItem.set(part.tool_call_id, state.id);
|
|
444
|
+
this.lastItem = state.id;
|
|
445
|
+
if (part.name === "todo")
|
|
446
|
+
this.todoItem = state.id;
|
|
447
|
+
return [{ op: "append", item: this.toolView(state) }];
|
|
448
|
+
}
|
|
449
|
+
stateFor(toolCallId) {
|
|
450
|
+
const id = this.toolItem.get(toolCallId);
|
|
451
|
+
return id === undefined ? undefined : this.tools.get(id);
|
|
452
|
+
}
|
|
453
|
+
toolDecided(event) {
|
|
454
|
+
const state = this.stateFor(event.data.tool_call_id);
|
|
455
|
+
if (state === undefined || event.data.decision.decision !== "deny")
|
|
456
|
+
return [];
|
|
457
|
+
state.status = "denied";
|
|
458
|
+
state.summary = denialSummary(event.data.decision.reasons, event.data.action.role === "session" ? event.data.action.command?.argv : undefined, this.options.glyphs);
|
|
459
|
+
return [{ op: "update", item: this.toolView(state) }];
|
|
460
|
+
}
|
|
461
|
+
toolStarted(event) {
|
|
462
|
+
const state = this.stateFor(event.data.tool_call_id);
|
|
463
|
+
if (state === undefined)
|
|
464
|
+
return [];
|
|
465
|
+
if (!this.replaying) {
|
|
466
|
+
this.activityVerb =
|
|
467
|
+
state.name === "exec"
|
|
468
|
+
? { verb: "Running", detail: sanitizeInline(argvOf(state.args).join(" "), 60) }
|
|
469
|
+
: state.name === "apply_patch" || state.name === "write_file"
|
|
470
|
+
? { verb: "Editing", detail: undefined }
|
|
471
|
+
: state.name === "web_search"
|
|
472
|
+
? { verb: "Searching", detail: sanitizeInline(stringArg(state.args, "query") ?? "", 60) }
|
|
473
|
+
: state.name === "web_fetch"
|
|
474
|
+
? { verb: "Fetching", detail: sanitizeInline(shortUrl(stringArg(state.args, "url") ?? ""), 60) }
|
|
475
|
+
: { verb: "Reading", detail: undefined };
|
|
476
|
+
}
|
|
477
|
+
return [];
|
|
478
|
+
}
|
|
479
|
+
toolFinished(event) {
|
|
480
|
+
const state = this.stateFor(event.data.tool_call_id);
|
|
481
|
+
if (!this.replaying)
|
|
482
|
+
this.activityVerb = undefined;
|
|
483
|
+
if (state === undefined)
|
|
484
|
+
return [];
|
|
485
|
+
if (event.data.state === "denied" && state.status === "denied")
|
|
486
|
+
return [];
|
|
487
|
+
const result = event.data.result;
|
|
488
|
+
const g = this.options.glyphs;
|
|
489
|
+
if (event.data.state === "denied") {
|
|
490
|
+
state.status = "denied";
|
|
491
|
+
state.summary = sanitizeInline(result.error?.message ?? "refused", 600);
|
|
492
|
+
return [{ op: "update", item: this.toolView(state) }];
|
|
493
|
+
}
|
|
494
|
+
if (event.data.state === "cancelled") {
|
|
495
|
+
state.status = "cancelled";
|
|
496
|
+
state.summary = "interrupted · may have partly run";
|
|
497
|
+
return [{ op: "update", item: this.toolView(state) }];
|
|
498
|
+
}
|
|
499
|
+
const failed = event.data.state !== "succeeded" || result.status === "error";
|
|
500
|
+
if (state.group !== undefined && state.group.length > 1) {
|
|
501
|
+
state.status = failed ? "failed" : "ok";
|
|
502
|
+
if (failed)
|
|
503
|
+
state.summary = `${state.summary ?? ""} ${g.sep} ${sanitizeInline(result.error?.message ?? "failed", 120)}`;
|
|
504
|
+
return [{ op: "update", item: this.toolView(state) }];
|
|
505
|
+
}
|
|
506
|
+
state.status = failed ? "failed" : "ok";
|
|
507
|
+
const outcome = summarizeResult(state.name, state.args, result, event.data.duration_ms, g);
|
|
508
|
+
state.summary = outcome.summary;
|
|
509
|
+
state.stat = outcome.stat;
|
|
510
|
+
state.preview = outcome.preview;
|
|
511
|
+
state.detail = outcome.detail;
|
|
512
|
+
if (state.name === "exec" && state.args.background === true && !failed) {
|
|
513
|
+
const handle = /^(p\d+) · /.exec(result.text)?.[1];
|
|
514
|
+
if (handle !== undefined && / · running · /.test(result.text.split("\n", 1)[0] ?? ""))
|
|
515
|
+
state.background = { handle, startedAt: Date.parse(event.timestamp) - event.data.duration_ms };
|
|
516
|
+
}
|
|
517
|
+
this.record(state, result, failed);
|
|
518
|
+
return [{ op: "update", item: this.toolView(state) }];
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Claude Code native mode: a built-in tool Claude ran itself, as a tool row (`✓ Bash pnpm test
|
|
522
|
+
* 12 passed`, `✓ Edit src/x.ts +3 −1`). Display only; the row feeds the turn's result line.
|
|
523
|
+
*/
|
|
524
|
+
backendTool(event) {
|
|
525
|
+
const data = event.data;
|
|
526
|
+
const g = this.options.glyphs;
|
|
527
|
+
const key = `backend:${data.tool_use_id}`;
|
|
528
|
+
let state = this.stateFor(key);
|
|
529
|
+
const fresh = state === undefined;
|
|
530
|
+
if (state === undefined) {
|
|
531
|
+
state = {
|
|
532
|
+
id: this.nextId(),
|
|
533
|
+
name: `claude:${data.tool_name}`,
|
|
534
|
+
args: {},
|
|
535
|
+
status: "running",
|
|
536
|
+
title: claudeToolTitle(data.tool_name, data.input_summary),
|
|
537
|
+
summary: undefined,
|
|
538
|
+
preview: [],
|
|
539
|
+
detail: [],
|
|
540
|
+
stat: undefined,
|
|
541
|
+
group: undefined,
|
|
542
|
+
pending: [],
|
|
543
|
+
};
|
|
544
|
+
this.tools.set(state.id, state);
|
|
545
|
+
this.toolItem.set(key, state.id);
|
|
546
|
+
this.lastItem = state.id;
|
|
547
|
+
}
|
|
548
|
+
if (data.phase === "started") {
|
|
549
|
+
if (!this.replaying) {
|
|
550
|
+
this.activityVerb =
|
|
551
|
+
data.tool_name === "Bash" || data.tool_name === "PowerShell"
|
|
552
|
+
? { verb: "Running", detail: sanitizeInline(data.input_summary, 60) }
|
|
553
|
+
: CLAUDE_WRITE_TOOLS.has(data.tool_name)
|
|
554
|
+
? { verb: "Editing", detail: undefined }
|
|
555
|
+
: { verb: "Working", detail: undefined };
|
|
556
|
+
}
|
|
557
|
+
return fresh ? [{ op: "append", item: this.toolView(state) }] : [];
|
|
558
|
+
}
|
|
559
|
+
if (!this.replaying)
|
|
560
|
+
this.activityVerb = undefined;
|
|
561
|
+
const failed = data.is_error === true;
|
|
562
|
+
state.status = failed ? "failed" : "ok";
|
|
563
|
+
const lines = data.lines_added === undefined ? undefined : `+${data.lines_added} ${g.minus}${data.lines_removed ?? 0}`;
|
|
564
|
+
const summary = sanitizeInline(lines ?? data.result_summary ?? "", 600);
|
|
565
|
+
state.summary = summary === "" ? undefined : summary;
|
|
566
|
+
if (!failed && CLAUDE_WRITE_TOOLS.has(data.tool_name) && data.input_summary !== "") {
|
|
567
|
+
const entry = this.ledger.files.get(data.input_summary) ?? { added: 0, removed: 0, created: data.tool_name === "Write" };
|
|
568
|
+
entry.added += data.lines_added ?? 0;
|
|
569
|
+
entry.removed += data.lines_removed ?? 0;
|
|
570
|
+
this.ledger.files.set(data.input_summary, entry);
|
|
571
|
+
}
|
|
572
|
+
else if (data.tool_name === "Bash" && isTestCommand(data.input_summary.split(/\s+/))) {
|
|
573
|
+
const body = data.result_summary ?? "";
|
|
574
|
+
const failures = testCount(body, "fail");
|
|
575
|
+
this.ledger.tests = { passed: testCount(body, "pass"), failed: failures === 0 ? undefined : failures, ok: !failed, exit: undefined };
|
|
576
|
+
}
|
|
577
|
+
return [{ op: fresh ? "append" : "update", item: this.toolView(state) }];
|
|
578
|
+
}
|
|
579
|
+
/** Feeds the turn's result line: edited files with their line counts, and test commands. */
|
|
580
|
+
record(state, result, failed) {
|
|
581
|
+
if (state.name === "apply_patch" && !failed) {
|
|
582
|
+
const patch = stringArg(state.args, "patch") ?? "";
|
|
583
|
+
const diff = patchDiff(patch);
|
|
584
|
+
const created = /^\*\*\* Add File: /m.test(patch);
|
|
585
|
+
patchPaths(patch).forEach((file, index) => {
|
|
586
|
+
const entry = this.ledger.files.get(file) ?? { added: 0, removed: 0, created };
|
|
587
|
+
// Line counts belong to the whole patch; the first file carries them so the totals stay exact.
|
|
588
|
+
if (index === 0) {
|
|
589
|
+
entry.added += diff.filter((line) => line.op === "+").length;
|
|
590
|
+
entry.removed += diff.filter((line) => line.op === "-").length;
|
|
591
|
+
}
|
|
592
|
+
this.ledger.files.set(file, entry);
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
else if (state.name === "write_file" && !failed) {
|
|
596
|
+
const file = stringArg(state.args, "path") ?? "?";
|
|
597
|
+
const content = stringArg(state.args, "content") ?? "";
|
|
598
|
+
const entry = this.ledger.files.get(file) ?? { added: 0, removed: 0, created: result.text.startsWith("created") };
|
|
599
|
+
entry.added += content === "" ? 0 : content.replace(/\r?\n$/, "").split(/\r?\n/).length;
|
|
600
|
+
this.ledger.files.set(file, entry);
|
|
601
|
+
}
|
|
602
|
+
else if (state.name === "exec" && state.args.background !== true && isTestCommand(argvOf(state.args))) {
|
|
603
|
+
const body = outputLines(result.text).join("\n");
|
|
604
|
+
const failures = testCount(body, "fail");
|
|
605
|
+
this.ledger.tests = { passed: testCount(body, "pass"), failed: failures === 0 ? undefined : failures, ok: !failed && result.exit_code === 0, exit: result.exit_code };
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
/** A search the provider ran natively inside the model turn (OpenAI hosted web_search). */
|
|
609
|
+
nativeSearch(event) {
|
|
610
|
+
const label = event.data.provider === "openai-hosted" ? "OpenAI" : event.data.provider === "claude-code" ? "Claude" : event.data.provider;
|
|
611
|
+
const summary = plural(event.data.sources, "source");
|
|
612
|
+
const state = {
|
|
613
|
+
id: this.nextId(),
|
|
614
|
+
name: "web_search",
|
|
615
|
+
args: { query: event.data.query },
|
|
616
|
+
status: "ok",
|
|
617
|
+
title: `Search (${label}) "${sanitizeInline(event.data.query, 80)}"`,
|
|
618
|
+
summary,
|
|
619
|
+
preview: [],
|
|
620
|
+
detail: [],
|
|
621
|
+
stat: summary,
|
|
622
|
+
group: undefined,
|
|
623
|
+
pending: [],
|
|
624
|
+
};
|
|
625
|
+
this.tools.set(state.id, state);
|
|
626
|
+
this.lastItem = state.id;
|
|
627
|
+
return [{ op: "append", item: this.toolView(state) }];
|
|
628
|
+
}
|
|
629
|
+
toolView(state) {
|
|
630
|
+
return {
|
|
631
|
+
kind: "tool",
|
|
632
|
+
id: state.id,
|
|
633
|
+
status: state.status,
|
|
634
|
+
title: state.title,
|
|
635
|
+
summary: state.summary,
|
|
636
|
+
preview: [...state.preview],
|
|
637
|
+
detail: [...state.detail],
|
|
638
|
+
stat: state.stat,
|
|
639
|
+
...(state.background === undefined ? {} : { background: state.background }),
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function usageTokens(usage) {
|
|
644
|
+
return (usage.input_tokens ?? 0) + (usage.output_tokens ?? 0);
|
|
645
|
+
}
|
|
646
|
+
/** Short footer name of a provider's subscription: `anthropic` -> `claude`, `openai` -> `chatgpt`. */
|
|
647
|
+
export function quotaProviderLabel(provider) {
|
|
648
|
+
if (provider === "anthropic")
|
|
649
|
+
return "claude";
|
|
650
|
+
if (provider === "openai")
|
|
651
|
+
return "chatgpt";
|
|
652
|
+
return sanitizeInline(provider, 16);
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* A `syn run` (or orchestrated) session: its goal and the orchestrator's own prompts. Inside a run
|
|
656
|
+
* (from `run/created` until the run reaches a terminal state) user-role messages are the planner's
|
|
657
|
+
* prompts, never something the person typed; the resume card shows `run: <goal>` instead.
|
|
658
|
+
*/
|
|
659
|
+
export function runPrompts(events) {
|
|
660
|
+
const hidden = new Set();
|
|
661
|
+
let goal;
|
|
662
|
+
let active;
|
|
663
|
+
for (const event of events) {
|
|
664
|
+
if (event.type === "run/created") {
|
|
665
|
+
goal ??= event.data.goal;
|
|
666
|
+
active = event.run_id ?? "";
|
|
667
|
+
}
|
|
668
|
+
else if (event.type === "run/state_changed" && active !== undefined && (event.run_id ?? "") === active && RUN_ENDS.has(event.data.to)) {
|
|
669
|
+
active = undefined;
|
|
670
|
+
}
|
|
671
|
+
else if (active !== undefined && event.type === "message/recorded" && event.data.role === "user") {
|
|
672
|
+
hidden.add(event);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return { goal, hidden };
|
|
676
|
+
}
|
|
677
|
+
const RUN_ENDS = new Set(["completed", "failed", "cancelled"]);
|
|
678
|
+
function maxQuota(windows) {
|
|
679
|
+
if (windows.length === 0)
|
|
680
|
+
return undefined;
|
|
681
|
+
return Math.round(Math.max(...windows.map((window) => window.used_percent)));
|
|
682
|
+
}
|
|
683
|
+
export function formatTokens(tokens) {
|
|
684
|
+
if (tokens < 1000)
|
|
685
|
+
return String(tokens);
|
|
686
|
+
return `${(tokens / 1000).toFixed(tokens < 10_000 ? 1 : 0)}k`;
|
|
687
|
+
}
|
|
688
|
+
export function formatElapsed(ms) {
|
|
689
|
+
const seconds = Math.floor(ms / 1000);
|
|
690
|
+
if (seconds < 60)
|
|
691
|
+
return `${seconds}s`;
|
|
692
|
+
return `${Math.floor(seconds / 60)}m ${String(seconds % 60).padStart(2, "0")}s`;
|
|
693
|
+
}
|
|
694
|
+
/** The harness prefixes notes (an /undo) to the next user message; the transcript shows only what the user typed. */
|
|
695
|
+
function stripHarnessNotes(text) {
|
|
696
|
+
return text.replace(/^\[Synorch note:[^\]]*\]\s*/u, "");
|
|
697
|
+
}
|
|
698
|
+
function stringArg(args, key) {
|
|
699
|
+
const value = args[key];
|
|
700
|
+
return typeof value === "string" ? value : undefined;
|
|
701
|
+
}
|
|
702
|
+
function argvOf(args) {
|
|
703
|
+
const argv = args.argv;
|
|
704
|
+
return Array.isArray(argv) ? argv.filter((entry) => typeof entry === "string") : [];
|
|
705
|
+
}
|
|
706
|
+
const TEST_WORDS = /^(test|tests|vitest|jest|pytest|mocha|ava|tap|ctest|rspec|phpunit|--test)$/;
|
|
707
|
+
/** `npm test`, `pnpm run test`, `node --test`, `pytest -q`, `go test ./...`, `cargo test`. */
|
|
708
|
+
export function isTestCommand(argv) {
|
|
709
|
+
return argv.some((word, index) => {
|
|
710
|
+
const base = word.toLowerCase().replace(/\.(cmd|exe)$/, "").split(/[\\/]/).pop() ?? "";
|
|
711
|
+
return TEST_WORDS.test(base) || (index > 0 && /^test:[\w:-]+$/.test(base));
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
/** `12 passed`, `pass 12`, `ℹ pass 12`, `3 failed`; undefined when the output does not say. */
|
|
715
|
+
function testCount(body, kind) {
|
|
716
|
+
const word = kind === "pass" ? "pass(?:ed|ing)?" : "fail(?:ed|ing|ures?)?";
|
|
717
|
+
const after = new RegExp(`(?:^|\\s)(?:ℹ\\s+)?${word}\\s+(\\d+)`, "im").exec(body)?.[1];
|
|
718
|
+
const before = new RegExp(`(\\d+)\\s+${word}\\b`, "i").exec(body)?.[1];
|
|
719
|
+
const found = after ?? before;
|
|
720
|
+
return found === undefined ? undefined : Number(found);
|
|
721
|
+
}
|
|
722
|
+
/** The edit a pending apply_patch / write_file would make, for the approval prompt (≤ 12 lines). */
|
|
723
|
+
function pendingPreview(name, args) {
|
|
724
|
+
if (name === "apply_patch")
|
|
725
|
+
return patchDiff(stringArg(args, "patch") ?? "").slice(0, 12);
|
|
726
|
+
if (name === "write_file")
|
|
727
|
+
return (stringArg(args, "content") ?? "").split(/\r?\n/).slice(0, 12).map((text) => ({ op: "+", text: diffText(text) }));
|
|
728
|
+
return [];
|
|
729
|
+
}
|
|
730
|
+
function shortList(names) {
|
|
731
|
+
return names.length <= 2 ? names.join(", ") : `${names.slice(0, 2).join(", ")}, +${names.length - 2}`;
|
|
732
|
+
}
|
|
733
|
+
/** The files an apply_patch touches, in order (both patch formats). */
|
|
734
|
+
export function patchPaths(patch) {
|
|
735
|
+
const paths = [];
|
|
736
|
+
for (const line of patch.split(/\r?\n/)) {
|
|
737
|
+
const begin = /^\*\*\* (?:Update|Add|Delete) File: (.+)$/.exec(line) ?? /^\*\*\* Move to: (.+)$/.exec(line);
|
|
738
|
+
const unified = /^\+\+\+ (?:b\/)?(.+)$/.exec(line);
|
|
739
|
+
const found = begin?.[1] ?? (unified !== null && unified[1] !== "/dev/null" ? unified[1] : undefined);
|
|
740
|
+
if (found !== undefined && !paths.includes(found.trim()))
|
|
741
|
+
paths.push(found.trim());
|
|
742
|
+
}
|
|
743
|
+
if (paths.length === 0) {
|
|
744
|
+
for (const line of patch.split(/\r?\n/)) {
|
|
745
|
+
const removed = /^--- (?:a\/)?(.+)$/.exec(line);
|
|
746
|
+
if (removed?.[1] !== undefined && removed[1] !== "/dev/null")
|
|
747
|
+
paths.push(removed[1].trim());
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
return paths;
|
|
751
|
+
}
|
|
752
|
+
const CLAUDE_WRITE_TOOLS = new Set(["Edit", "Write", "MultiEdit", "NotebookEdit"]);
|
|
753
|
+
/** A Claude built-in's row title: `Bash pnpm test`, `Edit src/x.ts`, `Search (Claude) "q"`, `Fetch (Claude) host/path`. */
|
|
754
|
+
function claudeToolTitle(name, summary) {
|
|
755
|
+
const detail = sanitizeInline(summary, 2000);
|
|
756
|
+
const label = name === "WebSearch" ? "Search (Claude)" : name === "WebFetch" ? "Fetch (Claude)" : sanitizeInline(name, 40);
|
|
757
|
+
return detail === "" ? label : `${label} ${detail}`;
|
|
758
|
+
}
|
|
759
|
+
function toolTitle(name, args) {
|
|
760
|
+
switch (name) {
|
|
761
|
+
case "read_file":
|
|
762
|
+
return `Read ${stringArg(args, "path") ?? "?"}`;
|
|
763
|
+
case "list_dir":
|
|
764
|
+
return `List ${stringArg(args, "path") ?? "."}`;
|
|
765
|
+
case "search": {
|
|
766
|
+
const where = stringArg(args, "path");
|
|
767
|
+
return `Search "${sanitizeInline(stringArg(args, "pattern") ?? "", 60)}"${where === undefined || where === "." ? "" : ` in ${where}`}`;
|
|
768
|
+
}
|
|
769
|
+
case "apply_patch": {
|
|
770
|
+
const paths = patchPaths(stringArg(args, "patch") ?? "");
|
|
771
|
+
return `Edit ${paths.length === 0 ? "files" : paths.length === 1 ? paths[0] : `${paths[0]} +${paths.length - 1}`}`;
|
|
772
|
+
}
|
|
773
|
+
case "write_file":
|
|
774
|
+
return `Write ${stringArg(args, "path") ?? "?"}`;
|
|
775
|
+
case "exec": {
|
|
776
|
+
const command = sanitizeInline(argvOf(args).join(" "), 2000);
|
|
777
|
+
if (args.background !== true)
|
|
778
|
+
return `Run ${command}`;
|
|
779
|
+
const name = stringArg(args, "name");
|
|
780
|
+
return name === undefined ? `Start ${command}` : `${sanitizeInline(name, 40)} (${command})`;
|
|
781
|
+
}
|
|
782
|
+
case "glob": {
|
|
783
|
+
const where = stringArg(args, "path");
|
|
784
|
+
return `Find ${sanitizeInline(stringArg(args, "pattern") ?? "", 60)}${where === undefined || where === "." ? "" : ` in ${where}`}`;
|
|
785
|
+
}
|
|
786
|
+
case "todo":
|
|
787
|
+
return "Tasks";
|
|
788
|
+
case "process_output":
|
|
789
|
+
return `Output of ${stringArg(args, "handle") ?? "?"}`;
|
|
790
|
+
case "process_wait":
|
|
791
|
+
return `Wait for ${stringArg(args, "handle") ?? "?"}`;
|
|
792
|
+
case "process_kill":
|
|
793
|
+
return `Stop ${stringArg(args, "handle") ?? "?"}`;
|
|
794
|
+
case "process_list":
|
|
795
|
+
return "Background processes";
|
|
796
|
+
case "git_status":
|
|
797
|
+
return "Git status";
|
|
798
|
+
case "git_diff":
|
|
799
|
+
return "Git diff";
|
|
800
|
+
case "web_search":
|
|
801
|
+
return `Search "${sanitizeInline(stringArg(args, "query") ?? "", 80)}"`;
|
|
802
|
+
case "web_fetch":
|
|
803
|
+
return `Fetch ${sanitizeInline(shortUrl(stringArg(args, "url") ?? "?"), 100)}`;
|
|
804
|
+
case "orchestrate":
|
|
805
|
+
return `Workers ${sanitizeInline(stringArg(args, "goal") ?? "", 2000)}`.trimEnd();
|
|
806
|
+
default: {
|
|
807
|
+
const first = Object.values(args).find((value) => typeof value === "string");
|
|
808
|
+
return `${name}${first === undefined ? "" : ` ${sanitizeInline(first, 2000)}`}`;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
/** `https://www.example.com/a/b?q` → `example.com/a/b?q` for a compact row. */
|
|
813
|
+
export function shortUrl(raw) {
|
|
814
|
+
try {
|
|
815
|
+
const url = new URL(raw);
|
|
816
|
+
const rest = `${url.pathname === "/" ? "" : url.pathname}${url.search}`;
|
|
817
|
+
return `${url.host.replace(/^www\./, "")}${rest}`;
|
|
818
|
+
}
|
|
819
|
+
catch {
|
|
820
|
+
return raw;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
/** The `/allow` prefix to suggest for a refused argv: the program and, when it is not a flag, its first argument. */
|
|
824
|
+
export function allowPrefixFor(argv) {
|
|
825
|
+
const [program = "", first] = argv;
|
|
826
|
+
return first !== undefined && !first.startsWith("-") ? `${program} ${first}` : program;
|
|
827
|
+
}
|
|
828
|
+
/** `argv` is given only for the conversation agent: `/allow` never applies to a worker, so its refusal is explained instead. */
|
|
829
|
+
function denialSummary(reasons, argv, g) {
|
|
830
|
+
const codes = new Set(reasons.map((reason) => reason.code));
|
|
831
|
+
if (argv !== undefined && argv.length > 0 && reasons.some((reason) => reason.code === "exec-not-allowlisted" && reason.layer !== "role") && !reasons.some((reason) => /changes the repository|refused:/.test(reason.message))) {
|
|
832
|
+
return `not allowed here ${g.sep} type /allow ${allowPrefixFor(argv)} to permit it`;
|
|
833
|
+
}
|
|
834
|
+
if (codes.has("workspace-untrusted"))
|
|
835
|
+
return `runs repository code and this folder is not trusted ${g.sep} /trust to allow it`;
|
|
836
|
+
const first = reasons[0];
|
|
837
|
+
const message = first === undefined ? "blocked by policy" : first.message.replace(/^[^:]*? is refused: /, "");
|
|
838
|
+
return `blocked by policy ${g.sep} ${sanitizeInline(message, 160)}`;
|
|
839
|
+
}
|
|
840
|
+
function outputLines(text) {
|
|
841
|
+
const lines = text.split(/\r?\n/);
|
|
842
|
+
const body = [];
|
|
843
|
+
for (const line of lines.slice(2)) {
|
|
844
|
+
if (line === "--- stdout ---" || line === "--- stderr ---")
|
|
845
|
+
continue;
|
|
846
|
+
body.push(line);
|
|
847
|
+
}
|
|
848
|
+
while (body.length > 0 && body.at(-1)?.trim() === "")
|
|
849
|
+
body.pop();
|
|
850
|
+
return body;
|
|
851
|
+
}
|
|
852
|
+
function textLines(lines) {
|
|
853
|
+
return lines.map((text) => ({ op: " ", text: sanitizeInline(text, 2000) }));
|
|
854
|
+
}
|
|
855
|
+
function summarizeResult(name, args, result, durationMs, g) {
|
|
856
|
+
const failedText = friendlyError(result.error?.message ?? "failed");
|
|
857
|
+
const text = result.text;
|
|
858
|
+
switch (name) {
|
|
859
|
+
case "read_file": {
|
|
860
|
+
if (result.status === "error")
|
|
861
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
862
|
+
const header = text.split("\n", 1)[0] ?? "";
|
|
863
|
+
const total = /of (\d+)\+?$/.exec(header.replace(/\s*\(.*\)$/, ""))?.[1];
|
|
864
|
+
const lines = text.split("\n").slice(1);
|
|
865
|
+
return { summary: header.includes("empty file") ? "empty file" : total === undefined ? "read" : plural(Number(total), "line"), preview: [], detail: textLines(lines.slice(0, DETAIL_LINES)) };
|
|
866
|
+
}
|
|
867
|
+
case "list_dir": {
|
|
868
|
+
if (result.status === "error")
|
|
869
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
870
|
+
const entries = text === "(empty)" ? [] : text.split("\n").filter((line) => line.trim() !== "");
|
|
871
|
+
return { summary: plural(entries.length, "entry", "entries"), preview: [], detail: textLines(entries.slice(0, DETAIL_LINES)) };
|
|
872
|
+
}
|
|
873
|
+
case "search": {
|
|
874
|
+
if (result.status === "error")
|
|
875
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
876
|
+
const matches = text === "(no matches)" ? [] : text.split("\n").filter((line) => /^[^:]+:\d+:/.test(line));
|
|
877
|
+
const files = new Set(matches.map((line) => line.split(":")[0]));
|
|
878
|
+
return { summary: matches.length === 0 ? "no matches" : `${matches.length} match${matches.length === 1 ? "" : "es"} in ${files.size} file${files.size === 1 ? "" : "s"}`, preview: [], detail: textLines(matches.slice(0, DETAIL_LINES)) };
|
|
879
|
+
}
|
|
880
|
+
case "apply_patch": {
|
|
881
|
+
if (result.status === "error")
|
|
882
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
883
|
+
const diff = patchDiff(stringArg(args, "patch") ?? "");
|
|
884
|
+
const added = diff.filter((line) => line.op === "+").length;
|
|
885
|
+
const removed = diff.filter((line) => line.op === "-").length;
|
|
886
|
+
const preview = diff.slice(0, PREVIEW_LINES);
|
|
887
|
+
if (diff.length > PREVIEW_LINES)
|
|
888
|
+
preview.push({ op: "…", text: `+${diff.length - PREVIEW_LINES} lines (ctrl+o)` });
|
|
889
|
+
return { summary: `+${added} ${g.minus}${removed}`, preview, detail: diff };
|
|
890
|
+
}
|
|
891
|
+
case "write_file": {
|
|
892
|
+
if (result.status === "error")
|
|
893
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
894
|
+
const content = stringArg(args, "content") ?? "";
|
|
895
|
+
const lines = content === "" ? 0 : content.replace(/\r?\n$/, "").split(/\r?\n/).length;
|
|
896
|
+
const created = text.startsWith("created");
|
|
897
|
+
return { summary: `${created ? "new file" : "rewritten"} ${g.sep} ${plural(lines, "line")}`, preview: [], detail: textLines(content.split(/\r?\n/).slice(0, DETAIL_LINES)) };
|
|
898
|
+
}
|
|
899
|
+
case "exec": {
|
|
900
|
+
if (args.background === true)
|
|
901
|
+
return backgroundSummary(result, g);
|
|
902
|
+
const body = outputLines(text);
|
|
903
|
+
const seconds = `${(durationMs / 1000).toFixed(1)}s`;
|
|
904
|
+
if (result.exit_code === undefined)
|
|
905
|
+
return { summary: `${g.fail} ${failedText}`, stat: failedText, preview: textLines(body.slice(-5)), detail: textLines(body.slice(-DETAIL_LINES)) };
|
|
906
|
+
if (result.exit_code === 0) {
|
|
907
|
+
const tests = /(?:^|\s)(?:ℹ\s+)?pass(?:ed)?\s+(\d+)/im.exec(body.join("\n"))?.[1] ?? /(\d+) passed/i.exec(body.join("\n"))?.[1];
|
|
908
|
+
return {
|
|
909
|
+
summary: `${g.ok} exit 0${tests === undefined ? "" : ` ${g.sep} ${tests} passed`} ${g.sep} ${seconds}`,
|
|
910
|
+
stat: `${tests === undefined ? "" : `${tests} passed ${g.sep} `}${seconds}`,
|
|
911
|
+
preview: [],
|
|
912
|
+
detail: textLines(body.slice(-DETAIL_LINES)),
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
const failures = testCount(body.join("\n"), "fail");
|
|
916
|
+
return {
|
|
917
|
+
summary: `${g.fail} exit ${result.exit_code} ${g.sep} ${seconds}`,
|
|
918
|
+
stat: `exit ${result.exit_code}${failures === undefined || failures === 0 ? "" : ` ${g.sep} ${failures} failed`} ${g.sep} ${seconds}`,
|
|
919
|
+
preview: textLines(body.slice(-5)),
|
|
920
|
+
detail: textLines(body.slice(-DETAIL_LINES)),
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
case "glob": {
|
|
924
|
+
if (result.status === "error")
|
|
925
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
926
|
+
const [header = "", ...files] = text.split("\n");
|
|
927
|
+
const count = /^(\d+) files? match/.exec(header)?.[1];
|
|
928
|
+
return { summary: count === undefined ? "no files" : plural(Number(count), "file"), preview: [], detail: textLines(files.slice(0, DETAIL_LINES)) };
|
|
929
|
+
}
|
|
930
|
+
case "todo": {
|
|
931
|
+
if (result.status === "error")
|
|
932
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
933
|
+
const items = todoItems(args);
|
|
934
|
+
if (items.length === 0)
|
|
935
|
+
return { summary: "checklist cleared", preview: [], detail: [] };
|
|
936
|
+
const done = items.filter((item) => item.status === "done").length;
|
|
937
|
+
const mark = (status) => (status === "done" ? g.ok : status === "in_progress" ? (g.name === "rich" ? "◐" : ">") : g.name === "rich" ? "○" : "o");
|
|
938
|
+
const lines = items.map((item) => ({ op: " ", text: `${mark(item.status)} ${sanitizeInline(item.text, 200)}` }));
|
|
939
|
+
const inline = items.map((item) => `${item.status === "done" ? "[x]" : item.status === "in_progress" ? "[>]" : "[ ]"} ${sanitizeInline(item.text, 80)}`).join("; ");
|
|
940
|
+
return { summary: `${done}/${items.length} done ${g.sep} ${inline}`, stat: `${done}/${items.length} done`, preview: lines.slice(0, 12), detail: lines };
|
|
941
|
+
}
|
|
942
|
+
case "process_output":
|
|
943
|
+
case "process_wait":
|
|
944
|
+
case "process_kill":
|
|
945
|
+
case "process_list": {
|
|
946
|
+
if (result.status === "error")
|
|
947
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
948
|
+
const [first = "", ...rest] = text.split("\n");
|
|
949
|
+
const body = rest.filter((line) => !/^(output \d+-\d+|no new output|still running|wait cancelled)/.test(line));
|
|
950
|
+
if (name === "process_list")
|
|
951
|
+
return { summary: first === "no background processes" ? "none" : plural(text.split("\n").length, "process", "processes"), preview: [], detail: textLines(text.split("\n").slice(0, DETAIL_LINES)) };
|
|
952
|
+
const status = first.split(" · ").slice(2, 4).join(` ${g.sep} `);
|
|
953
|
+
const lines = rest.find((line) => line.startsWith("no new output")) !== undefined ? "no new output" : plural(body.length, "line");
|
|
954
|
+
return { summary: name === "process_kill" ? "stopped" : `${status}${name === "process_output" ? ` ${g.sep} ${lines}` : ""}`, preview: [], detail: textLines(body.slice(-DETAIL_LINES)) };
|
|
955
|
+
}
|
|
956
|
+
case "git_status": {
|
|
957
|
+
if (result.status === "error")
|
|
958
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
959
|
+
const changed = text.split("\n").filter((line) => /^[ MADRCU?!]{2} /.test(line));
|
|
960
|
+
return { summary: changed.length === 0 ? "clean" : `${changed.length} changed`, preview: [], detail: textLines(changed.slice(0, DETAIL_LINES)) };
|
|
961
|
+
}
|
|
962
|
+
case "web_search": {
|
|
963
|
+
if (result.status === "error")
|
|
964
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
965
|
+
const header = text.split("\n", 1)[0] ?? "";
|
|
966
|
+
const count = /: (\d+) results?$/.exec(header)?.[1];
|
|
967
|
+
const backend = / via ([\w-]+):/.exec(header)?.[1];
|
|
968
|
+
const titles = text.split("\n").filter((line) => /^\d+\. /.test(line));
|
|
969
|
+
const summary = `${count === undefined ? "done" : plural(Number(count), "result")}${backend === undefined ? "" : ` ${g.sep} ${backend}`}`;
|
|
970
|
+
return { summary, stat: summary, preview: [], detail: textLines(titles.slice(0, DETAIL_LINES)) };
|
|
971
|
+
}
|
|
972
|
+
case "web_fetch": {
|
|
973
|
+
if (result.status === "error")
|
|
974
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
975
|
+
const header = text.split("\n", 1)[0] ?? "";
|
|
976
|
+
const size = /, (\d+(?:\.\d+)? (?:B|KB|MB))[,)]/.exec(header)?.[1];
|
|
977
|
+
const redirect = /redirects \(\d+\) to another host: (\S+)/.exec(header)?.[1];
|
|
978
|
+
const summary = redirect !== undefined ? `redirects to ${shortUrl(redirect)}` : (size ?? "read");
|
|
979
|
+
const title = /title: (.*?) chars \d+/.exec(header)?.[1];
|
|
980
|
+
return { summary, stat: summary, preview: [], detail: title === undefined ? [] : textLines([title]) };
|
|
981
|
+
}
|
|
982
|
+
case "orchestrate": {
|
|
983
|
+
if (result.status === "error")
|
|
984
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
985
|
+
// K3: the background start is one concise line; the agent-facing instructions stay in the detail.
|
|
986
|
+
const started = /^Started worker run (\S+) in the background/.exec(text);
|
|
987
|
+
const lines = text.split("\n");
|
|
988
|
+
if (started !== null)
|
|
989
|
+
return { summary: `Workers running in background (${started[1]}) ${g.sep} keep chatting ${g.sep} /runs`, preview: [], detail: textLines(lines.slice(0, 20)) };
|
|
990
|
+
return { summary: sanitizeInline(lines[0] ?? "done", 600) || "done", preview: [], detail: textLines(lines.slice(0, 40)) };
|
|
991
|
+
}
|
|
992
|
+
default: {
|
|
993
|
+
if (result.status === "error")
|
|
994
|
+
return { summary: failedText, preview: [], detail: [] };
|
|
995
|
+
const lines = text.split("\n");
|
|
996
|
+
return { summary: sanitizeInline(lines[0] ?? "done", 600) || "done", preview: [], detail: textLines(lines.slice(0, 20)) };
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
function todoItems(args) {
|
|
1001
|
+
const items = args.items;
|
|
1002
|
+
if (!Array.isArray(items))
|
|
1003
|
+
return [];
|
|
1004
|
+
return items.flatMap((item) => {
|
|
1005
|
+
if (typeof item !== "object" || item === null)
|
|
1006
|
+
return [];
|
|
1007
|
+
const record = item;
|
|
1008
|
+
return typeof record.text === "string" ? [{ text: record.text, status: typeof record.status === "string" ? record.status : "pending" }] : [];
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
/** `exec {background: true}`: `running · p1` while it runs, or how it ended within the start window. */
|
|
1012
|
+
function backgroundSummary(result, g) {
|
|
1013
|
+
const [first = "", ...rest] = result.text.split("\n");
|
|
1014
|
+
const body = rest.slice(2);
|
|
1015
|
+
if (result.status === "error")
|
|
1016
|
+
return { summary: friendlyError(result.error?.message ?? "failed to start"), preview: textLines(body.slice(-5)), detail: textLines(body.slice(-DETAIL_LINES)) };
|
|
1017
|
+
const parts = first.split(" · ");
|
|
1018
|
+
const handle = parts[0] ?? "";
|
|
1019
|
+
const state = parts[2] ?? "";
|
|
1020
|
+
if (state === "running")
|
|
1021
|
+
return { summary: `running in the background ${g.sep} ${handle}`, stat: `running ${g.sep} ${handle}`, preview: [], detail: textLines(body.slice(-DETAIL_LINES)) };
|
|
1022
|
+
return { summary: `${state} ${g.sep} ${parts[3] ?? ""}`, stat: `${state} ${g.sep} ${parts[3] ?? ""}`, preview: textLines(body.slice(-5)), detail: textLines(body.slice(-DETAIL_LINES)) };
|
|
1023
|
+
}
|
|
1024
|
+
function plural(count, word, many = `${word}s`) {
|
|
1025
|
+
return `${count} ${count === 1 ? word : many}`;
|
|
1026
|
+
}
|
|
1027
|
+
const ERROR_WORDS = {
|
|
1028
|
+
ENOENT: "file not found",
|
|
1029
|
+
EACCES: "permission denied",
|
|
1030
|
+
EPERM: "not permitted",
|
|
1031
|
+
EISDIR: "is a folder, not a file",
|
|
1032
|
+
ENOTDIR: "not a folder",
|
|
1033
|
+
EEXIST: "already exists",
|
|
1034
|
+
ETIMEDOUT: "timed out",
|
|
1035
|
+
EBUSY: "file is busy (locked by another program)",
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Tool errors in plain words: `ENOENT … stat 'C:\\…\\missing.mjs'` becomes `file not found`;
|
|
1039
|
+
* absolute paths shrink to their file name (the tool line already names the file).
|
|
1040
|
+
*/
|
|
1041
|
+
export function friendlyError(message) {
|
|
1042
|
+
const code = /\b(ENOENT|EACCES|EPERM|EISDIR|ENOTDIR|EEXIST|ETIMEDOUT|EBUSY)\b/.exec(message)?.[1];
|
|
1043
|
+
if (code !== undefined)
|
|
1044
|
+
return ERROR_WORDS[code] ?? code;
|
|
1045
|
+
return sanitizeInline(message.replace(/(?:[A-Za-z]:)?[\\/](?:[^\s'",:\\/]+[\\/])+([^\s'",:\\/]+)/g, "$1"), 200);
|
|
1046
|
+
}
|
|
1047
|
+
/** A diff line with its indentation kept (tabs as two spaces), control characters removed. */
|
|
1048
|
+
function diffText(text) {
|
|
1049
|
+
return sanitizeTerminalText(text).replaceAll("\t", " ").replace(/[\r\n]/g, "").slice(0, 300);
|
|
1050
|
+
}
|
|
1051
|
+
/** The -/+ lines of a patch in order, for the edit preview (context lines are left out). */
|
|
1052
|
+
export function patchDiff(patch) {
|
|
1053
|
+
const lines = [];
|
|
1054
|
+
let inAdd = false;
|
|
1055
|
+
for (const line of patch.split(/\r?\n/)) {
|
|
1056
|
+
if (/^\*\*\* Add File: /.test(line)) {
|
|
1057
|
+
inAdd = true;
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
if (/^\*\*\* /.test(line)) {
|
|
1061
|
+
inAdd = false;
|
|
1062
|
+
continue;
|
|
1063
|
+
}
|
|
1064
|
+
if (line.startsWith("+++") || line.startsWith("---") || line.startsWith("@@"))
|
|
1065
|
+
continue;
|
|
1066
|
+
if (line.startsWith("+"))
|
|
1067
|
+
lines.push({ op: "+", text: diffText(line.slice(1)) });
|
|
1068
|
+
else if (line.startsWith("-"))
|
|
1069
|
+
lines.push({ op: "-", text: diffText(line.slice(1)) });
|
|
1070
|
+
else if (inAdd && line !== "")
|
|
1071
|
+
lines.push({ op: "+", text: diffText(line) });
|
|
1072
|
+
}
|
|
1073
|
+
return lines;
|
|
1074
|
+
}
|
|
1075
|
+
/** One-line header (TUI §8.1) and at most one warning line. */
|
|
1076
|
+
export function headerLines(options) {
|
|
1077
|
+
const g = options.glyphs;
|
|
1078
|
+
const title = [`Synorch ${options.version}`, `${options.folder}${options.branch === undefined ? "" : ` (${options.branch})`}`, options.model, options.mode]
|
|
1079
|
+
.filter((part) => part !== undefined && part !== "")
|
|
1080
|
+
.join(` ${g.sep} `);
|
|
1081
|
+
const warnings = [];
|
|
1082
|
+
if (options.sandboxEnforcement !== "full" && options.sandboxNoticeSeen !== true)
|
|
1083
|
+
warnings.push(`Sandbox is partial: allowed commands can write outside this folder ${g.sep} /permissions`);
|
|
1084
|
+
warnings.push(...options.warnings);
|
|
1085
|
+
if (warnings.length === 0)
|
|
1086
|
+
return { title, warning: undefined };
|
|
1087
|
+
const [first, ...rest] = warnings;
|
|
1088
|
+
return { title, warning: `${g.warn} ${first}${rest.length === 0 ? "" : ` ${g.sep} ${rest.length} more warning${rest.length === 1 ? "" : "s"} ${g.sep} syn doctor --runtime`}` };
|
|
1089
|
+
}
|
|
1090
|
+
/** `folder · branch · model · ctx 12% · quota 40%` (TUI §10.2, K0 subset). */
|
|
1091
|
+
export function footerText(footer, extra) {
|
|
1092
|
+
const g = extra.glyphs;
|
|
1093
|
+
return [
|
|
1094
|
+
extra.folder,
|
|
1095
|
+
extra.branch,
|
|
1096
|
+
footer.model === undefined ? undefined : footer.effort === undefined ? footer.model : `${footer.model} ${g.sep} ${footer.effort}`,
|
|
1097
|
+
extra.mode,
|
|
1098
|
+
footer.contextPercent === undefined ? undefined : `ctx ${footer.contextPercent}%`,
|
|
1099
|
+
footer.quotaPercent === undefined ? undefined : `quota ${footer.quotaPercent}%${footer.quotaProvider === undefined ? "" : ` ${footer.quotaProvider}`}`,
|
|
1100
|
+
footer.costUsd === undefined || footer.quotaPercent !== undefined ? undefined : `$${footer.costUsd.toFixed(2)}`,
|
|
1101
|
+
]
|
|
1102
|
+
.filter((part) => part !== undefined && part !== "")
|
|
1103
|
+
.join(` ${g.sep} `);
|
|
1104
|
+
}
|
|
1105
|
+
/** `⠼ Thinking… 14s · 2.1k tokens · esc to interrupt` (TUI §10.1). */
|
|
1106
|
+
export function activityText(activity, now, frame, glyphs) {
|
|
1107
|
+
const g = glyphs;
|
|
1108
|
+
const parts = [`${activity.waiting ? "?" : frame} ${activity.verb}${activity.detail === undefined ? "" : ` ${activity.detail}`}${g.name === "ascii" ? "..." : "…"}`, formatElapsed(now - activity.startedAt)];
|
|
1109
|
+
if (activity.tokens > 0)
|
|
1110
|
+
parts.push(`${formatTokens(activity.tokens)} tokens`);
|
|
1111
|
+
if (!activity.waiting)
|
|
1112
|
+
parts.push("esc to interrupt");
|
|
1113
|
+
return parts.join(` ${g.sep} `);
|
|
1114
|
+
}
|
|
1115
|
+
//# sourceMappingURL=conversation-view.js.map
|