@planu/cli 4.14.1 → 5.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 +35 -1
- package/LICENSE +55 -12
- package/README.md +10 -2
- package/dist/cli/commands/install.d.ts +1 -12
- package/dist/cli/commands/install.js +9 -65
- package/dist/cli/commands/job.js +4 -3
- package/dist/cli/commands/spec.js +2 -2
- package/dist/cli/commands/validate.js +2 -2
- package/dist/cli/router.js +1 -3
- package/dist/config/environment-schema.json +1 -3
- package/dist/config/official-sdd-tools.d.ts +4 -0
- package/dist/config/official-sdd-tools.js +35 -0
- package/dist/config/product-public.d.ts +139 -3
- package/dist/config/product-public.js +8 -1
- package/dist/config/product-public.json +7 -36
- package/dist/config/registries/hosts/codex.json +20 -363
- package/dist/config/release-policy.json +84 -2
- package/dist/config/runtime-policy.json +12 -1
- package/dist/config/skill-templates/planu-resume-work.md +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/spec-validator.d.ts +4 -4
- package/dist/core/spec-validator.js +1 -1
- package/dist/engine/abortable-process-runner.d.ts +20 -2
- package/dist/engine/abortable-process-runner.js +243 -74
- package/dist/engine/ambiguity-scorer.js +4 -26
- package/dist/engine/auth/scope-mapper.js +1 -7
- package/dist/engine/autopilot/state-updater.js +4 -4
- package/dist/engine/cascade-hooks/hooks/review-enricher.hook.js +9 -6
- package/dist/engine/cascade-hooks/state-drift-detector.d.ts +3 -3
- package/dist/engine/cascade-hooks/state-drift-detector.js +1 -1
- package/dist/engine/ci-generator/planu-config.js +1 -7
- package/dist/engine/clarification-gate/gate.d.ts +3 -3
- package/dist/engine/code-scanner/layer-scanner.js +6 -22
- package/dist/engine/core-bridge.d.ts +3 -3
- package/dist/engine/cost-guardrails.d.ts +1 -1
- package/dist/engine/cost-guardrails.js +1 -1
- package/dist/engine/criterion-identity.d.ts +1 -0
- package/dist/engine/criterion-identity.js +7 -0
- package/dist/engine/dashboard/data-loader.js +2 -7
- package/dist/engine/dashboard/templates-layout.js +0 -3
- package/dist/engine/dashboard/templates-project.js +1 -13
- package/dist/engine/docs-site-generator/data-collector.d.ts +1 -1
- package/dist/engine/docs-site-generator/data-collector.js +7 -28
- package/dist/engine/docs-site-generator/tools-renderer.js +3 -10
- package/dist/engine/evidence-gates/artifact-reader.d.ts +10 -1
- package/dist/engine/evidence-gates/artifact-reader.js +115 -2
- package/dist/engine/evidence-gates/lifecycle-gate.js +4 -3
- package/dist/engine/evidence-gates/reconciliation-freshness.d.ts +11 -0
- package/dist/engine/evidence-gates/reconciliation-freshness.js +72 -0
- package/dist/engine/evidence-index/done-drift.d.ts +1 -1
- package/dist/engine/evidence-index/done-drift.js +40 -18
- package/dist/engine/execution/context.js +3 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.d.ts +4 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.js +400 -0
- package/dist/engine/execution/job-runtime.d.ts +30 -0
- package/dist/engine/execution/job-runtime.js +114 -6
- package/dist/engine/execution/public-job-sanitizer.d.ts +4 -0
- package/dist/engine/execution/public-job-sanitizer.js +31 -0
- package/dist/engine/execution/validate-job-executor.d.ts +12 -1
- package/dist/engine/execution/validate-job-executor.js +549 -86
- package/dist/engine/execution/validate-job-payload.js +107 -50
- package/dist/engine/execution/validate-job-recovery.js +1 -1
- package/dist/engine/execution/validate-worker-runtime.d.ts +5 -0
- package/dist/engine/execution/validate-worker-runtime.js +90 -2
- package/dist/engine/execution/validate-worker-thread.js +17 -24
- package/dist/engine/handoff-artifacts/schemas.d.ts +2 -1
- package/dist/engine/handoff-artifacts/schemas.js +33 -0
- package/dist/engine/handoff-packager.d.ts +19 -0
- package/dist/engine/handoff-packager.js +415 -13
- package/dist/engine/hooks/effort-configurator.js +1 -1
- package/dist/engine/impact-detector/test-break-predictor.js +3 -3
- package/dist/engine/impact-detector/tool-registration.js +1 -1
- package/dist/engine/implementation-contract/renderer.js +23 -8
- package/dist/engine/lifecycle-reconciliation-io.d.ts +11 -0
- package/dist/engine/lifecycle-reconciliation-io.js +180 -0
- package/dist/engine/lifecycle-reconciliation.d.ts +16 -0
- package/dist/engine/lifecycle-reconciliation.js +406 -0
- package/dist/engine/local-first/tool-classification.js +2 -0
- package/dist/engine/macos-keychain-native-port.d.ts +5 -0
- package/dist/engine/macos-keychain-native-port.js +19 -7
- package/dist/engine/migrations/remove-commercial-state.d.ts +3 -0
- package/dist/engine/migrations/remove-commercial-state.js +343 -0
- package/dist/engine/network-policy.js +1 -0
- package/dist/engine/planu-core.darwin-arm64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-arm64.node.sbom.json +10 -10
- package/dist/engine/planu-core.darwin-x64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-x64.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +10 -10
- package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +10 -10
- package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +10 -10
- package/dist/engine/readiness-checker.d.ts +1 -16
- package/dist/engine/readiness-checker.js +27 -88
- package/dist/engine/runtime-policy.d.ts +2 -0
- package/dist/engine/runtime-policy.js +42 -5
- package/dist/engine/runtime-security/rate-limiter.js +0 -1
- package/dist/engine/safety/contained-project-file.d.ts +3 -0
- package/dist/engine/safety/contained-project-file.js +23 -0
- package/dist/engine/scope-boundaries/contradiction-checker.js +63 -1
- package/dist/engine/scope-boundaries/scope-validator.js +45 -7
- package/dist/engine/session/checkpoint-writer.js +0 -9
- package/dist/engine/spec-format/acceptance-criteria.d.ts +6 -2
- package/dist/engine/spec-format/acceptance-criteria.js +77 -18
- package/dist/engine/spec-format/markdown-sections.d.ts +14 -0
- package/dist/engine/spec-format/markdown-sections.js +105 -0
- package/dist/engine/spec-format/read-technical-section.js +33 -5
- package/dist/engine/spec-format/technical-md-populator.js +3 -2
- package/dist/engine/spec-format/unified-spec-builder.d.ts +7 -0
- package/dist/engine/spec-format/unified-spec-builder.js +202 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.d.ts +18 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.js +479 -0
- package/dist/engine/spec-migrator/filesystem-import.d.ts +4 -8
- package/dist/engine/spec-migrator/filesystem-import.js +121 -14
- package/dist/engine/spec-migrator/frontmatter-parser.js +32 -15
- package/dist/engine/spec-migrator/index.d.ts +1 -0
- package/dist/engine/spec-migrator/index.js +1 -0
- package/dist/engine/spec-state-machine/transition-spec.d.ts +6 -1
- package/dist/engine/spec-state-machine/transition-spec.js +10 -1
- package/dist/engine/technical-enricher/index.js +16 -8
- package/dist/engine/technical-enricher/render-enriched.d.ts +1 -0
- package/dist/engine/technical-enricher/render-enriched.js +42 -14
- package/dist/engine/telemetry/health-checker.js +53 -17
- package/dist/engine/telemetry/telemetry-client.js +26 -8
- package/dist/engine/text-signal-boundaries.d.ts +2 -0
- package/dist/engine/text-signal-boundaries.js +25 -2
- package/dist/engine/time/relative-date.d.ts +3 -0
- package/dist/engine/time/relative-date.js +16 -0
- package/dist/engine/timing/budget.d.ts +11 -0
- package/dist/engine/timing/budget.js +27 -9
- package/dist/engine/token-optimizer/analytics.d.ts +1 -1
- package/dist/engine/token-optimizer/analytics.js +5 -6
- package/dist/engine/usage-tracker/core.d.ts +2 -2
- package/dist/engine/usage-tracker/core.js +1 -2
- package/dist/engine/usage-tracker/index.d.ts +0 -3
- package/dist/engine/usage-tracker/index.js +0 -3
- package/dist/engine/usage-tracker/stats.d.ts +2 -2
- package/dist/engine/usage-tracker/stats.js +1 -28
- package/dist/engine/validation/durable-validation.d.ts +1 -1
- package/dist/engine/validation/durable-validation.js +3 -82
- package/dist/engine/validation/validation-freshness.d.ts +11 -1
- package/dist/engine/validation/validation-freshness.js +231 -91
- package/dist/engine/validation/validation-receipt.d.ts +9 -6
- package/dist/engine/validation/validation-receipt.js +84 -24
- package/dist/engine/validation/validation-source-digest.d.ts +2 -0
- package/dist/engine/validation/validation-source-digest.js +86 -0
- package/dist/engine/validation/validation-submission.d.ts +5 -4
- package/dist/engine/validation/validation-submission.js +25 -11
- package/dist/engine/validation/validation-worktree.d.ts +21 -0
- package/dist/engine/validation/validation-worktree.js +260 -0
- package/dist/engine/validation-impact-planner.d.ts +14 -2
- package/dist/engine/validation-impact-planner.js +0 -3
- package/dist/engine/validator/dor-dod.d.ts +1 -0
- package/dist/engine/validator/dor-dod.js +5 -3
- package/dist/engine/validator/extractors.d.ts +1 -5
- package/dist/engine/validator/extractors.js +24 -69
- package/dist/engine/validator/spec-compliance-runner.d.ts +12 -24
- package/dist/engine/validator/spec-compliance-runner.js +429 -211
- package/dist/engine/validator.js +35 -22
- package/dist/index.js +4 -16
- package/dist/resources/usage-stats-resource.js +2 -18
- package/dist/security/adapters/linux-secret-service.js +7 -3
- package/dist/security/adapters/windows-credential-manager.js +6 -4
- package/dist/server/routes/specs.js +10 -0
- package/dist/storage/base-store.d.ts +1 -1
- package/dist/storage/base-store.js +1 -1
- package/dist/storage/feedback-remote.d.ts +2 -3
- package/dist/storage/feedback-remote.js +45 -31
- package/dist/storage/global-store.d.ts +1 -17
- package/dist/storage/global-store.js +1 -42
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -2
- package/dist/storage/migrations/canonical-storage.js +124 -11
- package/dist/storage/runtime-db.d.ts +9 -0
- package/dist/storage/runtime-db.js +64 -8
- package/dist/storage/spec-store.d.ts +14 -2
- package/dist/storage/spec-store.js +104 -14
- package/dist/storage/status-store/atomic-status-write.d.ts +5 -0
- package/dist/storage/status-store/atomic-status-write.js +57 -0
- package/dist/storage/status-store/file-lock.js +30 -11
- package/dist/storage/status-store/self-healing.js +3 -3
- package/dist/storage/status-store/version-sync.d.ts +2 -1
- package/dist/storage/status-store/version-sync.js +35 -40
- package/dist/storage/usage-store.d.ts +1 -5
- package/dist/storage/usage-store.js +0 -35
- package/dist/tools/auto-update-handler.d.ts +3 -3
- package/dist/tools/auto-update-handler.js +3 -3
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.d.ts +2 -1
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.js +10 -7
- package/dist/tools/challenge-spec/scenario-collector.js +1 -1
- package/dist/tools/challenge-spec/scenarios-data.js +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.d.ts +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.js +35 -11
- package/dist/tools/challenge-spec.js +5 -5
- package/dist/tools/check-readiness.js +1 -1
- package/dist/tools/configure-telemetry.js +30 -2
- package/dist/tools/create-spec/spec-builder.js +0 -11
- package/dist/tools/create-spec.d.ts +1 -0
- package/dist/tools/create-spec.js +444 -239
- package/dist/tools/git/branch-ops.d.ts +1 -1
- package/dist/tools/git/branch-ops.js +3 -2
- package/dist/tools/init-project/handler.js +10 -12
- package/dist/tools/init-project/host-assets-writer.js +26 -1
- package/dist/tools/init-project/lint-scaffolder.d.ts +3 -3
- package/dist/tools/init-project/migration-runner.d.ts +2 -4
- package/dist/tools/init-project/migration-runner.js +3 -2
- package/dist/tools/init-project/portable-index-reconciler.d.ts +4 -0
- package/dist/tools/init-project/portable-index-reconciler.js +14 -0
- package/dist/tools/init-project/result-builder.js +1 -3
- package/dist/tools/jobs/handlers.js +38 -6
- package/dist/tools/list-specs.js +5 -26
- package/dist/tools/merge-risk-handler.js +2 -2
- package/dist/tools/package-handoff.js +2 -0
- package/dist/tools/reconcile-spec.js +0 -27
- package/dist/tools/register-agent-squad-tools.js +2 -2
- package/dist/tools/register-platform-tools/design-stack-tools.js +11 -11
- package/dist/tools/register-platform-tools/lifecycle-infra-tools.js +7 -7
- package/dist/tools/register-sdd-tools.d.ts +1 -1
- package/dist/tools/register-sdd-tools.js +2 -29
- package/dist/tools/register-spec-tools/analysis-tools.js +8 -8
- package/dist/tools/register-spec-tools/core-spec-tools.js +17 -8
- package/dist/tools/safe-handler.d.ts +5 -13
- package/dist/tools/safe-handler.js +7 -23
- package/dist/tools/schemas/index.d.ts +1 -1
- package/dist/tools/schemas/index.js +1 -1
- package/dist/tools/schemas/output-schemas.d.ts +0 -23
- package/dist/tools/schemas/output-schemas.js +0 -28
- package/dist/tools/schemas/spec.d.ts +4 -0
- package/dist/tools/schemas/spec.js +3 -0
- package/dist/tools/schemas/validate-output-schema.d.ts +11 -0
- package/dist/tools/schemas/validate-output-schema.js +7 -0
- package/dist/tools/spec-prompt-handler.js +3 -3
- package/dist/tools/sync-spec-state-handler.d.ts +1 -1
- package/dist/tools/sync-spec-state-handler.js +1 -1
- package/dist/tools/tool-entry.d.ts +4 -4
- package/dist/tools/tool-entry.js +3 -3
- package/dist/tools/tool-registry/core-tools.js +31 -15
- package/dist/tools/tool-registry/group-infra.js +27 -110
- package/dist/tools/tool-registry/group-quality-compliance.js +26 -26
- package/dist/tools/tool-registry/inventory.d.ts +2 -0
- package/dist/tools/tool-registry/inventory.js +2 -0
- package/dist/tools/tool-registry-helpers.d.ts +3 -3
- package/dist/tools/tool-registry-helpers.js +3 -3
- package/dist/tools/tool-usage-report/registered-tools.d.ts +1 -1
- package/dist/tools/tool-usage-report/registered-tools.js +3 -15
- package/dist/tools/update-status/approval-gates.js +3 -0
- package/dist/tools/update-status/done-receipt-verifier.js +40 -27
- package/dist/tools/update-status/evidence-gate.js +36 -1
- package/dist/tools/update-status/file-sync.d.ts +2 -1
- package/dist/tools/update-status/file-sync.js +57 -6
- package/dist/tools/update-status/index.d.ts +2 -0
- package/dist/tools/update-status/index.js +95 -58
- package/dist/tools/update-status/response-builder.js +3 -3
- package/dist/tools/update-status/side-effects.d.ts +2 -0
- package/dist/tools/update-status/side-effects.js +2 -2
- package/dist/tools/update-status/transition-guard.js +32 -15
- package/dist/tools/update-status-actions.d.ts +4 -2
- package/dist/tools/update-status-actions.js +16 -14
- package/dist/tools/usage-report.js +1 -16
- package/dist/tools/usage-stats.js +1 -18
- package/dist/tools/usage-tracking.d.ts +4 -0
- package/dist/tools/usage-tracking.js +20 -0
- package/dist/tools/validate-lint.d.ts +1 -0
- package/dist/tools/validate-lint.js +1 -1
- package/dist/tools/validate.d.ts +2 -1
- package/dist/tools/validate.js +114 -34
- package/dist/transports/http-transport.js +6 -8
- package/dist/transports/mcp-types.d.ts +0 -2
- package/dist/transports/session-context.js +1 -1
- package/dist/types/cascade-hooks.d.ts +1 -1
- package/dist/types/ci.d.ts +0 -4
- package/dist/types/clarification-token.d.ts +1 -1
- package/dist/types/claude-code-runtime.d.ts +0 -27
- package/dist/types/commercial-migration.d.ts +17 -0
- package/dist/types/commercial-migration.js +2 -0
- package/dist/types/common/primitives.d.ts +0 -2
- package/dist/types/core-bridge.d.ts +4 -10
- package/dist/types/dashboard.d.ts +3 -7
- package/dist/types/docs.d.ts +0 -1
- package/dist/types/durable-job.d.ts +4 -4
- package/dist/types/durable-validation.d.ts +100 -2
- package/dist/types/durable-validation.js +165 -1
- package/dist/types/errors/structured-error.d.ts +3 -3
- package/dist/types/estimation.d.ts +2 -0
- package/dist/types/evidence-gates.d.ts +9 -1
- package/dist/types/execution.d.ts +2 -0
- package/dist/types/gemini-integration.d.ts +0 -11
- package/dist/types/handoff-artifacts.d.ts +41 -0
- package/dist/types/hooks-advanced.d.ts +0 -13
- package/dist/types/impact-detection.d.ts +2 -2
- package/dist/types/index.d.ts +2 -6
- package/dist/types/index.js +1 -5
- package/dist/types/kiro-integration.d.ts +0 -6
- package/dist/types/network-policy.d.ts +1 -1
- package/dist/types/project/lint-scaffolder.d.ts +1 -1
- package/dist/types/runtime-policy.d.ts +11 -0
- package/dist/types/session-safeguard.d.ts +0 -31
- package/dist/types/spec/canonical-repair.d.ts +81 -0
- package/dist/types/spec/canonical-repair.js +2 -0
- package/dist/types/spec/core.d.ts +14 -0
- package/dist/types/spec/index.d.ts +1 -0
- package/dist/types/spec/index.js +1 -0
- package/dist/types/spec/inputs.d.ts +29 -0
- package/dist/types/spec-format.d.ts +24 -0
- package/dist/types/telemetry.d.ts +4 -1
- package/dist/types/transport.d.ts +0 -2
- package/dist/types/usage.d.ts +1 -36
- package/dist/types/usage.js +1 -1
- package/dist/types/validate-worker.d.ts +6 -0
- package/dist/types/validation-receipt.d.ts +1 -1
- package/dist/types/validation.d.ts +2 -2
- package/package.json +16 -12
- package/planu-native.json +1 -1
- package/planu-plugin.json +23 -40
- package/scripts/lib/pending-release-file.mjs +93 -0
- package/src/i18n/messages/en.json +0 -41
- package/src/i18n/messages/es.json +0 -41
- package/src/i18n/messages/pt.json +0 -41
- package/dist/cli/commands/activate.d.ts +0 -14
- package/dist/cli/commands/activate.js +0 -174
- package/dist/config/license-plans.json +0 -251
- package/dist/config/product-public.ts +0 -148
- package/dist/config/server-instructions.ts +0 -121
- package/dist/config/version-defaults.ts +0 -76
- package/dist/config/version.ts +0 -21
- package/dist/engine/ai-integration/gemini/settings-generator.d.ts +0 -4
- package/dist/engine/ai-integration/gemini/settings-generator.js +0 -195
- package/dist/engine/ai-integration/kiro/hooks-generator.d.ts +0 -6
- package/dist/engine/ai-integration/kiro/hooks-generator.js +0 -75
- package/dist/engine/hooks/full-spectrum-generator.d.ts +0 -32
- package/dist/engine/hooks/full-spectrum-generator.js +0 -117
- package/dist/engine/license-validator/config-loader.d.ts +0 -5
- package/dist/engine/license-validator/config-loader.js +0 -16
- package/dist/engine/license-validator/core.d.ts +0 -15
- package/dist/engine/license-validator/core.js +0 -151
- package/dist/engine/license-validator/fingerprint.d.ts +0 -3
- package/dist/engine/license-validator/fingerprint.js +0 -17
- package/dist/engine/license-validator/lemon-squeezy.d.ts +0 -5
- package/dist/engine/license-validator/lemon-squeezy.js +0 -55
- package/dist/engine/license-validator.d.ts +0 -5
- package/dist/engine/license-validator.js +0 -6
- package/dist/engine/product-intelligence/index.d.ts +0 -7
- package/dist/engine/product-intelligence/index.js +0 -211
- package/dist/engine/session/auto-save.d.ts +0 -18
- package/dist/engine/session/auto-save.js +0 -98
- package/dist/engine/session/context-snapshot.d.ts +0 -8
- package/dist/engine/session/context-snapshot.js +0 -49
- package/dist/engine/session/memory-sync.d.ts +0 -12
- package/dist/engine/session/memory-sync.js +0 -34
- package/dist/engine/session/session-diff.d.ts +0 -11
- package/dist/engine/session/session-diff.js +0 -42
- package/dist/engine/session/session-merge.d.ts +0 -12
- package/dist/engine/session/session-merge.js +0 -55
- package/dist/engine/session-safeguard/checkpoint-runner.d.ts +0 -4
- package/dist/engine/session-safeguard/checkpoint-runner.js +0 -70
- package/dist/engine/session-safeguard/learnings-buffer.d.ts +0 -15
- package/dist/engine/session-safeguard/learnings-buffer.js +0 -91
- package/dist/engine/session-safeguard/precompaction-drain.d.ts +0 -10
- package/dist/engine/session-safeguard/precompaction-drain.js +0 -82
- package/dist/engine/session-safeguard/unpushed-detector.d.ts +0 -7
- package/dist/engine/session-safeguard/unpushed-detector.js +0 -59
- package/dist/engine/spec-changelog/core.d.ts +0 -16
- package/dist/engine/spec-changelog/core.js +0 -176
- package/dist/engine/spec-changelog/diff.d.ts +0 -18
- package/dist/engine/spec-changelog/diff.js +0 -121
- package/dist/engine/spec-changelog/index.d.ts +0 -3
- package/dist/engine/spec-changelog/index.js +0 -4
- package/dist/engine/trial-engine.d.ts +0 -5
- package/dist/engine/trial-engine.js +0 -14
- package/dist/engine/usage-tracker/rate-check.d.ts +0 -7
- package/dist/engine/usage-tracker/rate-check.js +0 -18
- package/dist/engine/usage-tracker/rate-limiter.d.ts +0 -14
- package/dist/engine/usage-tracker/rate-limiter.js +0 -73
- package/dist/engine/usage-tracker/trial.d.ts +0 -27
- package/dist/engine/usage-tracker/trial.js +0 -49
- package/dist/engine/webhook/event-handlers.d.ts +0 -25
- package/dist/engine/webhook/event-handlers.js +0 -89
- package/dist/engine/webhook/index.d.ts +0 -4
- package/dist/engine/webhook/index.js +0 -5
- package/dist/engine/webhook/server.d.ts +0 -12
- package/dist/engine/webhook/server.js +0 -249
- package/dist/engine/webhook/signature.d.ts +0 -16
- package/dist/engine/webhook/signature.js +0 -49
- package/dist/storage/license-store.d.ts +0 -6
- package/dist/storage/license-store.js +0 -63
- package/dist/storage/session-store.d.ts +0 -20
- package/dist/storage/session-store.js +0 -136
- package/dist/tools/activate-license.d.ts +0 -6
- package/dist/tools/activate-license.js +0 -132
- package/dist/tools/checkpoint-handler.d.ts +0 -3
- package/dist/tools/checkpoint-handler.js +0 -130
- package/dist/tools/export-session.d.ts +0 -3
- package/dist/tools/export-session.js +0 -90
- package/dist/tools/license-gate.d.ts +0 -18
- package/dist/tools/license-gate.js +0 -222
- package/dist/tools/license-status.d.ts +0 -3
- package/dist/tools/license-status.js +0 -93
- package/dist/tools/list-sessions.d.ts +0 -3
- package/dist/tools/list-sessions.js +0 -46
- package/dist/tools/planu-session-checkpoint.d.ts +0 -6
- package/dist/tools/planu-session-checkpoint.js +0 -42
- package/dist/tools/restore-session.d.ts +0 -3
- package/dist/tools/restore-session.js +0 -71
- package/dist/tools/spec-history.d.ts +0 -3
- package/dist/tools/spec-history.js +0 -59
- package/dist/tools/webhook.d.ts +0 -6
- package/dist/tools/webhook.js +0 -150
- package/dist/types/changelog.d.ts +0 -49
- package/dist/types/changelog.js +0 -3
- package/dist/types/licensing.d.ts +0 -109
- package/dist/types/licensing.js +0 -4
- package/dist/types/product-intelligence.d.ts +0 -60
- package/dist/types/product-intelligence.js +0 -3
- package/dist/types/session.d.ts +0 -84
- package/dist/types/session.js +0 -3
- package/dist/types/webhook.d.ts +0 -62
- package/dist/types/webhook.js +0 -4
|
@@ -19,6 +19,7 @@ import { handleGenerateDiagram } from '../diagram-handler.js';
|
|
|
19
19
|
import { handleCheckParallelSafety } from '../parallel-safety-handler.js';
|
|
20
20
|
import { handleAnalyzePerformanceImpact } from '../performance-analysis-handler.js';
|
|
21
21
|
import { handlePlanStatus } from '../status-handler.js';
|
|
22
|
+
import { handleSessionCheckpoint } from '../session-checkpoint.js';
|
|
22
23
|
import { handleValidateWorkflow } from '../validate-workflow.js';
|
|
23
24
|
import { handleTransformCode } from '../transform-code-handler.js';
|
|
24
25
|
import { handleConfigureTelemetry } from '../configure-telemetry.js';
|
|
@@ -47,6 +48,21 @@ import { handleStorageExport, handleStorageImport } from '../storage-bundle-hand
|
|
|
47
48
|
import { handleCancelJob, handleGetJob, handleRestartJob, handleWatchJob, } from '../jobs/handlers.js';
|
|
48
49
|
// ── Registry ─────────────────────────────────────────────────────────────────
|
|
49
50
|
const coreToolsRegistry = [
|
|
51
|
+
{
|
|
52
|
+
name: 'session_checkpoint',
|
|
53
|
+
description: 'Persist a compact, bounded session checkpoint to planu/session-context.md for the next session.',
|
|
54
|
+
schema: {
|
|
55
|
+
projectPath: z.string().trim().min(1).max(4096),
|
|
56
|
+
},
|
|
57
|
+
handler: handleSessionCheckpoint,
|
|
58
|
+
annotations: {
|
|
59
|
+
title: 'Session Checkpoint',
|
|
60
|
+
readOnlyHint: false,
|
|
61
|
+
destructiveHint: false,
|
|
62
|
+
},
|
|
63
|
+
wrap: 'safe',
|
|
64
|
+
group: 'core',
|
|
65
|
+
},
|
|
50
66
|
{
|
|
51
67
|
name: 'get_job',
|
|
52
68
|
description: 'Read the durable state and latest checkpoint or result for a local Planu job.',
|
|
@@ -237,7 +253,7 @@ const coreToolsRegistry = [
|
|
|
237
253
|
},
|
|
238
254
|
handler: async (args) => handleGenerateDiagram(args),
|
|
239
255
|
annotations: { readOnlyHint: true },
|
|
240
|
-
wrap: '
|
|
256
|
+
wrap: 'governed',
|
|
241
257
|
group: 'analysis',
|
|
242
258
|
},
|
|
243
259
|
// ── check_parallel_safety (SPEC-373) ──────────────────────────────────────
|
|
@@ -254,7 +270,7 @@ const coreToolsRegistry = [
|
|
|
254
270
|
},
|
|
255
271
|
handler: (args) => Promise.resolve(handleCheckParallelSafety(args)),
|
|
256
272
|
annotations: { title: 'Check Parallel Safety', readOnlyHint: true },
|
|
257
|
-
wrap: '
|
|
273
|
+
wrap: 'governed',
|
|
258
274
|
group: 'analysis',
|
|
259
275
|
},
|
|
260
276
|
// ── analyze_performance_impact (SPEC-300) ─────────────────────────────────
|
|
@@ -276,7 +292,7 @@ const coreToolsRegistry = [
|
|
|
276
292
|
},
|
|
277
293
|
handler: async (args) => handleAnalyzePerformanceImpact(args),
|
|
278
294
|
annotations: { readOnlyHint: true },
|
|
279
|
-
wrap: '
|
|
295
|
+
wrap: 'governed',
|
|
280
296
|
group: 'analysis',
|
|
281
297
|
},
|
|
282
298
|
// ── planu_status (SPEC-223) ───────────────────────────────────────────────
|
|
@@ -329,7 +345,7 @@ const coreToolsRegistry = [
|
|
|
329
345
|
},
|
|
330
346
|
handler: async (args) => handleValidateWorkflow(args),
|
|
331
347
|
annotations: { readOnlyHint: true },
|
|
332
|
-
wrap: '
|
|
348
|
+
wrap: 'governed',
|
|
333
349
|
group: 'core',
|
|
334
350
|
},
|
|
335
351
|
// ── transform_code (SPEC-077) ─────────────────────────────────────────────
|
|
@@ -354,7 +370,7 @@ const coreToolsRegistry = [
|
|
|
354
370
|
},
|
|
355
371
|
handler: (args) => Promise.resolve(handleTransformCode(args)),
|
|
356
372
|
annotations: { title: 'Transform Code', readOnlyHint: true },
|
|
357
|
-
wrap: '
|
|
373
|
+
wrap: 'governed',
|
|
358
374
|
group: 'core',
|
|
359
375
|
},
|
|
360
376
|
// ── configure_telemetry (SPEC-200) ────────────────────────────────────────
|
|
@@ -403,7 +419,7 @@ const coreToolsRegistry = [
|
|
|
403
419
|
},
|
|
404
420
|
handler: async (args) => handleTelemetryHealth(args),
|
|
405
421
|
annotations: { title: 'Telemetry Health', readOnlyHint: true },
|
|
406
|
-
wrap: '
|
|
422
|
+
wrap: 'governed',
|
|
407
423
|
group: 'core',
|
|
408
424
|
},
|
|
409
425
|
// ── configure_observability (SPEC-165) ────────────────────────────────────
|
|
@@ -496,7 +512,7 @@ const coreToolsRegistry = [
|
|
|
496
512
|
},
|
|
497
513
|
handler: (args) => Promise.resolve(handleRecommendModel(args)),
|
|
498
514
|
annotations: { title: 'Recommend Model', readOnlyHint: true },
|
|
499
|
-
wrap: '
|
|
515
|
+
wrap: 'governed',
|
|
500
516
|
group: 'analysis',
|
|
501
517
|
},
|
|
502
518
|
// ── export_spec (SPEC-097) ────────────────────────────────────────────────
|
|
@@ -524,7 +540,7 @@ const coreToolsRegistry = [
|
|
|
524
540
|
},
|
|
525
541
|
handler: async (args) => handleExportSpec(args),
|
|
526
542
|
annotations: { readOnlyHint: false },
|
|
527
|
-
wrap: '
|
|
543
|
+
wrap: 'governed',
|
|
528
544
|
group: 'spec',
|
|
529
545
|
},
|
|
530
546
|
// ── decompose_spec (SPEC-157) ─────────────────────────────────────────────
|
|
@@ -556,7 +572,7 @@ const coreToolsRegistry = [
|
|
|
556
572
|
},
|
|
557
573
|
handler: async (args) => handleDecomposeSpec(args),
|
|
558
574
|
annotations: { readOnlyHint: true },
|
|
559
|
-
wrap: '
|
|
575
|
+
wrap: 'governed',
|
|
560
576
|
group: 'spec',
|
|
561
577
|
},
|
|
562
578
|
// ── facilitate (SPEC-037 + SPEC-264) ──────────────────────────────────────
|
|
@@ -688,7 +704,7 @@ const coreToolsRegistry = [
|
|
|
688
704
|
},
|
|
689
705
|
handler: async (args) => handleScanProject(args),
|
|
690
706
|
annotations: { readOnlyHint: false },
|
|
691
|
-
wrap: '
|
|
707
|
+
wrap: 'governed',
|
|
692
708
|
group: 'analysis',
|
|
693
709
|
},
|
|
694
710
|
// ── estimate_ai_cost (SPEC-069) ───────────────────────────────────────────
|
|
@@ -710,7 +726,7 @@ const coreToolsRegistry = [
|
|
|
710
726
|
},
|
|
711
727
|
handler: async (args) => handleEstimateAiCost(args),
|
|
712
728
|
annotations: { title: 'Estimate AI Cost', readOnlyHint: true },
|
|
713
|
-
wrap: '
|
|
729
|
+
wrap: 'governed',
|
|
714
730
|
group: 'analysis',
|
|
715
731
|
},
|
|
716
732
|
// ── heal_spec_docs (SPEC-493) ─────────────────────────────────────────────
|
|
@@ -738,7 +754,7 @@ const coreToolsRegistry = [
|
|
|
738
754
|
readOnlyHint: false,
|
|
739
755
|
destructiveHint: false,
|
|
740
756
|
},
|
|
741
|
-
wrap: '
|
|
757
|
+
wrap: 'governed',
|
|
742
758
|
group: 'spec',
|
|
743
759
|
},
|
|
744
760
|
// ── convert_to_bdd (SPEC-481) ─────────────────────────────────────────────
|
|
@@ -810,7 +826,7 @@ const coreToolsRegistry = [
|
|
|
810
826
|
},
|
|
811
827
|
handler: (args) => Promise.resolve(handleIdeConfig(args)),
|
|
812
828
|
annotations: { title: 'Generate IDE Config' },
|
|
813
|
-
wrap: '
|
|
829
|
+
wrap: 'governed',
|
|
814
830
|
group: 'core',
|
|
815
831
|
},
|
|
816
832
|
// ── living_reconcile_spec (SPEC-330) ──────────────────────────────────────
|
|
@@ -833,7 +849,7 @@ const coreToolsRegistry = [
|
|
|
833
849
|
readOnlyHint: false,
|
|
834
850
|
destructiveHint: false,
|
|
835
851
|
},
|
|
836
|
-
wrap: '
|
|
852
|
+
wrap: 'governed',
|
|
837
853
|
group: 'spec',
|
|
838
854
|
},
|
|
839
855
|
// ── security_report (SPEC-084) ────────────────────────────────────────────
|
|
@@ -847,7 +863,7 @@ const coreToolsRegistry = [
|
|
|
847
863
|
},
|
|
848
864
|
handler: (args) => Promise.resolve(handleSecurityReport(args)),
|
|
849
865
|
annotations: { readOnlyHint: true },
|
|
850
|
-
wrap: '
|
|
866
|
+
wrap: 'governed',
|
|
851
867
|
group: 'core',
|
|
852
868
|
},
|
|
853
869
|
// ── render_spec_for_provider (SPEC-670) ───────────────────────────────────
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { technologyValue } from '../../engine/technology-registry.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
// ── safe handlers ────────────────────────────────────────────────────────────
|
|
4
|
-
import { safe,
|
|
5
|
-
|
|
6
|
-
import { handleActivateLicense, handleDeactivateLicense } from '../activate-license.js';
|
|
7
|
-
import { handleLicenseStatus } from '../license-status.js';
|
|
8
|
-
import { LicenseStatusOutputSchema, SpecIdSchema } from '../schemas/index.js';
|
|
4
|
+
import { safe, safeGoverned, safeTracked } from '../safe-handler.js';
|
|
5
|
+
import { SpecIdSchema } from '../schemas/index.js';
|
|
9
6
|
// ── OAuth tools (register-oauth-tools.ts / register-configure-oauth-tool.ts) ─
|
|
10
7
|
import { handleStartOAuthFlow, handleOAuthStatus, StartOAuthFlowInputSchema, OAuthStatusInputSchema, } from '../oauth-handler.js';
|
|
11
8
|
import { handleConfigureOAuth } from '../configure-oauth-handler.js';
|
|
@@ -13,8 +10,6 @@ import { handleConfigureOAuth } from '../configure-oauth-handler.js';
|
|
|
13
10
|
import { handleUsageStats } from '../usage-stats.js';
|
|
14
11
|
import { handleUsageReport } from '../usage-report.js';
|
|
15
12
|
import { handleToolUsageReport } from '../tool-usage-report.js';
|
|
16
|
-
// ── Webhook tools (register-webhook-tools.ts) ────────────────────────────────
|
|
17
|
-
import { handleStartWebhook, handleStopWebhook, handleWebhookStatus } from '../webhook.js';
|
|
18
13
|
// ── Outbound webhook tools (register-outbound-webhook-tools.ts) ──────────────
|
|
19
14
|
import { handleConfigureWebhook, handleOutboundWebhookStatus, handleRemoveWebhook, } from '../outbound-webhook-handler.js';
|
|
20
15
|
// ── Dashboard tools (register-dashboard-tools.ts) ────────────────────────────
|
|
@@ -90,56 +85,17 @@ const deployProviderEnum = z
|
|
|
90
85
|
])
|
|
91
86
|
.describe('Deploy provider: vercel | netlify | cloudflare-pages | fly | railway');
|
|
92
87
|
export function registerInfraGroupTools(server) {
|
|
93
|
-
// ── License tools ──────────────────────────────────────────────────────────
|
|
94
|
-
server.registerTool('activate_license', {
|
|
95
|
-
description: 'Activate a Planu license key to unlock Pro/Team/Enterprise features. ' +
|
|
96
|
-
'Get your key at https://planu.dev/pricing.',
|
|
97
|
-
inputSchema: {
|
|
98
|
-
licenseKey: z
|
|
99
|
-
.string()
|
|
100
|
-
.max(500)
|
|
101
|
-
.describe('License key from Lemon Squeezy (e.g. XXXXXXXX-XXXX-...)'),
|
|
102
|
-
instanceName: z
|
|
103
|
-
.string()
|
|
104
|
-
.max(500)
|
|
105
|
-
.optional()
|
|
106
|
-
.describe('Optional name for this machine (defaults to hostname)'),
|
|
107
|
-
},
|
|
108
|
-
annotations: { title: 'Activate License', readOnlyHint: false },
|
|
109
|
-
}, safe(async (args) => handleActivateLicense(args)));
|
|
110
|
-
server.registerTool('deactivate_license', {
|
|
111
|
-
description: 'Deactivate your Planu license on this machine. ' +
|
|
112
|
-
'Frees up the activation slot so you can use it elsewhere.',
|
|
113
|
-
inputSchema: {
|
|
114
|
-
confirm: z
|
|
115
|
-
.boolean()
|
|
116
|
-
.describe('Set to true to confirm deactivation. This reverts to the Free plan.'),
|
|
117
|
-
},
|
|
118
|
-
annotations: { title: 'Deactivate License', destructiveHint: true },
|
|
119
|
-
}, safe(async (args) => handleDeactivateLicense(args)));
|
|
120
|
-
server.registerTool('license_status', {
|
|
121
|
-
description: 'Show your current Planu plan, limits, usage, and upgrade options.',
|
|
122
|
-
inputSchema: {
|
|
123
|
-
projectId: z
|
|
124
|
-
.string()
|
|
125
|
-
.max(500)
|
|
126
|
-
.optional()
|
|
127
|
-
.describe('Optional project ID to include project-specific usage'),
|
|
128
|
-
},
|
|
129
|
-
outputSchema: LicenseStatusOutputSchema,
|
|
130
|
-
annotations: { title: 'License Status', readOnlyHint: true },
|
|
131
|
-
}, safe(async (args) => handleLicenseStatus(args)));
|
|
132
88
|
// ── OAuth tools ────────────────────────────────────────────────────────────
|
|
133
89
|
server.registerTool('start_oauth_flow', {
|
|
134
90
|
description: 'Start guided OAuth setup for supported integrations such as Figma, GitHub, Sentry, or Supabase.',
|
|
135
91
|
inputSchema: StartOAuthFlowInputSchema,
|
|
136
92
|
annotations: { title: 'Start OAuth Flow', readOnlyHint: false },
|
|
137
|
-
},
|
|
93
|
+
}, safeGoverned('start_oauth_flow', async (args) => handleStartOAuthFlow(args)));
|
|
138
94
|
server.registerTool('oauth_status', {
|
|
139
95
|
description: 'Show which OAuth-backed integrations are connected for this project.',
|
|
140
96
|
inputSchema: OAuthStatusInputSchema,
|
|
141
97
|
annotations: { title: 'OAuth Status', readOnlyHint: true },
|
|
142
|
-
},
|
|
98
|
+
}, safeGoverned('oauth_status', async (args) => handleOAuthStatus(args)));
|
|
143
99
|
server.registerTool('configure_oauth', {
|
|
144
100
|
description: 'Inspect Planu MCP OAuth/API-key auth status or test a bearer token without exposing secrets.',
|
|
145
101
|
inputSchema: {
|
|
@@ -150,7 +106,7 @@ export function registerInfraGroupTools(server) {
|
|
|
150
106
|
}, safe(async (args) => handleConfigureOAuth(args)));
|
|
151
107
|
// ── Usage tools ────────────────────────────────────────────────────────────
|
|
152
108
|
server.registerTool('usage_stats', {
|
|
153
|
-
description: 'View your Planu usage statistics — tool calls, top tools,
|
|
109
|
+
description: 'View your Planu usage statistics — tool calls, top tools, and execution health. ' +
|
|
154
110
|
'Helps you understand how much of your plan you are using. ' +
|
|
155
111
|
'For the last 30 days with no parameters prefer resource: planu://usage/stats.',
|
|
156
112
|
inputSchema: {
|
|
@@ -193,45 +149,6 @@ export function registerInfraGroupTools(server) {
|
|
|
193
149
|
},
|
|
194
150
|
annotations: { title: 'Tool Usage Report', readOnlyHint: true },
|
|
195
151
|
}, safe(async (args) => handleToolUsageReport(args)));
|
|
196
|
-
// ── Webhook tools (inbound) ────────────────────────────────────────────────
|
|
197
|
-
server.registerTool('start_webhook', {
|
|
198
|
-
description: 'Start a local HTTP server to receive Lemon Squeezy webhook events. ' +
|
|
199
|
-
'Configure the server URL in your Lemon Squeezy dashboard under Settings > Webhooks.',
|
|
200
|
-
inputSchema: {
|
|
201
|
-
port: z
|
|
202
|
-
.number()
|
|
203
|
-
.int()
|
|
204
|
-
.min(1)
|
|
205
|
-
.max(65535)
|
|
206
|
-
.optional()
|
|
207
|
-
.describe('Port to listen on (default: 2358)'),
|
|
208
|
-
secret: z
|
|
209
|
-
.string()
|
|
210
|
-
.optional()
|
|
211
|
-
.describe('Webhook secret from Lemon Squeezy dashboard for HMAC-SHA256 signature validation'),
|
|
212
|
-
},
|
|
213
|
-
annotations: { title: 'Start Webhook Server', readOnlyHint: false },
|
|
214
|
-
}, safe((args) => handleStartWebhook(args)));
|
|
215
|
-
server.registerTool('stop_webhook', {
|
|
216
|
-
description: 'Stop the running Lemon Squeezy webhook server.',
|
|
217
|
-
inputSchema: {
|
|
218
|
-
force: z
|
|
219
|
-
.boolean()
|
|
220
|
-
.optional()
|
|
221
|
-
.describe('Force stop even if events are being processed (default: false)'),
|
|
222
|
-
},
|
|
223
|
-
annotations: { title: 'Stop Webhook Server', destructiveHint: false },
|
|
224
|
-
}, safe((args) => handleStopWebhook(args)));
|
|
225
|
-
server.registerTool('webhook_status', {
|
|
226
|
-
description: 'Show whether the webhook server is running and display recently received events.',
|
|
227
|
-
inputSchema: {
|
|
228
|
-
includeEvents: z
|
|
229
|
-
.boolean()
|
|
230
|
-
.optional()
|
|
231
|
-
.describe('Include recent event log in the output (default: true)'),
|
|
232
|
-
},
|
|
233
|
-
annotations: { title: 'Webhook Status', readOnlyHint: true },
|
|
234
|
-
}, safe((args) => Promise.resolve(handleWebhookStatus(args))));
|
|
235
152
|
// ── Outbound webhook tools ─────────────────────────────────────────────────
|
|
236
153
|
server.registerTool('configure_webhook', {
|
|
237
154
|
description: 'Register an outbound webhook endpoint to receive Planu spec lifecycle events. ' +
|
|
@@ -364,7 +281,7 @@ export function registerInfraGroupTools(server) {
|
|
|
364
281
|
.describe('Set to true to apply the pin immediately. Defaults to false (preview only).'),
|
|
365
282
|
},
|
|
366
283
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
367
|
-
},
|
|
284
|
+
}, safeGoverned('pin_version', async (args) => handlePinVersion(args)));
|
|
368
285
|
// ── Deploy tools ────────────────────────────────────────────────────────────
|
|
369
286
|
server.registerTool('configure_deploy_target', {
|
|
370
287
|
description: 'Save credentials for a deploy provider (Vercel, Netlify, etc.). Stores the API token in data/{projectId}/deploy-config.json. Required before deploy_spec.',
|
|
@@ -470,7 +387,7 @@ export function registerInfraGroupTools(server) {
|
|
|
470
387
|
.describe('Maximum results to return across all projects (default 50)'),
|
|
471
388
|
},
|
|
472
389
|
annotations: { title: 'Search All Projects', readOnlyHint: true },
|
|
473
|
-
},
|
|
390
|
+
}, safeGoverned('search_all_projects', async (args) => handleSearchAllProjects(args)));
|
|
474
391
|
// ── Browser validate tools ─────────────────────────────────────────────────
|
|
475
392
|
server.registerTool('validate_browser', {
|
|
476
393
|
description: 'Extract UI-testable assertions from a spec and run them against a live URL using Playwright. ' +
|
|
@@ -516,7 +433,7 @@ export function registerInfraGroupTools(server) {
|
|
|
516
433
|
value: ConfigureWorkersInputSchema.shape.value,
|
|
517
434
|
},
|
|
518
435
|
annotations: { title: 'Configure Workers', readOnlyHint: false },
|
|
519
|
-
},
|
|
436
|
+
}, safeGoverned('configure_workers', (args) => handleConfigureWorkers(args)));
|
|
520
437
|
// ── Plugin tools ───────────────────────────────────────────────────────────
|
|
521
438
|
server.registerTool('manage_plugins', {
|
|
522
439
|
description: 'Manage Planu plugin lifecycle: search, list, activate, deactivate, uninstall, info. ' +
|
|
@@ -528,7 +445,7 @@ export function registerInfraGroupTools(server) {
|
|
|
528
445
|
readOnlyHint: false,
|
|
529
446
|
destructiveHint: false,
|
|
530
447
|
},
|
|
531
|
-
},
|
|
448
|
+
}, safeGoverned('manage_plugins', async (args) => handleManagePlugins(args)));
|
|
532
449
|
server.registerTool('scaffold_plugin', {
|
|
533
450
|
description: 'Generate a starter plugin project with manifest, entry point, tests, and examples. ' +
|
|
534
451
|
'The scaffold includes TypeScript config and example extensions for the selected types.',
|
|
@@ -537,7 +454,7 @@ export function registerInfraGroupTools(server) {
|
|
|
537
454
|
title: 'Scaffold Plugin',
|
|
538
455
|
readOnlyHint: false,
|
|
539
456
|
},
|
|
540
|
-
},
|
|
457
|
+
}, safeGoverned('scaffold_plugin', async (args) => handleScaffoldPlugin(args)));
|
|
541
458
|
// ── Token optimizer tools ──────────────────────────────────────────────────
|
|
542
459
|
server.registerTool('suggest_token_optimizer', {
|
|
543
460
|
description: 'Detect whether RTK (Response Token Killer) or Headroom are configured in the project. ' +
|
|
@@ -546,7 +463,7 @@ export function registerInfraGroupTools(server) {
|
|
|
546
463
|
inputSchema: {
|
|
547
464
|
projectPath: z.string().describe('Absolute path to the project root directory'),
|
|
548
465
|
},
|
|
549
|
-
},
|
|
466
|
+
}, safeGoverned('suggest_token_optimizer', async (args) => handleSuggestTokenOptimizer(args)));
|
|
550
467
|
server.registerTool('token_optimizer_status', {
|
|
551
468
|
description: 'Returns the installation status of RTK and Headroom token optimization tools. ' +
|
|
552
469
|
'Includes version info and number of configured PreToolUse hooks.',
|
|
@@ -554,7 +471,7 @@ export function registerInfraGroupTools(server) {
|
|
|
554
471
|
inputSchema: {
|
|
555
472
|
projectPath: z.string().describe('Absolute path to the project root directory'),
|
|
556
473
|
},
|
|
557
|
-
},
|
|
474
|
+
}, safeGoverned('token_optimizer_status', async (args) => handleTokenOptimizerStatus(args)));
|
|
558
475
|
// ── RBAC tools ─────────────────────────────────────────────────────────────
|
|
559
476
|
server.registerTool('configure_roles', {
|
|
560
477
|
description: 'Enable or disable Role-Based Access Control (RBAC) for a project. ' +
|
|
@@ -566,7 +483,7 @@ export function registerInfraGroupTools(server) {
|
|
|
566
483
|
enabled: ConfigureRolesInputSchema.shape.enabled,
|
|
567
484
|
},
|
|
568
485
|
annotations: { title: 'Configure Roles (RBAC)', readOnlyHint: false },
|
|
569
|
-
},
|
|
486
|
+
}, safeGoverned('configure_roles', (args) => handleConfigureRoles(args)));
|
|
570
487
|
server.registerTool('assign_role', {
|
|
571
488
|
description: 'Assign a role to a user for a project or a specific spec. ' +
|
|
572
489
|
'Roles: Admin (full access), Architect (create/approve/configure), ' +
|
|
@@ -581,7 +498,7 @@ export function registerInfraGroupTools(server) {
|
|
|
581
498
|
assignedBy: AssignRoleInputSchema.shape.assignedBy,
|
|
582
499
|
},
|
|
583
500
|
annotations: { title: 'Assign Role', readOnlyHint: false },
|
|
584
|
-
},
|
|
501
|
+
}, safeGoverned('assign_role', (args) => handleAssignRole(args)));
|
|
585
502
|
// ── Framework registry tools ───────────────────────────────────────────────
|
|
586
503
|
server.registerTool('check_spec_accuracy', {
|
|
587
504
|
description: 'Validate spec content (spec.md text or acceptance criteria) against the framework registry ' +
|
|
@@ -784,7 +701,7 @@ export function registerInfraGroupTools(server) {
|
|
|
784
701
|
.describe('Also audit ~/.claude/ global config (default: true)'),
|
|
785
702
|
},
|
|
786
703
|
annotations: { readOnlyHint: true },
|
|
787
|
-
},
|
|
704
|
+
}, safeGoverned('audit_claude_config', async (args) => handleAuditClaudeConfig(args)));
|
|
788
705
|
server.registerTool('generate_docs_site', {
|
|
789
706
|
description: 'Generate a static HTML documentation site from project specs, tools catalog, architecture diagrams, and metrics. ' +
|
|
790
707
|
'Produces a navigable portal with dashboard, spec pages, tools catalog, Mermaid diagrams, and search.',
|
|
@@ -797,7 +714,7 @@ export function registerInfraGroupTools(server) {
|
|
|
797
714
|
.describe('Site title (default: "Planu Documentation")'),
|
|
798
715
|
},
|
|
799
716
|
annotations: { readOnlyHint: false },
|
|
800
|
-
},
|
|
717
|
+
}, safeGoverned('generate_docs_site', async (args) => handleGenerateDocsSite(args)));
|
|
801
718
|
// ── Memory config tools ────────────────────────────────────────────────────
|
|
802
719
|
server.registerTool('configure_memory', {
|
|
803
720
|
description: 'Configure persistent AI memory for your project using OpenMemory (local) or Mem0 Cloud. ' +
|
|
@@ -818,7 +735,7 @@ export function registerInfraGroupTools(server) {
|
|
|
818
735
|
.optional()
|
|
819
736
|
.describe('Mem0 API key — required for setup-mem0-cloud action. Get from https://app.mem0.ai'),
|
|
820
737
|
},
|
|
821
|
-
},
|
|
738
|
+
}, safeGoverned('configure_memory', async (args) => handleConfigureMemory(args)));
|
|
822
739
|
server.registerTool('memory_status', {
|
|
823
740
|
description: 'Returns the current AI memory configuration status. ' +
|
|
824
741
|
'Shows which provider is configured (none, openmemory, mem0-cloud) and the config file path.',
|
|
@@ -826,7 +743,7 @@ export function registerInfraGroupTools(server) {
|
|
|
826
743
|
inputSchema: {
|
|
827
744
|
projectPath: z.string().describe('Absolute path to the project root directory'),
|
|
828
745
|
},
|
|
829
|
-
},
|
|
746
|
+
}, safeGoverned('memory_status', async (args) => handleMemoryStatus(args)));
|
|
830
747
|
// ── Code graph tools ──────────────────────────────────────────────────────
|
|
831
748
|
server.registerTool('configure_code_graph', {
|
|
832
749
|
description: 'Configure a local code graph MCP provider for the project. Supports Colby CodeGraph, CodeGraphContext, Pathfinder, and Axon. Writes the provider entry to .claude.json.',
|
|
@@ -843,14 +760,14 @@ export function registerInfraGroupTools(server) {
|
|
|
843
760
|
])
|
|
844
761
|
.describe('setup-colby-codegraph: configure @colbymchenry/codegraph | setup-codegraph-context: configure CodeGraphContext | setup-pathfinder: configure Pathfinder | setup-axon: configure Axon | status: show current provider status'),
|
|
845
762
|
},
|
|
846
|
-
},
|
|
763
|
+
}, safeGoverned('configure_code_graph', async (args) => handleConfigureCodeGraph(args)));
|
|
847
764
|
server.registerTool('code_graph_status', {
|
|
848
765
|
description: 'Returns the current code graph MCP provider status from .claude.json, including the active provider if one is configured.',
|
|
849
766
|
annotations: { title: 'Code Graph Status', readOnlyHint: true },
|
|
850
767
|
inputSchema: {
|
|
851
768
|
projectPath: z.string().min(1).max(4096).describe('Absolute path to the project root'),
|
|
852
769
|
},
|
|
853
|
-
},
|
|
770
|
+
}, safeGoverned('code_graph_status', async (args) => handleCodeGraphStatus(args)));
|
|
854
771
|
// ── Onboarding tools ───────────────────────────────────────────────────────
|
|
855
772
|
server.registerTool('start_onboarding', {
|
|
856
773
|
description: 'Start interactive onboarding for a new project. Generates personalized recommendations based on your role, project type, and team size. Returns a markdown guide with next steps.',
|
|
@@ -865,7 +782,7 @@ export function registerInfraGroupTools(server) {
|
|
|
865
782
|
teamSize: z.enum(['1', '2-5', '6-20', '20+']).describe('Team size: 1, 2-5, 6-20, 20+'),
|
|
866
783
|
},
|
|
867
784
|
annotations: { readOnlyHint: false },
|
|
868
|
-
},
|
|
785
|
+
}, safeGoverned('start_onboarding', async (args) => handleStartOnboarding(args)));
|
|
869
786
|
server.registerTool('guided_tour', {
|
|
870
787
|
description: 'Get a step-by-step guided tour of a Planu feature area. Returns markdown with numbered steps, examples, and tool hints.',
|
|
871
788
|
inputSchema: {
|
|
@@ -881,14 +798,14 @@ export function registerInfraGroupTools(server) {
|
|
|
881
798
|
.describe('Tour area: spec-lifecycle, team-collaboration, integrations, ai-tools, security, reporting'),
|
|
882
799
|
},
|
|
883
800
|
annotations: { readOnlyHint: true },
|
|
884
|
-
},
|
|
801
|
+
}, safeGoverned('guided_tour', async (args) => handleGuidedTour(args)));
|
|
885
802
|
server.registerTool('onboarding_checklist', {
|
|
886
803
|
description: 'Check what onboarding steps are complete for a project. Verifies planu.json, CLAUDE.md, specs, rules, and skills. Returns a checklist with progress percentage.',
|
|
887
804
|
inputSchema: {
|
|
888
805
|
projectPath: z.string().min(1).max(4096).describe('Absolute path to the project root'),
|
|
889
806
|
},
|
|
890
807
|
annotations: { readOnlyHint: true },
|
|
891
|
-
},
|
|
808
|
+
}, safeGoverned('onboarding_checklist', async (args) => handleOnboardingChecklist(args)));
|
|
892
809
|
server.registerTool('quick_start', {
|
|
893
810
|
description: 'Get a quick start guide for a common project archetype. Returns a markdown guide with copy-paste commands.',
|
|
894
811
|
inputSchema: {
|
|
@@ -903,14 +820,14 @@ export function registerInfraGroupTools(server) {
|
|
|
903
820
|
.describe('Optional project path to personalize the guide'),
|
|
904
821
|
},
|
|
905
822
|
annotations: { readOnlyHint: true },
|
|
906
|
-
},
|
|
823
|
+
}, safeGoverned('quick_start', async (args) => handleQuickStart(args)));
|
|
907
824
|
server.registerTool('onboarding_progress', {
|
|
908
825
|
description: 'View onboarding progress for a project. Shows setup checklist, profile, and next recommended steps.',
|
|
909
826
|
inputSchema: {
|
|
910
827
|
projectPath: z.string().min(1).max(4096).describe('Absolute path to the project root'),
|
|
911
828
|
},
|
|
912
829
|
annotations: { readOnlyHint: true },
|
|
913
|
-
},
|
|
830
|
+
}, safeGoverned('onboarding_progress', async (args) => handleOnboardingProgress(args)));
|
|
914
831
|
// ── Docs registry tools ────────────────────────────────────────────────────
|
|
915
832
|
server.registerTool('validate_docs_registry', {
|
|
916
833
|
description: 'Check all entries in the built-in docs-registry.json for broken or slow links. ' +
|
|
@@ -923,7 +840,7 @@ export function registerInfraGroupTools(server) {
|
|
|
923
840
|
.describe('Absolute path to the project root (used for context only).'),
|
|
924
841
|
},
|
|
925
842
|
annotations: { readOnlyHint: true },
|
|
926
|
-
},
|
|
843
|
+
}, safeGoverned('validate_docs_registry', async (args) => {
|
|
927
844
|
return handleValidateDocsRegistry(args);
|
|
928
845
|
}));
|
|
929
846
|
server.registerTool('discover_docs_url', {
|
|
@@ -938,7 +855,7 @@ export function registerInfraGroupTools(server) {
|
|
|
938
855
|
.describe('Package or library name to look up (e.g. "axios", "requests", "tokio").'),
|
|
939
856
|
},
|
|
940
857
|
annotations: { readOnlyHint: true },
|
|
941
|
-
},
|
|
858
|
+
}, safeGoverned('discover_docs_url', async (args) => {
|
|
942
859
|
return handleDiscoverDocsUrl(args);
|
|
943
860
|
}));
|
|
944
861
|
// ── GC tools ───────────────────────────────────────────────────────────────
|