@entelligentsia/forgecli 1.0.25 → 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 +341 -0
- package/README.md +2 -0
- package/dist/CHANGELOG-forge-plugin.md +264 -0
- package/dist/CHANGELOG-pi.md +143 -0
- package/dist/bin/argv.d.ts +2 -2
- package/dist/bin/argv.js +37 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +30 -16
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/init.d.ts +23 -0
- package/dist/bin/init.js +123 -0
- package/dist/bin/init.js.map +1 -0
- 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/bin/uninstall.d.ts +20 -0
- package/dist/bin/uninstall.js +141 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.d.ts +40 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +384 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.d.ts +46 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js +245 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.d.ts +23 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +235 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -0
- 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/dashboard/component.js +10 -7
- package/dist/extensions/forgecli/dashboard/component.js.map +1 -1
- 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-body.d.ts +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js +65 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.d.ts +23 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js +140 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.d.ts +54 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js +349 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +11 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +82 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js +100 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.d.ts +72 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js +204 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +38 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +198 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js +55 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.d.ts +7 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js +293 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +501 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.d.ts +41 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.d.ts +43 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js +85 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.d.ts +8 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.d.ts +28 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js +45 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.d.ts +26 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js +75 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js.map +1 -0
- 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/common/summary-recovery.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/fix-bug.d.ts +9 -93
- package/dist/extensions/forgecli/orchestrators/fix-bug.js +23 -1721
- package/dist/extensions/forgecli/orchestrators/fix-bug.js.map +1 -1
- 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/run-sprint.d.ts +3 -12
- package/dist/extensions/forgecli/orchestrators/run-sprint.js +48 -270
- package/dist/extensions/forgecli/orchestrators/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/run-task.d.ts +10 -214
- package/dist/extensions/forgecli/orchestrators/run-task.js +31 -1481
- package/dist/extensions/forgecli/orchestrators/run-task.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.d.ts +33 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js +135 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.d.ts +18 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js +55 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js +174 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +494 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.d.ts +62 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.d.ts +4 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js +48 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.d.ts +63 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js +185 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.d.ts +34 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js +78 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.d.ts +42 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js +370 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +17 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +48 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js +58 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js +35 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +36 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +187 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -0
- 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/extensions/forgecli/update/forge-update-command.js +10 -7
- package/dist/extensions/forgecli/update/forge-update-command.js.map +1 -1
- package/dist/forge-payload/.base-pack/workflows/collator_agent.md +5 -6
- package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +1 -1
- package/dist/forge-payload/.base-pack/workflows-js/wfl-init.js +449 -0
- 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 +170 -0
- package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/commands/add-pipeline.md +1 -1
- package/dist/forge-payload/commands/add-task.md +3 -3
- package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +2 -2
- package/dist/forge-payload/commands/ask.md +1 -1
- package/dist/forge-payload/commands/check-agent.md +8 -24
- package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +2 -2
- package/dist/forge-payload/commands/config.md +1 -1
- package/dist/forge-payload/commands/enhance.md +31 -5
- package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +2 -2
- package/dist/forge-payload/commands/health.md +1 -1
- package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +2 -2
- package/dist/forge-payload/commands/init.md +186 -67
- package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +2 -2
- package/dist/forge-payload/commands/rebuild.md +3 -3
- package/dist/forge-payload/commands/remove.md +1 -1
- package/dist/forge-payload/commands/repair.md +1 -1
- package/dist/forge-payload/commands/report-bug.md +1 -1
- package/dist/forge-payload/commands/reset.md +117 -0
- package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +2 -2
- package/dist/forge-payload/commands/status.md +1 -1
- package/dist/forge-payload/commands/update.md +3 -3
- package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +2 -2
- package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
- package/dist/forge-payload/hooks/lib/common.cjs +228 -0
- package/dist/forge-payload/hooks/lib/plugin-detection.cjs +106 -0
- package/dist/forge-payload/hooks/lib/update-msg.cjs +23 -0
- package/dist/forge-payload/hooks/lib/update-url.cjs +46 -0
- package/dist/forge-payload/hooks/lib/write-registry.js +53 -0
- package/dist/forge-payload/init/discovery/discover-database.md +32 -0
- package/dist/forge-payload/init/discovery/discover-processes.md +31 -0
- package/dist/forge-payload/init/discovery/discover-routing.md +31 -0
- package/dist/forge-payload/init/discovery/discover-stack.md +33 -0
- package/dist/forge-payload/init/discovery/discover-testing.md +34 -0
- package/dist/forge-payload/init/generation/generate-commands.md +171 -0
- package/dist/forge-payload/init/generation/generate-kb-doc.md +60 -0
- package/dist/forge-payload/init/generation/generate-persona.md +73 -0
- package/dist/forge-payload/init/generation/generate-skill.md +66 -0
- package/dist/forge-payload/init/generation/generate-template.md +60 -0
- package/dist/forge-payload/init/generation/generate-tools.md +133 -0
- package/dist/forge-payload/init/generation/generate-workflows.md +78 -0
- package/dist/forge-payload/init/phases/phase-1-collect.md +10 -2
- package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
- package/dist/forge-payload/init/phases/phase-4-register.md +8 -0
- package/dist/forge-payload/init/workflow-gen-plan.json +17 -0
- package/dist/forge-payload/integrity.json +33 -18
- package/dist/forge-payload/meta/workflows/meta-collate.md +5 -6
- package/dist/forge-payload/meta/workflows/meta-migrate.md +1 -1
- 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 +5 -12
- package/dist/forge-payload/tools/forge-preflight.cjs +268 -0
- package/dist/forge-payload/tools/lib/paths.cjs +12 -11
- package/dist/forge-payload/tools/lib/pricing.cjs +31 -11
- package/dist/forge-payload/tools/query-logger.cjs +34 -0
- 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 +14 -7
- 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/package.json +8 -7
- package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
- package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// bug-verdict-loop.ts — review-phase verdict + revision/loopback handling for
|
|
2
|
+
// the fix-bug pipeline. Extracted VERBATIM from fix-bug.ts's phase loop
|
|
3
|
+
// (FORGE-S31 file-size refactor) as a pure decision function: it performs the
|
|
4
|
+
// same store reads, ctx.ui notifications, state writes, transcript records,
|
|
5
|
+
// tree-node finalization, status-reset transition, and halt-advisor dispatch the
|
|
6
|
+
// inline block did, and returns a small discriminated result the caller's loop
|
|
7
|
+
// switches on.
|
|
8
|
+
//
|
|
9
|
+
// Behavior-preserving: no logic changes. The only structural change is that the
|
|
10
|
+
// inline `return {...}` paths now return `{ kind: "return"; result }`, the
|
|
11
|
+
// `continue` path returns `{ kind: "loopback"; toIndex }`, and the fall-through
|
|
12
|
+
// (approved) path returns `{ kind: "advance" }`.
|
|
13
|
+
import { spawnSync } from "node:child_process";
|
|
14
|
+
import { resolveAdvisorModel, runHaltAdvisor } from "../halt-advisor.js";
|
|
15
|
+
import { offerRecoveryMenu } from "../common/recovery-menu.js";
|
|
16
|
+
import { recoverPhaseSummary } from "../common/summary-recovery.js";
|
|
17
|
+
import { findPredecessorIndex } from "../run-task.js";
|
|
18
|
+
import { BUG_PHASES } from "./bug-phases.js";
|
|
19
|
+
import { readBugRecord } from "./bug-id.js";
|
|
20
|
+
import { writeBugState } from "./bug-state.js";
|
|
21
|
+
import { readBugVerdict } from "./bug-verdict.js";
|
|
22
|
+
/**
|
|
23
|
+
* Evaluate the review-phase verdict and decide the loop's next move.
|
|
24
|
+
* Mirrors the inline block that previously lived in runBugPipelineInner.
|
|
25
|
+
*/
|
|
26
|
+
export async function handleBugReviewVerdict(p) {
|
|
27
|
+
const { phase, bugId, storeCli, cwd, forgeRoot, iterationCounts, currentPhaseIndex, modelRoutingConfig, ctx } = p;
|
|
28
|
+
const { orchTranscript, finishPhaseNode, summaryKeyByRole, recoveredPhases } = p;
|
|
29
|
+
// Re-read bug record for latest status after subagent ran
|
|
30
|
+
const updatedBugRecord = readBugRecord(bugId, storeCli, cwd);
|
|
31
|
+
let verdict = readBugVerdict(updatedBugRecord, phase.role, summaryKeyByRole);
|
|
32
|
+
// Completion recovery (forge-engineering#41): a clean stop with no verdict in
|
|
33
|
+
// the store is most often the subagent writing the {PHASE}-SUMMARY.json
|
|
34
|
+
// sidecar but eliding the set-bug-summary that registers it. Register the
|
|
35
|
+
// sidecar ourselves (once per phase), then re-read. Phases whose verdict comes
|
|
36
|
+
// from bug.status (e.g. commit → summaryKey null) are not recoverable this way.
|
|
37
|
+
if (verdict === "missing") {
|
|
38
|
+
const summaryKey = summaryKeyByRole[phase.role];
|
|
39
|
+
if (summaryKey && !recoveredPhases.has(phase.role)) {
|
|
40
|
+
recoveredPhases.add(phase.role);
|
|
41
|
+
const rec = recoverPhaseSummary({
|
|
42
|
+
storeCli,
|
|
43
|
+
entityId: bugId,
|
|
44
|
+
summaryKey,
|
|
45
|
+
cwd,
|
|
46
|
+
summaryVerb: "set-bug-summary",
|
|
47
|
+
});
|
|
48
|
+
if (rec.ok) {
|
|
49
|
+
const recheck = readBugVerdict(readBugRecord(bugId, storeCli, cwd), phase.role, summaryKeyByRole);
|
|
50
|
+
if (recheck !== "missing") {
|
|
51
|
+
ctx.ui.notify(`⟳ forge:fix-bug — ${phase.role}: subagent skipped set-bug-summary; orchestrator registered ` +
|
|
52
|
+
`the '${summaryKey}' sidecar and the verdict is now present.`, "info");
|
|
53
|
+
verdict = recheck;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (verdict === "missing") {
|
|
59
|
+
ctx.ui.notify(`× forge:fix-bug — verdict missing for phase ${phase.role} after subagent completed. Halting for advisory.`, "error");
|
|
60
|
+
finishPhaseNode("failed");
|
|
61
|
+
writeBugState(cwd, {
|
|
62
|
+
bugId,
|
|
63
|
+
phaseIndex: currentPhaseIndex,
|
|
64
|
+
iterationCounts,
|
|
65
|
+
halted: true,
|
|
66
|
+
lastError: `verdict missing for ${phase.role}`,
|
|
67
|
+
savedAt: new Date().toISOString(),
|
|
68
|
+
});
|
|
69
|
+
// A missing verdict IS a postflight-outputs failure: the canonical
|
|
70
|
+
// phase summary the subagent must write (e.g. summaries.code_review,
|
|
71
|
+
// linked via set-bug-summary) was never recorded, so there is no
|
|
72
|
+
// verdict to route on. Route it through the halt-recovery advisor
|
|
73
|
+
// (FORGE-S26-T18) — the same hand-off the preflight/postflight gate
|
|
74
|
+
// failures use — instead of a bare escalation. Best-effort, non-fatal.
|
|
75
|
+
const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
|
|
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({
|
|
79
|
+
gateFailure: {
|
|
80
|
+
phase: phase.role,
|
|
81
|
+
reasonCode: "verdict-missing",
|
|
82
|
+
detail: `Phase '${phase.role}' completed but no verdict was found in the store. ` +
|
|
83
|
+
"The canonical phase summary was not written, so the orchestrator has no verdict to route on.",
|
|
84
|
+
remediation: "Re-run the phase and ensure the subagent's forge_store set-bug-summary call " +
|
|
85
|
+
'uses args:["<bugId>", "<phaseKey>"] with the literal phase key as args[1] ' +
|
|
86
|
+
"(e.g. code_review), and that the call exits zero before the subagent returns.",
|
|
87
|
+
},
|
|
88
|
+
advisorModel,
|
|
89
|
+
taskId: bugId,
|
|
90
|
+
cwd,
|
|
91
|
+
ctx: { ui: ctx.ui },
|
|
92
|
+
forgeRoot,
|
|
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 });
|
|
97
|
+
return {
|
|
98
|
+
kind: "return",
|
|
99
|
+
result: {
|
|
100
|
+
status: "halted",
|
|
101
|
+
lastPhaseIndex: currentPhaseIndex,
|
|
102
|
+
iterationCounts,
|
|
103
|
+
lastError: `verdict missing for ${phase.role}`,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (verdict === "revision") {
|
|
108
|
+
iterationCounts[phase.role] = (iterationCounts[phase.role] ?? 0) + 1;
|
|
109
|
+
if (iterationCounts[phase.role] >= phase.maxIterations) {
|
|
110
|
+
ctx.ui.notify(`× forge:fix-bug — revision cap reached for phase ${phase.role} ` +
|
|
111
|
+
`(${iterationCounts[phase.role]}/${phase.maxIterations} iterations). Escalating.`, "error");
|
|
112
|
+
finishPhaseNode("escalated");
|
|
113
|
+
writeBugState(cwd, {
|
|
114
|
+
bugId,
|
|
115
|
+
phaseIndex: currentPhaseIndex,
|
|
116
|
+
iterationCounts,
|
|
117
|
+
halted: true,
|
|
118
|
+
lastError: `revision cap reached for ${phase.role}`,
|
|
119
|
+
savedAt: new Date().toISOString(),
|
|
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 });
|
|
147
|
+
return {
|
|
148
|
+
kind: "return",
|
|
149
|
+
result: {
|
|
150
|
+
status: "escalated",
|
|
151
|
+
lastPhaseIndex: currentPhaseIndex,
|
|
152
|
+
iterationCounts,
|
|
153
|
+
lastError: `revision cap reached for ${phase.role}`,
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
// Transition bug back to in-progress before re-dispatching implement.
|
|
158
|
+
// This is required for review-code → implement and approve → implement loops.
|
|
159
|
+
const currentBugStatus = updatedBugRecord?.status;
|
|
160
|
+
if (currentBugStatus === "fixed" || currentBugStatus === "approved") {
|
|
161
|
+
const transitionResult = spawnSync("node", [storeCli, "update-status", "bug", bugId, "status", "in-progress"], { cwd, encoding: "utf8" });
|
|
162
|
+
if (transitionResult.status !== 0) {
|
|
163
|
+
ctx.ui.notify(`⚠ forge:fix-bug — failed to transition bug ${bugId} from ${currentBugStatus} to in-progress: ${transitionResult.stderr ?? "unknown"}`, "warning");
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
ctx.ui.notify(`⟳ forge:fix-bug — transitioned bug ${bugId}: ${currentBugStatus} → in-progress`, "info");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// The review subagent itself finished cleanly — `revision`
|
|
170
|
+
// is its verdict, not a failure — so its node closes as
|
|
171
|
+
// completed before the predecessor re-dispatches under a
|
|
172
|
+
// fresh node ID.
|
|
173
|
+
finishPhaseNode("completed");
|
|
174
|
+
const predIndex = findPredecessorIndex(BUG_PHASES, currentPhaseIndex);
|
|
175
|
+
ctx.ui.notify(`⟳ forge:fix-bug — ${phase.role} returned revision; looping to ${BUG_PHASES[predIndex]?.role ?? predIndex} ` +
|
|
176
|
+
`(attempt ${iterationCounts[phase.role]}/${phase.maxIterations})`, "info");
|
|
177
|
+
orchTranscript.record({
|
|
178
|
+
kind: "phase-loopback",
|
|
179
|
+
ts: new Date().toISOString(),
|
|
180
|
+
fromPhase: phase.role,
|
|
181
|
+
toPhase: BUG_PHASES[predIndex]?.role ?? String(predIndex),
|
|
182
|
+
fromPhaseIndex: currentPhaseIndex,
|
|
183
|
+
toPhaseIndex: predIndex,
|
|
184
|
+
reason: `${phase.role} returned revision (attempt ${iterationCounts[phase.role]}/${phase.maxIterations})`,
|
|
185
|
+
});
|
|
186
|
+
writeBugState(cwd, {
|
|
187
|
+
bugId,
|
|
188
|
+
phaseIndex: predIndex,
|
|
189
|
+
iterationCounts,
|
|
190
|
+
halted: false,
|
|
191
|
+
savedAt: new Date().toISOString(),
|
|
192
|
+
});
|
|
193
|
+
return { kind: "loopback", toIndex: predIndex };
|
|
194
|
+
}
|
|
195
|
+
// verdict === "approved": fall through to advance
|
|
196
|
+
return { kind: "advance" };
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=bug-verdict-loop.js.map
|
|
@@ -0,0 +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;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a,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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// bug-verdict.ts — read the routing verdict for a bug phase from the bug
|
|
2
|
+
// record (approve summary / commit status / review summaries). Extracted
|
|
3
|
+
// VERBATIM from fix-bug.ts (FORGE-S31 file-size refactor); no logic changes.
|
|
4
|
+
export function readBugVerdict(bugRecord, phaseRole, summaryKeyByRole) {
|
|
5
|
+
if (!bugRecord)
|
|
6
|
+
return "missing";
|
|
7
|
+
// Approve phase: read approve summary verdict (set via set-bug-summary).
|
|
8
|
+
// The forge v0.44.0 contract makes summaries.approve.verdict the canonical
|
|
9
|
+
// approve signal for bugs — `bug.status` does NOT carry an "approved"
|
|
10
|
+
// value (that enum was dropped). See read-verdict.cjs §
|
|
11
|
+
// BUG_PHASE_VERDICT_SOURCE for the matching plugin-side wiring.
|
|
12
|
+
if (phaseRole === "approve") {
|
|
13
|
+
const summaryKey = summaryKeyByRole["approve"];
|
|
14
|
+
if (summaryKey) {
|
|
15
|
+
const summaries = bugRecord.summaries ?? {};
|
|
16
|
+
const blob = summaries[summaryKey];
|
|
17
|
+
if (blob && typeof blob === "object") {
|
|
18
|
+
const verdict = blob?.verdict;
|
|
19
|
+
if (typeof verdict === "string") {
|
|
20
|
+
if (verdict === "approved")
|
|
21
|
+
return "approved";
|
|
22
|
+
if (verdict === "revision")
|
|
23
|
+
return "revision";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return "missing";
|
|
28
|
+
}
|
|
29
|
+
// Commit phase: read bug status directly. Terminal target is `fixed`.
|
|
30
|
+
if (phaseRole === "commit") {
|
|
31
|
+
if (bugRecord.status === "fixed")
|
|
32
|
+
return "approved";
|
|
33
|
+
// in-progress means commit did not advance status — treat as revision-needed.
|
|
34
|
+
if (bugRecord.status === "in-progress")
|
|
35
|
+
return "revision";
|
|
36
|
+
return "missing";
|
|
37
|
+
}
|
|
38
|
+
// Review phases: read from summaries via key map.
|
|
39
|
+
const summaryKey = summaryKeyByRole[phaseRole];
|
|
40
|
+
if (!summaryKey)
|
|
41
|
+
return "missing";
|
|
42
|
+
const summaries = bugRecord.summaries ?? {};
|
|
43
|
+
const blob = summaries[summaryKey];
|
|
44
|
+
if (!blob || typeof blob !== "object")
|
|
45
|
+
return "missing";
|
|
46
|
+
const verdict = blob?.verdict;
|
|
47
|
+
if (typeof verdict !== "string")
|
|
48
|
+
return "missing";
|
|
49
|
+
if (verdict === "approved")
|
|
50
|
+
return "approved";
|
|
51
|
+
if (verdict === "revision")
|
|
52
|
+
return "revision";
|
|
53
|
+
return "missing";
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=bug-verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-ver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IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAElC,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,IAAI,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAI,SAAqC,CAAC,UAAU,CAAC,CAAC;IAChE,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAExD,MAAM,OAAO,GAAI,IAAgC,EAAE,OAAO,CAAC;IAC3D,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAClD,IAAI,OAAO,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC9C,IAAI,OAAO,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC9C,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type ForgeToolDefs } from "../../forge-tools.js";
|
|
3
|
+
export interface RegisterFixBugOptions {
|
|
4
|
+
cwd?: string;
|
|
5
|
+
forgeToolDefs?: ForgeToolDefs;
|
|
6
|
+
}
|
|
7
|
+
export declare function registerFixBug(pi: ExtensionAPI, options?: RegisterFixBugOptions): void;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// run-bug-command.ts — the /forge:fix-bug command handler (config discovery,
|
|
2
|
+
// bug-ID resolution / minting, resume detection, session registration, then
|
|
3
|
+
// delegate to runBugPipeline). Extracted VERBATIM from fix-bug.ts (no logic
|
|
4
|
+
// changes).
|
|
5
|
+
import * as fs from "node:fs";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
import { assertAudience, CallerContextStore } from "../../audience-gate.js";
|
|
8
|
+
import { loadGovernorProjectConfig } from "../../governor-config.js";
|
|
9
|
+
import { getOrchestratorTree } from "../../orchestrator-tree.js";
|
|
10
|
+
import { loadWorkflow } from "../../parsers/workflow-loader.js";
|
|
11
|
+
import { getSessionRegistry } from "../../session-registry.js";
|
|
12
|
+
import { resolveToCanonicalId, resolveToolDir } from "../../store/store-resolver.js";
|
|
13
|
+
import { archiveRun } from "../../transcript-archive.js";
|
|
14
|
+
import { createOrchestratorNotifier } from "../common/orchestrator-notify.js";
|
|
15
|
+
import { resolveOrchestratorEntry } from "../common/orchestrator-entry.js";
|
|
16
|
+
import { formatLocalTime, isNonInteractive } from "../common/orchestrator-misc.js";
|
|
17
|
+
import { assignNextBugId, extractBugIdFromReportText, preCreateBug, readBugRecord } from "./bug-id.js";
|
|
18
|
+
import { BUG_PHASES, BUG_TERMINAL_STATES } from "./bug-phases.js";
|
|
19
|
+
import { deleteBugState, isBugStateStale, readBugState } from "./bug-state.js";
|
|
20
|
+
import { runBugPipeline } from "./run-bug-pipeline.js";
|
|
21
|
+
const STATUS_KEY = "forge:fix-bug";
|
|
22
|
+
const MESSAGE_KEY = "forge:fix-bug:message";
|
|
23
|
+
export function registerFixBug(pi, options = {}) {
|
|
24
|
+
pi.registerCommand("forge:fix-bug", {
|
|
25
|
+
description: "Run the full bug-fix pipeline (triage → plan-fix → review-plan → implement → review-code → approve → commit). " +
|
|
26
|
+
"Usage: /forge:fix-bug <BUG_ID_OR_SUMMARY>. " +
|
|
27
|
+
"Orchestrator archetype: each phase is an isolated subagent session (IL10).",
|
|
28
|
+
async handler(args, ctx) {
|
|
29
|
+
const cwd = options.cwd ?? process.cwd();
|
|
30
|
+
const rawArg = args.trim();
|
|
31
|
+
if (!rawArg) {
|
|
32
|
+
ctx.ui.notify("× forge:fix-bug — bug ID or summary required. Usage: /forge:fix-bug <BUG_ID_OR_SUMMARY>", "error");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const notify = createOrchestratorNotifier(ctx, {
|
|
36
|
+
label: "forge:fix-bug",
|
|
37
|
+
statusKey: STATUS_KEY,
|
|
38
|
+
messageKey: MESSAGE_KEY,
|
|
39
|
+
});
|
|
40
|
+
notify.setStatus(`fix-bug: initializing…`);
|
|
41
|
+
// ── Discover forge config + sweep orphaned transcripts ───────────
|
|
42
|
+
const entry = resolveOrchestratorEntry({ cwd, notify });
|
|
43
|
+
if (!entry)
|
|
44
|
+
return;
|
|
45
|
+
const { forgeRoot, storeCli, preflightGate } = entry;
|
|
46
|
+
// ── Determine bugId ────────────────────────────────────────────
|
|
47
|
+
let bugId;
|
|
48
|
+
let isNewBug = false;
|
|
49
|
+
// Check if arg looks like it could be a bug ID (prefixed or unprefixed).
|
|
50
|
+
// Covers: FORGE-BUG-042, BUG-042, B042.
|
|
51
|
+
const looksLikeBugId = /^(?:[A-Z0-9]+-)?(?:BUG-?\d+|B\d+)$/i.test(rawArg) || /^BUG-\d+$/i.test(rawArg);
|
|
52
|
+
if (/^[A-Z][A-Z0-9]*-BUG-\d+$/.test(rawArg)) {
|
|
53
|
+
// Canonical prefixed bug ID (any project prefix, e.g. FORGE-BUG-042,
|
|
54
|
+
// CART-BUG-001) — verify it exists. Previously hardcoded to FORGE-,
|
|
55
|
+
// which pushed other-prefix canonical IDs through the resolver.
|
|
56
|
+
bugId = rawArg;
|
|
57
|
+
const bugRecord = readBugRecord(bugId, storeCli, cwd);
|
|
58
|
+
if (!bugRecord) {
|
|
59
|
+
ctx.ui.notify(`× forge:fix-bug — bug ${bugId} not found in store.`, "error");
|
|
60
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Check if bug is already in a terminal state
|
|
64
|
+
if (BUG_TERMINAL_STATES.has(bugRecord.status ?? "")) {
|
|
65
|
+
ctx.ui.notify(`× forge:fix-bug — bug ${bugId} is already in terminal state '${bugRecord.status}'. No further processing.`, "error");
|
|
66
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (looksLikeBugId) {
|
|
71
|
+
// Unprefixed bug ID — resolve through the store cascade.
|
|
72
|
+
// Issue #20: unprefixed entity IDs silently poisoned substitutions.
|
|
73
|
+
const toolDir = resolveToolDir(forgeRoot);
|
|
74
|
+
const resolvedBugId = await resolveToCanonicalId(rawArg, toolDir, cwd, "bug", {
|
|
75
|
+
ctx,
|
|
76
|
+
commandLabel: "forge:fix-bug",
|
|
77
|
+
});
|
|
78
|
+
if (!resolvedBugId) {
|
|
79
|
+
// Error already emitted by resolver
|
|
80
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
81
|
+
ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
bugId = resolvedBugId;
|
|
85
|
+
// Re-verify the resolved bug exists
|
|
86
|
+
const bugRecord = readBugRecord(bugId, storeCli, cwd);
|
|
87
|
+
if (!bugRecord) {
|
|
88
|
+
ctx.ui.notify(`× forge:fix-bug — bug ${bugId} not found in store.`, "error");
|
|
89
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (BUG_TERMINAL_STATES.has(bugRecord.status ?? "")) {
|
|
93
|
+
ctx.ui.notify(`× forge:fix-bug — bug ${bugId} is already in terminal state '${bugRecord.status}'. No further processing.`, "error");
|
|
94
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
// @file or free-form text. If an @file report references a canonical
|
|
100
|
+
// <PREFIX>-BUG-NNN that already exists in the store, fix THAT record —
|
|
101
|
+
// minting a new bug here duplicated CART-BUG-001 as a phantom in the
|
|
102
|
+
// CART incident (the report header carried the real ID all along).
|
|
103
|
+
let reportBugId = null;
|
|
104
|
+
if (rawArg.startsWith("@")) {
|
|
105
|
+
const rel = rawArg.slice(1).trim();
|
|
106
|
+
const reportPath = path.isAbsolute(rel) ? rel : path.join(cwd, rel);
|
|
107
|
+
try {
|
|
108
|
+
// 256 KB cap — bug reports are small; never slurp arbitrary files.
|
|
109
|
+
if (fs.existsSync(reportPath) && fs.statSync(reportPath).size <= 262144) {
|
|
110
|
+
const projectPrefix = loadGovernorProjectConfig(cwd).prefix;
|
|
111
|
+
reportBugId = extractBugIdFromReportText(fs.readFileSync(reportPath, "utf8"), projectPrefix);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
/* unreadable report — fall through to new-bug intake */
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const reportRecord = reportBugId ? readBugRecord(reportBugId, storeCli, cwd) : null;
|
|
119
|
+
if (reportBugId && reportRecord) {
|
|
120
|
+
if (BUG_TERMINAL_STATES.has(reportRecord.status ?? "")) {
|
|
121
|
+
ctx.ui.notify(`× forge:fix-bug — ${rawArg} references ${reportBugId}, which is already in terminal state ` +
|
|
122
|
+
`'${reportRecord.status}'. No further processing.`, "error");
|
|
123
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
bugId = reportBugId;
|
|
127
|
+
ctx.ui.notify(`forge:fix-bug — ${rawArg} references existing bug ${bugId}; fixing it (no new record minted).`, "info");
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// Free-form text (or report with no resolvable ID) — defer bug
|
|
131
|
+
// creation to the triage-phase subagent via a PENDING placeholder.
|
|
132
|
+
bugId = `PENDING-${Date.now()}`;
|
|
133
|
+
isNewBug = true;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// ── Pre-flight confirm ───────────────────────────────────────────
|
|
137
|
+
if (!isNonInteractive()) {
|
|
138
|
+
const confirmMsg = isNewBug
|
|
139
|
+
? `Fix bug: "${rawArg.slice(0, 80)}"? A bug record will be created during triage.`
|
|
140
|
+
: `Fix bug ${bugId}?`;
|
|
141
|
+
const proceed = await ctx.ui.confirm(`Fix bug?`, confirmMsg);
|
|
142
|
+
if (!proceed) {
|
|
143
|
+
ctx.ui.notify("forge:fix-bug — cancelled.", "info");
|
|
144
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// ── Resume detection ─────────────────────────────────────────────
|
|
149
|
+
const registry = getSessionRegistry();
|
|
150
|
+
const existing = isNewBug ? null : readBugState(cwd, bugId);
|
|
151
|
+
let resumeFromState;
|
|
152
|
+
if (existing) {
|
|
153
|
+
if (isBugStateStale(existing)) {
|
|
154
|
+
ctx.ui.notify(`⚠ forge:fix-bug — cached state for ${bugId} is stale (>7 days old, saved at ${formatLocalTime(existing.savedAt)}). Offering purge.`, "warning");
|
|
155
|
+
if (!isNonInteractive()) {
|
|
156
|
+
const purge = await ctx.ui.confirm(`Purge stale state for ${bugId}?`, "The cached state is older than 7 days. Purge and restart from the beginning?");
|
|
157
|
+
if (purge) {
|
|
158
|
+
deleteBugState(cwd, bugId);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
ctx.ui.notify("forge:fix-bug — stale state kept; aborting.", "info");
|
|
162
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
163
|
+
ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
ctx.ui.notify("forge:fix-bug — stale state; non-interactive mode auto-aborting.", "info");
|
|
169
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
170
|
+
ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
// ADR-S21-01: offer resume for ALL non-stale states — halted=true
|
|
176
|
+
// (explicit failure), halted=false (cancelled/interrupted), and
|
|
177
|
+
// any state with existing.status set.
|
|
178
|
+
const stateStatus = existing.status ?? (existing.halted ? "halted" : "interrupted");
|
|
179
|
+
const statusLabel = stateStatus === "cancelled" ? "cancelled" : stateStatus === "halted" ? "halted" : "interrupted";
|
|
180
|
+
const phaseRole = BUG_PHASES[existing.phaseIndex]?.role ?? existing.phaseIndex;
|
|
181
|
+
if (!isNonInteractive()) {
|
|
182
|
+
const resume = await ctx.ui.confirm(`Resume ${bugId}?`, `Cached state — phase ${existing.phaseIndex} (${phaseRole}), ${statusLabel}, ` +
|
|
183
|
+
`saved at ${formatLocalTime(existing.savedAt)}. Resume from here?`);
|
|
184
|
+
if (resume) {
|
|
185
|
+
resumeFromState = existing;
|
|
186
|
+
ctx.ui.notify(`forge:fix-bug — resuming ${bugId} from phase ${phaseRole} (${statusLabel})`, "info");
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
deleteBugState(cwd, bugId);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// Non-interactive: auto-resume from state (no confirmation).
|
|
194
|
+
// Cancelled/interrupted states are valid resume points.
|
|
195
|
+
resumeFromState = existing;
|
|
196
|
+
ctx.ui.notify(`forge:fix-bug — resuming ${bugId} from phase ${phaseRole} (${statusLabel})`, "info");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// For new bugs, triage phase will create the bug record.
|
|
201
|
+
// After triage, we need to capture the bugId from the subagent events.
|
|
202
|
+
// This is handled inside runBugPipeline via onEvent interception.
|
|
203
|
+
// For now, we pass the temporary bugId; runBugPipeline will update it.
|
|
204
|
+
// ── Materialization check (top-level workflow) ──────────────────
|
|
205
|
+
const workflowPath = path.join(cwd, ".forge", "workflows", "fix_bug.md");
|
|
206
|
+
if (fs.existsSync(workflowPath)) {
|
|
207
|
+
try {
|
|
208
|
+
const loaded = loadWorkflow(workflowPath);
|
|
209
|
+
// AC#12: Top-level audience check for the fix_bug.md workflow.
|
|
210
|
+
// The orchestrator ITSELF runs fix_bug.md (not a subagent), so check
|
|
211
|
+
// from orchestrator context. Using asSubagent would falsely reject
|
|
212
|
+
// orchestrator-only workflows called by the orchestrator.
|
|
213
|
+
const topAudienceOk = CallerContextStore.asOrchestrator(() => assertAudience({ workflowName: "fix_bug", audience: loaded.audience }, ctx));
|
|
214
|
+
if (!topAudienceOk) {
|
|
215
|
+
ctx.ui.notify("× forge:fix-bug — audience check failed for top-level fix_bug workflow.", "error");
|
|
216
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
217
|
+
ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
// Note: no materialization-marker check here. fix_bug.md is the
|
|
221
|
+
// orchestrator workflow (prose algorithm), not a sub-workflow that
|
|
222
|
+
// subagents run directly. Per-phase sub-workflows (architect_approve,
|
|
223
|
+
// review_code, etc.) each get their own materialization check inside
|
|
224
|
+
// runBugPipeline at line ~481, which is the correct guard layer.
|
|
225
|
+
}
|
|
226
|
+
catch {
|
|
227
|
+
// Workflow file exists but couldn't be read — non-fatal, continue
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// ── Pre-assign real bug ID for new bugs ────────────────────────
|
|
231
|
+
// Previously this was done inside runBugPipeline, but the session registry
|
|
232
|
+
// needs the real ID before startSession is called.
|
|
233
|
+
if (isNewBug && bugId.startsWith("PENDING-")) {
|
|
234
|
+
const realBugId = assignNextBugId(storeCli, cwd, loadGovernorProjectConfig(cwd).prefix);
|
|
235
|
+
const title = rawArg && !rawArg.startsWith("@") ? rawArg.slice(0, 120) : "New bug (pending triage)";
|
|
236
|
+
if (preCreateBug(realBugId, title, storeCli, cwd)) {
|
|
237
|
+
ctx.ui.notify(`forge:fix-bug — pre-assigned bug ID: ${realBugId}`, "info");
|
|
238
|
+
bugId = realBugId;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
ctx.ui.notify("× forge:fix-bug — failed to pre-create bug record. Falling back to PENDING capture.", "error");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Register session
|
|
245
|
+
registry.startSession(bugId);
|
|
246
|
+
// Bridge: register bug in OrchestratorTree.
|
|
247
|
+
const tree = getOrchestratorTree();
|
|
248
|
+
tree.startNode(bugId, { label: `fix-bug ${bugId}`, kind: "orchestrator" });
|
|
249
|
+
// ── Delegate to pipeline ─────────────────────────────────────────
|
|
250
|
+
// ── Delegate to pipeline ─────────────────────────────────────────
|
|
251
|
+
const signal = registry.getAbortSignal(bugId);
|
|
252
|
+
const pipelineResult = await runBugPipeline({
|
|
253
|
+
bugId,
|
|
254
|
+
originalArg: isNewBug ? rawArg : undefined,
|
|
255
|
+
isNewBug,
|
|
256
|
+
cwd,
|
|
257
|
+
ctx,
|
|
258
|
+
forgeRoot,
|
|
259
|
+
storeCli,
|
|
260
|
+
preflightGate,
|
|
261
|
+
registry,
|
|
262
|
+
resumeFromState,
|
|
263
|
+
signal,
|
|
264
|
+
forgeToolDefs: options.forgeToolDefs,
|
|
265
|
+
});
|
|
266
|
+
// ── Handle result ────────────────────────────────────────────────
|
|
267
|
+
if (pipelineResult.status === "completed") {
|
|
268
|
+
registry.completeSession(bugId, "completed");
|
|
269
|
+
tree.completeNode(bugId, "completed");
|
|
270
|
+
ctx.ui.notify(`〇 forge:fix-bug — ${bugId} pipeline complete (${BUG_PHASES.length} phases).`, "info");
|
|
271
|
+
}
|
|
272
|
+
else if (pipelineResult.status === "cancelled") {
|
|
273
|
+
registry.completeSession(bugId, "cancelled");
|
|
274
|
+
tree.completeNode(bugId, "cancelled");
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
registry.completeSession(bugId, "failed");
|
|
278
|
+
tree.completeNode(bugId, "failed");
|
|
279
|
+
}
|
|
280
|
+
// Mirror this run into the central transcript archive (best-effort —
|
|
281
|
+
// archiveRun never throws).
|
|
282
|
+
if (pipelineResult.orchestratorTranscriptPath) {
|
|
283
|
+
archiveRun({
|
|
284
|
+
cwd,
|
|
285
|
+
orchestratorJsonlPath: pipelineResult.orchestratorTranscriptPath,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
ctx.ui.setStatus?.(STATUS_KEY, undefined);
|
|
289
|
+
ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
|
|
290
|
+
},
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=run-bug-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-bug-command.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/run-bug-command.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,YAAY;AAEZ,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AACjG,OAA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