@unbrained/pm-cli 2026.8.22 → 2026.8.23

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 (168) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +28 -0
  3. package/dist/cli/error-guidance.d.ts +13 -0
  4. package/dist/cli/error-guidance.js +62 -6
  5. package/dist/cli/main.js +13 -4
  6. package/dist/cli/register-mutation.js +6 -6
  7. package/dist/cli/register-operations.d.ts +73 -0
  8. package/dist/cli/register-operations.js +39 -14
  9. package/dist/cli/register-setup.js +3 -3
  10. package/dist/cli/schema-registration-helpers.d.ts +8 -1
  11. package/dist/cli/schema-registration-helpers.js +14 -5
  12. package/dist/cli-bundle/bundle-manifest.json +155 -155
  13. package/dist/cli-bundle/chunks/chunk-3ENVHX6C.js +36 -0
  14. package/dist/cli-bundle/chunks/{chunk-QI2CT3IX.js → chunk-DW2CGEMU.js} +2 -2
  15. package/dist/cli-bundle/chunks/{chunk-WG4STC36.js → chunk-EG6CLDZT.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-MYYI3ZOA.js → chunk-F3AI2JFL.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-U6GQ4VMV.js → chunk-HWZ6CELB.js} +4 -4
  18. package/dist/cli-bundle/chunks/chunk-HZBMLSZI.js +201 -0
  19. package/dist/cli-bundle/chunks/chunk-JB4KZWBF.js +3 -0
  20. package/dist/cli-bundle/chunks/chunk-KPH73XXJ.js +2 -0
  21. package/dist/cli-bundle/chunks/{chunk-BWX4SK46.js → chunk-KXPMB2YL.js} +58 -58
  22. package/dist/cli-bundle/chunks/{chunk-MZTZQTMS.js → chunk-QDVHNHAQ.js} +2 -2
  23. package/dist/cli-bundle/chunks/chunk-TFI5V5N2.js +13 -0
  24. package/dist/cli-bundle/chunks/{register-list-query-HZKBQNWW.js → register-list-query-UJB5FMV2.js} +2 -2
  25. package/dist/cli-bundle/chunks/register-mutation-NX5XE4VX.js +20 -0
  26. package/dist/cli-bundle/chunks/register-operations-RXIJIYXC.js +2 -0
  27. package/dist/cli-bundle/chunks/{register-setup-QK4OTOXN.js → register-setup-GFUZEKRE.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/{chunk-2POVTNLY.js → chunk-37Z4OEAP.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-3UPTYG44.js +8 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-E2EWYPY6.js → chunk-5S7E72FY.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-GMYPD4FX.js → chunk-AUFH5H35.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-E7X25GC3.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-3LKU6PTJ.js → chunk-FQCSTBWE.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-6S2MO3Q3.js → chunk-FZS4H32O.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/chunk-IFLWKY2R.js +156 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-PMGJUFNQ.js → chunk-JOWDB2MH.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-LYVSW5VM.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-MRCNF3U6.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-A2BC5PQL.js → chunk-OFVUGTLJ.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-2ARQGDDW.js → chunk-OGLQBL46.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-R6SR45XU.js → chunk-OY7QAV4Y.js} +48 -47
  42. package/dist/cli-bundle/focused-chunks/chunk-QGFNI65N.js +26 -0
  43. package/dist/cli-bundle/focused-chunks/{chunk-D6RBZEJJ.js → chunk-R27IDGHD.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-UYRFYCDQ.js +5 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-PH2OXXVZ.js → chunk-ZHVA42R5.js} +9 -9
  46. package/dist/cli-bundle/main.js +13 -13
  47. package/dist/cli-bundle/sdk-authoring.js +1 -1
  48. package/dist/cli-bundle/sdk-contracts.js +2 -2
  49. package/dist/cli-bundle/sdk-core.js +40 -40
  50. package/dist/cli-bundle/sdk-governance.js +1 -1
  51. package/dist/cli-bundle/sdk-graph.js +1 -1
  52. package/dist/cli-bundle/sdk-merge.js +33 -32
  53. package/dist/cli-bundle/sdk-query.js +1 -1
  54. package/dist/cli-bundle/sdk-runtime.js +1 -1
  55. package/dist/cli-bundle/sdk-testing.js +1 -1
  56. package/dist/cli-bundle/sdk.js +5 -5
  57. package/dist/core/config/nested-settings.js +8 -2
  58. package/dist/core/config/positional-value.d.ts +1 -1
  59. package/dist/core/config/positional-value.js +5 -2
  60. package/dist/core/history/history.js +3 -3
  61. package/dist/core/item/item-format.js +66 -12
  62. package/dist/core/reproducibility/context.d.ts +4 -0
  63. package/dist/core/reproducibility/context.js +14 -8
  64. package/dist/core/shared/author.d.ts +55 -1
  65. package/dist/core/shared/author.js +333 -16
  66. package/dist/core/shared/constants.js +3 -2
  67. package/dist/core/store/settings-validator.d.ts +1 -0
  68. package/dist/core/store/settings-validator.js +6 -3
  69. package/dist/core/store/settings.js +5 -2
  70. package/dist/mcp/server.d.ts +1 -1
  71. package/dist/mcp/server.js +30 -9
  72. package/dist/sdk/agent/identity-config.d.ts +63 -0
  73. package/dist/sdk/agent/identity-config.js +107 -0
  74. package/dist/sdk/agent/refusal-corpus-contracts.d.ts +76 -0
  75. package/dist/sdk/agent/refusal-corpus-contracts.js +194 -0
  76. package/dist/sdk/cli-contracts/agent-output-contracts.js +6 -4
  77. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
  78. package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
  79. package/dist/sdk/cli-contracts/flag-contracts.js +9 -2
  80. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +4 -4
  81. package/dist/sdk/cli-contracts/registration-helpers.js +5 -2
  82. package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -2
  83. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  84. package/dist/sdk/cli-contracts/tool-schema.js +14 -3
  85. package/dist/sdk/cli-contracts.d.ts +3 -3
  86. package/dist/sdk/cli-contracts.js +4 -4
  87. package/dist/sdk/config.d.ts +6 -1
  88. package/dist/sdk/config.js +119 -14
  89. package/dist/sdk/context-intent-contracts.js +4 -2
  90. package/dist/sdk/core-governance.d.ts +1 -1
  91. package/dist/sdk/core-governance.js +3 -3
  92. package/dist/sdk/extension/scaffold.js +11 -5
  93. package/dist/sdk/flag-invocation-contracts.js +4 -2
  94. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +50 -2
  95. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +87 -38
  96. package/dist/sdk/governance/assurance-action.js +30 -10
  97. package/dist/sdk/governance/validate.d.ts +2 -2
  98. package/dist/sdk/governance/validate.js +39 -14
  99. package/dist/sdk/index.d.ts +7 -2
  100. package/dist/sdk/index.js +8 -3
  101. package/dist/sdk/lifecycle/create.js +6 -3
  102. package/dist/sdk/lifecycle/update.js +5 -3
  103. package/dist/sdk/merge/three-way.js +105 -26
  104. package/dist/sdk/read-output-budget.d.ts +21 -0
  105. package/dist/sdk/read-output-budget.js +39 -2
  106. package/dist/sdk/read-output-contracts.d.ts +5 -3
  107. package/dist/sdk/read-output-contracts.js +20 -12
  108. package/dist/sdk/reproducibility/process.d.ts +19 -0
  109. package/dist/sdk/reproducibility/process.js +88 -0
  110. package/dist/sdk/runtime-primitives.d.ts +1 -1
  111. package/dist/sdk/runtime-primitives.js +3 -3
  112. package/dist/sdk/runtime.js +6 -5
  113. package/dist/sdk/test/batch.d.ts +6 -0
  114. package/dist/sdk/test/batch.js +15 -3
  115. package/dist/sdk/test/entry.d.ts +1 -1
  116. package/dist/sdk/test/entry.js +3 -2
  117. package/dist/sdk/test/execution.d.ts +28 -3
  118. package/dist/sdk/test/execution.js +193 -34
  119. package/dist/sdk/test/parsers.d.ts +6 -0
  120. package/dist/sdk/test/parsers.js +21 -2
  121. package/dist/sdk/test/trust.d.ts +33 -0
  122. package/dist/sdk/test/trust.js +207 -0
  123. package/dist/types.d.ts +23 -0
  124. package/dist/types.js +2 -2
  125. package/docs/AGENT_PROVENANCE_ADR.md +41 -5
  126. package/docs/CONFIGURATION.md +4 -0
  127. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +19 -2
  128. package/docs/MERGE_SAFETY.md +15 -1
  129. package/docs/READ_OUTPUT_CONTRACTS.md +11 -1
  130. package/docs/REPRODUCIBLE_WORKSPACES.md +42 -8
  131. package/docs/SDK.md +9 -0
  132. package/docs/SDK_AGENT_SESSION_CONTEXT.md +6 -4
  133. package/docs/SDK_EVIDENCE_TRACEABILITY.md +1 -1
  134. package/docs/TESTING.md +75 -8
  135. package/docs/agent-task-token-baseline.json +2 -2
  136. package/docs/generated/FLAG_LEXICON_BUDGETS.md +2 -2
  137. package/marketplace.json +2 -2
  138. package/package.json +2 -2
  139. package/packages/pm-beads/package.json +1 -1
  140. package/packages/pm-calendar/package.json +1 -1
  141. package/packages/pm-command-kit/package.json +1 -1
  142. package/packages/pm-digital-twin/package.json +1 -1
  143. package/packages/pm-governance-audit/package.json +1 -1
  144. package/packages/pm-guide-shell/package.json +1 -1
  145. package/packages/pm-kanban/package.json +1 -1
  146. package/packages/pm-lifecycle-hooks/package.json +1 -1
  147. package/packages/pm-linked-test-adapters/package.json +1 -1
  148. package/packages/pm-search-advanced/package.json +1 -1
  149. package/packages/pm-templates/package.json +1 -1
  150. package/packages/pm-todos/package.json +1 -1
  151. package/packages/pm-vcs/package.json +1 -1
  152. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  153. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  154. package/sdk/public-surface.json +427 -17
  155. package/dist/cli-bundle/chunks/chunk-EMWDM5FI.js +0 -13
  156. package/dist/cli-bundle/chunks/chunk-HYG6LRL4.js +0 -200
  157. package/dist/cli-bundle/chunks/chunk-SMWXHMVB.js +0 -35
  158. package/dist/cli-bundle/chunks/chunk-VMMIL3SI.js +0 -2
  159. package/dist/cli-bundle/chunks/chunk-YBPJAOQQ.js +0 -3
  160. package/dist/cli-bundle/chunks/register-mutation-HTKEEGRD.js +0 -20
  161. package/dist/cli-bundle/chunks/register-operations-6EMRWJJY.js +0 -2
  162. package/dist/cli-bundle/focused-chunks/chunk-2AZT5WXZ.js +0 -2
  163. package/dist/cli-bundle/focused-chunks/chunk-5SHSBMX2.js +0 -2
  164. package/dist/cli-bundle/focused-chunks/chunk-C4S4A4JJ.js +0 -5
  165. package/dist/cli-bundle/focused-chunks/chunk-L5LDSRO2.js +0 -155
  166. package/dist/cli-bundle/focused-chunks/chunk-MB37AYN6.js +0 -26
  167. package/dist/cli-bundle/focused-chunks/chunk-MCOR37QK.js +0 -2
  168. package/dist/cli-bundle/focused-chunks/chunk-WZE4LIPW.js +0 -8
@@ -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.22"
9
+ "version": "2026.8.23"
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.22",
16
+ "version": "2026.8.23",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.8.23 - 2026-08-23
4
+
5
+ ### Added
6
+
7
+ - Every instruction the product emits about its own next command is an unexecuted claim: the recovery vocabulary is generated, asserted as text, and run by nothing ([pm-h8tpeh](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-h8tpeh.toon))
8
+
9
+ ### Changed
10
+
11
+ - Update ESLint to compatible 10.9.0 release ([pm-940mcx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-940mcx.toon))
12
+
13
+ ### Fixed
14
+
15
+ - Allow linked tests to opt out of source-workspace injection for self-sandboxing repo-wide gates ([pm-efkvdy](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-efkvdy.toon))
16
+ - Linked-test schema context changes non-PM repository checks, so commands that pass directly fail when recorded and run through pm test ([pm-e97jyf](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-e97jyf.toon))
17
+ - GH-1089: expose reproducible execution through supported CLI and MCP process configuration ([pm-gh1089](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gh1089.toon))
18
+ - Budget recovery can recommend a smaller ceiling than the request that already truncated ([pm-xam9bt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-xam9bt.toon))
19
+
20
+ ### Security
21
+
22
+ - Linked-test commands are merge-unioned workspace data executed with shell:true — no provenance, allowlist, or confirmation boundary ([pm-ed28wi](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ed28wi.toon))
23
+ - Cross-harness provenance adapters: automatically resolve native model, version, and effort signals beyond Claude without identity flags ([pm-c0lrdm](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-c0lrdm.toon))
24
+
25
+ ### Other
26
+
27
+ - Cross-process reproducibility gate: prove CLI and MCP deterministic runs are byte-identical and fail on ambient time leaks ([pm-vklr99](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-vklr99.toon))
28
+ - Expose agent probe controls and versioned legacy-author vocabulary through pm config and SDK mutation APIs ([pm-yds9dt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-yds9dt.toon))
29
+ - Diagnostic output budget: errors, warnings, and recovery bundles are the output an agent reads most and the only output with no declared ceiling ([pm-cha95z](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-cha95z.toon))
30
+
3
31
  ## 2026.8.22 - 2026-08-22
4
32
 
5
33
  ### Fixed
@@ -21,6 +21,17 @@ interface GuidanceMessage {
21
21
  availableDependencies?: NonNullable<PmCliErrorContext["available_dependencies"]>;
22
22
  recovery?: PmCliErrorRecoveryPayload;
23
23
  }
24
+ /** Compact refusal identity embedded in every structured error envelope. */
25
+ export interface PmRefusalEnvelope {
26
+ /** Command, flag, or missing operand that rejected the invocation. */
27
+ surface: string;
28
+ /** Supplied scalar rejected by a closed domain, when available. */
29
+ rejected_value?: string;
30
+ /** Complete legal domain advertised by the refusal, when applicable. */
31
+ legal_domain?: string[];
32
+ /** Process exit code paired with the refusal. */
33
+ exit_code: number;
34
+ }
24
35
  /** Documents the json error envelope payload exchanged by command, SDK, and package integrations. */
25
36
  export interface JsonErrorEnvelope {
26
37
  /** Schema type that determines the shape and validation rules for this value. */
@@ -53,6 +64,8 @@ export interface JsonErrorEnvelope {
53
64
  available_dependencies?: NonNullable<PmCliErrorContext["available_dependencies"]>;
54
65
  /** Value that configures or reports recovery for this contract. */
55
66
  recovery?: PmCliErrorRecoveryPayload;
67
+ /** Stable compact identity of the failing surface and legal recovery domain. */
68
+ refusal: PmRefusalEnvelope;
56
69
  /** Binding output-budget receipt for this diagnostic. */
57
70
  diagnostic_output?: PmDiagnosticOutputReceipt;
58
71
  }
@@ -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]="72da6986-67d5-5adf-8e63-4f654d9ec7dd")}catch(e){}}();
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]="4bdb7fcf-dd74-57bc-8a0e-07539095462e")}catch(e){}}();
3
3
  import { resolveRecoveryCommandName } from "../sdk/agent/command-recovery.js";
4
4
  import { projectPmDiagnosticOutput, projectPmDiagnosticText, } from "../sdk/cli-contracts/agent-output-contracts.js";
5
5
  import { renderPmCommand } from "./argv-utils.js";
@@ -304,6 +304,42 @@ function attachStructuredGuidanceDetails(payload, message) {
304
304
  }
305
305
  return payload;
306
306
  }
307
+ function resolveRefusalCandidateFlag(message, normalizedArgs) {
308
+ if (message.flag)
309
+ return message.flag;
310
+ return message.recovery?.provided_fields?.find((field) => field !== "--json" &&
311
+ field !== "--quiet" &&
312
+ normalizedArgs.includes(field));
313
+ }
314
+ function resolveRefusalRejectedValue(message, normalizedArgs, candidateFlag) {
315
+ if (message.value !== undefined)
316
+ return message.value;
317
+ if (candidateFlag) {
318
+ return normalizedArgs[normalizedArgs.indexOf(candidateFlag) + 1];
319
+ }
320
+ const allowedValues = message.recovery?.allowed_values;
321
+ if (!allowedValues?.length)
322
+ return undefined;
323
+ return normalizedArgs.find((argument, index) => index > 0 &&
324
+ !argument.startsWith("-") &&
325
+ !allowedValues.includes(argument));
326
+ }
327
+ function buildRefusalEnvelope(message, exitCode) {
328
+ const normalizedArgs = message.recovery?.normalized_args ?? [];
329
+ const candidateFlag = resolveRefusalCandidateFlag(message, normalizedArgs);
330
+ const rejectedValue = resolveRefusalRejectedValue(message, normalizedArgs, candidateFlag);
331
+ return {
332
+ surface: candidateFlag ??
333
+ message.recovery?.missing?.[0] ??
334
+ inferCommandNameFromRecovery(message.recovery) ??
335
+ "command",
336
+ ...(rejectedValue !== undefined ? { rejected_value: rejectedValue } : {}),
337
+ ...(message.recovery?.allowed_values?.length
338
+ ? { legal_domain: message.recovery.allowed_values }
339
+ : {}),
340
+ exit_code: exitCode,
341
+ };
342
+ }
307
343
  function guidanceToJsonEnvelope(message, exitCode) {
308
344
  return attachStructuredGuidanceDetails({
309
345
  type: message.type,
@@ -312,8 +348,20 @@ function guidanceToJsonEnvelope(message, exitCode) {
312
348
  detail: message.happened,
313
349
  required: message.required,
314
350
  exit_code: exitCode,
351
+ refusal: buildRefusalEnvelope(message, exitCode),
315
352
  }, message);
316
353
  }
354
+ function projectJsonErrorGuidance(guidance, exitCode) {
355
+ const recovery = guidance.recovery;
356
+ const hasActionableRecovery = Boolean(recovery?.suggested_retry) ||
357
+ Boolean(recovery?.suggested_retry_args?.length) ||
358
+ Boolean(recovery?.allowed_values?.length) ||
359
+ Boolean(recovery?.candidate_commands?.length) ||
360
+ Boolean(guidance.nextSteps?.length);
361
+ return projectPmDiagnosticOutput(guidanceToJsonEnvelope(guidance, exitCode), {
362
+ diagnosticClass: hasActionableRecovery ? "recovery_bundle" : "error",
363
+ });
364
+ }
317
365
  function guidanceToClassification(message) {
318
366
  return attachStructuredGuidanceDetails({
319
367
  type: message.type,
@@ -415,7 +463,10 @@ function applyPmCliErrorContext(guidance, rawMessage, context) {
415
463
  const fallbackTitle = guidance.code === "command_failed" && context.code
416
464
  ? buildFallbackTitleFromMessage(normalizedRawMessage)
417
465
  : undefined;
418
- const recovery = normalizeRecoveryPayload(context.recovery) ?? guidance.recovery;
466
+ const contextRecovery = normalizeRecoveryPayload(context.recovery);
467
+ const recovery = contextRecovery && guidance.recovery
468
+ ? normalizeRecoveryPayload({ ...guidance.recovery, ...contextRecovery })
469
+ : (contextRecovery ?? guidance.recovery);
419
470
  return {
420
471
  ...guidance,
421
472
  code,
@@ -600,6 +651,10 @@ function buildInvalidArgumentGuidance(rawMessage, message, context) {
600
651
  ? `pm ${commandName} --help`
601
652
  : "pm <command> --help";
602
653
  const allowedValues = inferAllowedValuesFromMessage(message);
654
+ const enrichedRecovery = normalizeRecoveryPayload({
655
+ ...recovery,
656
+ allowed_values: recovery?.allowed_values ?? allowedValues,
657
+ });
603
658
  const retryExample = buildAllowedValueRetryCommand(recovery, allowedValues);
604
659
  const examples = retryExample
605
660
  ? [retryExample, helpExample]
@@ -620,6 +675,7 @@ function buildInvalidArgumentGuidance(rawMessage, message, context) {
620
675
  why: "Validation protects data consistency and deterministic behavior across commands.",
621
676
  examples,
622
677
  nextSteps,
678
+ recovery: enrichedRecovery,
623
679
  }), rawMessage, context);
624
680
  }
625
681
  function buildPmCliErrorGuidance(rawMessage, context) {
@@ -1172,7 +1228,7 @@ export function classifyPmCliError(rawMessage, context) {
1172
1228
  }
1173
1229
  /** Implements format pm cli error for json for the public runtime surface of this module. */
1174
1230
  export function formatPmCliErrorForJson(rawMessage, exitCode, context) {
1175
- return projectPmDiagnosticOutput(guidanceToJsonEnvelope(buildPmCliErrorGuidance(rawMessage, context), exitCode));
1231
+ return projectJsonErrorGuidance(buildPmCliErrorGuidance(rawMessage, context), exitCode);
1176
1232
  }
1177
1233
  /** Implements format commander error for display for the public runtime surface of this module. */
1178
1234
  export function formatCommanderErrorForDisplay(rawMessage, commandName, allowedTypes, context) {
@@ -1185,12 +1241,12 @@ export function classifyCommanderError(rawMessage, commandName, allowedTypes, co
1185
1241
  }
1186
1242
  /** Implements format commander error for json for the public runtime surface of this module. */
1187
1243
  export function formatCommanderErrorForJson(rawMessage, commandName, allowedTypes, exitCode, context) {
1188
- return projectPmDiagnosticOutput(guidanceToJsonEnvelope(buildCommanderErrorGuidance(rawMessage, commandName, allowedTypes, context), exitCode));
1244
+ return projectJsonErrorGuidance(buildCommanderErrorGuidance(rawMessage, commandName, allowedTypes, context), exitCode);
1189
1245
  }
1190
1246
  /** Implements format unknown error for json for the public runtime surface of this module. */
1191
1247
  export function formatUnknownErrorForJson(rawMessage, exitCode) {
1192
1248
  const guidance = buildUnknownErrorGuidance(rawMessage);
1193
- return projectPmDiagnosticOutput(guidanceToJsonEnvelope(guidance, exitCode));
1249
+ return projectJsonErrorGuidance(guidance, exitCode);
1194
1250
  }
1195
1251
  function buildUnknownErrorGuidance(rawMessage) {
1196
1252
  const message = normalizeMessage(rawMessage);
@@ -1241,4 +1297,4 @@ export const _testOnly = {
1241
1297
  resolveKnownPackageCommandHint,
1242
1298
  };
1243
1299
  //# sourceMappingURL=error-guidance.js.map
1244
- //# debugId=72da6986-67d5-5adf-8e63-4f654d9ec7dd
1300
+ //# debugId=4bdb7fcf-dd74-57bc-8a0e-07539095462e
package/dist/cli/main.js CHANGED
@@ -3,9 +3,10 @@
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]="5a349bce-a08d-5ff6-870a-3ec38843b512")}catch(e){}}();
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]="7289d222-cf1f-5fa5-ac8a-d690b6012e39")}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
+ import { runWithReproducibleProcessEnvironment } from "../sdk/reproducibility/process.js";
9
10
  import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
10
11
  import { createExtensionCommandSdk } from "../sdk/extension-command-context.js";
11
12
  import { PmClient } from "../sdk/runtime.js";
@@ -2387,8 +2388,7 @@ async function handleRunPmCliError(params) {
2387
2388
  emitTelemetryCommandError: context.emitTelemetryCommandError,
2388
2389
  });
2389
2390
  }
2390
- /** Implements run pm cli for the public runtime surface of this module. */
2391
- export async function runPmCli(rawArgv = process.argv.slice(2)) {
2391
+ async function runPmCliInReproducibleContext(rawArgv) {
2392
2392
  program = createPmCliProgram(CLI_VERSION);
2393
2393
  attachProgramLifecycleHooks(program);
2394
2394
  // The runtime-extension snapshot caches dedupe discovery work within a
@@ -2458,6 +2458,15 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
2458
2458
  restorePmAuthor?.();
2459
2459
  }
2460
2460
  }
2461
+ /** Implements run pm cli for the public runtime surface of this module. */
2462
+ export async function runPmCli(rawArgv = process.argv.slice(2)) {
2463
+ try {
2464
+ await runWithReproducibleProcessEnvironment(process.env, () => runPmCliInReproducibleContext(rawArgv));
2465
+ }
2466
+ catch (error) {
2467
+ await handleRunPmCliError({ error, invocationArgv: [...rawArgv] });
2468
+ }
2469
+ }
2461
2470
  /** Public contract for test only, shared by SDK and presentation-layer consumers. */
2462
2471
  export const _testOnly = {
2463
2472
  activationCommandMatchesProbe,
@@ -2549,4 +2558,4 @@ export const _testOnly = {
2549
2558
  wrapThrownErrorForSentry,
2550
2559
  };
2551
2560
  //# sourceMappingURL=main.js.map
2552
- //# debugId=5a349bce-a08d-5ff6-870a-3ec38843b512
2561
+ //# debugId=7289d222-cf1f-5fa5-ac8a-d690b6012e39
@@ -1,7 +1,7 @@
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]="07f3212f-c6d3-534e-8273-fae43a8fca18")}catch(e){}}();
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]="49cddeba-127e-5d6c-a62d-4a63088ce8c6")}catch(e){}}();
3
3
  import { resolveBodyFileContent, EXIT_CODE, splitCommaList, PmCliError, createUnknownSubcommandError, } from "../sdk/runtime-primitives.js";
4
- import { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, } from "../sdk/cli-contracts.js";
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";
6
6
  import { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, runMergeInstall, runMergeReconcile, runMergeReceiptReport, } from "./commands/merge.js";
7
7
  import { runAppend } from "./commands/append.js";
@@ -823,7 +823,7 @@ async function runMergeAction(subcommand, artifact, base, ours, theirs, options,
823
823
  throw createUnknownSubcommandError({
824
824
  command_path: "merge",
825
825
  token: subcommand,
826
- allowed: ["install", "reconcile", "report", "driver"],
826
+ allowed: MERGE_SUBCOMMAND_VALUES,
827
827
  display_name: "merge",
828
828
  });
829
829
  }
@@ -898,7 +898,7 @@ async function runSchemaAction(subcommand, name, options, command) {
898
898
  assertSchemaSubcommandPresent(normalizedSubcommand, SCHEMA_SUBCOMMANDS);
899
899
  if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) &&
900
900
  typeName === undefined &&
901
- !looksLikeSchemaSubcommandTypo(normalizedSubcommand)) {
901
+ !looksLikeSchemaSubcommandTypo(subcommand)) {
902
902
  typeName = subcommand;
903
903
  normalizedSubcommand = "add-type";
904
904
  }
@@ -1724,7 +1724,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1724
1724
  .action(runHistoryCompactAction);
1725
1725
  program
1726
1726
  .command("merge")
1727
- .argument("<subcommand>", "Merge subcommand: install, reconcile, report, driver")
1727
+ .argument("<subcommand>", `Merge subcommand: ${MERGE_SUBCOMMAND_VALUES.join(", ")}`)
1728
1728
  .argument("[artifact]", `driver only: artifact class to merge (${MERGE_DRIVER_ARTIFACT_VALUES.join(", ")})`)
1729
1729
  .argument("[base]", "driver only: common-ancestor file path (git %O)")
1730
1730
  .argument("[ours]", "driver only: current-branch file path (git %A)")
@@ -1840,4 +1840,4 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1840
1840
  .action(runDepsAction);
1841
1841
  }
1842
1842
  //# sourceMappingURL=register-mutation.js.map
1843
- //# debugId=07f3212f-c6d3-534e-8273-fae43a8fca18
1843
+ //# debugId=49cddeba-127e-5d6c-a62d-4a63088ce8c6
@@ -4,7 +4,80 @@
4
4
  * Provides CLI runtime support for Register Operations.
5
5
  */
6
6
  import type { Command } from "commander";
7
+ declare function validateBackgroundTestOptions(options: Record<string, unknown>, values: {
8
+ addValues: string[];
9
+ addJsonValues: string[];
10
+ removeValues: string[];
11
+ removeIndexValues: string[];
12
+ }): void;
13
+ declare function buildRunTestOptions(options: Record<string, unknown>, values: {
14
+ addValues: string[];
15
+ addJsonValues: string[];
16
+ removeValues: string[];
17
+ removeIndexValues: string[];
18
+ }): {
19
+ add: string[];
20
+ addJson: string[];
21
+ remove: string[];
22
+ removeIndex: string[];
23
+ list: boolean;
24
+ run: boolean;
25
+ match: string | undefined;
26
+ onlyIndex: string | number | undefined;
27
+ onlyLast: boolean;
28
+ timeout: string | undefined;
29
+ progress: boolean;
30
+ envSet: string[];
31
+ envClear: string[];
32
+ sharedHostSafe: boolean;
33
+ pmContext: string | undefined;
34
+ overrideLinkedPmContext: boolean;
35
+ workspaceContext: string | undefined;
36
+ overrideLinkedWorkspaceContext: boolean;
37
+ allowUntrustedLinkedTests: boolean;
38
+ acknowledgeLinkedTests: boolean;
39
+ failOnContextMismatch: boolean;
40
+ failOnSkipped: boolean;
41
+ failOnEmptyTestRun: boolean;
42
+ requireAssertionsForPm: boolean;
43
+ checkContext: boolean;
44
+ autoPmContext: boolean;
45
+ author: string | undefined;
46
+ message: string | undefined;
47
+ force: boolean;
48
+ measure: string[];
49
+ metricBelow: string | undefined;
50
+ metricDiff: string | undefined;
51
+ };
52
+ /** Public contract for test-only operation adapter coverage. */
53
+ export declare const _testOnlyRegisterOperations: {
54
+ buildRunTestOptions: typeof buildRunTestOptions;
55
+ buildRunTestAllOptions: typeof buildRunTestAllOptions;
56
+ validateBackgroundTestOptions: typeof validateBackgroundTestOptions;
57
+ };
58
+ declare function buildRunTestAllOptions(options: Record<string, unknown>): {
59
+ status: string | undefined;
60
+ limit: string | undefined;
61
+ offset: string | undefined;
62
+ timeout: string | undefined;
63
+ progress: boolean;
64
+ envSet: string[];
65
+ envClear: string[];
66
+ sharedHostSafe: boolean;
67
+ pmContext: string | undefined;
68
+ overrideLinkedPmContext: boolean;
69
+ workspaceContext: string | undefined;
70
+ overrideLinkedWorkspaceContext: boolean;
71
+ allowUntrustedLinkedTests: boolean;
72
+ failOnContextMismatch: boolean;
73
+ failOnSkipped: boolean;
74
+ failOnEmptyTestRun: boolean;
75
+ requireAssertionsForPm: boolean;
76
+ checkContext: boolean;
77
+ autoPmContext: boolean;
78
+ };
7
79
  /** Enforces the claim target XOR selection contract before dispatch. */
8
80
  export declare function requireClaimTarget(id: string | undefined, next: boolean): void;
9
81
  /** Implements register operation commands for the public runtime surface of this module. */
10
82
  export declare function registerOperationCommands(program: Command): void;
83
+ export {};
@@ -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]="975321a1-0375-5829-a012-f23e32e9c6bf")}catch(e){}}();
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]="7377fa65-aaa9-5d28-b3fb-a8becaf0d484")}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";
@@ -66,6 +66,9 @@ function validateBackgroundTestOptions(options, values) {
66
66
  if (options.run !== true) {
67
67
  throw new PmCliError("--background requires --run", EXIT_CODE.USAGE);
68
68
  }
69
+ if (options.acknowledgeLinkedTests === true) {
70
+ throw new PmCliError("--background cannot be combined with --acknowledge-linked-tests; acknowledgement is a non-executing foreground operation", EXIT_CODE.USAGE);
71
+ }
69
72
  if (values.addValues.length > 0 ||
70
73
  values.addJsonValues.length > 0 ||
71
74
  values.removeValues.length > 0 ||
@@ -112,6 +115,12 @@ function buildRunTestOptions(options, values) {
112
115
  sharedHostSafe: Boolean(options.sharedHostSafe),
113
116
  pmContext: typeof options.pmContext === "string" ? options.pmContext : undefined,
114
117
  overrideLinkedPmContext: Boolean(options.overrideLinkedPmContext),
118
+ workspaceContext: typeof options.workspaceContext === "string"
119
+ ? options.workspaceContext
120
+ : undefined,
121
+ overrideLinkedWorkspaceContext: Boolean(options.overrideLinkedWorkspaceContext),
122
+ allowUntrustedLinkedTests: Boolean(options.allowUntrustedLinkedTests),
123
+ acknowledgeLinkedTests: Boolean(options.acknowledgeLinkedTests),
115
124
  failOnContextMismatch: Boolean(options.failOnContextMismatch),
116
125
  failOnSkipped: Boolean(options.failOnSkipped),
117
126
  failOnEmptyTestRun: Boolean(options.failOnEmptyTestRun),
@@ -128,6 +137,12 @@ function buildRunTestOptions(options, values) {
128
137
  metricDiff: typeof options.metricDiff === "string" ? options.metricDiff : undefined,
129
138
  };
130
139
  }
140
+ /** Public contract for test-only operation adapter coverage. */
141
+ export const _testOnlyRegisterOperations = {
142
+ buildRunTestOptions,
143
+ buildRunTestAllOptions,
144
+ validateBackgroundTestOptions,
145
+ };
131
146
  async function runForegroundLinkedTests(id, options, globalOptions, values) {
132
147
  const result = await runTest(id, buildRunTestOptions(options, values), globalOptions);
133
148
  if (values.addValues.length > 0 ||
@@ -193,7 +208,20 @@ async function runTestAllAction(options, command) {
193
208
  }
194
209
  return;
195
210
  }
196
- const result = await runTestAll({
211
+ const result = await runTestAll(buildRunTestAllOptions(options), globalOptions);
212
+ await invalidateSearchCachesForMutation(globalOptions, {
213
+ ids: result.results.map((entry) => entry.id),
214
+ });
215
+ printResult(result, globalOptions);
216
+ if (result.failed > 0 || result.fail_on_skipped_triggered === true) {
217
+ process.exitCode = EXIT_CODE.DEPENDENCY_FAILED;
218
+ }
219
+ if (globalOptions.profile) {
220
+ printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);
221
+ }
222
+ }
223
+ function buildRunTestAllOptions(options) {
224
+ return {
197
225
  status: readOptionString(options, "status"),
198
226
  limit: readOptionString(options, "limit"),
199
227
  offset: readOptionString(options, "offset"),
@@ -206,23 +234,16 @@ async function runTestAllAction(options, command) {
206
234
  sharedHostSafe: Boolean(options.sharedHostSafe),
207
235
  pmContext: readOptionString(options, "pmContext"),
208
236
  overrideLinkedPmContext: Boolean(options.overrideLinkedPmContext),
237
+ workspaceContext: readOptionString(options, "workspaceContext"),
238
+ overrideLinkedWorkspaceContext: Boolean(options.overrideLinkedWorkspaceContext),
239
+ allowUntrustedLinkedTests: Boolean(options.allowUntrustedLinkedTests),
209
240
  failOnContextMismatch: Boolean(options.failOnContextMismatch),
210
241
  failOnSkipped: Boolean(options.failOnSkipped),
211
242
  failOnEmptyTestRun: Boolean(options.failOnEmptyTestRun),
212
243
  requireAssertionsForPm: Boolean(options.requireAssertionsForPm),
213
244
  checkContext: Boolean(options.checkContext),
214
245
  autoPmContext: Boolean(options.autoPmContext),
215
- }, globalOptions);
216
- await invalidateSearchCachesForMutation(globalOptions, {
217
- ids: result.results.map((entry) => entry.id),
218
- });
219
- printResult(result, globalOptions);
220
- if (result.failed > 0 || result.fail_on_skipped_triggered === true) {
221
- process.exitCode = EXIT_CODE.DEPENDENCY_FAILED;
222
- }
223
- if (globalOptions.profile) {
224
- printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);
225
- }
246
+ };
226
247
  }
227
248
  async function runTelemetryAction(namespaceOrSubcommand, subcommand, options, command) {
228
249
  const globalOptions = getGlobalOptions(command);
@@ -558,6 +579,9 @@ function addLinkedTestExecutionOptions(command) {
558
579
  .option("--shared-host-safe", "Apply additive shared-host-safe runtime defaults for linked-test runs")
559
580
  .option("--pm-context <mode>", "PM linked-test context mode: schema|tracker|auto (default: schema)")
560
581
  .option("--override-linked-pm-context", "Force run-level --pm-context to override per-linked-test pm_context_mode metadata")
582
+ .option("--workspace-context <mode>", "Source-workspace mode: source|isolated|snapshot (default: source)")
583
+ .option("--override-linked-workspace-context", "Force run-level --workspace-context over per-linked-test metadata")
584
+ .option("--allow-untrusted-linked-tests", "Execute untrusted linked commands when project policy also permits it")
561
585
  .option("--fail-on-context-mismatch", "Fail linked PM commands when context item counts differ")
562
586
  .option("--fail-on-skipped", "Treat skipped linked tests as dependency failures")
563
587
  .option("--fail-on-empty-test-run", "Treat successful linked-test commands that report zero executed tests as failures")
@@ -580,6 +604,7 @@ export function registerOperationCommands(program) {
580
604
  .option("--match <value>", "Run only linked tests whose command/path contains this substring")
581
605
  .option("--only-index <n>", "Run only the 1-based linked-test index from --list order")
582
606
  .option("--only-last", "Run only the most recently added linked test");
607
+ testCommand.option("--acknowledge-linked-tests", "Trust the item's current linked commands in this clone without executing them");
583
608
  addLinkedTestExecutionOptions(testCommand)
584
609
  .option("--measure <value>", "Record name=value[,unit=...][,threshold=...] evidence; repeatable", collect)
585
610
  .option("--metric-below <value>", "Return evidence below name=value")
@@ -873,4 +898,4 @@ function registerSchedulingShortcutCommands(program) {
873
898
  });
874
899
  }
875
900
  //# sourceMappingURL=register-operations.js.map
876
- //# debugId=975321a1-0375-5829-a012-f23e32e9c6bf
901
+ //# debugId=7377fa65-aaa9-5d28-b3fb-a8becaf0d484
@@ -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]="d498a64c-9680-52a9-981d-4ce86949784d")}catch(e){}}();
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]="2a7939ad-52a6-5d9c-b7cf-2bc59a6b3d32")}catch(e){}}();
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { EXIT_CODE, PmCliError, } from "../sdk/runtime-primitives.js";
@@ -622,7 +622,7 @@ export function registerSetupCommands(program) {
622
622
  .option("--criterion <text>", "Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)", collect)
623
623
  .option("--clear-criteria", "Clear criteria-list keys for config set operations")
624
624
  .option("--format <value>", "Item format for item-format key: toon")
625
- .option("--policy <value>", "Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; governance-duplicate-detection-mode=off|advisory|strict; test-result-tracking=enabled|disabled; telemetry-tracking=enabled|disabled")
625
+ .option("--policy <value>", "Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; governance-duplicate-detection-mode=off|advisory|strict; test-result-tracking=enabled|disabled; untrusted-linked-test-execution=enabled|disabled; telemetry-tracking=enabled|disabled")
626
626
  .option("--value <value>", "Typed nested setting value. Mutation guards: require-attributed-author=true|false, secret-guard=off|advise|block, stale-in-progress-hours=integer>=1. Kebab-case is preferred; underscore aliases remain accepted.")
627
627
  .option("--default-depth <value>", "Context default depth: brief|standard|deep")
628
628
  .option("--activity-limit <n>", "Context default activity limit")
@@ -673,4 +673,4 @@ export function registerSetupCommands(program) {
673
673
  });
674
674
  }
675
675
  //# sourceMappingURL=register-setup.js.map
676
- //# debugId=d498a64c-9680-52a9-981d-4ce86949784d
676
+ //# debugId=2a7939ad-52a6-5d9c-b7cf-2bc59a6b3d32
@@ -5,7 +5,14 @@
5
5
  * registration and its focused contract tests.
6
6
  */
7
7
  import { isPureSnakeCaseAlias } from "../sdk/runtime-primitives.js";
8
- /** Return whether a shorthand token resembles a misspelled schema subcommand. */
8
+ /**
9
+ * Return whether a token must remain on the schema-action refusal path.
10
+ *
11
+ * Bare custom-type shorthand is intentionally limited to PascalCase names.
12
+ * Lowercase tokens occupy the action namespace, so a misspelling such as
13
+ * `pm schema nonsense` cannot silently register a new type. Explicit
14
+ * `pm schema add-type <name>` remains available for every valid type name.
15
+ */
9
16
  export declare function looksLikeSchemaSubcommandTypo(value: string): boolean;
10
17
  /**
11
18
  * Parse the integer `--order` value accepted by `pm schema add-status`.
@@ -5,7 +5,7 @@
5
5
  * registration and its focused contract tests.
6
6
  */
7
7
 
8
- !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]="af464386-4cc8-5110-b0b6-9f63224baa8e")}catch(e){}}();
8
+ !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]="2e6b30ea-5891-578a-9e6c-a612aa26361f")}catch(e){}}();
9
9
  import { EXIT_CODE, PmCliError, isPureSnakeCaseAlias, } from "../sdk/runtime-primitives.js";
10
10
  const SCHEMA_SHORTHAND_RESERVED_PREFIXES = [
11
11
  "add-",
@@ -23,13 +23,22 @@ const SCHEMA_SHORTHAND_RESERVED_TOKENS = new Set([
23
23
  "type",
24
24
  "types",
25
25
  ]);
26
- /** Return whether a shorthand token resembles a misspelled schema subcommand. */
26
+ /**
27
+ * Return whether a token must remain on the schema-action refusal path.
28
+ *
29
+ * Bare custom-type shorthand is intentionally limited to PascalCase names.
30
+ * Lowercase tokens occupy the action namespace, so a misspelling such as
31
+ * `pm schema nonsense` cannot silently register a new type. Explicit
32
+ * `pm schema add-type <name>` remains available for every valid type name.
33
+ */
27
34
  export function looksLikeSchemaSubcommandTypo(value) {
28
- const normalized = value.trim().toLowerCase();
35
+ const trimmed = value.trim();
36
+ const normalized = trimmed.toLowerCase();
29
37
  if (normalized.length === 0) {
30
38
  return false;
31
39
  }
32
- return (SCHEMA_SHORTHAND_RESERVED_TOKENS.has(normalized) ||
40
+ return (trimmed[0] === normalized[0] ||
41
+ SCHEMA_SHORTHAND_RESERVED_TOKENS.has(normalized) ||
33
42
  SCHEMA_SHORTHAND_RESERVED_PREFIXES.some((prefix) => normalized.startsWith(prefix)));
34
43
  }
35
44
  /**
@@ -62,4 +71,4 @@ export function parseSchemaOrderOption(raw) {
62
71
  }
63
72
  export { isPureSnakeCaseAlias };
64
73
  //# sourceMappingURL=schema-registration-helpers.js.map
65
- //# debugId=af464386-4cc8-5110-b0b6-9f63224baa8e
74
+ //# debugId=2e6b30ea-5891-578a-9e6c-a612aa26361f