@entelligentsia/forgecli 1.0.36 → 1.0.40
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 +83 -0
- package/dist/CHANGELOG-forge-plugin.md +101 -0
- package/dist/CHANGELOG-pi.md +143 -0
- package/dist/bin/argv.d.ts +1 -1
- package/dist/bin/argv.js +12 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +18 -16
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/reset.d.ts +39 -0
- package/dist/bin/reset.js +101 -0
- package/dist/bin/reset.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +56 -265
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -1
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +52 -32
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -1
- package/dist/extensions/forgecli/commands/reset.d.ts +16 -0
- package/dist/extensions/forgecli/commands/reset.js +83 -0
- package/dist/extensions/forgecli/commands/reset.js.map +1 -0
- package/dist/extensions/forgecli/forge-commands.d.ts +7 -2
- package/dist/extensions/forgecli/forge-commands.js +19 -5
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +4 -4
- package/dist/extensions/forgecli/hooks/forge-permissions.js +20 -6
- package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -1
- package/dist/extensions/forgecli/index.js +6 -3
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/lib/forge-root.d.ts +6 -0
- package/dist/extensions/forgecli/lib/forge-root.js +52 -0
- package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
- package/dist/extensions/forgecli/lib/payload-manifest.d.ts +62 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js +151 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js +107 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +34 -2
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +2 -2
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js +58 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.d.ts +53 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js +131 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js +25 -3
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +3 -3
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +37 -2
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/store/store-resolver.d.ts +15 -0
- package/dist/extensions/forgecli/store/store-resolver.js +118 -18
- package/dist/extensions/forgecli/store/store-resolver.js.map +1 -1
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/.schemas/migrations.json +85 -0
- package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/commands/check-agent.md +7 -23
- package/dist/forge-payload/commands/enhance.md +31 -5
- package/dist/forge-payload/commands/init.md +161 -97
- package/dist/forge-payload/commands/reset.md +117 -0
- package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
- package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
- package/dist/forge-payload/integrity.json +22 -7
- package/dist/forge-payload/payload-manifest.json +314 -0
- package/dist/forge-payload/schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/schemas/structure-manifest.json +4 -2
- package/dist/forge-payload/tools/reset-plan.cjs +210 -0
- package/dist/forge-payload/tools/store.cjs +4 -1
- package/dist/forge-payload/tools/substitute-placeholders.cjs +10 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +20 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +18 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +10 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1804 -815
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2031 -1384
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +71 -27
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +35 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +13 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/README.md +26 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +128 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +16 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +9 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +19 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +10 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +47 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +44 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +47 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +58 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +24 -26
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +72 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +13 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +112 -37
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +7 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +103 -70
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +20 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +97 -30
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts +36 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +202 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +72 -32
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +39 -34
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +20 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js +91 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +101 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +111 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js +54 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/containerization.md +111 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/docs.json +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +67 -13
- package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +9 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/security.md +59 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +36 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/tmux.md +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +10 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +19 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-header.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/doom-overlay/index.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/index.ts +531 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +185 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/handoff.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/interactive-shell.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-qa-tests.ts +152 -81
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/project-trust.ts +64 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/qna.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/questionnaire.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/snake.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/space-invaders.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/summarize.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tic-tac-toe.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/todo.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tools.ts +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -419
- package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -8
- package/node_modules/@earendil-works/pi-tui/README.md +13 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +102 -43
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -77
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +20 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +244 -42
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +46 -15
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@mariozechner/clipboard/package.json +2 -1
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/README.md +3 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +25 -0
- package/package.json +7 -6
- package/dist/extensions/forgecli/add-pipeline.d.ts +0 -19
- package/dist/extensions/forgecli/add-pipeline.js +0 -143
- package/dist/extensions/forgecli/add-pipeline.js.map +0 -1
- package/dist/extensions/forgecli/add-task.d.ts +0 -20
- package/dist/extensions/forgecli/add-task.js +0 -154
- package/dist/extensions/forgecli/add-task.js.map +0 -1
- package/dist/extensions/forgecli/approve.d.ts +0 -22
- package/dist/extensions/forgecli/approve.js +0 -152
- package/dist/extensions/forgecli/approve.js.map +0 -1
- package/dist/extensions/forgecli/banner.d.ts +0 -10
- package/dist/extensions/forgecli/banner.js +0 -36
- package/dist/extensions/forgecli/banner.js.map +0 -1
- package/dist/extensions/forgecli/calibrate.d.ts +0 -64
- package/dist/extensions/forgecli/calibrate.js +0 -481
- package/dist/extensions/forgecli/calibrate.js.map +0 -1
- package/dist/extensions/forgecli/collate.d.ts +0 -22
- package/dist/extensions/forgecli/collate.js +0 -134
- package/dist/extensions/forgecli/collate.js.map +0 -1
- package/dist/extensions/forgecli/commit.d.ts +0 -22
- package/dist/extensions/forgecli/commit.js +0 -152
- package/dist/extensions/forgecli/commit.js.map +0 -1
- package/dist/extensions/forgecli/config-command.d.ts +0 -8
- package/dist/extensions/forgecli/config-command.js +0 -67
- package/dist/extensions/forgecli/config-command.js.map +0 -1
- package/dist/extensions/forgecli/config-layer.d.ts +0 -53
- package/dist/extensions/forgecli/config-layer.js +0 -72
- package/dist/extensions/forgecli/config-layer.js.map +0 -1
- package/dist/extensions/forgecli/config-writer.d.ts +0 -16
- package/dist/extensions/forgecli/config-writer.js +0 -69
- package/dist/extensions/forgecli/config-writer.js.map +0 -1
- package/dist/extensions/forgecli/enhance.d.ts +0 -27
- package/dist/extensions/forgecli/enhance.js +0 -199
- package/dist/extensions/forgecli/enhance.js.map +0 -1
- package/dist/extensions/forgecli/fix-bug.d.ts +0 -85
- package/dist/extensions/forgecli/fix-bug.js +0 -1580
- package/dist/extensions/forgecli/fix-bug.js.map +0 -1
- package/dist/extensions/forgecli/forge-header.d.ts +0 -12
- package/dist/extensions/forgecli/forge-header.js +0 -114
- package/dist/extensions/forgecli/forge-header.js.map +0 -1
- package/dist/extensions/forgecli/forge-init.d.ts +0 -26
- package/dist/extensions/forgecli/forge-init.js +0 -514
- package/dist/extensions/forgecli/forge-init.js.map +0 -1
- package/dist/extensions/forgecli/forge-root.d.ts +0 -10
- package/dist/extensions/forgecli/forge-root.js +0 -62
- package/dist/extensions/forgecli/forge-root.js.map +0 -1
- package/dist/extensions/forgecli/forge-update-command.d.ts +0 -100
- package/dist/extensions/forgecli/forge-update-command.js +0 -435
- package/dist/extensions/forgecli/forge-update-command.js.map +0 -1
- package/dist/extensions/forgecli/friction-emit.d.ts +0 -99
- package/dist/extensions/forgecli/friction-emit.js +0 -245
- package/dist/extensions/forgecli/friction-emit.js.map +0 -1
- package/dist/extensions/forgecli/implement.d.ts +0 -22
- package/dist/extensions/forgecli/implement.js +0 -170
- package/dist/extensions/forgecli/implement.js.map +0 -1
- package/dist/extensions/forgecli/init-context.d.ts +0 -99
- package/dist/extensions/forgecli/init-context.js +0 -178
- package/dist/extensions/forgecli/init-context.js.map +0 -1
- package/dist/extensions/forgecli/init-progress.d.ts +0 -39
- package/dist/extensions/forgecli/init-progress.js +0 -117
- package/dist/extensions/forgecli/init-progress.js.map +0 -1
- package/dist/extensions/forgecli/input-router.d.ts +0 -33
- package/dist/extensions/forgecli/input-router.js +0 -136
- package/dist/extensions/forgecli/input-router.js.map +0 -1
- package/dist/extensions/forgecli/lib/halt-advisor.d.ts +0 -59
- package/dist/extensions/forgecli/lib/halt-advisor.js +0 -113
- package/dist/extensions/forgecli/lib/halt-advisor.js.map +0 -1
- package/dist/extensions/forgecli/lib/orchestrator-preflight.d.ts +0 -46
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js +0 -64
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js.map +0 -1
- package/dist/extensions/forgecli/materialize.d.ts +0 -16
- package/dist/extensions/forgecli/materialize.js +0 -195
- package/dist/extensions/forgecli/materialize.js.map +0 -1
- package/dist/extensions/forgecli/migrate.d.ts +0 -22
- package/dist/extensions/forgecli/migrate.js +0 -260
- package/dist/extensions/forgecli/migrate.js.map +0 -1
- package/dist/extensions/forgecli/migration-engine.d.ts +0 -117
- package/dist/extensions/forgecli/migration-engine.js +0 -563
- package/dist/extensions/forgecli/migration-engine.js.map +0 -1
- package/dist/extensions/forgecli/model-registry.d.ts +0 -61
- package/dist/extensions/forgecli/model-registry.js +0 -127
- package/dist/extensions/forgecli/model-registry.js.map +0 -1
- package/dist/extensions/forgecli/model-resolver.d.ts +0 -32
- package/dist/extensions/forgecli/model-resolver.js +0 -65
- package/dist/extensions/forgecli/model-resolver.js.map +0 -1
- package/dist/extensions/forgecli/model-validator.d.ts +0 -29
- package/dist/extensions/forgecli/model-validator.js +0 -107
- package/dist/extensions/forgecli/model-validator.js.map +0 -1
- package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +0 -26
- package/dist/extensions/forgecli/orchestrator-status-bar.js +0 -213
- package/dist/extensions/forgecli/orchestrator-status-bar.js.map +0 -1
- package/dist/extensions/forgecli/plan.d.ts +0 -22
- package/dist/extensions/forgecli/plan.js +0 -167
- package/dist/extensions/forgecli/plan.js.map +0 -1
- package/dist/extensions/forgecli/quiz-agent.d.ts +0 -17
- package/dist/extensions/forgecli/quiz-agent.js +0 -98
- package/dist/extensions/forgecli/quiz-agent.js.map +0 -1
- package/dist/extensions/forgecli/read-command.d.ts +0 -2
- package/dist/extensions/forgecli/read-command.js +0 -100
- package/dist/extensions/forgecli/read-command.js.map +0 -1
- package/dist/extensions/forgecli/regenerate.d.ts +0 -40
- package/dist/extensions/forgecli/regenerate.js +0 -438
- package/dist/extensions/forgecli/regenerate.js.map +0 -1
- package/dist/extensions/forgecli/remove-command.d.ts +0 -17
- package/dist/extensions/forgecli/remove-command.js +0 -124
- package/dist/extensions/forgecli/remove-command.js.map +0 -1
- package/dist/extensions/forgecli/report-bug.d.ts +0 -25
- package/dist/extensions/forgecli/report-bug.js +0 -159
- package/dist/extensions/forgecli/report-bug.js.map +0 -1
- package/dist/extensions/forgecli/retrospective.d.ts +0 -20
- package/dist/extensions/forgecli/retrospective.js +0 -126
- package/dist/extensions/forgecli/retrospective.js.map +0 -1
- package/dist/extensions/forgecli/review-code.d.ts +0 -35
- package/dist/extensions/forgecli/review-code.js +0 -196
- package/dist/extensions/forgecli/review-code.js.map +0 -1
- package/dist/extensions/forgecli/review-plan.d.ts +0 -35
- package/dist/extensions/forgecli/review-plan.js +0 -200
- package/dist/extensions/forgecli/review-plan.js.map +0 -1
- package/dist/extensions/forgecli/run-sprint.d.ts +0 -27
- package/dist/extensions/forgecli/run-sprint.js +0 -716
- package/dist/extensions/forgecli/run-sprint.js.map +0 -1
- package/dist/extensions/forgecli/run-task.d.ts +0 -204
- package/dist/extensions/forgecli/run-task.js +0 -1403
- package/dist/extensions/forgecli/run-task.js.map +0 -1
- package/dist/extensions/forgecli/skill-curation-flag.d.ts +0 -21
- package/dist/extensions/forgecli/skill-curation-flag.js +0 -71
- package/dist/extensions/forgecli/skill-curation-flag.js.map +0 -1
- package/dist/extensions/forgecli/skill-curator-subagent.d.ts +0 -102
- package/dist/extensions/forgecli/skill-curator-subagent.js +0 -339
- package/dist/extensions/forgecli/skill-curator-subagent.js.map +0 -1
- package/dist/extensions/forgecli/skill-retriever.d.ts +0 -84
- package/dist/extensions/forgecli/skill-retriever.js +0 -246
- package/dist/extensions/forgecli/skill-retriever.js.map +0 -1
- package/dist/extensions/forgecli/skill-usage-tracker.d.ts +0 -91
- package/dist/extensions/forgecli/skill-usage-tracker.js +0 -224
- package/dist/extensions/forgecli/skill-usage-tracker.js.map +0 -1
- package/dist/extensions/forgecli/sprint-intake.d.ts +0 -10
- package/dist/extensions/forgecli/sprint-intake.js +0 -91
- package/dist/extensions/forgecli/sprint-intake.js.map +0 -1
- package/dist/extensions/forgecli/sprint-plan.d.ts +0 -14
- package/dist/extensions/forgecli/sprint-plan.js +0 -122
- package/dist/extensions/forgecli/sprint-plan.js.map +0 -1
- package/dist/extensions/forgecli/status-command.d.ts +0 -19
- package/dist/extensions/forgecli/status-command.js +0 -140
- package/dist/extensions/forgecli/status-command.js.map +0 -1
- package/dist/extensions/forgecli/store-error-remediation.d.ts +0 -65
- package/dist/extensions/forgecli/store-error-remediation.js +0 -307
- package/dist/extensions/forgecli/store-error-remediation.js.map +0 -1
- package/dist/extensions/forgecli/store-query.d.ts +0 -22
- package/dist/extensions/forgecli/store-query.js +0 -107
- package/dist/extensions/forgecli/store-query.js.map +0 -1
- package/dist/extensions/forgecli/store-repair.d.ts +0 -17
- package/dist/extensions/forgecli/store-repair.js +0 -123
- package/dist/extensions/forgecli/store-repair.js.map +0 -1
- package/dist/extensions/forgecli/store-resolver.d.ts +0 -56
- package/dist/extensions/forgecli/store-resolver.js +0 -263
- package/dist/extensions/forgecli/store-resolver.js.map +0 -1
- package/dist/extensions/forgecli/store-validator.d.ts +0 -16
- package/dist/extensions/forgecli/store-validator.js +0 -32
- package/dist/extensions/forgecli/store-validator.js.map +0 -1
- package/dist/extensions/forgecli/test-orchestrate.d.ts +0 -2
- package/dist/extensions/forgecli/test-orchestrate.js +0 -182
- package/dist/extensions/forgecli/test-orchestrate.js.map +0 -1
- package/dist/extensions/forgecli/thread-switcher.d.ts +0 -5
- package/dist/extensions/forgecli/thread-switcher.js +0 -189
- package/dist/extensions/forgecli/thread-switcher.js.map +0 -1
- package/dist/extensions/forgecli/transition-guard.d.ts +0 -20
- package/dist/extensions/forgecli/transition-guard.js +0 -89
- package/dist/extensions/forgecli/transition-guard.js.map +0 -1
- package/dist/extensions/forgecli/update-check.d.ts +0 -37
- package/dist/extensions/forgecli/update-check.js +0 -185
- package/dist/extensions/forgecli/update-check.js.map +0 -1
- package/dist/extensions/forgecli/update-tools.d.ts +0 -23
- package/dist/extensions/forgecli/update-tools.js +0 -135
- package/dist/extensions/forgecli/update-tools.js.map +0 -1
- package/dist/extensions/forgecli/validate.d.ts +0 -22
- package/dist/extensions/forgecli/validate.js +0 -152
- package/dist/extensions/forgecli/validate.js.map +0 -1
- package/dist/extensions/forgecli/viewport-events.d.ts +0 -78
- package/dist/extensions/forgecli/viewport-events.js +0 -243
- package/dist/extensions/forgecli/viewport-events.js.map +0 -1
- package/dist/extensions/forgecli/viewport-renderer.d.ts +0 -83
- package/dist/extensions/forgecli/viewport-renderer.js +0 -233
- package/dist/extensions/forgecli/viewport-renderer.js.map +0 -1
- package/dist/extensions/forgecli/viewport-theme.d.ts +0 -11
- package/dist/extensions/forgecli/viewport-theme.js +0 -128
- package/dist/extensions/forgecli/viewport-theme.js.map +0 -1
- package/dist/extensions/forgecli/whats-new-widget.d.ts +0 -26
- package/dist/extensions/forgecli/whats-new-widget.js +0 -376
- package/dist/extensions/forgecli/whats-new-widget.js.map +0 -1
- package/dist/extensions/forgecli/whats-new.d.ts +0 -120
- package/dist/extensions/forgecli/whats-new.js +0 -470
- package/dist/extensions/forgecli/whats-new.js.map +0 -1
- package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
- package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
- package/dist/forge-payload/.base-pack/commands/init.md +0 -278
- package/dist/forge-payload/init/generation/generate-knowledge-base.md +0 -56
- package/dist/forge-payload/init/generation/generate-personas.md +0 -54
- package/dist/forge-payload/init/generation/generate-skills.md +0 -36
- package/dist/forge-payload/init/generation/generate-templates.md +0 -39
- /package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +0 -0
|
@@ -7,9 +7,18 @@
|
|
|
7
7
|
// Pattern modelled on `findNearestProjectAgentsDir` in
|
|
8
8
|
// `subagent/agents.ts:96-106`.
|
|
9
9
|
import * as fs from "node:fs";
|
|
10
|
+
import * as os from "node:os";
|
|
10
11
|
import * as path from "node:path";
|
|
11
12
|
import { resolveBundledPayloadRoot } from "./catalog-loader.js";
|
|
12
13
|
import { isDirectory, isFile } from "./shared-fs-utils.js";
|
|
14
|
+
/**
|
|
15
|
+
* True when `child` is `parent` itself or lives anywhere beneath it.
|
|
16
|
+
* Used to constrain a config-supplied `forgeRoot` to trusted locations.
|
|
17
|
+
*/
|
|
18
|
+
function isWithinOrEqual(parent, child) {
|
|
19
|
+
const rel = path.relative(parent, child);
|
|
20
|
+
return rel === "" || (!rel.startsWith("..") && !path.isAbsolute(rel));
|
|
21
|
+
}
|
|
13
22
|
function findNearestForgeConfig(cwd) {
|
|
14
23
|
let currentDir = cwd;
|
|
15
24
|
while (true) {
|
|
@@ -70,6 +79,49 @@ export function discoverForgeConfig(cwd = process.cwd()) {
|
|
|
70
79
|
return { forgeRoot: bundled, configPath, healedFrom: resolved };
|
|
71
80
|
}
|
|
72
81
|
}
|
|
82
|
+
// Containment guard (security: clone-and-run RCE — see issue #43).
|
|
83
|
+
// `forgeRoot` selects the directory whose `tools/*.cjs` this process spawns
|
|
84
|
+
// (`lib/run-cjs.ts`) and `require()`s (`hooks/write-guard.ts`). A shared or
|
|
85
|
+
// cloned `.forge/config.json` can therefore point it at attacker-controlled
|
|
86
|
+
// code. We only honour a `forgeRoot` that resolves INSIDE one of the trusted
|
|
87
|
+
// install roots:
|
|
88
|
+
// (a) the project tree (the parent of `.forge/`) — covers the dogfood
|
|
89
|
+
// layout `forgeRoot: "./forge/forge"` and any in-project payload,
|
|
90
|
+
// (b) this forgecli's bundled payload (the trusted installed copy),
|
|
91
|
+
// (c) the Claude Code plugin cache `<home>/.claude/plugins/` (the common
|
|
92
|
+
// installed-user case — `forge init` stamps a path under here), plus
|
|
93
|
+
// its `CLAUDE_CONFIG_DIR` / `CLAUDE_PLUGIN_ROOT` overrides.
|
|
94
|
+
// Trusted roots are matched by absolute path containment (NOT substring), so
|
|
95
|
+
// a spoof like `/tmp/evil/.claude/plugins/...` does not qualify. Anything
|
|
96
|
+
// else (an absolute path elsewhere, a `..`-escape outside the project) is
|
|
97
|
+
// rejected and healed to the bundled payload — the same safe fallback the
|
|
98
|
+
// dangling-path heal above uses. `FORGE_ALLOW_EXTERNAL_ROOT=1` is an explicit
|
|
99
|
+
// opt-out for users who intentionally point forgeRoot at an out-of-tree
|
|
100
|
+
// plugin checkout.
|
|
101
|
+
//
|
|
102
|
+
// Residual: a fully-populated malicious payload committed INSIDE a cloned
|
|
103
|
+
// repo is still trusted under (a) — that is the inherent "you ran this
|
|
104
|
+
// repo's code" boundary (cf. npm lifecycle scripts / Makefiles) and is out
|
|
105
|
+
// of scope for a path-containment guard.
|
|
106
|
+
if (process.env.FORGE_ALLOW_EXTERNAL_ROOT !== "1") {
|
|
107
|
+
const bundled = resolveBundledPayloadRoot();
|
|
108
|
+
const trustedRoots = [projectDir, path.join(os.homedir(), ".claude", "plugins")];
|
|
109
|
+
if (isDirectory(bundled))
|
|
110
|
+
trustedRoots.push(bundled);
|
|
111
|
+
if (process.env.CLAUDE_CONFIG_DIR)
|
|
112
|
+
trustedRoots.push(path.join(process.env.CLAUDE_CONFIG_DIR, "plugins"));
|
|
113
|
+
if (process.env.CLAUDE_PLUGIN_ROOT)
|
|
114
|
+
trustedRoots.push(process.env.CLAUDE_PLUGIN_ROOT);
|
|
115
|
+
const trusted = trustedRoots.some((root) => isWithinOrEqual(root, resolved));
|
|
116
|
+
if (!trusted) {
|
|
117
|
+
if (isDirectory(bundled)) {
|
|
118
|
+
return { forgeRoot: bundled, configPath, rejectedFrom: resolved };
|
|
119
|
+
}
|
|
120
|
+
// No bundled payload to fall back to: refuse rather than spawn from
|
|
121
|
+
// an untrusted location.
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
73
125
|
return { forgeRoot: resolved, configPath };
|
|
74
126
|
}
|
|
75
127
|
//# sourceMappingURL=forge-root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-root.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/lib/forge-root.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,yEAAyE;AACzE,uGAAuG;AACvG,oEAAoE;AACpE,EAAE;AACF,uDAAuD;AACvD,+BAA+B;AAE/B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE3D,SAAS,sBAAsB,CAAC,GAAW;IAC1C,IAAI,UAAU,GAAG,GAAG,CAAC;IACrB,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;QACjE,IAAI,MAAM,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;QAExC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,SAAS,KAAK,UAAU;YAAE,OAAO,IAAI,CAAC;QAC1C,UAAU,GAAG,SAAS,CAAC;IACxB,CAAC;AACF,CAAC;
|
|
1
|
+
{"version":3,"file":"forge-root.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/lib/forge-root.ts"],"names":[],"mapp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AO,EAAE,CAAC;YACd,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;YACnE,CAAC;YACD,oEAAoE;YACpE,yBAAyB;YACzB,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Selection filter for dir entries (mirrors build-payload Pass-2 logic). */
|
|
2
|
+
export interface PayloadSelect {
|
|
3
|
+
recursive?: boolean;
|
|
4
|
+
ext?: string[];
|
|
5
|
+
include?: string[];
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
prefix?: string[];
|
|
8
|
+
}
|
|
9
|
+
/** A single payload manifest entry. */
|
|
10
|
+
export interface PayloadEntry {
|
|
11
|
+
/** Repo-relative path under forge/forge/ (file or directory root). */
|
|
12
|
+
source: string;
|
|
13
|
+
/** Destination path inside dist/forge-payload/ that build-payload emits. */
|
|
14
|
+
bundle: string;
|
|
15
|
+
/** Destination inside a bootstrapped project (absent for bundleOnly entries). */
|
|
16
|
+
install?: string;
|
|
17
|
+
/** True when shipped to the bundle but NOT vendored into a project (FORGE-BUG-044/045). */
|
|
18
|
+
bundleOnly?: boolean;
|
|
19
|
+
/** Removal owner consumed by uninstall.ts. */
|
|
20
|
+
owner: string;
|
|
21
|
+
kind: "file" | "dir";
|
|
22
|
+
/** True when build-payload synthesizes the artifact rather than copying it. */
|
|
23
|
+
synthesized?: boolean;
|
|
24
|
+
select?: PayloadSelect;
|
|
25
|
+
note?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PayloadManifest {
|
|
28
|
+
entries: PayloadEntry[];
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Does `name` satisfy an entry's ext/prefix filter? Curated `include` is handled
|
|
33
|
+
* by the caller (applySelect); `exclude` is matched separately on path segments.
|
|
34
|
+
*/
|
|
35
|
+
export declare function matchesFilter(name: string, select?: PayloadSelect): boolean;
|
|
36
|
+
/** Is any path segment of `rel` (or the basename) in the exclude list? */
|
|
37
|
+
export declare function isExcluded(rel: string, name: string, select?: PayloadSelect): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve a dir entry's `select` against a concrete directory, returning the
|
|
40
|
+
* sorted list of entry-relative paths the select claims. Mirrors the walk +
|
|
41
|
+
* claim logic of check-payload-manifest.cjs (recursive / ext / prefix / exclude
|
|
42
|
+
* / curated include) so build, bundle and install agree on the set.
|
|
43
|
+
*/
|
|
44
|
+
export declare function applySelect(absDir: string, select?: PayloadSelect): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Load + shape-validate the payload manifest from a root directory (the forge
|
|
47
|
+
* root at build time, or the payload root at runtime — both carry the file).
|
|
48
|
+
* Throws on a missing file or a malformed (no entries[]) manifest.
|
|
49
|
+
*/
|
|
50
|
+
export declare function loadManifest(root: string): PayloadManifest;
|
|
51
|
+
/**
|
|
52
|
+
* Entries that are vendored into a bootstrapped project (bundleOnly entries are
|
|
53
|
+
* excluded — they ship to the bundle for tool resolution only). Order is
|
|
54
|
+
* preserved from the manifest. FORGE-S32-T06 collapsed the former two command
|
|
55
|
+
* trees into a single unified `commands/` entry, so there is no longer a
|
|
56
|
+
* commands-union precedence or name-collision ordering to honour.
|
|
57
|
+
*/
|
|
58
|
+
export declare function installEntries(manifest: PayloadManifest): PayloadEntry[];
|
|
59
|
+
/** Group install-bearing entries by their install destination (manifest order). */
|
|
60
|
+
export declare function groupByInstall(manifest: PayloadManifest): Map<string, PayloadEntry[]>;
|
|
61
|
+
/** Group install-bearing entries by removal owner (uninstall grouping). */
|
|
62
|
+
export declare function groupByOwner(manifest: PayloadManifest): Map<string, PayloadEntry[]>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// lib/payload-manifest.ts — typed reader for the Forge payload manifest (FORGE-S32-T03).
|
|
2
|
+
//
|
|
3
|
+
// The single source of truth for "what the Forge payload ships" is
|
|
4
|
+
// forge/forge/payload-manifest.json, bundled into dist/forge-payload/ by
|
|
5
|
+
// scripts/build-payload.cjs. This module loads + shape-validates that manifest
|
|
6
|
+
// and exposes the select/grouping helpers the two TypeScript consumers need:
|
|
7
|
+
// - bootstrap.ts → groupByInstall() to vendor bundle → install destinations
|
|
8
|
+
// - uninstall.ts → groupByOwner() to remove install destinations by owner
|
|
9
|
+
//
|
|
10
|
+
// The select semantics (matchesFilter / isExcluded / curated include) are a
|
|
11
|
+
// faithful re-implementation of forge/forge/tools/check-payload-manifest.cjs
|
|
12
|
+
// and scripts/lib/payload-manifest.cjs, pinned together by a shared-fixture
|
|
13
|
+
// parity test (advisory 2) so the three consumers never drift from the T02
|
|
14
|
+
// validator's reading of ext / prefix / include / exclude / recursive.
|
|
15
|
+
//
|
|
16
|
+
// Pure fs; no network, no LLM, no store writes.
|
|
17
|
+
import * as fs from "node:fs";
|
|
18
|
+
import * as path from "node:path";
|
|
19
|
+
// ── Select helpers (mirror check-payload-manifest.cjs) ───────────────────────
|
|
20
|
+
/**
|
|
21
|
+
* Does `name` satisfy an entry's ext/prefix filter? Curated `include` is handled
|
|
22
|
+
* by the caller (applySelect); `exclude` is matched separately on path segments.
|
|
23
|
+
*/
|
|
24
|
+
export function matchesFilter(name, select) {
|
|
25
|
+
if (!select)
|
|
26
|
+
return true;
|
|
27
|
+
if (Array.isArray(select.ext) && select.ext.length > 0) {
|
|
28
|
+
if (!select.ext.some((e) => name.endsWith(e)))
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (Array.isArray(select.prefix) && select.prefix.length > 0) {
|
|
32
|
+
if (!select.prefix.some((p) => name.startsWith(p)))
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
/** Is any path segment of `rel` (or the basename) in the exclude list? */
|
|
38
|
+
export function isExcluded(rel, name, select) {
|
|
39
|
+
if (!select || !Array.isArray(select.exclude))
|
|
40
|
+
return false;
|
|
41
|
+
const segs = rel.split(path.sep);
|
|
42
|
+
return select.exclude.some((x) => x === name || segs.includes(x));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resolve a dir entry's `select` against a concrete directory, returning the
|
|
46
|
+
* sorted list of entry-relative paths the select claims. Mirrors the walk +
|
|
47
|
+
* claim logic of check-payload-manifest.cjs (recursive / ext / prefix / exclude
|
|
48
|
+
* / curated include) so build, bundle and install agree on the set.
|
|
49
|
+
*/
|
|
50
|
+
export function applySelect(absDir, select) {
|
|
51
|
+
const out = [];
|
|
52
|
+
if (!fs.existsSync(absDir) || !fs.statSync(absDir).isDirectory())
|
|
53
|
+
return out;
|
|
54
|
+
const sel = select ?? {};
|
|
55
|
+
const curated = Array.isArray(sel.include) && sel.include.length > 0;
|
|
56
|
+
const walk = (dir, relBase) => {
|
|
57
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
58
|
+
const abs = path.join(dir, entry.name);
|
|
59
|
+
const rel = relBase ? path.join(relBase, entry.name) : entry.name;
|
|
60
|
+
if (isExcluded(rel, entry.name, sel))
|
|
61
|
+
continue;
|
|
62
|
+
if (entry.isDirectory()) {
|
|
63
|
+
// Non-recursive entries do not descend — unless the directory name
|
|
64
|
+
// is itself a curated include target (e.g. skills/<skill-dir>/).
|
|
65
|
+
if (sel.recursive === false && !(curated && sel.include?.includes(entry.name)))
|
|
66
|
+
continue;
|
|
67
|
+
walk(abs, rel);
|
|
68
|
+
}
|
|
69
|
+
else if (entry.isFile()) {
|
|
70
|
+
if (curated) {
|
|
71
|
+
const top = rel.split(path.sep)[0];
|
|
72
|
+
if (!(sel.include?.includes(top) || sel.include?.includes(entry.name)))
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
else if (!matchesFilter(entry.name, sel)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
out.push(rel);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
walk(absDir, "");
|
|
83
|
+
out.sort();
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
// ── Loader ────────────────────────────────────────────────────────────────────
|
|
87
|
+
/**
|
|
88
|
+
* Load + shape-validate the payload manifest from a root directory (the forge
|
|
89
|
+
* root at build time, or the payload root at runtime — both carry the file).
|
|
90
|
+
* Throws on a missing file or a malformed (no entries[]) manifest.
|
|
91
|
+
*/
|
|
92
|
+
export function loadManifest(root) {
|
|
93
|
+
const manifestPath = path.join(root, "payload-manifest.json");
|
|
94
|
+
let raw;
|
|
95
|
+
try {
|
|
96
|
+
raw = fs.readFileSync(manifestPath, "utf8");
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
const e = err;
|
|
100
|
+
throw new Error(`payload-manifest: cannot read ${manifestPath}: ${e.message ?? String(err)}`);
|
|
101
|
+
}
|
|
102
|
+
let parsed;
|
|
103
|
+
try {
|
|
104
|
+
parsed = JSON.parse(raw);
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
const e = err;
|
|
108
|
+
throw new Error(`payload-manifest: ${manifestPath} is not valid JSON: ${e.message ?? String(err)}`);
|
|
109
|
+
}
|
|
110
|
+
if (!parsed || typeof parsed !== "object" || !Array.isArray(parsed.entries)) {
|
|
111
|
+
throw new Error(`payload-manifest: ${manifestPath} is malformed (missing entries[] array).`);
|
|
112
|
+
}
|
|
113
|
+
return parsed;
|
|
114
|
+
}
|
|
115
|
+
// ── Grouping helpers ──────────────────────────────────────────────────────────
|
|
116
|
+
/**
|
|
117
|
+
* Entries that are vendored into a bootstrapped project (bundleOnly entries are
|
|
118
|
+
* excluded — they ship to the bundle for tool resolution only). Order is
|
|
119
|
+
* preserved from the manifest. FORGE-S32-T06 collapsed the former two command
|
|
120
|
+
* trees into a single unified `commands/` entry, so there is no longer a
|
|
121
|
+
* commands-union precedence or name-collision ordering to honour.
|
|
122
|
+
*/
|
|
123
|
+
export function installEntries(manifest) {
|
|
124
|
+
return manifest.entries.filter((e) => e.bundleOnly !== true && typeof e.install === "string" && e.install.length > 0);
|
|
125
|
+
}
|
|
126
|
+
/** Group install-bearing entries by their install destination (manifest order). */
|
|
127
|
+
export function groupByInstall(manifest) {
|
|
128
|
+
const groups = new Map();
|
|
129
|
+
for (const entry of installEntries(manifest)) {
|
|
130
|
+
const key = entry.install;
|
|
131
|
+
const list = groups.get(key);
|
|
132
|
+
if (list)
|
|
133
|
+
list.push(entry);
|
|
134
|
+
else
|
|
135
|
+
groups.set(key, [entry]);
|
|
136
|
+
}
|
|
137
|
+
return groups;
|
|
138
|
+
}
|
|
139
|
+
/** Group install-bearing entries by removal owner (uninstall grouping). */
|
|
140
|
+
export function groupByOwner(manifest) {
|
|
141
|
+
const groups = new Map();
|
|
142
|
+
for (const entry of installEntries(manifest)) {
|
|
143
|
+
const list = groups.get(entry.owner);
|
|
144
|
+
if (list)
|
|
145
|
+
list.push(entry);
|
|
146
|
+
else
|
|
147
|
+
groups.set(entry.owner, [entry]);
|
|
148
|
+
}
|
|
149
|
+
return groups;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=payload-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-manifest.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/lib/payload-manifest.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,EAAE;AACF,mEAAmE;AACnE,yEAAyE;AACzE,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,EAAE;AACF,gDAAgD;AAEhD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;A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IACjD,KAAK,MAAM,KAAK,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;YACtB,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface RenderAdvisoryOptions {
|
|
2
|
+
/** Total frame width (default 78, clamped to ≥24). */
|
|
3
|
+
width?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Render an advisory's markdown body into a bordered block of plain-text lines.
|
|
7
|
+
* `title` becomes the top-border label.
|
|
8
|
+
*/
|
|
9
|
+
export declare function renderAdvisoryBlock(title: string, markdown: string, opts?: RenderAdvisoryOptions): string[];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// advisory-render.ts — FEAT-009 T02 (rich advisory rendering).
|
|
2
|
+
//
|
|
3
|
+
// The halt-recovery advisor returns markdown; piping it straight through
|
|
4
|
+
// ctx.ui.notify (a plaintext, dimmed sink) rendered it as a raw grey wall of
|
|
5
|
+
// `##`/`**`/backtick source. This renders that markdown into a clean, bordered,
|
|
6
|
+
// terminal-friendly block that stays in the transcript/scrollback (a non-modal
|
|
7
|
+
// "widget"), so the operator can read it while the recovery menu handles input.
|
|
8
|
+
//
|
|
9
|
+
// Pure and deterministic — no ANSI colour (the notify sink does not reliably
|
|
10
|
+
// pass escape codes, and plain text keeps the border alignment honest). The
|
|
11
|
+
// substance of the fix is stripping markdown syntax + wrapping + framing.
|
|
12
|
+
const DEFAULT_WIDTH = 78;
|
|
13
|
+
const MIN_WIDTH = 24;
|
|
14
|
+
/** Strip inline markdown emphasis/code markers, keeping the text. */
|
|
15
|
+
function stripInline(s) {
|
|
16
|
+
return s
|
|
17
|
+
.replace(/\*\*(.+?)\*\*/g, "$1") // bold
|
|
18
|
+
.replace(/__(.+?)__/g, "$1") // bold (underscore)
|
|
19
|
+
.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g, "$1") // italic
|
|
20
|
+
.replace(/`([^`]+)`/g, "$1"); // inline code
|
|
21
|
+
}
|
|
22
|
+
/** Convert one markdown line to a clean text line (no framing yet). */
|
|
23
|
+
function transformLine(line) {
|
|
24
|
+
const trimmedRight = line.replace(/\s+$/, "");
|
|
25
|
+
// Headings: drop leading #'s.
|
|
26
|
+
const heading = /^#{1,6}\s+(.*)$/.exec(trimmedRight);
|
|
27
|
+
if (heading)
|
|
28
|
+
return stripInline(heading[1]).trim();
|
|
29
|
+
// Bullets: normalise -/*/+ to a bullet glyph, preserve indent.
|
|
30
|
+
const bullet = /^(\s*)[-*+]\s+(.*)$/.exec(trimmedRight);
|
|
31
|
+
if (bullet)
|
|
32
|
+
return `${bullet[1]}• ${stripInline(bullet[2])}`;
|
|
33
|
+
return stripInline(trimmedRight);
|
|
34
|
+
}
|
|
35
|
+
/** Greedy word-wrap a single logical line to `width` columns. */
|
|
36
|
+
function wrap(text, width) {
|
|
37
|
+
if (text.length === 0)
|
|
38
|
+
return [""];
|
|
39
|
+
const indentMatch = /^(\s*)/.exec(text);
|
|
40
|
+
const indent = indentMatch ? indentMatch[1] : "";
|
|
41
|
+
const words = text.slice(indent.length).split(/\s+/).filter(Boolean);
|
|
42
|
+
if (words.length === 0)
|
|
43
|
+
return [""];
|
|
44
|
+
const lines = [];
|
|
45
|
+
let cur = indent;
|
|
46
|
+
for (const w of words) {
|
|
47
|
+
const candidate = cur === indent ? indent + w : `${cur} ${w}`;
|
|
48
|
+
if (candidate.length > width && cur !== indent) {
|
|
49
|
+
lines.push(cur);
|
|
50
|
+
cur = indent + w;
|
|
51
|
+
}
|
|
52
|
+
else if (candidate.length > width && cur === indent) {
|
|
53
|
+
// single word longer than width — hard-break it
|
|
54
|
+
let rest = w;
|
|
55
|
+
while (rest.length > width) {
|
|
56
|
+
lines.push(indent + rest.slice(0, width - indent.length));
|
|
57
|
+
rest = rest.slice(width - indent.length);
|
|
58
|
+
}
|
|
59
|
+
cur = indent + rest;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
cur = candidate;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (cur.length > 0 || lines.length === 0)
|
|
66
|
+
lines.push(cur);
|
|
67
|
+
return lines;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Render an advisory's markdown body into a bordered block of plain-text lines.
|
|
71
|
+
* `title` becomes the top-border label.
|
|
72
|
+
*/
|
|
73
|
+
export function renderAdvisoryBlock(title, markdown, opts = {}) {
|
|
74
|
+
const width = Math.max(MIN_WIDTH, opts.width ?? DEFAULT_WIDTH);
|
|
75
|
+
const inner = width - 4; // "│ " + " │"
|
|
76
|
+
// Transform + wrap, collapsing 3+ blank lines to one.
|
|
77
|
+
const body = [];
|
|
78
|
+
let blanks = 0;
|
|
79
|
+
for (const raw of markdown.replace(/\r\n/g, "\n").split("\n")) {
|
|
80
|
+
const t = transformLine(raw);
|
|
81
|
+
if (t.trim() === "") {
|
|
82
|
+
blanks++;
|
|
83
|
+
if (blanks <= 1)
|
|
84
|
+
body.push("");
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
blanks = 0;
|
|
88
|
+
for (const wl of wrap(t, inner))
|
|
89
|
+
body.push(wl);
|
|
90
|
+
}
|
|
91
|
+
// Trim leading/trailing blank lines.
|
|
92
|
+
while (body.length && body[0] === "")
|
|
93
|
+
body.shift();
|
|
94
|
+
while (body.length && body[body.length - 1] === "")
|
|
95
|
+
body.pop();
|
|
96
|
+
// Frame.
|
|
97
|
+
const label = ` ${title} `;
|
|
98
|
+
const dashCount = Math.max(0, width - 2 - label.length);
|
|
99
|
+
const top = `╭${label}${"─".repeat(dashCount)}╮`.slice(0, width);
|
|
100
|
+
const bottom = `╰${"─".repeat(width - 2)}╯`;
|
|
101
|
+
const framed = body.map((l) => {
|
|
102
|
+
const padded = l.length > inner ? l.slice(0, inner) : l.padEnd(inner, " ");
|
|
103
|
+
return `│ ${padded} │`;
|
|
104
|
+
});
|
|
105
|
+
return [top, ...framed, bottom];
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=advisory-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisory-render.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/orchestrators/advisory-render.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAE1E,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,qEAAqE;AACrE,SAAS,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC;SACN,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,OAAO;SACvC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,oBAAoB;SAChD,OAAO,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAC,SAAS;SAC/D,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,cAAc;AAC9C,CAAC;AAED,uEAAuE;AACvE,SAAS,aAAa,CAAC,IAAY;IAClC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC9C,8BAA8B;IAC9B,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,IAAI,OAAO;QAAE,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,E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AAO,KAAK,MAAM,IAAI,CAAC;IACxB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PhaseDescriptor } from "../task/task-phases.js";
|
|
2
2
|
export declare const BUG_PHASES: PhaseDescriptor[];
|
|
3
|
+
export declare const BUG_PHASE_PRE_STATUS: Record<string, string>;
|
|
4
|
+
/** Index of a bug phase in the BUG_PHASES table by role, or -1 if unknown. */
|
|
5
|
+
export declare function bugPhaseIndexByRole(role: string): number;
|
|
3
6
|
export declare const BUG_TYPE_TOKENS: Record<string, {
|
|
4
7
|
pass: string;
|
|
5
8
|
fail: string;
|
|
@@ -24,6 +24,28 @@ export const BUG_PHASES = [
|
|
|
24
24
|
{ role: "approve", workflowFile: "architect_approve", personaNoun: "architect", isReview: true, maxIterations: 3 },
|
|
25
25
|
{ role: "commit", workflowFile: "commit_task", personaNoun: "engineer", isReview: false, maxIterations: 1 },
|
|
26
26
|
];
|
|
27
|
+
// FEAT-009 (halt-recovery UX): the bug status a record must hold for a given
|
|
28
|
+
// phase to (re-)run — the status `resetPipelineState` sets when rewinding the
|
|
29
|
+
// fix-bug pipeline to that phase. The bug FSM is intentionally coarse
|
|
30
|
+
// (reported → triaged → in-progress → fixed): `triage` owns reported→triaged→
|
|
31
|
+
// in-progress, then NO phase writes bug.status until `commit` does
|
|
32
|
+
// in-progress→fixed (meta-fix-bug.md § Iron Laws #2 — verdicts travel through
|
|
33
|
+
// summaries, not status). So every post-triage phase resets to `in-progress`;
|
|
34
|
+
// only `triage` resets to `reported`. The reset is therefore dominated by the
|
|
35
|
+
// resume-state phaseIndex, with status forced to the right coarse bucket.
|
|
36
|
+
export const BUG_PHASE_PRE_STATUS = {
|
|
37
|
+
triage: "reported",
|
|
38
|
+
"plan-fix": "in-progress",
|
|
39
|
+
"review-plan": "in-progress",
|
|
40
|
+
implement: "in-progress",
|
|
41
|
+
"review-code": "in-progress",
|
|
42
|
+
approve: "in-progress",
|
|
43
|
+
commit: "in-progress",
|
|
44
|
+
};
|
|
45
|
+
/** Index of a bug phase in the BUG_PHASES table by role, or -1 if unknown. */
|
|
46
|
+
export function bugPhaseIndexByRole(role) {
|
|
47
|
+
return BUG_PHASES.findIndex((p) => p.role === role);
|
|
48
|
+
}
|
|
27
49
|
// ── Bug-event type tokens ──────────────────────────────────────────────────
|
|
28
50
|
// Explicit mapping per review finding #3. Non-review phases always emit the
|
|
29
51
|
// pass token. Review phases select pass or fail based on ec.judgement.verdict.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bug-phases.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/bug-phases.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAI7E,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,mDAAmD;AAEnD,uEAAuE;AACvE,uEAAuE;AAEvE,MAAM,CAAC,MAAM,UAAU,GAAsB;IAC5C,8EAA8E;IAC9E,sEAAsE;IACtE,uEAAuE;IACvE,0EAA0E;IAC1E,kEAAkE;IAClE,uEAAuE;IACvE,2BAA2B;IAC3B,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,EAAE;IACvG,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,EAAE;IAC3G,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE;IACjH,EAAE,IAAI,EAAE,WAAW,EAAE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,aAAa,EAAE;IACpD,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE;IACxD,aAAa,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,EAAE;IACvE,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,EAAE;IAC/D,aAAa,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACjF,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACjE,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,mBAAmB,EAAE;CAC5D,CAAC;AAEF,8EAA8E;AAC9E,wDAAwD;AACxD,sEAAsE;AACtE,+DAA+D;AAE/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAEtD,wEAAwE;AACxE,oEAAoE;AACpE,qEAAqE;AACrE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,wEAAwE;AACxE,iEAAiE;AACjE,MAAM,UAAU,qBAAqB,CAAC,MAA0B;IAC/D,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAC7D,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -35,4 +35,4 @@ export interface BugVerdictLoopParams {
|
|
|
35
35
|
* Evaluate the review-phase verdict and decide the loop's next move.
|
|
36
36
|
* Mirrors the inline block that previously lived in runBugPipelineInner.
|
|
37
37
|
*/
|
|
38
|
-
export declare function handleBugReviewVerdict(p: BugVerdictLoopParams): BugVerdictLoopOutcome
|
|
38
|
+
export declare function handleBugReviewVerdict(p: BugVerdictLoopParams): Promise<BugVerdictLoopOutcome>;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// (approved) path returns `{ kind: "advance" }`.
|
|
13
13
|
import { spawnSync } from "node:child_process";
|
|
14
14
|
import { resolveAdvisorModel, runHaltAdvisor } from "../halt-advisor.js";
|
|
15
|
+
import { offerRecoveryMenu } from "../common/recovery-menu.js";
|
|
15
16
|
import { recoverPhaseSummary } from "../common/summary-recovery.js";
|
|
16
17
|
import { findPredecessorIndex } from "../run-task.js";
|
|
17
18
|
import { BUG_PHASES } from "./bug-phases.js";
|
|
@@ -22,7 +23,7 @@ import { readBugVerdict } from "./bug-verdict.js";
|
|
|
22
23
|
* Evaluate the review-phase verdict and decide the loop's next move.
|
|
23
24
|
* Mirrors the inline block that previously lived in runBugPipelineInner.
|
|
24
25
|
*/
|
|
25
|
-
export function handleBugReviewVerdict(p) {
|
|
26
|
+
export async function handleBugReviewVerdict(p) {
|
|
26
27
|
const { phase, bugId, storeCli, cwd, forgeRoot, iterationCounts, currentPhaseIndex, modelRoutingConfig, ctx } = p;
|
|
27
28
|
const { orchTranscript, finishPhaseNode, summaryKeyByRole, recoveredPhases } = p;
|
|
28
29
|
// Re-read bug record for latest status after subagent ran
|
|
@@ -72,7 +73,9 @@ export function handleBugReviewVerdict(p) {
|
|
|
72
73
|
// (FORGE-S26-T18) — the same hand-off the preflight/postflight gate
|
|
73
74
|
// failures use — instead of a bare escalation. Best-effort, non-fatal.
|
|
74
75
|
const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
|
|
75
|
-
|
|
76
|
+
// FORGE-BUG-046: await the advisor so its diagnosis surfaces BEFORE the
|
|
77
|
+
// pipeline tears down (was `void` — fire-and-forget before pipeline-end).
|
|
78
|
+
await runHaltAdvisor({
|
|
76
79
|
gateFailure: {
|
|
77
80
|
phase: phase.role,
|
|
78
81
|
reasonCode: "verdict-missing",
|
|
@@ -88,6 +91,9 @@ export function handleBugReviewVerdict(p) {
|
|
|
88
91
|
ctx: { ui: ctx.ui },
|
|
89
92
|
forgeRoot,
|
|
90
93
|
});
|
|
94
|
+
// FEAT-009: offer an interactive recovery menu (reset → resume). No-op in
|
|
95
|
+
// non-interactive mode; best-effort, never masks the halt.
|
|
96
|
+
await offerRecoveryMenu({ ui: ctx.ui, kind: "bug", id: bugId, cwd, storeCli });
|
|
91
97
|
return {
|
|
92
98
|
kind: "return",
|
|
93
99
|
result: {
|
|
@@ -112,6 +118,32 @@ export function handleBugReviewVerdict(p) {
|
|
|
112
118
|
lastError: `revision cap reached for ${phase.role}`,
|
|
113
119
|
savedAt: new Date().toISOString(),
|
|
114
120
|
});
|
|
121
|
+
// FEAT-009: a revision-cap escalation is a halt like any other — route it
|
|
122
|
+
// through the halt-recovery advisor + recovery menu instead of leaving the
|
|
123
|
+
// bare error notify above as the only signal (matches the verdict-missing
|
|
124
|
+
// hand-off above and the run-task twin). Best-effort, non-fatal.
|
|
125
|
+
const gateFailure = {
|
|
126
|
+
phase: phase.role,
|
|
127
|
+
reasonCode: "revision-cap-reached",
|
|
128
|
+
detail: `Phase '${phase.role}' returned 'revision' ${iterationCounts[phase.role]} time(s), ` +
|
|
129
|
+
`reaching its cap of ${phase.maxIterations}. The reviewer kept requesting changes ` +
|
|
130
|
+
"and the predecessor phase could not satisfy them within the allowed iterations, " +
|
|
131
|
+
"so the pipeline halted rather than loop indefinitely.",
|
|
132
|
+
remediation: "Inspect the latest review feedback for this phase, address it manually, then " +
|
|
133
|
+
`reset the pipeline to the predecessor phase and resume — e.g. \`4ge reset ${bugId} ` +
|
|
134
|
+
`--to ${BUG_PHASES[findPredecessorIndex(BUG_PHASES, currentPhaseIndex)]?.role ?? phase.role}\` ` +
|
|
135
|
+
"— or re-run the bug once the underlying disagreement is resolved.",
|
|
136
|
+
};
|
|
137
|
+
const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
|
|
138
|
+
await runHaltAdvisor({
|
|
139
|
+
gateFailure,
|
|
140
|
+
advisorModel,
|
|
141
|
+
taskId: bugId,
|
|
142
|
+
cwd,
|
|
143
|
+
ctx: { ui: ctx.ui },
|
|
144
|
+
forgeRoot,
|
|
145
|
+
});
|
|
146
|
+
await offerRecoveryMenu({ ui: ctx.ui, kind: "bug", id: bugId, cwd, storeCli });
|
|
115
147
|
return {
|
|
116
148
|
kind: "return",
|
|
117
149
|
result: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bug-verdict-loop.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/bug-verdict-loop.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAC9E,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,iDAAiD;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM/C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA4BlD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,CAAuB;
|
|
1
|
+
{"version":3,"file":"bug-verdict-loop.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/bug-verdict-loop.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAC9E,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,eAAe;AACf,EAA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Y,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,aAAa,GAAG,EAClE,MAAM,CACN,CAAC;QACF,cAAc,CAAC,MAAM,CAAC;YACrB,IAAI,EAAE,gBAAgB;YACtB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAC5B,SAAS,EAAE,KAAK,CAAC,IAAI;YACrB,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC;YACzD,cAAc,EAAE,iBAAiB;YACjC,YAAY,EAAE,SAAS;YACvB,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,+BAA+B,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,aAAa,GAAG;SACzG,CAAC,CAAC;QACH,aAAa,CAAC,GAAG,EAAE;YAClB,KAAK;YACL,UAAU,EAAE,SAAS;YACrB,eAAe;YACf,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACjC,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IACjD,CAAC;IAED,kDAAkD;IAClD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -195,7 +195,7 @@ async function runBugPipelineInner(opts, modelRoutingConfig, session) {
|
|
|
195
195
|
// Spawn halt-recovery advisor (Tier 1, best-effort — non-fatal).
|
|
196
196
|
if (preflightOutcome.gateFailure) {
|
|
197
197
|
const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
|
|
198
|
-
|
|
198
|
+
await runHaltAdvisor({
|
|
199
199
|
gateFailure: preflightOutcome.gateFailure,
|
|
200
200
|
advisorModel,
|
|
201
201
|
taskId: bugId,
|
|
@@ -427,7 +427,7 @@ async function runBugPipelineInner(opts, modelRoutingConfig, session) {
|
|
|
427
427
|
}
|
|
428
428
|
// ── 6b. Verdict check (review phases only) ────────────────────
|
|
429
429
|
if (phase.isReview) {
|
|
430
|
-
const outcome = handleBugReviewVerdict({
|
|
430
|
+
const outcome = await handleBugReviewVerdict({
|
|
431
431
|
phase,
|
|
432
432
|
bugId,
|
|
433
433
|
storeCli,
|