@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
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
// Skill usage tracker — FORGE-S24-T09.
|
|
2
|
-
//
|
|
3
|
-
// After a task completes, diff the actual tool-call sequence against each
|
|
4
|
-
// retrieved skill's declared workflow steps and emit a follow-up `skill_usage`
|
|
5
|
-
// event per retrieved skill with `used: true | false` and a populated
|
|
6
|
-
// `tool_call_success_rate`. Conforms to the canonical `skill_usage` event
|
|
7
|
-
// schema variant landed in FORGE-S24-T01 (plugin v0.45.0).
|
|
8
|
-
//
|
|
9
|
-
// Heuristic (per FORGE-S24-T09 acceptance criteria):
|
|
10
|
-
// - Skill name appears in agent reasoning text → used: true
|
|
11
|
-
// - ≥2 distinct workflow steps overlap with executed tool calls → used: true
|
|
12
|
-
// - Otherwise → used: false
|
|
13
|
-
//
|
|
14
|
-
// `tool_call_success_rate` is the fraction of the skill's declared workflow
|
|
15
|
-
// steps that were observed in the trajectory (distinct overlaps / total
|
|
16
|
-
// steps), clamped to [0,1]. For skills with no declared steps, the rate is 0.
|
|
17
|
-
//
|
|
18
|
-
// Iron Laws (forge-cli-engineer):
|
|
19
|
-
// IL2 — TypeScript + TypeBox. Runtime input is validated by `Value.Parse`
|
|
20
|
-
// at the public emission entry point.
|
|
21
|
-
// IL6 — No raw shell-string interpolation. `emitSkillUsageTrackingEvents`
|
|
22
|
-
// calls `spawnSync("node", [storeCli, "emit", sprintId, JSON.stringify(event)])`
|
|
23
|
-
// — argv array, no shell.
|
|
24
|
-
// IL7 — No silent continuation past failures. A non-zero `store-cli emit`
|
|
25
|
-
// exit increments the `failed` counter and the stderr text is
|
|
26
|
-
// forwarded to the caller in the returned result; nothing is
|
|
27
|
-
// swallowed.
|
|
28
|
-
// IL10 — This module runs in **orchestrator context** (telemetry-actor
|
|
29
|
-
// split — see `engineering/architecture/telemetry-actor-split.md`).
|
|
30
|
-
// The orchestrator/caller supplies the runtime attribution
|
|
31
|
-
// (model/provider/timestamps/durationMinutes) — never fabricated
|
|
32
|
-
// here. The subagent NEVER invokes this tracker directly.
|
|
33
|
-
//
|
|
34
|
-
// Scope boundary: this module owns classification + emission. It does NOT
|
|
35
|
-
// crawl the filesystem for skills, parse subagent transcripts, or decide
|
|
36
|
-
// when "task close" is. The caller (Orchestrator handler — `run-task.ts`,
|
|
37
|
-
// `fix-bug.ts`, gated behind FORGE-S24-T12 feature flag) assembles the
|
|
38
|
-
// retrieved-skill list, trajectory, and runtime attribution, then invokes
|
|
39
|
-
// `emitSkillUsageTrackingEvents`.
|
|
40
|
-
import { Type } from "typebox";
|
|
41
|
-
import { Value } from "typebox/value";
|
|
42
|
-
import { spawnStoreCliEmit } from "./lib/spawn-store-cli.js";
|
|
43
|
-
import { isSkillCurationEnabled } from "./skill-curation-flag.js";
|
|
44
|
-
// ── Public schemas ───────────────────────────────────────────────────────
|
|
45
|
-
/**
|
|
46
|
-
* One skill that was previously retrieved (T08) and is now being evaluated
|
|
47
|
-
* for actual usage. `workflowSteps` is the list of declared step / tool /
|
|
48
|
-
* action names the skill's SKILL.md (or workflow doc) advertises — these
|
|
49
|
-
* are what we diff the trajectory against.
|
|
50
|
-
*
|
|
51
|
-
* Step matching is case-insensitive substring: a tool call's `name` matches
|
|
52
|
-
* a workflow step if the step (after lowercasing + whitespace collapse)
|
|
53
|
-
* appears anywhere in the tool call's name. This is intentionally permissive
|
|
54
|
-
* — declared steps are human-authored phrases ("store-cli query"), and tool
|
|
55
|
-
* call names may be qualified (`mcp__store__store-cli-query`). Misses bias
|
|
56
|
-
* toward `used: false`, which is the safer of the two error modes for a
|
|
57
|
-
* curation signal.
|
|
58
|
-
*/
|
|
59
|
-
export const RetrievedSkillForTrackingSchema = Type.Object({
|
|
60
|
-
skillId: Type.String({ minLength: 1 }),
|
|
61
|
-
name: Type.String({ minLength: 1 }),
|
|
62
|
-
workflowSteps: Type.Array(Type.String()),
|
|
63
|
-
});
|
|
64
|
-
/** One observed tool invocation in the task's trajectory. */
|
|
65
|
-
export const ToolCallObservationSchema = Type.Object({
|
|
66
|
-
name: Type.String({ minLength: 1 }),
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* The observable trajectory of a closed task: the sequence of tool calls
|
|
70
|
-
* the agent made, plus the concatenated reasoning / assistant text the
|
|
71
|
-
* orchestrator captured. Both inputs are supplied by the caller — this
|
|
72
|
-
* module does not read transcripts itself.
|
|
73
|
-
*/
|
|
74
|
-
export const TaskTrajectorySchema = Type.Object({
|
|
75
|
-
toolCalls: Type.Array(ToolCallObservationSchema),
|
|
76
|
-
reasoningText: Type.String(),
|
|
77
|
-
});
|
|
78
|
-
/**
|
|
79
|
-
* Runtime attribution supplied by the caller (orchestrator).
|
|
80
|
-
* These are NEVER fabricated inside the tracker (IL10).
|
|
81
|
-
*/
|
|
82
|
-
export const EmitRuntimeSchema = Type.Object({
|
|
83
|
-
storeCli: Type.String({ minLength: 1 }),
|
|
84
|
-
cwd: Type.String({ minLength: 1 }),
|
|
85
|
-
sprintId: Type.String({ minLength: 1 }),
|
|
86
|
-
taskId: Type.String({ minLength: 1 }),
|
|
87
|
-
role: Type.String({ minLength: 1 }),
|
|
88
|
-
action: Type.String({ minLength: 1 }),
|
|
89
|
-
phase: Type.Optional(Type.String()),
|
|
90
|
-
iteration: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
91
|
-
startTimestamp: Type.String({ format: "date-time" }),
|
|
92
|
-
endTimestamp: Type.String({ format: "date-time" }),
|
|
93
|
-
durationMinutes: Type.Number({ minimum: 0 }),
|
|
94
|
-
model: Type.String({ minLength: 1 }),
|
|
95
|
-
provider: Type.String({ minLength: 1 }),
|
|
96
|
-
});
|
|
97
|
-
// ── Classification ───────────────────────────────────────────────────────
|
|
98
|
-
/** Lowercase + collapse whitespace; safe for substring comparison. */
|
|
99
|
-
function normalize(s) {
|
|
100
|
-
return s.toLowerCase().replace(/\s+/g, " ").trim();
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Count the number of distinct declared workflow steps that appear in the
|
|
104
|
-
* observed tool-call sequence (case-insensitive substring). A step that
|
|
105
|
-
* matches multiple tool calls is counted once.
|
|
106
|
-
*/
|
|
107
|
-
function countStepOverlap(steps, toolCalls) {
|
|
108
|
-
if (steps.length === 0 || toolCalls.length === 0)
|
|
109
|
-
return 0;
|
|
110
|
-
const observed = toolCalls.map((c) => normalize(c.name));
|
|
111
|
-
let hits = 0;
|
|
112
|
-
for (const step of steps) {
|
|
113
|
-
const needle = normalize(step);
|
|
114
|
-
if (needle.length === 0)
|
|
115
|
-
continue;
|
|
116
|
-
if (observed.some((o) => o.includes(needle)))
|
|
117
|
-
hits++;
|
|
118
|
-
}
|
|
119
|
-
return hits;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Apply the FORGE-S24-T09 heuristic to a single retrieved skill against
|
|
123
|
-
* the observed task trajectory. Pure function — no IO, no allocation
|
|
124
|
-
* beyond return value.
|
|
125
|
-
*/
|
|
126
|
-
export function classifySkillUsage(skill, trajectory) {
|
|
127
|
-
const overlap = countStepOverlap(skill.workflowSteps, trajectory.toolCalls);
|
|
128
|
-
const totalSteps = skill.workflowSteps.length;
|
|
129
|
-
let rate = 0;
|
|
130
|
-
if (totalSteps > 0) {
|
|
131
|
-
const raw = overlap / totalSteps;
|
|
132
|
-
if (!Number.isFinite(raw) || raw < 0)
|
|
133
|
-
rate = 0;
|
|
134
|
-
else if (raw > 1)
|
|
135
|
-
rate = 1;
|
|
136
|
-
else
|
|
137
|
-
rate = raw;
|
|
138
|
-
}
|
|
139
|
-
// Signal 1: skill name appears in agent reasoning. The reasoning text is
|
|
140
|
-
// normalised the same way as steps so casing/whitespace doesn't cause
|
|
141
|
-
// false negatives.
|
|
142
|
-
const reasoning = normalize(trajectory.reasoningText);
|
|
143
|
-
const skillNeedle = normalize(skill.name);
|
|
144
|
-
const mentionedInReasoning = skillNeedle.length > 0 && reasoning.includes(skillNeedle);
|
|
145
|
-
// Signal 2: ≥2 distinct workflow steps overlapped with executed tool calls.
|
|
146
|
-
const overlapStrong = overlap >= 2;
|
|
147
|
-
if (overlapStrong) {
|
|
148
|
-
return { used: true, signal: "overlap", tool_call_success_rate: rate };
|
|
149
|
-
}
|
|
150
|
-
if (mentionedInReasoning) {
|
|
151
|
-
return { used: true, signal: "reasoning", tool_call_success_rate: rate };
|
|
152
|
-
}
|
|
153
|
-
return { used: false, signal: "none", tool_call_success_rate: rate };
|
|
154
|
-
}
|
|
155
|
-
// ── Emission ─────────────────────────────────────────────────────────────
|
|
156
|
-
/** Compose an ISO-compact timestamp segment for the eventId. */
|
|
157
|
-
function isoCompact(iso) {
|
|
158
|
-
return iso.replace(/[-:.]/g, "").replace(/Z$/, "Z");
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Emit one `skill_usage` tracking event per retrieved skill via
|
|
162
|
-
* `node <storeCli> emit <sprintId> <json>`. Each event carries the
|
|
163
|
-
* classifier's `used` verdict and the observed `tool_call_success_rate`.
|
|
164
|
-
*
|
|
165
|
-
* `retrieval_score` is set to 0 — at tracking time, the score has already
|
|
166
|
-
* been emitted in the T08 retrieval event; this follow-up captures the
|
|
167
|
-
* usage signal only. (The schema requires the field to be present; it does
|
|
168
|
-
* not require it to be re-derived per emission.)
|
|
169
|
-
*
|
|
170
|
-
* Never throws on subprocess failure — the failure is surfaced via the
|
|
171
|
-
* returned counter and stderr text (IL7, explicit not silent).
|
|
172
|
-
*/
|
|
173
|
-
export function emitSkillUsageTrackingEvents(retrieved, trajectory, runtime) {
|
|
174
|
-
// FORGE-S24-T12 — gated rollout. Default off ⇒ no classification, no
|
|
175
|
-
// events, no subprocess.
|
|
176
|
-
if (!isSkillCurationEnabled(runtime.cwd)) {
|
|
177
|
-
return { emitted: 0, failed: 0, stderrs: [] };
|
|
178
|
-
}
|
|
179
|
-
Value.Parse(EmitRuntimeSchema, runtime);
|
|
180
|
-
Value.Parse(TaskTrajectorySchema, trajectory);
|
|
181
|
-
for (const s of retrieved)
|
|
182
|
-
Value.Parse(RetrievedSkillForTrackingSchema, s);
|
|
183
|
-
let emitted = 0;
|
|
184
|
-
let failed = 0;
|
|
185
|
-
const stderrs = [];
|
|
186
|
-
for (let i = 0; i < retrieved.length; i++) {
|
|
187
|
-
const skill = retrieved[i];
|
|
188
|
-
const verdict = classifySkillUsage(skill, trajectory);
|
|
189
|
-
const eventId = `${isoCompact(runtime.startTimestamp)}_${runtime.taskId}_skill-usage-tracker_skill_usage_${i}_${skill.skillId}`;
|
|
190
|
-
const event = {
|
|
191
|
-
eventId,
|
|
192
|
-
sprintId: runtime.sprintId,
|
|
193
|
-
taskId: runtime.taskId,
|
|
194
|
-
role: runtime.role,
|
|
195
|
-
action: runtime.action,
|
|
196
|
-
startTimestamp: runtime.startTimestamp,
|
|
197
|
-
endTimestamp: runtime.endTimestamp,
|
|
198
|
-
durationMinutes: runtime.durationMinutes,
|
|
199
|
-
model: runtime.model,
|
|
200
|
-
provider: runtime.provider,
|
|
201
|
-
type: "skill_usage",
|
|
202
|
-
skillId: skill.skillId,
|
|
203
|
-
retrieved: true,
|
|
204
|
-
used: verdict.used,
|
|
205
|
-
tool_call_success_rate: verdict.tool_call_success_rate,
|
|
206
|
-
retrieval_score: 0,
|
|
207
|
-
};
|
|
208
|
-
if (runtime.phase !== undefined)
|
|
209
|
-
event.phase = runtime.phase;
|
|
210
|
-
if (runtime.iteration !== undefined)
|
|
211
|
-
event.iteration = runtime.iteration;
|
|
212
|
-
// FORGE-S25-T17: adopt spawnStoreCliEmit; adds missing 10 s timeout (N-C-A).
|
|
213
|
-
const emitResult = spawnStoreCliEmit(runtime.storeCli, runtime.sprintId, event, runtime.cwd);
|
|
214
|
-
if (emitResult.ok) {
|
|
215
|
-
emitted++;
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
failed++;
|
|
219
|
-
stderrs.push(emitResult.stderr);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return { emitted, failed, stderrs };
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=skill-usage-tracker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-usage-tracker.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/skill-usage-tracker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,sEAAsE;AACtE,0EAA0E;AAC1E,2DAA2D;AAC3D,EAAE;AACF,qDAAqD;AACrD,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,8EAA8E;AAC9E,EAAE;AACF,kCAAkC;AAClC,6EAA6E;AAC7E,+CAA+C;AAC/C,6EAA6E;AAC7E,0FAA0F;AAC1F,mCAAmC;AACnC,6EAA6E;AAC7E,uEAAuE;AACvE,sEAAsE;AACtE,sBAAsB;AACtB,yEAAyE;AACzE,6EAA6E;AAC7E,oEAAoE;AACpE,0EAA0E;AAC1E,mEAAmE;AACnE,EAAE;AACF,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,0EAA0E;AAC1E,kCAAkC;AAElC,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,4EAA4E;AAE5E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1D,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE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EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
mode: "empty" | "file" | "text";
|
|
4
|
-
seed: string;
|
|
5
|
-
sourceLabel: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function parseSprintIntakeArgs(rawArgs: string, cwd: string): ParsedArgs;
|
|
8
|
-
export declare function composeKickoff(workflowMd: string, parsed: ParsedArgs): string;
|
|
9
|
-
export declare function registerSprintIntake(pi: ExtensionAPI): void;
|
|
10
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// forge:sprint-intake — LLM-driven kickoff handler (FORGE-BUG-031).
|
|
2
|
-
//
|
|
3
|
-
// Replaces the deterministic TUI flow shipped in FORGE-S19-T01. The native
|
|
4
|
-
// handler is now a thin shim that:
|
|
5
|
-
// 1. Parses argv: empty | "@<path>" (file ref) | free-form text
|
|
6
|
-
// 2. Reads .forge/workflows/architect_sprint_intake.md
|
|
7
|
-
// 3. Composes a kickoff message (workflow + seed input)
|
|
8
|
-
// 4. Calls pi.sendUserMessage() to inject — LLM drives the interview using
|
|
9
|
-
// forge_store, forge_ask_user, write, read, forge_collate tools.
|
|
10
|
-
//
|
|
11
|
-
// No multi-turn TUI, no checkpoints, no scripted-answers env var. The LLM
|
|
12
|
-
// owns the conversation; the handler returns once the kickoff is queued.
|
|
13
|
-
//
|
|
14
|
-
// Persona/skill loading: this handler does not read `.forge/personas/` or
|
|
15
|
-
// `.forge/skills/` directly — the LLM dereferences those via the workflow
|
|
16
|
-
// text. Any future need for typed persona/skill access in this handler MUST
|
|
17
|
-
// go through `./loaders/persona-skill-loader.ts` (FORGE-S20-T02). The smoke
|
|
18
|
-
// gate enforces this with a grep assertion.
|
|
19
|
-
import * as fs from "node:fs";
|
|
20
|
-
import * as path from "node:path";
|
|
21
|
-
export function parseSprintIntakeArgs(rawArgs, cwd) {
|
|
22
|
-
const trimmed = (rawArgs ?? "").trim();
|
|
23
|
-
if (!trimmed) {
|
|
24
|
-
return { mode: "empty", seed: "", sourceLabel: "(no input — start interview)" };
|
|
25
|
-
}
|
|
26
|
-
if (trimmed.startsWith("@")) {
|
|
27
|
-
const ref = trimmed.slice(1).trim();
|
|
28
|
-
const filePath = path.isAbsolute(ref) ? ref : path.resolve(cwd, ref);
|
|
29
|
-
const seed = fs.readFileSync(filePath, "utf8");
|
|
30
|
-
return { mode: "file", seed, sourceLabel: `(seed from file: ${ref})` };
|
|
31
|
-
}
|
|
32
|
-
return { mode: "text", seed: trimmed, sourceLabel: "(seed from inline text)" };
|
|
33
|
-
}
|
|
34
|
-
// ── Kickoff composition ───────────────────────────────────────────────────
|
|
35
|
-
export function composeKickoff(workflowMd, parsed) {
|
|
36
|
-
const seedSection = parsed.mode === "empty"
|
|
37
|
-
? "\n## Input\n\n(no seed — begin interview now and elicit goals/scope/constraints conversationally)\n"
|
|
38
|
-
: `\n## Input — ${parsed.sourceLabel}\n\n${parsed.seed.trim()}\n`;
|
|
39
|
-
return [
|
|
40
|
-
"# /forge:new-sprint",
|
|
41
|
-
"",
|
|
42
|
-
"Run the sprint-intake workflow below. Drive the interview conversationally — read referenced personas/skills/templates as needed, ask clarifying questions one at a time, and write `engineering/sprints/<SPRINT_ID>/SPRINT_REQUIREMENTS.md` plus the corresponding store records when ready. For the canonical sprint record, call the `forge_store` MCP tool with `{command:'write', args:['sprint','<json>']}` — 2-positional, id INSIDE json. Call `forge_store_template` first to get the json shape. Do NOT bash-shell `forge store ...`.",
|
|
43
|
-
"",
|
|
44
|
-
"---",
|
|
45
|
-
"",
|
|
46
|
-
"## Workflow",
|
|
47
|
-
"",
|
|
48
|
-
workflowMd.trim(),
|
|
49
|
-
"",
|
|
50
|
-
"---",
|
|
51
|
-
seedSection,
|
|
52
|
-
].join("\n");
|
|
53
|
-
}
|
|
54
|
-
// ── Registration ──────────────────────────────────────────────────────────
|
|
55
|
-
const WORKFLOW_REL_PATH = path.join(".forge", "workflows", "architect_sprint_intake.md");
|
|
56
|
-
export function registerSprintIntake(pi) {
|
|
57
|
-
pi.registerCommand("forge:new-sprint", {
|
|
58
|
-
description: "Start an LLM-driven sprint-intake interview. " +
|
|
59
|
-
"Usage: /forge:new-sprint [@<file> | <free-form text>]. " +
|
|
60
|
-
"Empty args start a conversational interview from scratch.",
|
|
61
|
-
async handler(args, ctx) {
|
|
62
|
-
const cwd = process.cwd();
|
|
63
|
-
const workflowPath = path.join(cwd, WORKFLOW_REL_PATH);
|
|
64
|
-
if (!fs.existsSync(workflowPath)) {
|
|
65
|
-
ctx.ui.notify(`forge:new-sprint — workflow not found at ${WORKFLOW_REL_PATH}; run /forge:init or /forge:rebuild first.`, "warning");
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
let parsed;
|
|
69
|
-
try {
|
|
70
|
-
parsed = parseSprintIntakeArgs(args, cwd);
|
|
71
|
-
}
|
|
72
|
-
catch (err) {
|
|
73
|
-
const e = err;
|
|
74
|
-
ctx.ui.notify(`forge:new-sprint — failed to read seed: ${e.message ?? "unknown"}`, "error");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
let workflowMd;
|
|
78
|
-
try {
|
|
79
|
-
workflowMd = fs.readFileSync(workflowPath, "utf8");
|
|
80
|
-
}
|
|
81
|
-
catch (err) {
|
|
82
|
-
const e = err;
|
|
83
|
-
ctx.ui.notify(`forge:new-sprint — failed to read workflow: ${e.message ?? "unknown"}`, "error");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const kickoff = composeKickoff(workflowMd, parsed);
|
|
87
|
-
pi.sendUserMessage(kickoff);
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=sprint-intake.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sprint-intake.js","sourceRoot":"","sources":["../../../src/ext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YAAC,OAAO,GAAY,EAAE,CAAC;gBACvB,MAAM,CAAC,GAAG,GAA2B,CAAC;gBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC5F,OAAO;YACR,CAAC;YAED,IAAI,UAAkB,CAAC;YACvB,IAAI,CAAC;gBACJ,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,GAAY,EAAE,CAAC;gBACvB,MAAM,CAAC,GAAG,GAA2B,CAAC;gBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,+CAA+C,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;gBAChG,OAAO;YACR,CAAC;YAED,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YACnD,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
sprintId: string;
|
|
4
|
-
seedMode: "none" | "file" | "text";
|
|
5
|
-
seed: string;
|
|
6
|
-
sourceLabel: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function parseSprintPlanArgs(rawArgs: string, cwd: string): ParsedArgs;
|
|
9
|
-
export declare function composeKickoff(workflowMd: string, parsed: ParsedArgs, requirements: {
|
|
10
|
-
path: string;
|
|
11
|
-
content: string;
|
|
12
|
-
} | null): string;
|
|
13
|
-
export declare function registerSprintPlan(pi: ExtensionAPI): void;
|
|
14
|
-
export {};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
// forge:sprint-plan — LLM-driven kickoff handler (FORGE-BUG-032).
|
|
2
|
-
//
|
|
3
|
-
// Replaces the deterministic JSON-mode subagent call shipped in FORGE-S19-T02.
|
|
4
|
-
// The handler is now a thin shim that:
|
|
5
|
-
// 1. Parses argv: <SPRINT_ID> [@<file> | free-form text]
|
|
6
|
-
// 2. Reads SPRINT_REQUIREMENTS.md (or REQUIREMENTS.md alias) when present
|
|
7
|
-
// 3. Reads .forge/workflows/architect_sprint_plan.md
|
|
8
|
-
// 4. Composes a kickoff message (workflow + requirements + optional seed)
|
|
9
|
-
// 5. Calls pi.sendUserMessage() — LLM drives task decomposition with
|
|
10
|
-
// forge_store write task per task, no rigid JSON contract.
|
|
11
|
-
//
|
|
12
|
-
// Persona/skill loading: this handler does not read `.forge/personas/` or
|
|
13
|
-
// `.forge/skills/` directly — the LLM dereferences those via the workflow
|
|
14
|
-
// text. Any future need for typed persona/skill access in this handler MUST
|
|
15
|
-
// go through `./loaders/persona-skill-loader.ts` (FORGE-S20-T02). The smoke
|
|
16
|
-
// gate enforces this with a grep assertion.
|
|
17
|
-
import * as fs from "node:fs";
|
|
18
|
-
import * as path from "node:path";
|
|
19
|
-
export function parseSprintPlanArgs(rawArgs, cwd) {
|
|
20
|
-
const trimmed = (rawArgs ?? "").trim();
|
|
21
|
-
if (!trimmed) {
|
|
22
|
-
throw new Error("sprint ID required — usage: /forge:plan-sprint <SPRINT_ID> [@<file> | <text>]");
|
|
23
|
-
}
|
|
24
|
-
const [sprintId, ...rest] = trimmed.split(/\s+/);
|
|
25
|
-
const tail = rest.join(" ").trim();
|
|
26
|
-
if (!tail) {
|
|
27
|
-
return { sprintId, seedMode: "none", seed: "", sourceLabel: "" };
|
|
28
|
-
}
|
|
29
|
-
if (tail.startsWith("@")) {
|
|
30
|
-
const ref = tail.slice(1).trim();
|
|
31
|
-
const filePath = path.isAbsolute(ref) ? ref : path.resolve(cwd, ref);
|
|
32
|
-
const seed = fs.readFileSync(filePath, "utf8");
|
|
33
|
-
return { sprintId, seedMode: "file", seed, sourceLabel: `(seed from file: ${ref})` };
|
|
34
|
-
}
|
|
35
|
-
return { sprintId, seedMode: "text", seed: tail, sourceLabel: "(seed from inline text)" };
|
|
36
|
-
}
|
|
37
|
-
// ── Requirements lookup ───────────────────────────────────────────────────
|
|
38
|
-
function resolveRequirements(cwd, sprintId) {
|
|
39
|
-
const sprintDir = path.join(cwd, "engineering", "sprints", sprintId);
|
|
40
|
-
for (const name of ["SPRINT_REQUIREMENTS.md", "REQUIREMENTS.md"]) {
|
|
41
|
-
const p = path.join(sprintDir, name);
|
|
42
|
-
try {
|
|
43
|
-
const content = fs.readFileSync(p, "utf8");
|
|
44
|
-
return { path: p, content };
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
/* try next */
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
// ── Kickoff composition ───────────────────────────────────────────────────
|
|
53
|
-
export function composeKickoff(workflowMd, parsed, requirements) {
|
|
54
|
-
const sections = [
|
|
55
|
-
"# /forge:plan-sprint",
|
|
56
|
-
"",
|
|
57
|
-
`Decompose sprint ${parsed.sprintId} into tasks. Drive the planning conversationally per the workflow below — read referenced personas/skills, validate dependencies, and write each task by calling the \`forge_store\` MCP tool with \`{command:'write', args:['task','<json>']}\` (2-positional, id INSIDE json) once you and the user agree on the shape. Call \`forge_store_template\` first for the canonical task shape. Update the sprint record (same tool, args:['sprint','<json>']) with the final task ID list. Do not return a single bulk JSON array; commit tasks one at a time so the user can interject. Do NOT bash-shell \`forge store ...\`.`,
|
|
58
|
-
"",
|
|
59
|
-
"---",
|
|
60
|
-
"",
|
|
61
|
-
"## Workflow",
|
|
62
|
-
"",
|
|
63
|
-
workflowMd.trim(),
|
|
64
|
-
"",
|
|
65
|
-
"---",
|
|
66
|
-
"",
|
|
67
|
-
`## Sprint: ${parsed.sprintId}`,
|
|
68
|
-
];
|
|
69
|
-
if (requirements) {
|
|
70
|
-
sections.push("", `Requirements file: \`${path.relative(process.cwd(), requirements.path)}\``);
|
|
71
|
-
sections.push("", "```markdown", requirements.content.trim(), "```");
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
sections.push("", `(no requirements file found at engineering/sprints/${parsed.sprintId}/SPRINT_REQUIREMENTS.md or REQUIREMENTS.md — ask the user to confirm intent or run /forge:new-sprint first)`);
|
|
75
|
-
}
|
|
76
|
-
if (parsed.seedMode !== "none") {
|
|
77
|
-
sections.push("", `## Additional Input — ${parsed.sourceLabel}`, "", parsed.seed.trim());
|
|
78
|
-
}
|
|
79
|
-
return sections.join("\n");
|
|
80
|
-
}
|
|
81
|
-
// ── Registration ──────────────────────────────────────────────────────────
|
|
82
|
-
const WORKFLOW_REL_PATH = path.join(".forge", "workflows", "architect_sprint_plan.md");
|
|
83
|
-
export function registerSprintPlan(pi) {
|
|
84
|
-
pi.registerCommand("forge:plan-sprint", {
|
|
85
|
-
description: "Start an LLM-driven sprint task-decomposition session. " +
|
|
86
|
-
"Usage: /forge:plan-sprint <SPRINT_ID> [@<file> | <free-form text>]. " +
|
|
87
|
-
"Reads SPRINT_REQUIREMENTS.md (or REQUIREMENTS.md) from the sprint directory.",
|
|
88
|
-
async handler(args, ctx) {
|
|
89
|
-
const cwd = process.cwd();
|
|
90
|
-
let parsed;
|
|
91
|
-
try {
|
|
92
|
-
parsed = parseSprintPlanArgs(args, cwd);
|
|
93
|
-
}
|
|
94
|
-
catch (err) {
|
|
95
|
-
const e = err;
|
|
96
|
-
ctx.ui.notify(`× forge:plan-sprint — ${e.message ?? "argv parse failed"}`, "error");
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const workflowPath = path.join(cwd, WORKFLOW_REL_PATH);
|
|
100
|
-
if (!fs.existsSync(workflowPath)) {
|
|
101
|
-
ctx.ui.notify(`× forge:plan-sprint — workflow not found at ${WORKFLOW_REL_PATH}; run /forge:init or /forge:rebuild first.`, "error");
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
let workflowMd;
|
|
105
|
-
try {
|
|
106
|
-
workflowMd = fs.readFileSync(workflowPath, "utf8");
|
|
107
|
-
}
|
|
108
|
-
catch (err) {
|
|
109
|
-
const e = err;
|
|
110
|
-
ctx.ui.notify(`× forge:plan-sprint — failed to read workflow: ${e.message ?? "unknown"}`, "error");
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
const requirements = resolveRequirements(cwd, parsed.sprintId);
|
|
114
|
-
if (!requirements) {
|
|
115
|
-
ctx.ui.notify(`△ forge:plan-sprint — no SPRINT_REQUIREMENTS.md found at engineering/sprints/${parsed.sprintId}/. Continuing; LLM will ask you for context.`, "warning");
|
|
116
|
-
}
|
|
117
|
-
const kickoff = composeKickoff(workflowMd, parsed, requirements);
|
|
118
|
-
pi.sendUserMessage(kickoff);
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=sprint-plan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sprint-plan.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/sprint-plan.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,+EAA+E;AAC/E,uCAAuC;AACvC,2DAA2D;AAC3D,4EAA4E;AAC5E,uDAAuD;AACvD,4EAA4E;AAC5E,uEAAuE;AACvE,gEAAgE;AAChE,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,4EAA4E;AAC5E,4EAA4E;AAC5E,4CAA4C;AAE5C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAYlC,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,GAAW;IAC/D,MAAM,OAAO,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;IAClG,CAAC;IACD,MAAM,CAA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,GAA2B,CAAC;gBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;gBACnG,OAAO;YACR,CAAC;YAED,MAAM,YAAY,GAAG,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/D,IAAI,CAAC,YAAY,EAAE,CAAC;gBACnB,GAAG,CAAC,EAAE,CAAC,MAAM,CACZ,gFAAgF,MAAM,CAAC,QAAQ,8CAA8C,EAC7I,SAAS,CACT,CAAC;YACH,CAAC;YAED,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YACjE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
export interface StatusResult {
|
|
3
|
-
lines: string[];
|
|
4
|
-
hasActiveSprint: boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Read active sprint and its tasks from store-cli.
|
|
8
|
-
* Returns formatted text lines for display via ctx.ui.notify.
|
|
9
|
-
* Exported so orchestrators can call directly without going through sendUserMessage.
|
|
10
|
-
*/
|
|
11
|
-
export declare function runStatus(forgeRoot: string, cwd: string): Promise<StatusResult>;
|
|
12
|
-
/**
|
|
13
|
-
* Register /forge:status (v0 native handler).
|
|
14
|
-
* forgeRoot is nullable — null means we're outside a Forge project.
|
|
15
|
-
*/
|
|
16
|
-
export declare function registerStatusCommand(pi: ExtensionAPI, opts: {
|
|
17
|
-
forgeRoot: string | null;
|
|
18
|
-
}): void;
|
|
19
|
-
export declare function readForgeRootFromConfig(cwd: string): string | null;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// status-command.ts — native v0 handler for /forge:status (FORGE-S23-T10)
|
|
2
|
-
//
|
|
3
|
-
// Replaces the delegateMarkdownCommand stub that previously lived in forge-commands.ts.
|
|
4
|
-
// Reads the active sprint from store and lists tasks with their statuses.
|
|
5
|
-
// No TUI — text-only widget via ctx.ui.notify.
|
|
6
|
-
//
|
|
7
|
-
// Archetype: Atomic (no LLM in loop — pack-04 §Atomic).
|
|
8
|
-
// Iron Laws:
|
|
9
|
-
// IL1 — new code lives in forge-cli/ only
|
|
10
|
-
// IL6 — no shell-string interpolation (argv-array throughout)
|
|
11
|
-
// IL7 — silent continuation past failures is never acceptable
|
|
12
|
-
import { execFile } from "node:child_process";
|
|
13
|
-
import * as fs from "node:fs";
|
|
14
|
-
import * as path from "node:path";
|
|
15
|
-
import { promisify } from "node:util";
|
|
16
|
-
import { resolveToolDir } from "./store-resolver.js";
|
|
17
|
-
const execFileAsync = promisify(execFile);
|
|
18
|
-
/**
|
|
19
|
-
* Read active sprint and its tasks from store-cli.
|
|
20
|
-
* Returns formatted text lines for display via ctx.ui.notify.
|
|
21
|
-
* Exported so orchestrators can call directly without going through sendUserMessage.
|
|
22
|
-
*/
|
|
23
|
-
export async function runStatus(forgeRoot, cwd) {
|
|
24
|
-
const toolDir = resolveToolDir(forgeRoot);
|
|
25
|
-
const storeCliPath = path.join(toolDir, "store-cli.cjs");
|
|
26
|
-
// Step 1: list all sprints
|
|
27
|
-
let listResult;
|
|
28
|
-
try {
|
|
29
|
-
const out = await execFileAsync("node", [storeCliPath, "query", "--list-sprints"], {
|
|
30
|
-
cwd,
|
|
31
|
-
encoding: "utf8",
|
|
32
|
-
timeout: 10_000,
|
|
33
|
-
});
|
|
34
|
-
listResult = JSON.parse(out.stdout);
|
|
35
|
-
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
38
|
-
return {
|
|
39
|
-
lines: [`× forge:status — could not list sprints: ${msg}`],
|
|
40
|
-
hasActiveSprint: false,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// Step 2: filter active sprints, sort by ID descending (proxy for recency)
|
|
44
|
-
const activeSprints = (listResult.results ?? [])
|
|
45
|
-
.filter((s) => s.status === "active")
|
|
46
|
-
.sort((a, b) => b.id.localeCompare(a.id));
|
|
47
|
-
if (activeSprints.length === 0) {
|
|
48
|
-
return {
|
|
49
|
-
lines: [
|
|
50
|
-
"forge:status — No active sprint found.",
|
|
51
|
-
'Run /forge:init to initialise a project, or check your store with /forge:search "--list-sprints".',
|
|
52
|
-
],
|
|
53
|
-
hasActiveSprint: false,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
// Use the most recent active sprint
|
|
57
|
-
const sprint = activeSprints[0];
|
|
58
|
-
// Step 3: fetch tasks for this sprint
|
|
59
|
-
let sprintResult;
|
|
60
|
-
try {
|
|
61
|
-
const out = await execFileAsync("node", [storeCliPath, "query", "--sprint", sprint.id], {
|
|
62
|
-
cwd,
|
|
63
|
-
encoding: "utf8",
|
|
64
|
-
timeout: 10_000,
|
|
65
|
-
});
|
|
66
|
-
sprintResult = JSON.parse(out.stdout);
|
|
67
|
-
}
|
|
68
|
-
catch (err) {
|
|
69
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
70
|
-
return {
|
|
71
|
-
lines: [`× forge:status — could not fetch tasks for sprint ${sprint.id}: ${msg}`],
|
|
72
|
-
hasActiveSprint: true,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const tasks = sprintResult.results ?? [];
|
|
76
|
-
// Step 4: format output
|
|
77
|
-
const lines = [
|
|
78
|
-
`Sprint: ${sprint.id}${sprint.title ? ` — ${sprint.title}` : ""}`,
|
|
79
|
-
`Tasks: ${tasks.length}`,
|
|
80
|
-
"",
|
|
81
|
-
];
|
|
82
|
-
if (tasks.length === 0) {
|
|
83
|
-
lines.push(" (no tasks found)");
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
for (const task of tasks) {
|
|
87
|
-
const status = task.status ?? "unknown";
|
|
88
|
-
const title = task.title ? ` — ${task.title.slice(0, 60)}` : "";
|
|
89
|
-
lines.push(` ${task.id} [${status}]${title}`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (activeSprints.length > 1) {
|
|
93
|
-
lines.push("");
|
|
94
|
-
lines.push(` Note: ${activeSprints.length - 1} other active sprint(s) found. Showing most recent (${sprint.id}).`);
|
|
95
|
-
}
|
|
96
|
-
return { lines, hasActiveSprint: true };
|
|
97
|
-
}
|
|
98
|
-
// ── Register ─────────────────────────────────────────────────────────────────
|
|
99
|
-
/**
|
|
100
|
-
* Register /forge:status (v0 native handler).
|
|
101
|
-
* forgeRoot is nullable — null means we're outside a Forge project.
|
|
102
|
-
*/
|
|
103
|
-
export function registerStatusCommand(pi, opts) {
|
|
104
|
-
pi.registerCommand("forge:status", {
|
|
105
|
-
description: "Sprint and task summary widget — lists active sprint and task statuses.",
|
|
106
|
-
async handler(_args, ctx) {
|
|
107
|
-
const cwd = process.cwd();
|
|
108
|
-
// Outside-project guard
|
|
109
|
-
if (!opts.forgeRoot) {
|
|
110
|
-
ctx.ui.notify("× forge:status — not inside a Forge project. Run /forge:init first.", "error");
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
ctx.ui.setStatus?.("forge:status", "Loading sprint status…");
|
|
114
|
-
const result = await runStatus(opts.forgeRoot, cwd);
|
|
115
|
-
ctx.ui.setStatus?.("forge:status", undefined);
|
|
116
|
-
for (const line of result.lines) {
|
|
117
|
-
const severity = line.startsWith("×") ? "error" : "info";
|
|
118
|
-
ctx.ui.notify(line, severity);
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
// ── Outside-project config guard helper ──────────────────────────────────────
|
|
124
|
-
// Not used above because forgeRoot is passed in at register time, but exported
|
|
125
|
-
// for use in tests that need to verify the guard path.
|
|
126
|
-
export function readForgeRootFromConfig(cwd) {
|
|
127
|
-
try {
|
|
128
|
-
const configPath = path.join(cwd, ".forge", "config.json");
|
|
129
|
-
const raw = fs.readFileSync(configPath, "utf8");
|
|
130
|
-
const cfg = JSON.parse(raw);
|
|
131
|
-
const paths = cfg.paths;
|
|
132
|
-
if (paths && typeof paths.forgeRoot === "string")
|
|
133
|
-
return paths.forgeRoot;
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
// fall through
|
|
137
|
-
}
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=status-command.js.map
|