@unbrained/pm-cli 2026.8.26 → 2026.8.27

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 (161) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +32 -0
  2. package/.agents/skills/README.md +47 -0
  3. package/.agents/skills/pm-developer/SKILL.md +117 -0
  4. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +49 -0
  5. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +91 -0
  6. package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +72 -0
  7. package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
  8. package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +82 -0
  9. package/.agents/skills/pm-developer/references/TOKEN_BUDGETS.md +85 -0
  10. package/.agents/skills/pm-extensions/SKILL.md +106 -0
  11. package/.agents/skills/pm-extensions/references/AUTHORING.md +95 -0
  12. package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
  13. package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
  14. package/.agents/skills/pm-sdk/SKILL.md +107 -0
  15. package/.agents/skills/pm-sdk/references/DOMAIN_MODELING.md +78 -0
  16. package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
  17. package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
  18. package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +82 -0
  19. package/.agents/skills/pm-user/SKILL.md +111 -0
  20. package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +105 -0
  21. package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
  22. package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
  23. package/.claude-plugin/marketplace.json +2 -2
  24. package/CHANGELOG.md +25 -3
  25. package/README.md +8 -5
  26. package/dist/cli/commander-usage.js +11 -7
  27. package/dist/cli/error-guidance.js +3 -3
  28. package/dist/cli/help-content.d.ts +2 -0
  29. package/dist/cli/help-content.js +53 -17
  30. package/dist/cli/help-json-payload.d.ts +8 -2
  31. package/dist/cli/help-json-payload.js +46 -12
  32. package/dist/cli/main.js +52 -74
  33. package/dist/cli/register-annotations.js +27 -21
  34. package/dist/cli/register-setup.js +98 -57
  35. package/dist/cli-bundle/bundle-manifest.json +152 -152
  36. package/dist/cli-bundle/chunks/chunk-3OO3W6FW.js +202 -0
  37. package/dist/cli-bundle/chunks/chunk-52EKTW6V.js +3 -0
  38. package/dist/cli-bundle/chunks/{chunk-KBFP3E4E.js → chunk-CVBBGWW5.js} +62 -44
  39. package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
  40. package/dist/cli-bundle/chunks/{chunk-E2GCFJSU.js → chunk-OS27HHBN.js} +31 -31
  41. package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
  42. package/dist/cli-bundle/chunks/{chunk-S4U76VZF.js → chunk-R4ETAOJC.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-UKBCRPA2.js → chunk-SH6P7FXI.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-WRHJ3MB6.js → chunk-SHMDY36D.js} +2 -2
  45. package/dist/cli-bundle/chunks/{chunk-ZNRLJ54C.js → chunk-SKXLJIEK.js} +2 -2
  46. package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
  47. package/dist/cli-bundle/chunks/{register-list-query-EMCPMICY.js → register-list-query-EUWM6VII.js} +2 -2
  48. package/dist/cli-bundle/chunks/{register-mutation-OJ67ABCB.js → register-mutation-FD4HSAVU.js} +4 -4
  49. package/dist/cli-bundle/chunks/{register-operations-H2GLP7LT.js → register-operations-HRMNFEC3.js} +2 -2
  50. package/dist/cli-bundle/chunks/register-setup-33GNICLX.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-4XNH2HM7.js → chunk-2AGZ5BRT.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-72T6JGAE.js → chunk-4BR5UU52.js} +45 -45
  53. package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-UYBA57GY.js → chunk-AD6ULRAF.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-7YCDTCBC.js → chunk-AQ5IYEZZ.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-YO3ZF3FI.js → chunk-EKX37ZHA.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-LV5N3LK5.js → chunk-FC2AXLB5.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{chunk-IBHXMFE7.js → chunk-HC7ODMH3.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{chunk-4K2II4TV.js → chunk-HVQ22RC4.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{chunk-A644DUFQ.js → chunk-MEASX544.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-FXDLT6FL.js → chunk-MXTYGECH.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-MMXUPDDJ.js → chunk-SUBSWYW3.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{chunk-57XY346D.js → chunk-XDPYBQCF.js} +9 -9
  64. package/dist/cli-bundle/focused-chunks/{chunk-TMJDFHVD.js → chunk-Y3JJXRVK.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-66VGB23P.js → chunk-Y5A7SJJ7.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
  67. package/dist/cli-bundle/focused-chunks/{chunk-P2E6LDAE.js → chunk-YVVZ3LQ6.js} +3 -3
  68. package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +5 -0
  69. package/dist/cli-bundle/main.js +15 -14
  70. package/dist/cli-bundle/sdk-authoring.js +1 -1
  71. package/dist/cli-bundle/sdk-contracts.js +2 -2
  72. package/dist/cli-bundle/sdk-core.js +31 -31
  73. package/dist/cli-bundle/sdk-governance.js +1 -1
  74. package/dist/cli-bundle/sdk-graph.js +1 -1
  75. package/dist/cli-bundle/sdk-merge.js +31 -31
  76. package/dist/cli-bundle/sdk-query.js +1 -1
  77. package/dist/cli-bundle/sdk-runtime.js +1 -1
  78. package/dist/cli-bundle/sdk-testing.js +1 -1
  79. package/dist/cli-bundle/sdk.js +32 -7
  80. package/dist/core/governance/issue-codes.d.ts +11 -2
  81. package/dist/core/governance/issue-codes.js +29 -10
  82. package/dist/core/item/item-format.js +3 -3
  83. package/dist/core/store/item-store.js +12 -5
  84. package/dist/mcp/server.js +123 -9
  85. package/dist/mcp/tool-definitions.d.ts +2 -0
  86. package/dist/mcp/tool-definitions.js +2 -2
  87. package/dist/sdk/agent/closed-domain-contracts.d.ts +1 -1
  88. package/dist/sdk/agent/closed-domain-contracts.js +24 -2
  89. package/dist/sdk/agent-capability-contracts.js +6 -2
  90. package/dist/sdk/cli-bootstrap.js +3 -2
  91. package/dist/sdk/cli-contracts/command-aliases.js +15 -2
  92. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -1
  93. package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
  94. package/dist/sdk/cli-contracts/flag-contracts.js +9 -5
  95. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +3 -3
  96. package/dist/sdk/cli-contracts/grammar-contracts.js +24 -17
  97. package/dist/sdk/cli-contracts/runtime-contracts.js +13 -11
  98. package/dist/sdk/cli-contracts/tool-schema.js +18 -15
  99. package/dist/sdk/cli-contracts.d.ts +1 -1
  100. package/dist/sdk/cli-contracts.js +3 -3
  101. package/dist/sdk/cli-program.js +3 -2
  102. package/dist/sdk/completion.js +40 -13
  103. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +14 -2
  104. package/dist/sdk/governance/upgrade.d.ts +2 -0
  105. package/dist/sdk/governance/upgrade.js +30 -8
  106. package/dist/sdk/governance/validate.js +8 -6
  107. package/dist/sdk/guide-topics.js +6 -6
  108. package/dist/sdk/index.d.ts +4 -2
  109. package/dist/sdk/index.js +5 -3
  110. package/dist/sdk/mcp/apps.d.ts +70 -0
  111. package/dist/sdk/mcp/apps.js +154 -0
  112. package/dist/sdk/mcp/skills.d.ts +127 -0
  113. package/dist/sdk/mcp/skills.js +390 -0
  114. package/dist/sdk/read-output-contracts.js +16 -3
  115. package/dist/sdk/runtime-action-aliases.js +7 -3
  116. package/dist/sdk/runtime-input.js +12 -4
  117. package/dist/sdk/runtime-primitives.d.ts +1 -1
  118. package/dist/sdk/runtime-primitives.js +3 -3
  119. package/docs/CLI_GRAMMAR.md +7 -1
  120. package/docs/COMMANDS.md +2 -2
  121. package/docs/EXTENSIONS.md +33 -32
  122. package/docs/MCP_2026_07_28.md +24 -2
  123. package/docs/MCP_2026_07_28_CONFORMANCE.md +4 -4
  124. package/docs/MCP_SKILLS_AND_APPS.md +107 -0
  125. package/docs/QUICKSTART.md +15 -15
  126. package/docs/README.md +1 -0
  127. package/docs/RELEASING.md +11 -3
  128. package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
  129. package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
  130. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  131. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +7 -6
  132. package/marketplace.json +2 -2
  133. package/package.json +9 -7
  134. package/packages/pm-beads/README.md +12 -6
  135. package/packages/pm-beads/docs/MIGRATION.md +53 -0
  136. package/packages/pm-beads/extensions/beads/index.ts +8 -0
  137. package/packages/pm-beads/extensions/beads/runtime.ts +671 -112
  138. package/packages/pm-beads/package.json +1 -1
  139. package/packages/pm-calendar/package.json +1 -1
  140. package/packages/pm-command-kit/package.json +1 -1
  141. package/packages/pm-digital-twin/package.json +1 -1
  142. package/packages/pm-governance-audit/package.json +1 -1
  143. package/packages/pm-guide-shell/package.json +1 -1
  144. package/packages/pm-kanban/package.json +1 -1
  145. package/packages/pm-lifecycle-hooks/package.json +1 -1
  146. package/packages/pm-linked-test-adapters/package.json +1 -1
  147. package/packages/pm-search-advanced/package.json +1 -1
  148. package/packages/pm-templates/package.json +1 -1
  149. package/packages/pm-todos/package.json +1 -1
  150. package/packages/pm-vcs/package.json +1 -1
  151. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  152. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  153. package/sdk/public-surface.json +235 -13
  154. package/dist/cli-bundle/chunks/chunk-ES25LX3D.js +0 -202
  155. package/dist/cli-bundle/chunks/chunk-FRDWWB6R.js +0 -3
  156. package/dist/cli-bundle/chunks/chunk-ICQ3RVIY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-IV64RJVE.js +0 -13
  158. package/dist/cli-bundle/chunks/chunk-MVYLQ67M.js +0 -3
  159. package/dist/cli-bundle/chunks/register-setup-GLZAHLVI.js +0 -2
  160. package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
  161. package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
@@ -0,0 +1,127 @@
1
+ import { PM_MCP_PROTOCOL_VERSION, type PmMcpRequestContext } from "./protocol.js";
2
+ /** Draft extension identifier proposed by SEP-2640. */
3
+ export declare const PM_MCP_SKILLS_EXTENSION: "io.modelcontextprotocol/skills";
4
+ /** Exact draft proposal revision implemented by pm. */
5
+ export declare const PM_MCP_SKILLS_DRAFT_REVISION: "SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03";
6
+ /** Server-side draft capability advertised through discovery. */
7
+ export declare const PM_MCP_SKILLS_SERVER_CAPABILITY: Readonly<{
8
+ revision: "SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03";
9
+ status: "draft";
10
+ directoryRead: true;
11
+ }>;
12
+ /** Require exact draft negotiation for a skills method. */
13
+ export declare function assertPmMcpSkillsCapability(context: PmMcpRequestContext, directoryRead?: boolean): void;
14
+ /** Security and context limits applied independently to every skill origin. */
15
+ export declare const PM_MCP_SKILL_LIMITS: Readonly<{
16
+ maxFilesPerSkill: 512;
17
+ maxFileBytes: number;
18
+ maxSkillBytes: number;
19
+ defaultPageSize: 20;
20
+ maxPageSize: 100;
21
+ }>;
22
+ /** Origin from which a skill was loaded. */
23
+ export type PmMcpSkillOrigin = "package" | "workspace";
24
+ /** One immutable file advertised by a skill. */
25
+ export interface PmMcpSkillResource {
26
+ /** Addressable skill resource URI. */
27
+ uri: string;
28
+ /** SEP-2640 SHA-256 digest of the exact bytes returned by reads. */
29
+ digest: string;
30
+ /** Exact byte length. */
31
+ size: number;
32
+ }
33
+ /** Discoverable skill descriptor from the current SEP draft. */
34
+ export interface PmMcpSkillDescriptor {
35
+ /** URI of the skill's mandatory SKILL.md. */
36
+ uri: string;
37
+ /** Parsed, verbatim frontmatter object. */
38
+ frontmatter: Record<string, unknown>;
39
+ /** Every bounded file in the skill directory. */
40
+ resources: PmMcpSkillResource[];
41
+ /** pm-specific compatibility and trust provenance. */
42
+ _meta: {
43
+ contractVersion: 1;
44
+ extensionRevision: typeof PM_MCP_SKILLS_DRAFT_REVISION;
45
+ origin: PmMcpSkillOrigin;
46
+ packageVersion: string;
47
+ protocolVersion: typeof PM_MCP_PROTOCOL_VERSION;
48
+ trust: "untrusted";
49
+ estimatedTokens: number;
50
+ };
51
+ }
52
+ /** Inputs for loading the canonical package skills plus repository overrides. */
53
+ export interface LoadPmMcpSkillsOptions {
54
+ /** pm package root containing `.agents/skills`. */
55
+ packageRoot: string;
56
+ /** Workspace root whose `.agents/skills` override package skills by name. */
57
+ workspaceRoot?: string;
58
+ /** Exact package version included in compatibility metadata. */
59
+ packageVersion: string;
60
+ }
61
+ /** List request inputs with opaque cursor pagination. */
62
+ export interface ListPmMcpSkillsOptions {
63
+ /** Opaque cursor returned by a previous page. */
64
+ cursor?: string;
65
+ /** Requested page size, bounded to 100. */
66
+ limit?: number;
67
+ }
68
+ /** One deterministic list page. */
69
+ export interface ListPmMcpSkillsResult {
70
+ /** Skills in lexical URI order. */
71
+ skills: PmMcpSkillDescriptor[];
72
+ /** Opaque continuation cursor when more skills exist. */
73
+ nextCursor?: string;
74
+ /** Explicit completeness signal. */
75
+ hasMore: boolean;
76
+ }
77
+ /** Exact read result for one skill resource. */
78
+ export interface ReadPmMcpSkillResourceResult {
79
+ /** Resource content returned as UTF-8 text or lossless Base64 bytes. */
80
+ contents: Array<{
81
+ uri: string;
82
+ mimeType: "text/markdown" | "text/plain";
83
+ text: string;
84
+ _meta: {
85
+ digest: string;
86
+ origin: PmMcpSkillOrigin;
87
+ trust: "untrusted";
88
+ };
89
+ } | {
90
+ uri: string;
91
+ mimeType: "application/octet-stream";
92
+ blob: string;
93
+ _meta: {
94
+ digest: string;
95
+ origin: PmMcpSkillOrigin;
96
+ trust: "untrusted";
97
+ };
98
+ }>;
99
+ }
100
+ /** Direct-child directory listing defined by the current SEP draft. */
101
+ export interface ReadPmMcpSkillDirectoryResult {
102
+ /** Direct child file and directory resources in lexical URI order. */
103
+ resources: Array<{
104
+ uri: string;
105
+ name: string;
106
+ mimeType: "application/octet-stream" | "inode/directory" | "text/markdown" | "text/plain";
107
+ }>;
108
+ /** Opaque continuation cursor when more direct children exist. */
109
+ nextCursor?: string;
110
+ /** Explicit completeness signal for this directory page. */
111
+ hasMore: boolean;
112
+ }
113
+ /** Immutable in-memory registry for one request's package/workspace origins. */
114
+ export declare class PmMcpSkillRegistry {
115
+ #private;
116
+ private constructor();
117
+ /** Load package skills and apply validated workspace overrides by name. */
118
+ static load(options: LoadPmMcpSkillsOptions): Promise<PmMcpSkillRegistry>;
119
+ /** List skills in deterministic pages without loading file bodies. */
120
+ list(options?: ListPmMcpSkillsOptions): ListPmMcpSkillsResult;
121
+ /** Get one skill descriptor by its SKILL.md URI. */
122
+ get(uri: string): PmMcpSkillDescriptor;
123
+ /** Read one digest-bound skill resource without following filesystem links. */
124
+ read(uri: string): ReadPmMcpSkillResourceResult;
125
+ /** List one directory's direct children with opaque cursor pagination. */
126
+ readDirectory(uri: string, options?: ListPmMcpSkillsOptions): ReadPmMcpSkillDirectoryResult;
127
+ }
@@ -0,0 +1,390 @@
1
+ /**
2
+ * @module sdk/mcp/skills
3
+ *
4
+ * Implements pm's draft Skills over MCP registry with bounded filesystem
5
+ * discovery, per-file digests, origin provenance, pagination, and fail-closed
6
+ * revision negotiation.
7
+ */
8
+
9
+ !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]="5f60bc89-c81b-57ee-a8f2-0d0b18d0af1b")}catch(e){}}();
10
+ import { createHash } from "node:crypto";
11
+ import { lstat, readdir, readFile } from "node:fs/promises";
12
+ import path from "node:path";
13
+ import { parseDocument } from "yaml";
14
+ import { isFileAbsentError } from "../../core/fs/fs-utils.js";
15
+ import { PM_MCP_ERROR_CODES, PM_MCP_PROTOCOL_VERSION, PmMcpProtocolError, isMcpRecord, } from "./protocol.js";
16
+ /** Draft extension identifier proposed by SEP-2640. */
17
+ export const PM_MCP_SKILLS_EXTENSION = "io.modelcontextprotocol/skills";
18
+ /** Exact draft proposal revision implemented by pm. */
19
+ export const PM_MCP_SKILLS_DRAFT_REVISION = "SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03";
20
+ /** Server-side draft capability advertised through discovery. */
21
+ export const PM_MCP_SKILLS_SERVER_CAPABILITY = Object.freeze({
22
+ revision: PM_MCP_SKILLS_DRAFT_REVISION,
23
+ status: "draft",
24
+ directoryRead: true,
25
+ });
26
+ /** Require exact draft negotiation for a skills method. */
27
+ export function assertPmMcpSkillsCapability(context, directoryRead = false) {
28
+ const extensions = context.clientCapabilities.extensions;
29
+ const declaration = isMcpRecord(extensions)
30
+ ? extensions[PM_MCP_SKILLS_EXTENSION]
31
+ : undefined;
32
+ if (!isMcpRecord(declaration) ||
33
+ declaration.revision !== PM_MCP_SKILLS_DRAFT_REVISION ||
34
+ (directoryRead && declaration.directoryRead !== true)) {
35
+ throw new PmMcpProtocolError("Missing or incompatible Skills over MCP draft capability", PM_MCP_ERROR_CODES.missingRequiredClientCapability, {
36
+ requiredCapabilities: {
37
+ extensions: {
38
+ [PM_MCP_SKILLS_EXTENSION]: PM_MCP_SKILLS_SERVER_CAPABILITY,
39
+ },
40
+ },
41
+ });
42
+ }
43
+ }
44
+ /** Security and context limits applied independently to every skill origin. */
45
+ export const PM_MCP_SKILL_LIMITS = Object.freeze({
46
+ maxFilesPerSkill: 512,
47
+ maxFileBytes: 16 * 1024 * 1024,
48
+ maxSkillBytes: 16 * 1024 * 1024,
49
+ defaultPageSize: 20,
50
+ maxPageSize: 100,
51
+ });
52
+ const MAX_MCP_SKILLS_PER_ORIGIN = 100;
53
+ const MAX_MCP_SKILL_ORIGIN_BYTES = 32 * 1024 * 1024;
54
+ const SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
55
+ const SKILL_PAGE_SIZES = new Set(Array.from({ length: PM_MCP_SKILL_LIMITS.maxPageSize }, (_, index) => index + 1));
56
+ function skillError(message, data) {
57
+ throw new PmMcpProtocolError(message, -32602, data);
58
+ }
59
+ function skillFileMimeType(name, bytes) {
60
+ try {
61
+ new TextDecoder("utf-8", { fatal: true }).decode(bytes);
62
+ return name.endsWith(".md") ? "text/markdown" : "text/plain";
63
+ }
64
+ catch {
65
+ return "application/octet-stream";
66
+ }
67
+ }
68
+ function parseSkillFrontmatter(content, source) {
69
+ const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(content);
70
+ if (!match)
71
+ skillError(`Skill ${source} is missing YAML frontmatter.`);
72
+ const document = parseDocument(match[1], {
73
+ prettyErrors: false,
74
+ strict: true,
75
+ uniqueKeys: true,
76
+ });
77
+ if (document.errors.length > 0) {
78
+ skillError(`Skill ${source} has invalid YAML frontmatter.`, {
79
+ errors: document.errors.map((error) => error.message),
80
+ });
81
+ }
82
+ let value;
83
+ try {
84
+ value = document.toJS({ maxAliasCount: 0 });
85
+ }
86
+ catch (error) {
87
+ skillError(`Skill ${source} has unsupported YAML aliases.`, {
88
+ error: String(error),
89
+ });
90
+ }
91
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
92
+ skillError(`Skill ${source} frontmatter must be an object.`);
93
+ }
94
+ return value;
95
+ }
96
+ async function readBoundedSkillFile(filePath, relative, size, budget) {
97
+ if (size > PM_MCP_SKILL_LIMITS.maxFileBytes) {
98
+ skillError(`Skill resource exceeds the per-file limit: ${relative}.`);
99
+ }
100
+ budget.files += 1;
101
+ if (budget.files > PM_MCP_SKILL_LIMITS.maxFilesPerSkill) {
102
+ skillError(`Skill exceeds ${PM_MCP_SKILL_LIMITS.maxFilesPerSkill} files.`);
103
+ }
104
+ budget.skillBytes += size;
105
+ if (budget.skillBytes > PM_MCP_SKILL_LIMITS.maxSkillBytes) {
106
+ skillError(`Skill exceeds the aggregate byte limit: ${relative}.`);
107
+ }
108
+ budget.originBytes.value += size;
109
+ if (budget.originBytes.value > MAX_MCP_SKILL_ORIGIN_BYTES) {
110
+ skillError(`Skill origin exceeds the aggregate byte limit: ${relative}.`);
111
+ }
112
+ return readFile(filePath);
113
+ }
114
+ async function collectSkillFiles(root, relative, budget) {
115
+ const directory = path.join(root, relative);
116
+ const entries = await readdir(directory, { withFileTypes: true });
117
+ const files = [];
118
+ for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
119
+ const childRelative = path.posix.join(relative.split(path.sep).join("/"), entry.name);
120
+ const childPath = path.join(root, ...childRelative.split("/"));
121
+ const stats = await lstat(childPath);
122
+ if (stats.isSymbolicLink()) {
123
+ skillError(`Skill resource must not be a symbolic link: ${childRelative}.`);
124
+ }
125
+ if (stats.isDirectory()) {
126
+ files.push(...(await collectSkillFiles(root, childRelative, budget)));
127
+ }
128
+ else if (stats.isFile()) {
129
+ files.push({
130
+ relative: childRelative,
131
+ bytes: await readBoundedSkillFile(childPath, childRelative, stats.size, budget),
132
+ });
133
+ }
134
+ else {
135
+ skillError(`Skill resource must be a regular file or directory: ${childRelative}.`);
136
+ }
137
+ }
138
+ return files;
139
+ }
140
+ async function loadSkillOrigin(skillsRoot, origin, packageVersion) {
141
+ const skills = new Map();
142
+ let entries;
143
+ try {
144
+ entries = await readdir(skillsRoot, { withFileTypes: true });
145
+ }
146
+ catch (error) {
147
+ if (isFileAbsentError(error)) {
148
+ return skills;
149
+ }
150
+ throw error;
151
+ }
152
+ const skillEntries = entries
153
+ .filter((entry) => entry.isDirectory() && SKILL_NAME_PATTERN.test(entry.name))
154
+ .sort((left, right) => left.name.localeCompare(right.name));
155
+ if (skillEntries.length > MAX_MCP_SKILLS_PER_ORIGIN) {
156
+ skillError(`Skill origin exceeds ${MAX_MCP_SKILLS_PER_ORIGIN} directories.`);
157
+ }
158
+ const originBytes = { value: 0 };
159
+ for (const entry of skillEntries) {
160
+ const files = await collectSkillFiles(path.join(skillsRoot, entry.name), "", {
161
+ files: 0,
162
+ skillBytes: 0,
163
+ originBytes,
164
+ });
165
+ const totalBytes = files.reduce((sum, file) => sum + file.bytes.byteLength, 0);
166
+ const main = files.find((file) => file.relative === "SKILL.md");
167
+ if (!main)
168
+ continue;
169
+ const frontmatter = parseSkillFrontmatter(main.bytes.toString("utf8"), entry.name);
170
+ if (frontmatter.name !== entry.name) {
171
+ skillError(`Skill directory ${entry.name} must match frontmatter name.`, {
172
+ actual: frontmatter.name ?? null,
173
+ expected: entry.name,
174
+ });
175
+ }
176
+ if (typeof frontmatter.description !== "string" ||
177
+ frontmatter.description.trim().length === 0) {
178
+ skillError(`Skill ${entry.name} requires a non-empty frontmatter description.`, {
179
+ required: ["description"],
180
+ });
181
+ }
182
+ const resources = files.map((file) => ({
183
+ uri: `skill://${entry.name}/${file.relative}`,
184
+ digest: `sha256:${createHash("sha256").update(file.bytes).digest("hex")}`,
185
+ size: file.bytes.byteLength,
186
+ }));
187
+ const fingerprint = createHash("sha256")
188
+ .update(resources
189
+ .map((resource) => `${resource.uri}:${resource.digest}`)
190
+ .join("\n"))
191
+ .digest("hex");
192
+ skills.set(entry.name, {
193
+ uri: `skill://${entry.name}/SKILL.md`,
194
+ frontmatter,
195
+ resources,
196
+ _meta: {
197
+ contractVersion: 1,
198
+ extensionRevision: PM_MCP_SKILLS_DRAFT_REVISION,
199
+ origin,
200
+ packageVersion,
201
+ protocolVersion: PM_MCP_PROTOCOL_VERSION,
202
+ trust: "untrusted",
203
+ estimatedTokens: Math.ceil(totalBytes / 4),
204
+ },
205
+ files: new Map(files.map((file) => [file.relative, file.bytes])),
206
+ fingerprint,
207
+ });
208
+ }
209
+ return skills;
210
+ }
211
+ function projectSkill(skill) {
212
+ const { files: _files, fingerprint: _fingerprint, ...descriptor } = skill;
213
+ return descriptor;
214
+ }
215
+ /** Immutable in-memory registry for one request's package/workspace origins. */
216
+ export class PmMcpSkillRegistry {
217
+ #skills;
218
+ #fingerprint;
219
+ constructor(skills) {
220
+ this.#skills = skills;
221
+ this.#fingerprint = createHash("sha256")
222
+ .update([...skills.entries()]
223
+ .sort(([left], [right]) => left.localeCompare(right))
224
+ .map(([name, skill]) => `${name}:${skill.fingerprint}`)
225
+ .join("\n"))
226
+ .digest("hex")
227
+ .slice(0, 16);
228
+ }
229
+ /** Decode one registry-bound cursor for a list or directory scope. */
230
+ #decodeCursor(cursor, scope) {
231
+ if (!cursor)
232
+ return 0;
233
+ try {
234
+ const parsed = JSON.parse(Buffer.from(cursor, "base64url").toString("utf8"));
235
+ if (typeof parsed !== "object" ||
236
+ parsed === null ||
237
+ !("fingerprint" in parsed) ||
238
+ parsed.fingerprint !== this.#fingerprint ||
239
+ !("scope" in parsed) ||
240
+ parsed.scope !== scope ||
241
+ !("offset" in parsed) ||
242
+ !Number.isInteger(parsed.offset) ||
243
+ Number(parsed.offset) < 0) {
244
+ skillError("Skill cursor is invalid or stale.");
245
+ }
246
+ return Number(parsed.offset);
247
+ }
248
+ catch (error) {
249
+ if (error instanceof PmMcpProtocolError)
250
+ throw error;
251
+ return skillError("Skill cursor is invalid or stale.");
252
+ }
253
+ }
254
+ /** Encode one registry-bound continuation cursor. */
255
+ #encodeCursor(offset, scope) {
256
+ return Buffer.from(JSON.stringify({ fingerprint: this.#fingerprint, offset, scope })).toString("base64url");
257
+ }
258
+ /** Load package skills and apply validated workspace overrides by name. */
259
+ static async load(options) {
260
+ const packaged = await loadSkillOrigin(path.join(options.packageRoot, ".agents", "skills"), "package", options.packageVersion);
261
+ if (options.workspaceRoot) {
262
+ const packageSkillsRoot = path.resolve(options.packageRoot, ".agents", "skills");
263
+ const workspaceSkillsRoot = path.resolve(options.workspaceRoot, ".agents", "skills");
264
+ if (workspaceSkillsRoot !== packageSkillsRoot) {
265
+ const overrides = await loadSkillOrigin(workspaceSkillsRoot, "workspace", options.packageVersion);
266
+ for (const [name, skill] of overrides)
267
+ packaged.set(name, skill);
268
+ }
269
+ }
270
+ return new PmMcpSkillRegistry(packaged);
271
+ }
272
+ /** List skills in deterministic pages without loading file bodies. */
273
+ list(options = {}) {
274
+ const limit = options.limit ?? PM_MCP_SKILL_LIMITS.defaultPageSize;
275
+ if (!SKILL_PAGE_SIZES.has(limit)) {
276
+ skillError(`Skill list limit must be an integer from 1 to ${PM_MCP_SKILL_LIMITS.maxPageSize}.`);
277
+ }
278
+ const offset = this.#decodeCursor(options.cursor, "skills/list");
279
+ const ordered = [...this.#skills.values()].sort((left, right) => left.uri.localeCompare(right.uri));
280
+ const page = ordered.slice(offset, offset + limit);
281
+ const nextOffset = offset + page.length;
282
+ const hasMore = nextOffset < ordered.length;
283
+ return {
284
+ skills: page.map(projectSkill),
285
+ hasMore,
286
+ ...(hasMore
287
+ ? {
288
+ nextCursor: this.#encodeCursor(nextOffset, "skills/list"),
289
+ }
290
+ : {}),
291
+ };
292
+ }
293
+ /** Get one skill descriptor by its SKILL.md URI. */
294
+ get(uri) {
295
+ const match = /^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(uri);
296
+ const skill = match ? this.#skills.get(match[1]) : undefined;
297
+ if (!skill)
298
+ skillError(`Unknown pm MCP skill: ${uri}.`, { field: "uri" });
299
+ return projectSkill(skill);
300
+ }
301
+ /** Read one digest-bound skill resource without following filesystem links. */
302
+ read(uri) {
303
+ const match = /^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(uri);
304
+ const skill = match ? this.#skills.get(match[1]) : undefined;
305
+ const relative = match?.[2] ?? "";
306
+ const bytes = skill && relative ? skill.files.get(relative) : undefined;
307
+ const resource = skill?.resources.find((candidate) => candidate.uri === uri);
308
+ if (!skill || !bytes || !resource) {
309
+ skillError(`Unknown pm MCP skill resource: ${uri}.`, { field: "uri" });
310
+ }
311
+ const metadata = {
312
+ digest: resource.digest,
313
+ origin: skill._meta.origin,
314
+ trust: "untrusted",
315
+ };
316
+ const mimeType = skillFileMimeType(relative, bytes);
317
+ if (mimeType !== "application/octet-stream") {
318
+ return {
319
+ contents: [
320
+ {
321
+ uri,
322
+ mimeType,
323
+ text: bytes.toString("utf8"),
324
+ _meta: metadata,
325
+ },
326
+ ],
327
+ };
328
+ }
329
+ return {
330
+ contents: [
331
+ {
332
+ uri,
333
+ mimeType,
334
+ blob: bytes.toString("base64"),
335
+ _meta: metadata,
336
+ },
337
+ ],
338
+ };
339
+ }
340
+ /** List one directory's direct children with opaque cursor pagination. */
341
+ readDirectory(uri, options = {}) {
342
+ const match = /^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(uri);
343
+ const skill = match ? this.#skills.get(match[1]) : undefined;
344
+ if (!skill)
345
+ skillError(`Unknown pm MCP skill directory: ${uri}.`, { field: "uri" });
346
+ const directory = (match?.[2] ?? "").replace(/\/$/u, "");
347
+ const prefix = directory.length > 0 ? `${directory}/` : "";
348
+ const base = `skill://${match[1]}`;
349
+ const children = new Map();
350
+ for (const resource of skill.resources) {
351
+ const relative = resource.uri.slice(`${base}/`.length);
352
+ if (!relative.startsWith(prefix))
353
+ continue;
354
+ const remainder = relative.slice(prefix.length);
355
+ const [name, ...descendants] = remainder.split("/");
356
+ const childUri = `${base}/${prefix}${name}`;
357
+ const childBytes = skill.files.get(`${prefix}${name}`);
358
+ children.set(name, {
359
+ uri: childUri,
360
+ name,
361
+ mimeType: descendants.length > 0
362
+ ? "inode/directory"
363
+ : skillFileMimeType(name, childBytes),
364
+ });
365
+ }
366
+ if (directory.length > 0 && children.size === 0) {
367
+ skillError(`Unknown pm MCP skill directory: ${uri}.`, { field: "uri" });
368
+ }
369
+ const limit = options.limit ?? PM_MCP_SKILL_LIMITS.maxPageSize;
370
+ if (!SKILL_PAGE_SIZES.has(limit)) {
371
+ skillError(`Skill directory limit must be an integer from 1 to ${PM_MCP_SKILL_LIMITS.maxPageSize}.`);
372
+ }
373
+ const offset = this.#decodeCursor(options.cursor, uri);
374
+ const ordered = [...children.values()].sort((left, right) => left.uri.localeCompare(right.uri));
375
+ const resources = ordered.slice(offset, offset + limit);
376
+ const nextOffset = offset + resources.length;
377
+ const hasMore = nextOffset < ordered.length;
378
+ return {
379
+ resources,
380
+ hasMore,
381
+ ...(hasMore
382
+ ? {
383
+ nextCursor: this.#encodeCursor(nextOffset, uri),
384
+ }
385
+ : {}),
386
+ };
387
+ }
388
+ }
389
+ //# sourceMappingURL=skills.js.map
390
+ //# debugId=5f60bc89-c81b-57ee-a8f2-0d0b18d0af1b
@@ -5,7 +5,7 @@
5
5
  * surface without coupling package authors to command-specific option names.
6
6
  */
7
7
 
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d084da05-c967-58f1-afe4-069f09838e6f")}catch(e){}}();
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2103a4dc-3037-5768-b2c7-5964de4ac86b")}catch(e){}}();
9
9
  import { EXIT_CODE } from "../core/shared/constants.js";
10
10
  import { PmCliError } from "../core/shared/errors.js";
11
11
  import { compactReadOutputToBudget, estimateReadOutputTokens, resolveReadOutputRecoveryBudget, updateReadOutputReceiptEstimate, } from "./read-output-budget.js";
@@ -388,7 +388,20 @@ export function applyReadOutputIncludeModes(command, includeValue, commandOption
388
388
  modes.push(token);
389
389
  canonicalModes.add(token);
390
390
  }
391
- if (modes.length > 0) {
391
+ const forwardedGetFieldSelectors = resolveReadOutputSurface(command) === "get"
392
+ ? selectors.filter((selector) => selector !== "item")
393
+ : [];
394
+ const forwardedGetFields = forwardedGetFieldSelectors.length > 0;
395
+ if (forwardedGetFields) {
396
+ commandOptions.fields = [
397
+ ...new Set([
398
+ ...(stringList(commandOptions.fields) ?? []),
399
+ ...forwardedGetFieldSelectors,
400
+ ]),
401
+ ].join(",");
402
+ canonicalModes.add("fields");
403
+ }
404
+ if (modes.length > 0 || forwardedGetFields) {
392
405
  optionsWithProvenance[READ_OUTPUT_INVOCATION_PROVENANCE] = {
393
406
  canonical_include_modes: [...canonicalModes],
394
407
  explicit_legacy_aliases: [...explicitLegacyAliases],
@@ -1210,4 +1223,4 @@ export function resolveReadOutputEncoding(command, options) {
1210
1223
  : undefined;
1211
1224
  }
1212
1225
  //# sourceMappingURL=read-output-contracts.js.map
1213
- //# debugId=d084da05-c967-58f1-afe4-069f09838e6f
1226
+ //# debugId=2103a4dc-3037-5768-b2c7-5964de4ac86b
@@ -4,8 +4,8 @@
4
4
  * Declares canonical native-action routes for public SDK aliases.
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]="6f62939a-7b99-5687-93ae-834e0032f1d5")}catch(e){}}();
8
- import { PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS } from "./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]="1ff4005f-be23-5dcf-9834-dbd7d083b76d")}catch(e){}}();
8
+ import { PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS, } from "./cli-contracts/enum-contracts.js";
9
9
  const LIST_ACTION_ALIASES = {
10
10
  "list-all": { action: "list", options: { excludeTerminal: false } },
11
11
  "list-draft": {
@@ -51,6 +51,10 @@ export const SDK_ACTION_ALIASES = {
51
51
  ...LIST_ACTION_ALIASES,
52
52
  ...buildExtensionPackageActionAliases("extension"),
53
53
  ...buildExtensionPackageActionAliases("package"),
54
+ ...Object.fromEntries(PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS.map((subcommand) => [
55
+ `package-${subcommand}`,
56
+ { action: subcommand },
57
+ ])),
54
58
  };
55
59
  //# sourceMappingURL=runtime-action-aliases.js.map
56
- //# debugId=6f62939a-7b99-5687-93ae-834e0032f1d5
60
+ //# debugId=1ff4005f-be23-5dcf-9834-dbd7d083b76d
@@ -5,7 +5,7 @@
5
5
  * primitives are shared by native action dispatchers and MCP-specific adapters.
6
6
  */
7
7
 
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2a1e986f-304d-50f6-a405-6afc221bdad5")}catch(e){}}();
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7949205a-ab1b-5457-961c-593498aff88b")}catch(e){}}();
9
9
  import { EXIT_CODE } from "../core/shared/constants.js";
10
10
  import { PmCliError } from "../core/shared/errors.js";
11
11
  import { asRecordClone } from "../core/shared/primitives.js";
@@ -202,6 +202,15 @@ const HOISTED_ACTION_OPTION_KEYS = {
202
202
  update: ["parent", "allowMissingParent", "completedAt"],
203
203
  copy: ["allowDuplicate"],
204
204
  close: ["duplicateOf", "completedAt"],
205
+ upgrade: [
206
+ "scope",
207
+ "dryRun",
208
+ "cliOnly",
209
+ "packagesOnly",
210
+ "repair",
211
+ "tag",
212
+ "packageName",
213
+ ],
205
214
  // pm-7u9j: the narrow pm_append tool declares `body` top-level; runAppend
206
215
  // reads it from options, while schema/config consume their top-level values
207
216
  // directly in runAction and therefore need no hoisting.
@@ -232,8 +241,7 @@ export function normalizeMcpOptionsArrays(options, action = "") {
232
241
  result[key] = value;
233
242
  continue;
234
243
  }
235
- if (typeof value === "string" &&
236
- scalarToArrayFields.has(key)) {
244
+ if (typeof value === "string" && scalarToArrayFields.has(key)) {
237
245
  result[key] = [value];
238
246
  continue;
239
247
  }
@@ -578,4 +586,4 @@ export function updateManyOptionsFromFlat(options) {
578
586
  };
579
587
  }
580
588
  //# sourceMappingURL=runtime-input.js.map
581
- //# debugId=2a1e986f-304d-50f6-a405-6afc221bdad5
589
+ //# debugId=7949205a-ab1b-5457-961c-593498aff88b
@@ -75,7 +75,7 @@ export { migrateItemFilesToFormat } from "../core/store/item-format-migration.js
75
75
  export { type CachedDocumentCandidate, listAllDocumentCandidatesCached, } from "../core/store/item-metadata-cache.js";
76
76
  export { buildItemNotFoundError, createMutationGuardSdk, deleteItem, listAllItemMetadata, listAllItemMetadataLight, locateItem, mutateItem, mutateItemWithHistoryContext, readLocatedItem, } from "../core/store/item-store.js";
77
77
  export { isTerminalPlanMode, shouldCompletePlanOnClose, } from "../core/item/plan-lifecycle.js";
78
- export { getHistoryPath, getItemPath, getSettingsPath, resolveImplicitPmRoot, resolvePmRoot, } from "../core/store/paths.js";
78
+ export { getHistoryPath, getItemPath, getSettingsPath, resolveImplicitPmRoot, resolvePmRoot, resolveWorkspaceRoot, } from "../core/store/paths.js";
79
79
  export { persistSelectedItemFormat, readSettings, readSettingsWithMetadata, writeSettings, } from "../core/store/settings.js";
80
80
  export { maybeRunFirstUseTelemetryPrompt } from "../core/telemetry/consent.js";
81
81
  export { type TelemetryCommandResolution, type TelemetryResolutionStage, deriveTelemetryCommandResolution, } from "../core/telemetry/observability.js";
@@ -7,7 +7,7 @@
7
7
  * prefer the typed operations exported by the main SDK barrel.
8
8
  */
9
9
 
10
- !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]="4be36c51-a9fc-507d-8f13-d764b5668ab9")}catch(e){}}();
10
+ !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]="d45775e5-6826-521b-80b3-429ed22947d9")}catch(e){}}();
11
11
  export { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, } from "../core/checkpoint/mutation-checkpoint.js";
12
12
  export { flattenFlagListValue, resolveFlagValueKind, } from "../core/extensions/flag-value-types.js";
13
13
  export { createUnknownSubcommandError, } from "./agent/subcommand-recovery.js";
@@ -76,10 +76,10 @@ export { migrateItemFilesToFormat } from "../core/store/item-format-migration.js
76
76
  export { listAllDocumentCandidatesCached, } from "../core/store/item-metadata-cache.js";
77
77
  export { buildItemNotFoundError, createMutationGuardSdk, deleteItem, listAllItemMetadata, listAllItemMetadataLight, locateItem, mutateItem, mutateItemWithHistoryContext, readLocatedItem, } from "../core/store/item-store.js";
78
78
  export { isTerminalPlanMode, shouldCompletePlanOnClose, } from "../core/item/plan-lifecycle.js";
79
- export { getHistoryPath, getItemPath, getSettingsPath, resolveImplicitPmRoot, resolvePmRoot, } from "../core/store/paths.js";
79
+ export { getHistoryPath, getItemPath, getSettingsPath, resolveImplicitPmRoot, resolvePmRoot, resolveWorkspaceRoot, } from "../core/store/paths.js";
80
80
  export { persistSelectedItemFormat, readSettings, readSettingsWithMetadata, writeSettings, } from "../core/store/settings.js";
81
81
  export { maybeRunFirstUseTelemetryPrompt } from "../core/telemetry/consent.js";
82
82
  export { deriveTelemetryCommandResolution, } from "../core/telemetry/observability.js";
83
83
  export { emitTelemetryErrorEvent, finishTelemetryCommand, startTelemetryCommand, } from "../core/telemetry/runtime.js";
84
84
  //# sourceMappingURL=runtime-primitives.js.map
85
- //# debugId=4be36c51-a9fc-507d-8f13-d764b5668ab9
85
+ //# debugId=d45775e5-6826-521b-80b3-429ed22947d9