@unbrained/pm-cli 2026.8.16 → 2026.8.18

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 (225) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +4 -3
  3. package/CHANGELOG.md +65 -6
  4. package/README.md +16 -16
  5. package/dist/cli/error-guidance.js +7 -4
  6. package/dist/cli/public.d.ts +2 -0
  7. package/dist/cli/public.js +21 -0
  8. package/dist/cli/register-list-query.js +132 -51
  9. package/dist/cli/register-mutation.js +4 -4
  10. package/dist/cli-bundle/bundle-manifest.json +148 -148
  11. package/dist/cli-bundle/chunks/chunk-5UZZAJKR.js +3 -0
  12. package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +2 -0
  13. package/dist/cli-bundle/chunks/chunk-BSK2IN3C.js +8 -0
  14. package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +197 -0
  15. package/dist/cli-bundle/chunks/{chunk-73UGEBRS.js → chunk-GNFAFIJI.js} +10 -10
  16. package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +35 -0
  17. package/dist/cli-bundle/chunks/{chunk-RIS565OA.js → chunk-PVRUN5ZS.js} +5 -5
  18. package/dist/cli-bundle/chunks/chunk-RZQTVMRQ.js +2 -0
  19. package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
  20. package/dist/cli-bundle/chunks/chunk-UYCLQVL2.js +13 -0
  21. package/dist/cli-bundle/chunks/{chunk-URW4QRMI.js → chunk-YRGOLZA7.js} +59 -55
  22. package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +11 -0
  23. package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +20 -0
  24. package/dist/cli-bundle/chunks/{register-operations-KGDNRMCL.js → register-operations-4HTFC6J7.js} +2 -2
  25. package/dist/cli-bundle/chunks/{register-setup-NVXBOD5I.js → register-setup-PPPEF3SN.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-C7JUBRFP.js → chunk-3TKWMNKF.js} +3 -3
  28. package/dist/cli-bundle/focused-chunks/chunk-5AF3ZBNB.js +155 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-CODV5LUT.js → chunk-EUEGXZ2A.js} +3 -3
  31. package/dist/cli-bundle/focused-chunks/{chunk-4JPEBFFC.js → chunk-EX6MKP2X.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-SSNDYZTM.js → chunk-K43KKAFS.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-6ROKKT4X.js → chunk-M62NO7EI.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-T46KLOIB.js → chunk-ODOVCP45.js} +47 -47
  35. package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +16 -0
  36. package/dist/cli-bundle/focused-chunks/chunk-TN4AE665.js +26 -0
  37. package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-UI6AJ5TD.js +4 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-V5XTGLK7.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +2 -0
  43. package/dist/cli-bundle/main.js +7 -7
  44. package/dist/cli-bundle/sdk-authoring.js +1 -1
  45. package/dist/cli-bundle/sdk-contracts.js +1 -1
  46. package/dist/cli-bundle/sdk-core.js +31 -31
  47. package/dist/cli-bundle/sdk-governance.js +1 -1
  48. package/dist/cli-bundle/sdk-graph.js +1 -1
  49. package/dist/cli-bundle/sdk-merge.js +32 -32
  50. package/dist/cli-bundle/sdk-query.js +1 -1
  51. package/dist/cli-bundle/sdk-runtime.js +1 -1
  52. package/dist/cli-bundle/sdk-testing.js +1 -1
  53. package/dist/cli-bundle/sdk.js +4 -2
  54. package/dist/core/config/nested-settings.js +8 -2
  55. package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
  56. package/dist/core/extensions/exporter-output-contract.js +67 -0
  57. package/dist/core/extensions/extension-types.d.ts +36 -1
  58. package/dist/core/extensions/extension-types.js +2 -2
  59. package/dist/core/extensions/loader.js +43 -48
  60. package/dist/core/extensions/manifest-schema.d.ts +20 -0
  61. package/dist/core/extensions/manifest-schema.js +52 -0
  62. package/dist/core/history/event-index.d.ts +5 -0
  63. package/dist/core/history/event-index.js +133 -27
  64. package/dist/core/history/replay.js +32 -14
  65. package/dist/core/schema/fields-file.d.ts +1 -1
  66. package/dist/core/schema/fields-file.js +2 -2
  67. package/dist/core/schema/runtime-field-values.js +115 -9
  68. package/dist/core/schema/runtime-schema.d.ts +3 -1
  69. package/dist/core/schema/runtime-schema.js +124 -3
  70. package/dist/core/sentry/helpers.js +3 -3
  71. package/dist/core/shared/constants.js +5 -2
  72. package/dist/core/shared/errors.d.ts +10 -0
  73. package/dist/core/shared/errors.js +2 -2
  74. package/dist/core/shared/time.d.ts +2 -0
  75. package/dist/core/shared/time.js +27 -2
  76. package/dist/core/store/settings-validator.d.ts +4 -0
  77. package/dist/core/store/settings-validator.js +3 -2
  78. package/dist/core/store/settings.js +8 -2
  79. package/dist/mcp/tool-definitions.js +12 -7
  80. package/dist/sdk/agent/refusal-reachability.d.ts +46 -6
  81. package/dist/sdk/agent/refusal-reachability.js +350 -8
  82. package/dist/sdk/authoring.d.ts +1 -1
  83. package/dist/sdk/authoring.js +2 -2
  84. package/dist/sdk/cli-bootstrap.d.ts +2 -2
  85. package/dist/sdk/cli-bootstrap.js +4 -4
  86. package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
  87. package/dist/sdk/cli-contracts/command-aliases.js +64 -13
  88. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
  89. package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
  90. package/dist/sdk/cli-contracts/flag-contracts.js +11 -7
  91. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +70 -0
  92. package/dist/sdk/cli-contracts/grammar-contracts.js +345 -0
  93. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +19 -2
  94. package/dist/sdk/cli-contracts/runtime-contracts.js +61 -14
  95. package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -4
  96. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  97. package/dist/sdk/cli-contracts/tool-schema.js +20 -11
  98. package/dist/sdk/cli-contracts.d.ts +2 -2
  99. package/dist/sdk/cli-contracts.js +4 -4
  100. package/dist/sdk/completion.js +13 -15
  101. package/dist/sdk/compose.d.ts +9 -5
  102. package/dist/sdk/compose.js +33 -3
  103. package/dist/sdk/context-intent-contracts.d.ts +8 -4
  104. package/dist/sdk/context-intent-contracts.js +76 -31
  105. package/dist/sdk/contracts.d.ts +1 -0
  106. package/dist/sdk/contracts.js +3 -2
  107. package/dist/sdk/core.d.ts +1 -1
  108. package/dist/sdk/core.js +3 -3
  109. package/dist/sdk/dependency-flag-validation.d.ts +9 -2
  110. package/dist/sdk/dependency-flag-validation.js +101 -35
  111. package/dist/sdk/environment/host-environment-errors.js +25 -7
  112. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +78 -14
  113. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +62 -14
  114. package/dist/sdk/governance/assurance-action.d.ts +3 -7
  115. package/dist/sdk/governance/assurance-action.js +97 -2
  116. package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
  117. package/dist/sdk/governance/boundary-fixtures.js +201 -0
  118. package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
  119. package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
  120. package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
  121. package/dist/sdk/governance/defect-recurrence.js +523 -0
  122. package/dist/sdk/governance.d.ts +2 -0
  123. package/dist/sdk/governance.js +4 -2
  124. package/dist/sdk/graph/governance.js +3 -2
  125. package/dist/sdk/guide-topics.js +193 -4
  126. package/dist/sdk/index.d.ts +7 -3
  127. package/dist/sdk/index.js +8 -5
  128. package/dist/sdk/init-agent-guidance.js +3 -3
  129. package/dist/sdk/lifecycle/create.js +4 -2
  130. package/dist/sdk/lifecycle/update-many.js +15 -2
  131. package/dist/sdk/lifecycle/update.js +5 -2
  132. package/dist/sdk/linked-artifacts.js +63 -14
  133. package/dist/sdk/mutation-events.d.ts +18 -2
  134. package/dist/sdk/mutation-events.js +59 -16
  135. package/dist/sdk/output.d.ts +44 -0
  136. package/dist/sdk/output.js +28 -2
  137. package/dist/sdk/query/complete-list.d.ts +94 -0
  138. package/dist/sdk/query/complete-list.js +173 -0
  139. package/dist/sdk/query/get.d.ts +2 -0
  140. package/dist/sdk/query/get.js +32 -7
  141. package/dist/sdk/query/list.js +5 -2
  142. package/dist/sdk/query.d.ts +1 -0
  143. package/dist/sdk/query.js +3 -2
  144. package/dist/sdk/read-output-contracts.d.ts +2 -2
  145. package/dist/sdk/read-output-contracts.js +36 -9
  146. package/dist/sdk/relationship-analytics.js +90 -14
  147. package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
  148. package/dist/sdk/relationship-kinds/contract.js +3 -2
  149. package/dist/sdk/relationships.d.ts +1 -1
  150. package/dist/sdk/relationships.js +11 -2
  151. package/dist/sdk/runtime-extended-actions.js +10 -2
  152. package/dist/sdk/runtime.d.ts +8 -2
  153. package/dist/sdk/runtime.js +11 -8
  154. package/dist/sdk/schema.d.ts +1 -0
  155. package/dist/sdk/schema.js +2 -2
  156. package/dist/sdk/test/execution.d.ts +6 -2
  157. package/dist/sdk/test/execution.js +39 -13
  158. package/dist/types.d.ts +34 -2
  159. package/dist/types.js +4 -2
  160. package/docs/AGENT_GUIDE.md +25 -9
  161. package/docs/CLI_GRAMMAR.md +106 -0
  162. package/docs/COMMANDS.md +23 -23
  163. package/docs/CONFIGURATION.md +58 -1
  164. package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
  165. package/docs/DEFECT_RECURRENCE.md +134 -0
  166. package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
  167. package/docs/ONBOARDING.md +4 -4
  168. package/docs/QUICKSTART.md +1 -1
  169. package/docs/README.md +4 -0
  170. package/docs/RELATIONSHIP_GRAPH.md +16 -2
  171. package/docs/RELEASING.md +30 -6
  172. package/docs/SDK.md +74 -7
  173. package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
  174. package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
  175. package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
  176. package/docs/TESTING.md +18 -1
  177. package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
  178. package/docs/agent-task-token-baseline.json +5 -5
  179. package/marketplace.json +2 -2
  180. package/package.json +8 -5
  181. package/packages/pm-beads/package.json +1 -1
  182. package/packages/pm-calendar/package.json +1 -1
  183. package/packages/pm-command-kit/package.json +1 -1
  184. package/packages/pm-digital-twin/package.json +1 -1
  185. package/packages/pm-governance-audit/package.json +1 -1
  186. package/packages/pm-guide-shell/package.json +1 -1
  187. package/packages/pm-kanban/package.json +1 -1
  188. package/packages/pm-lifecycle-hooks/package.json +1 -1
  189. package/packages/pm-linked-test-adapters/package.json +1 -1
  190. package/packages/pm-search-advanced/package.json +1 -1
  191. package/packages/pm-templates/package.json +1 -1
  192. package/packages/pm-todos/package.json +1 -1
  193. package/packages/pm-vcs/package.json +1 -1
  194. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  195. package/plugins/pm-claude/skills/pm-audit/SKILL.md +26 -0
  196. package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
  197. package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
  198. package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
  199. package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
  200. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  201. package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
  202. package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
  203. package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
  204. package/sdk/public-surface.json +1243 -54
  205. package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +0 -2
  206. package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +0 -35
  207. package/dist/cli-bundle/chunks/chunk-I2LUWWR5.js +0 -3
  208. package/dist/cli-bundle/chunks/chunk-IC5W2T34.js +0 -2
  209. package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
  210. package/dist/cli-bundle/chunks/chunk-PANOOBIS.js +0 -13
  211. package/dist/cli-bundle/chunks/chunk-TK6N7HGM.js +0 -8
  212. package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +0 -197
  213. package/dist/cli-bundle/chunks/register-list-query-EYCXHZAG.js +0 -10
  214. package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +0 -20
  215. package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +0 -155
  216. package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +0 -2
  217. package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +0 -2
  218. package/dist/cli-bundle/focused-chunks/chunk-HAACPSUW.js +0 -2
  219. package/dist/cli-bundle/focused-chunks/chunk-J4UFYHOD.js +0 -2
  220. package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +0 -2
  222. package/dist/cli-bundle/focused-chunks/chunk-NJ5RLEFD.js +0 -26
  223. package/dist/cli-bundle/focused-chunks/chunk-QYZERYR5.js +0 -4
  224. package/dist/cli-bundle/focused-chunks/chunk-TZATVC4G.js +0 -16
  225. package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +0 -2
@@ -4,7 +4,7 @@
4
4
  * Integrates Sentry instrumentation and release diagnostics for Helpers.
5
5
  */
6
6
 
7
- !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]="ffe56aed-b794-5bf4-99fd-e3c5fe065163")}catch(e){}}();
7
+ !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]="5e6ba316-b067-51df-abeb-c3e3488a504d")}catch(e){}}();
8
8
  import { getSentry } from "./instrument.js";
9
9
  import { PmCliError } from "../shared/errors.js";
10
10
  import { EXIT_CODE } from "../shared/constants.js";
@@ -236,7 +236,7 @@ export function shouldCaptureCliError(error) {
236
236
  }
237
237
  if (error instanceof Error &&
238
238
  error.name === "AbortError" &&
239
- /(?:ctrl\+c|sigint|user[- ]initiated)/i.test(error.message)) {
239
+ /(?:ctrl\+[cd]|sigint|user[- ]initiated)/i.test(error.message)) {
240
240
  return false;
241
241
  }
242
242
  if (typeof error === "object" &&
@@ -270,4 +270,4 @@ export async function sentryFlush(timeoutMs = 3000) {
270
270
  }
271
271
  }
272
272
  //# sourceMappingURL=helpers.js.map
273
- //# debugId=ffe56aed-b794-5bf4-99fd-e3c5fe065163
273
+ //# debugId=5e6ba316-b067-51df-abeb-c3e3488a504d
@@ -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]="36b908f0-ea19-5adc-8ccd-320ad3c3b1fe")}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]="45e1dcb9-d2d6-52d7-b0b0-a57556a3fb03")}catch(e){}}();
3
3
  import { createDefaultExtensionGovernancePolicy } from "../extensions/extension-types.js";
4
4
  /**
5
5
  * Canonical default lifecycle status model and workflow role mapping.
@@ -271,6 +271,9 @@ export const SETTINGS_DEFAULTS = {
271
271
  output: {
272
272
  default_format: "toon",
273
273
  },
274
+ ux: {
275
+ deprecation_hints: true,
276
+ },
274
277
  history: {
275
278
  missing_stream: "auto_create",
276
279
  compact_policy: {
@@ -477,4 +480,4 @@ export function resolveTelemetryErrorCategory(errorCode) {
477
480
  return "unknown";
478
481
  }
479
482
  //# sourceMappingURL=constants.js.map
480
- //# debugId=36b908f0-ea19-5adc-8ccd-320ad3c3b1fe
483
+ //# debugId=45e1dcb9-d2d6-52d7-b0b0-a57556a3fb03
@@ -63,6 +63,16 @@ export interface PmCliErrorContext {
63
63
  measurement_id?: string;
64
64
  /** Assurance measurement source kind involved in a refusal, when known. */
65
65
  source_kind?: string;
66
+ /** Source item whose endpoint metadata violated a relationship contract. */
67
+ source_id?: string;
68
+ /** Source item creation time used to evaluate a temporal relationship contract. */
69
+ source_created_at?: string;
70
+ /** Target item whose endpoint metadata violated a relationship contract. */
71
+ target_id?: string;
72
+ /** Target item creation time used to evaluate a temporal relationship contract. */
73
+ target_created_at?: string;
74
+ /** Temporal relationship rule evaluated for the source and target. */
75
+ temporal_order?: string;
66
76
  /** Validate or health check selected by an assurance source, when known. */
67
77
  check?: string;
68
78
  /** Serialization format involved in a parse failure. */
@@ -1,6 +1,6 @@
1
1
  /** Implements the exported pm cli error runtime abstraction for core/shared/errors.ts. */
2
2
 
3
- !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]="bf08255e-7ef4-5929-8431-2df83d98d0ba")}catch(e){}}();
3
+ !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]="c863f07f-428b-5b7f-a5f7-23e7f5fa749a")}catch(e){}}();
4
4
  export class PmCliError extends Error {
5
5
  /** Value that configures or reports exit code for this contract. */
6
6
  exitCode;
@@ -18,4 +18,4 @@ export class PmCliError extends Error {
18
18
  }
19
19
  }
20
20
  //# sourceMappingURL=errors.js.map
21
- //# debugId=bf08255e-7ef4-5929-8431-2df83d98d0ba
21
+ //# debugId=c863f07f-428b-5b7f-a5f7-23e7f5fa749a
@@ -2,6 +2,8 @@
2
2
  export declare function nowIso(): string;
3
3
  /** Implements check whether timestamp literal for the public runtime surface of this module. */
4
4
  export declare function isTimestampLiteral(input: string): boolean;
5
+ /** Return whether a string is a calendar-valid RFC 3339 date-time. */
6
+ export declare function isRfc3339DateTime(input: string): boolean;
5
7
  /** Implements compare timestamp strings for the public runtime surface of this module. */
6
8
  export declare function compareTimestampStrings(left: string, right: string): number;
7
9
  /** Timestamp-bearing record accepted by shared inclusive bound filtering. */
@@ -4,7 +4,7 @@
4
4
  * Provides shared primitives and utilities for Time.
5
5
  */
6
6
 
7
- !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]="6be1497f-a0d5-518b-bf6a-e549b18fad8a")}catch(e){}}();
7
+ !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]="7887e752-b1b8-5c5e-9dd8-93b41cb757af")}catch(e){}}();
8
8
  import { PmCliError } from "./errors.js";
9
9
  import { evictOldestMemoEntries } from "./memo.js";
10
10
  import { EXIT_CODE } from "./constants.js";
@@ -15,6 +15,7 @@ const COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})$/;
15
15
  const COMPACT_DATETIME = /^(\d{4})(\d{2})(\d{2})(?:[T\s]?)(\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
16
16
  const HYPHEN_TIME = /^(\d{4}-\d{2}-\d{2})[T\s](\d{2})-(\d{2})(?:-(\d{2}))?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
17
17
  const COMPACT_TIME = /^(\d{4}-\d{2}-\d{2})[T\s](\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
18
+ const RFC_3339_DATE_TIME = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-](\d{2}):(\d{2}))$/i;
18
19
  /** Implements now iso for the public runtime surface of this module. */
19
20
  export function nowIso() {
20
21
  return nextReproducibleTimestamp() ?? new Date().toISOString();
@@ -23,6 +24,30 @@ export function nowIso() {
23
24
  export function isTimestampLiteral(input) {
24
25
  return Number.isFinite(Date.parse(input));
25
26
  }
27
+ /** Return whether a string is a calendar-valid RFC 3339 date-time. */
28
+ export function isRfc3339DateTime(input) {
29
+ const match = RFC_3339_DATE_TIME.exec(input);
30
+ if (!match || !Number.isFinite(Date.parse(input)))
31
+ return false;
32
+ const [, yearRaw, monthRaw, dayRaw, hourRaw, minuteRaw, secondRaw, offsetHourRaw, offsetMinuteRaw,] = match;
33
+ const [year, month, day, hour, minute, second] = [
34
+ yearRaw,
35
+ monthRaw,
36
+ dayRaw,
37
+ hourRaw,
38
+ minuteRaw,
39
+ secondRaw,
40
+ ].map(Number);
41
+ return (month >= 1 &&
42
+ month <= 12 &&
43
+ day >= 1 &&
44
+ day <= daysInUtcMonth(year, month - 1) &&
45
+ hour <= 23 &&
46
+ minute <= 59 &&
47
+ second <= 59 &&
48
+ (offsetHourRaw === undefined || Number(offsetHourRaw) <= 23) &&
49
+ (offsetMinuteRaw === undefined || Number(offsetMinuteRaw) <= 59));
50
+ }
26
51
  /**
27
52
  * Memoized `Date.parse` for {@link compareTimestampStrings}. Sort comparators call it
28
53
  * O(n log n) times over a corpus whose timestamp strings repeat heavily, and
@@ -273,4 +298,4 @@ export const _testOnly = {
273
298
  isWhitespaceCharacter,
274
299
  };
275
300
  //# sourceMappingURL=time.js.map
276
- //# debugId=6be1497f-a0d5-518b-bf6a-e549b18fad8a
301
+ //# debugId=7887e752-b1b8-5c5e-9dd8-93b41cb757af
@@ -35,6 +35,10 @@ export interface ParsedSettings {
35
35
  output: {
36
36
  default_format: "toon" | "json";
37
37
  };
38
+ /** Agent and human interaction preferences. */
39
+ ux?: {
40
+ deprecation_hints?: boolean;
41
+ };
38
42
  /** Value that configures or reports history for this contract. */
39
43
  history?: {
40
44
  missing_stream: "auto_create" | "strict_error";
@@ -12,7 +12,7 @@
12
12
  * byte-identical to the previous implementation.
13
13
  */
14
14
 
15
- !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]="027f6acb-15cc-5707-85ed-b5298b6b6abe")}catch(e){}}();
15
+ !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]="8883f930-193e-5133-835a-f15b1b62f6be")}catch(e){}}();
16
16
  import { GOVERNANCE_PRESET_VALUES, RUNTIME_FIELD_COMMAND_VALUES, RUNTIME_FIELD_TYPE_VALUES, RUNTIME_STATUS_ROLE_VALUES, RUNTIME_UNKNOWN_FIELD_POLICY_VALUES, } from "../../types.js";
17
17
  // Generic over `never` so it is assignable to every `Outcome<T>`.
18
18
  const FAIL = { ok: false };
@@ -304,6 +304,7 @@ const settingsCheck = vObject({
304
304
  retention_days: vOptional(vNumber({ int: true, positive: true })),
305
305
  })),
306
306
  output: vObject({ default_format: vLiteral("toon", "json") }),
307
+ ux: vOptional(vObject({ deprecation_hints: vOptional(vBoolean) })),
307
308
  history: vOptional(vObject({
308
309
  missing_stream: vLiteral("auto_create", "strict_error"),
309
310
  compact_policy: vOptional(vObject({
@@ -414,4 +415,4 @@ export function validateSettings(raw) {
414
415
  return { success: true, data: result.value };
415
416
  }
416
417
  //# sourceMappingURL=settings-validator.js.map
417
- //# debugId=027f6acb-15cc-5707-85ed-b5298b6b6abe
418
+ //# debugId=8883f930-193e-5133-835a-f15b1b62f6be
@@ -4,7 +4,7 @@
4
4
  * Reads and writes tracker storage with format-aware helpers for Settings.
5
5
  */
6
6
 
7
- !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]="a434b9ea-4692-51c5-8761-0f1759fff394")}catch(e){}}();
7
+ !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]="67bf189e-e816-536d-9051-589a2e468423")}catch(e){}}();
8
8
  import { validateSettings } from "./settings-validator.js";
9
9
  import { runActiveOnReadHooks, runActiveOnWriteHooks, } from "../extensions/index.js";
10
10
  import { GOVERNANCE_PRESET_DEFAULTS, SETTINGS_DEFAULTS, } from "../shared/constants.js";
@@ -710,6 +710,7 @@ function mergeSettings(settings) {
710
710
  },
711
711
  checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
712
712
  output: { ...defaults.output, ...settings.output },
713
+ ux: { ...defaults.ux, ...settings.ux },
713
714
  history: {
714
715
  ...defaults.history,
715
716
  ...settings.history,
@@ -777,6 +778,9 @@ function orderSerializedSettingsSections(ordered) {
777
778
  ordered.output = orderObject(ordered.output, [
778
779
  "default_format",
779
780
  ]);
781
+ ordered.ux = orderObject(ordered.ux, [
782
+ "deprecation_hints",
783
+ ]);
780
784
  ordered.history = orderObject(ordered.history, [
781
785
  "missing_stream",
782
786
  "compact_policy",
@@ -934,6 +938,7 @@ function buildSerializeBaseSettings(settings) {
934
938
  mutation_guard: valueOrDefault(settings.mutation_guard, SETTINGS_DEFAULTS.mutation_guard),
935
939
  checkpoints: valueOrDefault(settings.checkpoints, SETTINGS_DEFAULTS.checkpoints),
936
940
  output: valueOrDefault(settings.output, SETTINGS_DEFAULTS.output),
941
+ ux: valueOrDefault(settings.ux, SETTINGS_DEFAULTS.ux),
937
942
  history: valueOrDefault(settings.history, SETTINGS_DEFAULTS.history),
938
943
  validation: valueOrDefault(settings.validation, SETTINGS_DEFAULTS.validation),
939
944
  workflow: valueOrDefault(settings.workflow, SETTINGS_DEFAULTS.workflow),
@@ -1084,6 +1089,7 @@ const SETTINGS_TOP_LEVEL_KEY_ORDER = [
1084
1089
  "locks",
1085
1090
  "checkpoints",
1086
1091
  "output",
1092
+ "ux",
1087
1093
  "history",
1088
1094
  "validation",
1089
1095
  "governance",
@@ -1298,4 +1304,4 @@ export const settingsStoreTestOnly = {
1298
1304
  selectedSettingsReadCacheSignaturesEqual,
1299
1305
  };
1300
1306
  //# sourceMappingURL=settings.js.map
1301
- //# debugId=a434b9ea-4692-51c5-8761-0f1759fff394
1307
+ //# debugId=67bf189e-e816-536d-9051-589a2e468423
@@ -4,8 +4,8 @@
4
4
  * Defines the Tool Definitions module for pm CLI source.
5
5
  */
6
6
 
7
- !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]="d440a41a-ae54-55fd-b939-5404a1edcdd7")}catch(e){}}();
8
- import { GRAPH_SUBCOMMAND_VALUES, PM_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
7
+ !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]="90896fb6-ee3e-575d-b103-bbc1a83c6672")}catch(e){}}();
8
+ import { GRAPH_SUBCOMMAND_VALUES, PM_DISCOVERABLE_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
9
9
  import { buildPmActionToolInputSchema } from "../sdk/cli-contracts/tool-schema.js";
10
10
  import { RUNTIME_STATUS_ROLE_VALUES } from "../types.js";
11
11
  const CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY = buildPmActionToolInputSchema("list").properties.outputSession;
@@ -65,9 +65,9 @@ const idSchema = {
65
65
  description: "pm item id, for example pm-abc1.",
66
66
  };
67
67
  // pm-fd8n: derive the pm_run action enumeration from the canonical
68
- // PM_TOOL_ACTIONS contract instead of a hand-maintained prose list, so the
68
+ // PM_DISCOVERABLE_TOOL_ACTIONS contract instead of a hand-maintained prose list, so the
69
69
  // MCP-facing description can never drift from the actual supported actions.
70
- const PM_RUN_ACTION_DESCRIPTION = `Operation name (one of): ${PM_TOOL_ACTIONS.join(", ")}. ` +
70
+ const PM_RUN_ACTION_DESCRIPTION = `Operation name (one of): ${PM_DISCOVERABLE_TOOL_ACTIONS.join(", ")}. ` +
71
71
  "Package-owned actions are available dynamically when their provider package is installed.";
72
72
  const LIST_TOP_LEVEL_OPTION_PROPERTIES = {
73
73
  status: { type: "string", description: "Alias for options.status." },
@@ -111,7 +111,7 @@ const RAW_TOOLS = [
111
111
  inputSchema: objectSchema({
112
112
  action: {
113
113
  type: "string",
114
- enum: [...PM_TOOL_ACTIONS],
114
+ enum: [...PM_DISCOVERABLE_TOOL_ACTIONS],
115
115
  description: PM_RUN_ACTION_DESCRIPTION,
116
116
  },
117
117
  id: idSchema,
@@ -209,7 +209,7 @@ const RAW_TOOLS = [
209
209
  },
210
210
  {
211
211
  name: "pm_events",
212
- description: "Read a bounded, cursor-resumable page of committed mutation events across item history streams.",
212
+ description: "Read a bounded, cursor-resumable page of committed mutation events across item history streams. Batch cursors are the token-efficient default; pass cursorMode=row for per-event checkpoints.",
213
213
  inputSchema: objectSchema({
214
214
  since: {
215
215
  type: "string",
@@ -235,6 +235,11 @@ const RAW_TOOLS = [
235
235
  },
236
236
  limit: { type: "integer", minimum: 0, maximum: 1000 },
237
237
  full: { type: "boolean" },
238
+ cursorMode: {
239
+ type: "string",
240
+ enum: ["batch", "row"],
241
+ description: "Cursor framing: batch returns one terminal next_cursor (default); row also adds a cursor to every event.",
242
+ },
238
243
  }),
239
244
  },
240
245
  {
@@ -743,4 +748,4 @@ export function buildMcpToolContracts() {
743
748
  }).sort((left, right) => left.name.localeCompare(right.name));
744
749
  }
745
750
  //# sourceMappingURL=tool-definitions.js.map
746
- //# debugId=d440a41a-ae54-55fd-b939-5404a1edcdd7
751
+ //# debugId=90896fb6-ee3e-575d-b103-bbc1a83c6672
@@ -1,9 +1,3 @@
1
- /**
2
- * @module sdk/agent/refusal-reachability
3
- *
4
- * Verifies real-entrypoint observations against refusal states declared by the
5
- * generated public error-code catalog.
6
- */
7
1
  import type { PmErrorCodeContract, PmErrorCodeClass } from "../error-code-catalog.js";
8
2
  /** One recorded result from driving a real public entrypoint into a refusal. */
9
3
  export interface PmRefusalProbeObservation {
@@ -42,6 +36,50 @@ export declare const PM_RECOVERY_REFERENCE_KINDS: readonly ["suggested_retry", "
42
36
  export type PmRecoveryReferenceKind = (typeof PM_RECOVERY_REFERENCE_KINDS)[number];
43
37
  /** Behavioral promise attached to a recovery reference. */
44
38
  export type PmRecoveryReferenceSemantics = "recovery" | "replacement" | "behavior_preserving";
39
+ /** Literal envelope fields recognized as recovery-reference producers. */
40
+ export declare const PM_RECOVERY_REFERENCE_FIELDS: readonly ("restore_with" | "migration_hint" | "migration_hints" | "suggested_retry" | "next_best_command" | "fallback_candidates" | "examples" | "next_steps" | "suggested_next_steps" | "candidate_commands" | "candidate_command" | "example" | "next_step" | "retry_command")[];
41
+ /** One source file supplied to the producer-census analyzer. */
42
+ export interface PmRecoveryProducerSource {
43
+ /** Repository-relative source path. */
44
+ path: string;
45
+ /** Complete source text. */
46
+ content: string;
47
+ }
48
+ /** One literal recovery field emitted from a source location. */
49
+ export interface PmRecoveryProducerLocation {
50
+ /** Repository-relative producer source path. */
51
+ path: string;
52
+ /** One-based source line. */
53
+ line: number;
54
+ /** Literal structured-envelope field. */
55
+ field: (typeof PM_RECOVERY_REFERENCE_FIELDS)[number];
56
+ /** Normalized recovery kind. */
57
+ kind: PmRecoveryReferenceKind;
58
+ }
59
+ /** Producer-census failure that requires a new field contract or producer. */
60
+ export interface PmRecoveryProducerCensusFinding {
61
+ /** Stable finding kind. */
62
+ kind: "invalid_source" | "missing_kind_producer" | "unknown_recovery_field";
63
+ /** Source path or normalized kind. */
64
+ subject: string;
65
+ /** Actionable explanation. */
66
+ detail: string;
67
+ }
68
+ /** Complete literal producer-table census for recovery references. */
69
+ export interface PmRecoveryProducerCensusReport {
70
+ /** Whether every recovery kind has a producer and no unknown fields exist. */
71
+ ok: boolean;
72
+ /** Source files inspected. */
73
+ scanned_file_count: number;
74
+ /** Literal producer locations. */
75
+ producer_count: number;
76
+ /** Stable counts by normalized recovery kind. */
77
+ producer_count_by_kind: Record<PmRecoveryReferenceKind, number>;
78
+ /** Stable producer locations. */
79
+ producers: PmRecoveryProducerLocation[];
80
+ /** Missing-kind or unknown-field findings. */
81
+ findings: PmRecoveryProducerCensusFinding[];
82
+ }
45
83
  /** One derived promise that another invocation or command path is reachable. */
46
84
  export interface PmRecoveryReferenceObligation {
47
85
  /** Stable reference identifier derived from its emitting envelope. */
@@ -101,6 +139,8 @@ export interface PmRecoveryReferenceReport {
101
139
  /** Stable, sorted conformance findings. */
102
140
  findings: PmRecoveryReferenceFinding[];
103
141
  }
142
+ /** Census syntax-parsed structured-envelope producers without executing source code. */
143
+ export declare function censusPmRecoveryReferenceProducers(sources: readonly PmRecoveryProducerSource[]): PmRecoveryProducerCensusReport;
104
144
  /** Derive typed obligations from every recognized recovery field in an emitted envelope. */
105
145
  export declare function derivePmRecoveryReferenceObligations(probeId: string, envelope: unknown): PmRecoveryReferenceObligation[];
106
146
  /** Compare declared refusal states with real-entrypoint observations. */