@unbrained/pm-cli 2026.3.12 → 2026.5.1

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 (285) hide show
  1. package/.agents/pm/extensions/.managed-extensions.json +42 -0
  2. package/.agents/pm/extensions/beads/index.js +109 -0
  3. package/.agents/pm/extensions/beads/manifest.json +7 -0
  4. package/{dist/cli/commands/beads.js → .agents/pm/extensions/beads/runtime.js} +31 -21
  5. package/.agents/pm/extensions/beads/runtime.ts +702 -0
  6. package/.agents/pm/extensions/todos/index.js +126 -0
  7. package/.agents/pm/extensions/todos/manifest.json +7 -0
  8. package/{dist/extensions/builtins/todos/import-export.js → .agents/pm/extensions/todos/runtime.js} +39 -29
  9. package/.agents/pm/extensions/todos/runtime.ts +568 -0
  10. package/AGENTS.md +196 -92
  11. package/CHANGELOG.md +399 -0
  12. package/CODE_OF_CONDUCT.md +42 -0
  13. package/CONTRIBUTING.md +144 -0
  14. package/PRD.md +512 -164
  15. package/README.md +1053 -2
  16. package/SECURITY.md +51 -0
  17. package/dist/cli/commands/activity.d.ts +5 -0
  18. package/dist/cli/commands/activity.js +66 -3
  19. package/dist/cli/commands/activity.js.map +1 -1
  20. package/dist/cli/commands/aggregate.d.ts +54 -0
  21. package/dist/cli/commands/aggregate.js +181 -0
  22. package/dist/cli/commands/aggregate.js.map +1 -0
  23. package/dist/cli/commands/append.js +4 -1
  24. package/dist/cli/commands/append.js.map +1 -1
  25. package/dist/cli/commands/calendar.d.ts +109 -0
  26. package/dist/cli/commands/calendar.js +797 -0
  27. package/dist/cli/commands/calendar.js.map +1 -0
  28. package/dist/cli/commands/claim.d.ts +5 -1
  29. package/dist/cli/commands/claim.js +42 -21
  30. package/dist/cli/commands/claim.js.map +1 -1
  31. package/dist/cli/commands/close.d.ts +1 -0
  32. package/dist/cli/commands/close.js +54 -5
  33. package/dist/cli/commands/close.js.map +1 -1
  34. package/dist/cli/commands/comments-audit.d.ts +91 -0
  35. package/dist/cli/commands/comments-audit.js +195 -0
  36. package/dist/cli/commands/comments-audit.js.map +1 -0
  37. package/dist/cli/commands/comments.d.ts +1 -0
  38. package/dist/cli/commands/comments.js +70 -21
  39. package/dist/cli/commands/comments.js.map +1 -1
  40. package/dist/cli/commands/completion.d.ts +10 -4
  41. package/dist/cli/commands/completion.js +1184 -137
  42. package/dist/cli/commands/completion.js.map +1 -1
  43. package/dist/cli/commands/config.d.ts +35 -3
  44. package/dist/cli/commands/config.js +968 -13
  45. package/dist/cli/commands/config.js.map +1 -1
  46. package/dist/cli/commands/context.d.ts +86 -0
  47. package/dist/cli/commands/context.js +299 -0
  48. package/dist/cli/commands/context.js.map +1 -0
  49. package/dist/cli/commands/contracts.d.ts +78 -0
  50. package/dist/cli/commands/contracts.js +920 -0
  51. package/dist/cli/commands/contracts.js.map +1 -0
  52. package/dist/cli/commands/create.d.ts +48 -14
  53. package/dist/cli/commands/create.js +1331 -160
  54. package/dist/cli/commands/create.js.map +1 -1
  55. package/dist/cli/commands/dedupe-audit.d.ts +81 -0
  56. package/dist/cli/commands/dedupe-audit.js +330 -0
  57. package/dist/cli/commands/dedupe-audit.js.map +1 -0
  58. package/dist/cli/commands/deps.d.ts +52 -0
  59. package/dist/cli/commands/deps.js +204 -0
  60. package/dist/cli/commands/deps.js.map +1 -0
  61. package/dist/cli/commands/docs.d.ts +19 -0
  62. package/dist/cli/commands/docs.js +212 -13
  63. package/dist/cli/commands/docs.js.map +1 -1
  64. package/dist/cli/commands/extension.d.ts +122 -0
  65. package/dist/cli/commands/extension.js +1850 -0
  66. package/dist/cli/commands/extension.js.map +1 -0
  67. package/dist/cli/commands/files.d.ts +52 -1
  68. package/dist/cli/commands/files.js +443 -13
  69. package/dist/cli/commands/files.js.map +1 -1
  70. package/dist/cli/commands/gc.d.ts +11 -1
  71. package/dist/cli/commands/gc.js +89 -11
  72. package/dist/cli/commands/gc.js.map +1 -1
  73. package/dist/cli/commands/get.d.ts +13 -0
  74. package/dist/cli/commands/get.js +35 -3
  75. package/dist/cli/commands/get.js.map +1 -1
  76. package/dist/cli/commands/health.d.ts +10 -2
  77. package/dist/cli/commands/health.js +774 -23
  78. package/dist/cli/commands/health.js.map +1 -1
  79. package/dist/cli/commands/history.d.ts +20 -0
  80. package/dist/cli/commands/history.js +152 -6
  81. package/dist/cli/commands/history.js.map +1 -1
  82. package/dist/cli/commands/index.d.ts +16 -3
  83. package/dist/cli/commands/index.js +16 -3
  84. package/dist/cli/commands/index.js.map +1 -1
  85. package/dist/cli/commands/init.d.ts +7 -2
  86. package/dist/cli/commands/init.js +137 -5
  87. package/dist/cli/commands/init.js.map +1 -1
  88. package/dist/cli/commands/learnings.d.ts +17 -0
  89. package/dist/cli/commands/learnings.js +129 -0
  90. package/dist/cli/commands/learnings.js.map +1 -0
  91. package/dist/cli/commands/list.d.ts +29 -1
  92. package/dist/cli/commands/list.js +289 -53
  93. package/dist/cli/commands/list.js.map +1 -1
  94. package/dist/cli/commands/normalize.d.ts +51 -0
  95. package/dist/cli/commands/normalize.js +298 -0
  96. package/dist/cli/commands/normalize.js.map +1 -0
  97. package/dist/cli/commands/notes.d.ts +17 -0
  98. package/dist/cli/commands/notes.js +129 -0
  99. package/dist/cli/commands/notes.js.map +1 -0
  100. package/dist/cli/commands/reindex.d.ts +1 -0
  101. package/dist/cli/commands/reindex.js +208 -32
  102. package/dist/cli/commands/reindex.js.map +1 -1
  103. package/dist/cli/commands/restore.js +164 -30
  104. package/dist/cli/commands/restore.js.map +1 -1
  105. package/dist/cli/commands/search.d.ts +14 -1
  106. package/dist/cli/commands/search.js +475 -81
  107. package/dist/cli/commands/search.js.map +1 -1
  108. package/dist/cli/commands/stats.js +26 -10
  109. package/dist/cli/commands/stats.js.map +1 -1
  110. package/dist/cli/commands/templates.d.ts +26 -0
  111. package/dist/cli/commands/templates.js +179 -0
  112. package/dist/cli/commands/templates.js.map +1 -0
  113. package/dist/cli/commands/test-all.d.ts +19 -1
  114. package/dist/cli/commands/test-all.js +161 -13
  115. package/dist/cli/commands/test-all.js.map +1 -1
  116. package/dist/cli/commands/test-runs.d.ts +63 -0
  117. package/dist/cli/commands/test-runs.js +179 -0
  118. package/dist/cli/commands/test-runs.js.map +1 -0
  119. package/dist/cli/commands/test.d.ts +75 -1
  120. package/dist/cli/commands/test.js +1360 -41
  121. package/dist/cli/commands/test.js.map +1 -1
  122. package/dist/cli/commands/update-many.d.ts +57 -0
  123. package/dist/cli/commands/update-many.js +631 -0
  124. package/dist/cli/commands/update-many.js.map +1 -0
  125. package/dist/cli/commands/update.d.ts +30 -0
  126. package/dist/cli/commands/update.js +1393 -84
  127. package/dist/cli/commands/update.js.map +1 -1
  128. package/dist/cli/commands/validate.d.ts +30 -0
  129. package/dist/cli/commands/validate.js +1140 -0
  130. package/dist/cli/commands/validate.js.map +1 -0
  131. package/dist/cli/error-guidance.d.ts +33 -0
  132. package/dist/cli/error-guidance.js +337 -0
  133. package/dist/cli/error-guidance.js.map +1 -0
  134. package/dist/cli/extension-command-options.d.ts +1 -0
  135. package/dist/cli/extension-command-options.js +92 -0
  136. package/dist/cli/extension-command-options.js.map +1 -1
  137. package/dist/cli/help-content.d.ts +20 -0
  138. package/dist/cli/help-content.js +543 -0
  139. package/dist/cli/help-content.js.map +1 -0
  140. package/dist/cli/main.js +3625 -445
  141. package/dist/cli/main.js.map +1 -1
  142. package/dist/core/extensions/index.d.ts +13 -1
  143. package/dist/core/extensions/index.js +108 -1
  144. package/dist/core/extensions/index.js.map +1 -1
  145. package/dist/core/extensions/item-fields.d.ts +2 -0
  146. package/dist/core/extensions/item-fields.js +79 -0
  147. package/dist/core/extensions/item-fields.js.map +1 -0
  148. package/dist/core/extensions/loader.d.ts +322 -9
  149. package/dist/core/extensions/loader.js +911 -20
  150. package/dist/core/extensions/loader.js.map +1 -1
  151. package/dist/core/extensions/runtime-registrations.d.ts +5 -0
  152. package/dist/core/extensions/runtime-registrations.js +51 -0
  153. package/dist/core/extensions/runtime-registrations.js.map +1 -0
  154. package/dist/core/history/history-stream-policy.d.ts +20 -0
  155. package/dist/core/history/history-stream-policy.js +53 -0
  156. package/dist/core/history/history-stream-policy.js.map +1 -0
  157. package/dist/core/history/history.js +90 -1
  158. package/dist/core/history/history.js.map +1 -1
  159. package/dist/core/item/id.js +4 -1
  160. package/dist/core/item/id.js.map +1 -1
  161. package/dist/core/item/index.d.ts +1 -0
  162. package/dist/core/item/index.js +1 -0
  163. package/dist/core/item/index.js.map +1 -1
  164. package/dist/core/item/item-format.d.ts +11 -5
  165. package/dist/core/item/item-format.js +507 -24
  166. package/dist/core/item/item-format.js.map +1 -1
  167. package/dist/core/item/parent-reference-policy.d.ts +6 -0
  168. package/dist/core/item/parent-reference-policy.js +32 -0
  169. package/dist/core/item/parent-reference-policy.js.map +1 -0
  170. package/dist/core/item/parse.d.ts +5 -0
  171. package/dist/core/item/parse.js +216 -19
  172. package/dist/core/item/parse.js.map +1 -1
  173. package/dist/core/item/sprint-release-format.d.ts +6 -0
  174. package/dist/core/item/sprint-release-format.js +33 -0
  175. package/dist/core/item/sprint-release-format.js.map +1 -0
  176. package/dist/core/item/status.d.ts +3 -0
  177. package/dist/core/item/status.js +24 -0
  178. package/dist/core/item/status.js.map +1 -0
  179. package/dist/core/item/type-registry.d.ts +37 -0
  180. package/dist/core/item/type-registry.js +706 -0
  181. package/dist/core/item/type-registry.js.map +1 -0
  182. package/dist/core/lock/lock.d.ts +1 -1
  183. package/dist/core/lock/lock.js +101 -12
  184. package/dist/core/lock/lock.js.map +1 -1
  185. package/dist/core/output/command-aware.d.ts +1 -0
  186. package/dist/core/output/command-aware.js +394 -0
  187. package/dist/core/output/command-aware.js.map +1 -0
  188. package/dist/core/output/output.d.ts +3 -0
  189. package/dist/core/output/output.js +124 -6
  190. package/dist/core/output/output.js.map +1 -1
  191. package/dist/core/schema/runtime-field-filters.d.ts +3 -0
  192. package/dist/core/schema/runtime-field-filters.js +39 -0
  193. package/dist/core/schema/runtime-field-filters.js.map +1 -0
  194. package/dist/core/schema/runtime-field-values.d.ts +8 -0
  195. package/dist/core/schema/runtime-field-values.js +154 -0
  196. package/dist/core/schema/runtime-field-values.js.map +1 -0
  197. package/dist/core/schema/runtime-schema.d.ts +68 -0
  198. package/dist/core/schema/runtime-schema.js +554 -0
  199. package/dist/core/schema/runtime-schema.js.map +1 -0
  200. package/dist/core/search/cache.d.ts +13 -1
  201. package/dist/core/search/cache.js +123 -14
  202. package/dist/core/search/cache.js.map +1 -1
  203. package/dist/core/search/semantic-defaults.d.ts +6 -0
  204. package/dist/core/search/semantic-defaults.js +120 -0
  205. package/dist/core/search/semantic-defaults.js.map +1 -0
  206. package/dist/core/search/vector-stores.js +3 -1
  207. package/dist/core/search/vector-stores.js.map +1 -1
  208. package/dist/core/shared/command-types.d.ts +2 -0
  209. package/dist/core/shared/conflict-markers.d.ts +7 -0
  210. package/dist/core/shared/conflict-markers.js +27 -0
  211. package/dist/core/shared/conflict-markers.js.map +1 -0
  212. package/dist/core/shared/constants.d.ts +15 -4
  213. package/dist/core/shared/constants.js +141 -1
  214. package/dist/core/shared/constants.js.map +1 -1
  215. package/dist/core/shared/errors.d.ts +10 -1
  216. package/dist/core/shared/errors.js +3 -1
  217. package/dist/core/shared/errors.js.map +1 -1
  218. package/dist/core/shared/text-normalization.d.ts +4 -0
  219. package/dist/core/shared/text-normalization.js +33 -0
  220. package/dist/core/shared/text-normalization.js.map +1 -0
  221. package/dist/core/shared/time.d.ts +1 -2
  222. package/dist/core/shared/time.js +98 -11
  223. package/dist/core/shared/time.js.map +1 -1
  224. package/dist/core/store/index.d.ts +1 -0
  225. package/dist/core/store/index.js +1 -0
  226. package/dist/core/store/index.js.map +1 -1
  227. package/dist/core/store/item-format-migration.d.ts +9 -0
  228. package/dist/core/store/item-format-migration.js +87 -0
  229. package/dist/core/store/item-format-migration.js.map +1 -0
  230. package/dist/core/store/item-store.d.ts +13 -4
  231. package/dist/core/store/item-store.js +238 -51
  232. package/dist/core/store/item-store.js.map +1 -1
  233. package/dist/core/store/paths.d.ts +21 -3
  234. package/dist/core/store/paths.js +59 -4
  235. package/dist/core/store/paths.js.map +1 -1
  236. package/dist/core/store/settings.d.ts +14 -1
  237. package/dist/core/store/settings.js +463 -7
  238. package/dist/core/store/settings.js.map +1 -1
  239. package/dist/core/telemetry/consent.d.ts +2 -0
  240. package/dist/core/telemetry/consent.js +79 -0
  241. package/dist/core/telemetry/consent.js.map +1 -0
  242. package/dist/core/telemetry/runtime.d.ts +38 -0
  243. package/dist/core/telemetry/runtime.js +733 -0
  244. package/dist/core/telemetry/runtime.js.map +1 -0
  245. package/dist/core/test/background-runs.d.ts +117 -0
  246. package/dist/core/test/background-runs.js +760 -0
  247. package/dist/core/test/background-runs.js.map +1 -0
  248. package/dist/core/test/item-test-run-tracking.d.ts +9 -0
  249. package/dist/core/test/item-test-run-tracking.js +50 -0
  250. package/dist/core/test/item-test-run-tracking.js.map +1 -0
  251. package/dist/sdk/cli-contracts.d.ts +92 -0
  252. package/dist/sdk/cli-contracts.js +2357 -0
  253. package/dist/sdk/cli-contracts.js.map +1 -0
  254. package/dist/sdk/index.d.ts +34 -0
  255. package/dist/sdk/index.js +23 -0
  256. package/dist/sdk/index.js.map +1 -0
  257. package/dist/types.d.ts +197 -3
  258. package/dist/types.js +48 -1
  259. package/dist/types.js.map +1 -1
  260. package/docs/ARCHITECTURE.md +368 -39
  261. package/docs/EXTENSIONS.md +454 -49
  262. package/docs/RELEASING.md +68 -19
  263. package/docs/SDK.md +123 -0
  264. package/docs/examples/starter-extension/README.md +48 -0
  265. package/docs/examples/starter-extension/index.js +191 -0
  266. package/docs/examples/starter-extension/manifest.json +17 -0
  267. package/docs/examples/starter-extension/package.json +10 -0
  268. package/package.json +33 -6
  269. package/.pi/extensions/pm-cli/index.ts +0 -778
  270. package/dist/cli/commands/beads.d.ts +0 -16
  271. package/dist/cli/commands/beads.js.map +0 -1
  272. package/dist/cli/commands/install.d.ts +0 -18
  273. package/dist/cli/commands/install.js +0 -87
  274. package/dist/cli/commands/install.js.map +0 -1
  275. package/dist/core/extensions/builtins.d.ts +0 -3
  276. package/dist/core/extensions/builtins.js +0 -47
  277. package/dist/core/extensions/builtins.js.map +0 -1
  278. package/dist/extensions/builtins/beads/index.d.ts +0 -8
  279. package/dist/extensions/builtins/beads/index.js +0 -33
  280. package/dist/extensions/builtins/beads/index.js.map +0 -1
  281. package/dist/extensions/builtins/todos/import-export.d.ts +0 -26
  282. package/dist/extensions/builtins/todos/import-export.js.map +0 -1
  283. package/dist/extensions/builtins/todos/index.d.ts +0 -8
  284. package/dist/extensions/builtins/todos/index.js +0 -38
  285. package/dist/extensions/builtins/todos/index.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import { Command } from "commander";
2
+ export interface HelpBundle {
3
+ why: string;
4
+ examples: string[];
5
+ tips?: string[];
6
+ }
7
+ export interface HelpNarrative {
8
+ intent: string;
9
+ examples: string[];
10
+ tips: string[];
11
+ detail_mode: HelpDetailMode;
12
+ }
13
+ export type HelpDetailMode = "compact" | "detailed";
14
+ export declare function normalizeHelpCommandPath(commandPath: string): string;
15
+ export declare function resolveHelpDetailMode(argv: string[]): HelpDetailMode;
16
+ export declare const ROOT_HELP_BUNDLE: HelpBundle;
17
+ export declare function resolveHelpBundleForPath(commandPath: string | undefined): HelpBundle;
18
+ export declare function resolveHelpNarrative(commandPath: string | undefined, detailMode: HelpDetailMode): HelpNarrative;
19
+ export declare function listDocumentedHelpPaths(): string[];
20
+ export declare function attachRichHelpText(program: Command, argv?: string[]): void;
@@ -0,0 +1,543 @@
1
+ function renderCompactHelpBundle(bundle) {
2
+ const lines = [
3
+ "",
4
+ "Intent:",
5
+ ` ${bundle.why}`,
6
+ ];
7
+ if (bundle.examples.length > 0) {
8
+ lines.push("", "Example:");
9
+ lines.push(` ${bundle.examples[0]}`);
10
+ }
11
+ lines.push("", "Need deeper rationale and more examples?");
12
+ lines.push(" Re-run with --explain.");
13
+ return lines.join("\n");
14
+ }
15
+ function renderDetailedHelpBundle(bundle) {
16
+ const lines = [
17
+ "",
18
+ "Why use this command:",
19
+ ` ${bundle.why}`,
20
+ "",
21
+ "Examples:",
22
+ ...bundle.examples.map((example) => ` ${example}`),
23
+ ];
24
+ if (bundle.tips && bundle.tips.length > 0) {
25
+ lines.push("", "Tips:");
26
+ lines.push(...bundle.tips.map((tip) => ` - ${tip}`));
27
+ }
28
+ return lines.join("\n");
29
+ }
30
+ function renderHelpBundle(bundle, detailMode) {
31
+ if (detailMode === "detailed") {
32
+ return renderDetailedHelpBundle(bundle);
33
+ }
34
+ return renderCompactHelpBundle(bundle);
35
+ }
36
+ export function normalizeHelpCommandPath(commandPath) {
37
+ return commandPath
38
+ .trim()
39
+ .toLowerCase()
40
+ .split(/\s+/)
41
+ .filter((part) => part.length > 0)
42
+ .join(" ");
43
+ }
44
+ const HELP_PATH_ALIASES = {
45
+ cal: "calendar",
46
+ ctx: "context",
47
+ };
48
+ function findDirectChildCommand(parent, name) {
49
+ return parent.commands.find((entry) => entry.name() === name) ?? null;
50
+ }
51
+ function findCommandByPath(root, pathParts) {
52
+ let current = root;
53
+ for (const part of pathParts) {
54
+ const next = findDirectChildCommand(current, part);
55
+ if (!next) {
56
+ return null;
57
+ }
58
+ current = next;
59
+ }
60
+ return current;
61
+ }
62
+ function attachBundleByPath(root, commandPath, bundle, detailMode) {
63
+ const command = findCommandByPath(root, commandPath.split(" ").filter((part) => part.length > 0));
64
+ if (!command) {
65
+ return;
66
+ }
67
+ command.addHelpText("after", renderHelpBundle(bundle, detailMode));
68
+ }
69
+ export function resolveHelpDetailMode(argv) {
70
+ if (argv.includes("--explain")) {
71
+ return "detailed";
72
+ }
73
+ return "compact";
74
+ }
75
+ const HELP_BY_COMMAND_PATH = {
76
+ init: {
77
+ why: "Bootstraps tracker storage and settings so all other commands can run safely.",
78
+ examples: ['pm init', 'pm init acme', "pm init --preset minimal", "pm init --preset strict"],
79
+ tips: [
80
+ "Run this once per repository before create/list/update commands.",
81
+ "Use --preset for non-interactive automation; omit it in a TTY to use the setup wizard.",
82
+ ],
83
+ },
84
+ config: {
85
+ why: "Reads or updates project/global settings such as definition-of-done, item format, telemetry, and policy toggles.",
86
+ examples: [
87
+ 'pm config project get definition-of-done',
88
+ 'pm config project set definition-of-done --criterion "tests pass"',
89
+ "pm config project set item-format --format toon",
90
+ "pm config project set sprint-release-format-policy --policy strict_error",
91
+ "pm config project set governance-preset --policy minimal",
92
+ "pm config project set governance-ownership-enforcement --policy none",
93
+ "pm config project set test-result-tracking --policy enabled",
94
+ "pm config global set telemetry-tracking --policy disabled",
95
+ ],
96
+ },
97
+ extension: {
98
+ why: "Installs, explores, manages, diagnoses, adopts (single or bulk), and activates/deactivates custom extensions across project or global scope.",
99
+ examples: [
100
+ "pm extension init ./my-extension",
101
+ "pm extension install beads --project",
102
+ "pm extension install todos --global",
103
+ "pm extension install .agents/pm/extensions/sample --project",
104
+ "pm extension install https://github.com/unbraind/pm-cli/tree/main/.agents/pm/extensions/pi --global",
105
+ "pm extension install --gh unbraind/pm-cli/pi --project",
106
+ "pm extension explore --project",
107
+ "pm extension manage --global",
108
+ "pm extension doctor --detail deep",
109
+ "pm extension adopt sample-ext --project",
110
+ "pm extension adopt-all --project",
111
+ "pm extension adopt sample-ext --project --gh owner/repo/path --ref main",
112
+ "pm extension activate sample-ext --project",
113
+ "pm extension deactivate sample-ext --project",
114
+ "pm extension uninstall sample-ext --global",
115
+ "pm extension --install beads --project",
116
+ ],
117
+ tips: [
118
+ "Prefer explicit subcommands (init/scaffold/install/uninstall/explore/manage/doctor/adopt/adopt-all/activate/deactivate) for discoverability.",
119
+ "Legacy lifecycle flags remain supported as backward-compatible aliases.",
120
+ "Bundled aliases beads and todos resolve to package-shipped extension sources.",
121
+ "Use --gh/--github shorthand for GitHub sources and --ref to pin a branch, tag, or ref.",
122
+ "Install updates settings activation state automatically unless extension allowlist mode is unchanged.",
123
+ "Use --adopt for single-extension adoption and --adopt-all to bulk-register unmanaged installs as managed without reinstalling.",
124
+ "Use --manage for concise triage summaries and remediation-oriented diagnostics alongside full extension details.",
125
+ "Use --doctor for consolidated diagnostics with warning codes, remediation hints, and optional deep detail payloads.",
126
+ ],
127
+ },
128
+ create: {
129
+ why: "Creates a new planning item with deterministic metadata and history.",
130
+ examples: [
131
+ 'pm create --title "Harden lock flow" --description "Improve stale lock handling" --type Task --status open --priority 1 --message "Create lock hardening task" --create-mode progressive',
132
+ 'pm create --title "Weekly planning sync" --description "Recurring coordination meeting" --type Meeting --schedule-preset lightweight',
133
+ 'pm create --title "Asset: Hero model" --description "Track playable model asset" --type Asset --status open --priority 1 --message "Create asset item" --type-option category=Character --dep "id=pm-epic01,kind=parent,author=codex-agent,created_at=now" --comment "author=codex-agent,created_at=now,text=Why this asset item exists." --note "author=codex-agent,created_at=now,text=Initial implementation note." --learning "author=codex-agent,created_at=now,text=Durable lesson placeholder." --file "path=src/assets/hero.glb,scope=project,note=tracked asset" --test "command=node scripts/run-tests.mjs test,scope=project,timeout_seconds=240" --doc "path=README.md,scope=project,note=asset docs"',
134
+ ],
135
+ tips: [
136
+ "Use --schedule-preset lightweight for Reminder/Meeting/Event when you want minimal required create inputs.",
137
+ "Use --type <value> to load type-aware policy guidance in --help output.",
138
+ ],
139
+ },
140
+ update: {
141
+ why: "Mutates existing item fields while preserving history and lock safety.",
142
+ examples: [
143
+ 'pm update pm-a1b2 --status in_progress --message "Start implementation"',
144
+ 'pm update pm-a1b2 --unset close-reason --message "Clear stale close reason after reopen"',
145
+ 'pm update pm-a1b2 --unset assignee --deadline +2d --message "Replan ownership and deadline"',
146
+ 'pm update pm-a1b2 --body "Backfilled body text for legacy item" --message "Normalize missing body"',
147
+ ],
148
+ tips: [
149
+ 'Use "pm close <ID> <TEXT>" to close items instead of --status closed.',
150
+ "When reopening from closed to a non-terminal status, update clears stale close_reason unless explicitly set via --close-reason.",
151
+ 'Use "pm append <ID> --body <text>" for additive notes; use update --body to replace body content.',
152
+ ],
153
+ },
154
+ "update-many": {
155
+ why: "Bulk-updates matched item sets with dry-run previews and rollback checkpoints for safe large-scale metadata changes.",
156
+ examples: [
157
+ "pm update-many --filter-status open --status in_progress --dry-run",
158
+ 'pm update-many --filter-tag wave:7 --replace-tests --test "command=node scripts/run-tests.mjs test -- tests/core/history.spec.ts,scope=project,timeout_seconds=240"',
159
+ 'pm update-many --filter-tag governance --reviewer maintainer-review --message "Normalize reviewer metadata"',
160
+ "pm update-many --rollback ckpt-abc123",
161
+ ],
162
+ tips: [
163
+ "Use --dry-run first to inspect proposed changes before apply mode.",
164
+ "Linked-array mutation flags mirror pm update semantics (for example --replace-tests, --clear-files, and repeatable --doc/--note seeds).",
165
+ "Checkpoints are enabled by default for apply mode and can be restored with --rollback.",
166
+ ],
167
+ },
168
+ normalize: {
169
+ why: "Scans items for low-signal lifecycle metadata drift, emits deterministic per-item plans, and optionally applies normalized metadata updates with update-style safety checks.",
170
+ examples: [
171
+ "pm normalize --dry-run",
172
+ "pm normalize --filter-status in_progress --dry-run",
173
+ 'pm normalize --filter-status closed --apply --author "codex-agent" --message "Normalize closure metadata"',
174
+ ],
175
+ tips: [
176
+ "Dry-run mode is the default; pass --apply only after reviewing planned changes.",
177
+ "Apply mode honors ownership/audit constraints and supports --allow-audit-update with optional --force override.",
178
+ ],
179
+ },
180
+ templates: {
181
+ why: "Saves, lists, and inspects reusable create option bundles for repeatable workflows.",
182
+ examples: [
183
+ 'pm templates save triage-default --title "Triage item" --description "..." --type Task --status open --priority 2 --message "Seed triage template"',
184
+ "pm templates list",
185
+ "pm templates show triage-default",
186
+ ],
187
+ tips: [
188
+ "Template names are positional arguments (`pm templates save <name>` and `pm templates show <name>`), not --name flags.",
189
+ "Combine templates with explicit create flags; explicit flags always override template defaults.",
190
+ ],
191
+ },
192
+ deps: {
193
+ why: "Inspects an item dependency graph as a tree or graph payload to understand blockers and hierarchy links.",
194
+ examples: [
195
+ "pm deps pm-a1b2",
196
+ "pm deps pm-a1b2 --format graph",
197
+ "pm deps pm-a1b2 --max-depth 2 --collapse repeated --summary",
198
+ ],
199
+ tips: ["Use --summary for lightweight counts when full graph payloads are unnecessary."],
200
+ },
201
+ list: {
202
+ why: "Lists active items with deterministic filtering and ordering.",
203
+ examples: [
204
+ "pm list --limit 20",
205
+ "pm list --type Task --priority 0 --tag release --assignee codex-agent",
206
+ "pm list --compact --sort deadline --order asc",
207
+ "pm list --fields id,title,parent,type --sort parent --order asc",
208
+ ],
209
+ },
210
+ "list-all": {
211
+ why: "Lists all item states (including terminal states) when you need full visibility.",
212
+ examples: ["pm list-all --limit 50", "pm list-all --type Issue --include-body"],
213
+ },
214
+ "list-open": {
215
+ why: "Shows work that is ready to claim and start.",
216
+ examples: ["pm list-open --priority 0 --limit 10"],
217
+ },
218
+ "list-in-progress": {
219
+ why: "Tracks active execution and owner progress.",
220
+ examples: ["pm list-in-progress --assignee codex-agent --limit 20"],
221
+ },
222
+ "list-blocked": {
223
+ why: "Surfaces blocked work that needs intervention.",
224
+ examples: ["pm list-blocked --limit 20"],
225
+ },
226
+ "list-closed": {
227
+ why: "Reviews completed work and closure outcomes.",
228
+ examples: ["pm list-closed --limit 20 --type Task"],
229
+ },
230
+ "list-canceled": {
231
+ why: "Audits intentionally discontinued work.",
232
+ examples: ["pm list-canceled --limit 20"],
233
+ },
234
+ "list-draft": {
235
+ why: "Finds incompletely defined items that need refinement before execution.",
236
+ examples: ["pm list-draft --limit 20"],
237
+ },
238
+ aggregate: {
239
+ why: "Runs grouped aggregation queries for governance checks such as decomposition by parent/type or triage by status/priority.",
240
+ examples: [
241
+ "pm aggregate --group-by parent,type --count",
242
+ "pm aggregate --group-by type,status --count",
243
+ "pm aggregate --group-by parent,type --count --status open --parent pm-feature01",
244
+ ],
245
+ tips: ["Current aggregate mode is grouped counts only, so pass --count explicitly."],
246
+ },
247
+ "dedupe-audit": {
248
+ why: "Audits potential duplicate items and emits deterministic merge suggestions before any mutation.",
249
+ examples: [
250
+ "pm dedupe-audit --mode title_exact",
251
+ "pm dedupe-audit --mode title_fuzzy --threshold 0.8 --limit 20",
252
+ "pm dedupe-audit --mode parent_scope --status open",
253
+ ],
254
+ tips: ["Use title_exact for strict collisions, title_fuzzy for near-duplicates, and parent_scope for child-level collisions."],
255
+ },
256
+ calendar: {
257
+ why: "Provides deadline/reminder/event scheduling views for planning and coordination.",
258
+ examples: [
259
+ "pm calendar",
260
+ "pm calendar --view agenda --from +0d --to +7d --assignee codex-agent",
261
+ "pm calendar --view week --date 2026-04-06 --full-period --include deadlines,events",
262
+ "pm calendar --view month --tag release --format json",
263
+ ],
264
+ tips: [
265
+ "Day/week/month views are anchored period windows; default mode clips the start to now unless --past or --full-period is set.",
266
+ "--full-period applies only to day/week/month views; use --from/--to to bound agenda windows.",
267
+ ],
268
+ },
269
+ context: {
270
+ why: "Builds an agent-optimized snapshot of critical active work plus near-term agenda context.",
271
+ examples: [
272
+ "pm context",
273
+ "pm ctx --limit 5 --assignee codex-agent",
274
+ "pm context --from +0d --to +7d --format markdown",
275
+ ],
276
+ tips: [
277
+ "High-level focus contains Epics/Features and low-level focus contains Tasks/Issues/Chores/Event/Reminder/Milestone/Meeting.",
278
+ "When no open or in-progress work exists, blocked items are shown as fallback context.",
279
+ ],
280
+ },
281
+ search: {
282
+ why: "Finds relevant items by keyword, semantic, or hybrid retrieval modes.",
283
+ examples: [
284
+ 'pm search "lock stale retry" --mode keyword --limit 10',
285
+ 'pm search "extension migration blockers" --mode hybrid --type Task --priority 0',
286
+ 'pm search "Cross-Epic Realism Dependency Council" --mode keyword --title-exact',
287
+ ],
288
+ tips: [
289
+ "Use --title-exact to require exact normalized title parity, or --phrase-exact to require full-phrase matches in item text fields.",
290
+ "Use --include-linked when linked docs/files/tests should influence scoring.",
291
+ ],
292
+ },
293
+ reindex: {
294
+ why: "Rebuilds search artifacts after large changes to item corpus or provider/vector config.",
295
+ examples: ["pm reindex --mode keyword", "pm reindex --mode hybrid"],
296
+ },
297
+ get: {
298
+ why: "Shows complete details for one item by ID.",
299
+ examples: ["pm get pm-a1b2", "pm get pm-a1b2 --json"],
300
+ tips: ["JSON output shape is { item, body, linked, claim_state }; body is top-level (not item.body)."],
301
+ },
302
+ history: {
303
+ why: "Inspects item mutation timeline and audit trail.",
304
+ examples: ["pm history pm-a1b2 --limit 20"],
305
+ },
306
+ activity: {
307
+ why: "Reviews recent tracker-wide activity across items.",
308
+ examples: [
309
+ "pm activity --limit 50",
310
+ "pm activity --id pm-a1b2 --op update --author codex-agent --from -7d --to now",
311
+ "pm activity --json --stream rows --limit 200",
312
+ ],
313
+ tips: ["Use --stream with --json for line-delimited automation output; --from is inclusive and --to is exclusive."],
314
+ },
315
+ restore: {
316
+ why: "Restores an item to a prior timestamp/version with history replay safety.",
317
+ examples: ['pm restore pm-a1b2 2026-04-01T00:00:00.000Z --author "codex-agent" --message "Rollback to known-good state"'],
318
+ },
319
+ close: {
320
+ why: "Transitions work to terminal closed state with explicit rationale.",
321
+ examples: [
322
+ 'pm close pm-a1b2 "All acceptance criteria met" --author "codex-agent" --message "Close after verification"',
323
+ 'pm close pm-a1b2 "Done" --validate-close',
324
+ 'pm close pm-a1b2 "Done" --validate-close off',
325
+ 'pm close pm-a1b2 "Done" --validate-close strict',
326
+ ],
327
+ },
328
+ delete: {
329
+ why: "Removes an item while preserving history evidence and lock/ownership checks.",
330
+ examples: ['pm delete pm-a1b2 --author "codex-agent" --message "Remove duplicate item"'],
331
+ },
332
+ append: {
333
+ why: "Adds implementation notes to body without replacing existing content.",
334
+ examples: ['pm append pm-a1b2 --body "Implemented retry with bounded backoff." --message "Record implementation detail"'],
335
+ },
336
+ comments: {
337
+ why: "Adds or reviews lightweight status updates linked to an item.",
338
+ examples: [
339
+ 'pm comments pm-a1b2 --add "Verified fix on Linux and macOS"',
340
+ 'pm comments pm-a1b2 --add "text: verification note with commas, key-like words, and parser details"',
341
+ 'pm comments pm-a1b2 --add "Follow-up needed after review" --author "codex-agent" --force',
342
+ "pm comments pm-a1b2 --limit 10",
343
+ ],
344
+ tips: [
345
+ "Use --force when adding comments to items currently assigned to a different owner.",
346
+ "When --add payload resembles CSV-like key fragments (for example text=hello,scope:project), plain-text fallback is intentional; use explicit text=..., markdown text: ..., or stdin token - for structured intent.",
347
+ ],
348
+ },
349
+ "comments-audit": {
350
+ why: "Audits latest comments or full history rows across filtered item sets.",
351
+ examples: [
352
+ "pm comments-audit --status open --latest 1",
353
+ "pm comments-audit --status open --latest 0",
354
+ "pm comments-audit --parent pm-feature01 --tag governance --sprint sprint-12 --release vnext --priority 0",
355
+ "pm comments-audit --full-history --limit 50",
356
+ ],
357
+ tips: [
358
+ "Use either --latest or --full-history (not both). --latest 0 returns item summaries without comment rows. --limit is an alias for --limit-items.",
359
+ ],
360
+ },
361
+ notes: {
362
+ why: "Adds or reviews durable implementation notes linked to an item.",
363
+ examples: [
364
+ 'pm notes pm-a1b2 --add "Investigated parser edge case and documented fallback logic."',
365
+ 'pm notes pm-a1b2 --add "text: parser rationale with commas, colons, and key-like wording"',
366
+ 'pm notes pm-a1b2 --add "Audit note" --author "reviewer" --allow-audit-note',
367
+ "pm notes pm-a1b2 --limit 10",
368
+ ],
369
+ tips: [
370
+ "Use --allow-audit-note for append-only non-owner audits; --allow-audit-comment remains supported as a legacy alias.",
371
+ "CSV-like add payloads with extra key fragments are treated as plain text by design; use explicit text keys (text= or text:) when structured parsing is required.",
372
+ ],
373
+ },
374
+ learnings: {
375
+ why: "Adds or reviews post-implementation learnings for future work.",
376
+ examples: [
377
+ 'pm learnings pm-a1b2 --add "Avoid direct test-runner commands in linked tests; use sandbox runner."',
378
+ 'pm learnings pm-a1b2 --add "text: lesson with commas, key-like words, and punctuation-safe context"',
379
+ 'pm learnings pm-a1b2 --add "Audit learning" --author "reviewer" --allow-audit-learning',
380
+ "pm learnings pm-a1b2 --limit 10",
381
+ ],
382
+ tips: [
383
+ "Use --allow-audit-learning for append-only non-owner audits; --allow-audit-comment remains supported as a legacy alias.",
384
+ "If you intended structured parsing for a key-like payload, prefer explicit text=..., markdown text: ..., or stdin token -; ambiguous CSV-like forms intentionally remain plain text.",
385
+ ],
386
+ },
387
+ files: {
388
+ why: "Associates changed source files with tracker items for reproducibility.",
389
+ examples: [
390
+ 'pm files pm-a1b2 --add "path=src/cli/main.ts,scope=project,note=help orchestration"',
391
+ "pm files discover pm-a1b2",
392
+ 'pm files discover pm-a1b2 --apply --note "discovered from item text"',
393
+ ],
394
+ },
395
+ docs: {
396
+ why: "Associates relevant documentation paths with tracker items.",
397
+ examples: ['pm docs pm-a1b2 --add "path=README.md,scope=project,note=user-facing command guidance"'],
398
+ },
399
+ test: {
400
+ why: "Links test commands/paths and optionally executes them for one item.",
401
+ examples: [
402
+ 'pm test pm-a1b2 --add "command=node scripts/run-tests.mjs test -- tests/unit/output.spec.ts,scope=project,timeout_seconds=2400"',
403
+ 'pm test pm-a1b2 --add "command=pm list-all --type Task --limit 200,scope=project,assert_stdout_contains=count:,assert_stdout_regex=count:\\s+\\d+"',
404
+ 'pm test pm-a1b2 --add "command=pm list-all --type Task --limit 200,scope=project,pm_context_mode=auto"',
405
+ "pm test pm-a1b2 --run --timeout 2400 --env-set PORT=0 --env-clear PLAYWRIGHT_BASE_URL --shared-host-safe --pm-context tracker --fail-on-context-mismatch --fail-on-skipped",
406
+ "pm test pm-a1b2 --run --timeout 2400 --pm-context auto",
407
+ "pm test pm-a1b2 --run --background --timeout 2400 --progress",
408
+ ],
409
+ },
410
+ "test-all": {
411
+ why: "Runs linked tests in bulk for release/readiness sweeps.",
412
+ examples: [
413
+ "pm test-all --status in_progress --limit 5 --offset 10 --timeout 2400",
414
+ "pm test-all --status closed --timeout 3600 --progress --env-set PORT=0 --shared-host-safe --fail-on-skipped",
415
+ "pm test-all --status in_progress --pm-context tracker --fail-on-context-mismatch --require-assertions-for-pm",
416
+ "pm test-all --status in_progress --pm-context auto --fail-on-context-mismatch",
417
+ "pm test-all --status in_progress --background --timeout 3600",
418
+ ],
419
+ },
420
+ "test-runs": {
421
+ why: "Manages background linked-test runs with lifecycle controls and log/status inspection.",
422
+ examples: [
423
+ "pm test-runs list --status running --limit 20",
424
+ "pm test-runs status tr-abc123",
425
+ "pm test-runs logs tr-abc123 --stream stderr --tail 200",
426
+ "pm test-runs stop tr-abc123",
427
+ "pm test-runs resume tr-abc123",
428
+ ],
429
+ },
430
+ stats: {
431
+ why: "Reports tracker-level totals and distribution by type/status.",
432
+ examples: ["pm stats", "pm stats --json"],
433
+ },
434
+ health: {
435
+ why: "Validates tracker/runtime health including extension triage, migration, and integrity diagnostics.",
436
+ examples: ["pm health", "pm health --json", "pm health --check-only", "pm health --no-refresh", "pm health --refresh-vectors"],
437
+ },
438
+ validate: {
439
+ why: "Runs standalone metadata, resolution, lifecycle (including dependency-cycle diagnostics), linked-file, linked-command reference, and history drift checks with default remediation hints for resolution gaps.",
440
+ examples: [
441
+ "pm validate",
442
+ "pm validate --check-resolution --json",
443
+ "pm validate --check-lifecycle --dependency-cycle-severity error",
444
+ "pm validate --check-files --scan-mode tracked-all",
445
+ "pm validate --check-files --scan-mode tracked-all-strict --include-pm-internals",
446
+ "pm validate --check-command-references",
447
+ "pm validate --check-resolution --fail-on-warn --json",
448
+ ],
449
+ tips: ["Resolution-gap warnings include default `pm update <id> ...` remediation hint templates in check details."],
450
+ },
451
+ gc: {
452
+ why: "Cleans optional cache artifacts to keep local tracker state tidy.",
453
+ examples: ["pm gc"],
454
+ },
455
+ claim: {
456
+ why: "Claims an item to signal active ownership and reduce conflicts.",
457
+ examples: [
458
+ 'pm claim pm-a1b2 --author "codex-agent" --message "Claim for implementation"',
459
+ 'pm claim pm-a1b2 --force --author "codex-agent" --message "Take over terminal item"',
460
+ ],
461
+ tips: ["Claim takeover for non-terminal items does not require --force; --force is reserved for terminal/lock overrides."],
462
+ },
463
+ release: {
464
+ why: "Releases an active claim when paused, handed off, or completed.",
465
+ examples: [
466
+ 'pm release pm-a1b2 --author "codex-agent" --message "Release after closure"',
467
+ 'pm release pm-a1b2 --allow-audit-release --author "reviewer" --message "Audit handoff release"',
468
+ ],
469
+ tips: ["Use --allow-audit-release for non-owner handoffs that only clear assignee metadata."],
470
+ },
471
+ "start-task": {
472
+ why: "Lifecycle alias that claims an item and sets status to in_progress.",
473
+ examples: ['pm start-task pm-a1b2 --author "codex-agent" --message "Start implementation"'],
474
+ },
475
+ "pause-task": {
476
+ why: "Lifecycle alias that sets status to open and releases active assignment.",
477
+ examples: ['pm pause-task pm-a1b2 --author "codex-agent" --message "Pause for dependency unblock"'],
478
+ },
479
+ "close-task": {
480
+ why: "Lifecycle alias that closes with reason text and clears assignment metadata.",
481
+ examples: ['pm close-task pm-a1b2 "All acceptance criteria met" --author "codex-agent" --message "Close and handoff"'],
482
+ },
483
+ completion: {
484
+ why: "Generates shell completion scripts for faster and more reliable command entry.",
485
+ examples: ["pm completion bash", "pm completion zsh", "pm completion fish", "pm completion bash --eager-tags"],
486
+ tips: ["Default scripts resolve tag suggestions lazily at completion time; use --eager-tags to embed current tags directly."],
487
+ },
488
+ contracts: {
489
+ why: "Exposes machine-readable CLI command and tool schema contracts for agent integrations.",
490
+ examples: [
491
+ "pm contracts",
492
+ "pm contracts --command list --runtime-only",
493
+ "pm contracts --command update --flags-only",
494
+ "pm contracts --availability-only --runtime-only",
495
+ "pm contracts --action create",
496
+ "pm contracts --schema-only",
497
+ ],
498
+ tips: ["Use --command to narrow actions/schema to one CLI surface; combine with --flags-only or --availability-only for lighter payloads."],
499
+ },
500
+ };
501
+ export const ROOT_HELP_BUNDLE = {
502
+ why: "Provides deterministic project management workflows for humans and coding agents.",
503
+ examples: ["pm init", "pm list-open --limit 10", 'pm create --title "..." --description "..." --type Task --status open --priority 1 --message "..." --create-mode progressive'],
504
+ tips: [
505
+ "Use <command> --help for command-specific guidance and examples.",
506
+ "Use --json for machine parsing and integration flows.",
507
+ "Use --no-pager to force direct help output in CI and other non-interactive shells.",
508
+ ],
509
+ };
510
+ function resolveCanonicalHelpPath(commandPath) {
511
+ const normalized = normalizeHelpCommandPath(commandPath ?? "");
512
+ if (!normalized) {
513
+ return "";
514
+ }
515
+ return HELP_PATH_ALIASES[normalized] ?? normalized;
516
+ }
517
+ export function resolveHelpBundleForPath(commandPath) {
518
+ const canonicalPath = resolveCanonicalHelpPath(commandPath);
519
+ if (!canonicalPath) {
520
+ return ROOT_HELP_BUNDLE;
521
+ }
522
+ return HELP_BY_COMMAND_PATH[canonicalPath] ?? ROOT_HELP_BUNDLE;
523
+ }
524
+ export function resolveHelpNarrative(commandPath, detailMode) {
525
+ const bundle = resolveHelpBundleForPath(commandPath);
526
+ return {
527
+ intent: bundle.why,
528
+ examples: detailMode === "detailed" ? [...bundle.examples] : bundle.examples.length > 0 ? [bundle.examples[0]] : [],
529
+ tips: detailMode === "detailed" ? [...(bundle.tips ?? [])] : [],
530
+ detail_mode: detailMode,
531
+ };
532
+ }
533
+ export function listDocumentedHelpPaths() {
534
+ return Object.keys(HELP_BY_COMMAND_PATH).sort((left, right) => left.localeCompare(right));
535
+ }
536
+ export function attachRichHelpText(program, argv = process.argv.slice(2)) {
537
+ const detailMode = resolveHelpDetailMode(argv);
538
+ program.addHelpText("after", renderHelpBundle(ROOT_HELP_BUNDLE, detailMode));
539
+ for (const [commandPath, bundle] of Object.entries(HELP_BY_COMMAND_PATH)) {
540
+ attachBundleByPath(program, commandPath, bundle, detailMode);
541
+ }
542
+ }
543
+ //# sourceMappingURL=help-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-content.js","sourceRoot":"","sources":["../../src/cli/help-content.ts"],"names":[],"mappings":"AAiBA,SAAS,uBAAuB,CAAC,MAAkB;IACjD,MAAM,KAAK,GAAa;QACtB,EAAE;QACF,SAAS;QACT,KAAK,MAAM,CAAC,GAAG,EAAE;KAClB,CAAC;IACF,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE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