gsd-pi 2.29.0-dev.49d972f → 2.29.0-dev.4c155ee

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 (256) hide show
  1. package/README.md +24 -17
  2. package/dist/headless.js +4 -0
  3. package/dist/resources/extensions/bg-shell/process-manager.ts +13 -0
  4. package/dist/resources/extensions/gsd/auto-dashboard.ts +217 -65
  5. package/dist/resources/extensions/gsd/auto-dispatch.ts +32 -3
  6. package/dist/resources/extensions/gsd/auto-post-unit.ts +44 -12
  7. package/dist/resources/extensions/gsd/auto-prompts.ts +40 -17
  8. package/dist/resources/extensions/gsd/auto-recovery.ts +2 -1
  9. package/dist/resources/extensions/gsd/auto-start.ts +18 -32
  10. package/dist/resources/extensions/gsd/auto-worktree.ts +21 -182
  11. package/dist/resources/extensions/gsd/auto.ts +2 -9
  12. package/dist/resources/extensions/gsd/captures.ts +4 -10
  13. package/dist/resources/extensions/gsd/commands-handlers.ts +2 -1
  14. package/dist/resources/extensions/gsd/commands-prefs-wizard.ts +44 -14
  15. package/dist/resources/extensions/gsd/commands-workflow-templates.ts +544 -0
  16. package/dist/resources/extensions/gsd/commands.ts +55 -2
  17. package/dist/resources/extensions/gsd/detection.ts +2 -1
  18. package/dist/resources/extensions/gsd/doctor-checks.ts +49 -1
  19. package/dist/resources/extensions/gsd/doctor-types.ts +3 -1
  20. package/dist/resources/extensions/gsd/forensics.ts +2 -2
  21. package/dist/resources/extensions/gsd/git-service.ts +3 -2
  22. package/dist/resources/extensions/gsd/gitignore.ts +9 -63
  23. package/dist/resources/extensions/gsd/gsd-db.ts +1 -165
  24. package/dist/resources/extensions/gsd/guided-flow.ts +8 -5
  25. package/dist/resources/extensions/gsd/index.ts +3 -3
  26. package/dist/resources/extensions/gsd/md-importer.ts +3 -2
  27. package/dist/resources/extensions/gsd/mechanical-completion.ts +430 -0
  28. package/dist/resources/extensions/gsd/migrate/command.ts +3 -2
  29. package/dist/resources/extensions/gsd/migrate/writer.ts +2 -1
  30. package/dist/resources/extensions/gsd/migrate-external.ts +123 -0
  31. package/dist/resources/extensions/gsd/paths.ts +24 -2
  32. package/dist/resources/extensions/gsd/post-unit-hooks.ts +6 -5
  33. package/dist/resources/extensions/gsd/preferences-models.ts +7 -1
  34. package/dist/resources/extensions/gsd/preferences-validation.ts +2 -1
  35. package/dist/resources/extensions/gsd/preferences.ts +10 -5
  36. package/dist/resources/extensions/gsd/prompts/discuss-headless.md +4 -2
  37. package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
  38. package/dist/resources/extensions/gsd/prompts/plan-milestone.md +26 -2
  39. package/dist/resources/extensions/gsd/prompts/plan-slice.md +15 -1
  40. package/dist/resources/extensions/gsd/prompts/workflow-start.md +28 -0
  41. package/dist/resources/extensions/gsd/repo-identity.ts +148 -0
  42. package/dist/resources/extensions/gsd/resource-version.ts +99 -0
  43. package/dist/resources/extensions/gsd/session-forensics.ts +4 -3
  44. package/dist/resources/extensions/gsd/tests/activity-log.test.ts +2 -2
  45. package/dist/resources/extensions/gsd/tests/auto-recovery.test.ts +3 -3
  46. package/dist/resources/extensions/gsd/tests/auto-worktree.test.ts +0 -58
  47. package/dist/resources/extensions/gsd/tests/doctor-runtime.test.ts +3 -4
  48. package/dist/resources/extensions/gsd/tests/extension-selector-separator.test.ts +60 -38
  49. package/dist/resources/extensions/gsd/tests/feature-branch-lifecycle-integration.test.ts +5 -18
  50. package/dist/resources/extensions/gsd/tests/git-service.test.ts +10 -37
  51. package/dist/resources/extensions/gsd/tests/knowledge.test.ts +4 -4
  52. package/dist/resources/extensions/gsd/tests/mechanical-completion.test.ts +356 -0
  53. package/dist/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +1 -0
  54. package/dist/resources/extensions/gsd/tests/token-profile.test.ts +14 -16
  55. package/dist/resources/extensions/gsd/tests/workflow-templates.test.ts +173 -0
  56. package/dist/resources/extensions/gsd/triage-resolution.ts +2 -1
  57. package/dist/resources/extensions/gsd/types.ts +2 -0
  58. package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +87 -0
  59. package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +74 -0
  60. package/dist/resources/extensions/gsd/workflow-templates/full-project.md +41 -0
  61. package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +45 -0
  62. package/dist/resources/extensions/gsd/workflow-templates/refactor.md +83 -0
  63. package/dist/resources/extensions/gsd/workflow-templates/registry.json +85 -0
  64. package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +73 -0
  65. package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +81 -0
  66. package/dist/resources/extensions/gsd/workflow-templates/spike.md +69 -0
  67. package/dist/resources/extensions/gsd/workflow-templates.ts +241 -0
  68. package/dist/resources/extensions/gsd/worktree-command.ts +1 -11
  69. package/dist/resources/extensions/gsd/worktree-manager.ts +3 -2
  70. package/dist/resources/extensions/gsd/worktree.ts +42 -5
  71. package/dist/resources/extensions/mcp-client/index.ts +459 -0
  72. package/dist/resources/skills/create-gsd-extension/SKILL.md +87 -0
  73. package/dist/resources/skills/create-gsd-extension/references/compaction-session-control.md +77 -0
  74. package/dist/resources/skills/create-gsd-extension/references/custom-commands.md +139 -0
  75. package/dist/resources/skills/create-gsd-extension/references/custom-rendering.md +108 -0
  76. package/dist/resources/skills/create-gsd-extension/references/custom-tools.md +183 -0
  77. package/dist/resources/skills/create-gsd-extension/references/custom-ui.md +490 -0
  78. package/dist/resources/skills/create-gsd-extension/references/events-reference.md +126 -0
  79. package/dist/resources/skills/create-gsd-extension/references/extension-lifecycle.md +64 -0
  80. package/dist/resources/skills/create-gsd-extension/references/extensionapi-reference.md +75 -0
  81. package/dist/resources/skills/create-gsd-extension/references/extensioncontext-reference.md +53 -0
  82. package/dist/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +36 -0
  83. package/dist/resources/skills/create-gsd-extension/references/mode-behavior.md +32 -0
  84. package/dist/resources/skills/create-gsd-extension/references/model-provider-management.md +89 -0
  85. package/dist/resources/skills/create-gsd-extension/references/packaging-distribution.md +55 -0
  86. package/dist/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +90 -0
  87. package/dist/resources/skills/create-gsd-extension/references/state-management.md +70 -0
  88. package/dist/resources/skills/create-gsd-extension/references/system-prompt-modification.md +52 -0
  89. package/dist/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +51 -0
  90. package/dist/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +143 -0
  91. package/dist/resources/skills/create-gsd-extension/workflows/add-capability.md +57 -0
  92. package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +156 -0
  93. package/dist/resources/skills/create-gsd-extension/workflows/debug-extension.md +74 -0
  94. package/dist/resources/skills/create-skill/SKILL.md +184 -0
  95. package/dist/resources/skills/create-skill/references/api-security.md +226 -0
  96. package/dist/resources/skills/create-skill/references/be-clear-and-direct.md +531 -0
  97. package/dist/resources/skills/create-skill/references/common-patterns.md +595 -0
  98. package/dist/resources/skills/create-skill/references/core-principles.md +437 -0
  99. package/dist/resources/skills/create-skill/references/executable-code.md +175 -0
  100. package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +68 -0
  101. package/dist/resources/skills/create-skill/references/iteration-and-testing.md +474 -0
  102. package/dist/resources/skills/create-skill/references/recommended-structure.md +168 -0
  103. package/dist/resources/skills/create-skill/references/skill-structure.md +372 -0
  104. package/dist/resources/skills/create-skill/references/use-xml-tags.md +466 -0
  105. package/dist/resources/skills/create-skill/references/using-scripts.md +113 -0
  106. package/dist/resources/skills/create-skill/references/using-templates.md +112 -0
  107. package/dist/resources/skills/create-skill/references/workflows-and-validation.md +510 -0
  108. package/dist/resources/skills/create-skill/templates/router-skill.md +73 -0
  109. package/dist/resources/skills/create-skill/templates/simple-skill.md +33 -0
  110. package/dist/resources/skills/create-skill/workflows/add-reference.md +96 -0
  111. package/dist/resources/skills/create-skill/workflows/add-script.md +93 -0
  112. package/dist/resources/skills/create-skill/workflows/add-template.md +74 -0
  113. package/dist/resources/skills/create-skill/workflows/add-workflow.md +120 -0
  114. package/dist/resources/skills/create-skill/workflows/audit-skill.md +148 -0
  115. package/dist/resources/skills/create-skill/workflows/create-new-skill.md +196 -0
  116. package/dist/resources/skills/create-skill/workflows/get-guidance.md +121 -0
  117. package/dist/resources/skills/create-skill/workflows/upgrade-to-router.md +161 -0
  118. package/dist/resources/skills/create-skill/workflows/verify-skill.md +204 -0
  119. package/dist/resources/skills/react-best-practices/SKILL.md +1 -1
  120. package/package.json +1 -1
  121. package/packages/native/dist/native.d.ts +2 -0
  122. package/packages/native/dist/native.js +19 -5
  123. package/packages/native/src/native.ts +23 -9
  124. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  125. package/packages/pi-coding-agent/dist/core/extensions/loader.js +13 -0
  126. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  127. package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
  128. package/packages/pi-coding-agent/dist/core/lsp/client.js +3 -0
  129. package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
  130. package/packages/pi-coding-agent/src/core/extensions/loader.ts +13 -0
  131. package/packages/pi-coding-agent/src/core/lsp/client.ts +3 -0
  132. package/src/resources/extensions/bg-shell/process-manager.ts +13 -0
  133. package/src/resources/extensions/gsd/auto-dashboard.ts +217 -65
  134. package/src/resources/extensions/gsd/auto-dispatch.ts +32 -3
  135. package/src/resources/extensions/gsd/auto-post-unit.ts +44 -12
  136. package/src/resources/extensions/gsd/auto-prompts.ts +40 -17
  137. package/src/resources/extensions/gsd/auto-recovery.ts +2 -1
  138. package/src/resources/extensions/gsd/auto-start.ts +18 -32
  139. package/src/resources/extensions/gsd/auto-worktree.ts +21 -182
  140. package/src/resources/extensions/gsd/auto.ts +2 -9
  141. package/src/resources/extensions/gsd/captures.ts +4 -10
  142. package/src/resources/extensions/gsd/commands-handlers.ts +2 -1
  143. package/src/resources/extensions/gsd/commands-prefs-wizard.ts +44 -14
  144. package/src/resources/extensions/gsd/commands-workflow-templates.ts +544 -0
  145. package/src/resources/extensions/gsd/commands.ts +55 -2
  146. package/src/resources/extensions/gsd/detection.ts +2 -1
  147. package/src/resources/extensions/gsd/doctor-checks.ts +49 -1
  148. package/src/resources/extensions/gsd/doctor-types.ts +3 -1
  149. package/src/resources/extensions/gsd/forensics.ts +2 -2
  150. package/src/resources/extensions/gsd/git-service.ts +3 -2
  151. package/src/resources/extensions/gsd/gitignore.ts +9 -63
  152. package/src/resources/extensions/gsd/gsd-db.ts +1 -165
  153. package/src/resources/extensions/gsd/guided-flow.ts +8 -5
  154. package/src/resources/extensions/gsd/index.ts +3 -3
  155. package/src/resources/extensions/gsd/md-importer.ts +3 -2
  156. package/src/resources/extensions/gsd/mechanical-completion.ts +430 -0
  157. package/src/resources/extensions/gsd/migrate/command.ts +3 -2
  158. package/src/resources/extensions/gsd/migrate/writer.ts +2 -1
  159. package/src/resources/extensions/gsd/migrate-external.ts +123 -0
  160. package/src/resources/extensions/gsd/paths.ts +24 -2
  161. package/src/resources/extensions/gsd/post-unit-hooks.ts +6 -5
  162. package/src/resources/extensions/gsd/preferences-models.ts +7 -1
  163. package/src/resources/extensions/gsd/preferences-validation.ts +2 -1
  164. package/src/resources/extensions/gsd/preferences.ts +10 -5
  165. package/src/resources/extensions/gsd/prompts/discuss-headless.md +4 -2
  166. package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
  167. package/src/resources/extensions/gsd/prompts/plan-milestone.md +26 -2
  168. package/src/resources/extensions/gsd/prompts/plan-slice.md +15 -1
  169. package/src/resources/extensions/gsd/prompts/workflow-start.md +28 -0
  170. package/src/resources/extensions/gsd/repo-identity.ts +148 -0
  171. package/src/resources/extensions/gsd/resource-version.ts +99 -0
  172. package/src/resources/extensions/gsd/session-forensics.ts +4 -3
  173. package/src/resources/extensions/gsd/tests/activity-log.test.ts +2 -2
  174. package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +3 -3
  175. package/src/resources/extensions/gsd/tests/auto-worktree.test.ts +0 -58
  176. package/src/resources/extensions/gsd/tests/doctor-runtime.test.ts +3 -4
  177. package/src/resources/extensions/gsd/tests/extension-selector-separator.test.ts +60 -38
  178. package/src/resources/extensions/gsd/tests/feature-branch-lifecycle-integration.test.ts +5 -18
  179. package/src/resources/extensions/gsd/tests/git-service.test.ts +10 -37
  180. package/src/resources/extensions/gsd/tests/knowledge.test.ts +4 -4
  181. package/src/resources/extensions/gsd/tests/mechanical-completion.test.ts +356 -0
  182. package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +1 -0
  183. package/src/resources/extensions/gsd/tests/token-profile.test.ts +14 -16
  184. package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +173 -0
  185. package/src/resources/extensions/gsd/triage-resolution.ts +2 -1
  186. package/src/resources/extensions/gsd/types.ts +2 -0
  187. package/src/resources/extensions/gsd/workflow-templates/bugfix.md +87 -0
  188. package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +74 -0
  189. package/src/resources/extensions/gsd/workflow-templates/full-project.md +41 -0
  190. package/src/resources/extensions/gsd/workflow-templates/hotfix.md +45 -0
  191. package/src/resources/extensions/gsd/workflow-templates/refactor.md +83 -0
  192. package/src/resources/extensions/gsd/workflow-templates/registry.json +85 -0
  193. package/src/resources/extensions/gsd/workflow-templates/security-audit.md +73 -0
  194. package/src/resources/extensions/gsd/workflow-templates/small-feature.md +81 -0
  195. package/src/resources/extensions/gsd/workflow-templates/spike.md +69 -0
  196. package/src/resources/extensions/gsd/workflow-templates.ts +241 -0
  197. package/src/resources/extensions/gsd/worktree-command.ts +1 -11
  198. package/src/resources/extensions/gsd/worktree-manager.ts +3 -2
  199. package/src/resources/extensions/gsd/worktree.ts +42 -5
  200. package/src/resources/extensions/mcp-client/index.ts +459 -0
  201. package/src/resources/skills/create-gsd-extension/SKILL.md +87 -0
  202. package/src/resources/skills/create-gsd-extension/references/compaction-session-control.md +77 -0
  203. package/src/resources/skills/create-gsd-extension/references/custom-commands.md +139 -0
  204. package/src/resources/skills/create-gsd-extension/references/custom-rendering.md +108 -0
  205. package/src/resources/skills/create-gsd-extension/references/custom-tools.md +183 -0
  206. package/src/resources/skills/create-gsd-extension/references/custom-ui.md +490 -0
  207. package/src/resources/skills/create-gsd-extension/references/events-reference.md +126 -0
  208. package/src/resources/skills/create-gsd-extension/references/extension-lifecycle.md +64 -0
  209. package/src/resources/skills/create-gsd-extension/references/extensionapi-reference.md +75 -0
  210. package/src/resources/skills/create-gsd-extension/references/extensioncontext-reference.md +53 -0
  211. package/src/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +36 -0
  212. package/src/resources/skills/create-gsd-extension/references/mode-behavior.md +32 -0
  213. package/src/resources/skills/create-gsd-extension/references/model-provider-management.md +89 -0
  214. package/src/resources/skills/create-gsd-extension/references/packaging-distribution.md +55 -0
  215. package/src/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +90 -0
  216. package/src/resources/skills/create-gsd-extension/references/state-management.md +70 -0
  217. package/src/resources/skills/create-gsd-extension/references/system-prompt-modification.md +52 -0
  218. package/src/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +51 -0
  219. package/src/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +143 -0
  220. package/src/resources/skills/create-gsd-extension/workflows/add-capability.md +57 -0
  221. package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +156 -0
  222. package/src/resources/skills/create-gsd-extension/workflows/debug-extension.md +74 -0
  223. package/src/resources/skills/create-skill/SKILL.md +184 -0
  224. package/src/resources/skills/create-skill/references/api-security.md +226 -0
  225. package/src/resources/skills/create-skill/references/be-clear-and-direct.md +531 -0
  226. package/src/resources/skills/create-skill/references/common-patterns.md +595 -0
  227. package/src/resources/skills/create-skill/references/core-principles.md +437 -0
  228. package/src/resources/skills/create-skill/references/executable-code.md +175 -0
  229. package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +68 -0
  230. package/src/resources/skills/create-skill/references/iteration-and-testing.md +474 -0
  231. package/src/resources/skills/create-skill/references/recommended-structure.md +168 -0
  232. package/src/resources/skills/create-skill/references/skill-structure.md +372 -0
  233. package/src/resources/skills/create-skill/references/use-xml-tags.md +466 -0
  234. package/src/resources/skills/create-skill/references/using-scripts.md +113 -0
  235. package/src/resources/skills/create-skill/references/using-templates.md +112 -0
  236. package/src/resources/skills/create-skill/references/workflows-and-validation.md +510 -0
  237. package/src/resources/skills/create-skill/templates/router-skill.md +73 -0
  238. package/src/resources/skills/create-skill/templates/simple-skill.md +33 -0
  239. package/src/resources/skills/create-skill/workflows/add-reference.md +96 -0
  240. package/src/resources/skills/create-skill/workflows/add-script.md +93 -0
  241. package/src/resources/skills/create-skill/workflows/add-template.md +74 -0
  242. package/src/resources/skills/create-skill/workflows/add-workflow.md +120 -0
  243. package/src/resources/skills/create-skill/workflows/audit-skill.md +148 -0
  244. package/src/resources/skills/create-skill/workflows/create-new-skill.md +196 -0
  245. package/src/resources/skills/create-skill/workflows/get-guidance.md +121 -0
  246. package/src/resources/skills/create-skill/workflows/upgrade-to-router.md +161 -0
  247. package/src/resources/skills/create-skill/workflows/verify-skill.md +204 -0
  248. package/src/resources/skills/react-best-practices/SKILL.md +1 -1
  249. package/dist/resources/extensions/gsd/auto-worktree-sync.ts +0 -199
  250. package/dist/resources/extensions/gsd/tests/worktree-db-integration.test.ts +0 -205
  251. package/dist/resources/extensions/gsd/tests/worktree-db.test.ts +0 -442
  252. package/dist/resources/extensions/mcporter/index.ts +0 -525
  253. package/src/resources/extensions/gsd/auto-worktree-sync.ts +0 -199
  254. package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +0 -205
  255. package/src/resources/extensions/gsd/tests/worktree-db.test.ts +0 -442
  256. package/src/resources/extensions/mcporter/index.ts +0 -525
@@ -0,0 +1,121 @@
1
+ # Workflow: Get Guidance on Skill Design
2
+
3
+ <required_reading>
4
+ **Read these reference files NOW:**
5
+ 1. references/core-principles.md
6
+ 2. references/recommended-structure.md
7
+ </required_reading>
8
+
9
+ <process>
10
+ ## Step 1: Understand the Problem Space
11
+
12
+ Ask the user:
13
+ - What task or domain are you trying to support?
14
+ - Is this something you do repeatedly?
15
+ - What makes it complex enough to need a skill?
16
+
17
+ ## Step 2: Determine If a Skill Is Right
18
+
19
+ **Create a skill when:**
20
+ - Task is repeated across multiple sessions
21
+ - Domain knowledge doesn't change frequently
22
+ - Complex enough to benefit from structure
23
+ - Would save significant time if automated
24
+
25
+ **Don't create a skill when:**
26
+ - One-off task (just do it directly)
27
+ - Changes constantly (will be outdated quickly)
28
+ - Too simple (overhead isn't worth it)
29
+ - Better as a slash command (user-triggered, no context needed)
30
+
31
+ Share this assessment with user.
32
+
33
+ ## Step 3: Map the Workflows
34
+
35
+ Ask: "What are the different things someone might want to do with this skill?"
36
+
37
+ Common patterns:
38
+ - Create / Read / Update / Delete
39
+ - Build / Debug / Ship
40
+ - Setup / Use / Troubleshoot
41
+ - Import / Process / Export
42
+
43
+ Each distinct workflow = potential workflow file.
44
+
45
+ ## Step 4: Identify Domain Knowledge
46
+
47
+ Ask: "What knowledge is needed regardless of which workflow?"
48
+
49
+ This becomes references:
50
+ - API patterns
51
+ - Best practices
52
+ - Common examples
53
+ - Configuration details
54
+
55
+ ## Step 5: Draft the Structure
56
+
57
+ Based on answers, recommend structure:
58
+
59
+ **If 1 workflow, simple knowledge:**
60
+ ```
61
+ skill-name/
62
+ └── SKILL.md (everything in one file)
63
+ ```
64
+
65
+ **If 2+ workflows, shared knowledge:**
66
+ ```
67
+ skill-name/
68
+ ├── SKILL.md (router)
69
+ ├── workflows/
70
+ │ ├── workflow-a.md
71
+ │ └── workflow-b.md
72
+ └── references/
73
+ └── shared-knowledge.md
74
+ ```
75
+
76
+ ## Step 6: Identify Essential Principles
77
+
78
+ Ask: "What rules should ALWAYS apply, no matter which workflow?"
79
+
80
+ These become `<essential_principles>` in SKILL.md.
81
+
82
+ Examples:
83
+ - "Always verify before reporting success"
84
+ - "Never store credentials in code"
85
+ - "Ask before making destructive changes"
86
+
87
+ ## Step 7: Present Recommendation
88
+
89
+ Summarize:
90
+ - Recommended structure (simple vs router pattern)
91
+ - List of workflows
92
+ - List of references
93
+ - Essential principles
94
+
95
+ Ask: "Does this structure make sense? Ready to build it?"
96
+
97
+ If yes → offer to switch to "Create a new skill" workflow
98
+ If no → clarify and iterate
99
+ </process>
100
+
101
+ <decision_framework>
102
+ ## Quick Decision Framework
103
+
104
+ | Situation | Recommendation |
105
+ |-----------|----------------|
106
+ | Single task, repeat often | Simple skill |
107
+ | Multiple related tasks | Router + workflows |
108
+ | Complex domain, many patterns | Router + workflows + references |
109
+ | User-triggered, fresh context | Slash command, not skill |
110
+ | One-off task | No skill needed |
111
+ </decision_framework>
112
+
113
+ <success_criteria>
114
+ Guidance is complete when:
115
+ - [ ] User understands if they need a skill
116
+ - [ ] Structure is recommended and explained
117
+ - [ ] Workflows are identified
118
+ - [ ] References are identified
119
+ - [ ] Essential principles are identified
120
+ - [ ] User is ready to build (or decided not to)
121
+ </success_criteria>
@@ -0,0 +1,161 @@
1
+ # Workflow: Upgrade Skill to Router Pattern
2
+
3
+ <required_reading>
4
+ **Read these reference files NOW:**
5
+ 1. references/recommended-structure.md
6
+ 2. references/skill-structure.md
7
+ </required_reading>
8
+
9
+ <process>
10
+ ## Step 1: Select the Skill
11
+
12
+ ```bash
13
+ ls ~/.claude/skills/
14
+ ```
15
+
16
+ Present numbered list, ask: "Which skill should be upgraded to the router pattern?"
17
+
18
+ ## Step 2: Verify It Needs Upgrading
19
+
20
+ Read the skill:
21
+ ```bash
22
+ cat ~/.claude/skills/{skill-name}/SKILL.md
23
+ ls ~/.claude/skills/{skill-name}/
24
+ ```
25
+
26
+ **Already a router?** (has workflows/ and intake question)
27
+ → Tell user it's already using router pattern, offer to add workflows instead
28
+
29
+ **Simple skill that should stay simple?** (under 200 lines, single workflow)
30
+ → Explain that router pattern may be overkill, ask if they want to proceed anyway
31
+
32
+ **Good candidate for upgrade:**
33
+ - Over 200 lines
34
+ - Multiple distinct use cases
35
+ - Essential principles that shouldn't be skipped
36
+ - Growing complexity
37
+
38
+ ## Step 3: Identify Components
39
+
40
+ Analyze the current skill and identify:
41
+
42
+ 1. **Essential principles** - Rules that apply to ALL use cases
43
+ 2. **Distinct workflows** - Different things a user might want to do
44
+ 3. **Reusable knowledge** - Patterns, examples, technical details
45
+
46
+ Present findings:
47
+ ```
48
+ ## Analysis
49
+
50
+ **Essential principles I found:**
51
+ - [Principle 1]
52
+ - [Principle 2]
53
+
54
+ **Distinct workflows I identified:**
55
+ - [Workflow A]: [description]
56
+ - [Workflow B]: [description]
57
+
58
+ **Knowledge that could be references:**
59
+ - [Reference topic 1]
60
+ - [Reference topic 2]
61
+ ```
62
+
63
+ Ask: "Does this breakdown look right? Any adjustments?"
64
+
65
+ ## Step 4: Create Directory Structure
66
+
67
+ ```bash
68
+ mkdir -p ~/.claude/skills/{skill-name}/workflows
69
+ mkdir -p ~/.claude/skills/{skill-name}/references
70
+ ```
71
+
72
+ ## Step 5: Extract Workflows
73
+
74
+ For each identified workflow:
75
+
76
+ 1. Create `workflows/{workflow-name}.md`
77
+ 2. Add required_reading section (references it needs)
78
+ 3. Add process section (steps from original skill)
79
+ 4. Add success_criteria section
80
+
81
+ ## Step 6: Extract References
82
+
83
+ For each identified reference topic:
84
+
85
+ 1. Create `references/{reference-name}.md`
86
+ 2. Move relevant content from original skill
87
+ 3. Structure with semantic XML tags
88
+
89
+ ## Step 7: Rewrite SKILL.md as Router
90
+
91
+ Replace SKILL.md with router structure:
92
+
93
+ ```markdown
94
+ ---
95
+ name: {skill-name}
96
+ description: {existing description}
97
+ ---
98
+
99
+ <essential_principles>
100
+ [Extracted principles - inline, cannot be skipped]
101
+ </essential_principles>
102
+
103
+ <intake>
104
+ **Ask the user:**
105
+
106
+ What would you like to do?
107
+ 1. [Workflow A option]
108
+ 2. [Workflow B option]
109
+ ...
110
+
111
+ **Wait for response before proceeding.**
112
+ </intake>
113
+
114
+ <routing>
115
+ | Response | Workflow |
116
+ |----------|----------|
117
+ | 1, "keywords" | `workflows/workflow-a.md` |
118
+ | 2, "keywords" | `workflows/workflow-b.md` |
119
+ </routing>
120
+
121
+ <reference_index>
122
+ [List all references by category]
123
+ </reference_index>
124
+
125
+ <workflows_index>
126
+ | Workflow | Purpose |
127
+ |----------|---------|
128
+ | workflow-a.md | [What it does] |
129
+ | workflow-b.md | [What it does] |
130
+ </workflows_index>
131
+ ```
132
+
133
+ ## Step 8: Verify Nothing Was Lost
134
+
135
+ Compare original skill content against new structure:
136
+ - [ ] All principles preserved (now inline)
137
+ - [ ] All procedures preserved (now in workflows)
138
+ - [ ] All knowledge preserved (now in references)
139
+ - [ ] No orphaned content
140
+
141
+ ## Step 9: Test
142
+
143
+ Invoke the upgraded skill:
144
+ - Does intake question appear?
145
+ - Does each routing option work?
146
+ - Do workflows load correct references?
147
+ - Does behavior match original skill?
148
+
149
+ Report any issues.
150
+ </process>
151
+
152
+ <success_criteria>
153
+ Upgrade is complete when:
154
+ - [ ] workflows/ directory created with workflow files
155
+ - [ ] references/ directory created (if needed)
156
+ - [ ] SKILL.md rewritten as router
157
+ - [ ] Essential principles inline in SKILL.md
158
+ - [ ] All original content preserved
159
+ - [ ] Intake question routes correctly
160
+ - [ ] Tested and working
161
+ </success_criteria>
@@ -0,0 +1,204 @@
1
+ # Workflow: Verify Skill Content Accuracy
2
+
3
+ <required_reading>
4
+ **Read these reference files NOW:**
5
+ 1. references/skill-structure.md
6
+ </required_reading>
7
+
8
+ <purpose>
9
+ Audit checks structure. **Verify checks truth.**
10
+
11
+ Skills contain claims about external things: APIs, CLI tools, frameworks, services. These change over time. This workflow checks if a skill's content is still accurate.
12
+ </purpose>
13
+
14
+ <process>
15
+ ## Step 1: Select the Skill
16
+
17
+ ```bash
18
+ ls ~/.claude/skills/
19
+ ```
20
+
21
+ Present numbered list, ask: "Which skill should I verify for accuracy?"
22
+
23
+ ## Step 2: Read and Categorize
24
+
25
+ Read the entire skill (SKILL.md + workflows/ + references/):
26
+ ```bash
27
+ cat ~/.claude/skills/{skill-name}/SKILL.md
28
+ cat ~/.claude/skills/{skill-name}/workflows/*.md 2>/dev/null
29
+ cat ~/.claude/skills/{skill-name}/references/*.md 2>/dev/null
30
+ ```
31
+
32
+ Categorize by primary dependency type:
33
+
34
+ | Type | Examples | Verification Method |
35
+ |------|----------|---------------------|
36
+ | **API/Service** | manage-stripe, manage-gohighlevel | Context7 + WebSearch |
37
+ | **CLI Tools** | build-macos-apps (xcodebuild, swift) | Run commands |
38
+ | **Framework** | build-iphone-apps (SwiftUI, UIKit) | Context7 for docs |
39
+ | **Integration** | setup-stripe-payments | WebFetch + Context7 |
40
+ | **Pure Process** | create-agent-skills | No external deps |
41
+
42
+ Report: "This skill is primarily [type]-based. I'll verify using [method]."
43
+
44
+ ## Step 3: Extract Verifiable Claims
45
+
46
+ Scan skill content and extract:
47
+
48
+ **CLI Tools mentioned:**
49
+ - Tool names (xcodebuild, swift, npm, etc.)
50
+ - Specific flags/options documented
51
+ - Expected output patterns
52
+
53
+ **API Endpoints:**
54
+ - Service names (Stripe, Meta, etc.)
55
+ - Specific endpoints documented
56
+ - Authentication methods
57
+ - SDK versions
58
+
59
+ **Framework Patterns:**
60
+ - Framework names (SwiftUI, React, etc.)
61
+ - Specific APIs/patterns documented
62
+ - Version-specific features
63
+
64
+ **File Paths/Structures:**
65
+ - Expected project structures
66
+ - Config file locations
67
+
68
+ Present: "Found X verifiable claims to check."
69
+
70
+ ## Step 4: Verify by Type
71
+
72
+ ### For CLI Tools
73
+ ```bash
74
+ # Check tool exists
75
+ which {tool-name}
76
+
77
+ # Check version
78
+ {tool-name} --version
79
+
80
+ # Verify documented flags work
81
+ {tool-name} --help | grep "{documented-flag}"
82
+ ```
83
+
84
+ ### For API/Service Skills
85
+ Use Context7 to fetch current documentation:
86
+ ```
87
+ mcp__context7__resolve-library-id: {service-name}
88
+ mcp__context7__get-library-docs: {library-id}, topic: {relevant-topic}
89
+ ```
90
+
91
+ Compare skill's documented patterns against current docs:
92
+ - Are endpoints still valid?
93
+ - Has authentication changed?
94
+ - Are there deprecated methods being used?
95
+
96
+ ### For Framework Skills
97
+ Use Context7:
98
+ ```
99
+ mcp__context7__resolve-library-id: {framework-name}
100
+ mcp__context7__get-library-docs: {library-id}, topic: {specific-api}
101
+ ```
102
+
103
+ Check:
104
+ - Are documented APIs still current?
105
+ - Have patterns changed?
106
+ - Are there newer recommended approaches?
107
+
108
+ ### For Integration Skills
109
+ WebSearch for recent changes:
110
+ ```
111
+ "[service name] API changes 2025"
112
+ "[service name] breaking changes"
113
+ "[service name] deprecated endpoints"
114
+ ```
115
+
116
+ Then Context7 for current SDK patterns.
117
+
118
+ ### For Services with Status Pages
119
+ WebFetch official docs/changelog if available.
120
+
121
+ ## Step 5: Generate Freshness Report
122
+
123
+ Present findings:
124
+
125
+ ```
126
+ ## Verification Report: {skill-name}
127
+
128
+ ### ✅ Verified Current
129
+ - [Claim]: [Evidence it's still accurate]
130
+
131
+ ### ⚠️ May Be Outdated
132
+ - [Claim]: [What changed / newer info found]
133
+ → Current: [what docs now say]
134
+
135
+ ### ❌ Broken / Invalid
136
+ - [Claim]: [Why it's wrong]
137
+ → Fix: [What it should be]
138
+
139
+ ### ℹ️ Could Not Verify
140
+ - [Claim]: [Why verification wasn't possible]
141
+
142
+ ---
143
+ **Overall Status:** [Fresh / Needs Updates / Significantly Stale]
144
+ **Last Verified:** [Today's date]
145
+ ```
146
+
147
+ ## Step 6: Offer Updates
148
+
149
+ If issues found:
150
+
151
+ "Found [N] items that need updating. Would you like me to:"
152
+
153
+ 1. **Update all** - Apply all corrections
154
+ 2. **Review each** - Show each change before applying
155
+ 3. **Just the report** - No changes
156
+
157
+ If updating:
158
+ - Make changes based on verified current information
159
+ - Add verification date comment if appropriate
160
+ - Report what was updated
161
+
162
+ ## Step 7: Suggest Verification Schedule
163
+
164
+ Based on skill type, recommend:
165
+
166
+ | Skill Type | Recommended Frequency |
167
+ |------------|----------------------|
168
+ | API/Service | Every 1-2 months |
169
+ | Framework | Every 3-6 months |
170
+ | CLI Tools | Every 6 months |
171
+ | Pure Process | Annually |
172
+
173
+ "This skill should be re-verified in approximately [timeframe]."
174
+ </process>
175
+
176
+ <verification_shortcuts>
177
+ ## Quick Verification Commands
178
+
179
+ **Check if CLI tool exists and get version:**
180
+ ```bash
181
+ which {tool} && {tool} --version
182
+ ```
183
+
184
+ **Context7 pattern for any library:**
185
+ ```
186
+ 1. resolve-library-id: "{library-name}"
187
+ 2. get-library-docs: "{id}", topic: "{specific-feature}"
188
+ ```
189
+
190
+ **WebSearch patterns:**
191
+ - Breaking changes: "{service} breaking changes 2025"
192
+ - Deprecations: "{service} deprecated API"
193
+ - Current best practices: "{framework} best practices 2025"
194
+ </verification_shortcuts>
195
+
196
+ <success_criteria>
197
+ Verification is complete when:
198
+ - [ ] Skill categorized by dependency type
199
+ - [ ] Verifiable claims extracted
200
+ - [ ] Each claim checked with appropriate method
201
+ - [ ] Freshness report generated
202
+ - [ ] Updates applied (if requested)
203
+ - [ ] User knows when to re-verify
204
+ </success_criteria>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: vercel-react-best-practices
2
+ name: react-best-practices
3
3
  description: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
4
4
  license: MIT
5
5
  metadata:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-pi",
3
- "version": "2.29.0-dev.49d972f",
3
+ "version": "2.29.0-dev.4c155ee",
4
4
  "description": "GSD — Get Shit Done coding agent",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -55,3 +55,5 @@ export declare const native: {
55
55
  parseStreamingJson: (text: string) => unknown;
56
56
  xxHash32: (input: string, seed: number) => number;
57
57
  };
58
+ /** True when the native addon loaded successfully. False on unsupported platforms. */
59
+ export declare const nativeAvailable = false;
@@ -22,12 +22,14 @@ const platformPackageMap = {
22
22
  "linux-arm64": "linux-arm64-gnu",
23
23
  "win32-x64": "win32-x64-msvc",
24
24
  };
25
+ let _loadedSuccessfully = false;
25
26
  function loadNative() {
26
27
  const errors = [];
27
28
  // 1. Try the platform-specific npm optional dependency
28
29
  const packageSuffix = platformPackageMap[platformTag];
29
30
  if (packageSuffix) {
30
31
  try {
32
+ _loadedSuccessfully = true;
31
33
  return require(`@gsd-build/engine-${packageSuffix}`);
32
34
  }
33
35
  catch (err) {
@@ -38,6 +40,7 @@ function loadNative() {
38
40
  // 2. Try local release build (native/addon/gsd_engine.{platform}.node)
39
41
  const releasePath = path.join(addonDir, `gsd_engine.${platformTag}.node`);
40
42
  try {
43
+ _loadedSuccessfully = true;
41
44
  return require(releasePath);
42
45
  }
43
46
  catch (err) {
@@ -47,6 +50,7 @@ function loadNative() {
47
50
  // 3. Try local dev build (native/addon/gsd_engine.dev.node)
48
51
  const devPath = path.join(addonDir, "gsd_engine.dev.node");
49
52
  try {
53
+ _loadedSuccessfully = true;
50
54
  return require(devPath);
51
55
  }
52
56
  catch (err) {
@@ -55,10 +59,20 @@ function loadNative() {
55
59
  }
56
60
  const details = errors.map((e) => ` - ${e}`).join("\n");
57
61
  const supportedPlatforms = Object.keys(platformPackageMap);
58
- throw new Error(`Failed to load gsd_engine native addon for ${platformTag}.\n\n` +
59
- `Tried:\n${details}\n\n` +
60
- `Supported platforms: ${supportedPlatforms.join(", ")}\n` +
61
- `If your platform is listed, try reinstalling: npm i -g gsd-pi\n` +
62
- `Otherwise, please open an issue: https://github.com/gsd-build/gsd-2/issues`);
62
+ // Graceful fallback: on unsupported platforms (e.g., win32-arm64), return a
63
+ // proxy that throws on individual function calls rather than crashing the
64
+ // entire import chain at startup (#1223). Consumers with JS fallbacks
65
+ // (parseRoadmap, parsePlan, fuzzyFind, etc.) catch these and degrade gracefully.
66
+ process.stderr.write(`[gsd] Native addon not available for ${platformTag}. Falling back to JS implementations (slower).\n` +
67
+ ` Supported native platforms: ${supportedPlatforms.join(", ")}\n`);
68
+ return new Proxy({}, {
69
+ get(_target, prop) {
70
+ return (..._args) => {
71
+ throw new Error(`Native function '${String(prop)}' is not available on ${platformTag}`);
72
+ };
73
+ },
74
+ });
63
75
  }
64
76
  export const native = loadNative();
77
+ /** True when the native addon loaded successfully. False on unsupported platforms. */
78
+ export const nativeAvailable = _loadedSuccessfully;
@@ -27,6 +27,8 @@ const platformPackageMap: Record<string, string> = {
27
27
  "win32-x64": "win32-x64-msvc",
28
28
  };
29
29
 
30
+ let _loadedSuccessfully = false;
31
+
30
32
  function loadNative(): Record<string, unknown> {
31
33
  const errors: string[] = [];
32
34
 
@@ -34,7 +36,7 @@ function loadNative(): Record<string, unknown> {
34
36
  const packageSuffix = platformPackageMap[platformTag];
35
37
  if (packageSuffix) {
36
38
  try {
37
- return require(`@gsd-build/engine-${packageSuffix}`) as Record<string, unknown>;
39
+ _loadedSuccessfully = true; return require(`@gsd-build/engine-${packageSuffix}`) as Record<string, unknown>;
38
40
  } catch (err) {
39
41
  const message = err instanceof Error ? err.message : String(err);
40
42
  errors.push(`@gsd-build/engine-${packageSuffix}: ${message}`);
@@ -44,7 +46,7 @@ function loadNative(): Record<string, unknown> {
44
46
  // 2. Try local release build (native/addon/gsd_engine.{platform}.node)
45
47
  const releasePath = path.join(addonDir, `gsd_engine.${platformTag}.node`);
46
48
  try {
47
- return require(releasePath) as Record<string, unknown>;
49
+ _loadedSuccessfully = true; return require(releasePath) as Record<string, unknown>;
48
50
  } catch (err) {
49
51
  const message = err instanceof Error ? err.message : String(err);
50
52
  errors.push(`${releasePath}: ${message}`);
@@ -53,7 +55,7 @@ function loadNative(): Record<string, unknown> {
53
55
  // 3. Try local dev build (native/addon/gsd_engine.dev.node)
54
56
  const devPath = path.join(addonDir, "gsd_engine.dev.node");
55
57
  try {
56
- return require(devPath) as Record<string, unknown>;
58
+ _loadedSuccessfully = true; return require(devPath) as Record<string, unknown>;
57
59
  } catch (err) {
58
60
  const message = err instanceof Error ? err.message : String(err);
59
61
  errors.push(`${devPath}: ${message}`);
@@ -61,13 +63,22 @@ function loadNative(): Record<string, unknown> {
61
63
 
62
64
  const details = errors.map((e) => ` - ${e}`).join("\n");
63
65
  const supportedPlatforms = Object.keys(platformPackageMap);
64
- throw new Error(
65
- `Failed to load gsd_engine native addon for ${platformTag}.\n\n` +
66
- `Tried:\n${details}\n\n` +
67
- `Supported platforms: ${supportedPlatforms.join(", ")}\n` +
68
- `If your platform is listed, try reinstalling: npm i -g gsd-pi\n` +
69
- `Otherwise, please open an issue: https://github.com/gsd-build/gsd-2/issues`,
66
+
67
+ // Graceful fallback: on unsupported platforms (e.g., win32-arm64), return a
68
+ // proxy that throws on individual function calls rather than crashing the
69
+ // entire import chain at startup (#1223). Consumers with JS fallbacks
70
+ // (parseRoadmap, parsePlan, fuzzyFind, etc.) catch these and degrade gracefully.
71
+ process.stderr.write(
72
+ `[gsd] Native addon not available for ${platformTag}. Falling back to JS implementations (slower).\n` +
73
+ ` Supported native platforms: ${supportedPlatforms.join(", ")}\n`,
70
74
  );
75
+ return new Proxy({} as Record<string, unknown>, {
76
+ get(_target, prop) {
77
+ return (..._args: unknown[]) => {
78
+ throw new Error(`Native function '${String(prop)}' is not available on ${platformTag}`);
79
+ };
80
+ },
81
+ });
71
82
  }
72
83
 
73
84
  export const native = loadNative() as {
@@ -140,3 +151,6 @@ export const native = loadNative() as {
140
151
  parseStreamingJson: (text: string) => unknown;
141
152
  xxHash32: (input: string, seed: number) => number;
142
153
  };
154
+
155
+ /** True when the native addon loaded successfully. False on unsupported platforms. */
156
+ export const nativeAvailable = _loadedSuccessfully;
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,KAAK,EACX,SAAS,EAET,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAKpB,MAAM,YAAY,CAAC;AA6FpB;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAkCzD;AA6LD;;GAEG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAa,GACxB,OAAO,CAAC,SAAS,CAAC,CAKpB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyBrH;AA+GD;;GAEG;AACH,wBAAsB,yBAAyB,CAC9C,eAAe,EAAE,MAAM,EAAE,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAsB,EAChC,QAAQ,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,oBAAoB,CAAC,CAoD/B"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,KAAK,EACX,SAAS,EAET,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAKpB,MAAM,YAAY,CAAC;AAuGpB;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAkCzD;AA6LD;;GAEG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAa,GACxB,OAAO,CAAC,SAAS,CAAC,CAKpB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyBrH;AA+GD;;GAEG;AACH,wBAAsB,yBAAyB,CAC9C,eAAe,EAAE,MAAM,EAAE,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAsB,EAChC,QAAQ,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,oBAAoB,CAAC,CAoD/B"}
@@ -18,6 +18,9 @@ import * as _bundledPiTui from "@gsd/pi-tui";
18
18
  // The virtualModules option then makes them available to extensions.
19
19
  import * as _bundledTypebox from "@sinclair/typebox";
20
20
  import * as _bundledYaml from "yaml";
21
+ import * as _bundledMcpClient from "@modelcontextprotocol/sdk/client";
22
+ import * as _bundledMcpStdio from "@modelcontextprotocol/sdk/client/stdio.js";
23
+ import * as _bundledMcpStreamableHttp from "@modelcontextprotocol/sdk/client/streamableHttp.js";
21
24
  import { getAgentDir, isBunBinary } from "../../config.js";
22
25
  // NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,
23
26
  // avoiding a circular dependency. Extensions can import from @gsd/pi-coding-agent.
@@ -35,6 +38,11 @@ const VIRTUAL_MODULES = {
35
38
  "@gsd/pi-ai/oauth": _bundledPiAiOauth,
36
39
  "@gsd/pi-coding-agent": _bundledPiCodingAgent,
37
40
  "yaml": _bundledYaml,
41
+ "@modelcontextprotocol/sdk/client": _bundledMcpClient,
42
+ "@modelcontextprotocol/sdk/client/stdio": _bundledMcpStdio,
43
+ "@modelcontextprotocol/sdk/client/stdio.js": _bundledMcpStdio,
44
+ "@modelcontextprotocol/sdk/client/streamableHttp": _bundledMcpStreamableHttp,
45
+ "@modelcontextprotocol/sdk/client/streamableHttp.js": _bundledMcpStreamableHttp,
38
46
  // Aliases for external PI ecosystem packages that import from the original scope
39
47
  "@mariozechner/pi-agent-core": _bundledPiAgentCore,
40
48
  "@mariozechner/pi-tui": _bundledPiTui,
@@ -73,6 +81,11 @@ function getAliases() {
73
81
  "@gsd/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@gsd/pi-ai/oauth"),
74
82
  "@sinclair/typebox": typeboxRoot,
75
83
  "yaml": yamlRoot,
84
+ "@modelcontextprotocol/sdk/client": require.resolve("@modelcontextprotocol/sdk/client"),
85
+ "@modelcontextprotocol/sdk/client/stdio": require.resolve("@modelcontextprotocol/sdk/client/stdio.js"),
86
+ "@modelcontextprotocol/sdk/client/stdio.js": require.resolve("@modelcontextprotocol/sdk/client/stdio.js"),
87
+ "@modelcontextprotocol/sdk/client/streamableHttp": require.resolve("@modelcontextprotocol/sdk/client/streamableHttp.js"),
88
+ "@modelcontextprotocol/sdk/client/streamableHttp.js": require.resolve("@modelcontextprotocol/sdk/client/streamableHttp.js"),
76
89
  // Aliases for external PI ecosystem packages that import from the original scope
77
90
  "@mariozechner/pi-coding-agent": packageIndex,
78
91
  "@mariozechner/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@gsd/pi-agent-core"),