@unbrained/pm-cli 2026.8.17 → 2026.8.19
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 +2 -2
- package/AGENTS.md +4 -3
- package/CHANGELOG.md +51 -5
- package/README.md +3 -3
- package/dist/cli/error-guidance.js +8 -4
- package/dist/cli/help-content.js +32 -13
- package/dist/cli/help-json-payload.d.ts +15 -0
- package/dist/cli/help-json-payload.js +101 -23
- package/dist/cli/main.js +6 -2
- package/dist/cli/register-list-query.js +138 -54
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BHYMXLAE.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
- package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
- package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-OIOKV6NO.js} +58 -54
- package/dist/cli-bundle/chunks/chunk-QXSH7BLM.js +3 -0
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-TOXJM4WA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-YBMRWW4E.js} +44 -44
- package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-I4LUHGVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-BJRYFVSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-EF6ZS5GH.js} +44 -44
- package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-ESISGDAY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EXBCLIBU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-JDOMQ7VQ.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-PRHY2IMX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-US7VEYZG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VXDSU5MC.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-ZBIQQYMI.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -1
- package/dist/cli-bundle/sdk-core.js +28 -28
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -32
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +5 -4
- package/dist/core/config/nested-settings.js +8 -2
- package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
- package/dist/core/extensions/exporter-output-contract.js +67 -0
- package/dist/core/extensions/extension-types.d.ts +36 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +35 -44
- package/dist/core/history/event-index.d.ts +5 -0
- package/dist/core/history/event-index.js +133 -27
- package/dist/core/sentry/helpers.js +3 -3
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/core/store/settings.js +8 -2
- package/dist/mcp/tool-definitions.js +12 -7
- package/dist/sdk/agent/refusal-closure.d.ts +41 -0
- package/dist/sdk/agent/refusal-closure.js +92 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
- package/dist/sdk/agent/refusal-reachability.js +4 -4
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +104 -7
- package/dist/sdk/authoring.d.ts +1 -1
- package/dist/sdk/authoring.js +2 -2
- package/dist/sdk/cli-bootstrap.d.ts +2 -2
- package/dist/sdk/cli-bootstrap.js +4 -4
- package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
- package/dist/sdk/cli-contracts/command-aliases.js +80 -13
- package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
- package/dist/sdk/cli-contracts/commander-types.js +5 -4
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
- package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +84 -13
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +151 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +958 -0
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +33 -5
- package/dist/sdk/cli-contracts/runtime-contracts.js +100 -23
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +7 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +20 -11
- package/dist/sdk/cli-contracts.d.ts +5 -4
- package/dist/sdk/cli-contracts.js +7 -6
- package/dist/sdk/completion.js +13 -15
- package/dist/sdk/compose.d.ts +3 -3
- package/dist/sdk/compose.js +2 -2
- package/dist/sdk/context-intent-contracts.d.ts +2 -2
- package/dist/sdk/context-intent-contracts.js +22 -7
- package/dist/sdk/contracts.d.ts +3 -0
- package/dist/sdk/contracts.js +5 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/environment/host-environment-errors.js +3 -3
- package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
- package/dist/sdk/flag-invocation-contracts.js +218 -9
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +186 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +194 -26
- package/dist/sdk/guide-topics.js +5 -5
- package/dist/sdk/index.d.ts +10 -7
- package/dist/sdk/index.js +10 -7
- package/dist/sdk/init-agent-guidance.js +3 -3
- package/dist/sdk/mutation-events.d.ts +18 -2
- package/dist/sdk/mutation-events.js +59 -16
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/output.d.ts +44 -0
- package/dist/sdk/output.js +28 -2
- package/dist/sdk/query/complete-list.d.ts +94 -0
- package/dist/sdk/query/complete-list.js +173 -0
- package/dist/sdk/query/get.js +25 -6
- package/dist/sdk/query/list.js +19 -2
- package/dist/sdk/query/search-contracts.d.ts +1 -1
- package/dist/sdk/query/search-contracts.js +23 -9
- package/dist/sdk/query/search.js +3 -3
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/read-output/continuation.d.ts +1 -1
- package/dist/sdk/read-output/continuation.js +7 -24
- package/dist/sdk/read-output-contracts.d.ts +2 -2
- package/dist/sdk/read-output-contracts.js +89 -13
- package/dist/sdk/read-output-rows.d.ts +4 -0
- package/dist/sdk/read-output-rows.js +47 -18
- package/dist/sdk/runtime-extended-actions.js +10 -2
- package/dist/sdk/runtime.d.ts +8 -2
- package/dist/sdk/runtime.js +18 -11
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/dist/types.d.ts +5 -0
- package/dist/types.js +2 -2
- package/docs/AGENT_GUIDE.md +25 -9
- package/docs/CLI_GRAMMAR.md +106 -0
- package/docs/COMMANDS.md +39 -27
- package/docs/ONBOARDING.md +4 -4
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +42 -2
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/TESTING.md +14 -1
- package/docs/agent-task-token-baseline.json +5 -5
- package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
- package/marketplace.json +2 -2
- package/package.json +5 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/generate-agent-capability-surfaces.mjs +20 -14
- package/sdk/public-surface.json +1245 -60
- package/dist/cli-bundle/chunks/chunk-2QLOXC3V.js +0 -3
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +0 -35
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +0 -13
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +0 -197
- package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TPXZIBIV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +0 -2
- package/dist/cli-bundle/chunks/register-list-query-Q7KII4G5.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-SSENDH5B.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-267MUUS6.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KGEXTMPG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-XPIC53VA.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +0 -155
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.8.
|
|
9
|
+
"version": "2026.8.19"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.8.
|
|
16
|
+
"version": "2026.8.19",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/AGENTS.md
CHANGED
|
@@ -63,8 +63,8 @@ For real repository tracking, do not override `PM_PATH`. If a script must target
|
|
|
63
63
|
```bash
|
|
64
64
|
pm context --limit 10
|
|
65
65
|
pm search "<request keywords>" --limit 10
|
|
66
|
-
pm list
|
|
67
|
-
pm list
|
|
66
|
+
pm list --status open --limit 20
|
|
67
|
+
pm list --status in_progress --limit 20
|
|
68
68
|
pm create --create-mode progressive --title "..." --description "..." --type Task --status open
|
|
69
69
|
pm claim <id>
|
|
70
70
|
pm update <id> --status in_progress --message "Start implementation"
|
|
@@ -82,12 +82,13 @@ Author identity is automatic; use `--author` only for an explicit override.
|
|
|
82
82
|
|
|
83
83
|
## Working Rules
|
|
84
84
|
|
|
85
|
-
- **Orient:** run `pm context`, `pm search`, `pm list
|
|
85
|
+
- **Orient:** run `pm context`, `pm search`, `pm list --status open`, and `pm list --status in_progress` before `pm create`. If net-new work is required, create or reuse the parent lineage first and record duplicate-check evidence in a create-time comment.
|
|
86
86
|
- **Verify before you claim:** the verification recipe for the Non-Negotiable above. A `closed` item whose `resolution`/`close_reason` describes the fix represents completed, shipped work — never describe it as outstanding. Confirm release/CI/infra status against the live system, e.g. `pm get pm-9gxi`, `npm view @unbrained/pm-cli version`, `gh release list`, `gh run list --workflow=auto-release.yml`.
|
|
87
87
|
- **Implement:** keep edits scoped to the claimed item. Link changed files with `pm files`, docs with `pm docs`, and runnable verification with `pm test`.
|
|
88
88
|
- **Record:** use `pm comments`, `pm notes`, and `pm learnings` for progress, rationale, and durable lessons. Prefer append-style updates over rewriting item content.
|
|
89
89
|
- **Verify:** use sandbox-safe commands. For documentation-only work, run at least `pnpm build` and a focused link/content check. For broader work, run linked tests, coverage, validation, and release gates as appropriate.
|
|
90
90
|
- **Close:** add evidence first, then `pm close <id> "<reason>" --validate-close warn`, then `pm release <id>`.
|
|
91
|
+
- **Land closeout through review:** tracker evidence, item closure, and the generated changelog are part of the reviewed delivery. Never push post-merge closeout commits directly to `main`; if evidence depends on the merge SHA, carry it in a normal `main`-based follow-up PR so the new head retains analyzer provenance. See [Releasing](docs/RELEASING.md#reviewed-delivery-closeout).
|
|
91
92
|
|
|
92
93
|
## Test Safety
|
|
93
94
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.8.19 - 2026-08-19
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- The writer-lease renewal test decides from wall-clock progress instead of the lease record, so correct behaviour is reported as a failure whenever the restore finishes first ([pm-15qgul](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-15qgul.toon))
|
|
8
|
+
- Core command flag_invocations misclassify valueless booleans as required string values ([pm-pcy92t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-pcy92t.toon))
|
|
9
|
+
- A budget-truncated read is resumable on one surface and terminal on five, and the only recovery the envelope names is to abandon the budget that truncated it ([pm-8nev0o](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-8nev0o.toon))
|
|
10
|
+
- Both token gates are structurally unable to fail: one measures only help payloads, the other measures command output against a three-item fixture, so no check anywhere compares real output to the ceiling the contract declares ([pm-9sui7t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-9sui7t.toon))
|
|
11
|
+
- Plan positional-action help is undiscoverable: pm plan create --help is rejected as an unknown command ([pm-2tan](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-2tan.toon))
|
|
12
|
+
- MCP update keys and CLI update flags diverge in name (linkedFile/linkedTest vs --file/--test), so an agent that reads the MCP contract and writes a CLI command produces a guaranteed unknown-option refusal ([pm-y0htkd](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-y0htkd.toon))
|
|
13
|
+
- Context calibration recovery names a nonexistent package script ([pm-xa3t0o](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-xa3t0o.toon))
|
|
14
|
+
|
|
15
|
+
### Other
|
|
16
|
+
|
|
17
|
+
- Every executable command and positional action publishes a typed, validated argument contract ([pm-ya7x55](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-ya7x55.toon))
|
|
18
|
+
|
|
19
|
+
## 2026.8.18 - 2026-08-18
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Alias shim layer: config-aware hidden aliases with one-line migration hints (foundation for all consolidations) ([pm-0z7n](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-0z7n.toon))
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- A commit pushed directly to the default branch can never be released: both analyzer-evidence fallbacks presuppose a pull request, and nothing declares that precondition ([pm-u1baah](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-u1baah.toon))
|
|
28
|
+
- GH-1052: typed fail-closed whole-list SDK primitive ([pm-y4aaol](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-y4aaol.toon))
|
|
29
|
+
- Packed Bun SDK import fails on node:module stripTypeScriptTypes ([pm-ikj8ve](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ikj8ve.toon))
|
|
30
|
+
- GH-1051: package catalog rejects universal output-budget controls ([pm-2firut](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-2firut.toon))
|
|
31
|
+
- Bun event streaming falls back to authoritative history without node:sqlite ([pm-b8hwfr](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-b8hwfr.toon))
|
|
32
|
+
- Surface replication gate scopes trigger activation to relevant diff content ([pm-mrhwow](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mrhwow.toon))
|
|
33
|
+
- CodeQL: remove generated-code artifact path interpolation from exporter integration harness ([pm-ozxkm2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ozxkm2.toon))
|
|
34
|
+
- Exporter artifact-channel contract: clean stdout, bounded receipts, and binary-safe streaming ([pm-dilou2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-dilou2.toon))
|
|
35
|
+
- GH-1048: Windows Node 24 numeric EDQUOT fixtures construct NaN on platforms that do not declare that errno ([pm-y4kovm](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-y4kovm.toon))
|
|
36
|
+
- Queued daily releases recognize an already-published same-day release before analyzer provenance ([pm-dm2vfz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-dm2vfz.toon))
|
|
37
|
+
|
|
38
|
+
### Security
|
|
39
|
+
|
|
40
|
+
- Adopt Dependabot PR \#1046 pinned CodeQL 4.37.7 and TruffleHog 3.97.0 refresh ([pm-pp6al9](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-pp6al9.toon))
|
|
41
|
+
|
|
42
|
+
### Deprecated
|
|
43
|
+
|
|
44
|
+
- ADR: noun-verb CLI grammar — accepted consolidation principles and alias-preserving deprecation policy ([pm-pbyu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/decisions/pm-pbyu.toon))
|
|
45
|
+
|
|
46
|
+
### Other
|
|
47
|
+
|
|
48
|
+
- Command-grammar conformance gate: the noun-verb table and shared verb vocabulary become machine-checked contracts a non-conforming command cannot pass ([pm-wt43zj](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-wt43zj.toon))
|
|
49
|
+
- Consolidate the 8 list-\* status variants into pm list --status (list-all/open/draft/in-progress/blocked/closed/canceled become hidden aliases) ([pm-pfqi](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-pfqi.toon))
|
|
50
|
+
- Command-destination census: 14 of 76 canonical commands have no declared home in the target grammar, so the surface can be frozen with its shape still undecided ([pm-yy8rmx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-yy8rmx.toon))
|
|
51
|
+
- Half of the pm events payload is per-row resume cursors an agent never reads: 48 percent of stream bytes buy a capability consumed once per batch ([pm-ez1dfg](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-ez1dfg.toon))
|
|
52
|
+
|
|
3
53
|
## 2026.8.17 - 2026-08-17
|
|
4
54
|
|
|
5
55
|
### Added
|
|
@@ -37,7 +87,6 @@
|
|
|
37
87
|
- GH-1028: history-author-acknowledge bulk mutation lacks dry-run and misreports empty selection ([pm-mcxk8v](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mcxk8v.toon))
|
|
38
88
|
- GH-1030: contracts --json --full is wholly omitted by the default output budget ([pm-2qvq7a](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-2qvq7a.toon))
|
|
39
89
|
- Auto Release blocker closure ignores successful recovery dispatch and reruns the stale tag-push workflow ([pm-db8onn](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-db8onn.toon))
|
|
40
|
-
- A commit pushed directly to the default branch can never be released: both analyzer-evidence fallbacks presuppose a pull request, and nothing declares that precondition ([pm-u1baah](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-u1baah.toon))
|
|
41
90
|
|
|
42
91
|
### Other
|
|
43
92
|
|
|
@@ -52,11 +101,9 @@
|
|
|
52
101
|
- Provide an audited repair and severity-migration contract for legacy invalid provenance ([pm-76fkpp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-76fkpp.toon))
|
|
53
102
|
- Detect extension-host pm-cli version skew before a workspace reports healthy ([pm-643e0k](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-643e0k.toon))
|
|
54
103
|
- Restore strict unknown-key parity for docs linked-artifact additions ([pm-22rzjp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-22rzjp.toon))
|
|
55
|
-
- Surface replication gate scopes trigger activation to relevant diff content ([pm-mrhwow](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mrhwow.toon))
|
|
56
104
|
- Make every failing health verdict self-indexing and attach gate severity to findings ([pm-larv4r](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-larv4r.toon))
|
|
57
105
|
- GH-1004: history-repair remains writer-version-specific across 2026.8.7 and 2026.8.13 ([pm-igdvfq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-igdvfq.toon))
|
|
58
106
|
- Assurance gates preserve zero-valued counts and report actionable source failures ([pm-xmmafu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-xmmafu.toon))
|
|
59
|
-
- A budget-truncated read is resumable on one surface and terminal on five, and the only recovery the envelope names is to abandon the budget that truncated it ([pm-8nev0o](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-8nev0o.toon))
|
|
60
107
|
- Ranking explanation is sized by the workspace rather than by the answer: explaining two returned rows emits one entry per active item and ignores the token budget entirely ([pm-okgxwa](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-okgxwa.toon))
|
|
61
108
|
- The unknown-option refusal asserts the option belongs on another command path without checking, so a spelling that exists nowhere sends the reader on an unbounded search ([pm-in23qu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-in23qu.toon))
|
|
62
109
|
- The gate verdict withholds its evidence as a declaration-order prefix, so the assertion that produced a blocking verdict can be the row the default read drops ([pm-e5gl05](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-e5gl05.toon))
|
|
@@ -519,7 +566,6 @@
|
|
|
519
566
|
- GH-790/GH-791: pm merge install reports workspace_root in a different canonical form depending on which channel resolved it, so the same repository has two non-equal spellings on macOS and Windows ([pm-ihmfs6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ihmfs6.toon))
|
|
520
567
|
- The dependency token budget is enforced against a different representation than the one emitted, so a command that reports staying inside 16k tokens delivers about 45k ([pm-t2t709](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-t2t709.toon))
|
|
521
568
|
- pm activity has no default bound: a bare invocation returns all 40,446 history entries at 1.59M tokens, 397x the ceiling its own contract declares ([pm-z2j1qt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-z2j1qt.toon))
|
|
522
|
-
- Both token gates are structurally unable to fail: one measures only help payloads, the other measures command output against a three-item fixture, so no check anywhere compares real output to the ceiling the contract declares ([pm-9sui7t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-9sui7t.toon))
|
|
523
569
|
- Sentry PM-CLI-2N: malformed missing tags crash normalizeItemMetadata before search can report the item ([pm-89neyq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-89neyq.toon))
|
|
524
570
|
- pm-governance-audit comments-audit limit contract contradicts runtime alias semantics ([pm-v657](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-v657.toon))
|
|
525
571
|
- pm-governance-audit dedupe-audit rejects --status all, breaking explicit all-lifecycle duplicate sweeps ([pm-mp49](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mp49.toon))
|
|
@@ -969,10 +1015,10 @@
|
|
|
969
1015
|
|
|
970
1016
|
### Fixed
|
|
971
1017
|
|
|
1018
|
+
- Sentry no longer captures deliberate Ctrl+C/Ctrl+D interrupts as error-level events (AbortError, PM-CLI-27) ([pm-ksv2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ksv2.toon))
|
|
972
1019
|
- pm get --full omits children for Plan parents while pm list --parent returns them ([pm-y4z5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-y4z5.toon))
|
|
973
1020
|
- Intentional package CommandError outcomes create high-severity Sentry issues (PM-CLI-16) ([pm-7071](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-7071.toon))
|
|
974
1021
|
- Extension install self-copy guard: reject source-inside-destination layouts before fs.cp EINVAL (PM-CLI-28) ([pm-8myl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-8myl.toon))
|
|
975
|
-
- Sentry captures deliberate Ctrl+C interrupts as error-level events (AbortError, PM-CLI-27) ([pm-ksv2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ksv2.toon))
|
|
976
1022
|
- Torn-install bundle transients block scheduled releases: boot-time chunk-integrity self-check + distinct error code for gate classification ([pm-wfvq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-wfvq.toon))
|
|
977
1023
|
- GH-446: pm get omits schedule facet (events/start_at/end_at/location) for Meeting/Event/Reminder ([pm-x1g5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-x1g5.toon))
|
|
978
1024
|
- GH-533: create/update accept empty --title — required-title contract inconsistent between omitted and empty string ([pm-7je0](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-7je0.toon))
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ pm create \
|
|
|
84
84
|
--ac "Restore succeeds after stale lock cleanup and has regression coverage." \
|
|
85
85
|
--create-mode progressive
|
|
86
86
|
|
|
87
|
-
pm list
|
|
87
|
+
pm list --status open --limit 10
|
|
88
88
|
pm claim <item-id>
|
|
89
89
|
pm update <item-id> --status in_progress --message "Start implementation"
|
|
90
90
|
pm files <item-id> --add path=src/core/lock/lock.ts
|
|
@@ -102,8 +102,8 @@ Use `pm next` to get the single highest-priority ready item (and why), or `pm co
|
|
|
102
102
|
pm next # the next actionable item + rationale, ready/blocked queues
|
|
103
103
|
pm context --limit 10
|
|
104
104
|
pm search "keywords for the requested work" --limit 10
|
|
105
|
-
pm list
|
|
106
|
-
pm list
|
|
105
|
+
pm list --status open --limit 20
|
|
106
|
+
pm list --status in_progress --limit 20
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
If no relevant item exists, create a parent lineage before child work, claim the child item, link changed files/docs/tests, and leave evidence comments before closing. The full workflow is in the [Agent Guide](docs/AGENT_GUIDE.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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]="
|
|
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]="367d9302-9e1e-5813-a913-e4e87f34d8b9")}catch(e){}}();
|
|
3
3
|
import { resolveRecoveryCommandName } from "../sdk/agent/command-recovery.js";
|
|
4
4
|
import { renderPmCommand } from "./argv-utils.js";
|
|
5
5
|
import { discoverNearbyPmRoot } from "../sdk/tracker-root-discovery.js";
|
|
@@ -177,6 +177,7 @@ function normalizeRecoveryPayload(payload) {
|
|
|
177
177
|
normalized.option_scope = payload.option_scope;
|
|
178
178
|
}
|
|
179
179
|
assignRecoveryString(normalized, "suggested_retry", payload.suggested_retry);
|
|
180
|
+
assignRecoveryCollection(normalized, "suggested_retry_args", payload.suggested_retry_args);
|
|
180
181
|
if (typeof payload.retry_after_ms === "number" &&
|
|
181
182
|
Number.isSafeInteger(payload.retry_after_ms) &&
|
|
182
183
|
payload.retry_after_ms >= 0) {
|
|
@@ -483,7 +484,7 @@ function buildItemNotFoundGuidance(rawMessage, message, context) {
|
|
|
483
484
|
const nextSteps = isPlaceholder
|
|
484
485
|
? [
|
|
485
486
|
"Check that the variable holding the item ID is defined before passing it to pm.",
|
|
486
|
-
'Use "pm list
|
|
487
|
+
'Use "pm list --status open --limit 20" to find valid IDs.',
|
|
487
488
|
]
|
|
488
489
|
: ["Confirm the active --path/PM_PATH scope, then retry with a valid id."];
|
|
489
490
|
return applyPmCliErrorContext(makeGuidanceMessage({
|
|
@@ -492,7 +493,10 @@ function buildItemNotFoundGuidance(rawMessage, message, context) {
|
|
|
492
493
|
happened,
|
|
493
494
|
required: "Use an existing item ID from current tracker data.",
|
|
494
495
|
why: "Mutation and read commands operate only on known IDs.",
|
|
495
|
-
examples: [
|
|
496
|
+
examples: [
|
|
497
|
+
"pm list --status open --limit 20",
|
|
498
|
+
'pm search "<keyword>" --limit 10',
|
|
499
|
+
],
|
|
496
500
|
nextSteps,
|
|
497
501
|
}), rawMessage, context);
|
|
498
502
|
}
|
|
@@ -1237,4 +1241,4 @@ export const _testOnly = {
|
|
|
1237
1241
|
resolveKnownPackageCommandHint,
|
|
1238
1242
|
};
|
|
1239
1243
|
//# sourceMappingURL=error-guidance.js.map
|
|
1240
|
-
//# debugId=
|
|
1244
|
+
//# debugId=367d9302-9e1e-5813-a913-e4e87f34d8b9
|
package/dist/cli/help-content.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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]="9cf83881-9464-5c18-b196-ee669057a873")}catch(e){}}();
|
|
3
|
+
import { parseBootstrapHelpRequest } from "./bootstrap-args.js";
|
|
4
|
+
import { formatPmPositionalActionFlagTip, PM_POSITIONAL_ACTION_CONTRACTS, resolvePmPositionalActionContract, } from "../sdk/cli-contracts/grammar-contracts.js";
|
|
1
5
|
// Compact help/narrative surfaces show at most the first example. Centralizing this
|
|
2
6
|
// keeps the empty-examples guard in one place for renderCompactHelpBundle and
|
|
3
7
|
// resolveHelpNarrative (both must degrade to an empty list rather than [undefined]).
|
|
4
8
|
/** Implements first example or empty for the public runtime surface of this module. */
|
|
5
|
-
|
|
6
|
-
!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]="a97a61f2-df10-5c2b-8497-f8de17a6222d")}catch(e){}}();
|
|
7
9
|
export function firstExampleOrEmpty(examples) {
|
|
8
10
|
return examples.length > 0 ? [examples[0]] : [];
|
|
9
11
|
}
|
|
@@ -596,9 +598,7 @@ const HELP_BY_COMMAND_PATH = {
|
|
|
596
598
|
},
|
|
597
599
|
delete: {
|
|
598
600
|
why: "Removes an item while preserving history evidence and lock/ownership checks.",
|
|
599
|
-
examples: [
|
|
600
|
-
'pm delete pm-a1b2 --message "Remove duplicate item"',
|
|
601
|
-
],
|
|
601
|
+
examples: ['pm delete pm-a1b2 --message "Remove duplicate item"'],
|
|
602
602
|
},
|
|
603
603
|
append: {
|
|
604
604
|
why: "Adds implementation notes to body without replacing existing content.",
|
|
@@ -641,7 +641,7 @@ const HELP_BY_COMMAND_PATH = {
|
|
|
641
641
|
examples: [
|
|
642
642
|
'pm learnings pm-a1b2 --add "Avoid direct test-runner commands in linked tests; use sandbox runner."',
|
|
643
643
|
'pm learnings pm-a1b2 --add "text: lesson with commas, key-like words, and punctuation-safe context"',
|
|
644
|
-
|
|
644
|
+
"pm learnings pm-a1b2 --edit 1 --file docs/corrected-learning.md",
|
|
645
645
|
"pm learnings pm-a1b2 --delete 2",
|
|
646
646
|
"pm learnings pm-a1b2 --limit 10",
|
|
647
647
|
],
|
|
@@ -753,15 +753,11 @@ const HELP_BY_COMMAND_PATH = {
|
|
|
753
753
|
},
|
|
754
754
|
release: {
|
|
755
755
|
why: "Releases an active claim when paused, handed off, or completed.",
|
|
756
|
-
examples: [
|
|
757
|
-
'pm release pm-a1b2 --message "Release after closure"',
|
|
758
|
-
],
|
|
756
|
+
examples: ['pm release pm-a1b2 --message "Release after closure"'],
|
|
759
757
|
},
|
|
760
758
|
"start-task": {
|
|
761
759
|
why: "Lifecycle alias that claims an item and sets status to in_progress.",
|
|
762
|
-
examples: [
|
|
763
|
-
'pm start-task pm-a1b2 --message "Start implementation"',
|
|
764
|
-
],
|
|
760
|
+
examples: ['pm start-task pm-a1b2 --message "Start implementation"'],
|
|
765
761
|
},
|
|
766
762
|
"pause-task": {
|
|
767
763
|
why: "Lifecycle alias that sets status to open and releases active assignment.",
|
|
@@ -884,6 +880,29 @@ export function attachRichHelpText(program, argv = process.argv.slice(2)) {
|
|
|
884
880
|
for (const [commandPath, bundle] of Object.entries(HELP_BY_COMMAND_PATH)) {
|
|
885
881
|
attachBundleByPath(program, commandPath, bundle, detailMode);
|
|
886
882
|
}
|
|
883
|
+
const requestedPath = normalizeHelpCommandPath(parseBootstrapHelpRequest(argv).commandPathTokens.join(" "));
|
|
884
|
+
const positionalAction = resolvePmPositionalActionContract(requestedPath);
|
|
885
|
+
if (positionalAction) {
|
|
886
|
+
attachBundleByPath(program, positionalAction.parent, {
|
|
887
|
+
why: positionalAction.description,
|
|
888
|
+
examples: [positionalAction.example],
|
|
889
|
+
tips: [
|
|
890
|
+
`Action path: pm ${positionalAction.command}`,
|
|
891
|
+
formatPmPositionalActionFlagTip(positionalAction.accepted_flags),
|
|
892
|
+
],
|
|
893
|
+
}, detailMode);
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const positionalActions = PM_POSITIONAL_ACTION_CONTRACTS.filter(({ parent }) => parent === requestedPath);
|
|
897
|
+
if (positionalActions.length > 0) {
|
|
898
|
+
attachBundleByPath(program, requestedPath, {
|
|
899
|
+
why: `Dispatches one declared positional action: ${positionalActions.map(({ action }) => action).join("|")}.`,
|
|
900
|
+
examples: positionalActions.map(({ example }) => example),
|
|
901
|
+
tips: [
|
|
902
|
+
`Inspect one action directly with pm ${requestedPath} <action> --help --json.`,
|
|
903
|
+
],
|
|
904
|
+
}, detailMode);
|
|
905
|
+
}
|
|
887
906
|
}
|
|
888
907
|
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
889
908
|
export const _testOnly = {
|
|
@@ -891,4 +910,4 @@ export const _testOnly = {
|
|
|
891
910
|
renderDetailedHelpBundle,
|
|
892
911
|
};
|
|
893
912
|
//# sourceMappingURL=help-content.js.map
|
|
894
|
-
//# debugId=
|
|
913
|
+
//# debugId=9cf83881-9464-5c18-b196-ee669057a873
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { resolveItemTypeRegistry } from "../sdk/runtime-primitives.js";
|
|
8
8
|
import { type HelpOptionSummary, type ExtensionCommandHelpDescriptor } from "./extension-command-help.js";
|
|
9
|
+
import { type PmPositionalActionContract } from "../sdk/cli-contracts/grammar-contracts.js";
|
|
10
|
+
import { type PmCommandCapabilityFamily, type PmCommandVisibilityTier } from "../sdk/agent-capability-contracts.js";
|
|
9
11
|
/** Documents the help argument summary payload exchanged by command, SDK, and package integrations. */
|
|
10
12
|
export interface HelpArgumentSummary {
|
|
11
13
|
/** Value that configures or reports name for this contract. */
|
|
@@ -25,6 +27,10 @@ export interface HelpSubcommandSummary {
|
|
|
25
27
|
aliases: string[];
|
|
26
28
|
/** Value that configures or reports description for this contract. */
|
|
27
29
|
description: string;
|
|
30
|
+
/** Shared command visibility tier. */
|
|
31
|
+
tier: PmCommandVisibilityTier;
|
|
32
|
+
/** Shared command capability family. */
|
|
33
|
+
family: PmCommandCapabilityFamily;
|
|
28
34
|
}
|
|
29
35
|
declare function resolveCommandFromPathTokens(root: Command, pathTokens: string[]): Command | null;
|
|
30
36
|
declare function readOptionAttributeName(option: unknown): string | null;
|
|
@@ -33,6 +39,14 @@ declare function buildHelpOptionSummaries(command: Command): HelpOptionSummary[]
|
|
|
33
39
|
declare function compactHelpOptionAliases(options: HelpOptionSummary[]): HelpOptionSummary[];
|
|
34
40
|
declare function buildHelpArgumentSummaries(command: Command): HelpArgumentSummary[];
|
|
35
41
|
declare function buildHelpSubcommandSummaries(command: Command): HelpSubcommandSummary[];
|
|
42
|
+
interface PositionalActionHelpProjection {
|
|
43
|
+
arguments: HelpArgumentSummary[];
|
|
44
|
+
options: HelpOptionSummary[];
|
|
45
|
+
subcommands: HelpSubcommandSummary[];
|
|
46
|
+
usage: string;
|
|
47
|
+
}
|
|
48
|
+
/** Build the command/action structural view shared by every JSON help field. */
|
|
49
|
+
declare function buildPositionalActionHelpProjection(action: PmPositionalActionContract | undefined, targetCommand: Command, resolvedPath: string, allOptions: HelpOptionSummary[]): PositionalActionHelpProjection;
|
|
36
50
|
declare function buildJsonHelpPayload(rootProgram: Command, targetCommand: Command, argv: string[], requestedPath: string[], extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>): Record<string, unknown>;
|
|
37
51
|
/** Implements maybe render bootstrap json help for the public runtime surface of this module. */
|
|
38
52
|
export declare function maybeRenderBootstrapJsonHelp(rootProgram: Command, argv: string[], extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>): Promise<boolean>;
|
|
@@ -44,6 +58,7 @@ export declare const _testOnly: {
|
|
|
44
58
|
attachCreateUpdatePolicyHelpText: typeof attachCreateUpdatePolicyHelpText;
|
|
45
59
|
buildCreateUpdatePolicyHelpText: typeof buildCreateUpdatePolicyHelpText;
|
|
46
60
|
buildJsonHelpPayload: typeof buildJsonHelpPayload;
|
|
61
|
+
buildPositionalActionHelpProjection: typeof buildPositionalActionHelpProjection;
|
|
47
62
|
buildHelpArgumentSummaries: typeof buildHelpArgumentSummaries;
|
|
48
63
|
buildHelpOptionSummaries: typeof buildHelpOptionSummaries;
|
|
49
64
|
buildHelpSubcommandSummaries: typeof buildHelpSubcommandSummaries;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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]="
|
|
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]="abdb8d3e-8c1b-511e-b25b-220d5a40ae3f")}catch(e){}}();
|
|
3
3
|
import { hasSubcommandFlagContractsForCommand, PM_CORE_COMMAND_NAMES, } from "../sdk/cli-contracts.js";
|
|
4
4
|
import { commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveTypeDefinition, EXIT_CODE, printError, writeStdout, } from "../sdk/runtime-primitives.js";
|
|
5
5
|
import { buildDynamicExtensionHelpOptionSummaries, mergeHelpOptionSummaries, findCommandByPath, findDirectChildCommand, commandAliases, } from "./extension-command-help.js";
|
|
@@ -10,6 +10,8 @@ import { extractProvidedOptionFlags, renderPmCommand } from "./argv-utils.js";
|
|
|
10
10
|
import { formatCommanderErrorForJson } from "./error-guidance.js";
|
|
11
11
|
import { BUILTIN_TYPE_HELP_VALUES, buildUnknownCommandGuidanceFromRuntime, } from "./commander-usage.js";
|
|
12
12
|
import { resolveCreateExplicitEmptyFlag } from "../sdk/agent/create-option-policy.js";
|
|
13
|
+
import { formatPmPositionalActionFlagTip, PM_POSITIONAL_ACTION_CONTRACTS, resolvePmPositionalActionContract, } from "../sdk/cli-contracts/grammar-contracts.js";
|
|
14
|
+
import { resolvePmCommandCapabilityFamily, resolvePmCommandVisibilityTier, } from "../sdk/agent-capability-contracts.js";
|
|
13
15
|
function resolveCommandFromPathTokens(root, pathTokens) {
|
|
14
16
|
if (pathTokens.length === 0) {
|
|
15
17
|
return root;
|
|
@@ -20,7 +22,8 @@ function resolveCommandFromPathTokens(root, pathTokens) {
|
|
|
20
22
|
}
|
|
21
23
|
const requestedPath = pathTokens.join(" ");
|
|
22
24
|
if (!PM_CORE_COMMAND_NAMES.some((commandName) => commandName === requestedPath) &&
|
|
23
|
-
!hasSubcommandFlagContractsForCommand(requestedPath)
|
|
25
|
+
!hasSubcommandFlagContractsForCommand(requestedPath) &&
|
|
26
|
+
!resolvePmPositionalActionContract(requestedPath)) {
|
|
24
27
|
return null;
|
|
25
28
|
}
|
|
26
29
|
for (let length = pathTokens.length - 1; length > 0; length -= 1) {
|
|
@@ -170,19 +173,29 @@ function buildHelpArgumentSummaries(command) {
|
|
|
170
173
|
: null;
|
|
171
174
|
return {
|
|
172
175
|
name: rawName.trim(),
|
|
173
|
-
required: argument.required === true
|
|
176
|
+
required: argument.required === true ||
|
|
177
|
+
description?.toLowerCase().startsWith("required;") === true,
|
|
174
178
|
variadic: argument.variadic === true,
|
|
175
179
|
description,
|
|
176
180
|
};
|
|
177
181
|
});
|
|
178
182
|
}
|
|
179
183
|
function buildHelpSubcommandSummaries(command) {
|
|
180
|
-
return command
|
|
181
|
-
.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
return command
|
|
185
|
+
.createHelp()
|
|
186
|
+
.visibleCommands(command)
|
|
187
|
+
.filter((entry) => entry.name() !== "help" || command.parent === null)
|
|
188
|
+
.map((entry) => {
|
|
189
|
+
const rootCommand = normalizeHelpCommandPath(getCommandPath(entry))
|
|
190
|
+
.split(" ")[0];
|
|
191
|
+
return {
|
|
192
|
+
name: entry.name().trim(),
|
|
193
|
+
aliases: commandAliases(entry),
|
|
194
|
+
description: entry.description().trim(),
|
|
195
|
+
tier: resolvePmCommandVisibilityTier(rootCommand),
|
|
196
|
+
family: resolvePmCommandCapabilityFamily(rootCommand),
|
|
197
|
+
};
|
|
198
|
+
})
|
|
186
199
|
.sort((left, right) => left.name.localeCompare(right.name));
|
|
187
200
|
}
|
|
188
201
|
function buildJsonHelpNarrative(detailMode, fallbackNarrative, extensionDescriptor) {
|
|
@@ -210,6 +223,57 @@ function buildJsonHelpNarrative(detailMode, fallbackNarrative, extensionDescript
|
|
|
210
223
|
detail_mode: detailMode,
|
|
211
224
|
};
|
|
212
225
|
}
|
|
226
|
+
/** Build the command/action structural view shared by every JSON help field. */
|
|
227
|
+
function buildPositionalActionHelpProjection(action, targetCommand, resolvedPath, allOptions) {
|
|
228
|
+
if (!action) {
|
|
229
|
+
const argumentsList = buildHelpArgumentSummaries(targetCommand);
|
|
230
|
+
const registeredSubcommands = buildHelpSubcommandSummaries(targetCommand);
|
|
231
|
+
const registeredSubcommandNames = new Set(registeredSubcommands.map(({ name }) => name));
|
|
232
|
+
return {
|
|
233
|
+
arguments: argumentsList,
|
|
234
|
+
options: allOptions,
|
|
235
|
+
subcommands: [
|
|
236
|
+
...registeredSubcommands,
|
|
237
|
+
...PM_POSITIONAL_ACTION_CONTRACTS.filter(({ parent, action: name }) => parent === resolvedPath && !registeredSubcommandNames.has(name)).map(({ action: name, description }) => ({
|
|
238
|
+
name,
|
|
239
|
+
aliases: [],
|
|
240
|
+
description,
|
|
241
|
+
tier: resolvePmCommandVisibilityTier(resolvedPath.split(" ")[0]),
|
|
242
|
+
family: resolvePmCommandCapabilityFamily(resolvedPath.split(" ")[0]),
|
|
243
|
+
})),
|
|
244
|
+
].sort((left, right) => left.name.localeCompare(right.name)),
|
|
245
|
+
usage: [
|
|
246
|
+
resolvedPath,
|
|
247
|
+
argumentsList.reduce((usage, argument) => argument.required
|
|
248
|
+
? usage.replace(`[${argument.name}${argument.variadic ? "..." : ""}]`, `<${argument.name}${argument.variadic ? "..." : ""}>`)
|
|
249
|
+
: usage, targetCommand.usage()),
|
|
250
|
+
]
|
|
251
|
+
.filter((token) => token.length > 0)
|
|
252
|
+
.join(" "),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const acceptedFlags = new Set(action.accepted_flags);
|
|
256
|
+
return {
|
|
257
|
+
arguments: action.slots.map(({ name, required, variadic, value_kind: valueKind, polymorphic }) => ({
|
|
258
|
+
name,
|
|
259
|
+
required,
|
|
260
|
+
variadic,
|
|
261
|
+
description: polymorphic
|
|
262
|
+
? `Polymorphic ${valueKind} value; inspect the action contract before mutation.`
|
|
263
|
+
: `${valueKind.replaceAll("_", " ")} value.`,
|
|
264
|
+
})),
|
|
265
|
+
options: allOptions.filter(({ long, aliases }) => (long !== null && acceptedFlags.has(long)) ||
|
|
266
|
+
aliases.some((alias) => acceptedFlags.has(alias))),
|
|
267
|
+
subcommands: [],
|
|
268
|
+
usage: [
|
|
269
|
+
action.command,
|
|
270
|
+
...action.slots.map(({ name, required, variadic }) => {
|
|
271
|
+
const token = variadic ? `${name}...` : name;
|
|
272
|
+
return required ? `<${token}>` : `[${token}]`;
|
|
273
|
+
}),
|
|
274
|
+
].join(" "),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
213
277
|
function buildJsonHelpPayload(rootProgram, targetCommand, argv, requestedPath, extensionDescriptors) {
|
|
214
278
|
const detailMode = resolveHelpDetailMode(argv);
|
|
215
279
|
const commanderPath = normalizeHelpCommandPath(getCommandPath(targetCommand));
|
|
@@ -217,29 +281,42 @@ function buildJsonHelpPayload(rootProgram, targetCommand, argv, requestedPath, e
|
|
|
217
281
|
const resolvedPath = requestedCommandPath.length > commanderPath.length
|
|
218
282
|
? requestedCommandPath
|
|
219
283
|
: commanderPath;
|
|
220
|
-
const
|
|
284
|
+
const positionalAction = resolvePmPositionalActionContract(resolvedPath);
|
|
285
|
+
const projectedPath = positionalAction?.command ?? resolvedPath;
|
|
286
|
+
const commandPath = projectedPath.length > 0 ? projectedPath : undefined;
|
|
287
|
+
const rootCommandPath = commandPath?.split(" ")[0];
|
|
221
288
|
const fallbackNarrative = resolveHelpNarrative(commandPath, detailMode);
|
|
222
289
|
const extensionDescriptor = commandPath
|
|
223
290
|
? extensionDescriptors.get(commandPath)
|
|
224
291
|
: undefined;
|
|
225
292
|
const narrative = buildJsonHelpNarrative(detailMode, fallbackNarrative, extensionDescriptor);
|
|
226
|
-
const
|
|
227
|
-
const
|
|
293
|
+
const allOptionSummaries = compactHelpOptionAliases(mergeHelpOptionSummaries(buildHelpOptionSummaries(targetCommand), buildDynamicExtensionHelpOptionSummaries(extensionDescriptor)));
|
|
294
|
+
const projection = buildPositionalActionHelpProjection(positionalAction, targetCommand, projectedPath, allOptionSummaries);
|
|
228
295
|
return {
|
|
229
296
|
format: "pm_help_v1",
|
|
230
297
|
detail_mode: detailMode,
|
|
231
298
|
root_command: rootProgram.name(),
|
|
232
299
|
requested_path: requestedPath,
|
|
233
|
-
resolved_path:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
300
|
+
resolved_path: projectedPath.length > 0 ? projectedPath : rootProgram.name(),
|
|
301
|
+
visibility_tier: rootCommandPath === undefined
|
|
302
|
+
? null
|
|
303
|
+
: resolvePmCommandVisibilityTier(rootCommandPath),
|
|
304
|
+
capability_family: rootCommandPath === undefined
|
|
305
|
+
? null
|
|
306
|
+
: resolvePmCommandCapabilityFamily(rootCommandPath),
|
|
307
|
+
description: positionalAction?.description ?? targetCommand.description(),
|
|
308
|
+
usage: projection.usage,
|
|
309
|
+
intent: positionalAction?.description ?? narrative.intent,
|
|
310
|
+
examples: positionalAction
|
|
311
|
+
? [positionalAction.example]
|
|
312
|
+
: narrative.examples,
|
|
313
|
+
tips: positionalAction
|
|
314
|
+
? [formatPmPositionalActionFlagTip(positionalAction.accepted_flags)]
|
|
315
|
+
: narrative.tips,
|
|
316
|
+
arguments: projection.arguments,
|
|
317
|
+
options: projection.options,
|
|
318
|
+
subcommands: projection.subcommands,
|
|
319
|
+
has_subcommands: projection.subcommands.length > 0,
|
|
243
320
|
};
|
|
244
321
|
}
|
|
245
322
|
/** Implements maybe render bootstrap json help for the public runtime surface of this module. */
|
|
@@ -402,6 +479,7 @@ export const _testOnly = {
|
|
|
402
479
|
attachCreateUpdatePolicyHelpText,
|
|
403
480
|
buildCreateUpdatePolicyHelpText,
|
|
404
481
|
buildJsonHelpPayload,
|
|
482
|
+
buildPositionalActionHelpProjection,
|
|
405
483
|
buildHelpArgumentSummaries,
|
|
406
484
|
buildHelpOptionSummaries,
|
|
407
485
|
buildHelpSubcommandSummaries,
|
|
@@ -411,4 +489,4 @@ export const _testOnly = {
|
|
|
411
489
|
resolveCommandFromPathTokens,
|
|
412
490
|
};
|
|
413
491
|
//# sourceMappingURL=help-json-payload.js.map
|
|
414
|
-
//# debugId=
|
|
492
|
+
//# debugId=abdb8d3e-8c1b-511e-b25b-220d5a40ae3f
|
package/dist/cli/main.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module cli/main
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
!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]="
|
|
6
|
+
!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]="27eeca2d-756c-539b-a0d4-d64516ee4aa6")}catch(e){}}();
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
|
|
9
9
|
import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
|
|
@@ -138,6 +138,7 @@ function projectExistingRecoveryOptionalFields(existingRecovery) {
|
|
|
138
138
|
"recovery_mode",
|
|
139
139
|
"missing_required_fields",
|
|
140
140
|
"suggested_flags",
|
|
141
|
+
"suggested_retry_args",
|
|
141
142
|
"allowed_values",
|
|
142
143
|
"candidate_commands",
|
|
143
144
|
"candidate_commands_total",
|
|
@@ -182,6 +183,9 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
182
183
|
...(rawExistingRecovery.suggested_retry
|
|
183
184
|
? { suggested_retry: renderAttemptedCommand(safeInvocationArgv) }
|
|
184
185
|
: {}),
|
|
186
|
+
...(rawExistingRecovery.suggested_retry_args
|
|
187
|
+
? { suggested_retry_args: [...safeInvocationArgv] }
|
|
188
|
+
: {}),
|
|
185
189
|
}
|
|
186
190
|
: rawExistingRecovery;
|
|
187
191
|
if (existingRecovery?.recovery_mode === "compact" && !explainRequested) {
|
|
@@ -2512,4 +2516,4 @@ export const _testOnly = {
|
|
|
2512
2516
|
wrapThrownErrorForSentry,
|
|
2513
2517
|
};
|
|
2514
2518
|
//# sourceMappingURL=main.js.map
|
|
2515
|
-
//# debugId=
|
|
2519
|
+
//# debugId=27eeca2d-756c-539b-a0d4-d64516ee4aa6
|