@unbrained/pm-cli 2026.5.12 → 2026.5.18
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/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +78 -457
- package/CHANGELOG.md +22 -0
- package/CONTRIBUTING.md +1 -0
- package/PRD.md +7 -28
- package/README.md +8 -14
- package/dist/cli/argv-utils.js +4 -1
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.js +4 -1
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +32 -1
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +23 -5
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.js +5 -2
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/append.js +4 -1
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/calendar.js +9 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.d.ts +3 -0
- package/dist/cli/commands/claim.js +19 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +4 -1
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +4 -1
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/comments.js +4 -1
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +98 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.js +4 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +19 -5
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +9 -0
- package/dist/cli/commands/contracts.js +205 -49
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +88 -9
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +4 -1
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/delete.js +4 -1
- package/dist/cli/commands/delete.js.map +1 -1
- package/dist/cli/commands/deps.js +4 -1
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/docs.js +4 -1
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +7 -2
- package/dist/cli/commands/extension.js +360 -64
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +4 -1
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/gc.js +4 -1
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +7 -3
- package/dist/cli/commands/get.js +91 -18
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.js +6 -8
- package/dist/cli/commands/guide.js.map +1 -1
- package/dist/cli/commands/health.d.ts +4 -0
- package/dist/cli/commands/health.js +31 -8
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +42 -0
- package/dist/cli/commands/history-redact.js +559 -0
- package/dist/cli/commands/history-redact.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -0
- package/dist/cli/commands/history.js +14 -3
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -8
- package/dist/cli/commands/index.js +6 -9
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +31 -0
- package/dist/cli/commands/init-agent-guidance.js +336 -0
- package/dist/cli/commands/init-agent-guidance.js.map +1 -0
- package/dist/cli/commands/init.d.ts +14 -0
- package/dist/cli/commands/init.js +75 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +4 -1
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/list.d.ts +1 -0
- package/dist/cli/commands/list.js +42 -18
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/metadata-normalizers.js +4 -1
- package/dist/cli/commands/metadata-normalizers.js.map +1 -1
- package/dist/cli/commands/normalize.js +4 -1
- package/dist/cli/commands/normalize.js.map +1 -1
- package/dist/cli/commands/notes.js +4 -1
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +118 -0
- package/dist/cli/commands/plan.js +975 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/reindex.d.ts +8 -0
- package/dist/cli/commands/reindex.js +100 -24
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +4 -1
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.js +58 -27
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.js +4 -1
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/templates.js +4 -1
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/commands/test-all.js +4 -1
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test-runs.js +4 -1
- package/dist/cli/commands/test-runs.js.map +1 -1
- package/dist/cli/commands/test.js +4 -1
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +4 -1
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.js +114 -71
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.js +6 -3
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/validate.js +32 -4
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +5 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.js +4 -1
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +4 -1
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/guide-topics.js +4 -1
- package/dist/cli/guide-topics.js.map +1 -1
- package/dist/cli/help-content.js +52 -33
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +4 -1
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +276 -32
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +4 -1
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +55 -150
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +277 -261
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +62 -199
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +55 -146
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +2 -2
- package/dist/cli/registration-helpers.js +11 -21
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/shared-parsers.js +4 -1
- package/dist/cli/shared-parsers.js.map +1 -1
- package/dist/cli/telemetry-flush.js +4 -1
- package/dist/cli/telemetry-flush.js.map +1 -1
- package/dist/cli.js +45 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/extension-types.js +4 -1
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.js +4 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.js +4 -1
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +84 -54
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runtime-registrations.js +4 -1
- package/dist/core/extensions/runtime-registrations.js.map +1 -1
- package/dist/core/fs/fs-utils.js +4 -1
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/fs/index.js +4 -1
- package/dist/core/fs/index.js.map +1 -1
- package/dist/core/history/history-stream-policy.js +4 -1
- package/dist/core/history/history-stream-policy.js.map +1 -1
- package/dist/core/history/history.js +4 -1
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/history/index.js +4 -1
- package/dist/core/history/index.js.map +1 -1
- package/dist/core/item/id.js +4 -1
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/index.js +4 -1
- package/dist/core/item/index.js.map +1 -1
- package/dist/core/item/item-format.js +241 -2
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/parent-reference-policy.js +4 -1
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/item/parse.js +33 -3
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/item/sprint-release-format.js +4 -1
- package/dist/core/item/sprint-release-format.js.map +1 -1
- package/dist/core/item/status.js +4 -1
- package/dist/core/item/status.js.map +1 -1
- package/dist/core/item/type-registry.js +4 -1
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/index.js +4 -1
- package/dist/core/lock/index.js.map +1 -1
- package/dist/core/lock/lock.js +4 -1
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/output/command-aware.js +4 -1
- package/dist/core/output/command-aware.js.map +1 -1
- package/dist/core/output/output.d.ts +4 -0
- package/dist/core/output/output.js +47 -6
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/packages/manifest.d.ts +27 -1
- package/dist/core/packages/manifest.js +87 -1
- package/dist/core/packages/manifest.js.map +1 -1
- package/dist/core/packages/root.d.ts +3 -0
- package/dist/core/packages/root.js +51 -0
- package/dist/core/packages/root.js.map +1 -0
- package/dist/core/schema/runtime-field-filters.js +4 -1
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.js +4 -1
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +4 -1
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.js +7 -2
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +2 -0
- package/dist/core/search/corpus.js +77 -2
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.d.ts +13 -1
- package/dist/core/search/embedding-batches.js +40 -8
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/http-client.js +4 -1
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/providers.js +4 -1
- package/dist/core/search/providers.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +11 -2
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +4 -1
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +4 -1
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +10 -13
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/command-types.js +4 -1
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/conflict-markers.js +4 -1
- package/dist/core/shared/conflict-markers.js.map +1 -1
- package/dist/core/shared/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +24 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.js +4 -1
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/index.js +4 -1
- package/dist/core/shared/index.js.map +1 -1
- package/dist/core/shared/levenshtein.js +4 -1
- package/dist/core/shared/levenshtein.js.map +1 -1
- package/dist/core/shared/primitives.js +4 -1
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/serialization.js +4 -1
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/shared/text-normalization.js +4 -1
- package/dist/core/shared/text-normalization.js.map +1 -1
- package/dist/core/shared/time.js +4 -1
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +8 -1
- package/dist/core/store/front-matter-cache.js +28 -14
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/index.js +4 -1
- package/dist/core/store/index.js.map +1 -1
- package/dist/core/store/item-format-migration.js +4 -1
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +66 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +4 -1
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +39 -1
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +4 -1
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.d.ts +1 -1
- package/dist/core/telemetry/observability.js +11 -2
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +31 -5
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.js +4 -1
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/test/item-test-run-tracking.js +4 -1
- package/dist/core/test/item-test-run-tracking.js.map +1 -1
- package/dist/mcp/server.d.ts +8 -0
- package/dist/mcp/server.js +212 -53
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +7 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js +484 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -0
- package/dist/sdk/cli-contracts/commander-types.d.ts +21 -0
- package/dist/sdk/cli-contracts/commander-types.js +95 -0
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +10 -17
- package/dist/sdk/cli-contracts.js +232 -282
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +5 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +29 -0
- package/dist/sdk/runtime.js +31 -0
- package/dist/sdk/runtime.js.map +1 -0
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types.d.ts +86 -2
- package/dist/types.js +34 -1
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +16 -6
- package/docs/CLAUDE_CODE_PLUGIN.md +10 -10
- package/docs/CODEX_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +83 -8
- package/docs/CONFIGURATION.md +4 -1
- package/docs/EXTENSIONS.md +176 -807
- package/docs/QUICKSTART.md +12 -5
- package/docs/README.md +7 -6
- package/docs/RELEASING.md +6 -4
- package/docs/SDK.md +78 -441
- package/docs/TESTING.md +2 -2
- package/marketplace.json +3 -3
- package/package.json +7 -4
- package/packages/pm-beads/extensions/beads/index.js +90 -101
- package/packages/pm-beads/extensions/beads/index.ts +2 -2
- package/packages/pm-beads/extensions/beads/runtime.js +2 -17
- package/packages/pm-beads/extensions/beads/runtime.ts +41 -18
- package/packages/pm-beads/package.json +34 -1
- package/packages/pm-calendar/README.md +13 -0
- package/packages/pm-calendar/extensions/calendar/index.js +56 -0
- package/packages/pm-calendar/extensions/calendar/index.ts +62 -0
- package/packages/pm-calendar/extensions/calendar/manifest.json +7 -0
- package/packages/pm-calendar/extensions/calendar/runtime.js +114 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +123 -0
- package/packages/pm-calendar/package.json +51 -0
- package/packages/pm-governance-audit/README.md +23 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +117 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +118 -0
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +7 -0
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +159 -0
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +176 -0
- package/packages/pm-governance-audit/package.json +52 -0
- package/packages/pm-guide-shell/README.md +23 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +76 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +81 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +7 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +263 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +327 -0
- package/packages/pm-guide-shell/package.json +52 -0
- package/packages/pm-linked-test-adapters/README.md +24 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +101 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +102 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +7 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +142 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +173 -0
- package/packages/pm-linked-test-adapters/package.json +53 -0
- package/packages/pm-search-advanced/README.md +27 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +93 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +94 -0
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +7 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +120 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +144 -0
- package/packages/pm-search-advanced/package.json +54 -0
- package/packages/pm-templates/README.md +20 -0
- package/packages/pm-templates/extensions/templates/index.js +101 -0
- package/packages/pm-templates/extensions/templates/index.ts +109 -0
- package/packages/pm-templates/extensions/templates/manifest.json +7 -0
- package/packages/pm-templates/extensions/templates/runtime.js +226 -0
- package/packages/pm-templates/extensions/templates/runtime.ts +283 -0
- package/packages/pm-templates/package.json +50 -0
- package/packages/pm-todos/extensions/todos/index.js +105 -116
- package/packages/pm-todos/extensions/todos/index.ts +3 -2
- package/packages/pm-todos/extensions/todos/runtime.js +2 -17
- package/packages/pm-todos/extensions/todos/runtime.ts +40 -18
- package/packages/pm-todos/package.json +35 -1
- package/plugins/{pm-cli-claude → pm-claude}/.claude-plugin/plugin.json +2 -2
- package/plugins/{pm-cli-claude → pm-claude}/.mcp.json +1 -1
- package/plugins/{pm-cli-claude → pm-claude}/README.md +4 -4
- package/plugins/{pm-cli-claude → pm-claude}/agents/pm-coordinator.md +1 -1
- package/plugins/{pm-cli-claude → pm-claude}/commands/pm-init.md +10 -1
- package/plugins/{pm-cli-claude → pm-claude}/commands/pm-planner.md +18 -0
- package/plugins/{pm-cli-claude → pm-claude}/scripts/pm-mcp-server.mjs +4 -2
- package/plugins/{pm-cli-claude → pm-claude}/skills/pm-planner/SKILL.md +46 -1
- package/plugins/{pm-cli-codex → pm-codex}/.codex-plugin/plugin.json +3 -3
- package/plugins/{pm-cli-codex → pm-codex}/.mcp.json +1 -1
- package/plugins/{pm-cli-codex → pm-codex}/README.md +7 -4
- package/plugins/{pm-cli-codex → pm-codex}/scripts/pm-mcp-server.mjs +4 -2
- package/plugins/pm-codex/skills/pm-native/SKILL.md +81 -0
- package/scripts/finalize-build.mjs +28 -0
- package/scripts/prepare-build-cache.mjs +37 -0
- package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +0 -57
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-delivery-chain.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-triage-agent.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-verification-agent.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-audit.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-calendar.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-close-task.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-developer.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-list.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-new.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-release.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-search.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-start-task.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-status.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-triage.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-workflow.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/hooks/hooks.json +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/hooks/session-start.mjs +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-audit/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-developer/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-release/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-workflow/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/assets/pm-cli-small.svg +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-audit.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-close-task.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-start-task.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/agents/openai.yaml +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-native/agents/openai.yaml +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/agents/openai.yaml +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ff7fe568-0a90-519b-8099-b034273a3752")}catch(e){}}();
|
|
3
3
|
import { normalizeStatusInput } from "../core/item/status.js";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveRuntimeStatusRegistry } from "../core/schema/runtime-schema.js";
|
|
5
|
+
import { setActiveCommandResult } from "../core/extensions/index.js";
|
|
5
6
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
6
7
|
import { PmCliError } from "../core/shared/errors.js";
|
|
7
|
-
import {
|
|
8
|
-
import { getSettingsPath, resolvePmRoot } from "../core/store/paths.js";
|
|
8
|
+
import { resolvePmRoot } from "../core/store/paths.js";
|
|
9
9
|
import { readSettings } from "../core/store/settings.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import { buildBackgroundTestAllCommandArgs, buildBackgroundTestCommandArgs, collect, getGlobalOptions, invalidateSearchCachesForMutation, printError, printResult, } from "./registration-helpers.js";
|
|
11
|
+
let operationCommandsModulePromise = null;
|
|
12
|
+
async function loadOperationCommandsModule() {
|
|
13
|
+
operationCommandsModulePromise ??= import("./commands/index.js");
|
|
14
|
+
return operationCommandsModulePromise;
|
|
15
|
+
}
|
|
13
16
|
export function registerOperationCommands(program) {
|
|
14
17
|
program
|
|
15
18
|
.command("test")
|
|
@@ -48,6 +51,7 @@ export function registerOperationCommands(program) {
|
|
|
48
51
|
throw new PmCliError("--background does not support --add/--remove; update linked tests first, then run in background", EXIT_CODE.USAGE);
|
|
49
52
|
}
|
|
50
53
|
if (runInBackground) {
|
|
54
|
+
const { runStartBackgroundRun } = await loadOperationCommandsModule();
|
|
51
55
|
const result = await runStartBackgroundRun({
|
|
52
56
|
kind: "test",
|
|
53
57
|
commandArgs: buildBackgroundTestCommandArgs(id, { ...options, add: addValues, remove: removeValues }),
|
|
@@ -61,6 +65,7 @@ export function registerOperationCommands(program) {
|
|
|
61
65
|
}
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
68
|
+
const { runTest } = await loadOperationCommandsModule();
|
|
64
69
|
const result = await runTest(id, {
|
|
65
70
|
add: addValues,
|
|
66
71
|
remove: removeValues,
|
|
@@ -118,6 +123,7 @@ export function registerOperationCommands(program) {
|
|
|
118
123
|
const startedAt = Date.now();
|
|
119
124
|
const runInBackground = options.background === true;
|
|
120
125
|
if (runInBackground) {
|
|
126
|
+
const { runStartBackgroundRun } = await loadOperationCommandsModule();
|
|
121
127
|
const result = await runStartBackgroundRun({
|
|
122
128
|
kind: "test-all",
|
|
123
129
|
commandArgs: buildBackgroundTestAllCommandArgs(options),
|
|
@@ -130,6 +136,7 @@ export function registerOperationCommands(program) {
|
|
|
130
136
|
}
|
|
131
137
|
return;
|
|
132
138
|
}
|
|
139
|
+
const { runTestAll } = await loadOperationCommandsModule();
|
|
133
140
|
const result = await runTestAll({
|
|
134
141
|
status: typeof options.status === "string" ? options.status : undefined,
|
|
135
142
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -157,103 +164,13 @@ export function registerOperationCommands(program) {
|
|
|
157
164
|
printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);
|
|
158
165
|
}
|
|
159
166
|
});
|
|
160
|
-
const testRunsCommand = program
|
|
161
|
-
.command("test-runs")
|
|
162
|
-
.description("Manage background linked-test runs.")
|
|
163
|
-
.action(async (_options, command) => {
|
|
164
|
-
const globalOptions = getGlobalOptions(command);
|
|
165
|
-
const startedAt = Date.now();
|
|
166
|
-
const result = await runTestRunsList({}, globalOptions);
|
|
167
|
-
printResult(result, globalOptions);
|
|
168
|
-
if (globalOptions.profile) {
|
|
169
|
-
printError(`profile:command=test-runs took_ms=${Date.now() - startedAt}`);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
testRunsCommand
|
|
173
|
-
.command("list")
|
|
174
|
-
.option("--status <value>", "Filter by background run status")
|
|
175
|
-
.option("--limit <value>", "Limit number of runs returned")
|
|
176
|
-
.description("List background test runs.")
|
|
177
|
-
.action(async (options, command) => {
|
|
178
|
-
const globalOptions = getGlobalOptions(command);
|
|
179
|
-
const startedAt = Date.now();
|
|
180
|
-
const result = await runTestRunsList({
|
|
181
|
-
status: typeof options.status === "string" ? options.status : undefined,
|
|
182
|
-
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
183
|
-
}, globalOptions);
|
|
184
|
-
printResult(result, globalOptions);
|
|
185
|
-
if (globalOptions.profile) {
|
|
186
|
-
printError(`profile:command=test-runs list took_ms=${Date.now() - startedAt}`);
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
testRunsCommand
|
|
190
|
-
.command("status")
|
|
191
|
-
.argument("<runId>", "Background run id")
|
|
192
|
-
.description("Show status, health, and resource snapshot for a background run.")
|
|
193
|
-
.action(async (runId, _options, command) => {
|
|
194
|
-
const globalOptions = getGlobalOptions(command);
|
|
195
|
-
const startedAt = Date.now();
|
|
196
|
-
const result = await runTestRunsStatus(runId, globalOptions);
|
|
197
|
-
printResult(result, globalOptions);
|
|
198
|
-
if (globalOptions.profile) {
|
|
199
|
-
printError(`profile:command=test-runs status took_ms=${Date.now() - startedAt}`);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
testRunsCommand
|
|
203
|
-
.command("logs")
|
|
204
|
-
.argument("<runId>", "Background run id")
|
|
205
|
-
.option("--stream <value>", "Log stream selector: stdout|stderr|both")
|
|
206
|
-
.option("--tail <value>", "Tail number of lines per selected stream")
|
|
207
|
-
.description("Show tailed logs for a background run.")
|
|
208
|
-
.action(async (runId, options, command) => {
|
|
209
|
-
const globalOptions = getGlobalOptions(command);
|
|
210
|
-
const startedAt = Date.now();
|
|
211
|
-
const result = await runTestRunsLogs(runId, {
|
|
212
|
-
stream: typeof options.stream === "string" ? options.stream : undefined,
|
|
213
|
-
tail: typeof options.tail === "string" ? options.tail : undefined,
|
|
214
|
-
}, globalOptions);
|
|
215
|
-
printResult(result, globalOptions);
|
|
216
|
-
if (globalOptions.profile) {
|
|
217
|
-
printError(`profile:command=test-runs logs took_ms=${Date.now() - startedAt}`);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
testRunsCommand
|
|
221
|
-
.command("stop")
|
|
222
|
-
.argument("<runId>", "Background run id")
|
|
223
|
-
.option("--force", "Force-stop via SIGKILL")
|
|
224
|
-
.description("Stop a running background test run.")
|
|
225
|
-
.action(async (runId, options, command) => {
|
|
226
|
-
const globalOptions = getGlobalOptions(command);
|
|
227
|
-
const startedAt = Date.now();
|
|
228
|
-
const result = await runTestRunsStop(runId, { force: options.force === true }, globalOptions);
|
|
229
|
-
printResult(result, globalOptions);
|
|
230
|
-
if (globalOptions.profile) {
|
|
231
|
-
printError(`profile:command=test-runs stop took_ms=${Date.now() - startedAt}`);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
testRunsCommand
|
|
235
|
-
.command("resume")
|
|
236
|
-
.argument("<runId>", "Background run id")
|
|
237
|
-
.option("--author <value>", "Resume author (falls back to PM_AUTHOR/settings)")
|
|
238
|
-
.description("Resume a previously terminal background test run by starting a new attempt.")
|
|
239
|
-
.action(async (runId, options, command) => {
|
|
240
|
-
const globalOptions = getGlobalOptions(command);
|
|
241
|
-
const startedAt = Date.now();
|
|
242
|
-
const result = await runTestRunsResume(runId, {
|
|
243
|
-
author: typeof options.author === "string" ? options.author : undefined,
|
|
244
|
-
noExtensions: globalOptions.noExtensions === true,
|
|
245
|
-
}, globalOptions);
|
|
246
|
-
printResult(result, globalOptions);
|
|
247
|
-
if (globalOptions.profile) {
|
|
248
|
-
printError(`profile:command=test-runs resume took_ms=${Date.now() - startedAt}`);
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
167
|
program
|
|
252
168
|
.command("test-runs-worker", { hidden: true })
|
|
253
169
|
.argument("<runId>", "Background run id")
|
|
254
170
|
.description("Internal background worker command.")
|
|
255
171
|
.action(async (runId, _options, command) => {
|
|
256
172
|
const globalOptions = getGlobalOptions(command);
|
|
173
|
+
const { runTestRunsWorker } = await loadOperationCommandsModule();
|
|
257
174
|
await runTestRunsWorker(runId, globalOptions);
|
|
258
175
|
});
|
|
259
176
|
program
|
|
@@ -262,6 +179,7 @@ export function registerOperationCommands(program) {
|
|
|
262
179
|
.action(async (_options, command) => {
|
|
263
180
|
const globalOptions = getGlobalOptions(command);
|
|
264
181
|
const startedAt = Date.now();
|
|
182
|
+
const { runStats } = await loadOperationCommandsModule();
|
|
265
183
|
const result = await runStats(globalOptions);
|
|
266
184
|
printResult(result, globalOptions);
|
|
267
185
|
if (globalOptions.profile) {
|
|
@@ -277,11 +195,16 @@ export function registerOperationCommands(program) {
|
|
|
277
195
|
.option("--no-refresh", "Disable automatic vector refresh attempts during health checks")
|
|
278
196
|
.option("--refresh-vectors", "Explicitly enable vector refresh attempts during health checks")
|
|
279
197
|
.option("--verbose-stale-items", "Include full stale vectorization ID lists in health output")
|
|
198
|
+
.option("--skip-vectors", "Skip vectorization check for a faster run")
|
|
199
|
+
.option("--skip-integrity", "Skip item/history file integrity check for a faster run")
|
|
200
|
+
.option("--skip-drift", "Skip history drift hash check for a faster run")
|
|
201
|
+
.option("--full", "Run all checks including slow integrity, drift, and vectorization checks")
|
|
280
202
|
.option("--strict-exit", "Return non-zero exit when health warnings are present (ok=false)")
|
|
281
203
|
.option("--fail-on-warn", "Alias for --strict-exit")
|
|
282
204
|
.action(async (options, command) => {
|
|
283
205
|
const globalOptions = getGlobalOptions(command);
|
|
284
206
|
const startedAt = Date.now();
|
|
207
|
+
const { runHealth } = await loadOperationCommandsModule();
|
|
285
208
|
const result = await runHealth(globalOptions, {
|
|
286
209
|
strictDirectories: Boolean(options.strictDirectories),
|
|
287
210
|
checkOnly: Boolean(options.checkOnly),
|
|
@@ -289,10 +212,22 @@ export function registerOperationCommands(program) {
|
|
|
289
212
|
noRefresh: Boolean(options.noRefresh),
|
|
290
213
|
refreshVectors: Boolean(options.refreshVectors),
|
|
291
214
|
verboseStaleItems: Boolean(options.verboseStaleItems),
|
|
215
|
+
skipVectors: Boolean(options.skipVectors),
|
|
216
|
+
skipIntegrity: Boolean(options.skipIntegrity),
|
|
217
|
+
skipDrift: Boolean(options.skipDrift),
|
|
218
|
+
full: Boolean(options.full),
|
|
292
219
|
});
|
|
293
220
|
printResult(result, globalOptions);
|
|
294
221
|
const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);
|
|
295
222
|
if (strictExit && !result.ok) {
|
|
223
|
+
setActiveCommandResult({
|
|
224
|
+
...result,
|
|
225
|
+
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
226
|
+
error_code: "health_findings",
|
|
227
|
+
error_category: "validation",
|
|
228
|
+
command_resolution: "health_findings",
|
|
229
|
+
resolution_stage: "execute",
|
|
230
|
+
});
|
|
296
231
|
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
297
232
|
}
|
|
298
233
|
if (globalOptions.profile) {
|
|
@@ -319,6 +254,7 @@ export function registerOperationCommands(program) {
|
|
|
319
254
|
.action(async (options, command) => {
|
|
320
255
|
const globalOptions = getGlobalOptions(command);
|
|
321
256
|
const startedAt = Date.now();
|
|
257
|
+
const { runValidate } = await loadOperationCommandsModule();
|
|
322
258
|
const result = await runValidate({
|
|
323
259
|
checkMetadata: Boolean(options.checkMetadata),
|
|
324
260
|
metadataProfile: typeof options.metadataProfile === "string" ? options.metadataProfile : undefined,
|
|
@@ -336,6 +272,14 @@ export function registerOperationCommands(program) {
|
|
|
336
272
|
printResult(result, globalOptions);
|
|
337
273
|
const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);
|
|
338
274
|
if (strictExit && !result.ok) {
|
|
275
|
+
setActiveCommandResult({
|
|
276
|
+
...result,
|
|
277
|
+
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
278
|
+
error_code: "validation_findings",
|
|
279
|
+
error_category: "validation",
|
|
280
|
+
command_resolution: "validation_findings",
|
|
281
|
+
resolution_stage: "execute",
|
|
282
|
+
});
|
|
339
283
|
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
340
284
|
}
|
|
341
285
|
if (globalOptions.profile) {
|
|
@@ -350,6 +294,7 @@ export function registerOperationCommands(program) {
|
|
|
350
294
|
.action(async (options, command) => {
|
|
351
295
|
const globalOptions = getGlobalOptions(command);
|
|
352
296
|
const startedAt = Date.now();
|
|
297
|
+
const { runGc } = await loadOperationCommandsModule();
|
|
353
298
|
const result = await runGc(globalOptions, {
|
|
354
299
|
dryRun: options.dryRun === true,
|
|
355
300
|
scope: Array.isArray(options.scope) ? options.scope : [],
|
|
@@ -369,9 +314,11 @@ export function registerOperationCommands(program) {
|
|
|
369
314
|
.option("--availability-only", "Return action availability surface only")
|
|
370
315
|
.option("--runtime-only", "Include only actions invocable in the current runtime")
|
|
371
316
|
.option("--active-only", "Alias for --runtime-only")
|
|
317
|
+
.option("--full", "Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)")
|
|
372
318
|
.action(async (options, command) => {
|
|
373
319
|
const globalOptions = getGlobalOptions(command);
|
|
374
320
|
const startedAt = Date.now();
|
|
321
|
+
const { runContracts } = await loadOperationCommandsModule();
|
|
375
322
|
const result = await runContracts({
|
|
376
323
|
action: typeof options.action === "string" ? options.action : undefined,
|
|
377
324
|
command: typeof options.command === "string" ? options.command : undefined,
|
|
@@ -379,6 +326,7 @@ export function registerOperationCommands(program) {
|
|
|
379
326
|
flagsOnly: Boolean(options.flagsOnly),
|
|
380
327
|
availabilityOnly: Boolean(options.availabilityOnly),
|
|
381
328
|
runtimeOnly: Boolean(options.runtimeOnly) || Boolean(options.activeOnly),
|
|
329
|
+
full: Boolean(options.full),
|
|
382
330
|
}, globalOptions);
|
|
383
331
|
printResult(result, globalOptions);
|
|
384
332
|
if (globalOptions.profile) {
|
|
@@ -391,13 +339,16 @@ export function registerOperationCommands(program) {
|
|
|
391
339
|
.option("--author <value>", "Mutation author")
|
|
392
340
|
.option("--message <value>", "History message")
|
|
393
341
|
.option("--force", "Force claim override")
|
|
342
|
+
.option("--if-available", "Skip silently when the item is already claimed by another author (returns skipped=true)")
|
|
394
343
|
.description("Claim an item for active work.")
|
|
395
344
|
.action(async (id, options, command) => {
|
|
396
345
|
const globalOptions = getGlobalOptions(command);
|
|
397
346
|
const startedAt = Date.now();
|
|
347
|
+
const { runClaim } = await loadOperationCommandsModule();
|
|
398
348
|
const result = await runClaim(id, Boolean(options.force), globalOptions, {
|
|
399
349
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
400
350
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
351
|
+
ifAvailable: options.ifAvailable === true,
|
|
401
352
|
});
|
|
402
353
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
403
354
|
printResult(result, globalOptions);
|
|
@@ -416,6 +367,7 @@ export function registerOperationCommands(program) {
|
|
|
416
367
|
.action(async (id, options, command) => {
|
|
417
368
|
const globalOptions = getGlobalOptions(command);
|
|
418
369
|
const startedAt = Date.now();
|
|
370
|
+
const { runRelease } = await loadOperationCommandsModule();
|
|
419
371
|
const result = await runRelease(id, Boolean(options.force), globalOptions, {
|
|
420
372
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
421
373
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -446,9 +398,10 @@ export function registerOperationCommands(program) {
|
|
|
446
398
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
447
399
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
448
400
|
};
|
|
449
|
-
const
|
|
401
|
+
const commands = await loadOperationCommandsModule();
|
|
402
|
+
const claimResult = await commands.runClaim(id, force, globalOptions, mutationOptions);
|
|
450
403
|
await invalidateSearchCachesForMutation(globalOptions, claimResult);
|
|
451
|
-
const updateResult = await runUpdate(id, { ...mutationOptions, status: inProgressStatus, force }, globalOptions);
|
|
404
|
+
const updateResult = await commands.runUpdate(id, { ...mutationOptions, status: inProgressStatus, force }, globalOptions);
|
|
452
405
|
await invalidateSearchCachesForMutation(globalOptions, updateResult);
|
|
453
406
|
printResult({ id, action: "start_task", claim: claimResult, update: updateResult }, globalOptions);
|
|
454
407
|
if (globalOptions.profile) {
|
|
@@ -474,9 +427,10 @@ export function registerOperationCommands(program) {
|
|
|
474
427
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
475
428
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
476
429
|
};
|
|
477
|
-
const
|
|
430
|
+
const commands = await loadOperationCommandsModule();
|
|
431
|
+
const updateResult = await commands.runUpdate(id, { ...mutationOptions, status: openStatus, force }, globalOptions);
|
|
478
432
|
await invalidateSearchCachesForMutation(globalOptions, updateResult);
|
|
479
|
-
const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);
|
|
433
|
+
const releaseResult = await commands.runRelease(id, force, globalOptions, mutationOptions);
|
|
480
434
|
await invalidateSearchCachesForMutation(globalOptions, releaseResult);
|
|
481
435
|
printResult({ id, action: "pause_task", update: updateResult, release: releaseResult }, globalOptions);
|
|
482
436
|
if (globalOptions.profile) {
|
|
@@ -500,111 +454,20 @@ export function registerOperationCommands(program) {
|
|
|
500
454
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
501
455
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
502
456
|
};
|
|
503
|
-
const
|
|
457
|
+
const commands = await loadOperationCommandsModule();
|
|
458
|
+
const closeResult = await commands.runClose(id, reason, {
|
|
504
459
|
...mutationOptions,
|
|
505
460
|
validateClose: typeof options.validateClose === "string" ? options.validateClose : undefined,
|
|
506
461
|
force,
|
|
507
462
|
}, globalOptions);
|
|
508
463
|
await invalidateSearchCachesForMutation(globalOptions, closeResult);
|
|
509
|
-
const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);
|
|
464
|
+
const releaseResult = await commands.runRelease(id, force, globalOptions, mutationOptions);
|
|
510
465
|
await invalidateSearchCachesForMutation(globalOptions, releaseResult);
|
|
511
466
|
printResult({ id, action: "close_task", close: closeResult, release: releaseResult }, globalOptions);
|
|
512
467
|
if (globalOptions.profile) {
|
|
513
468
|
printError(`profile:command=close-task took_ms=${Date.now() - startedAt}`);
|
|
514
469
|
}
|
|
515
470
|
});
|
|
516
|
-
program
|
|
517
|
-
.command("completion")
|
|
518
|
-
.argument("<shell>", "Shell type: bash, zsh, or fish")
|
|
519
|
-
.option("--eager-tags", "Embed current tracker tags directly in generated scripts (legacy eager mode)")
|
|
520
|
-
.description("Generate shell completion for pm.")
|
|
521
|
-
.action(async (shell, options, command) => {
|
|
522
|
-
const globalOptions = getGlobalOptions(command);
|
|
523
|
-
const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
524
|
-
let completionTypes;
|
|
525
|
-
let completionTags;
|
|
526
|
-
let completionStatuses;
|
|
527
|
-
const completionCommandFlags = {};
|
|
528
|
-
const eagerTags = Boolean(options.eagerTags);
|
|
529
|
-
if (await pathExists(getSettingsPath(pmRoot))) {
|
|
530
|
-
const settings = await readSettings(pmRoot);
|
|
531
|
-
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
532
|
-
const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
|
|
533
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
534
|
-
completionTypes = typeRegistry.types;
|
|
535
|
-
completionStatuses = statusRegistry.definitions.map((definition) => definition.id);
|
|
536
|
-
for (const [commandKey, definitions] of runtimeFieldRegistry.command_to_fields.entries()) {
|
|
537
|
-
if (commandKey !== "list" &&
|
|
538
|
-
commandKey !== "create" &&
|
|
539
|
-
commandKey !== "update" &&
|
|
540
|
-
commandKey !== "search" &&
|
|
541
|
-
commandKey !== "calendar" &&
|
|
542
|
-
commandKey !== "context") {
|
|
543
|
-
continue;
|
|
544
|
-
}
|
|
545
|
-
const runtimeFlags = new Set();
|
|
546
|
-
for (const definition of definitions) {
|
|
547
|
-
runtimeFlags.add(`--${definition.cli_flag}`);
|
|
548
|
-
for (const alias of definition.cli_aliases) {
|
|
549
|
-
if (alias.startsWith("--") || (alias.startsWith("-") && !alias.startsWith("--"))) {
|
|
550
|
-
runtimeFlags.add(alias);
|
|
551
|
-
}
|
|
552
|
-
else {
|
|
553
|
-
runtimeFlags.add(`--${alias}`);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
completionCommandFlags[commandKey] = [...runtimeFlags].sort((left, right) => left.localeCompare(right));
|
|
558
|
-
}
|
|
559
|
-
if (completionCommandFlags.update) {
|
|
560
|
-
completionCommandFlags["update-many"] = [...completionCommandFlags.update];
|
|
561
|
-
}
|
|
562
|
-
if (eagerTags) {
|
|
563
|
-
const items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
|
|
564
|
-
completionTags = [...new Set(items.flatMap((item) => item.tags ?? []).map((tag) => tag.trim()).filter((tag) => tag.length > 0))]
|
|
565
|
-
.sort((left, right) => left.localeCompare(right));
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
const result = runCompletion(shell, completionTypes, completionTags ?? [], eagerTags, {
|
|
569
|
-
statuses: completionStatuses,
|
|
570
|
-
command_flags: completionCommandFlags,
|
|
571
|
-
});
|
|
572
|
-
if (globalOptions.json) {
|
|
573
|
-
printResult(result, globalOptions);
|
|
574
|
-
}
|
|
575
|
-
else if (!globalOptions.quiet) {
|
|
576
|
-
writeStdout(`${result.script}\n`);
|
|
577
|
-
}
|
|
578
|
-
if (globalOptions.profile) {
|
|
579
|
-
printError(`profile:command=completion took_ms=0`);
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
program
|
|
583
|
-
.command("completion-tags", { hidden: true })
|
|
584
|
-
.description("Internal dynamic completion tag source.")
|
|
585
|
-
.action(async (_options, command) => {
|
|
586
|
-
const globalOptions = getGlobalOptions(command);
|
|
587
|
-
const startedAt = Date.now();
|
|
588
|
-
const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
589
|
-
let tags = [];
|
|
590
|
-
if (await pathExists(getSettingsPath(pmRoot))) {
|
|
591
|
-
const settings = await readSettings(pmRoot);
|
|
592
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
593
|
-
const items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
|
|
594
|
-
tags = [...new Set(items.flatMap((item) => item.tags ?? []).map((tag) => tag.trim()).filter((tag) => tag.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
595
|
-
}
|
|
596
|
-
if (globalOptions.json) {
|
|
597
|
-
printResult({ tags, count: tags.length }, globalOptions);
|
|
598
|
-
}
|
|
599
|
-
else if (!globalOptions.quiet) {
|
|
600
|
-
writeStdout(tags.join("\n"));
|
|
601
|
-
if (tags.length > 0) {
|
|
602
|
-
writeStdout("\n");
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
if (globalOptions.profile) {
|
|
606
|
-
printError(`profile:command=completion-tags took_ms=${Date.now() - startedAt}`);
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
471
|
}
|
|
610
|
-
//# sourceMappingURL=register-operations.js.map
|
|
472
|
+
//# sourceMappingURL=register-operations.js.map
|
|
473
|
+
//# debugId=ff7fe568-0a90-519b-8099-b034273a3752
|