@unbrained/pm-cli 2026.8.9 → 2026.8.10

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 (172) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +40 -0
  3. package/dist/cli/commander-usage.js +17 -12
  4. package/dist/cli/help-json-payload.js +51 -16
  5. package/dist/cli/main.js +7 -6
  6. package/dist/cli-bundle/bundle-manifest.json +165 -165
  7. package/dist/cli-bundle/chunks/chunk-2QYH4QMI.js +30 -0
  8. package/dist/cli-bundle/chunks/{chunk-YC3UF2IO.js → chunk-EBO7OUUE.js} +57 -57
  9. package/dist/cli-bundle/chunks/{chunk-GMX5YOI3.js → chunk-ETML5C6H.js} +48 -48
  10. package/dist/cli-bundle/chunks/chunk-JUDU4RO4.js +194 -0
  11. package/dist/cli-bundle/chunks/{chunk-PYO5GZU6.js → chunk-JZSNADRR.js} +5 -5
  12. package/dist/cli-bundle/chunks/{chunk-EF43KODO.js → chunk-MENWVGJW.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-5JO6R4BS.js → chunk-S4EITGLA.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-2DTCZXSD.js → chunk-TIGKWVLA.js} +9 -9
  15. package/dist/cli-bundle/chunks/{chunk-RJC7TPF4.js → chunk-TRWXF476.js} +2 -2
  16. package/dist/cli-bundle/chunks/chunk-TSLDTJLQ.js +2 -0
  17. package/dist/cli-bundle/chunks/{register-list-query-BUE7PTCU.js → register-list-query-OJ6ZXKV4.js} +2 -2
  18. package/dist/cli-bundle/chunks/{register-mutation-FC3XLVIK.js → register-mutation-DKI7QC7O.js} +2 -2
  19. package/dist/cli-bundle/chunks/register-operations-P5OGMT6I.js +2 -0
  20. package/dist/cli-bundle/chunks/{register-setup-UQDTNTLJ.js → register-setup-S3KT2LTH.js} +2 -2
  21. package/dist/cli-bundle/focused-chunks/{chunk-6DO4YQWZ.js → chunk-2COZ67XT.js} +2 -2
  22. package/dist/cli-bundle/focused-chunks/chunk-2EXI2DKR.js +4 -0
  23. package/dist/cli-bundle/focused-chunks/{chunk-KNEHLPBF.js → chunk-34SX654S.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/chunk-36FTZ2NT.js +2 -0
  25. package/dist/cli-bundle/focused-chunks/chunk-3CQECMKR.js +16 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-75774JWP.js +6 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-MRWVJ3ZG.js → chunk-7UN6BHHO.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/{chunk-VRXJSGIT.js → chunk-CHIBMEZR.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-DZGAHZZV.js +3 -0
  30. package/dist/cli-bundle/focused-chunks/chunk-FF4MNAYB.js +153 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-ZG54B4XG.js → chunk-GHTN2ILR.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-I4YM2I7S.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-IMDTEN7K.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-IW43E4XL.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-3WVHTUAW.js → chunk-JMVA4HKR.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-C3GCHDSQ.js → chunk-KR5RVXLQ.js} +31 -31
  37. package/dist/cli-bundle/focused-chunks/chunk-KSNJG4KI.js +16 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-73FIJONU.js → chunk-M6RPIXKC.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-MXYSIQ56.js +18 -0
  40. package/dist/cli-bundle/focused-chunks/chunk-RIIN5V4N.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-U46GQJNY.js → chunk-RKWSCYYN.js} +2 -2
  42. package/dist/cli-bundle/main.js +13 -13
  43. package/dist/cli-bundle/sdk-authoring.js +1 -1
  44. package/dist/cli-bundle/sdk-contracts.js +1 -1
  45. package/dist/cli-bundle/sdk-core.js +38 -38
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-graph.js +1 -1
  48. package/dist/cli-bundle/sdk-merge.js +1 -1
  49. package/dist/cli-bundle/sdk-query.js +1 -1
  50. package/dist/cli-bundle/sdk-runtime.js +1 -1
  51. package/dist/cli-bundle/sdk-testing.js +1 -1
  52. package/dist/cli-bundle/sdk.js +2 -2
  53. package/dist/core/diagnostics/remediation.js +9 -9
  54. package/dist/core/fs/fs-utils.d.ts +10 -0
  55. package/dist/core/fs/fs-utils.js +16 -4
  56. package/dist/core/item/item-format.js +3 -32
  57. package/dist/core/schema/fields-file.d.ts +1 -2
  58. package/dist/core/schema/fields-file.js +4 -11
  59. package/dist/core/schema/runtime-schema.js +3 -10
  60. package/dist/core/schema/status-defs-file.d.ts +1 -2
  61. package/dist/core/schema/status-defs-file.js +4 -32
  62. package/dist/core/schema/status-token.d.ts +2 -0
  63. package/dist/core/schema/status-token.js +32 -0
  64. package/dist/core/schema/type-workflows.d.ts +1 -2
  65. package/dist/core/schema/type-workflows.js +4 -11
  66. package/dist/core/shared/author.d.ts +1 -1
  67. package/dist/core/shared/author.js +21 -8
  68. package/dist/core/shared/errors.d.ts +4 -0
  69. package/dist/core/shared/errors.js +2 -2
  70. package/dist/core/shared/text-normalization.d.ts +1 -1
  71. package/dist/core/shared/text-normalization.js +2 -2
  72. package/dist/sdk/agent/command-recovery.d.ts +4 -0
  73. package/dist/sdk/agent/command-recovery.js +52 -0
  74. package/dist/sdk/agent/command-suggestions.d.ts +4 -0
  75. package/dist/sdk/agent/command-suggestions.js +67 -0
  76. package/dist/sdk/agent/create-option-policy.d.ts +12 -0
  77. package/dist/sdk/agent/create-option-policy.js +32 -0
  78. package/dist/sdk/agent/item-addressing.d.ts +19 -0
  79. package/dist/sdk/agent/item-addressing.js +208 -0
  80. package/dist/sdk/cli-bootstrap.d.ts +1 -1
  81. package/dist/sdk/cli-bootstrap.js +20 -5
  82. package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -4
  83. package/dist/sdk/cli-contracts/flag-contracts.js +62 -21
  84. package/dist/sdk/cli-contracts/registration-helpers.js +10 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.js +5 -3
  86. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +6 -0
  87. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  88. package/dist/sdk/cli-contracts/tool-parameter-tables.js +19 -4
  89. package/dist/sdk/cli-contracts/tool-schema.js +17 -4
  90. package/dist/sdk/context-intent-runtime.js +8 -5
  91. package/dist/sdk/context-signal-store.d.ts +34 -0
  92. package/dist/sdk/context-signal-store.js +24 -2
  93. package/dist/sdk/dependency-flag-validation.d.ts +15 -1
  94. package/dist/sdk/dependency-flag-validation.js +54 -2
  95. package/dist/sdk/generated-error-code-catalog.js +74 -2
  96. package/dist/sdk/governance/health.js +14 -7
  97. package/dist/sdk/governance/provenance-health.d.ts +13 -0
  98. package/dist/sdk/governance/provenance-health.js +63 -17
  99. package/dist/sdk/governance/validate-item-reader.d.ts +13 -0
  100. package/dist/sdk/governance/validate-item-reader.js +18 -0
  101. package/dist/sdk/governance/validate.d.ts +2 -2
  102. package/dist/sdk/governance/validate.js +15 -6
  103. package/dist/sdk/index.d.ts +4 -0
  104. package/dist/sdk/index.js +6 -2
  105. package/dist/sdk/lifecycle/close.js +17 -14
  106. package/dist/sdk/lifecycle/create.d.ts +2 -0
  107. package/dist/sdk/lifecycle/create.js +62 -9
  108. package/dist/sdk/lifecycle/update-many.js +39 -27
  109. package/dist/sdk/lifecycle/update.d.ts +6 -1
  110. package/dist/sdk/lifecycle/update.js +47 -10
  111. package/dist/sdk/merge/index.d.ts +1 -1
  112. package/dist/sdk/merge/index.js +3 -3
  113. package/dist/sdk/merge/install.d.ts +4 -0
  114. package/dist/sdk/merge/install.js +28 -16
  115. package/dist/sdk/merge/receipts.d.ts +3 -0
  116. package/dist/sdk/merge/receipts.js +81 -17
  117. package/dist/sdk/output-projection.js +24 -4
  118. package/dist/sdk/query/context.d.ts +2 -0
  119. package/dist/sdk/query/context.js +7 -4
  120. package/dist/sdk/query/light-metadata.d.ts +3 -0
  121. package/dist/sdk/query/light-metadata.js +19 -0
  122. package/dist/sdk/runtime.d.ts +4 -1
  123. package/dist/sdk/runtime.js +8 -3
  124. package/dist/sdk/schema-migration.js +7 -9
  125. package/dist/sdk/similarity-scoring.d.ts +1 -2
  126. package/dist/sdk/similarity-scoring.js +4 -16
  127. package/dist/sdk/workspace-snapshot.d.ts +4 -0
  128. package/dist/sdk/workspace-snapshot.js +24 -11
  129. package/docs/AGENT_GUIDE.md +3 -1
  130. package/docs/COMMANDS.md +8 -5
  131. package/docs/MERGE_SAFETY.md +7 -5
  132. package/docs/README.md +2 -5
  133. package/docs/READ_OUTPUT_CONTRACTS.md +2 -2
  134. package/docs/SDK.md +33 -8
  135. package/docs/SDK_AGENT_SESSION_CONTEXT.md +3 -2
  136. package/docs/SDK_CONTEXT.md +97 -0
  137. package/docs/SDK_CONTEXT_INTEGRITY.md +18 -3
  138. package/docs/agent-task-token-baseline.json +2 -2
  139. package/marketplace.json +2 -2
  140. package/package.json +5 -4
  141. package/packages/pm-beads/package.json +1 -1
  142. package/packages/pm-calendar/package.json +1 -1
  143. package/packages/pm-command-kit/package.json +1 -1
  144. package/packages/pm-digital-twin/package.json +1 -1
  145. package/packages/pm-governance-audit/package.json +1 -1
  146. package/packages/pm-guide-shell/package.json +1 -1
  147. package/packages/pm-kanban/package.json +1 -1
  148. package/packages/pm-lifecycle-hooks/package.json +1 -1
  149. package/packages/pm-linked-test-adapters/package.json +1 -1
  150. package/packages/pm-search-advanced/package.json +1 -1
  151. package/packages/pm-templates/package.json +1 -1
  152. package/packages/pm-todos/package.json +1 -1
  153. package/packages/pm-vcs/package.json +1 -1
  154. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  155. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  156. package/sdk/public-surface.json +194 -26
  157. package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +0 -194
  158. package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +0 -28
  159. package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +0 -2
  160. package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +0 -2
  161. package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +0 -153
  162. package/dist/cli-bundle/focused-chunks/chunk-3GSFUDAI.js +0 -2
  163. package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +0 -16
  164. package/dist/cli-bundle/focused-chunks/chunk-54TZJ4BM.js +0 -2
  165. package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +0 -2
  166. package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +0 -18
  167. package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +0 -4
  168. package/dist/cli-bundle/focused-chunks/chunk-P6BBIQRG.js +0 -6
  169. package/dist/cli-bundle/focused-chunks/chunk-PZAGVQNN.js +0 -3
  170. package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +0 -14
  171. package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +0 -2
  172. package/dist/cli-bundle/focused-chunks/chunk-XC2ZW3CJ.js +0 -2
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
9
- "version": "2026.8.9"
9
+ "version": "2026.8.10"
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.9",
16
+ "version": "2026.8.10",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.8.10 - 2026-08-10
4
+
5
+ ### Added
6
+
7
+ - GH-472: create error for missing required custom fields lists the field names ([pm-4bzq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-4bzq.toon))
8
+ - Provenance records distinguish unavailable configuration from resolver failures ([pm-lu6sca](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-lu6sca.toon))
9
+
10
+ ### Fixed
11
+
12
+ - GH-959 recurrence: snapshot restore planning races lease-expiry fixture cleanup ([pm-usq49n](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-usq49n.toon))
13
+ - GH-960: structured diagnostic notices preserve machine-readable JSON envelopes ([pm-embm6t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-embm6t.toon))
14
+ - GH-956: lossless acceptance-criteria replacement and unmatched-removal failure contract ([pm-lppm6y](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-lppm6y.toon))
15
+ - GH-954: fail-fast dependency target validation with explicit forward-reference intent ([pm-x3dq0l](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-x3dq0l.toon))
16
+ - Preserve executable recovery semantics across terminators, nested aliases, and tracker scope ([pm-szn67i](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-szn67i.toon))
17
+ - Measure source replication against an independently discovered denominator ([pm-b84irw](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-b84irw.toon))
18
+ - GH-515: pm test --add reorders linked tests — --only-last can execute a non-newest command ([pm-x2vx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-x2vx.toon))
19
+ - GH-490: unknown-command suggester ranks substring hits over synonyms/edit distance — pm log suggests 'extension catalog' ([pm-g543](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-g543.toon))
20
+ - GH-441: type-aware create help mislabels applicable flags as required (ignores create-mode) ([pm-qmjx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qmjx.toon))
21
+ - GH-519: close recovery bundle suggests --validate-close "<value\>" for an enum flag and hides the real resolution-fields blocker ([pm-ulqu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ulqu.toon))
22
+ - GH-950: item-addressing commands reject a consistent --id alias and misroute recovery ([pm-mkinft](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-mkinft.toon))
23
+ - GH-951: required-field policy can force fabricated relationship edges ([pm-st7wgu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-st7wgu.toon))
24
+ - GH-953: close recovery suggested_retry is not executable and drops supplied flags ([pm-p316vn](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-p316vn.toon))
25
+ - A sandboxed fixture records provenance from the host harness environment, so the suite is green on CI and deterministically red for any agent running it locally ([pm-xgah3a](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-xgah3a.toon))
26
+ - The session-role dimension is wired to a boolean child-session flag, so every nested claude-code invocation records the role literally as "1" and fleet analytics will group real work under a meaningless label ([pm-eq9dlw](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-eq9dlw.toon))
27
+ - GH-921/GH-922: merge-decision receipts are not durable in fresh-clone CI ([pm-1j5j21](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-1j5j21.toon))
28
+ - GH-948: version-skewed pm invocations silently rewrite the tracked merge fence during unrelated commands ([pm-l56d0o](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-l56d0o.toon))
29
+ - A measurement ratchet bound stops enforcing the moment its owner reaches a terminal status, so every guarded population goes unbounded exactly when its fix ships ([pm-5z9plz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-5z9plz.toon))
30
+ - The docs tree grows one file per shipped contract, so 39 of 51 documents are stubs and the SDK's story is split across twelve files ([pm-9hv1o7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-9hv1o7.toon))
31
+ - The status-token normalization rule is replicated at five sites and the replication gate covers none of them ([pm-ulxdqp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ulxdqp.toon))
32
+ - The two slowest governance commands load every item body while twenty other SDK modules use the light read path ([pm-sr3xzg](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-sr3xzg.toon))
33
+ - GH-946: context signal-store staleness warning has no executable remediation contract ([pm-wn1jy1](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-wn1jy1.toon))
34
+ - GH-943: health remediation points at validate while actionable unknown-author recovery remains undiscoverable ([pm-jwmszf](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-jwmszf.toon))
35
+ - GH-942: expose the lightweight all-item metadata reader through the public SDK ([pm-yrj7qr](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-yrj7qr.toon))
36
+ - GH-941: pm read omits notes without declaring their omission and invites duplicate writes ([pm-swfelk](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-swfelk.toon))
37
+
38
+ ### Other
39
+
40
+ - Refresh pinned GitHub Actions for PR \#958 with exact-head compatibility proof ([pm-obh6lo](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-obh6lo.toon))
41
+ - The measurement ratchet floors only aggregate graph totals, so converting typed semantic edges to untyped ones passes every declaration ([pm-70jyvw](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-70jyvw.toon))
42
+
3
43
  ## 2026.8.9 - 2026-08-09
4
44
 
5
45
  ### Fixed
@@ -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]="042ecf17-9265-5496-bbee-4e7a07371618")}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]="a327ea76-ca7d-5f8f-aa2d-2f6f43052913")}catch(e){}}();
3
3
  import { pathExists, resolveItemTypeRegistry, EXIT_CODE, getSettingsPath, resolvePmRoot, readSettings, getActiveExtensionRegistrations, 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";
@@ -9,6 +9,8 @@ import { getCommandPath } from "./registration-helpers.js";
9
9
  import { EXECUTABLE_COMMAND_ALIASES, normalizeBootstrapInvocation, parseBootstrapHelpRequest, parseBootstrapGlobalOptions, parseBootstrapCommandName, } from "./bootstrap-args.js";
10
10
  import { extractProvidedOptionFlags, normalizeLongFlag, renderPmCommand, } from "./argv-utils.js";
11
11
  import { normalizeExtensionNameForMatch } from "./commands/extension/shared.js";
12
+ import { rankCommandPaths } from "../sdk/agent/command-suggestions.js";
13
+ import { renderMissingOptionRetry } from "../sdk/agent/command-recovery.js";
12
14
  /** Supported values accepted by the builtin type help contract. */
13
15
  export const BUILTIN_TYPE_HELP_VALUES = BUILTIN_ITEM_TYPE_VALUES.join("|");
14
16
  const OPTIONAL_PACKAGE_INSTALL_HINTS = {
@@ -388,9 +390,14 @@ function scoreRuntimeCommandCandidates(params) {
388
390
  .map(([commandPath]) => commandPath);
389
391
  }
390
392
  function resolveUnknownCommandCandidates(params) {
393
+ const semanticCandidates = rankCommandPaths(params.commandPaths, params.primaryToken);
391
394
  const rankedCandidates = scoreRuntimeCommandCandidates(params);
392
395
  const installedPackageCandidates = collectInstalledPackageCommandPathHints(params.primaryToken, params.extensionDescriptors).filter((commandPath) => params.commandPaths.includes(commandPath));
393
- return dedupeStrings([...rankedCandidates, ...installedPackageCandidates]);
396
+ return dedupeStrings([
397
+ ...semanticCandidates,
398
+ ...rankedCandidates,
399
+ ...installedPackageCandidates,
400
+ ]);
394
401
  }
395
402
  function resolveUnknownCommandFallbacks(commandPaths) {
396
403
  const topLevel = [
@@ -556,15 +563,13 @@ function resolveSuggestedRetryForMissingOption(message, invocationArgv) {
556
563
  if (!requiredOptionToken?.startsWith("--")) {
557
564
  return undefined;
558
565
  }
559
- const hasFlag = invocationArgv.some((token) => token === requiredOptionToken ||
560
- token.startsWith(`${requiredOptionToken}=`));
561
- return hasFlag
562
- ? undefined
563
- : renderAttemptedCommand([
564
- ...invocationArgv,
565
- requiredOptionToken,
566
- "<value>",
567
- ]);
566
+ const commandName = parseBootstrapCommandName(invocationArgv);
567
+ if (!commandName) {
568
+ return undefined;
569
+ }
570
+ return renderMissingOptionRetry(invocationArgv, commandName, [
571
+ requiredOptionToken,
572
+ ]);
568
573
  }
569
574
  /** Implements resolve commander usage context for the public runtime surface of this module. */
570
575
  export async function resolveCommanderUsageContext(error, rootProgram, extensionDescriptors, guidanceOverrides = {}) {
@@ -647,4 +652,4 @@ export const _testOnly = {
647
652
  suggestNearestLongFlags,
648
653
  };
649
654
  //# sourceMappingURL=commander-usage.js.map
650
- //# debugId=042ecf17-9265-5496-bbee-4e7a07371618
655
+ //# debugId=a327ea76-ca7d-5f8f-aa2d-2f6f43052913
@@ -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]="a33bada3-c1a1-5343-8a77-51dc76dd5a11")}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]="42b9782e-2151-54b0-98ce-8c5ae810c424")}catch(e){}}();
3
3
  import { hasSubcommandFlagContractsForCommand, PM_CORE_COMMAND_NAMES, } from "../sdk/cli-contracts.js";
4
4
  import { commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveTypeDefinition, EXIT_CODE, printError, writeStdout, } from "../sdk/runtime-primitives.js";
5
5
  import { buildDynamicExtensionHelpOptionSummaries, mergeHelpOptionSummaries, findCommandByPath, findDirectChildCommand, commandAliases, } from "./extension-command-help.js";
@@ -9,6 +9,7 @@ import { parseBootstrapGlobalOptions, parseBootstrapHelpRequest, parseBootstrapC
9
9
  import { extractProvidedOptionFlags, renderPmCommand } from "./argv-utils.js";
10
10
  import { formatCommanderErrorForJson } from "./error-guidance.js";
11
11
  import { BUILTIN_TYPE_HELP_VALUES, buildUnknownCommandGuidanceFromRuntime, } from "./commander-usage.js";
12
+ import { resolveCreateExplicitEmptyFlag } from "../sdk/agent/create-option-policy.js";
12
13
  function resolveCommandFromPathTokens(root, pathTokens) {
13
14
  if (pathTokens.length === 0) {
14
15
  return root;
@@ -303,6 +304,39 @@ function appendTypeOptionHelpLines(lines, typeDefinition) {
303
304
  }
304
305
  }
305
306
  }
307
+ function buildCreatePolicyRequiredSets(commandName, typeDefinition) {
308
+ const progressive = commandName === "create"
309
+ ? new Set(["title", "type"])
310
+ : new Set();
311
+ const strict = new Set(progressive);
312
+ if (commandName === "create") {
313
+ for (const option of [
314
+ ...typeDefinition.required_create_fields,
315
+ ...typeDefinition.required_create_repeatables,
316
+ ]) {
317
+ strict.add(option);
318
+ }
319
+ }
320
+ return { progressive, strict };
321
+ }
322
+ function appendStrictCreatePolicyHelpLines(lines, typeDefinition, progressiveRequired, strictRequired) {
323
+ const progressive = new Set(progressiveRequired);
324
+ const strictOnly = strictRequired.filter((option) => !progressive.has(option));
325
+ const toFlags = (options) => options.length > 0
326
+ ? options
327
+ .map((option) => commandOptionFlagLabel("create", option))
328
+ .join(", ")
329
+ : "none";
330
+ lines.push(` required in strict mode: ${toFlags(strictOnly)}`);
331
+ const explicitEmptyFlags = strictOnly
332
+ .map(resolveCreateExplicitEmptyFlag)
333
+ .filter((flag) => flag !== undefined);
334
+ lines.push(` explicit empty assertion: ${explicitEmptyFlags.length > 0 ? explicitEmptyFlags.join(", ") : "none"}`);
335
+ if (["Reminder", "Meeting", "Event"].includes(typeDefinition.name)) {
336
+ lines.push(" schedule preset: --schedule-preset lightweight switches schedule artifacts to progressive required-option policy.");
337
+ lines.push(" strict parity remains available via --create-mode strict.");
338
+ }
339
+ }
306
340
  function buildCreateUpdatePolicyHelpText(commandName, typeRegistry, argv) {
307
341
  const selectedTypeRaw = parseBootstrapTypeValue(argv);
308
342
  if (!selectedTypeRaw) {
@@ -317,16 +351,18 @@ function buildCreateUpdatePolicyHelpText(commandName, typeRegistry, argv) {
317
351
  ` active type values: ${allowed}`,
318
352
  ].join("\n");
319
353
  }
320
- const baseRequired = commandName === "create"
321
- ? new Set([
322
- "title",
323
- "description",
324
- "type",
325
- ...typeDefinition.required_create_fields,
326
- ...typeDefinition.required_create_repeatables,
327
- ])
328
- : new Set();
329
- const policyState = resolveCommandOptionPolicyState(typeDefinition, commandName, baseRequired);
354
+ const argumentTerminatorIndex = argv.indexOf("--");
355
+ const optionArgv = argumentTerminatorIndex < 0 ? argv : argv.slice(0, argumentTerminatorIndex);
356
+ const createModeTokenIndex = optionArgv.findIndex((token) => token === "--create-mode" || token.startsWith("--create-mode="));
357
+ const createModeToken = createModeTokenIndex < 0
358
+ ? undefined
359
+ : optionArgv[createModeTokenIndex]?.startsWith("--create-mode=")
360
+ ? optionArgv[createModeTokenIndex]?.slice("--create-mode=".length)
361
+ : optionArgv[createModeTokenIndex + 1];
362
+ const strictCreateMode = commandName === "create" && createModeToken?.toLowerCase() === "strict";
363
+ const requiredSets = buildCreatePolicyRequiredSets(commandName, typeDefinition);
364
+ const progressivePolicyState = resolveCommandOptionPolicyState(typeDefinition, commandName, requiredSets.progressive);
365
+ const policyState = resolveCommandOptionPolicyState(typeDefinition, commandName, strictCreateMode ? requiredSets.strict : requiredSets.progressive);
330
366
  const toFlags = (options) => options.length > 0
331
367
  ? options
332
368
  .map((option) => commandOptionFlagLabel(commandName, option))
@@ -339,10 +375,9 @@ function buildCreateUpdatePolicyHelpText(commandName, typeRegistry, argv) {
339
375
  ` disabled: ${toFlags(policyState.disabled)}`,
340
376
  ` hidden: ${toFlags(policyState.hidden)}`,
341
377
  ];
342
- if (commandName === "create" &&
343
- ["Reminder", "Meeting", "Event"].includes(typeDefinition.name)) {
344
- lines.push(" schedule preset: --schedule-preset lightweight switches schedule artifacts to progressive required-option policy.");
345
- lines.push(" strict parity remains available via --create-mode strict.");
378
+ if (commandName === "create") {
379
+ const strictPolicyState = resolveCommandOptionPolicyState(typeDefinition, commandName, requiredSets.strict);
380
+ appendStrictCreatePolicyHelpLines(lines, typeDefinition, progressivePolicyState.required, strictPolicyState.required);
346
381
  }
347
382
  appendTypeOptionHelpLines(lines, typeDefinition);
348
383
  if (policyState.errors.length > 0) {
@@ -376,4 +411,4 @@ export const _testOnly = {
376
411
  resolveCommandFromPathTokens,
377
412
  };
378
413
  //# sourceMappingURL=help-json-payload.js.map
379
- //# debugId=a33bada3-c1a1-5343-8a77-51dc76dd5a11
414
+ //# debugId=42b9782e-2151-54b0-98ce-8c5ae810c424
package/dist/cli/main.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * @module cli/main
4
4
  */
5
5
 
6
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="52c705ab-a5c4-5b94-b806-4eaac31b6e9c")}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]="555e37d0-385a-5748-b0a5-760f48c94e90")}catch(e){}}();
7
7
  import { Command } from "commander";
8
8
  import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
9
9
  import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
@@ -2307,13 +2307,14 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
2307
2307
  runtimeExtensionDiscoverySnapshotCache = null;
2308
2308
  activeRuntimeExtensionCommandDescriptors = new Map();
2309
2309
  resetActiveExtensionRuntimeState();
2310
- const bootstrapInvocation = normalizeBootstrapInvocation(rawArgv);
2311
- const invocationArgv = bootstrapInvocation.argv;
2312
- const invocationProcessArgv = [process.argv[0], process.argv[1], ...invocationArgv];
2313
- const isBareInvocation = invocationArgv.length === 0;
2310
+ let invocationArgv = [...rawArgv];
2314
2311
  let restorePmAuthor;
2315
2312
  let restorePagerPolicy;
2316
2313
  try {
2314
+ const bootstrapInvocation = normalizeBootstrapInvocation(rawArgv);
2315
+ invocationArgv = bootstrapInvocation.argv;
2316
+ const invocationProcessArgv = [process.argv[0], process.argv[1], ...invocationArgv];
2317
+ const isBareInvocation = invocationArgv.length === 0;
2317
2318
  const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);
2318
2319
  if (bootstrapGlobal.authorMissingValue) {
2319
2320
  throw new PmCliError("--author requires a non-empty value.", EXIT_CODE.USAGE, {
@@ -2454,4 +2455,4 @@ export const _testOnly = {
2454
2455
  wrapThrownErrorForSentry,
2455
2456
  };
2456
2457
  //# sourceMappingURL=main.js.map
2457
- //# debugId=52c705ab-a5c4-5b94-b806-4eaac31b6e9c
2458
+ //# debugId=555e37d0-385a-5748-b0a5-760f48c94e90