@unbrained/pm-cli 2026.9.3 → 2026.9.5
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/.agents/skills/HARNESS_COMPATIBILITY.md +1 -1
- package/.agents/skills/README.md +2 -2
- package/.agents/skills/pm-developer/SKILL.md +4 -1
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +10 -0
- package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +3 -1
- package/.agents/skills/pm-extensions/SKILL.md +2 -2
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +3 -3
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +3 -3
- package/.agents/skills/pm-user/SKILL.md +2 -0
- package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +5 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +20 -5
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +52 -0
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +15 -12
- package/dist/cli/help-json-payload.js +12 -7
- package/dist/cli/main.js +15 -6
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-mutation.js +4 -2
- package/dist/cli/register-operations.js +6 -2
- package/dist/cli-bundle/bundle-manifest.json +154 -154
- package/dist/cli-bundle/chunks/{chunk-EDPIS7EB.js → chunk-3HBDTJRK.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-66VPKFP2.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-Y4PJ6HPK.js → chunk-HUAQITVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DKGP3QLE.js → chunk-IBYREGSP.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LUI4E32I.js +231 -0
- package/dist/cli-bundle/chunks/{chunk-UPPM2FOZ.js → chunk-QPZHQY2O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-34HASX3S.js → chunk-SF6SM6U5.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SVK5Y64D.js +40 -0
- package/dist/cli-bundle/chunks/chunk-V5GBD5KV.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-LENC656S.js → chunk-WWAEGW4V.js} +67 -70
- package/dist/cli-bundle/chunks/chunk-ZRAQS3UA.js +8 -0
- package/dist/cli-bundle/chunks/{register-list-query-W2ZTOMKP.js → register-list-query-AYKGODWT.js} +3 -3
- package/dist/cli-bundle/chunks/{register-mutation-RVND5NCG.js → register-mutation-YZYG53SQ.js} +4 -4
- package/dist/cli-bundle/chunks/register-operations-KFSCC7QV.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-D3ZFHY3L.js → register-setup-UJCRVGBG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-24IG6ONG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M5M6SVHS.js → chunk-3ASU6WGI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3ITLIBKS.js +56 -0
- package/dist/cli-bundle/focused-chunks/chunk-3NQD5YDG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-S27XMBIN.js → chunk-4OSHLNUE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-65N6JHAN.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-5RFXUPN5.js → chunk-B2TTQGFG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-GUBM3RGY.js +20 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Q45NHPF2.js → chunk-H5FOGAVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-JX3RCVCX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-D7KXFBXV.js → chunk-KWWCBWFO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MV752SUC.js +12 -0
- package/dist/cli-bundle/focused-chunks/chunk-PKIPMCFS.js +6 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4HJFY4MB.js → chunk-QL66QNWG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-RJMR2JIF.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-WIUPWIZR.js +177 -0
- package/dist/cli-bundle/focused-chunks/chunk-WOCIPMW7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GT7MXDLW.js → chunk-YEF5PQQ2.js} +2 -2
- package/dist/cli-bundle/main.js +22 -15
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +29 -32
- 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 +45 -37
- 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 +10 -10
- package/dist/core/diagnostics/remediation.js +4 -4
- package/dist/core/extensions/extension-types.d.ts +2 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/history/drift-scan.d.ts +5 -0
- package/dist/core/history/drift-scan.js +16 -6
- package/dist/core/history/event-classification.d.ts +1 -1
- package/dist/core/history/event-classification.js +3 -2
- package/dist/core/history/history.d.ts +37 -1
- package/dist/core/history/history.js +311 -59
- package/dist/core/history/identity.d.ts +15 -0
- package/dist/core/history/identity.js +31 -0
- package/dist/core/history/projection.js +50 -17
- package/dist/core/history/read.js +6 -3
- package/dist/core/history/replay.d.ts +1 -2
- package/dist/core/history/replay.js +70 -36
- package/dist/core/history/version-address.d.ts +13 -0
- package/dist/core/history/version-address.js +33 -0
- package/dist/core/item/actionability.d.ts +21 -1
- package/dist/core/item/actionability.js +45 -10
- package/dist/core/item/id.js +8 -4
- package/dist/core/item/item-type-definition.d.ts +2 -0
- package/dist/core/item/item-type-definition.js +9 -2
- package/dist/core/item/type-registry.d.ts +5 -1
- package/dist/core/item/type-registry.js +9 -4
- package/dist/core/lock/lock.d.ts +10 -0
- package/dist/core/lock/lock.js +42 -3
- package/dist/core/shared/author.d.ts +3 -1
- package/dist/core/shared/author.js +111 -23
- package/dist/core/shared/errors.d.ts +8 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/item-store.d.ts +14 -0
- package/dist/core/store/item-store.js +48 -10
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/sdk/actionability.d.ts +1 -1
- package/dist/sdk/actionability.js +3 -3
- package/dist/sdk/cli-contracts/command-aliases.js +11 -2
- package/dist/sdk/cli-contracts/completeness.js +4 -3
- package/dist/sdk/cli-contracts/flag-contracts.js +29 -5
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +19 -12
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +14 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +19 -6
- package/dist/sdk/context-intent-contracts.js +3 -3
- package/dist/sdk/context-usage.js +9 -11
- package/dist/sdk/define.d.ts +1 -1
- package/dist/sdk/define.js +2 -2
- package/dist/sdk/environment/agent-environment.d.ts +296 -0
- package/dist/sdk/environment/agent-environment.js +467 -0
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +19 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +118 -21
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +98 -38
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -2
- package/dist/sdk/governance/health.js +13 -44
- package/dist/sdk/governance/merge-receipt-history.d.ts +62 -0
- package/dist/sdk/governance/merge-receipt-history.js +207 -0
- package/dist/sdk/governance/provenance-health.js +9 -3
- package/dist/sdk/governance/validate-history-drift.js +16 -5
- package/dist/sdk/guide-topics.js +116 -2
- package/dist/sdk/history/salvage.d.ts +35 -0
- package/dist/sdk/history/salvage.js +248 -0
- package/dist/sdk/history-compact.js +41 -37
- package/dist/sdk/history-read.d.ts +3 -2
- package/dist/sdk/history-read.js +6 -3
- package/dist/sdk/history-redact.js +58 -23
- package/dist/sdk/history-repair.d.ts +5 -0
- package/dist/sdk/history-repair.js +28 -6
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +4 -2
- package/dist/sdk/lifecycle/claim.d.ts +4 -0
- package/dist/sdk/lifecycle/claim.js +9 -3
- package/dist/sdk/lifecycle/restore.d.ts +1 -0
- package/dist/sdk/lifecycle/restore.js +19 -7
- package/dist/sdk/merge/driver.d.ts +3 -1
- package/dist/sdk/merge/driver.js +9 -9
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/receipts.d.ts +17 -6
- package/dist/sdk/merge/receipts.js +246 -75
- package/dist/sdk/merge/reconcile.d.ts +9 -7
- package/dist/sdk/merge/reconcile.js +175 -12
- package/dist/sdk/merge/three-way.d.ts +22 -2
- package/dist/sdk/merge/three-way.js +92 -25
- package/dist/sdk/output-projection.d.ts +3 -1
- package/dist/sdk/output-projection.js +11 -3
- package/dist/sdk/public-surface.json +1 -0
- package/dist/sdk/query/context.d.ts +9 -0
- package/dist/sdk/query/context.js +33 -21
- package/dist/sdk/query/get.d.ts +2 -2
- package/dist/sdk/query/get.js +4 -3
- package/dist/sdk/query/history.d.ts +11 -0
- package/dist/sdk/query/history.js +34 -10
- package/dist/sdk/query/next.d.ts +15 -1
- package/dist/sdk/query/next.js +43 -20
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/runtime-primitives.d.ts +3 -3
- package/dist/sdk/runtime-primitives.js +5 -5
- package/dist/types.d.ts +27 -0
- package/dist/types.js +2 -2
- package/docs/AGENT_ENVIRONMENTS.md +47 -0
- package/docs/AGENT_GUIDE.md +36 -0
- package/docs/AGENT_PROVENANCE_ADR.md +17 -2
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +38 -1
- package/docs/HISTORY_RECOVERY.md +146 -0
- package/docs/MERGE_SAFETY.md +119 -23
- package/docs/README.md +2 -0
- package/docs/RELEASING.md +25 -11
- package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +24 -2
- package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +24 -1
- package/docs/SDK_EXECUTION_CONTRACTS.md +105 -0
- package/docs/SDK_RUNTIME_BOUNDARIES.md +17 -1
- package/docs/TESTING.md +5 -0
- package/docs/agent-task-token-baseline.json +17 -17
- package/docs/agent-task-transcripts.json +2 -1
- package/docs/examples/sdk-agent-environment/README.md +14 -0
- package/docs/examples/sdk-agent-environment/package.json +8 -0
- package/docs/examples/sdk-agent-environment/run-agent-environment.mjs +154 -0
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +10 -10
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +12 -3
- package/marketplace.json +2 -2
- package/package.json +5 -6
- 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-claude/skills/pm-audit/SKILL.md +2 -2
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +2 -2
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +2 -2
- package/plugins/pm-claude/skills/pm-release/SKILL.md +2 -2
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +3 -3
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +2 -2
- package/plugins/pm-codex/skills/pm-native/SKILL.md +3 -4
- package/plugins/pm-codex/skills/pm-release/SKILL.md +2 -2
- package/scripts/finalize-build.mjs +13 -1
- package/dist/cli-bundle/chunks/chunk-AY324UJ5.js +0 -9
- package/dist/cli-bundle/chunks/chunk-E5RBBCXO.js +0 -230
- package/dist/cli-bundle/chunks/chunk-IEHHE6GA.js +0 -5
- package/dist/cli-bundle/chunks/chunk-L7B7343B.js +0 -8
- package/dist/cli-bundle/chunks/chunk-LISESA7W.js +0 -35
- package/dist/cli-bundle/chunks/register-operations-TTROIVC4.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3ZBI35HU.js +0 -176
- package/dist/cli-bundle/focused-chunks/chunk-4RRHC3S4.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-4WR46RMG.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-BWKHEIVF.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHCZ3YFR.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-KBLZRU62.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KZ2NB3ET.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OL5EH6I3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QKHCSUGJ.js +0 -51
- package/dist/cli-bundle/focused-chunks/chunk-TXE4TSHM.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-UCLO3XDU.js +0 -2
- package/sdk/public-surface.json +0 -32524
|
@@ -6,7 +6,7 @@ This repository supports external automation harnesses through shared docs and `
|
|
|
6
6
|
|
|
7
7
|
Use the same low-token route in every harness:
|
|
8
8
|
|
|
9
|
-
1. `pm install guide-shell --project` (enable optional local guide commands)
|
|
9
|
+
1. `pm package install guide-shell --project` (enable optional local guide commands)
|
|
10
10
|
2. `pm guide` (topic index)
|
|
11
11
|
3. `pm guide <topic>` (focused route)
|
|
12
12
|
4. `pm guide <topic> --depth standard|deep` (details only when needed)
|
package/.agents/skills/README.md
CHANGED
|
@@ -41,7 +41,7 @@ pm guide skills
|
|
|
41
41
|
pm guide harnesses --depth standard
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Guide topics: `
|
|
45
|
-
`
|
|
44
|
+
Guide topics are declared at runtime: `pm guide` prints the current index and
|
|
45
|
+
`pm guide <topic> --depth brief` expands one topic. Do not copy the list.
|
|
46
46
|
|
|
47
47
|
Compatibility routing: [Harness compatibility matrix](HARNESS_COMPATIBILITY.md)
|
|
@@ -60,6 +60,7 @@ pm files <ID> --add path=<path>,scope=project,note="<why>"
|
|
|
60
60
|
pm docs <ID> --add path=<doc>,scope=project,note="<why>"
|
|
61
61
|
pm test <ID> --add command="node scripts/run-tests.mjs test -- <target>",scope=project,timeout_seconds=240
|
|
62
62
|
pm comments <ID> "Evidence: <what changed and what passed>"
|
|
63
|
+
pm learnings <ID> --add "<lesson that outlives this item>"
|
|
63
64
|
pm test <ID> --run --progress
|
|
64
65
|
pm close <ID> "<reason with evidence>" --validate-close warn
|
|
65
66
|
pm release <ID>
|
|
@@ -76,7 +77,9 @@ enters, and use these drift-gated references:
|
|
|
76
77
|
|
|
77
78
|
`pm help` shows the bounded core tier. Use `pm guide capabilities`, `pm
|
|
78
79
|
contracts --summary`, or `pm <command> --help --json` for progressive
|
|
79
|
-
disclosure into the wider surface.
|
|
80
|
+
disclosure into the wider surface. Durable lessons and history maintenance
|
|
81
|
+
(`pm learnings`, `pm history --verify`, `history-repair`, `history-redact`,
|
|
82
|
+
`history-compact`, `close-many`) are routed by `pm guide evidence`.
|
|
80
83
|
|
|
81
84
|
## Token Discipline
|
|
82
85
|
|
|
@@ -29,6 +29,16 @@ pm docs <ID> --add path=docs/<doc>.md,scope=project,note="public docs update"
|
|
|
29
29
|
pm test <ID> --add command="node scripts/run-tests.mjs test -- tests/unit/<file>.spec.ts",scope=project,timeout_seconds=240
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
## Durable Knowledge And Record Maintenance
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pm learnings <ID> --add "<lesson that applies beyond this item>"
|
|
36
|
+
pm learnings <ID> --limit 5
|
|
37
|
+
pm history <ID> --verify --strict-exit
|
|
38
|
+
pm history-repair --all --dry-run
|
|
39
|
+
pm close-many --ids <ID>,<ID> --reason "<shared reason>" --dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
32
42
|
## Close Workflow
|
|
33
43
|
|
|
34
44
|
```bash
|
|
@@ -24,12 +24,14 @@ pm contracts --json --full | jq '.relationship_kind_contracts'
|
|
|
24
24
|
| `discovered_from` | This item was found while doing that one | no | no |
|
|
25
25
|
| `incident_from` | This item originates in that recorded incident | no | no |
|
|
26
26
|
| `supersedes` | This item replaces that one | no | no |
|
|
27
|
+
| `recurs_from` | This defect recurs from that closed one | no | no |
|
|
27
28
|
| `commits_to` | This item lands in that changeset or release | yes | no |
|
|
28
29
|
| `related` | Associative, non-directional | no | no |
|
|
29
30
|
|
|
30
31
|
`related` carries the least information. Prefer a typed kind whenever one
|
|
31
32
|
applies — `discovered_from`, `implements`, and `verifies` are the three that
|
|
32
|
-
most often replace a reflexive `related`.
|
|
33
|
+
most often replace a reflexive `related`. A defect that repeats an earlier
|
|
34
|
+
closed one gets `recurs_from`, which is what the recurrence policy joins on.
|
|
33
35
|
|
|
34
36
|
## Adding Edges
|
|
35
37
|
|
|
@@ -57,8 +57,8 @@ pm contracts --runtime-only --availability-only
|
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
pm package explore --project # inspect state first
|
|
60
|
-
pm package manage --
|
|
61
|
-
pm package doctor --detail
|
|
60
|
+
pm package manage --project
|
|
61
|
+
pm package doctor --detail summary
|
|
62
62
|
pm package install <package> --project # then mutate
|
|
63
63
|
pm contracts --command <extension-command> --flags-only
|
|
64
64
|
pm package doctor --detail deep # verify after
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
pm package explore --project
|
|
7
|
-
pm package manage --
|
|
8
|
-
pm package doctor --detail
|
|
7
|
+
pm package manage --project
|
|
8
|
+
pm package doctor --detail summary
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Install and Activate
|
|
@@ -21,7 +21,7 @@ pm package doctor --detail summary
|
|
|
21
21
|
```bash
|
|
22
22
|
pm package adopt <name> --project
|
|
23
23
|
pm package adopt-all --project
|
|
24
|
-
pm package manage --
|
|
24
|
+
pm package manage --project
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Deactivate / Uninstall
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Common Diagnostic Sequence
|
|
4
4
|
|
|
5
|
-
1. `pm
|
|
6
|
-
2. `pm
|
|
7
|
-
3. `pm
|
|
5
|
+
1. `pm package explore --project`
|
|
6
|
+
2. `pm package manage --project`
|
|
7
|
+
3. `pm package doctor --detail deep --trace`
|
|
8
8
|
4. `pm contracts --runtime-only --availability-only`
|
|
9
9
|
|
|
10
10
|
## Symptoms and Checks
|
|
@@ -86,6 +86,8 @@ the criteria; `--dep` **appends**.
|
|
|
86
86
|
| Group and count | `pm aggregate --group-by <field>` | `commands` |
|
|
87
87
|
| Lineage and ordering | `pm deps`, `pm graph <verb>` | `graph` |
|
|
88
88
|
| Recent movement | `pm activity`, `pm events`, `pm history` | `assurance` |
|
|
89
|
+
| Durable lessons and records | `pm learnings`, `pm notes`, `pm history` | `evidence` |
|
|
90
|
+
| Deadlines and meetings | `pm remind`, `pm event`, `pm meet` | `automation` |
|
|
89
91
|
| Data quality | `pm validate`, `pm health` | `assurance` |
|
|
90
92
|
| Plan a multi-step change | `pm plan` | `workflows` |
|
|
91
93
|
| Custom types and statuses | `pm schema`, `pm config` | `commands` |
|
|
@@ -89,8 +89,13 @@ Record evolution explicitly rather than letting it be inferred:
|
|
|
89
89
|
pm update <NEW> --dep "id=<OLD>,kind=supersedes"
|
|
90
90
|
pm update <FIX> --dep "id=<INCIDENT>,kind=incident_from"
|
|
91
91
|
pm update <TEST> --dep "id=<FEATURE>,kind=verifies"
|
|
92
|
+
pm update <NEW-DEFECT> --dep "id=<CLOSED-DEFECT>,kind=recurs_from"
|
|
92
93
|
```
|
|
93
94
|
|
|
95
|
+
Record the lesson where the next agent will read it, on the item that proved
|
|
96
|
+
it, with `pm learnings <ID> --add "..."`; a closed item without its learning
|
|
97
|
+
forces the next reader to rediscover it.
|
|
98
|
+
|
|
94
99
|
## Periodic Hygiene
|
|
95
100
|
|
|
96
101
|
```bash
|
|
@@ -24,12 +24,27 @@ pm comments <ID> "Owner update: <state>"
|
|
|
24
24
|
pm release <ID>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Recording Durable Knowledge
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
A comment explains this item; a learning outlives it. Record a lesson the
|
|
30
|
+
moment it is confirmed, on the item that produced it:
|
|
30
31
|
|
|
31
32
|
```bash
|
|
32
|
-
pm
|
|
33
|
-
pm
|
|
34
|
-
pm
|
|
33
|
+
pm learnings <ID> --add "<what turned out to be true and how it was proven>"
|
|
34
|
+
pm learnings <ID> --limit 5
|
|
35
|
+
pm guide evidence --depth brief
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Append-Only Collaboration Between Owners
|
|
39
|
+
|
|
40
|
+
Comments, notes, and typed dependencies append for any author on a bare
|
|
41
|
+
install; no bypass flag is needed. The review-style flags below are provided by
|
|
42
|
+
the `governance-audit` package and are refused as unknown options until it is
|
|
43
|
+
installed:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pm package install governance-audit --project
|
|
47
|
+
pm comments <ID> --add "review comment" --allow-audit-comment
|
|
48
|
+
pm notes <ID> --add "review note" --allow-audit-comment
|
|
49
|
+
pm update <ID> --dep "id=<id>,kind=discovered_from" --allow-audit-dep-update
|
|
35
50
|
```
|
|
@@ -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.9.
|
|
9
|
+
"version": "2026.9.5"
|
|
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.9.
|
|
16
|
+
"version": "2026.9.5",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.9.5 - 2026-09-05
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- pm next recommends outcome-milestone gates as actionable work, and summary.containers counts a bucket the envelope never emits ([pm-08mt4k](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-08mt4k.toon))
|
|
8
|
+
- Windows published-release verifier test can preempt its own readiness and cleanup contract ([pm-euqm7x](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-euqm7x.toon))
|
|
9
|
+
- Commander usage refusals omit token_accounting even when --token-accounting is parsed ([pm-bfa1ob](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-bfa1ob.toon))
|
|
10
|
+
- flag-invocation-parity only iterates declared flags, so 21 runtime options across 8 core commands have no flag contract ([pm-2bqgs7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-2bqgs7.toon))
|
|
11
|
+
- pm release leaves the item in_progress with no owner: offer --status open (or hint) so released work does not linger as phantom WIP ([pm-ugld](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ugld.toon))
|
|
12
|
+
- GH-1169: the unknown-command hint routes to the 15-command root help that hides the target, and test is the only singular collection verb ([pm-u4t9gp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-u4t9gp.toon))
|
|
13
|
+
- pm context summary counts are denominated in the returned slice, so the canonical orient cold-start reports 4 open items in a 291-item backlog ([pm-79gv6q](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-79gv6q.toon))
|
|
14
|
+
- GH-1171: restore parses the on-disk item before consulting history, so a zero-byte or corrupted item file with an intact stream cannot be rebuilt ([pm-96fsma](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-96fsma.toon))
|
|
15
|
+
- history-compact renumbers version identifiers, so pm get --at N and pm restore N address a different recorded state after compaction with exit 0 and no signal ([pm-m0yjtg](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-m0yjtg.toon))
|
|
16
|
+
- A deleted item's id is immediately re-mintable, so one immutable history stream can hold two unrelated items and every integrity check still reports verified ([pm-e3gn0z](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-e3gn0z.toon))
|
|
17
|
+
- Point-in-time reconstruction crashes with an unstructured runtime error when a history stream opens without a baseline entry, so the restore-any-version guarantee fails with no diagnosable condition ([pm-qw1uw6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qw1uw6.toon))
|
|
18
|
+
- Agent skills instruct flags and spellings the runtime refuses, and no guide topic routes the evidence or automation families ([pm-4957pz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-4957pz.toon))
|
|
19
|
+
- Sentry-injected release artifacts exceed the CI package budget because pre- and post-injection packlists share one ceiling ([pm-llbnua](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-llbnua.toon))
|
|
20
|
+
- GH-1190: Windows nightly can publish the event index after an unlocked fallback append ([pm-a7207g](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-a7207g.toon))
|
|
21
|
+
- Tag-push Release must regenerate the exact-tag changelog before immutable publication ([pm-e63v1x](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-e63v1x.toon))
|
|
22
|
+
|
|
23
|
+
### Other
|
|
24
|
+
|
|
25
|
+
- Upgrade Greptile review tooling to 3.5.0 with compatible dependency evidence ([pm-o3mczz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-o3mczz.toon))
|
|
26
|
+
- Point-in-time reconstruction gate: prove every item at every recorded version replays exactly from its history stream alone ([pm-wlqxg3](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-wlqxg3.toon))
|
|
27
|
+
- Refresh compatible jscpd 5.1.2 and reconcile the 2026-09-04 dependency census ([pm-gredf1](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-gredf1.toon))
|
|
28
|
+
|
|
29
|
+
## 2026.9.4 - 2026-09-04
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Verdict contract: one declared vocabulary of reproducible predicates over recorded state, composable into a score, with reward shaping explicitly refused ([pm-e1vkee](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-e1vkee.toon))
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Packed npx smoke timeout rejects valid slow dependency reification ([pm-8eebb6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-8eebb6.toon))
|
|
38
|
+
- GH-1186: unrecoverable legacy merge-receipt references block strict health with diagnostic-only remediation ([pm-cf4t42](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-cf4t42.toon))
|
|
39
|
+
- GH-1185: hash-only merge receipts make discarded scalar values unreachable to the reviewing agent ([pm-mg13iz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mg13iz.toon))
|
|
40
|
+
- GH-1184: scalar merge conflict ordering ignores recency and requested preference ([pm-7wzb6d](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-7wzb6d.toon))
|
|
41
|
+
- Acceptance criteria are documented as merging like tags but are stored as one delimiter-joined scalar, so concurrent criteria additions from different branches are silently discarded ([pm-inn5y5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-inn5y5.toon))
|
|
42
|
+
- GH-1183: Windows nightly event-index lock acquisition and fallback publication are nondeterministic ([pm-fqlocp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-fqlocp.toon))
|
|
43
|
+
- GH-1177: Claude session provenance path is derived from invocation cwd instead of the session-start workspace ([pm-l7m7k5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-l7m7k5.toon))
|
|
44
|
+
- GH-1179: legacy merge-receipt shape is misclassified as a gate-failing missing history reference with no remedy ([pm-wn3ee5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-wn3ee5.toon))
|
|
45
|
+
- Re-anchoring overwrites the original hash pair, so the immutability proof for every pre-merge entry is destroyed by the operation that repairs the chain ([pm-aka8m7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-aka8m7.toon))
|
|
46
|
+
|
|
47
|
+
### Security
|
|
48
|
+
|
|
49
|
+
- GH-1178: history hashes exclude record author and agent provenance, so attribution can be rewritten without detection ([pm-javbsq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-javbsq.toon))
|
|
50
|
+
|
|
51
|
+
### Other
|
|
52
|
+
|
|
53
|
+
- Refresh compatible @types/node 26.4.1 patch ([pm-vwtwqj](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-vwtwqj.toon))
|
|
54
|
+
|
|
3
55
|
## 2026.9.3 - 2026-09-03
|
|
4
56
|
|
|
5
57
|
### Fixed
|
|
@@ -11,6 +11,8 @@ import type { ExtensionCommandHelpDescriptor } from "./extension-command-help.js
|
|
|
11
11
|
export declare const BUILTIN_TYPE_HELP_VALUES: string;
|
|
12
12
|
/** Documents the commander usage context payload exchanged by command, SDK, and package integrations. */
|
|
13
13
|
export interface CommanderUsageContext extends CommanderGuidanceContext {
|
|
14
|
+
/** Normalized invocation retained for recovery and transport accounting. */
|
|
15
|
+
normalizedInvocationArgs: string[];
|
|
14
16
|
/** Human-readable explanation suitable for logs and agent-facing output. */
|
|
15
17
|
message: string;
|
|
16
18
|
/** Value that configures or reports command name for this contract. */
|
|
@@ -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]="18758585-648f-5422-80e4-fbc7478c3cf3")}catch(e){}}();
|
|
3
3
|
import { pathExists, resolveItemTypeRegistry, EXIT_CODE, getSettingsPath, resolvePmRoot, readSettings, getActiveExtensionRegistrations, locateItem, runActiveServiceOverride, levenshteinDistanceWithinLimit, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { BUILTIN_ITEM_TYPE_VALUES } from "../types/index.js";
|
|
5
5
|
import { PM_CORE_COMMAND_NAMES, resolveSubcommandFlagContractsForCommand, } from "../sdk/cli-contracts.js";
|
|
@@ -11,6 +11,7 @@ import { extractProvidedOptionFlags, normalizeLongFlag, renderPmCommand, } from
|
|
|
11
11
|
import { normalizeExtensionNameForMatch } from "./commands/extension/shared.js";
|
|
12
12
|
import { rankCommandPaths } from "../sdk/agent/command-suggestions.js";
|
|
13
13
|
import { renderMissingOptionRetry } from "../sdk/agent/command-recovery.js";
|
|
14
|
+
import { attachOutputTokenAccounting } from "../sdk/output-token-accounting.js";
|
|
14
15
|
/** Supported values accepted by the builtin type help contract. */
|
|
15
16
|
export const BUILTIN_TYPE_HELP_VALUES = BUILTIN_ITEM_TYPE_VALUES.join("|");
|
|
16
17
|
const OPTIONAL_PACKAGE_INSTALL_HINTS = {
|
|
@@ -91,8 +92,9 @@ export function appendCommanderExtensionFailures(renderedUsage, json, failures)
|
|
|
91
92
|
}
|
|
92
93
|
if (json) {
|
|
93
94
|
const primaryFailure = failures.find((entry) => entry.declared_command_match === true);
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
const { token_accounting: priorAccounting, ...usage } = JSON.parse(renderedUsage);
|
|
96
|
+
const enriched = {
|
|
97
|
+
...usage,
|
|
96
98
|
...(primaryFailure
|
|
97
99
|
? {
|
|
98
100
|
extension_command_failure: {
|
|
@@ -105,7 +107,8 @@ export function appendCommanderExtensionFailures(renderedUsage, json, failures)
|
|
|
105
107
|
}
|
|
106
108
|
: {}),
|
|
107
109
|
failed_extensions: failures,
|
|
108
|
-
}
|
|
110
|
+
};
|
|
111
|
+
return JSON.stringify(priorAccounting === undefined ? enriched : attachOutputTokenAccounting(enriched, (value) => `${JSON.stringify(value, null, 2)}\n`), null, 2);
|
|
109
112
|
}
|
|
110
113
|
const details = failures
|
|
111
114
|
.map((entry) => `- ${entry.layer}:${entry.name}: ${entry.error}`)
|
|
@@ -435,9 +438,9 @@ function resolveUnknownCommandFallbacks(commandPaths) {
|
|
|
435
438
|
function buildUnknownCommandExamples(suggestedPaths, hasConcreteCandidates) {
|
|
436
439
|
const suggestedExamples = suggestedPaths.map((path) => `pm ${path} --help`);
|
|
437
440
|
if (hasConcreteCandidates) {
|
|
438
|
-
return [...new Set([...suggestedExamples, "pm --help"])];
|
|
441
|
+
return [...new Set([...suggestedExamples, "pm --help --all"])];
|
|
439
442
|
}
|
|
440
|
-
return [...new Set(["pm --help", ...suggestedExamples])];
|
|
443
|
+
return [...new Set(["pm --help --all", ...suggestedExamples])];
|
|
441
444
|
}
|
|
442
445
|
/** Implements build unknown command guidance from runtime for the public runtime surface of this module. */
|
|
443
446
|
export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensionDescriptors) {
|
|
@@ -473,7 +476,7 @@ export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensi
|
|
|
473
476
|
unknownCommandExamples: examples,
|
|
474
477
|
unknownCommandNextSteps: [
|
|
475
478
|
...(didYouMean ? [didYouMean] : []),
|
|
476
|
-
'Run "pm --help" to list
|
|
479
|
+
'Run "pm --help --all" to list every command available in this runtime, including active extensions.',
|
|
477
480
|
"Use one of the suggested command paths above with --help to inspect valid flags and usage.",
|
|
478
481
|
...(optionalPackageHint ? [optionalPackageHint] : []),
|
|
479
482
|
],
|
|
@@ -528,11 +531,9 @@ export function isKnownHelpCommandPath(root, commandPathTokens) {
|
|
|
528
531
|
for (const [tokenIndex, token] of commandPathTokens.entries()) {
|
|
529
532
|
const next = resolveChildCommandByToken(current, token);
|
|
530
533
|
if (!next) {
|
|
531
|
-
if (current.commands.some((candidate) => candidate.name() !== "help")) {
|
|
532
|
-
return false;
|
|
533
|
-
}
|
|
534
534
|
const declaredArguments = current.registeredArguments;
|
|
535
535
|
return (declaredArguments.length > 0 &&
|
|
536
|
+
(current.commands.length === 0 || declaredArguments[0]?.required === true) &&
|
|
536
537
|
(declaredArguments.at(-1)?.variadic === true ||
|
|
537
538
|
commandPathTokens.length - tokenIndex <= declaredArguments.length));
|
|
538
539
|
}
|
|
@@ -756,7 +757,9 @@ export async function formatCommanderUsageJson(error, rootProgram, extensionDesc
|
|
|
756
757
|
verifiedCollectionItemId: usageContext.verifiedCollectionItemId,
|
|
757
758
|
failedExtensions: usageContext.failedExtensions,
|
|
758
759
|
});
|
|
759
|
-
|
|
760
|
+
const projected = lean ? projectLeanErrorEnvelope(envelope) : envelope;
|
|
761
|
+
const accountingRequested = parseBootstrapGlobalOptions(usageContext.normalizedInvocationArgs).tokenAccounting === true;
|
|
762
|
+
return JSON.stringify(accountingRequested ? attachOutputTokenAccounting(projected, (value) => `${JSON.stringify(value, null, 2)}\n`) : projected, null, 2);
|
|
760
763
|
}
|
|
761
764
|
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
762
765
|
export const _testOnly = {
|
|
@@ -767,4 +770,4 @@ export const _testOnly = {
|
|
|
767
770
|
suggestNearestLongFlags,
|
|
768
771
|
};
|
|
769
772
|
//# sourceMappingURL=commander-usage.js.map
|
|
770
|
-
//# debugId=
|
|
773
|
+
//# debugId=18758585-648f-5422-80e4-fbc7478c3cf3
|
|
@@ -1,14 +1,15 @@
|
|
|
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]="e4324332-da8f-5ae1-b0e3-b6d0e9674f98")}catch(e){}}();
|
|
3
3
|
import { hasSubcommandFlagContractsForCommand, PM_COMMAND_ALIAS_CONTRACTS, PM_CORE_COMMAND_NAMES, } from "../sdk/cli-contracts.js";
|
|
4
|
-
import { commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveTypeDefinition, EXIT_CODE,
|
|
4
|
+
import { commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveTypeDefinition, EXIT_CODE, writeStderr, writeStdout, } from "../sdk/runtime-primitives.js";
|
|
5
5
|
import { buildDynamicExtensionHelpOptionSummaries, mergeHelpOptionSummaries, findCommandByPath, findDirectChildCommand, commandAliases, } from "./extension-command-help.js";
|
|
6
6
|
import { getPmCommandHelpVisibilityTier, isFullHelpDiscovery, normalizeHelpCommandPath, resolveHelpDetailMode, resolveHelpNarrative, } from "./help-content.js";
|
|
7
7
|
import { getCommandPath } from "./registration-helpers.js";
|
|
8
8
|
import { parseBootstrapGlobalOptions, parseBootstrapHelpRequest, parseBootstrapCommandName, parseBootstrapTypeValue, } from "./bootstrap-args.js";
|
|
9
9
|
import { extractProvidedOptionFlags, renderPmCommand } from "./argv-utils.js";
|
|
10
10
|
import { formatCommanderErrorForJson } from "./error-guidance.js";
|
|
11
|
-
import { BUILTIN_TYPE_HELP_VALUES, buildUnknownCommandGuidanceFromRuntime, } from "./commander-usage.js";
|
|
11
|
+
import { BUILTIN_TYPE_HELP_VALUES, buildUnknownCommandGuidanceFromRuntime, isKnownHelpCommandPath, } from "./commander-usage.js";
|
|
12
|
+
import { attachOutputTokenAccounting } from "../sdk/output-token-accounting.js";
|
|
12
13
|
import { resolveCreateExplicitEmptyFlag } from "../sdk/agent/create-option-policy.js";
|
|
13
14
|
import { formatPmPositionalActionFlagTip, PM_POSITIONAL_ACTION_CONTRACTS, resolvePmPositionalActionContract, } from "../sdk/cli-contracts/grammar-contracts.js";
|
|
14
15
|
import { resolvePmCommandCapabilityFamily, resolvePmCommandVisibilityTier, } from "../sdk/agent-capability-contracts.js";
|
|
@@ -49,7 +50,8 @@ function resolveCommandFromPathTokens(root, pathTokens) {
|
|
|
49
50
|
const requestedPath = pathTokens.join(" ");
|
|
50
51
|
if (!PM_CORE_COMMAND_NAMES.some((commandName) => commandName === requestedPath) &&
|
|
51
52
|
!hasSubcommandFlagContractsForCommand(requestedPath) &&
|
|
52
|
-
!resolvePmPositionalActionContract(requestedPath)
|
|
53
|
+
!resolvePmPositionalActionContract(requestedPath) &&
|
|
54
|
+
!isKnownHelpCommandPath(root, pathTokens)) {
|
|
53
55
|
return null;
|
|
54
56
|
}
|
|
55
57
|
for (let length = pathTokens.length - 1; length > 0; length -= 1) {
|
|
@@ -352,7 +354,7 @@ function buildJsonHelpPayload(rootProgram, targetCommand, argv, requestedPath, e
|
|
|
352
354
|
? requestedCommandPath
|
|
353
355
|
: commanderPath;
|
|
354
356
|
const positionalAction = resolvePmPositionalActionContract(resolvedPath);
|
|
355
|
-
const projectedPath = positionalAction?.command ??
|
|
357
|
+
const projectedPath = positionalAction?.command ?? commanderPath;
|
|
356
358
|
const commandPath = projectedPath.length > 0 ? projectedPath : undefined;
|
|
357
359
|
const rootCommandPath = commandPath?.split(" ")[0];
|
|
358
360
|
const fallbackNarrative = resolveHelpNarrative(commandPath, detailMode);
|
|
@@ -413,7 +415,10 @@ export async function maybeRenderBootstrapJsonHelp(rootProgram, argv, extensionD
|
|
|
413
415
|
normalizedInvocationArgs: [...argv],
|
|
414
416
|
providedOptionFlags: extractProvidedOptionFlags(argv),
|
|
415
417
|
});
|
|
416
|
-
|
|
418
|
+
const output = bootstrapGlobal.tokenAccounting
|
|
419
|
+
? attachOutputTokenAccounting(envelope, (value) => `${JSON.stringify(value, null, 2)}\n`)
|
|
420
|
+
: envelope;
|
|
421
|
+
writeStderr(`${JSON.stringify(output, null, 2)}\n`);
|
|
417
422
|
}
|
|
418
423
|
process.exitCode = EXIT_CODE.USAGE;
|
|
419
424
|
return true;
|
|
@@ -563,4 +568,4 @@ export const _testOnly = {
|
|
|
563
568
|
resolveExtensionCommandSurface,
|
|
564
569
|
};
|
|
565
570
|
//# sourceMappingURL=help-json-payload.js.map
|
|
566
|
-
//# debugId=
|
|
571
|
+
//# debugId=e4324332-da8f-5ae1-b0e3-b6d0e9674f98
|
package/dist/cli/main.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
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]="aefde24d-ee93-53ac-9163-86c867d1eb78")}catch(e){}}();
|
|
7
7
|
import { Command, CommanderError } from "commander";
|
|
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";
|
|
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, writeStderr, 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 { runWithReproducibleProcessEnvironment } from "../sdk/reproducibility/process.js";
|
|
10
10
|
import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
|
|
11
11
|
import { createExtensionCommandSdk } from "../sdk/extension-command-context.js";
|
|
@@ -2168,7 +2168,10 @@ async function handleRunPmCliKnownError(context, numericExitCode) {
|
|
|
2168
2168
|
const renderedError = context.jsonErrors
|
|
2169
2169
|
? JSON.stringify(context.bootstrapGlobal.tokenAccounting ? attachOutputTokenAccounting(jsonErrorPayload, (value) => `${JSON.stringify(value, null, 2)}\n`) : jsonErrorPayload, null, 2)
|
|
2170
2170
|
: formatPmCliErrorForDisplay(errorMessage, enrichedContext);
|
|
2171
|
-
|
|
2171
|
+
if (context.jsonErrors)
|
|
2172
|
+
writeStderr(`${renderedError}\n`);
|
|
2173
|
+
else
|
|
2174
|
+
printError(renderedError);
|
|
2172
2175
|
const { errorCategory, commandResolution } = await context.emitTelemetryCommandError({
|
|
2173
2176
|
command: context.attemptedCommand,
|
|
2174
2177
|
errorCode: classification.code,
|
|
@@ -2254,7 +2257,10 @@ async function handleUnknownHelpCommandError(context, code) {
|
|
|
2254
2257
|
commandResolution,
|
|
2255
2258
|
resolutionStage: "parse",
|
|
2256
2259
|
});
|
|
2257
|
-
|
|
2260
|
+
if (context.jsonErrors)
|
|
2261
|
+
writeStderr(`${renderedUsage}\n`);
|
|
2262
|
+
else
|
|
2263
|
+
printError(renderedUsage);
|
|
2258
2264
|
if (loggedHandledErrorToSentry) {
|
|
2259
2265
|
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2260
2266
|
}
|
|
@@ -2318,7 +2324,10 @@ async function handleRunPmCliCommanderUsageError(context, code) {
|
|
|
2318
2324
|
commandResolution,
|
|
2319
2325
|
resolutionStage: "parse",
|
|
2320
2326
|
});
|
|
2321
|
-
|
|
2327
|
+
if (context.jsonErrors)
|
|
2328
|
+
writeStderr(`${renderedUsage}\n`);
|
|
2329
|
+
else
|
|
2330
|
+
printError(renderedUsage);
|
|
2322
2331
|
if (loggedHandledErrorToSentry) {
|
|
2323
2332
|
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
2324
2333
|
}
|
|
@@ -2561,4 +2570,4 @@ export const _testOnly = {
|
|
|
2561
2570
|
wrapThrownErrorForSentry,
|
|
2562
2571
|
};
|
|
2563
2572
|
//# sourceMappingURL=main.js.map
|
|
2564
|
-
//# debugId=
|
|
2573
|
+
//# debugId=aefde24d-ee93-53ac-9163-86c867d1eb78
|
|
@@ -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]="7b6e80ad-a85b-5539-8f47-02bfad799cdb")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE, PmCliError, readSettings, renderRowsAsCsv, renderRowsAsTable, resolvePmRoot, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } from "../sdk/cli-contracts.js";
|
|
5
5
|
import { EVAL_QUERY_SET_SCHEMA_ID } from "../sdk/eval.js";
|
|
@@ -762,6 +762,8 @@ export function registerListQueryCommands(program, options) {
|
|
|
762
762
|
.option("--blocked-limit <n>", "Limit blocked rows (default: same as --limit)")
|
|
763
763
|
.option("--ready-only", "Omit the blocked companion list")
|
|
764
764
|
.option("--include-decisions", "Include human-gated Decision items in the claimable ready queue")
|
|
765
|
+
.option("--include-gates", "Include outcome gates in the ready queue")
|
|
766
|
+
.option("--include-containers", "Include containers with unfinished descendants in the ready queue")
|
|
765
767
|
.option("--format <value>", "Next output format override: markdown|toon|json")
|
|
766
768
|
.option("--explain-ranking", "Include the scorer model, per-signal contributions, and ranked ready ids")
|
|
767
769
|
.option("--token-budget <n>", "Maximum estimated tokens spent on the ranked ready queue");
|
|
@@ -939,4 +941,4 @@ export const _testOnlyRegisterListQuery = {
|
|
|
939
941
|
parseListFormat,
|
|
940
942
|
};
|
|
941
943
|
//# sourceMappingURL=register-list-query.js.map
|
|
942
|
-
//# debugId=
|
|
944
|
+
//# debugId=7b6e80ad-a85b-5539-8f47-02bfad799cdb
|
|
@@ -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]="c9d736d1-58bf-5088-aaae-0b89ad61d41f")}catch(e){}}();
|
|
3
3
|
import { resolveBodyFileContent, resolveCliBulkIdsInput, EXIT_CODE, splitCommaList, PmCliError, createUnknownSubcommandError, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, MERGE_SUBCOMMAND_VALUES, PLAN_CREATE_METADATA_PARAMETER_KEYS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, } from "../sdk/cli-contracts.js";
|
|
5
5
|
import { BUILTIN_ITEM_TYPE_VALUES, PLAN_STEP_LINK_KIND_VALUES, } from "../types/index.js";
|
|
@@ -1717,6 +1717,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
|
|
|
1717
1717
|
program
|
|
1718
1718
|
.command("history-repair")
|
|
1719
1719
|
.argument("[id]", "Item id (omit with --all)")
|
|
1720
|
+
.option("--salvage-tail", "Recover invalid tail; requires verified prefix")
|
|
1720
1721
|
.option("--all", "Scan every stream for drift and repair each drifted stream in one audited pass")
|
|
1721
1722
|
.option("--dry-run", "Preview the re-anchor impact without writing the history file")
|
|
1722
1723
|
.option("--normalize-provenance", "Remove invalid provenance; return aggregate-only evidence")
|
|
@@ -1735,6 +1736,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
|
|
|
1735
1736
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
1736
1737
|
force: Boolean(options.force),
|
|
1737
1738
|
normalizeProvenance: options.normalizeProvenance === true,
|
|
1739
|
+
salvageTail: options.salvageTail === true,
|
|
1738
1740
|
};
|
|
1739
1741
|
// history-repair only re-anchors the audit stream; item content is untouched,
|
|
1740
1742
|
// so search caches do not need invalidation.
|
|
@@ -1889,4 +1891,4 @@ export function registerMutationCommands(program, registrationOptions = {}) {
|
|
|
1889
1891
|
.action(runDepsAction);
|
|
1890
1892
|
}
|
|
1891
1893
|
//# sourceMappingURL=register-mutation.js.map
|
|
1892
|
-
//# debugId=
|
|
1894
|
+
//# debugId=c9d736d1-58bf-5088-aaae-0b89ad61d41f
|
|
@@ -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]="4528cd9c-39e7-5d88-8e76-e7dec97c366a")}catch(e){}}();
|
|
3
3
|
import { resolveRuntimeStatusRegistry, setActiveCommandResult, EXIT_CODE, PmCliError, createUnknownSubcommandError, resolveAuthor, resolvePmRoot, readSettings, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { resolveStartTaskInProgressStatus } from "../sdk/start-task-status.js";
|
|
5
5
|
import { parseStatsAnalyticsJson } from "./stats-analytics-json.js";
|
|
@@ -491,6 +491,8 @@ async function runClaimAction(id, options, command) {
|
|
|
491
491
|
sprint: typeof options.sprint === "string" ? options.sprint : undefined,
|
|
492
492
|
release: typeof options.release === "string" ? options.release : undefined,
|
|
493
493
|
includeDecisions: options.includeDecisions === true,
|
|
494
|
+
includeGates: options.includeGates === true,
|
|
495
|
+
includeContainers: options.includeContainers === true,
|
|
494
496
|
tokenBudget: (options.tokenBudget ?? options.token_budget),
|
|
495
497
|
explainRanking: options.explainRanking === true ||
|
|
496
498
|
options.explain_ranking === true,
|
|
@@ -765,6 +767,8 @@ export function registerOperationCommands(program) {
|
|
|
765
767
|
.option("--release <value>", "Filter --next candidates by release")
|
|
766
768
|
.option("--max-attempts <n>", "Bound the --next candidate walk (default 10; maximum 100)")
|
|
767
769
|
.option("--include-decisions", "Allow --next to claim human-gated Decision items")
|
|
770
|
+
.option("--include-gates", "Allow --next to claim outcome gates")
|
|
771
|
+
.option("--include-containers", "Allow --next to claim containers with unfinished descendants")
|
|
768
772
|
.option("--token-budget <n>", "Bound the estimated tokens used to rank --next candidates")
|
|
769
773
|
.option("--explain-ranking", "Include ranking provenance for --next selection")
|
|
770
774
|
.description("Claim an item for active work.")
|
|
@@ -909,4 +913,4 @@ function registerSchedulingShortcutCommands(program) {
|
|
|
909
913
|
});
|
|
910
914
|
}
|
|
911
915
|
//# sourceMappingURL=register-operations.js.map
|
|
912
|
-
//# debugId=
|
|
916
|
+
//# debugId=4528cd9c-39e7-5d88-8e76-e7dec97c366a
|