@unbrained/pm-cli 2026.9.17 → 2026.9.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.
Files changed (157) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +49 -0
  3. package/dist/cli/invocation-profile.d.ts +26 -0
  4. package/dist/cli/invocation-profile.js +3 -0
  5. package/dist/cli/register-operations.js +1 -1
  6. package/dist/cli-bundle/bundle-manifest.json +149 -149
  7. package/dist/cli-bundle/chunks/{chunk-LD2FH2YE.js → chunk-7CN53F4S.js} +2 -2
  8. package/dist/cli-bundle/chunks/chunk-AACGU5IA.js +3 -0
  9. package/dist/cli-bundle/chunks/{chunk-Q6KPZGMP.js → chunk-CCLWCESZ.js} +2 -2
  10. package/dist/cli-bundle/chunks/{chunk-T526C5DX.js → chunk-J7NP7QLW.js} +2 -2
  11. package/dist/cli-bundle/chunks/{chunk-UF75LUAK.js → chunk-K4VAU4HU.js} +63 -63
  12. package/dist/cli-bundle/chunks/chunk-KHN4NMKT.js +238 -0
  13. package/dist/cli-bundle/chunks/{chunk-YZXB4XGA.js → chunk-KYG2QKNY.js} +29 -29
  14. package/dist/cli-bundle/chunks/{chunk-CPFBDM53.js → chunk-OQS2Y6VN.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-G2IJF244.js → chunk-QA4GUEKJ.js} +20 -20
  16. package/dist/cli-bundle/chunks/chunk-QTHR3LXF.js +20 -0
  17. package/dist/cli-bundle/chunks/{chunk-5ZY4WE3F.js → chunk-RVMDPIGD.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-WASMH647.js +8 -0
  19. package/dist/cli-bundle/chunks/{register-list-query-ISM35VIX.js → register-list-query-RMZNHSII.js} +2 -2
  20. package/dist/cli-bundle/chunks/{register-mutation-KHMBJJS6.js → register-mutation-HJGSGX3H.js} +2 -2
  21. package/dist/cli-bundle/chunks/register-operations-LBEMFUMM.js +2 -0
  22. package/dist/cli-bundle/chunks/{register-setup-YAURJMY5.js → register-setup-MU557JAA.js} +2 -2
  23. package/dist/cli-bundle/focused-chunks/{chunk-G4TKJZ4A.js → chunk-5SZ4JSPZ.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/{chunk-NOK652OP.js → chunk-7Y7PAC56.js} +2 -2
  25. package/dist/cli-bundle/focused-chunks/{chunk-5KYHDFDN.js → chunk-ARK4FIO4.js} +3 -3
  26. package/dist/cli-bundle/focused-chunks/{chunk-LNM3BS45.js → chunk-CJ4QA4RW.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/chunk-I32L3FWW.js +12 -0
  28. package/dist/cli-bundle/focused-chunks/{chunk-267N774W.js → chunk-I4WDON3K.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/{chunk-7ZC4CKOX.js → chunk-IKPR4VVN.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/chunk-J3GN4SQT.js +2 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-GKSAMNBG.js → chunk-OOZHQFBF.js} +16 -16
  32. package/dist/cli-bundle/focused-chunks/{chunk-JZSLDLR4.js → chunk-P4BA7OX7.js} +27 -26
  33. package/dist/cli-bundle/focused-chunks/chunk-QL4MO5M2.js +30 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-TDHVROGL.js +3 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-V3YMNAO7.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-YDFEWXXZ.js +59 -0
  37. package/dist/cli-bundle/focused-chunks/{chunk-WUMGGQYN.js → chunk-ZDBKYZFE.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-BFUXTNZU.js → chunk-ZI2YBJFH.js} +2 -2
  39. package/dist/cli-bundle/main.js +2 -2
  40. package/dist/cli-bundle/sdk-authoring.js +1 -1
  41. package/dist/cli-bundle/sdk-contracts.js +2 -2
  42. package/dist/cli-bundle/sdk-core.js +25 -25
  43. package/dist/cli-bundle/sdk-governance.js +1 -1
  44. package/dist/cli-bundle/sdk-graph.js +1 -1
  45. package/dist/cli-bundle/sdk-merge.js +41 -41
  46. package/dist/cli-bundle/sdk-query.js +1 -1
  47. package/dist/cli-bundle/sdk-runtime.js +1 -1
  48. package/dist/cli-bundle/sdk-testing.js +1 -1
  49. package/dist/cli-bundle/sdk.js +8 -8
  50. package/dist/cli.js +1 -1
  51. package/dist/core/checkpoint/mutation-checkpoint.d.ts +1 -1
  52. package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
  53. package/dist/core/config/nested-settings.js +1 -1
  54. package/dist/core/fs/atomic-create.d.ts +7 -0
  55. package/dist/core/fs/atomic-create.js +2 -0
  56. package/dist/core/history/history.js +1 -1
  57. package/dist/core/schema/runtime-schema.d.ts +1 -1
  58. package/dist/core/schema/runtime-schema.js +2 -2
  59. package/dist/core/session/session-state.js +1 -1
  60. package/dist/core/shared/secret-rules.d.ts +110 -0
  61. package/dist/core/shared/secret-rules.js +2 -0
  62. package/dist/core/store/settings-concurrency.d.ts +7 -0
  63. package/dist/core/store/settings-concurrency.js +2 -0
  64. package/dist/core/store/settings.d.ts +8 -1
  65. package/dist/core/store/settings.js +3 -2
  66. package/dist/mcp/server.d.ts +4 -0
  67. package/dist/mcp/server.js +1 -1
  68. package/dist/sdk/cli-contracts/command-aliases.js +1 -1
  69. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  70. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  71. package/dist/sdk/cli-program.js +1 -1
  72. package/dist/sdk/context-intent-contracts.js +1 -1
  73. package/dist/sdk/context-relevance.js +1 -1
  74. package/dist/sdk/contracts.d.ts +1 -0
  75. package/dist/sdk/contracts.js +1 -1
  76. package/dist/sdk/extension/install-runtime.d.ts +1 -1
  77. package/dist/sdk/extension/install-runtime.js +2 -2
  78. package/dist/sdk/governance/health.js +1 -1
  79. package/dist/sdk/governance/provenance-health.d.ts +27 -0
  80. package/dist/sdk/governance/provenance-health.js +1 -1
  81. package/dist/sdk/graph/index.d.ts +1 -0
  82. package/dist/sdk/graph/index.js +1 -1
  83. package/dist/sdk/graph/query-contracts.d.ts +18 -0
  84. package/dist/sdk/graph/query-contracts.js +2 -0
  85. package/dist/sdk/graph/run.d.ts +2 -0
  86. package/dist/sdk/graph/run.js +1 -1
  87. package/dist/sdk/graph/traversal.js +1 -1
  88. package/dist/sdk/guide-topics.js +1 -1
  89. package/dist/sdk/lifecycle/event-validation-messages.d.ts +1 -1
  90. package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
  91. package/dist/sdk/lifecycle-policy.js +1 -1
  92. package/dist/sdk/mutation-guard.d.ts +8 -1
  93. package/dist/sdk/mutation-guard.js +1 -1
  94. package/dist/sdk/public-surface.json +1 -1
  95. package/dist/sdk/query/next-ready-budget.d.ts +20 -0
  96. package/dist/sdk/query/next-ready-budget.js +2 -0
  97. package/dist/sdk/query/next.d.ts +7 -2
  98. package/dist/sdk/query/next.js +1 -1
  99. package/dist/sdk/read-output-budget.d.ts +3 -1
  100. package/dist/sdk/read-output-budget.js +1 -1
  101. package/dist/sdk/read-output-contracts.js +1 -1
  102. package/dist/sdk/read-output-session.js +1 -1
  103. package/dist/sdk/test/execution.d.ts +6 -5
  104. package/dist/sdk/test/execution.js +2 -2
  105. package/dist/sdk/test/json-path.d.ts +11 -0
  106. package/dist/sdk/test/json-path.js +2 -0
  107. package/docs/BUILD_AND_RELEASE_ACCEPTANCE.md +66 -0
  108. package/docs/MCP_OPTION_CONFORMANCE.md +41 -0
  109. package/docs/MUTATION_INTEGRITY.md +36 -4
  110. package/docs/NEXT_SELECTION_BUDGETS.md +93 -0
  111. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +18 -2
  112. package/docs/PACKED_FIRST_RUN.md +8 -4
  113. package/docs/PERFORMANCE.md +37 -0
  114. package/docs/README.md +2 -0
  115. package/docs/READ_OUTPUT_CONTRACTS.md +8 -4
  116. package/docs/SDK_AGENT_SESSION_CONTEXT.md +28 -4
  117. package/docs/SDK_LIFECYCLE.md +16 -2
  118. package/docs/WORKSPACE_CONCURRENCY.md +67 -0
  119. package/docs/agent-task-token-baseline.json +7 -7
  120. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  121. package/docs/generated/AGENT_COMMAND_SURFACE.md +3 -0
  122. package/docs/generated/FLAG_LEXICON_BUDGETS.md +3 -0
  123. package/marketplace.json +2 -2
  124. package/package.json +11 -9
  125. package/packages/pm-beads/package.json +1 -1
  126. package/packages/pm-calendar/README.md +43 -2
  127. package/packages/pm-calendar/extensions/calendar/command-definitions.ts +52 -0
  128. package/packages/pm-calendar/extensions/calendar/index.ts +2 -0
  129. package/packages/pm-calendar/extensions/calendar/manifest.json +3 -3
  130. package/packages/pm-calendar/extensions/calendar/shortcuts.ts +15 -0
  131. package/packages/pm-calendar/package.json +1 -1
  132. package/packages/pm-command-kit/package.json +1 -1
  133. package/packages/pm-digital-twin/package.json +1 -1
  134. package/packages/pm-governance-audit/package.json +1 -1
  135. package/packages/pm-guide-shell/package.json +1 -1
  136. package/packages/pm-kanban/package.json +1 -1
  137. package/packages/pm-lifecycle-hooks/package.json +1 -1
  138. package/packages/pm-linked-test-adapters/package.json +1 -1
  139. package/packages/pm-search-advanced/package.json +1 -1
  140. package/packages/pm-templates/package.json +1 -1
  141. package/packages/pm-todos/package.json +1 -1
  142. package/packages/pm-vcs/package.json +1 -1
  143. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  144. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  145. package/scripts/build-lease.mjs +43 -0
  146. package/scripts/build.mjs +40 -0
  147. package/dist/cli-bundle/chunks/chunk-C3MFMGCR.js +0 -20
  148. package/dist/cli-bundle/chunks/chunk-DN2RIHRN.js +0 -3
  149. package/dist/cli-bundle/chunks/chunk-E67MIO3Z.js +0 -8
  150. package/dist/cli-bundle/chunks/chunk-UJSB6NO6.js +0 -237
  151. package/dist/cli-bundle/chunks/register-operations-HHDROJD6.js +0 -2
  152. package/dist/cli-bundle/focused-chunks/chunk-5FSGN4MP.js +0 -12
  153. package/dist/cli-bundle/focused-chunks/chunk-7S7XWMXC.js +0 -2
  154. package/dist/cli-bundle/focused-chunks/chunk-IVWUQE7T.js +0 -59
  155. package/dist/cli-bundle/focused-chunks/chunk-OCTTDZOU.js +0 -3
  156. package/dist/cli-bundle/focused-chunks/chunk-OWDDVMAP.js +0 -2
  157. package/dist/cli-bundle/focused-chunks/chunk-Z4PWEIMX.js +0 -30
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-governance-audit",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for governance audit and normalization workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-guide-shell",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for guide and shell completion workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-kanban",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm archetype package: a complete Kanban continuous-flow profile built on public SDK primitives.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-lifecycle-hooks",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package demonstrating safe lifecycle hook registration.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-linked-test-adapters",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for optional linked-test run management adapters and reporters.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-search-advanced",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for semantic, hybrid, and reindex search workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-templates",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for reusable create templates.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-todos",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for Todo markdown import and export.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-vcs-sdk-exemplar",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Beyond-PM exemplar: a VCS-style changeset workflow built entirely on public pm SDK and extension primitives.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pm-claude",
3
3
  "description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
4
- "version": "2026.9.17",
4
+ "version": "2026.9.19",
5
5
  "author": {
6
6
  "name": "unbrained",
7
7
  "url": "https://github.com/unbraind/pm-cli"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pm-codex",
3
- "version": "2026.9.17",
3
+ "version": "2026.9.19",
4
4
  "description": "Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.",
5
5
  "author": {
6
6
  "name": "unbrained",
@@ -0,0 +1,43 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { mkdir, readFile, realpath, rm, writeFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { setTimeout as delay } from "node:timers/promises";
5
+
6
+ /**
7
+ * Hold an exclusive checkout lease through a complete producer or consumer.
8
+ * Never steal a lock by age: a slow compiler or test is still its owner.
9
+ * Nested read-only runners may reuse the parent's opaque, live-owner receipt.
10
+ */
11
+ export async function withBuildLease(root, operation, options = {}) {
12
+ const directory = path.join(await realpath(root), ".cache", "build-lease");
13
+ const ownerFile = path.join(directory, "owner.json");
14
+ if (options.inherited) {
15
+ const owner = JSON.parse(await readFile(ownerFile, "utf8"));
16
+ if (owner.token !== options.inherited || !Number.isSafeInteger(owner.pid) || owner.pid <= 0) {
17
+ throw new Error("Invalid inherited build lease; run validation from an independent shell.");
18
+ }
19
+ process.kill(owner.pid, 0);
20
+ return operation(owner.token);
21
+ }
22
+ await mkdir(path.dirname(directory), { recursive: true });
23
+ const deadline = Date.now() + (options.timeoutMs ?? 1_200_000);
24
+ for (;;) {
25
+ try {
26
+ await mkdir(directory);
27
+ break;
28
+ } catch (error) {
29
+ if (error.code !== "EEXIST") throw error;
30
+ if (Date.now() >= deadline) {
31
+ throw new Error("Timed out waiting for build lease. Check .cache/build-lease/owner.json; remove an abandoned lease only after confirming its producer and consumers have stopped.", { cause: error });
32
+ }
33
+ await delay(Math.min(100, Math.max(1, deadline - Date.now())));
34
+ }
35
+ }
36
+ const token = randomUUID();
37
+ try {
38
+ await writeFile(ownerFile, JSON.stringify({ token, pid: process.pid }), "utf8");
39
+ return await operation(token);
40
+ } finally {
41
+ await rm(directory, { recursive: true, force: true });
42
+ }
43
+ }
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "node:child_process";
4
+ import { rm, writeFile } from "node:fs/promises";
5
+ import path from "node:path";
6
+ import { pathToFileURL } from "node:url";
7
+ import { withBuildLease } from "./build-lease.mjs";
8
+
9
+ /** Run each build stage under one lease, retaining a failure marker until a complete rebuild. */
10
+ export async function main(root = process.cwd()) {
11
+ if (process.env.PM_BUILD_CONSUMER_LEASE) {
12
+ throw new Error("Cannot rebuild dist inside a validation consumer lease. Build before starting tests.");
13
+ }
14
+ return withBuildLease(root, async () => {
15
+ const incomplete = path.join(root, ".cache", "build-incomplete");
16
+ await writeFile(incomplete, "Build has not completed. Run pnpm build before consuming dist.\n");
17
+ for (const args of [
18
+ ["scripts/prepare-build-cache.mjs"],
19
+ ["node_modules/typescript/bin/tsc", "-p", "tsconfig.json"],
20
+ ["scripts/bundle-cli.mjs"],
21
+ ["scripts/finalize-build.mjs"],
22
+ ]) {
23
+ const code = await new Promise((resolve, reject) => {
24
+ const child = spawn(process.execPath, args, { cwd: root, stdio: "inherit" });
25
+ child.once("error", reject);
26
+ child.once("close", (status, signal) => resolve(signal ? 1 : (status ?? 1)));
27
+ });
28
+ if (code !== 0) return code;
29
+ }
30
+ await rm(incomplete);
31
+ return 0;
32
+ });
33
+ }
34
+
35
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
36
+ main().then((code) => { process.exitCode = code; }).catch((error) => {
37
+ console.error(error);
38
+ process.exitCode = 1;
39
+ });
40
+ }