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,709 @@
|
|
|
1
|
+
import { mkdir, readdir, readFile, rename, stat, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { parse as parseYaml } from "yaml";
|
|
4
|
+
import { ProjectDiscoveryService } from "../../application/project-discovery.js";
|
|
5
|
+
import { NodeFileSystem } from "../../infrastructure/file-system.js";
|
|
6
|
+
import { digestText } from "../contracts/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Zero-config project profile (onboarding): what the repository is built with, detected on session
|
|
9
|
+
* start without asking the user anything and without writing into the repository. The legacy
|
|
10
|
+
* `syn sync` discovery engine (`ProjectDiscoveryService.discoverRepository`) supplies languages,
|
|
11
|
+
* frameworks, package managers and per-module commands; this module adds workspace layout, the
|
|
12
|
+
* likely test/build/lint/typecheck/dev commands, test frameworks, conventions and repository size.
|
|
13
|
+
*
|
|
14
|
+
* The profile is cached in the user scope (`~/.synorch/projects/<project-id>/profile.json`) and
|
|
15
|
+
* recomputed only when a key file (manifests, lockfiles, workspace files) changed: a warm start
|
|
16
|
+
* costs a handful of `stat` calls, and the first model token never waits for a cold detection.
|
|
17
|
+
*/
|
|
18
|
+
export const PROFILE_SCHEMA_VERSION = 2;
|
|
19
|
+
/** Root files whose change invalidates the cached profile. */
|
|
20
|
+
const KEY_FILES = [
|
|
21
|
+
"package.json",
|
|
22
|
+
"pnpm-lock.yaml",
|
|
23
|
+
"pnpm-workspace.yaml",
|
|
24
|
+
"package-lock.json",
|
|
25
|
+
"yarn.lock",
|
|
26
|
+
"bun.lock",
|
|
27
|
+
"bun.lockb",
|
|
28
|
+
"nx.json",
|
|
29
|
+
"turbo.json",
|
|
30
|
+
"lerna.json",
|
|
31
|
+
"tsconfig.json",
|
|
32
|
+
"pom.xml",
|
|
33
|
+
"build.gradle",
|
|
34
|
+
"build.gradle.kts",
|
|
35
|
+
"settings.gradle",
|
|
36
|
+
"settings.gradle.kts",
|
|
37
|
+
"pyproject.toml",
|
|
38
|
+
"uv.lock",
|
|
39
|
+
"poetry.lock",
|
|
40
|
+
"requirements.txt",
|
|
41
|
+
"requirements-dev.txt",
|
|
42
|
+
"setup.py",
|
|
43
|
+
"Pipfile",
|
|
44
|
+
"Cargo.toml",
|
|
45
|
+
"go.mod",
|
|
46
|
+
"global.json",
|
|
47
|
+
"Directory.Build.props",
|
|
48
|
+
];
|
|
49
|
+
const CONVENTION_FILES = [
|
|
50
|
+
[/^(\.eslintrc(\..+)?|eslint\.config\.(js|mjs|cjs|ts))$/, "ESLint"],
|
|
51
|
+
[/^(\.prettierrc(\..+)?|prettier\.config\.(js|mjs|cjs))$/, "Prettier"],
|
|
52
|
+
[/^biome\.jsonc?$/, "Biome"],
|
|
53
|
+
[/^\.editorconfig$/, "EditorConfig"],
|
|
54
|
+
[/^\.husky$/, "Husky git hooks"],
|
|
55
|
+
[/^(commitlint\.config\.(js|cjs|mjs|ts)|\.commitlintrc(\..+)?)$/, "Commitlint (conventional commits)"],
|
|
56
|
+
[/^(ruff\.toml|\.ruff\.toml)$/, "Ruff"],
|
|
57
|
+
[/^(mypy\.ini|\.mypy\.ini)$/, "mypy"],
|
|
58
|
+
[/^\.python-version$/, "pinned Python version (.python-version)"],
|
|
59
|
+
[/^(\.nvmrc|\.node-version)$/, "pinned Node version"],
|
|
60
|
+
[/^checkstyle\.xml$/, "Checkstyle"],
|
|
61
|
+
[/^\.golangci\.ya?ml$/, "golangci-lint"],
|
|
62
|
+
[/^(rustfmt\.toml|\.rustfmt\.toml)$/, "rustfmt"],
|
|
63
|
+
[/^\.pre-commit-config\.yaml$/, "pre-commit hooks"],
|
|
64
|
+
];
|
|
65
|
+
/** Directories never walked: generated output, dependencies, VCS and tool state, virtualenvs. */
|
|
66
|
+
function ignoredDirectory(name) {
|
|
67
|
+
return (name.startsWith(".") ||
|
|
68
|
+
name === "node_modules" ||
|
|
69
|
+
name === "__pycache__" ||
|
|
70
|
+
name === "venv" ||
|
|
71
|
+
name === "env" ||
|
|
72
|
+
name === "vendor" ||
|
|
73
|
+
name === "target" ||
|
|
74
|
+
name === "dist" ||
|
|
75
|
+
name === "build" ||
|
|
76
|
+
name === "out" ||
|
|
77
|
+
name === "coverage" ||
|
|
78
|
+
name === "bin" ||
|
|
79
|
+
name === "obj");
|
|
80
|
+
}
|
|
81
|
+
const FILE_COUNT_CAP = 20_000;
|
|
82
|
+
async function readText(file) {
|
|
83
|
+
try {
|
|
84
|
+
const info = await stat(file);
|
|
85
|
+
if (!info.isFile() || info.size > 2 * 1024 * 1024)
|
|
86
|
+
return undefined;
|
|
87
|
+
return await readFile(file, "utf8");
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function exists(file) {
|
|
94
|
+
return stat(file).then(() => true, () => false);
|
|
95
|
+
}
|
|
96
|
+
function asRecord(value) {
|
|
97
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
|
|
98
|
+
}
|
|
99
|
+
function parseJson(text) {
|
|
100
|
+
if (text === undefined)
|
|
101
|
+
return undefined;
|
|
102
|
+
try {
|
|
103
|
+
return asRecord(JSON.parse(text));
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function sortedUnique(values) {
|
|
110
|
+
return [...new Set(values.filter((value) => value !== ""))].sort((left, right) => left.localeCompare(right));
|
|
111
|
+
}
|
|
112
|
+
function toPosix(value) {
|
|
113
|
+
return value.replaceAll("\\", "/");
|
|
114
|
+
}
|
|
115
|
+
/** Fingerprint of the watched files: path, size and mtime (a missing file counts too). */
|
|
116
|
+
export async function fingerprintOf(root, files) {
|
|
117
|
+
const parts = [];
|
|
118
|
+
for (const file of [...new Set(files)].sort()) {
|
|
119
|
+
const info = await stat(path.join(root, file)).catch(() => undefined);
|
|
120
|
+
parts.push(`${file}:${info === undefined ? "-" : `${info.size}:${Math.round(info.mtimeMs)}`}`);
|
|
121
|
+
}
|
|
122
|
+
return digestText(parts.join("\n"));
|
|
123
|
+
}
|
|
124
|
+
/** Expands simple workspace globs (`packages/*`, `apps/**`, `libs/core`) to directories holding `marker`. */
|
|
125
|
+
async function expandGlobs(root, patterns, marker) {
|
|
126
|
+
const found = new Set();
|
|
127
|
+
const walk = async (base, segments) => {
|
|
128
|
+
if (segments.length === 0) {
|
|
129
|
+
if (await exists(path.join(root, base, marker)))
|
|
130
|
+
found.add(toPosix(base));
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const [head, ...rest] = segments;
|
|
134
|
+
if (head === undefined)
|
|
135
|
+
return;
|
|
136
|
+
if (head === "**") {
|
|
137
|
+
await walk(base, rest);
|
|
138
|
+
if (base.split("/").length > 4)
|
|
139
|
+
return;
|
|
140
|
+
for (const child of await subdirectories(path.join(root, base)))
|
|
141
|
+
await walk(base === "" ? child : `${base}/${child}`, segments);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (head.includes("*")) {
|
|
145
|
+
const pattern = new RegExp(`^${head.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*")}$`);
|
|
146
|
+
for (const child of await subdirectories(path.join(root, base)))
|
|
147
|
+
if (pattern.test(child))
|
|
148
|
+
await walk(base === "" ? child : `${base}/${child}`, rest);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
await walk(base === "" ? head : `${base}/${head}`, rest);
|
|
152
|
+
};
|
|
153
|
+
for (const raw of patterns) {
|
|
154
|
+
if (raw.startsWith("!"))
|
|
155
|
+
continue;
|
|
156
|
+
const pattern = toPosix(raw).replace(/^\.\//, "").replace(/\/+$/, "");
|
|
157
|
+
if (pattern === "" || pattern.includes(".."))
|
|
158
|
+
continue;
|
|
159
|
+
await walk("", pattern.split("/"));
|
|
160
|
+
}
|
|
161
|
+
return [...found].sort();
|
|
162
|
+
}
|
|
163
|
+
async function subdirectories(directory) {
|
|
164
|
+
const entries = await readdir(directory, { withFileTypes: true }).catch(() => []);
|
|
165
|
+
return entries.filter((entry) => entry.isDirectory() && !ignoredDirectory(entry.name)).map((entry) => entry.name).sort();
|
|
166
|
+
}
|
|
167
|
+
async function packageNames(root, directories, manifest) {
|
|
168
|
+
const packages = [];
|
|
169
|
+
for (const directory of directories) {
|
|
170
|
+
const text = await readText(path.join(root, directory, manifest));
|
|
171
|
+
let name;
|
|
172
|
+
if (manifest === "package.json")
|
|
173
|
+
name = typeof parseJson(text)?.name === "string" ? String(parseJson(text)?.name) : undefined;
|
|
174
|
+
else if (manifest === "pom.xml")
|
|
175
|
+
name = /<artifactId>\s*([^<\s]+)\s*<\/artifactId>/.exec((text ?? "").replace(/<parent>[\s\S]*?<\/parent>/, ""))?.[1];
|
|
176
|
+
else
|
|
177
|
+
name = /^\s*name\s*=\s*["']([^"']+)["']/m.exec(text ?? "")?.[1];
|
|
178
|
+
packages.push({ name: name ?? path.posix.basename(directory), path: directory });
|
|
179
|
+
}
|
|
180
|
+
return packages;
|
|
181
|
+
}
|
|
182
|
+
async function detectWorkspace(root, packageJson, packageManager, record) {
|
|
183
|
+
const tools = [(await exists(path.join(root, "nx.json"))) ? "nx" : "", (await exists(path.join(root, "turbo.json"))) ? "turbo" : "", (await exists(path.join(root, "lerna.json"))) ? "lerna" : ""].filter((tool) => tool !== "");
|
|
184
|
+
const withTools = (kind) => (tools.length === 0 ? kind : `${kind} + ${tools.join(" + ")}`);
|
|
185
|
+
const pnpmWorkspace = await readText(path.join(root, "pnpm-workspace.yaml"));
|
|
186
|
+
if (pnpmWorkspace !== undefined) {
|
|
187
|
+
let patterns = [];
|
|
188
|
+
try {
|
|
189
|
+
const parsed = asRecord(parseYaml(pnpmWorkspace));
|
|
190
|
+
patterns = Array.isArray(parsed.packages) ? parsed.packages.filter((item) => typeof item === "string") : [];
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
patterns = [];
|
|
194
|
+
}
|
|
195
|
+
const directories = await expandGlobs(root, patterns, "package.json");
|
|
196
|
+
return { kind: withTools("pnpm workspaces"), packages: await packageNames(root, directories, "package.json"), watched: directories.map((directory) => `${directory}/package.json`) };
|
|
197
|
+
}
|
|
198
|
+
const declared = packageJson?.workspaces;
|
|
199
|
+
const npmPatterns = Array.isArray(declared) ? declared : Array.isArray(asRecord(declared).packages) ? asRecord(declared).packages : undefined;
|
|
200
|
+
if (npmPatterns !== undefined) {
|
|
201
|
+
const directories = await expandGlobs(root, npmPatterns.filter((item) => typeof item === "string"), "package.json");
|
|
202
|
+
const label = packageManager === "yarn" ? "yarn workspaces" : packageManager === "bun" ? "bun workspaces" : "npm workspaces";
|
|
203
|
+
return { kind: withTools(label), packages: await packageNames(root, directories, "package.json"), watched: directories.map((directory) => `${directory}/package.json`) };
|
|
204
|
+
}
|
|
205
|
+
if (tools.length > 0 && record !== undefined) {
|
|
206
|
+
const directories = record.modules.filter((module) => module.path !== "." && module.manifests.some((file) => file.endsWith("package.json"))).map((module) => module.path);
|
|
207
|
+
return { kind: tools.join(" + "), packages: await packageNames(root, directories, "package.json"), watched: directories.map((directory) => `${directory}/package.json`) };
|
|
208
|
+
}
|
|
209
|
+
const pom = await readText(path.join(root, "pom.xml"));
|
|
210
|
+
if (pom !== undefined) {
|
|
211
|
+
const block = /<modules>([\s\S]*?)<\/modules>/.exec(pom.replace(/<!--[\s\S]*?-->/g, ""))?.[1];
|
|
212
|
+
if (block !== undefined) {
|
|
213
|
+
const directories = [...block.matchAll(/<module>\s*([^<]+?)\s*<\/module>/g)].map((match) => toPosix(match[1] ?? "")).filter((directory) => directory !== "" && !directory.includes(".."));
|
|
214
|
+
return { kind: "maven modules", packages: await packageNames(root, directories, "pom.xml"), watched: directories.map((directory) => `${directory}/pom.xml`) };
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const settings = (await readText(path.join(root, "settings.gradle.kts"))) ?? (await readText(path.join(root, "settings.gradle")));
|
|
218
|
+
if (settings !== undefined) {
|
|
219
|
+
const includes = [...settings.matchAll(/include\s*\(?([^)\n]+)\)?/g)].flatMap((match) => [...(match[1] ?? "").matchAll(/["']:?([^"']+)["']/g)].map((item) => (item[1] ?? "").replaceAll(":", "/")));
|
|
220
|
+
if (includes.length > 0)
|
|
221
|
+
return { kind: "gradle multi-project", packages: includes.map((include) => ({ name: path.posix.basename(include), path: include })), watched: [] };
|
|
222
|
+
}
|
|
223
|
+
const cargo = await readText(path.join(root, "Cargo.toml"));
|
|
224
|
+
if (cargo !== undefined && /^\s*\[workspace\]/m.test(cargo)) {
|
|
225
|
+
const members = /members\s*=\s*\[([\s\S]*?)\]/.exec(cargo)?.[1] ?? "";
|
|
226
|
+
const directories = await expandGlobs(root, [...members.matchAll(/["']([^"']+)["']/g)].map((match) => match[1] ?? ""), "Cargo.toml");
|
|
227
|
+
return { kind: "cargo workspace", packages: await packageNames(root, directories, "Cargo.toml"), watched: directories.map((directory) => `${directory}/Cargo.toml`) };
|
|
228
|
+
}
|
|
229
|
+
const pyproject = await readText(path.join(root, "pyproject.toml"));
|
|
230
|
+
if (pyproject !== undefined && /^\s*\[tool\.uv\.workspace\]/m.test(pyproject)) {
|
|
231
|
+
const members = /\[tool\.uv\.workspace\][\s\S]*?members\s*=\s*\[([\s\S]*?)\]/.exec(pyproject)?.[1] ?? "";
|
|
232
|
+
const directories = await expandGlobs(root, [...members.matchAll(/["']([^"']+)["']/g)].map((match) => match[1] ?? ""), "pyproject.toml");
|
|
233
|
+
return { kind: "uv workspace", packages: await packageNames(root, directories, "pyproject.toml"), watched: directories.map((directory) => `${directory}/pyproject.toml`) };
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
function scriptCommand(packageManager, script) {
|
|
238
|
+
if (packageManager === "npm")
|
|
239
|
+
return script === "test" || script === "start" ? `npm ${script}` : `npm run ${script}`;
|
|
240
|
+
if (packageManager === "bun")
|
|
241
|
+
return `bun run ${script}`;
|
|
242
|
+
return `${packageManager} ${script}`;
|
|
243
|
+
}
|
|
244
|
+
const SCRIPT_ALIASES = {
|
|
245
|
+
test: ["test", "test:unit", "tests"],
|
|
246
|
+
build: ["build", "compile"],
|
|
247
|
+
lint: ["lint", "lint:check", "eslint"],
|
|
248
|
+
typecheck: ["typecheck", "type-check", "check-types", "types", "tsc"],
|
|
249
|
+
dev: ["dev", "start", "serve", "develop"],
|
|
250
|
+
format: ["format", "fmt", "prettier"],
|
|
251
|
+
check: ["check", "verify", "validate", "ci"],
|
|
252
|
+
};
|
|
253
|
+
function pythonRunner(packageManager) {
|
|
254
|
+
return packageManager === "uv" ? "uv run " : packageManager === "poetry" ? "poetry run " : packageManager === "pip" ? "python -m " : "";
|
|
255
|
+
}
|
|
256
|
+
/** Detects the profile of `root` from scratch (no cache). Never throws for a readable directory. */
|
|
257
|
+
export async function detectProjectProfile(workspaceRoot) {
|
|
258
|
+
const root = path.resolve(workspaceRoot);
|
|
259
|
+
const discovery = new ProjectDiscoveryService(new NodeFileSystem(), { ignoreDirectory: ignoredDirectory });
|
|
260
|
+
let record;
|
|
261
|
+
try {
|
|
262
|
+
record = (await discovery.discoverRepository(root));
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
record = (await discovery.discoverRepository(root, { shallow: true }).catch(() => undefined));
|
|
266
|
+
}
|
|
267
|
+
const rootEntries = await readdir(root, { withFileTypes: true }).catch(() => []);
|
|
268
|
+
const rootNames = new Set(rootEntries.map((entry) => entry.name));
|
|
269
|
+
const packageJsonText = await readText(path.join(root, "package.json"));
|
|
270
|
+
const packageJson = parseJson(packageJsonText);
|
|
271
|
+
const scripts = Object.fromEntries(Object.entries(asRecord(packageJson?.scripts)).filter((entry) => typeof entry[1] === "string"));
|
|
272
|
+
const pythonText = [await readText(path.join(root, "pyproject.toml")), await readText(path.join(root, "requirements.txt")), await readText(path.join(root, "requirements-dev.txt")), await readText(path.join(root, "Pipfile"))]
|
|
273
|
+
.filter((text) => text !== undefined)
|
|
274
|
+
.join("\n")
|
|
275
|
+
.toLowerCase();
|
|
276
|
+
const hasPython = pythonText !== "" || rootNames.has("setup.py");
|
|
277
|
+
const dotnet = rootEntries.some((entry) => /\.(sln|csproj|fsproj)$/i.test(entry.name));
|
|
278
|
+
const rootModule = record?.modules.find((module) => module.path === ".");
|
|
279
|
+
let packageManager = rootModule?.stack.package_manager ?? null;
|
|
280
|
+
if (packageManager === null && packageJson !== undefined)
|
|
281
|
+
packageManager = "npm";
|
|
282
|
+
if (packageManager === null) {
|
|
283
|
+
if (rootNames.has("pom.xml"))
|
|
284
|
+
packageManager = "maven";
|
|
285
|
+
else if (rootNames.has("build.gradle") || rootNames.has("build.gradle.kts") || rootNames.has("settings.gradle") || rootNames.has("settings.gradle.kts"))
|
|
286
|
+
packageManager = "gradle";
|
|
287
|
+
else if (rootNames.has("uv.lock") || /\[tool\.uv/.test(pythonText))
|
|
288
|
+
packageManager = "uv";
|
|
289
|
+
else if (rootNames.has("poetry.lock") || /\[tool\.poetry/.test(pythonText))
|
|
290
|
+
packageManager = "poetry";
|
|
291
|
+
else if (hasPython)
|
|
292
|
+
packageManager = "pip";
|
|
293
|
+
else if (rootNames.has("Cargo.toml"))
|
|
294
|
+
packageManager = "cargo";
|
|
295
|
+
else if (rootNames.has("go.mod"))
|
|
296
|
+
packageManager = "go";
|
|
297
|
+
else if (dotnet)
|
|
298
|
+
packageManager = "dotnet";
|
|
299
|
+
else
|
|
300
|
+
packageManager = record?.stack.package_manager ?? null;
|
|
301
|
+
}
|
|
302
|
+
const languages = new Set(record?.stack.languages ?? []);
|
|
303
|
+
const frameworks = new Set(record?.stack.frameworks ?? []);
|
|
304
|
+
if (hasPython)
|
|
305
|
+
languages.add("python");
|
|
306
|
+
if (dotnet)
|
|
307
|
+
languages.add("csharp");
|
|
308
|
+
const dependencies = new Set((record?.evidence ?? []).filter((item) => item.kind === "dependency").map((item) => item.value.toLowerCase()));
|
|
309
|
+
for (const [needle, name] of [
|
|
310
|
+
["django", "django"],
|
|
311
|
+
["fastapi", "fastapi"],
|
|
312
|
+
["flask", "flask"],
|
|
313
|
+
]) {
|
|
314
|
+
if (new RegExp(`["'\\s^]${needle}\\b`, "m").test(pythonText))
|
|
315
|
+
frameworks.add(name);
|
|
316
|
+
}
|
|
317
|
+
for (const [dependency, name] of [
|
|
318
|
+
["svelte", "svelte"],
|
|
319
|
+
["@sveltejs/kit", "sveltekit"],
|
|
320
|
+
["vite", "vite"],
|
|
321
|
+
["astro", "astro"],
|
|
322
|
+
["@remix-run/react", "remix"],
|
|
323
|
+
["electron", "electron"],
|
|
324
|
+
["hono", "hono"],
|
|
325
|
+
["koa", "koa"],
|
|
326
|
+
]) {
|
|
327
|
+
if (dependencies.has(dependency))
|
|
328
|
+
frameworks.add(name);
|
|
329
|
+
}
|
|
330
|
+
const testFrameworks = new Set();
|
|
331
|
+
for (const [dependency, name] of [
|
|
332
|
+
["vitest", "vitest"],
|
|
333
|
+
["jest", "jest"],
|
|
334
|
+
["mocha", "mocha"],
|
|
335
|
+
["ava", "ava"],
|
|
336
|
+
["@playwright/test", "playwright"],
|
|
337
|
+
["cypress", "cypress"],
|
|
338
|
+
["org.junit.jupiter:junit-jupiter", "junit5"],
|
|
339
|
+
["org.junit.jupiter:junit-jupiter-api", "junit5"],
|
|
340
|
+
["junit:junit", "junit4"],
|
|
341
|
+
["org.testng:testng", "testng"],
|
|
342
|
+
["org.springframework.boot:spring-boot-starter-test", "junit5"],
|
|
343
|
+
]) {
|
|
344
|
+
if (dependencies.has(dependency))
|
|
345
|
+
testFrameworks.add(name);
|
|
346
|
+
}
|
|
347
|
+
if (Object.values(scripts).some((script) => /\bnode\b[^&|;]*--test\b/.test(script)))
|
|
348
|
+
testFrameworks.add("node:test");
|
|
349
|
+
if (/\bpytest\b/.test(pythonText))
|
|
350
|
+
testFrameworks.add("pytest");
|
|
351
|
+
if (languages.has("rust"))
|
|
352
|
+
testFrameworks.add("cargo test");
|
|
353
|
+
if (languages.has("go"))
|
|
354
|
+
testFrameworks.add("go test");
|
|
355
|
+
const workspace = await detectWorkspace(root, packageJson, packageManager, record);
|
|
356
|
+
const commands = {};
|
|
357
|
+
const set = (name, command, source) => {
|
|
358
|
+
if (commands[name] === undefined)
|
|
359
|
+
commands[name] = { command, source };
|
|
360
|
+
};
|
|
361
|
+
if (packageJson !== undefined && packageManager !== null && ["pnpm", "npm", "yarn", "bun"].includes(packageManager)) {
|
|
362
|
+
for (const [name, aliases] of Object.entries(SCRIPT_ALIASES)) {
|
|
363
|
+
const script = aliases.find((alias) => scripts[alias] !== undefined);
|
|
364
|
+
if (script !== undefined)
|
|
365
|
+
set(name, scriptCommand(packageManager, script), `package.json scripts.${script}`);
|
|
366
|
+
}
|
|
367
|
+
if (commands.test === undefined && workspace !== null && workspace.packages.length > 0) {
|
|
368
|
+
if (packageManager === "pnpm")
|
|
369
|
+
set("test", "pnpm -r test", "pnpm workspaces (no root test script)");
|
|
370
|
+
else if (packageManager === "npm")
|
|
371
|
+
set("test", "npm test --workspaces --if-present", "npm workspaces (no root test script)");
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
for (const [name, value] of Object.entries(rootModule?.commands ?? {})) {
|
|
375
|
+
if (name === "test" || name === "build")
|
|
376
|
+
set(name, value.value, value.source);
|
|
377
|
+
}
|
|
378
|
+
if (languages.has("java") && (packageManager === "maven" || packageManager === "gradle")) {
|
|
379
|
+
const maven = packageManager === "maven";
|
|
380
|
+
const wrapper = maven ? (rootNames.has("mvnw") ? "./mvnw" : "mvn") : rootNames.has("gradlew") ? "./gradlew" : "gradle";
|
|
381
|
+
set("test", `${wrapper} test`, maven ? "pom.xml" : "build.gradle");
|
|
382
|
+
set("build", maven ? `${wrapper} verify` : `${wrapper} build`, maven ? "pom.xml" : "build.gradle");
|
|
383
|
+
if (frameworks.has("spring-boot"))
|
|
384
|
+
set("dev", maven ? `${wrapper} spring-boot:run` : `${wrapper} bootRun`, "spring-boot");
|
|
385
|
+
}
|
|
386
|
+
if (packageManager === "cargo" || languages.has("rust")) {
|
|
387
|
+
set("test", "cargo test", "Cargo.toml");
|
|
388
|
+
set("build", "cargo build", "Cargo.toml");
|
|
389
|
+
set("lint", "cargo clippy", "Cargo.toml");
|
|
390
|
+
set("format", "cargo fmt", "Cargo.toml");
|
|
391
|
+
}
|
|
392
|
+
if (packageManager === "go" || languages.has("go")) {
|
|
393
|
+
set("test", "go test ./...", "go.mod");
|
|
394
|
+
set("build", "go build ./...", "go.mod");
|
|
395
|
+
set("lint", rootNames.has(".golangci.yml") || rootNames.has(".golangci.yaml") ? "golangci-lint run" : "go vet ./...", "go.mod");
|
|
396
|
+
}
|
|
397
|
+
if (hasPython) {
|
|
398
|
+
const run = pythonRunner(packageManager);
|
|
399
|
+
const source = rootNames.has("pyproject.toml") ? "pyproject.toml" : "requirements.txt";
|
|
400
|
+
if (testFrameworks.has("pytest"))
|
|
401
|
+
set("test", `${run}pytest`, source);
|
|
402
|
+
if (/\bruff\b/.test(pythonText) || rootNames.has("ruff.toml")) {
|
|
403
|
+
set("lint", `${run}ruff check .`, source);
|
|
404
|
+
set("format", `${run}ruff format .`, source);
|
|
405
|
+
}
|
|
406
|
+
if (/\bmypy\b/.test(pythonText))
|
|
407
|
+
set("typecheck", `${run}mypy .`, source);
|
|
408
|
+
else if (/\bpyright\b/.test(pythonText))
|
|
409
|
+
set("typecheck", `${run}pyright`, source);
|
|
410
|
+
if (/\bblack\b/.test(pythonText))
|
|
411
|
+
set("format", `${run}black .`, source);
|
|
412
|
+
if (frameworks.has("django") && rootNames.has("manage.py"))
|
|
413
|
+
set("dev", `${run === "python -m " || run === "" ? "" : run}python manage.py runserver`, "manage.py");
|
|
414
|
+
}
|
|
415
|
+
if (dotnet) {
|
|
416
|
+
set("test", "dotnet test", "*.sln / *.csproj");
|
|
417
|
+
set("build", "dotnet build", "*.sln / *.csproj");
|
|
418
|
+
}
|
|
419
|
+
if (commands.typecheck === undefined && languages.has("typescript") && packageManager !== null && ["pnpm", "npm", "yarn", "bun"].includes(packageManager) && rootNames.has("tsconfig.json")) {
|
|
420
|
+
set("typecheck", packageManager === "npm" ? "npx tsc --noEmit" : `${packageManager === "bun" ? "bunx" : `${packageManager} exec`} tsc --noEmit`, "tsconfig.json");
|
|
421
|
+
}
|
|
422
|
+
const conventions = [];
|
|
423
|
+
for (const name of [...rootNames].sort()) {
|
|
424
|
+
for (const [pattern, label] of CONVENTION_FILES)
|
|
425
|
+
if (label !== "" && pattern.test(name))
|
|
426
|
+
conventions.push(label);
|
|
427
|
+
}
|
|
428
|
+
if (packageJson !== undefined) {
|
|
429
|
+
if (packageJson.type === "module")
|
|
430
|
+
conventions.push("ES modules (package.json type: module)");
|
|
431
|
+
const engines = asRecord(packageJson.engines);
|
|
432
|
+
if (typeof engines.node === "string")
|
|
433
|
+
conventions.push(`Node ${engines.node}`);
|
|
434
|
+
if (packageJson.prettier !== undefined)
|
|
435
|
+
conventions.push("Prettier");
|
|
436
|
+
if (packageJson["lint-staged"] !== undefined)
|
|
437
|
+
conventions.push("lint-staged");
|
|
438
|
+
if (typeof packageJson.packageManager === "string")
|
|
439
|
+
conventions.push(`packageManager ${packageJson.packageManager}`);
|
|
440
|
+
}
|
|
441
|
+
const tsconfig = await readText(path.join(root, "tsconfig.json"));
|
|
442
|
+
if (tsconfig !== undefined)
|
|
443
|
+
conventions.push(/"strict"\s*:\s*true/.test(tsconfig) ? "TypeScript strict mode" : "TypeScript (tsconfig.json)");
|
|
444
|
+
if (/\[tool\.ruff/.test(pythonText))
|
|
445
|
+
conventions.push("Ruff");
|
|
446
|
+
if (/\[tool\.black/.test(pythonText))
|
|
447
|
+
conventions.push("Black");
|
|
448
|
+
if (/\[tool\.mypy/.test(pythonText))
|
|
449
|
+
conventions.push("mypy");
|
|
450
|
+
const keyDirectories = rootEntries.filter((entry) => entry.isDirectory() && !ignoredDirectory(entry.name)).map((entry) => entry.name).sort();
|
|
451
|
+
const repo = await countFiles(root);
|
|
452
|
+
const watched = sortedUnique([...KEY_FILES, ...(workspace?.watched ?? [])]);
|
|
453
|
+
return {
|
|
454
|
+
schema_version: PROFILE_SCHEMA_VERSION,
|
|
455
|
+
root,
|
|
456
|
+
computed_at: new Date().toISOString(),
|
|
457
|
+
fingerprint: await fingerprintOf(root, watched),
|
|
458
|
+
watched,
|
|
459
|
+
languages: sortedUnique([...languages]),
|
|
460
|
+
frameworks: sortedUnique([...frameworks]),
|
|
461
|
+
packageManager,
|
|
462
|
+
workspace: workspace === null ? null : { kind: workspace.kind, packages: workspace.packages },
|
|
463
|
+
commands,
|
|
464
|
+
scripts: Object.keys(scripts).sort(),
|
|
465
|
+
testFrameworks: sortedUnique([...testFrameworks]),
|
|
466
|
+
conventions: sortedUnique(conventions),
|
|
467
|
+
keyDirectories,
|
|
468
|
+
manifests: sortedUnique(record?.manifests ?? []).slice(0, 60),
|
|
469
|
+
repo,
|
|
470
|
+
git: record?.repository.git ?? rootNames.has(".git"),
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
async function countFiles(root) {
|
|
474
|
+
let files = 0;
|
|
475
|
+
const queue = [root];
|
|
476
|
+
while (queue.length > 0 && files < FILE_COUNT_CAP) {
|
|
477
|
+
const directory = queue.shift();
|
|
478
|
+
if (directory === undefined)
|
|
479
|
+
break;
|
|
480
|
+
const entries = await readdir(directory, { withFileTypes: true }).catch(() => []);
|
|
481
|
+
for (const entry of entries) {
|
|
482
|
+
if (entry.isDirectory()) {
|
|
483
|
+
if (!ignoredDirectory(entry.name))
|
|
484
|
+
queue.push(path.join(directory, entry.name));
|
|
485
|
+
}
|
|
486
|
+
else
|
|
487
|
+
files += 1;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
const capped = files >= FILE_COUNT_CAP;
|
|
491
|
+
return { files, capped, size: files < 500 ? "small" : files < 5_000 && !capped ? "medium" : "large" };
|
|
492
|
+
}
|
|
493
|
+
// ---- rendering -----------------------------------------------------------------------------------
|
|
494
|
+
const LANGUAGE_LABELS = {
|
|
495
|
+
javascript: "JS",
|
|
496
|
+
typescript: "TS",
|
|
497
|
+
java: "Java",
|
|
498
|
+
python: "Python",
|
|
499
|
+
rust: "Rust",
|
|
500
|
+
go: "Go",
|
|
501
|
+
csharp: "C#",
|
|
502
|
+
};
|
|
503
|
+
/** `Node/TS`, `Java`, `Python`: the stack in two or three words. */
|
|
504
|
+
export function stackLabel(profile) {
|
|
505
|
+
const labels = [];
|
|
506
|
+
if (profile.languages.includes("typescript"))
|
|
507
|
+
labels.push("Node/TS");
|
|
508
|
+
else if (profile.languages.includes("javascript"))
|
|
509
|
+
labels.push("Node/JS");
|
|
510
|
+
for (const language of profile.languages) {
|
|
511
|
+
if (language === "typescript" || language === "javascript")
|
|
512
|
+
continue;
|
|
513
|
+
labels.push(LANGUAGE_LABELS[language] ?? language);
|
|
514
|
+
}
|
|
515
|
+
return labels.length === 0 ? "no recognized stack" : labels.join(" + ");
|
|
516
|
+
}
|
|
517
|
+
function workspaceLabel(profile) {
|
|
518
|
+
if (profile.workspace === null)
|
|
519
|
+
return profile.packageManager ?? undefined;
|
|
520
|
+
const count = profile.workspace.packages.length;
|
|
521
|
+
return `${profile.workspace.kind}${count === 0 ? "" : ` (${count} package${count === 1 ? "" : "s"})`}`;
|
|
522
|
+
}
|
|
523
|
+
/** `Synorch ready · Node/TS · pnpm workspaces (4 packages) · tests: pnpm test`. */
|
|
524
|
+
export function profileHeaderLine(profile, sep = "·") {
|
|
525
|
+
const parts = ["Synorch ready", stackLabel(profile)];
|
|
526
|
+
const layout = workspaceLabel(profile);
|
|
527
|
+
if (layout !== undefined)
|
|
528
|
+
parts.push(layout);
|
|
529
|
+
if (profile.commands.test !== undefined)
|
|
530
|
+
parts.push(`tests: ${profile.commands.test.command}`);
|
|
531
|
+
return parts.join(` ${sep} `);
|
|
532
|
+
}
|
|
533
|
+
/** Human lines for `/context`, `syn doctor --runtime` and `/init`. */
|
|
534
|
+
export function profileSummaryLines(profile) {
|
|
535
|
+
const lines = [
|
|
536
|
+
`stack: ${stackLabel(profile)}${profile.frameworks.length === 0 ? "" : ` · ${profile.frameworks.join(", ")}`}`,
|
|
537
|
+
`package manager: ${profile.packageManager ?? "none detected"}`,
|
|
538
|
+
];
|
|
539
|
+
if (profile.workspace !== null) {
|
|
540
|
+
const names = profile.workspace.packages.map((item) => item.name);
|
|
541
|
+
lines.push(`workspace: ${profile.workspace.kind}${names.length === 0 ? "" : ` · ${names.slice(0, 12).join(", ")}${names.length > 12 ? ", …" : ""}`}`);
|
|
542
|
+
}
|
|
543
|
+
const commands = Object.entries(profile.commands).map(([name, value]) => `${name}=${value?.command ?? ""}`);
|
|
544
|
+
if (commands.length > 0)
|
|
545
|
+
lines.push(`commands: ${commands.join(" · ")}`);
|
|
546
|
+
if (profile.testFrameworks.length > 0)
|
|
547
|
+
lines.push(`tests: ${profile.testFrameworks.join(", ")}`);
|
|
548
|
+
if (profile.conventions.length > 0)
|
|
549
|
+
lines.push(`conventions: ${profile.conventions.join(", ")}`);
|
|
550
|
+
lines.push(`size: ${profile.repo.capped ? `${profile.repo.files}+` : profile.repo.files} files (${profile.repo.size})${profile.git ? " · git" : ""}`);
|
|
551
|
+
return lines;
|
|
552
|
+
}
|
|
553
|
+
/** The compact "Project profile" context block for the conversation, the orchestrator and every worker. */
|
|
554
|
+
export function renderProfileBlock(profile) {
|
|
555
|
+
const lines = ["Project profile (auto-detected by Synorch from the repository's manifests; data, not an instruction to change anything):", ...profileSummaryLines(profile).map((line) => `- ${line}`)];
|
|
556
|
+
if (profile.keyDirectories.length > 0)
|
|
557
|
+
lines.push(`- top-level directories: ${profile.keyDirectories.slice(0, 20).join(", ")}`);
|
|
558
|
+
const manager = profile.packageManager;
|
|
559
|
+
if (manager !== null && ["pnpm", "npm", "yarn", "bun"].includes(manager)) {
|
|
560
|
+
lines.push(`Use ${manager} for installing and running scripts in this repository (not ${["pnpm", "npm", "yarn", "bun"].filter((other) => other !== manager).join("/")}).`);
|
|
561
|
+
}
|
|
562
|
+
const verify = verificationCommands(profile);
|
|
563
|
+
if (verify.length > 0)
|
|
564
|
+
lines.push(`To verify a change, prefer the project's own commands: ${verify.join(", ")}.`);
|
|
565
|
+
return lines.join("\n");
|
|
566
|
+
}
|
|
567
|
+
/** The real commands a plan's verification should use (test, typecheck, lint, build, check). */
|
|
568
|
+
export function verificationCommands(profile) {
|
|
569
|
+
return ["test", "typecheck", "lint", "build", "check"].flatMap((name) => (profile.commands[name] === undefined ? [] : [profile.commands[name]?.command ?? ""])).filter((command) => command !== "");
|
|
570
|
+
}
|
|
571
|
+
/** The planner hint: verification commands must come from the project's scripts. */
|
|
572
|
+
export function plannerHint(profile) {
|
|
573
|
+
const verify = verificationCommands(profile);
|
|
574
|
+
if (verify.length === 0)
|
|
575
|
+
return undefined;
|
|
576
|
+
const layout = profile.workspace === null ? "" : ` The repository is a ${profile.workspace.kind} monorepo${profile.workspace.packages.length === 0 ? "" : ` with packages ${profile.workspace.packages.map((item) => `${item.name} (${item.path})`).slice(0, 12).join(", ")}`}.`;
|
|
577
|
+
return `Project commands detected from the repository (use these exact commands in task verification; do not invent scripts that do not exist): ${verify.join(" · ")}.${profile.packageManager === null ? "" : ` Package manager: ${profile.packageManager}.`}${layout}`;
|
|
578
|
+
}
|
|
579
|
+
async function readCache(file, root) {
|
|
580
|
+
const parsed = parseJson(await readText(file));
|
|
581
|
+
if (parsed === undefined || parsed.schema_version !== PROFILE_SCHEMA_VERSION || parsed.root !== root || !Array.isArray(parsed.watched))
|
|
582
|
+
return undefined;
|
|
583
|
+
return parsed;
|
|
584
|
+
}
|
|
585
|
+
async function writeCache(file, profile) {
|
|
586
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
587
|
+
const temporary = `${file}.${process.pid}.tmp`;
|
|
588
|
+
await writeFile(temporary, `${JSON.stringify(profile, null, 2)}\n`, "utf8");
|
|
589
|
+
await rename(temporary, file);
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Starts loading the profile of `workspaceRoot` in the background: the cached profile first (fast),
|
|
593
|
+
* then a fingerprint check and, only when a key file changed, a new detection written back to the
|
|
594
|
+
* user-scope cache. Nothing is written into the repository.
|
|
595
|
+
*/
|
|
596
|
+
export function startProjectProfile(home, projectId, workspaceRoot) {
|
|
597
|
+
const root = path.resolve(workspaceRoot);
|
|
598
|
+
const file = path.join(home, "projects", projectId, "profile.json");
|
|
599
|
+
let latest;
|
|
600
|
+
const detect = async () => {
|
|
601
|
+
const fresh = await detectProjectProfile(root).catch(() => undefined);
|
|
602
|
+
if (fresh === undefined)
|
|
603
|
+
return latest;
|
|
604
|
+
latest = fresh;
|
|
605
|
+
await writeCache(file, fresh).catch(() => undefined);
|
|
606
|
+
return fresh;
|
|
607
|
+
};
|
|
608
|
+
const ready = (async () => {
|
|
609
|
+
const cached = await readCache(file, root).catch(() => undefined);
|
|
610
|
+
if (cached !== undefined) {
|
|
611
|
+
latest = cached;
|
|
612
|
+
const now = await fingerprintOf(root, cached.watched).catch(() => undefined);
|
|
613
|
+
if (now === cached.fingerprint)
|
|
614
|
+
return cached;
|
|
615
|
+
}
|
|
616
|
+
return detect();
|
|
617
|
+
})();
|
|
618
|
+
ready.catch(() => undefined);
|
|
619
|
+
return { current: () => latest, ready, refresh: detect, file };
|
|
620
|
+
}
|
|
621
|
+
/** Waits for `promise` up to `ms`; undefined when it takes longer. */
|
|
622
|
+
export async function within(promise, ms) {
|
|
623
|
+
let timer;
|
|
624
|
+
const timeout = new Promise((resolve) => {
|
|
625
|
+
timer = setTimeout(() => resolve(undefined), ms);
|
|
626
|
+
timer.unref?.();
|
|
627
|
+
});
|
|
628
|
+
try {
|
|
629
|
+
return await Promise.race([promise, timeout]);
|
|
630
|
+
}
|
|
631
|
+
finally {
|
|
632
|
+
if (timer !== undefined)
|
|
633
|
+
clearTimeout(timer);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
// ---- memory bootstrap facts (`/memory init`) -----------------------------------------------------
|
|
637
|
+
/** What `/memory init` writes (concept / evidence) and proposes (decision / preference) from a profile. */
|
|
638
|
+
export function profileMemoryFacts(profile) {
|
|
639
|
+
const concepts = [];
|
|
640
|
+
const stack = [
|
|
641
|
+
`Languages: ${profile.languages.join(", ") || "none detected"}.`,
|
|
642
|
+
...(profile.frameworks.length === 0 ? [] : [`Frameworks: ${profile.frameworks.join(", ")}.`]),
|
|
643
|
+
`Package manager / build tool: ${profile.packageManager ?? "none detected"}.`,
|
|
644
|
+
...(profile.testFrameworks.length === 0 ? [] : [`Test frameworks: ${profile.testFrameworks.join(", ")}.`]),
|
|
645
|
+
`Repository size: ${profile.repo.files}${profile.repo.capped ? "+" : ""} files (${profile.repo.size}).`,
|
|
646
|
+
"Detected automatically by Synorch from the repository's manifests.",
|
|
647
|
+
];
|
|
648
|
+
concepts.push({ key: "project-stack", title: `Project stack: ${stackLabel(profile)}`, body: stack.join("\n") });
|
|
649
|
+
const commands = Object.entries(profile.commands).map(([name, value]) => `- ${name}: \`${value?.command ?? ""}\` (from ${value?.source ?? "?"})`);
|
|
650
|
+
if (commands.length > 0)
|
|
651
|
+
concepts.push({ key: "project-commands", title: "Project commands", body: ["How to test, build, lint and run this project:", ...commands].join("\n") });
|
|
652
|
+
const layout = [
|
|
653
|
+
...(profile.workspace === null ? ["Single-package repository."] : [`Monorepo: ${profile.workspace.kind}.`, ...profile.workspace.packages.slice(0, 40).map((item) => `- ${item.name} (${item.path})`)]),
|
|
654
|
+
...(profile.keyDirectories.length === 0 ? [] : [`Top-level directories: ${profile.keyDirectories.join(", ")}.`]),
|
|
655
|
+
];
|
|
656
|
+
concepts.push({ key: "project-layout", title: "Project layout", body: layout.join("\n") });
|
|
657
|
+
if (profile.conventions.length > 0)
|
|
658
|
+
concepts.push({ key: "project-conventions", title: "Project conventions", body: `Detected from configuration files: ${profile.conventions.join(", ")}.` });
|
|
659
|
+
const evidence = [];
|
|
660
|
+
const rootManifests = profile.manifests.filter((file) => !file.includes("/"));
|
|
661
|
+
for (const file of rootManifests) {
|
|
662
|
+
evidence.push({ key: `manifest-${file}`, title: `Manifest ${file}`, body: `${file} is one of the files the project profile was detected from; when it changes this note goes stale.`, sourceRef: file });
|
|
663
|
+
}
|
|
664
|
+
if (profile.workspace?.kind.startsWith("pnpm") === true) {
|
|
665
|
+
evidence.push({ key: "manifest-pnpm-workspace-yaml", title: "Manifest pnpm-workspace.yaml", body: `Declares the pnpm workspace packages (${profile.workspace.packages.length}).`, sourceRef: "pnpm-workspace.yaml" });
|
|
666
|
+
}
|
|
667
|
+
const proposals = [];
|
|
668
|
+
const manifestSource = rootManifests.find((file) => ["package.json", "pom.xml", "pyproject.toml", "Cargo.toml", "go.mod", "build.gradle", "build.gradle.kts"].includes(file));
|
|
669
|
+
if (profile.packageManager !== null) {
|
|
670
|
+
proposals.push({
|
|
671
|
+
key: `package-manager-${profile.packageManager}`,
|
|
672
|
+
kind: "decision",
|
|
673
|
+
title: `Use ${profile.packageManager} as the package manager`,
|
|
674
|
+
body: `Install dependencies and run scripts with ${profile.packageManager}; do not switch to another package manager or add a different lockfile.`,
|
|
675
|
+
rationale: `Detected from the repository (${manifestSource ?? "lockfiles"}); accepting makes it a standing project decision.`,
|
|
676
|
+
...(manifestSource === undefined ? {} : { sourceRef: manifestSource }),
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
if (profile.workspace !== null) {
|
|
680
|
+
proposals.push({
|
|
681
|
+
key: `workspace-${profile.workspace.kind}`,
|
|
682
|
+
kind: "decision",
|
|
683
|
+
title: `The repository is a monorepo managed with ${profile.workspace.kind}`,
|
|
684
|
+
body: profile.workspace.packages.length === 0 ? "" : `Packages: ${profile.workspace.packages.map((item) => item.name).slice(0, 20).join(", ")}.`,
|
|
685
|
+
rationale: "Detected from the workspace configuration; new code belongs in one of the workspace packages.",
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
if (profile.testFrameworks.length > 0) {
|
|
689
|
+
proposals.push({
|
|
690
|
+
key: `test-framework-${profile.testFrameworks.join("-")}`,
|
|
691
|
+
kind: "decision",
|
|
692
|
+
title: `Tests are written with ${profile.testFrameworks.join(" and ")}`,
|
|
693
|
+
body: "New tests follow the existing framework; no second test framework is introduced.",
|
|
694
|
+
rationale: "Detected from the project's dependencies and scripts.",
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
const verify = profile.commands.check ?? profile.commands.test;
|
|
698
|
+
if (verify !== undefined) {
|
|
699
|
+
proposals.push({
|
|
700
|
+
key: `verify-with-${verify.command}`,
|
|
701
|
+
kind: "preference",
|
|
702
|
+
title: `Verify changes with \`${verify.command}\``,
|
|
703
|
+
body: `Run \`${verify.command}\` before reporting a change as done.`,
|
|
704
|
+
rationale: `The project defines it (${verify.source}).`,
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
return { concepts, evidence, proposals };
|
|
708
|
+
}
|
|
709
|
+
//# sourceMappingURL=project-profile.js.map
|