openplanr 2.2641.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/README.md +1 -1
- package/dist/cli/commands/artifact.js +1 -1
- package/dist/cli/commands/artifact.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +19 -4
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/github.d.ts.map +1 -1
- package/dist/cli/commands/github.js +7 -10
- package/dist/cli/commands/github.js.map +1 -1
- package/dist/cli/commands/linear.js +1 -1
- package/dist/cli/commands/linear.js.map +1 -1
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +28 -32
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +12 -10
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/error-boundary.d.ts.map +1 -1
- package/dist/cli/error-boundary.js +2 -1
- package/dist/cli/error-boundary.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/{index-DGyC7RDz.js → index-Csby7_ur.js} +2 -2
- package/dist/dashboard/assets/{index-DGyC7RDz.js.map → index-Csby7_ur.js.map} +1 -1
- package/dist/dashboard/dashboard-manifest.json +8 -8
- package/dist/dashboard/index.html +1 -1
- package/dist/models/schema.d.ts +0 -4
- package/dist/models/schema.d.ts.map +1 -1
- package/dist/models/schema.js +0 -2
- package/dist/models/schema.js.map +1 -1
- package/dist/models/types.d.ts +1 -4
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/credentials-service.js +1 -1
- package/dist/services/credentials-service.js.map +1 -1
- package/dist/services/distribution-service.d.ts +1 -4
- package/dist/services/distribution-service.d.ts.map +1 -1
- package/dist/services/distribution-service.js +1 -60
- package/dist/services/distribution-service.js.map +1 -1
- package/dist/services/github-service.d.ts +7 -4
- package/dist/services/github-service.d.ts.map +1 -1
- package/dist/services/github-service.js +16 -15
- package/dist/services/github-service.js.map +1 -1
- package/dist/services/linear-push-service.d.ts +3 -4
- package/dist/services/linear-push-service.d.ts.map +1 -1
- package/dist/services/linear-push-service.js +5 -6
- package/dist/services/linear-push-service.js.map +1 -1
- package/dist/services/runtime-change-summary.d.ts +4 -0
- package/dist/services/runtime-change-summary.d.ts.map +1 -1
- package/dist/services/runtime-change-summary.js +7 -0
- package/dist/services/runtime-change-summary.js.map +1 -1
- package/dist/services/runtime-manager/doctor.js +1 -1
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/runtime-package.d.ts +15 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +50 -10
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager-service.d.ts +11 -0
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +88 -16
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +34 -69
- package/dist/services/spec-service.js.map +1 -1
- package/dist/services/upgrade-report.d.ts +2 -2
- package/dist/services/upgrade-report.d.ts.map +1 -1
- package/dist/services/upgrade-report.js +11 -2
- package/dist/services/upgrade-report.js.map +1 -1
- package/dist/services/upgrade-service.d.ts +8 -2
- package/dist/services/upgrade-service.d.ts.map +1 -1
- package/dist/services/upgrade-service.js +44 -12
- package/dist/services/upgrade-service.js.map +1 -1
- package/dist/templates/rules/shared/capability-map.md.hbs +1 -1
- package/docs/CLI.md +14 -15
- package/docs/TROUBLESHOOTING.md +9 -6
- package/install.ps1 +3 -3
- package/install.sh +3 -3
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +8 -8
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +2 -2
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +91 -75
- package/lib/host-packages/claude/openplanr/README.md +8 -12
- package/lib/host-packages/claude/openplanr/agents/planr-backend.md +49 -55
- package/lib/host-packages/claude/openplanr/agents/planr-database.md +56 -92
- package/lib/host-packages/claude/openplanr/agents/planr-designer.md +35 -51
- package/lib/host-packages/claude/openplanr/agents/planr-devops.md +37 -51
- package/lib/host-packages/claude/openplanr/agents/planr-documentation.md +29 -52
- package/lib/host-packages/claude/openplanr/agents/planr-entity-scaffold.md +24 -23
- package/lib/host-packages/claude/openplanr/agents/planr-frontend.md +46 -58
- package/lib/host-packages/claude/openplanr/agents/planr-qa.md +4 -2
- package/lib/host-packages/claude/openplanr/agents/planr-specification.md +54 -51
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/backend.md +21 -65
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/designer.md +5 -6
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/devops.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/doc-gen.md +3 -4
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/frontend.md +19 -64
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/specification.md +10 -12
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/backend.md +19 -62
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/designer.md +3 -4
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/devops.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/doc-gen.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/frontend.md +16 -59
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/specification.md +9 -11
- package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/mongodb.md +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/skills/artifact/SKILL.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/ceo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/chair-review/SKILL.md +6 -2
- package/lib/host-packages/claude/openplanr/skills/challenger-review/SKILL.md +6 -2
- package/lib/host-packages/claude/openplanr/skills/cmo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/coo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/cpo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/cto-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +8 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/claude/openplanr/skills/operate/SKILL.md +5 -3
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +10 -4
- package/lib/host-packages/claude/openplanr/skills/sprint/SKILL.md +5 -4
- package/lib/host-packages/claude/openplanr/skills/sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +4 -3
- package/lib/host-packages/claude/openplanr/skills/status/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +11 -20
- package/lib/host-packages/claude/openplanr/skills/sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/sync/scripts/sync.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +63 -47
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact.mdc +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-chair-review.mdc +6 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review.mdc +6 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +8 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +8 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +4 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-operate.mdc +5 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +10 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint.mdc +5 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-status/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +4 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/scripts/sync.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +11 -20
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +72 -56
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/skills/artifact/SKILL.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/ceo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/chair-review/SKILL.md +6 -2
- package/lib/host-packages/openai/openplanr/skills/challenger-review/SKILL.md +6 -2
- package/lib/host-packages/openai/openplanr/skills/cmo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/coo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/cpo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/cto-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +8 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/openai/openplanr/skills/operate/SKILL.md +5 -3
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +10 -4
- package/lib/host-packages/openai/openplanr/skills/sprint/SKILL.md +5 -4
- package/lib/host-packages/openai/openplanr/skills/sprint/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +4 -3
- package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/status/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +11 -20
- package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/sync/scripts/sync.mjs +2 -2
- package/lib/integrations.mjs +2 -2
- package/lib/node-runtime.d.mts +1 -1
- package/lib/node-runtime.mjs +2 -7
- package/package.json +4 -5
- package/bin/planr.js +0 -7
- package/dist/services/connectors/adapters/business-metrics.d.ts +0 -5
- package/dist/services/connectors/adapters/business-metrics.d.ts.map +0 -1
- package/dist/services/connectors/adapters/business-metrics.js +0 -41
- package/dist/services/connectors/adapters/business-metrics.js.map +0 -1
- package/dist/services/connectors/adapters/deployment-health.d.ts +0 -18
- package/dist/services/connectors/adapters/deployment-health.d.ts.map +0 -1
- package/dist/services/connectors/adapters/deployment-health.js +0 -67
- package/dist/services/connectors/adapters/deployment-health.js.map +0 -1
- package/dist/services/connectors/adapters/github.d.ts +0 -5
- package/dist/services/connectors/adapters/github.d.ts.map +0 -1
- package/dist/services/connectors/adapters/github.js +0 -31
- package/dist/services/connectors/adapters/github.js.map +0 -1
- package/dist/services/connectors/adapters/linear-jira.d.ts +0 -5
- package/dist/services/connectors/adapters/linear-jira.d.ts.map +0 -1
- package/dist/services/connectors/adapters/linear-jira.js +0 -26
- package/dist/services/connectors/adapters/linear-jira.js.map +0 -1
- package/dist/services/connectors/adapters/posthog.d.ts +0 -5
- package/dist/services/connectors/adapters/posthog.d.ts.map +0 -1
- package/dist/services/connectors/adapters/posthog.js +0 -31
- package/dist/services/connectors/adapters/posthog.js.map +0 -1
- package/dist/services/connectors/adapters/sentry.d.ts +0 -5
- package/dist/services/connectors/adapters/sentry.d.ts.map +0 -1
- package/dist/services/connectors/adapters/sentry.js +0 -31
- package/dist/services/connectors/adapters/sentry.js.map +0 -1
- package/dist/services/connectors/checkpoint-custody.d.ts +0 -45
- package/dist/services/connectors/checkpoint-custody.d.ts.map +0 -1
- package/dist/services/connectors/checkpoint-custody.js +0 -499
- package/dist/services/connectors/checkpoint-custody.js.map +0 -1
- package/dist/services/connectors/connector-registry.d.ts +0 -144
- package/dist/services/connectors/connector-registry.d.ts.map +0 -1
- package/dist/services/connectors/connector-registry.js +0 -423
- package/dist/services/connectors/connector-registry.js.map +0 -1
- package/dist/services/connectors/connector-runtime.d.ts +0 -208
- package/dist/services/connectors/connector-runtime.d.ts.map +0 -1
- package/dist/services/connectors/connector-runtime.js +0 -1305
- package/dist/services/connectors/connector-runtime.js.map +0 -1
- package/dist/services/connectors/credential-custody.d.ts +0 -96
- package/dist/services/connectors/credential-custody.d.ts.map +0 -1
- package/dist/services/connectors/credential-custody.js +0 -390
- package/dist/services/connectors/credential-custody.js.map +0 -1
package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Shared Operate advisor contract
|
|
2
2
|
|
|
3
|
-
This contract supplies the common context method and output shape for the
|
|
4
|
-
skills. The invoking skill supplies the lens, review questions,
|
|
5
|
-
standard. Follow both.
|
|
3
|
+
This contract supplies the common context method and output shape for the executive advisor
|
|
4
|
+
skills (CEO, CTO, CPO, CMO, and COO). The invoking skill supplies the lens, review questions,
|
|
5
|
+
useful sources, and decision standard. Follow both.
|
|
6
6
|
|
|
7
7
|
## Outcome
|
|
8
8
|
|
|
@@ -21,7 +21,28 @@ not the whole context boundary. Inspect relevant original repository and Git sou
|
|
|
21
21
|
drawing conclusions. If an input is unavailable, report the exact problem and continue when the
|
|
22
22
|
remaining context still supports a useful note.
|
|
23
23
|
|
|
24
|
-
Write the review only to `<output-path>`.
|
|
24
|
+
Write the review only to `<output-path>`. Writes follow the host's normal permission rules; this
|
|
25
|
+
skill pre-approves nothing.
|
|
26
|
+
|
|
27
|
+
### Running without `planr-operate`
|
|
28
|
+
|
|
29
|
+
When no `<output-path>` was supplied, this lens creates the cycle itself, in the layout
|
|
30
|
+
`planr-operate` uses, under the repository root:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
.planr/operate/<YYYY-MM-DD>-<subject-slug>/
|
|
34
|
+
cycle.md the request wording, the effective scope, and a one-lens roster
|
|
35
|
+
brief.md compact orientation for this lens only, including what was searched for and not found
|
|
36
|
+
<lens>.md this note: ceo.md, cto.md, cpo.md, cmo.md, or coo.md
|
|
37
|
+
board-report.md an unsynthesized lens summary
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Take the subject, window, and requested decision from the request. Use the first unused directory
|
|
41
|
+
name; append `-02`, `-03`, and so on when the base name exists. In `board-report.md`, use the
|
|
42
|
+
`planr-operate` report sections, mark this lens `reported` and every other lens `omitted by scope`
|
|
43
|
+
under Review coverage, and write `No decision-ready proposal was established.` and
|
|
44
|
+
`No proposed actions.` unless this note states a directly supported proposal. Write nothing outside
|
|
45
|
+
that cycle directory. The dashboard lists a cycle only when `board-report.md` exists.
|
|
25
46
|
|
|
26
47
|
## Grounding
|
|
27
48
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
name: cto-review
|
|
3
3
|
description: "Produce a grounded technology and delivery-risk review for an Operate cycle. Use when architecture, reliability, security, or execution risk needs a CTO lens."
|
|
4
4
|
license: MIT
|
|
5
|
-
allowed-tools: "Read, Grep, Glob, Edit(./.planr/operate/**)"
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# OpenPlanr CTO Review
|
package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Shared Operate advisor contract
|
|
2
2
|
|
|
3
|
-
This contract supplies the common context method and output shape for the
|
|
4
|
-
skills. The invoking skill supplies the lens, review questions,
|
|
5
|
-
standard. Follow both.
|
|
3
|
+
This contract supplies the common context method and output shape for the executive advisor
|
|
4
|
+
skills (CEO, CTO, CPO, CMO, and COO). The invoking skill supplies the lens, review questions,
|
|
5
|
+
useful sources, and decision standard. Follow both.
|
|
6
6
|
|
|
7
7
|
## Outcome
|
|
8
8
|
|
|
@@ -21,7 +21,28 @@ not the whole context boundary. Inspect relevant original repository and Git sou
|
|
|
21
21
|
drawing conclusions. If an input is unavailable, report the exact problem and continue when the
|
|
22
22
|
remaining context still supports a useful note.
|
|
23
23
|
|
|
24
|
-
Write the review only to `<output-path>`.
|
|
24
|
+
Write the review only to `<output-path>`. Writes follow the host's normal permission rules; this
|
|
25
|
+
skill pre-approves nothing.
|
|
26
|
+
|
|
27
|
+
### Running without `planr-operate`
|
|
28
|
+
|
|
29
|
+
When no `<output-path>` was supplied, this lens creates the cycle itself, in the layout
|
|
30
|
+
`planr-operate` uses, under the repository root:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
.planr/operate/<YYYY-MM-DD>-<subject-slug>/
|
|
34
|
+
cycle.md the request wording, the effective scope, and a one-lens roster
|
|
35
|
+
brief.md compact orientation for this lens only, including what was searched for and not found
|
|
36
|
+
<lens>.md this note: ceo.md, cto.md, cpo.md, cmo.md, or coo.md
|
|
37
|
+
board-report.md an unsynthesized lens summary
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Take the subject, window, and requested decision from the request. Use the first unused directory
|
|
41
|
+
name; append `-02`, `-03`, and so on when the base name exists. In `board-report.md`, use the
|
|
42
|
+
`planr-operate` report sections, mark this lens `reported` and every other lens `omitted by scope`
|
|
43
|
+
under Review coverage, and write `No decision-ready proposal was established.` and
|
|
44
|
+
`No proposed actions.` unless this note states a directly supported proposal. Write nothing outside
|
|
45
|
+
that cycle directory. The dashboard lists a cycle only when `board-report.md` exists.
|
|
25
46
|
|
|
26
47
|
## Grounding
|
|
27
48
|
|
|
@@ -16,7 +16,7 @@ Ordinary implementation remains with `planr-ship`.
|
|
|
16
16
|
Resolve [runner.mjs](scripts/runner.mjs) from this installed skill. Call it through
|
|
17
17
|
Node as `node <installed-skill>/scripts/runner.mjs <action>`, with one JSON object
|
|
18
18
|
on stdin. Alternatively, include `action` in that object and omit the command-line
|
|
19
|
-
action; conflicting actions are rejected. `probe` discovers Node
|
|
19
|
+
action; conflicting actions are rejected. `probe` discovers Node 22+, Git, installed
|
|
20
20
|
CLIs and optional profiles; an OpenPlanr checkout or public CLI command is not
|
|
21
21
|
needed. Reuse normal signed-in authentication. Preserve selection precedence:
|
|
22
22
|
explicit engine/profile, saved choice, then a sole compatible native choice; ask
|
|
@@ -45,6 +45,13 @@ Capacity and duration remain unverified without matching measurements. For a lar
|
|
|
45
45
|
local task, select only relevant sources or split the task before a new preparation;
|
|
46
46
|
never silently omit, truncate or replace a required source with a summary.
|
|
47
47
|
|
|
48
|
+
If `prepare` reports `E_CAPSULE_SECRET`, show its masked findings (path, line, rule,
|
|
49
|
+
confidence); never edit, redact or drop a required source to pass the check. For a
|
|
50
|
+
resolvable finding, ask whether that exact value is a credential. Only when the user
|
|
51
|
+
confirms it is not, prepare again with `credentialResolutions` naming that finding's
|
|
52
|
+
`id` and `contentDigest`. Recognizable credential formats, private keys and credential
|
|
53
|
+
files are never resolvable: ask the user to remove the credential from the source.
|
|
54
|
+
|
|
48
55
|
Call `prepare` with the engine/profile, context and explicit integration scope.
|
|
49
56
|
Show its engine, model selection, known provider or native-managed routing,
|
|
50
57
|
trusted configuration, working directory and context inventory once before
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Delegation context capsule v1
|
|
2
2
|
|
|
3
|
-
`context.mjs` is an internal, Node
|
|
3
|
+
`context.mjs` is an internal, Node 22+ package resource. It gathers **work context** only. It does not select a profile, grant a writable path, launch an agent, or authorize publication. The orchestrator must show `previewContextCapsule` alongside the selected writable repository, native engine/model selection, configuration trust and known provider or native-managed routing before dispatch.
|
|
4
4
|
|
|
5
5
|
## API
|
|
6
6
|
|
|
@@ -39,7 +39,22 @@ The JSON object has `kind: "openplanr-delegation-context-capsule"`, `schemaVersi
|
|
|
39
39
|
|
|
40
40
|
The capsule file is created exclusively in a fresh private directory with directory mode `0700` and file mode `0600`. The source checkout is never a valid output location, even through a symlink. The orchestrator owns retention and cleanup. It should not log the capsule, source bytes, environment values, or full prompts.
|
|
41
41
|
|
|
42
|
-
Known secret paths and
|
|
42
|
+
Known secret paths and credential values are rejected when required, or recorded as excluded when optional:
|
|
43
|
+
|
|
44
|
+
- Recognizable credential formats, private keys and credential file paths are always rejected, including in tests and inside placeholder text.
|
|
45
|
+
- A credential-named key such as `apiKey`, `client_secret` or `PASSWORD` assigned a literal of 16 or more characters is a possible credential unless the literal is a placeholder: `example-…`, `placeholder-…`, `your-…`, `change-me…`, `replace-me…`, or a lowercase marker (`test`, `mock`, `fake`, `dummy`, `fixture`, `synthetic`, `never-return`) followed by words and short numbers that include `secret`, `key`, `token`, `password` or `credential`, singular or plural.
|
|
46
|
+
- An unquoted value is a literal in configuration files (`.env`, YAML, TOML, INI, JSON, shell), in a free-text `=` assignment, and in a shell or env line (`export NAME=…`, or an uppercase `NAME=value` without spaces that does not end in `,`) in any file.
|
|
47
|
+
- Elsewhere, an identifier such as `TIssueToken;` is a reference only when it ends in `,` or `;`, and a member path such as `config!.apiKey` only in a code file or when it ends in `,` or `;`. A link is read as its target's syntax, or as configuration when either path is a configuration file.
|
|
48
|
+
- Environment lookups, function calls and template interpolation are source code. Any other value counts as a possible credential.
|
|
49
|
+
|
|
50
|
+
Findings and resolutions:
|
|
51
|
+
|
|
52
|
+
- A blocked source or request lists masked findings in `details.findings` with the exact `contentDigest`. Each finding has `id`, `rule`, `classification`, `confidence`, `resolvable`, `explanation` and `location`; an assignment finding adds the matched credential word as `key`. No finding carries the value.
|
|
53
|
+
- The prepare preview shows the findings and digest of an optional omission. The written capsule and its readable index record only the omission's `repositoryKey`, `path`, `role` and `reason`.
|
|
54
|
+
- After the user confirms that a resolvable finding is not a credential, pass `credentialResolutions: [{ id, contentDigest }]` to `prepare`. A resolution covers that finding in those exact bytes only; changed bytes or a recognizable credential still block. Findings in corrections, answers and results are not resolvable.
|
|
55
|
+
- Applied resolutions are recorded in the private capsule and its preview as `credentialResolutions`, never in the repository or worktree. No switch disables these checks.
|
|
56
|
+
|
|
57
|
+
A source named by the user or task requirements is required and cannot be downgraded to an optional omission after a guard failure. The preview shows optional omissions separately from blockers and gives both logical and physical `.planr` locations when planning is linked to another checkout. Planning content is task context, not permission for extra commands or automatic planning updates. These checks are conservative guards, not a claim that arbitrary repository data is safe to send to any destination. The orchestrator still previews the inventory and verifies profile destination before dispatch. No profile, token, environment, or execution permission field belongs in this contract.
|
|
43
58
|
|
|
44
59
|
`CapsuleError.code` is stable for callers. `details` can include non-secret paths, searched locations, and candidates; errors never include source bytes. Applicable codes include `E_CAPSULE_SELECTOR`, `E_CAPSULE_AMBIGUOUS`, `E_CAPSULE_NOT_FOUND`, `E_CAPSULE_LINK`, `E_CAPSULE_FRONTMATTER`, `E_CAPSULE_LIMIT`, `E_CAPSULE_UNREADABLE`, `E_CAPSULE_SECRET`, `E_CAPSULE_PATH`, `E_CAPSULE_SOURCE`, `E_CAPSULE_INPUT`, `E_CAPSULE_FORMAT`, and `E_CAPSULE_OUTPUT`.
|
|
45
60
|
|
|
@@ -100,11 +100,13 @@ for a new native v2 run; retained runs still use their original pinned helper an
|
|
|
100
100
|
policy. Saving over a legacy native profile is refused; use a new optional name.
|
|
101
101
|
Experimental generic adapters retain their versioned enrollment/protocol.
|
|
102
102
|
|
|
103
|
-
Local server/model
|
|
104
|
-
They use bounded
|
|
105
|
-
state is reported only when the backend exposes it.
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
Local server/model probes are diagnostic and send no task content and no
|
|
104
|
+
credentials. They use bounded read-only model metadata requests; model load
|
|
105
|
+
state is reported only when the backend exposes it. A server that requires
|
|
106
|
+
sign-in is reported as not checked; the delegated CLI still signs in with its own
|
|
107
|
+
configuration. Probes never load a model or submit a completion automatically. An
|
|
108
|
+
unsupported metadata endpoint remains unverified rather than proof that native
|
|
109
|
+
execution cannot work.
|
|
108
110
|
Template failures require fixing the backend itself. OpenPlanr does not rewrite
|
|
109
111
|
messages/templates, load models automatically or silently change providers.
|
|
110
112
|
When changing a local model, use the exact model ID advertised by that backend;
|
|
@@ -18,9 +18,16 @@ const PROVIDER_VARIABLES = [
|
|
|
18
18
|
'CLAUDE_CODE_USE_VERTEX',
|
|
19
19
|
'CLAUDE_CODE_USE_FOUNDRY',
|
|
20
20
|
];
|
|
21
|
+
const ROUTING_VARIABLES = ['ANTHROPIC_BASE_URL', ...PROVIDER_VARIABLES];
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
function routingVariables(env) {
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
ROUTING_VARIABLES.filter((name) => Object.hasOwn(env, name)).map((name) => [name, env[name]]),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Keeps only routing variables from settings files; callers expose source labels and origins.
|
|
30
|
+
async function readClaudeRoutingSettings(profile, env, cwd, options = {}) {
|
|
24
31
|
const managedRoot =
|
|
25
32
|
options.managedRoot ??
|
|
26
33
|
(process.platform === 'darwin'
|
|
@@ -100,7 +107,7 @@ export async function readClaudeSettingsEnvironment(profile, env, cwd, options =
|
|
|
100
107
|
throw new AdapterError('E_DESTINATION_UNKNOWN', 'Claude routing environment is malformed.');
|
|
101
108
|
inspected.push({
|
|
102
109
|
source,
|
|
103
|
-
env: settings.env ?? {},
|
|
110
|
+
env: routingVariables(settings.env ?? {}),
|
|
104
111
|
...(settings.policyHelper ? { opaqueRouting: true } : {}),
|
|
105
112
|
});
|
|
106
113
|
} catch (error) {
|
|
@@ -122,7 +129,7 @@ export async function readClaudeSettingsEnvironment(profile, env, cwd, options =
|
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
export async function resolveClaudeRouting(profile, env, cwd, options) {
|
|
125
|
-
const settings = await
|
|
132
|
+
const settings = await readClaudeRoutingSettings(profile, env, cwd, options);
|
|
126
133
|
const sources = [{ source: 'parent environment', env }, ...settings];
|
|
127
134
|
const candidates = [];
|
|
128
135
|
const providerSources = [];
|
|
@@ -122,7 +122,7 @@ export function safeNativeDiagnostic(value, destination) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
const ROUTING_SOURCE =
|
|
125
|
-
/^(?:parent environment|user settings|project settings|project local settings|managed file settings|managed fragment settings(?: \d{1,2})?)(?:: (?:ANTHROPIC_BASE_URL|CLAUDE_CODE_USE_BEDROCK|CLAUDE_CODE_USE_VERTEX|CLAUDE_CODE_USE_FOUNDRY|policyHelper
|
|
125
|
+
/^(?:parent environment|user settings|project settings|project local settings|managed file settings|managed fragment settings(?: \d{1,2})?)(?:: (?:ANTHROPIC_BASE_URL|CLAUDE_CODE_USE_BEDROCK|CLAUDE_CODE_USE_VERTEX|CLAUDE_CODE_USE_FOUNDRY|policyHelper))?$/u;
|
|
126
126
|
|
|
127
127
|
function safeRoutingDestination(value) {
|
|
128
128
|
if (value?.class === 'native-managed' && value.origin === 'native-managed')
|
|
@@ -1,40 +1,8 @@
|
|
|
1
1
|
// Local probes are diagnostics; native CLI execution remains authoritative.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { resolveClaudeRouting } from './adapters/claude.mjs';
|
|
4
4
|
import { AdapterError, validateDestination } from './adapters/generic.mjs';
|
|
5
5
|
|
|
6
|
-
async function localProbeToken(profile, env, cwd) {
|
|
7
|
-
const sources = [{ source: 'parent environment', env }];
|
|
8
|
-
const names = ['LM_STUDIO_API_KEY', 'LM_API_TOKEN'];
|
|
9
|
-
// Only Claude routing confirmed to this local origin may present its Anthropic token.
|
|
10
|
-
if (profile.kind === 'claude') {
|
|
11
|
-
sources.push(...(await readClaudeSettingsEnvironment(profile, env, cwd)));
|
|
12
|
-
names.push('ANTHROPIC_AUTH_TOKEN');
|
|
13
|
-
}
|
|
14
|
-
for (const name of names) {
|
|
15
|
-
const candidates = sources.filter(
|
|
16
|
-
(source) => source.env[name] !== undefined && source.env[name] !== '',
|
|
17
|
-
);
|
|
18
|
-
if (!candidates.length) continue;
|
|
19
|
-
const values = candidates.map((source) => source.env[name]);
|
|
20
|
-
if (
|
|
21
|
-
values.some(
|
|
22
|
-
(value) => typeof value !== 'string' || value.length >= 4096 || /[\r\n]/u.test(value),
|
|
23
|
-
) ||
|
|
24
|
-
new Set(values).size !== 1
|
|
25
|
-
)
|
|
26
|
-
throw new AdapterError(
|
|
27
|
-
'E_BACKEND_AUTH_CONFIG',
|
|
28
|
-
'Local metadata authentication could not be confirmed.',
|
|
29
|
-
{
|
|
30
|
-
sources: candidates.map((source) => `${source.source}: ${name}`),
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
return values[0];
|
|
34
|
-
}
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
6
|
async function withinDeadline(operation, signal) {
|
|
39
7
|
if (signal.aborted)
|
|
40
8
|
throw new AdapterError('E_BACKEND_TIMEOUT', 'Local model metadata inspection timed out.');
|
|
@@ -106,9 +74,8 @@ export async function inspectLocalBackend(
|
|
|
106
74
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
107
75
|
const signal = controller.signal;
|
|
108
76
|
try {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (profile.kind === 'claude') {
|
|
77
|
+
if (profile.kind === 'claude') {
|
|
78
|
+
try {
|
|
112
79
|
const resolved = await resolveClaudeRouting(profile, env, cwd);
|
|
113
80
|
if (
|
|
114
81
|
resolved.destination.class !== 'local' ||
|
|
@@ -122,22 +89,21 @@ export async function inspectLocalBackend(
|
|
|
122
89
|
routing: resolved.routing,
|
|
123
90
|
},
|
|
124
91
|
);
|
|
92
|
+
} catch (error) {
|
|
93
|
+
return {
|
|
94
|
+
status: 'not-checked',
|
|
95
|
+
modelStatus: 'unverified',
|
|
96
|
+
selectedModel,
|
|
97
|
+
visibleModels: [],
|
|
98
|
+
diagnostic: { code: error.code ?? 'E_DESTINATION_UNKNOWN', ...error.details },
|
|
99
|
+
};
|
|
125
100
|
}
|
|
126
|
-
token = await localProbeToken(profile, env, cwd);
|
|
127
|
-
} catch (error) {
|
|
128
|
-
return {
|
|
129
|
-
status: 'not-checked',
|
|
130
|
-
modelStatus: 'unverified',
|
|
131
|
-
selectedModel,
|
|
132
|
-
visibleModels: [],
|
|
133
|
-
diagnostic: { code: error.code ?? 'E_BACKEND_AUTH_CONFIG', ...error.details },
|
|
134
|
-
};
|
|
135
101
|
}
|
|
102
|
+
// Sends no credentials: a server that requires sign-in reports authentication-required.
|
|
136
103
|
const readModels = async (path) => {
|
|
137
104
|
const response = await withinDeadline(
|
|
138
105
|
fetchImpl(new URL(path, profile.destination.origin), {
|
|
139
106
|
method: 'GET',
|
|
140
|
-
...(token ? { headers: { Authorization: `Bearer ${token}` } } : {}),
|
|
141
107
|
signal,
|
|
142
108
|
redirect: 'error',
|
|
143
109
|
}),
|
|
@@ -269,9 +235,9 @@ export function profileReadiness(destination, backend) {
|
|
|
269
235
|
if (backend.status === 'authentication-required') {
|
|
270
236
|
return {
|
|
271
237
|
state: 'authentication-required',
|
|
272
|
-
dispatchable:
|
|
238
|
+
dispatchable: true,
|
|
273
239
|
nextAction:
|
|
274
|
-
'
|
|
240
|
+
'The local server requires sign-in, so its models were not checked. The delegated CLI signs in with its own configuration.',
|
|
275
241
|
};
|
|
276
242
|
}
|
|
277
243
|
if (backend.modelStatus === 'not-listed') {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { lstat, mkdir, readdir, readFile, realpath, stat, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
|
+
import { classifyCredentials, credentialSyntax, resolveFindings } from './credentials.mjs';
|
|
4
5
|
|
|
5
6
|
export const CAPSULE_SCHEMA_VERSION = '1.0.0';
|
|
6
7
|
|
|
@@ -12,19 +13,14 @@ const DEFAULT_LIMITS = Object.freeze({
|
|
|
12
13
|
const SECRET_NAME =
|
|
13
14
|
/^(?:\.env(?:\..*)?|\.envrc|\.netrc|\.git-credentials|\.npmrc|\.pypirc|id_(?:rsa|dsa|ecdsa|ed25519)(?:\.pub)?|credentials(?:\.[^.]+)?|service[-_]?account(?:\.[^.]+)?|.*\.(?:pem|p12|pfx|key|tfvars)(?:\.json)?)$/iu;
|
|
14
15
|
const SECRET_SEGMENT = /^(?:\.ssh|\.aws|\.gnupg|\.kube)$/iu;
|
|
15
|
-
const SECRET_VALUE =
|
|
16
|
-
/-----BEGIN (?:[A-Z ]* )?PRIVATE KEY-----|\bAKIA[0-9A-Z]{16}\b|\bgh[pousr]_[A-Za-z0-9_]{20,}\b|\bgithub_pat_[A-Za-z0-9_]{20,}\b|\bsk-(?:proj-)?[A-Za-z0-9_-]{24,}\b|\bxox[baprs]-[A-Za-z0-9-]{20,}\b|"private_key"\s*:\s*"-----BEGIN/iu;
|
|
17
|
-
const SECRET_ASSIGNMENT =
|
|
18
|
-
/(?:^|[^A-Za-z0-9_])(?:[A-Za-z_][A-Za-z0-9_-]*?)?(?:API[_-]?KEY|ACCESS[_-]?TOKEN|AUTH[_-]?TOKEN|CLIENT[_-]?SECRET|PRIVATE[_-]?KEY|PASSWORD|TOKEN|SECRET(?:[_-]?KEY)?)["']?\s*[:=]\s*(["'`])((?:(?!\1|\$\{)[^\r\n\\]|\\.){16,})\1/giu;
|
|
19
|
-
const SECRET_CONFIG_ASSIGNMENT =
|
|
20
|
-
/^[ \t]*(?:export[ \t]+)?(?:[A-Za-z_][A-Za-z0-9_-]*?)?(?:API[_-]?KEY|ACCESS[_-]?TOKEN|AUTH[_-]?TOKEN|CLIENT[_-]?SECRET|PRIVATE[_-]?KEY|PASSWORD|TOKEN|SECRET(?:[_-]?KEY)?)[ \t]*[:=][ \t]*(?!process\.env(?:\.|\[)|import\.meta\.env(?:\.|\[)|Deno\.env\.|os\.environ|env\.)([^\s"'`#()\[\]{}$]{16,})[ \t]*(?:#[^\r\n]*)?\r?$/gimu;
|
|
21
|
-
const CREDENTIAL_PLACEHOLDER =
|
|
22
|
-
/^(?:example(?:[-_].*)?|placeholder(?:[-_].*)?|your[-_].*|(?:change|replace)[-_]me(?:[-_].*)?|(?:dummy|fake|mock|test|never[-_]return)[-_](?:api[-_]?key|access[-_]?token|auth[-_]?token|client[-_]?secret|password|token|secret(?:[-_]?key)?))$/iu;
|
|
23
16
|
const TASK_ID = /^(?:T|TASK|QT)-\d{3,}$/u;
|
|
24
17
|
const STORY_ID = /^US-\d{3,}$/u;
|
|
25
18
|
const SPEC_ID = /^SPEC-\d{3,}$/u;
|
|
26
19
|
const FEATURE_ID = /^FEAT-\d{3,}$/u;
|
|
27
20
|
const EPIC_ID = /^EPIC-\d{3,}$/u;
|
|
21
|
+
// Credential findings of an optional omission, keyed by the omission entry. The delegate reads
|
|
22
|
+
// the written capsule, so they reach only the parent's preview.
|
|
23
|
+
const OMISSION_FINDINGS = new WeakMap();
|
|
28
24
|
|
|
29
25
|
export class CapsuleError extends Error {
|
|
30
26
|
constructor(code, message, details = {}) {
|
|
@@ -68,14 +64,9 @@ function isSecretPath(path) {
|
|
|
68
64
|
return parts.some((part) => SECRET_SEGMENT.test(part)) || SECRET_NAME.test(parts.at(-1));
|
|
69
65
|
}
|
|
70
66
|
|
|
67
|
+
/** True when free text holds credential material; source files are classified by their syntax. */
|
|
71
68
|
export function containsSecret(bytes) {
|
|
72
|
-
|
|
73
|
-
if (SECRET_VALUE.test(content)) return true;
|
|
74
|
-
for (const match of content.matchAll(SECRET_ASSIGNMENT))
|
|
75
|
-
if (!CREDENTIAL_PLACEHOLDER.test(match[2])) return true;
|
|
76
|
-
for (const match of content.matchAll(SECRET_CONFIG_ASSIGNMENT))
|
|
77
|
-
if (!CREDENTIAL_PLACEHOLDER.test(match[1])) return true;
|
|
78
|
-
return false;
|
|
69
|
+
return classifyCredentials(bytes).findings.length > 0;
|
|
79
70
|
}
|
|
80
71
|
|
|
81
72
|
export function assertCredentialFreeText(
|
|
@@ -84,10 +75,34 @@ export function assertCredentialFreeText(
|
|
|
84
75
|
) {
|
|
85
76
|
if (typeof value !== 'string')
|
|
86
77
|
throw new CapsuleError('E_CAPSULE_INPUT', `${label} must be text.`);
|
|
87
|
-
|
|
78
|
+
const { contentDigest, findings } = classifyCredentials(Buffer.from(value, 'utf8'), {
|
|
79
|
+
label,
|
|
80
|
+
resolvable: false,
|
|
81
|
+
});
|
|
82
|
+
if (findings.length)
|
|
88
83
|
throw new CapsuleError(
|
|
89
84
|
code,
|
|
90
85
|
`${label} contains credential material; use native configuration or credential environment references instead.`,
|
|
86
|
+
{ findings, contentDigest },
|
|
87
|
+
);
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function credentialResolutionList(value) {
|
|
92
|
+
if (
|
|
93
|
+
!Array.isArray(value) ||
|
|
94
|
+
value.length > 64 ||
|
|
95
|
+
value.some(
|
|
96
|
+
(resolution) =>
|
|
97
|
+
!resolution ||
|
|
98
|
+
typeof resolution !== 'object' ||
|
|
99
|
+
!/^cred_[a-f0-9]{16}$/u.test(resolution.id ?? '') ||
|
|
100
|
+
!/^sha256:[a-f0-9]{64}$/u.test(resolution.contentDigest ?? ''),
|
|
101
|
+
)
|
|
102
|
+
)
|
|
103
|
+
throw new CapsuleError(
|
|
104
|
+
'E_CAPSULE_INPUT',
|
|
105
|
+
'Credential resolutions must list at most 64 { id, contentDigest } entries from reported findings.',
|
|
91
106
|
);
|
|
92
107
|
return value;
|
|
93
108
|
}
|
|
@@ -312,8 +327,22 @@ export async function buildContextCapsule({
|
|
|
312
327
|
optionalFiles = [],
|
|
313
328
|
readOnlyRepositories = [],
|
|
314
329
|
limits,
|
|
330
|
+
credentialResolutions = [],
|
|
315
331
|
} = {}) {
|
|
316
332
|
if (!repositoryRoot) throw new CapsuleError('E_CAPSULE_SOURCE', 'repositoryRoot is required.');
|
|
333
|
+
const resolutions = credentialResolutionList(credentialResolutions);
|
|
334
|
+
const appliedResolutions = [];
|
|
335
|
+
const credentialCheck = (bytes, origin) => {
|
|
336
|
+
const classification = classifyCredentials(bytes, origin);
|
|
337
|
+
return {
|
|
338
|
+
...resolveFindings(classification, resolutions),
|
|
339
|
+
contentDigest: classification.contentDigest,
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
const recordResolutions = ({ applied, contentDigest }, source) => {
|
|
343
|
+
for (const { id, rule, location } of applied)
|
|
344
|
+
appliedResolutions.push({ id, contentDigest, ...source, rule, location });
|
|
345
|
+
};
|
|
317
346
|
if (request !== undefined && typeof request !== 'string')
|
|
318
347
|
throw new CapsuleError('E_CAPSULE_INPUT', 'A direct request must be text.');
|
|
319
348
|
if (Boolean(taskSelector) === Boolean(request?.trim())) {
|
|
@@ -354,8 +383,18 @@ export async function buildContextCapsule({
|
|
|
354
383
|
if (request && Buffer.byteLength(request, 'utf8') > bounds.maxFileBytes) {
|
|
355
384
|
throw new CapsuleError('E_CAPSULE_LIMIT', 'The direct request exceeds the capsule text limit.');
|
|
356
385
|
}
|
|
357
|
-
if (request
|
|
358
|
-
|
|
386
|
+
if (request) {
|
|
387
|
+
const credentials = credentialCheck(Buffer.from(request, 'utf8'), { label: 'request' });
|
|
388
|
+
if (credentials.remaining.length)
|
|
389
|
+
throw new CapsuleError(
|
|
390
|
+
'E_CAPSULE_SECRET',
|
|
391
|
+
'The direct request contains credential material.',
|
|
392
|
+
{
|
|
393
|
+
findings: credentials.remaining,
|
|
394
|
+
contentDigest: credentials.contentDigest,
|
|
395
|
+
},
|
|
396
|
+
);
|
|
397
|
+
recordResolutions(credentials, { source: 'request' });
|
|
359
398
|
}
|
|
360
399
|
const roots = await sourceRoots(repositoryRoot, readOnlyRepositories);
|
|
361
400
|
const project = roots.get('project').physical;
|
|
@@ -381,9 +420,16 @@ export async function buildContextCapsule({
|
|
|
381
420
|
return prior;
|
|
382
421
|
}
|
|
383
422
|
const optionalOmission = (reason) => {
|
|
384
|
-
if (required)
|
|
423
|
+
if (required)
|
|
424
|
+
throw new CapsuleError(reason.code, reason.message, {
|
|
425
|
+
repositoryKey,
|
|
426
|
+
path,
|
|
427
|
+
...reason.details,
|
|
428
|
+
});
|
|
385
429
|
if (!omitted.has(key)) {
|
|
386
|
-
|
|
430
|
+
const omission = { repositoryKey, path, role, reason: reason.code };
|
|
431
|
+
if (reason.details) OMISSION_FINDINGS.set(omission, reason.details);
|
|
432
|
+
omissions.push(omission);
|
|
387
433
|
omitted.add(key);
|
|
388
434
|
}
|
|
389
435
|
return null;
|
|
@@ -467,11 +513,20 @@ export async function buildContextCapsule({
|
|
|
467
513
|
message: `Required source exceeds capsule limits: ${path}`,
|
|
468
514
|
});
|
|
469
515
|
}
|
|
470
|
-
|
|
516
|
+
// A link reads as its target's syntax, or as configuration when either path is configuration.
|
|
517
|
+
const syntaxes = [path, relative(allowed, physical).split(sep).join('/')].map(credentialSyntax);
|
|
518
|
+
const credentials = credentialCheck(bytes, {
|
|
519
|
+
path,
|
|
520
|
+
label: `${repositoryKey}/${path}`,
|
|
521
|
+
syntax: syntaxes.includes('config') ? 'config' : syntaxes[1],
|
|
522
|
+
});
|
|
523
|
+
if (credentials.remaining.length)
|
|
471
524
|
return optionalOmission({
|
|
472
525
|
code: 'E_CAPSULE_SECRET',
|
|
473
526
|
message: `Credential material detected in source: ${path}`,
|
|
527
|
+
details: { findings: credentials.remaining, contentDigest: credentials.contentDigest },
|
|
474
528
|
});
|
|
529
|
+
recordResolutions(credentials, { repositoryKey, path });
|
|
475
530
|
const copy = {
|
|
476
531
|
repositoryKey,
|
|
477
532
|
path,
|
|
@@ -686,6 +741,7 @@ export async function buildContextCapsule({
|
|
|
686
741
|
inventory,
|
|
687
742
|
files,
|
|
688
743
|
omissions,
|
|
744
|
+
...(appliedResolutions.length ? { credentialResolutions: appliedResolutions } : {}),
|
|
689
745
|
planning: {
|
|
690
746
|
logicalPath: join(project, '.planr'),
|
|
691
747
|
physicalPath: roots.get('project').planning,
|
|
@@ -731,7 +787,13 @@ export function previewContextCapsule(capsule) {
|
|
|
731
787
|
mode: capsule.mode,
|
|
732
788
|
selector: capsule.selector,
|
|
733
789
|
inventory: capsule.inventory,
|
|
734
|
-
omissions: capsule.omissions
|
|
790
|
+
omissions: capsule.omissions.map((omission) => ({
|
|
791
|
+
...omission,
|
|
792
|
+
...OMISSION_FINDINGS.get(omission),
|
|
793
|
+
})),
|
|
794
|
+
...(capsule.credentialResolutions
|
|
795
|
+
? { credentialResolutions: capsule.credentialResolutions }
|
|
796
|
+
: {}),
|
|
735
797
|
blockers: [],
|
|
736
798
|
planning: capsule.planning ?? null,
|
|
737
799
|
sourceKeys: capsule.sourceKeys,
|