@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
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
import type { GlobalOptions, ServiceOverrideContext } from "../../../../src/sdk/index.js";
|
|
4
|
+
|
|
5
|
+
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
6
|
+
|
|
7
|
+
interface RuntimeSdkModule {
|
|
8
|
+
runGuide: (options: Record<string, unknown>, global: GlobalOptions) => Promise<unknown>;
|
|
9
|
+
resolveGuideOutputFormat: (options: Record<string, unknown>, global: GlobalOptions) => "markdown" | "toon" | "json";
|
|
10
|
+
renderGuideMarkdown: (result: unknown) => string;
|
|
11
|
+
runCompletion: (
|
|
12
|
+
shell: string,
|
|
13
|
+
itemTypes?: string[],
|
|
14
|
+
tags?: string[],
|
|
15
|
+
eagerTagExpansion?: boolean,
|
|
16
|
+
runtime?: {
|
|
17
|
+
statuses?: string[];
|
|
18
|
+
command_flags?: Partial<Record<"list" | "create" | "update" | "update-many" | "search" | "calendar" | "context", string[]>>;
|
|
19
|
+
},
|
|
20
|
+
) => {
|
|
21
|
+
shell: string;
|
|
22
|
+
script: string;
|
|
23
|
+
setup_hint: string;
|
|
24
|
+
};
|
|
25
|
+
pathExists: (targetPath: string) => Promise<boolean>;
|
|
26
|
+
getSettingsPath: (pmRoot: string) => string;
|
|
27
|
+
resolvePmRoot: (cwd: string, overridePath?: string) => string;
|
|
28
|
+
readSettings: (pmRoot: string) => Promise<Record<string, unknown>>;
|
|
29
|
+
resolveItemTypeRegistry: (settings: unknown, registrations: unknown) => { definitions: Array<{ name: string; folder: string }> };
|
|
30
|
+
resolveRuntimeStatusRegistry: (schema: unknown) => { definitions: Array<{ id: string }> };
|
|
31
|
+
resolveRuntimeFieldRegistry: (schema: unknown) => {
|
|
32
|
+
command_to_fields: Map<string, Array<{ cli_flag: string }>>;
|
|
33
|
+
};
|
|
34
|
+
listAllFrontMatter: (
|
|
35
|
+
pmRoot: string,
|
|
36
|
+
itemFormat: "toon" | "json_markdown",
|
|
37
|
+
typeToFolder: Record<string, string>,
|
|
38
|
+
status?: unknown,
|
|
39
|
+
schema?: unknown,
|
|
40
|
+
) => Promise<Array<{ metadata: { tags?: string[] } }>>;
|
|
41
|
+
getActiveExtensionRegistrations: () => unknown;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface RuntimeBundle {
|
|
45
|
+
sdk: RuntimeSdkModule;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let runtimeBundle: RuntimeBundle | null = null;
|
|
49
|
+
let runtimeBundlePromise: Promise<RuntimeBundle> | null = null;
|
|
50
|
+
|
|
51
|
+
async function ensureRuntimeBundle(): Promise<RuntimeBundle> {
|
|
52
|
+
if (runtimeBundle) {
|
|
53
|
+
return runtimeBundle;
|
|
54
|
+
}
|
|
55
|
+
if (!runtimeBundlePromise) {
|
|
56
|
+
runtimeBundlePromise = loadRuntimeBundle();
|
|
57
|
+
}
|
|
58
|
+
runtimeBundle = await runtimeBundlePromise;
|
|
59
|
+
return runtimeBundle;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function loadRuntimeBundle(): Promise<RuntimeBundle> {
|
|
63
|
+
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
64
|
+
if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
`builtin-guide-shell requires ${PM_PACKAGE_ROOT_ENV} to locate core SDK runtime exports.`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const modulePath = path.join(path.resolve(envRoot.trim()), "dist", "sdk", "runtime.js");
|
|
70
|
+
try {
|
|
71
|
+
const sdkLoaded = (await import(pathToFileURL(modulePath).href)) as Partial<RuntimeSdkModule>;
|
|
72
|
+
if (
|
|
73
|
+
typeof sdkLoaded.runGuide === "function" &&
|
|
74
|
+
typeof sdkLoaded.resolveGuideOutputFormat === "function" &&
|
|
75
|
+
typeof sdkLoaded.renderGuideMarkdown === "function" &&
|
|
76
|
+
typeof sdkLoaded.runCompletion === "function" &&
|
|
77
|
+
typeof sdkLoaded.pathExists === "function" &&
|
|
78
|
+
typeof sdkLoaded.getSettingsPath === "function" &&
|
|
79
|
+
typeof sdkLoaded.resolvePmRoot === "function" &&
|
|
80
|
+
typeof sdkLoaded.readSettings === "function" &&
|
|
81
|
+
typeof sdkLoaded.resolveItemTypeRegistry === "function" &&
|
|
82
|
+
typeof sdkLoaded.resolveRuntimeStatusRegistry === "function" &&
|
|
83
|
+
typeof sdkLoaded.resolveRuntimeFieldRegistry === "function" &&
|
|
84
|
+
typeof sdkLoaded.listAllFrontMatter === "function" &&
|
|
85
|
+
typeof sdkLoaded.getActiveExtensionRegistrations === "function"
|
|
86
|
+
) {
|
|
87
|
+
return {
|
|
88
|
+
sdk: sdkLoaded as RuntimeSdkModule,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
} catch {
|
|
92
|
+
// Fall through to deterministic failure message below.
|
|
93
|
+
}
|
|
94
|
+
throw new Error(
|
|
95
|
+
`builtin-guide-shell failed to load guide/completion SDK runtime exports from ${modulePath}.`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function readStringOption(options: Record<string, unknown>, key: string, aliases: string[] = []): string | undefined {
|
|
100
|
+
const keys = [key, ...aliases];
|
|
101
|
+
for (const candidate of keys) {
|
|
102
|
+
const value = options[candidate];
|
|
103
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function readBooleanOption(options: Record<string, unknown>, key: string, aliases: string[] = []): boolean | undefined {
|
|
111
|
+
const keys = [key, ...aliases];
|
|
112
|
+
for (const candidate of keys) {
|
|
113
|
+
const value = options[candidate];
|
|
114
|
+
if (value === undefined) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (typeof value === "boolean") {
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
if (typeof value === "string") {
|
|
121
|
+
const normalized = value.trim().toLowerCase();
|
|
122
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function readCsvListOption(options: Record<string, unknown>, key: string, aliases: string[] = []): string[] {
|
|
134
|
+
const value = readStringOption(options, key, aliases);
|
|
135
|
+
if (!value) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
return value
|
|
139
|
+
.split(",")
|
|
140
|
+
.map((entry) => entry.trim())
|
|
141
|
+
.filter((entry) => entry.length > 0);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function normalizeGuideOptions(args: string[], options: Record<string, unknown>): Record<string, unknown> {
|
|
145
|
+
const topicFromArgs = args[0];
|
|
146
|
+
return {
|
|
147
|
+
topic: readStringOption(options, "topic") ?? (typeof topicFromArgs === "string" && topicFromArgs.trim().length > 0 ? topicFromArgs : undefined),
|
|
148
|
+
list: readBooleanOption(options, "list") === true ? true : undefined,
|
|
149
|
+
format: readStringOption(options, "format"),
|
|
150
|
+
depth: readStringOption(options, "depth"),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function normalizeCompletionOptions(args: string[], options: Record<string, unknown>): {
|
|
155
|
+
shell: string;
|
|
156
|
+
itemTypes: string[];
|
|
157
|
+
tags: string[];
|
|
158
|
+
eagerTags: boolean;
|
|
159
|
+
} {
|
|
160
|
+
const shellFromOptions = readStringOption(options, "shell");
|
|
161
|
+
const shellFromArgs = typeof args[0] === "string" && args[0].trim().length > 0 ? args[0].trim() : undefined;
|
|
162
|
+
return {
|
|
163
|
+
shell: shellFromOptions ?? shellFromArgs ?? "bash",
|
|
164
|
+
itemTypes: readCsvListOption(options, "itemTypes", ["item_types"]),
|
|
165
|
+
tags: readCsvListOption(options, "tags"),
|
|
166
|
+
eagerTags: readBooleanOption(options, "eagerTags", ["eager_tags"]) === true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
async function buildCompletionRuntimeConfig(
|
|
171
|
+
bundle: RuntimeBundle,
|
|
172
|
+
global: GlobalOptions,
|
|
173
|
+
): Promise<{
|
|
174
|
+
statuses?: string[];
|
|
175
|
+
command_flags?: Partial<Record<"list" | "create" | "update" | "update-many" | "search" | "calendar" | "context", string[]>>;
|
|
176
|
+
}> {
|
|
177
|
+
const pmRoot = bundle.sdk.resolvePmRoot(process.cwd(), global.path);
|
|
178
|
+
if (!(await bundle.sdk.pathExists(bundle.sdk.getSettingsPath(pmRoot)))) {
|
|
179
|
+
return {};
|
|
180
|
+
}
|
|
181
|
+
const settings = await bundle.sdk.readSettings(pmRoot);
|
|
182
|
+
const schema = (settings as { schema?: unknown }).schema;
|
|
183
|
+
const statuses = bundle.sdk.resolveRuntimeStatusRegistry(schema).definitions
|
|
184
|
+
.map((definition) => definition.id)
|
|
185
|
+
.filter((status) => typeof status === "string" && status.trim().length > 0)
|
|
186
|
+
.sort((left, right) => left.localeCompare(right));
|
|
187
|
+
const fieldRegistry = bundle.sdk.resolveRuntimeFieldRegistry(schema);
|
|
188
|
+
const runtimeCommands = ["list", "create", "update", "update-many", "search", "calendar", "context"] as const;
|
|
189
|
+
const commandFlags: Partial<Record<(typeof runtimeCommands)[number], string[]>> = {};
|
|
190
|
+
for (const command of runtimeCommands) {
|
|
191
|
+
const definitions = fieldRegistry.command_to_fields.get(command) ?? [];
|
|
192
|
+
const flags = [
|
|
193
|
+
...new Set(
|
|
194
|
+
definitions
|
|
195
|
+
.map((definition) => definition.cli_flag)
|
|
196
|
+
.filter((value): value is string => typeof value === "string" && value.trim().length > 0)
|
|
197
|
+
.map((value) => `--${value.trim().replaceAll("_", "-")}`),
|
|
198
|
+
),
|
|
199
|
+
].sort((left, right) => left.localeCompare(right));
|
|
200
|
+
if (flags.length > 0) {
|
|
201
|
+
commandFlags[command] = flags;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
statuses: statuses.length > 0 ? statuses : undefined,
|
|
206
|
+
command_flags: Object.keys(commandFlags).length > 0 ? commandFlags : undefined,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function readPayloadFormat(payload: unknown): "toon" | "json" {
|
|
211
|
+
if (typeof payload === "object" && payload !== null) {
|
|
212
|
+
const format = (payload as { format?: unknown }).format;
|
|
213
|
+
if (format === "json") {
|
|
214
|
+
return "json";
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return "toon";
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function readPayloadResult(payload: unknown): unknown {
|
|
221
|
+
if (typeof payload === "object" && payload !== null && "result" in payload) {
|
|
222
|
+
return (payload as { result?: unknown }).result;
|
|
223
|
+
}
|
|
224
|
+
return payload;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function collectTagsFromItems(items: Array<{ metadata: { tags?: string[] } }>): string[] {
|
|
228
|
+
const tagSet = new Set<string>();
|
|
229
|
+
for (const item of items) {
|
|
230
|
+
const tags = Array.isArray(item.metadata.tags) ? item.metadata.tags : [];
|
|
231
|
+
for (const tag of tags) {
|
|
232
|
+
if (typeof tag === "string" && tag.trim().length > 0) {
|
|
233
|
+
tagSet.add(tag.trim());
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return [...tagSet].sort((left, right) => left.localeCompare(right));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export async function runGuidePackage(
|
|
241
|
+
args: string[],
|
|
242
|
+
options: Record<string, unknown>,
|
|
243
|
+
global: GlobalOptions,
|
|
244
|
+
): Promise<unknown> {
|
|
245
|
+
const bundle = await ensureRuntimeBundle();
|
|
246
|
+
return bundle.sdk.runGuide(normalizeGuideOptions(args, options), global);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export async function runCompletionPackage(
|
|
250
|
+
args: string[],
|
|
251
|
+
options: Record<string, unknown>,
|
|
252
|
+
global: GlobalOptions,
|
|
253
|
+
): Promise<unknown> {
|
|
254
|
+
const bundle = await ensureRuntimeBundle();
|
|
255
|
+
const normalized = normalizeCompletionOptions(args, options);
|
|
256
|
+
const runtimeConfig = await buildCompletionRuntimeConfig(bundle, global);
|
|
257
|
+
return bundle.sdk.runCompletion(
|
|
258
|
+
normalized.shell,
|
|
259
|
+
normalized.itemTypes,
|
|
260
|
+
normalized.tags,
|
|
261
|
+
normalized.eagerTags,
|
|
262
|
+
runtimeConfig,
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export async function runCompletionTagsPackage(global: GlobalOptions): Promise<{ tags: string[]; count: number }> {
|
|
267
|
+
const bundle = await ensureRuntimeBundle();
|
|
268
|
+
const pmRoot = bundle.sdk.resolvePmRoot(process.cwd(), global.path);
|
|
269
|
+
if (!(await bundle.sdk.pathExists(bundle.sdk.getSettingsPath(pmRoot)))) {
|
|
270
|
+
return { tags: [], count: 0 };
|
|
271
|
+
}
|
|
272
|
+
const settings = await bundle.sdk.readSettings(pmRoot);
|
|
273
|
+
const registrations = bundle.sdk.getActiveExtensionRegistrations();
|
|
274
|
+
const typeRegistry = bundle.sdk.resolveItemTypeRegistry(settings, registrations);
|
|
275
|
+
const typeToFolder = Object.fromEntries(
|
|
276
|
+
typeRegistry.definitions.map((definition) => [definition.name, definition.folder]),
|
|
277
|
+
);
|
|
278
|
+
const schema = (settings as { schema?: unknown }).schema;
|
|
279
|
+
const itemFormat = ((settings as { item_format?: unknown }).item_format === "json_markdown" ? "json_markdown" : "toon") as
|
|
280
|
+
| "toon"
|
|
281
|
+
| "json_markdown";
|
|
282
|
+
const items = await bundle.sdk.listAllFrontMatter(pmRoot, itemFormat, typeToFolder, undefined, schema);
|
|
283
|
+
const tags = collectTagsFromItems(items);
|
|
284
|
+
return {
|
|
285
|
+
tags,
|
|
286
|
+
count: tags.length,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function renderGuideShellPackageOutput(context: ServiceOverrideContext): string | null {
|
|
291
|
+
if (!runtimeBundle) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
const result = readPayloadResult(context.payload);
|
|
295
|
+
if (context.command === "guide") {
|
|
296
|
+
const options = (context.options ?? {}) as Record<string, unknown>;
|
|
297
|
+
const global = (context.global ?? {}) as GlobalOptions;
|
|
298
|
+
const outputFormat = runtimeBundle.sdk.resolveGuideOutputFormat(options, global);
|
|
299
|
+
if (outputFormat === "markdown") {
|
|
300
|
+
return `${runtimeBundle.sdk.renderGuideMarkdown(result)}\n`;
|
|
301
|
+
}
|
|
302
|
+
if (outputFormat === "json" || readPayloadFormat(context.payload) === "json") {
|
|
303
|
+
return `${JSON.stringify(result, null, 2)}\n`;
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
if (context.command === "completion") {
|
|
308
|
+
if (readPayloadFormat(context.payload) === "json") {
|
|
309
|
+
return `${JSON.stringify(result, null, 2)}\n`;
|
|
310
|
+
}
|
|
311
|
+
if (typeof result === "object" && result !== null && typeof (result as { script?: unknown }).script === "string") {
|
|
312
|
+
const script = (result as { script: string }).script;
|
|
313
|
+
return script.endsWith("\n") ? script : `${script}\n`;
|
|
314
|
+
}
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
if (context.command === "completion-tags") {
|
|
318
|
+
if (readPayloadFormat(context.payload) === "json") {
|
|
319
|
+
return `${JSON.stringify(result, null, 2)}\n`;
|
|
320
|
+
}
|
|
321
|
+
const tags = typeof result === "object" && result !== null && Array.isArray((result as { tags?: unknown }).tags)
|
|
322
|
+
? ((result as { tags: unknown[] }).tags.filter((entry): entry is string => typeof entry === "string"))
|
|
323
|
+
: [];
|
|
324
|
+
return `${tags.join(" ")}\n`;
|
|
325
|
+
}
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unbrained/pm-guide-shell",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "First-party pm package for guide and shell completion workflows.",
|
|
7
|
+
"homepage": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/unbraind/pm-cli.git",
|
|
11
|
+
"directory": "packages/pm-guide-shell"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/unbraind/pm-cli/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"pm-package",
|
|
18
|
+
"project-management",
|
|
19
|
+
"guide",
|
|
20
|
+
"completion",
|
|
21
|
+
"shell"
|
|
22
|
+
],
|
|
23
|
+
"pm": {
|
|
24
|
+
"aliases": [
|
|
25
|
+
"guide-shell"
|
|
26
|
+
],
|
|
27
|
+
"extensions": [
|
|
28
|
+
"extensions/guide-shell"
|
|
29
|
+
],
|
|
30
|
+
"catalog": {
|
|
31
|
+
"display_name": "Guide + Shell UX",
|
|
32
|
+
"category": "workflow",
|
|
33
|
+
"summary": "Restore guide documentation and shell completion commands as package-owned UX surfaces.",
|
|
34
|
+
"tags": [
|
|
35
|
+
"guide",
|
|
36
|
+
"completion",
|
|
37
|
+
"shell"
|
|
38
|
+
],
|
|
39
|
+
"links": {
|
|
40
|
+
"docs": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell#readme",
|
|
41
|
+
"repository": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-guide-shell",
|
|
42
|
+
"report": "https://github.com/unbraind/pm-cli/issues"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"docs": [
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"examples": [
|
|
49
|
+
"README.md"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# pm-linked-test-adapters
|
|
2
|
+
|
|
3
|
+
First-party package that restores optional linked-test background run management surfaces in bare-core `pm`.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `pm test-runs`
|
|
8
|
+
- `pm test-runs list`
|
|
9
|
+
- `pm test-runs status <runId>`
|
|
10
|
+
- `pm test-runs logs <runId>`
|
|
11
|
+
- `pm test-runs stop <runId>`
|
|
12
|
+
- `pm test-runs resume <runId>`
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pm install linked-test-adapters --project
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Verify
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pm test-runs list --json
|
|
24
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runTestRunsListPackage,
|
|
3
|
+
runTestRunsLogsPackage,
|
|
4
|
+
runTestRunsResumePackage,
|
|
5
|
+
runTestRunsStatusPackage,
|
|
6
|
+
runTestRunsStopPackage,
|
|
7
|
+
} from "./runtime.js";
|
|
8
|
+
|
|
9
|
+
export const manifest = {
|
|
10
|
+
name: "builtin-linked-test-adapters",
|
|
11
|
+
version: "0.1.0",
|
|
12
|
+
entry: "./index.js",
|
|
13
|
+
priority: 0,
|
|
14
|
+
capabilities: ["commands", "schema"],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function testRunsCommand() {
|
|
18
|
+
return {
|
|
19
|
+
name: "test-runs",
|
|
20
|
+
action: "test-runs-list",
|
|
21
|
+
description: "List background linked-test runs.",
|
|
22
|
+
flags: [
|
|
23
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by background run status." },
|
|
24
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit number of runs returned." },
|
|
25
|
+
],
|
|
26
|
+
run: async (context) => runTestRunsListPackage(context.options, context.global),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function testRunsListCommand() {
|
|
31
|
+
return {
|
|
32
|
+
name: "test-runs list",
|
|
33
|
+
action: "test-runs-list",
|
|
34
|
+
description: "List background linked-test runs.",
|
|
35
|
+
flags: [
|
|
36
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by background run status." },
|
|
37
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit number of runs returned." },
|
|
38
|
+
],
|
|
39
|
+
run: async (context) => runTestRunsListPackage(context.options, context.global),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function testRunsStatusCommand() {
|
|
44
|
+
return {
|
|
45
|
+
name: "test-runs status",
|
|
46
|
+
action: "test-runs-status",
|
|
47
|
+
description: "Show status and health snapshot for a background linked-test run.",
|
|
48
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
49
|
+
run: async (context) => runTestRunsStatusPackage(context.args, context.global),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function testRunsLogsCommand() {
|
|
54
|
+
return {
|
|
55
|
+
name: "test-runs logs",
|
|
56
|
+
action: "test-runs-logs",
|
|
57
|
+
description: "Show tailed logs for a background linked-test run.",
|
|
58
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
59
|
+
flags: [
|
|
60
|
+
{ long: "--stream", value_name: "value", value_type: "string", description: "Log stream selector: stdout|stderr|both." },
|
|
61
|
+
{ long: "--tail", value_name: "n", value_type: "string", description: "Tail number of lines per selected stream." },
|
|
62
|
+
],
|
|
63
|
+
run: async (context) => runTestRunsLogsPackage(context.args, context.options, context.global),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function testRunsStopCommand() {
|
|
68
|
+
return {
|
|
69
|
+
name: "test-runs stop",
|
|
70
|
+
action: "test-runs-stop",
|
|
71
|
+
description: "Stop a running background linked-test run.",
|
|
72
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
73
|
+
flags: [{ long: "--force", value_type: "boolean", description: "Force-stop via SIGKILL." }],
|
|
74
|
+
run: async (context) => runTestRunsStopPackage(context.args, context.options, context.global),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function testRunsResumeCommand() {
|
|
79
|
+
return {
|
|
80
|
+
name: "test-runs resume",
|
|
81
|
+
action: "test-runs-resume",
|
|
82
|
+
description: "Resume a terminal background linked-test run by starting a new attempt.",
|
|
83
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
84
|
+
flags: [{ long: "--author", value_name: "value", value_type: "string", description: "Resume author override." }],
|
|
85
|
+
run: async (context) => runTestRunsResumePackage(context.args, context.options, context.global),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function activate(api) {
|
|
90
|
+
api.registerCommand(testRunsCommand());
|
|
91
|
+
api.registerCommand(testRunsListCommand());
|
|
92
|
+
api.registerCommand(testRunsStatusCommand());
|
|
93
|
+
api.registerCommand(testRunsLogsCommand());
|
|
94
|
+
api.registerCommand(testRunsStopCommand());
|
|
95
|
+
api.registerCommand(testRunsResumeCommand());
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
manifest,
|
|
100
|
+
activate,
|
|
101
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { CommandDefinition, ExtensionApi } from "../../../../src/sdk/index.js";
|
|
2
|
+
import {
|
|
3
|
+
runTestRunsListPackage,
|
|
4
|
+
runTestRunsLogsPackage,
|
|
5
|
+
runTestRunsResumePackage,
|
|
6
|
+
runTestRunsStatusPackage,
|
|
7
|
+
runTestRunsStopPackage,
|
|
8
|
+
} from "./runtime.js";
|
|
9
|
+
|
|
10
|
+
export const manifest = {
|
|
11
|
+
name: "builtin-linked-test-adapters",
|
|
12
|
+
version: "0.1.0",
|
|
13
|
+
entry: "./index.js",
|
|
14
|
+
priority: 0,
|
|
15
|
+
capabilities: ["commands", "schema"],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function testRunsCommand(): CommandDefinition {
|
|
19
|
+
return {
|
|
20
|
+
name: "test-runs",
|
|
21
|
+
action: "test-runs-list",
|
|
22
|
+
description: "List background linked-test runs.",
|
|
23
|
+
flags: [
|
|
24
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by background run status." },
|
|
25
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit number of runs returned." },
|
|
26
|
+
],
|
|
27
|
+
run: async (context) => runTestRunsListPackage(context.options, context.global),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function testRunsListCommand(): CommandDefinition {
|
|
32
|
+
return {
|
|
33
|
+
name: "test-runs list",
|
|
34
|
+
action: "test-runs-list",
|
|
35
|
+
description: "List background linked-test runs.",
|
|
36
|
+
flags: [
|
|
37
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by background run status." },
|
|
38
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit number of runs returned." },
|
|
39
|
+
],
|
|
40
|
+
run: async (context) => runTestRunsListPackage(context.options, context.global),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function testRunsStatusCommand(): CommandDefinition {
|
|
45
|
+
return {
|
|
46
|
+
name: "test-runs status",
|
|
47
|
+
action: "test-runs-status",
|
|
48
|
+
description: "Show status and health snapshot for a background linked-test run.",
|
|
49
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
50
|
+
run: async (context) => runTestRunsStatusPackage(context.args, context.global),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function testRunsLogsCommand(): CommandDefinition {
|
|
55
|
+
return {
|
|
56
|
+
name: "test-runs logs",
|
|
57
|
+
action: "test-runs-logs",
|
|
58
|
+
description: "Show tailed logs for a background linked-test run.",
|
|
59
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
60
|
+
flags: [
|
|
61
|
+
{ long: "--stream", value_name: "value", value_type: "string", description: "Log stream selector: stdout|stderr|both." },
|
|
62
|
+
{ long: "--tail", value_name: "n", value_type: "string", description: "Tail number of lines per selected stream." },
|
|
63
|
+
],
|
|
64
|
+
run: async (context) => runTestRunsLogsPackage(context.args, context.options, context.global),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function testRunsStopCommand(): CommandDefinition {
|
|
69
|
+
return {
|
|
70
|
+
name: "test-runs stop",
|
|
71
|
+
action: "test-runs-stop",
|
|
72
|
+
description: "Stop a running background linked-test run.",
|
|
73
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
74
|
+
flags: [{ long: "--force", value_type: "boolean", description: "Force-stop via SIGKILL." }],
|
|
75
|
+
run: async (context) => runTestRunsStopPackage(context.args, context.options, context.global),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function testRunsResumeCommand(): CommandDefinition {
|
|
80
|
+
return {
|
|
81
|
+
name: "test-runs resume",
|
|
82
|
+
action: "test-runs-resume",
|
|
83
|
+
description: "Resume a terminal background linked-test run by starting a new attempt.",
|
|
84
|
+
arguments: [{ name: "runId", required: true, description: "Background run id." }],
|
|
85
|
+
flags: [{ long: "--author", value_name: "value", value_type: "string", description: "Resume author override." }],
|
|
86
|
+
run: async (context) => runTestRunsResumePackage(context.args, context.options, context.global),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function activate(api: ExtensionApi): void {
|
|
91
|
+
api.registerCommand(testRunsCommand());
|
|
92
|
+
api.registerCommand(testRunsListCommand());
|
|
93
|
+
api.registerCommand(testRunsStatusCommand());
|
|
94
|
+
api.registerCommand(testRunsLogsCommand());
|
|
95
|
+
api.registerCommand(testRunsStopCommand());
|
|
96
|
+
api.registerCommand(testRunsResumeCommand());
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export default {
|
|
100
|
+
manifest,
|
|
101
|
+
activate,
|
|
102
|
+
};
|