gsd-pi 2.67.0-dev.a5b1d8f → 2.67.0-dev.fe39184

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 (191) hide show
  1. package/README.md +41 -31
  2. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +121 -8
  3. package/dist/resources/extensions/gsd/auto/phases.js +17 -0
  4. package/dist/resources/extensions/gsd/auto/session.js +6 -0
  5. package/dist/resources/extensions/gsd/auto-direct-dispatch.js +12 -0
  6. package/dist/resources/extensions/gsd/auto-start.js +12 -0
  7. package/dist/resources/extensions/gsd/auto.js +27 -0
  8. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +11 -435
  9. package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +1 -4
  10. package/dist/resources/extensions/gsd/bootstrap/query-tools.js +7 -64
  11. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +88 -8
  12. package/dist/resources/extensions/gsd/commands/catalog.js +2 -1
  13. package/dist/resources/extensions/gsd/commands/handlers/core.js +39 -25
  14. package/dist/resources/extensions/gsd/commands/index.js +8 -1
  15. package/dist/resources/extensions/gsd/commands-mcp-status.js +43 -7
  16. package/dist/resources/extensions/gsd/guided-flow.js +16 -0
  17. package/dist/resources/extensions/gsd/init-wizard.js +37 -0
  18. package/dist/resources/extensions/gsd/mcp-project-config.js +83 -0
  19. package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +508 -0
  20. package/dist/resources/extensions/gsd/workflow-logger.js +18 -3
  21. package/dist/resources/extensions/gsd/workflow-mcp.js +261 -0
  22. package/dist/web/standalone/.next/BUILD_ID +1 -1
  23. package/dist/web/standalone/.next/app-path-routes-manifest.json +15 -15
  24. package/dist/web/standalone/.next/build-manifest.json +3 -3
  25. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  26. package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
  27. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  28. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  29. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  30. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  31. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  32. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  33. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  34. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  35. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  36. package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
  37. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  38. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  39. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  40. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  41. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  42. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  43. package/dist/web/standalone/.next/server/app/index.html +1 -1
  44. package/dist/web/standalone/.next/server/app/index.rsc +1 -1
  45. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  46. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  47. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  48. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  49. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  50. package/dist/web/standalone/.next/server/app-paths-manifest.json +15 -15
  51. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  52. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  53. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  54. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  55. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  56. package/dist/web/standalone/.next/static/chunks/6502.5dcdcf1e1432e20d.js +9 -0
  57. package/dist/web/standalone/.next/static/chunks/{webpack-b49b09f97429b5d0.js → webpack-42a66876b763aa26.js} +1 -1
  58. package/package.json +4 -2
  59. package/packages/mcp-server/README.md +38 -0
  60. package/packages/mcp-server/dist/cli.d.ts +9 -0
  61. package/packages/mcp-server/dist/cli.d.ts.map +1 -0
  62. package/packages/mcp-server/dist/cli.js +58 -0
  63. package/packages/mcp-server/dist/cli.js.map +1 -0
  64. package/packages/mcp-server/dist/index.d.ts +20 -0
  65. package/packages/mcp-server/dist/index.d.ts.map +1 -0
  66. package/packages/mcp-server/dist/index.js +14 -0
  67. package/packages/mcp-server/dist/index.js.map +1 -0
  68. package/packages/mcp-server/dist/readers/captures.d.ts +25 -0
  69. package/packages/mcp-server/dist/readers/captures.d.ts.map +1 -0
  70. package/packages/mcp-server/dist/readers/captures.js +67 -0
  71. package/packages/mcp-server/dist/readers/captures.js.map +1 -0
  72. package/packages/mcp-server/dist/readers/doctor-lite.d.ts +20 -0
  73. package/packages/mcp-server/dist/readers/doctor-lite.d.ts.map +1 -0
  74. package/packages/mcp-server/dist/readers/doctor-lite.js +173 -0
  75. package/packages/mcp-server/dist/readers/doctor-lite.js.map +1 -0
  76. package/packages/mcp-server/dist/readers/index.d.ts +14 -0
  77. package/packages/mcp-server/dist/readers/index.d.ts.map +1 -0
  78. package/packages/mcp-server/dist/readers/index.js +10 -0
  79. package/packages/mcp-server/dist/readers/index.js.map +1 -0
  80. package/packages/mcp-server/dist/readers/knowledge.d.ts +18 -0
  81. package/packages/mcp-server/dist/readers/knowledge.d.ts.map +1 -0
  82. package/packages/mcp-server/dist/readers/knowledge.js +82 -0
  83. package/packages/mcp-server/dist/readers/knowledge.js.map +1 -0
  84. package/packages/mcp-server/dist/readers/metrics.d.ts +32 -0
  85. package/packages/mcp-server/dist/readers/metrics.d.ts.map +1 -0
  86. package/packages/mcp-server/dist/readers/metrics.js +74 -0
  87. package/packages/mcp-server/dist/readers/metrics.js.map +1 -0
  88. package/packages/mcp-server/dist/readers/paths.d.ts +42 -0
  89. package/packages/mcp-server/dist/readers/paths.d.ts.map +1 -0
  90. package/packages/mcp-server/dist/readers/paths.js +199 -0
  91. package/packages/mcp-server/dist/readers/paths.js.map +1 -0
  92. package/packages/mcp-server/dist/readers/roadmap.d.ts +26 -0
  93. package/packages/mcp-server/dist/readers/roadmap.d.ts.map +1 -0
  94. package/packages/mcp-server/dist/readers/roadmap.js +194 -0
  95. package/packages/mcp-server/dist/readers/roadmap.js.map +1 -0
  96. package/packages/mcp-server/dist/readers/state.d.ts +43 -0
  97. package/packages/mcp-server/dist/readers/state.d.ts.map +1 -0
  98. package/packages/mcp-server/dist/readers/state.js +184 -0
  99. package/packages/mcp-server/dist/readers/state.js.map +1 -0
  100. package/packages/mcp-server/dist/server.d.ts +28 -0
  101. package/packages/mcp-server/dist/server.d.ts.map +1 -0
  102. package/packages/mcp-server/dist/server.js +319 -0
  103. package/packages/mcp-server/dist/server.js.map +1 -0
  104. package/packages/mcp-server/dist/session-manager.d.ts +54 -0
  105. package/packages/mcp-server/dist/session-manager.d.ts.map +1 -0
  106. package/packages/mcp-server/dist/session-manager.js +284 -0
  107. package/packages/mcp-server/dist/session-manager.js.map +1 -0
  108. package/packages/mcp-server/dist/types.d.ts +61 -0
  109. package/packages/mcp-server/dist/types.d.ts.map +1 -0
  110. package/packages/mcp-server/dist/types.js +11 -0
  111. package/packages/mcp-server/dist/types.js.map +1 -0
  112. package/packages/mcp-server/dist/workflow-tools.d.ts +9 -0
  113. package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -0
  114. package/packages/mcp-server/dist/workflow-tools.js +532 -0
  115. package/packages/mcp-server/dist/workflow-tools.js.map +1 -0
  116. package/packages/mcp-server/src/server.ts +6 -2
  117. package/packages/mcp-server/src/workflow-tools.test.ts +976 -0
  118. package/packages/mcp-server/src/workflow-tools.ts +997 -0
  119. package/packages/mcp-server/tsconfig.json +1 -1
  120. package/packages/pi-agent-core/dist/agent-loop.js +14 -6
  121. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  122. package/packages/pi-agent-core/src/agent-loop.test.ts +53 -0
  123. package/packages/pi-agent-core/src/agent-loop.ts +20 -6
  124. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.d.ts +2 -0
  125. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.d.ts.map +1 -0
  126. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +28 -0
  127. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -0
  128. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +1 -0
  129. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  130. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +17 -12
  131. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  132. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  133. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +19 -0
  134. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  135. package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +54 -0
  136. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +18 -12
  137. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +21 -0
  138. package/packages/rpc-client/dist/index.d.ts +10 -0
  139. package/packages/rpc-client/dist/index.d.ts.map +1 -0
  140. package/packages/rpc-client/dist/index.js +9 -0
  141. package/packages/rpc-client/dist/index.js.map +1 -0
  142. package/packages/rpc-client/dist/jsonl.d.ts +17 -0
  143. package/packages/rpc-client/dist/jsonl.d.ts.map +1 -0
  144. package/packages/rpc-client/dist/jsonl.js +54 -0
  145. package/packages/rpc-client/dist/jsonl.js.map +1 -0
  146. package/packages/rpc-client/dist/rpc-client.d.ts +259 -0
  147. package/packages/rpc-client/dist/rpc-client.d.ts.map +1 -0
  148. package/packages/rpc-client/dist/rpc-client.js +541 -0
  149. package/packages/rpc-client/dist/rpc-client.js.map +1 -0
  150. package/packages/rpc-client/dist/rpc-client.test.d.ts +2 -0
  151. package/packages/rpc-client/dist/rpc-client.test.d.ts.map +1 -0
  152. package/packages/rpc-client/dist/rpc-client.test.js +477 -0
  153. package/packages/rpc-client/dist/rpc-client.test.js.map +1 -0
  154. package/packages/rpc-client/dist/rpc-types.d.ts +566 -0
  155. package/packages/rpc-client/dist/rpc-types.d.ts.map +1 -0
  156. package/packages/rpc-client/dist/rpc-types.js +12 -0
  157. package/packages/rpc-client/dist/rpc-types.js.map +1 -0
  158. package/scripts/ensure-workspace-builds.cjs +2 -0
  159. package/scripts/link-workspace-packages.cjs +21 -14
  160. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +157 -8
  161. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +182 -0
  162. package/src/resources/extensions/gsd/auto/phases.ts +25 -0
  163. package/src/resources/extensions/gsd/auto/session.ts +6 -0
  164. package/src/resources/extensions/gsd/auto-direct-dispatch.ts +20 -0
  165. package/src/resources/extensions/gsd/auto-start.ts +15 -1
  166. package/src/resources/extensions/gsd/auto.ts +29 -1
  167. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +22 -435
  168. package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +1 -5
  169. package/src/resources/extensions/gsd/bootstrap/query-tools.ts +7 -72
  170. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +122 -6
  171. package/src/resources/extensions/gsd/commands/catalog.ts +2 -1
  172. package/src/resources/extensions/gsd/commands/handlers/core.ts +53 -26
  173. package/src/resources/extensions/gsd/commands/index.ts +7 -1
  174. package/src/resources/extensions/gsd/commands-mcp-status.ts +53 -7
  175. package/src/resources/extensions/gsd/guided-flow.ts +24 -0
  176. package/src/resources/extensions/gsd/init-wizard.ts +40 -0
  177. package/src/resources/extensions/gsd/mcp-project-config.ts +128 -0
  178. package/src/resources/extensions/gsd/tests/auto-project-root-env.test.ts +29 -0
  179. package/src/resources/extensions/gsd/tests/core-overlay-fallback.test.ts +101 -0
  180. package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +66 -0
  181. package/src/resources/extensions/gsd/tests/mcp-project-config.test.ts +85 -0
  182. package/src/resources/extensions/gsd/tests/mcp-status.test.ts +15 -0
  183. package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +16 -0
  184. package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +500 -0
  185. package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +625 -0
  186. package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +629 -0
  187. package/src/resources/extensions/gsd/workflow-logger.ts +19 -3
  188. package/src/resources/extensions/gsd/workflow-mcp.ts +320 -0
  189. package/dist/web/standalone/.next/static/chunks/6502.b804e48b7919f55e.js +0 -9
  190. /package/dist/web/standalone/.next/static/{NllX5BEOLdTXS9ypf1i3i → gbSATDX4Jt2ufxzUr5nYm}/_buildManifest.js +0 -0
  191. /package/dist/web/standalone/.next/static/{NllX5BEOLdTXS9ypf1i3i → gbSATDX4Jt2ufxzUr5nYm}/_ssgManifest.js +0 -0
@@ -97,6 +97,10 @@ export class ToolExecutionComponent extends Container {
97
97
  // When true, this component intentionally renders no lines
98
98
  private hideComponent = false;
99
99
 
100
+ private get normalizedToolName(): string {
101
+ return typeof this.toolName === "string" ? this.toolName.toLowerCase() : "";
102
+ }
103
+
100
104
  constructor(
101
105
  toolName: string,
102
106
  args: any,
@@ -121,7 +125,7 @@ export class ToolExecutionComponent extends Container {
121
125
 
122
126
  // Use contentBox for bash (visual truncation) or custom tools with custom renderers
123
127
  // Use contentText for built-in tools (including overrides without custom renderers)
124
- if (toolName === "bash" || (toolDefinition && !this.shouldUseBuiltInRenderer())) {
128
+ if (this.normalizedToolName === "bash" || (toolDefinition && !this.shouldUseBuiltInRenderer())) {
125
129
  this.addChild(this.contentBox);
126
130
  } else {
127
131
  this.addChild(this.contentText);
@@ -136,7 +140,8 @@ export class ToolExecutionComponent extends Container {
136
140
  * or the toolDefinition doesn't provide custom renderers.
137
141
  */
138
142
  private shouldUseBuiltInRenderer(): boolean {
139
- const isBuiltInName = this.toolName in allTools;
143
+ const normalizedToolName = this.normalizedToolName;
144
+ const isBuiltInName = normalizedToolName in allTools;
140
145
  const hasCustomRenderers = this.toolDefinition?.renderCall || this.toolDefinition?.renderResult;
141
146
  return isBuiltInName && !hasCustomRenderers;
142
147
  }
@@ -152,7 +157,7 @@ export class ToolExecutionComponent extends Container {
152
157
 
153
158
  updateArgs(args: any): void {
154
159
  this.args = args;
155
- if (this.toolName === "write" && this.isPartial) {
160
+ if (this.normalizedToolName === "write" && this.isPartial) {
156
161
  this.updateWriteHighlightCacheIncremental();
157
162
  }
158
163
  this.updateDisplay();
@@ -308,7 +313,7 @@ export class ToolExecutionComponent extends Container {
308
313
  ): void {
309
314
  this.result = result;
310
315
  this.isPartial = isPartial;
311
- if (this.toolName === "write" && !isPartial) {
316
+ if (this.normalizedToolName === "write" && !isPartial) {
312
317
  const rawPath = str(this.args?.file_path ?? this.args?.path);
313
318
  const fileContent = str(this.args?.content);
314
319
  if (rawPath !== null && fileContent !== null) {
@@ -387,7 +392,7 @@ export class ToolExecutionComponent extends Container {
387
392
 
388
393
  // Use built-in rendering for built-in tools (or overrides without custom renderers)
389
394
  if (useBuiltInRenderer) {
390
- if (this.toolName === "bash") {
395
+ if (this.normalizedToolName === "bash") {
391
396
  // Bash uses Box with visual line truncation
392
397
  this.contentBox.setBgFn(bgFn);
393
398
  this.contentBox.clear();
@@ -629,8 +634,9 @@ export class ToolExecutionComponent extends Container {
629
634
  private formatToolExecution(): string {
630
635
  let text = "";
631
636
  const invalidArg = theme.fg("error", "[invalid arg]");
637
+ const normalizedToolName = this.normalizedToolName;
632
638
 
633
- if (this.toolName === "read") {
639
+ if (normalizedToolName === "read") {
634
640
  const rawPath = str(this.args?.file_path ?? this.args?.path);
635
641
  const path = rawPath !== null ? shortenPath(rawPath) : null;
636
642
  const offset = this.args?.offset;
@@ -692,7 +698,7 @@ export class ToolExecutionComponent extends Container {
692
698
  }
693
699
  }
694
700
  }
695
- } else if (this.toolName === "write") {
701
+ } else if (normalizedToolName === "write") {
696
702
  const rawPath = str(this.args?.file_path ?? this.args?.path);
697
703
  const fileContent = str(this.args?.content);
698
704
  const path = rawPath !== null ? shortenPath(rawPath) : null;
@@ -751,7 +757,7 @@ export class ToolExecutionComponent extends Container {
751
757
  text += `\n\n${theme.fg("error", errorText)}`;
752
758
  }
753
759
  }
754
- } else if (this.toolName === "edit") {
760
+ } else if (normalizedToolName === "edit") {
755
761
  const rawPath = str(this.args?.file_path ?? this.args?.path);
756
762
  const path = rawPath !== null ? shortenPath(rawPath) : null;
757
763
 
@@ -787,7 +793,7 @@ export class ToolExecutionComponent extends Container {
787
793
  text += `\n\n${renderDiff(this.editDiffPreview.diff, { filePath: rawPath ?? undefined })}`;
788
794
  }
789
795
  }
790
- } else if (this.toolName === "ls") {
796
+ } else if (normalizedToolName === "ls") {
791
797
  const rawPath = str(this.args?.path);
792
798
  const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
793
799
  const limit = this.args?.limit;
@@ -824,7 +830,7 @@ export class ToolExecutionComponent extends Container {
824
830
  text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
825
831
  }
826
832
  }
827
- } else if (this.toolName === "find") {
833
+ } else if (normalizedToolName === "find") {
828
834
  const pattern = str(this.args?.pattern);
829
835
  const rawPath = str(this.args?.path);
830
836
  const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
@@ -866,7 +872,7 @@ export class ToolExecutionComponent extends Container {
866
872
  text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
867
873
  }
868
874
  }
869
- } else if (this.toolName === "grep") {
875
+ } else if (normalizedToolName === "grep") {
870
876
  const pattern = str(this.args?.pattern);
871
877
  const rawPath = str(this.args?.path);
872
878
  const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
@@ -916,7 +922,7 @@ export class ToolExecutionComponent extends Container {
916
922
  text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
917
923
  }
918
924
  }
919
- } else if (this.toolName === "web_search") {
925
+ } else if (normalizedToolName === "web_search") {
920
926
  // Server-side Anthropic web search
921
927
  text = theme.fg("toolTitle", theme.bold("web search"));
922
928
 
@@ -121,6 +121,27 @@ export async function handleAgentEvent(host: InteractiveModeStateHost & {
121
121
  if (host.streamingComponent && event.message.role === "assistant") {
122
122
  host.streamingMessage = event.message;
123
123
  host.streamingComponent.updateContent(host.streamingMessage);
124
+
125
+ // When the stream adapter signals a completed tool call with an
126
+ // external result (from Claude Code SDK), update the pending
127
+ // ToolExecutionComponent immediately so output is visible in
128
+ // real-time instead of waiting for the session to end.
129
+ const innerEvent = event.assistantMessageEvent;
130
+ if (innerEvent.type === "toolcall_end" && innerEvent.toolCall) {
131
+ const tc = innerEvent.toolCall as any;
132
+ const externalResult = tc.externalResult;
133
+ if (externalResult) {
134
+ const component = host.pendingTools.get(tc.id);
135
+ if (component) {
136
+ component.updateResult({
137
+ content: externalResult.content ?? [{ type: "text", text: "" }],
138
+ details: externalResult.details ?? {},
139
+ isError: externalResult.isError ?? false,
140
+ });
141
+ }
142
+ }
143
+ }
144
+
124
145
  const contentBlocks = host.streamingMessage.content;
125
146
  for (let i = lastProcessedContentIndex; i < contentBlocks.length; i++) {
126
147
  const content = contentBlocks[i];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @gsd-build/rpc-client — standalone RPC client SDK for GSD.
3
+ *
4
+ * Re-exports all types, JSONL utilities, and the RpcClient class.
5
+ */
6
+ export * from "./rpc-types.js";
7
+ export { serializeJsonLine, attachJsonlLineReader } from "./jsonl.js";
8
+ export { RpcClient } from "./rpc-client.js";
9
+ export type { RpcClientOptions, RpcEventListener, SdkAgentEvent } from "./rpc-client.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @gsd-build/rpc-client — standalone RPC client SDK for GSD.
3
+ *
4
+ * Re-exports all types, JSONL utilities, and the RpcClient class.
5
+ */
6
+ export * from "./rpc-types.js";
7
+ export { serializeJsonLine, attachJsonlLineReader } from "./jsonl.js";
8
+ export { RpcClient } from "./rpc-client.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * @gsd-build/rpc-client — standalone RPC client SDK for GSD.\n *\n * Re-exports all types, JSONL utilities, and the RpcClient class.\n */\n\nexport * from \"./rpc-types.js\";\nexport { serializeJsonLine, attachJsonlLineReader } from \"./jsonl.js\";\nexport { RpcClient } from \"./rpc-client.js\";\nexport type { RpcClientOptions, RpcEventListener, SdkAgentEvent } from \"./rpc-client.js\";\n"]}
@@ -0,0 +1,17 @@
1
+ import type { Readable } from "node:stream";
2
+ /**
3
+ * Serialize a single strict JSONL record.
4
+ *
5
+ * Framing is LF-only. Payload strings may contain other Unicode separators such as
6
+ * U+2028 and U+2029. Clients must split records on `\n` only.
7
+ */
8
+ export declare function serializeJsonLine(value: unknown): string;
9
+ /**
10
+ * Attach an LF-only JSONL reader to a stream.
11
+ *
12
+ * This intentionally does not use Node readline. Readline splits on additional
13
+ * Unicode separators that are valid inside JSON strings and therefore does not
14
+ * implement strict JSONL framing.
15
+ */
16
+ export declare function attachJsonlLineReader(stream: Readable, onLine: (line: string) => void): () => void;
17
+ //# sourceMappingURL=jsonl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../src/jsonl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CA2ClG"}
@@ -0,0 +1,54 @@
1
+ import { StringDecoder } from "node:string_decoder";
2
+ /**
3
+ * Serialize a single strict JSONL record.
4
+ *
5
+ * Framing is LF-only. Payload strings may contain other Unicode separators such as
6
+ * U+2028 and U+2029. Clients must split records on `\n` only.
7
+ */
8
+ export function serializeJsonLine(value) {
9
+ return `${JSON.stringify(value)}\n`;
10
+ }
11
+ /**
12
+ * Attach an LF-only JSONL reader to a stream.
13
+ *
14
+ * This intentionally does not use Node readline. Readline splits on additional
15
+ * Unicode separators that are valid inside JSON strings and therefore does not
16
+ * implement strict JSONL framing.
17
+ */
18
+ export function attachJsonlLineReader(stream, onLine) {
19
+ const decoder = new StringDecoder("utf8");
20
+ let buffer = "";
21
+ const emitLine = (line) => {
22
+ onLine(line.endsWith("\r") ? line.slice(0, -1) : line);
23
+ };
24
+ const onData = (chunk) => {
25
+ buffer += typeof chunk === "string" ? chunk : decoder.write(chunk);
26
+ while (true) {
27
+ const newlineIndex = buffer.indexOf("\n");
28
+ if (newlineIndex === -1) {
29
+ return;
30
+ }
31
+ emitLine(buffer.slice(0, newlineIndex));
32
+ buffer = buffer.slice(newlineIndex + 1);
33
+ }
34
+ };
35
+ const onEnd = () => {
36
+ buffer += decoder.end();
37
+ if (buffer.length > 0) {
38
+ emitLine(buffer);
39
+ buffer = "";
40
+ }
41
+ };
42
+ const onError = (_err) => {
43
+ // Stream errors are non-fatal for JSONL reading
44
+ };
45
+ stream.on("data", onData);
46
+ stream.on("end", onEnd);
47
+ stream.on("error", onError);
48
+ return () => {
49
+ stream.off("data", onData);
50
+ stream.off("end", onEnd);
51
+ stream.off("error", onError);
52
+ };
53
+ }
54
+ //# sourceMappingURL=jsonl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../src/jsonl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC/C,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAgB,EAAE,MAA8B;IACrF,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;QACjC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,C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,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC;AACH,CAAC","sourcesContent":["import type { Readable } from \"node:stream\";\nimport { StringDecoder } from \"node:string_decoder\";\n\n/**\n * Serialize a single strict JSONL record.\n *\n * Framing is LF-only. Payload strings may contain other Unicode separators such as\n * U+2028 and U+2029. Clients must split records on `\\n` only.\n */\nexport function serializeJsonLine(value: unknown): string {\n\treturn `${JSON.stringify(value)}\\n`;\n}\n\n/**\n * Attach an LF-only JSONL reader to a stream.\n *\n * This intentionally does not use Node readline. Readline splits on additional\n * Unicode separators that are valid inside JSON strings and therefore does not\n * implement strict JSONL framing.\n */\nexport function attachJsonlLineReader(stream: Readable, onLine: (line: string) => void): () => void {\n\tconst decoder = new StringDecoder(\"utf8\");\n\tlet buffer = \"\";\n\n\tconst emitLine = (line: string) => {\n\t\tonLine(line.endsWith(\"\\r\") ? line.slice(0, -1) : line);\n\t};\n\n\tconst onData = (chunk: string | Buffer) => {\n\t\tbuffer += typeof chunk === \"string\" ? chunk : decoder.write(chunk);\n\n\t\twhile (true) {\n\t\t\tconst newlineIndex = buffer.indexOf(\"\\n\");\n\t\t\tif (newlineIndex === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\temitLine(buffer.slice(0, newlineIndex));\n\t\t\tbuffer = buffer.slice(newlineIndex + 1);\n\t\t}\n\t};\n\n\tconst onEnd = () => {\n\t\tbuffer += decoder.end();\n\t\tif (buffer.length > 0) {\n\t\t\temitLine(buffer);\n\t\t\tbuffer = \"\";\n\t\t}\n\t};\n\n\tconst onError = (_err: Error) => {\n\t\t// Stream errors are non-fatal for JSONL reading\n\t};\n\n\tstream.on(\"data\", onData);\n\tstream.on(\"end\", onEnd);\n\tstream.on(\"error\", onError);\n\n\treturn () => {\n\t\tstream.off(\"data\", onData);\n\t\tstream.off(\"end\", onEnd);\n\t\tstream.off(\"error\", onError);\n\t};\n}\n"]}
@@ -0,0 +1,259 @@
1
+ /**
2
+ * RPC Client for programmatic access to the coding agent.
3
+ *
4
+ * Spawns the agent in RPC mode and provides a typed API for all operations.
5
+ * This is a standalone SDK client — all types are inlined with zero internal
6
+ * package dependencies.
7
+ */
8
+ import type { BashResult, CompactionResult, ImageContent, ModelInfo, RpcInitResult, RpcSessionState, RpcSlashCommand, ThinkingLevel, SessionStats } from "./rpc-types.js";
9
+ /** Agent event — a loosely-typed record from the server. The `type` field is always present. */
10
+ export interface SdkAgentEvent {
11
+ type: string;
12
+ [key: string]: unknown;
13
+ }
14
+ export interface RpcClientOptions {
15
+ /** Path to the CLI entry point (default: searches for dist/cli.js) */
16
+ cliPath?: string;
17
+ /** Working directory for the agent */
18
+ cwd?: string;
19
+ /** Environment variables */
20
+ env?: Record<string, string>;
21
+ /** Provider to use */
22
+ provider?: string;
23
+ /** Model ID to use */
24
+ model?: string;
25
+ /** Additional CLI arguments */
26
+ args?: string[];
27
+ }
28
+ export type RpcEventListener = (event: SdkAgentEvent) => void;
29
+ export declare class RpcClient {
30
+ private options;
31
+ private process;
32
+ private stopReadingStdout;
33
+ private _stderrHandler?;
34
+ private eventListeners;
35
+ private pendingRequests;
36
+ private requestId;
37
+ private stderr;
38
+ private _stopped;
39
+ constructor(options?: RpcClientOptions);
40
+ /**
41
+ * Start the RPC agent process.
42
+ */
43
+ start(): Promise<void>;
44
+ /**
45
+ * Stop the RPC agent process.
46
+ */
47
+ stop(): Promise<void>;
48
+ /**
49
+ * Subscribe to agent events via callback.
50
+ */
51
+ onEvent(listener: RpcEventListener): () => void;
52
+ /**
53
+ * Async generator that yields agent events as they arrive.
54
+ *
55
+ * Usage:
56
+ * ```ts
57
+ * for await (const event of client.events()) {
58
+ * console.log(event.type, event);
59
+ * }
60
+ * ```
61
+ *
62
+ * The generator terminates when:
63
+ * - `stop()` is called
64
+ * - The agent process exits
65
+ * - The consumer breaks out of the loop
66
+ */
67
+ events(): AsyncGenerator<SdkAgentEvent, void, undefined>;
68
+ /**
69
+ * Get collected stderr output (useful for debugging).
70
+ */
71
+ getStderr(): string;
72
+ /**
73
+ * Send a prompt to the agent.
74
+ * Returns immediately after sending; use onEvent() or events() to receive streaming events.
75
+ * Use waitForIdle() to wait for completion.
76
+ */
77
+ prompt(message: string, images?: ImageContent[]): Promise<void>;
78
+ /**
79
+ * Queue a steering message to interrupt the agent mid-run.
80
+ */
81
+ steer(message: string, images?: ImageContent[]): Promise<void>;
82
+ /**
83
+ * Queue a follow-up message to be processed after the agent finishes.
84
+ */
85
+ followUp(message: string, images?: ImageContent[]): Promise<void>;
86
+ /**
87
+ * Abort current operation.
88
+ */
89
+ abort(): Promise<void>;
90
+ /**
91
+ * Start a new session, optionally with parent tracking.
92
+ * @param parentSession - Optional parent session path for lineage tracking
93
+ * @returns Object with `cancelled: true` if an extension cancelled the new session
94
+ */
95
+ newSession(parentSession?: string): Promise<{
96
+ cancelled: boolean;
97
+ }>;
98
+ /**
99
+ * Get current session state.
100
+ */
101
+ getState(): Promise<RpcSessionState>;
102
+ /**
103
+ * Set model by provider and ID.
104
+ */
105
+ setModel(provider: string, modelId: string): Promise<{
106
+ provider: string;
107
+ id: string;
108
+ }>;
109
+ /**
110
+ * Cycle to next model.
111
+ */
112
+ cycleModel(): Promise<{
113
+ model: {
114
+ provider: string;
115
+ id: string;
116
+ };
117
+ thinkingLevel: ThinkingLevel;
118
+ isScoped: boolean;
119
+ } | null>;
120
+ /**
121
+ * Get list of available models.
122
+ */
123
+ getAvailableModels(): Promise<ModelInfo[]>;
124
+ /**
125
+ * Set thinking level.
126
+ */
127
+ setThinkingLevel(level: ThinkingLevel): Promise<void>;
128
+ /**
129
+ * Cycle thinking level.
130
+ */
131
+ cycleThinkingLevel(): Promise<{
132
+ level: ThinkingLevel;
133
+ } | null>;
134
+ /**
135
+ * Set steering mode.
136
+ */
137
+ setSteeringMode(mode: "all" | "one-at-a-time"): Promise<void>;
138
+ /**
139
+ * Set follow-up mode.
140
+ */
141
+ setFollowUpMode(mode: "all" | "one-at-a-time"): Promise<void>;
142
+ /**
143
+ * Compact session context.
144
+ */
145
+ compact(customInstructions?: string): Promise<CompactionResult>;
146
+ /**
147
+ * Set auto-compaction enabled/disabled.
148
+ */
149
+ setAutoCompaction(enabled: boolean): Promise<void>;
150
+ /**
151
+ * Set auto-retry enabled/disabled.
152
+ */
153
+ setAutoRetry(enabled: boolean): Promise<void>;
154
+ /**
155
+ * Abort in-progress retry.
156
+ */
157
+ abortRetry(): Promise<void>;
158
+ /**
159
+ * Execute a bash command.
160
+ */
161
+ bash(command: string): Promise<BashResult>;
162
+ /**
163
+ * Abort running bash command.
164
+ */
165
+ abortBash(): Promise<void>;
166
+ /**
167
+ * Get session statistics.
168
+ */
169
+ getSessionStats(): Promise<SessionStats>;
170
+ /**
171
+ * Export session to HTML.
172
+ */
173
+ exportHtml(outputPath?: string): Promise<{
174
+ path: string;
175
+ }>;
176
+ /**
177
+ * Switch to a different session file.
178
+ * @returns Object with `cancelled: true` if an extension cancelled the switch
179
+ */
180
+ switchSession(sessionPath: string): Promise<{
181
+ cancelled: boolean;
182
+ }>;
183
+ /**
184
+ * Fork from a specific message.
185
+ * @returns Object with `text` (the message text) and `cancelled` (if extension cancelled)
186
+ */
187
+ fork(entryId: string): Promise<{
188
+ text: string;
189
+ cancelled: boolean;
190
+ }>;
191
+ /**
192
+ * Get messages available for forking.
193
+ */
194
+ getForkMessages(): Promise<Array<{
195
+ entryId: string;
196
+ text: string;
197
+ }>>;
198
+ /**
199
+ * Get text of last assistant message.
200
+ */
201
+ getLastAssistantText(): Promise<string | null>;
202
+ /**
203
+ * Set the session display name.
204
+ */
205
+ setSessionName(name: string): Promise<void>;
206
+ /**
207
+ * Get all messages in the session.
208
+ * Messages are returned as opaque objects — the internal structure may vary.
209
+ */
210
+ getMessages(): Promise<unknown[]>;
211
+ /**
212
+ * Get available commands (extension commands, prompt templates, skills).
213
+ */
214
+ getCommands(): Promise<RpcSlashCommand[]>;
215
+ /**
216
+ * Send a UI response to a pending extension_ui_request.
217
+ * Fire-and-forget — no request/response correlation.
218
+ */
219
+ sendUIResponse(id: string, response: {
220
+ value?: string;
221
+ values?: string[];
222
+ confirmed?: boolean;
223
+ cancelled?: boolean;
224
+ }): void;
225
+ /**
226
+ * Initialize a v2 protocol session. Must be sent as the first command.
227
+ * Returns the negotiated protocol version, session ID, and server capabilities.
228
+ */
229
+ init(options?: {
230
+ clientId?: string;
231
+ }): Promise<RpcInitResult>;
232
+ /**
233
+ * Request a graceful shutdown of the agent process.
234
+ * Waits for the response before the process exits.
235
+ */
236
+ shutdown(): Promise<void>;
237
+ /**
238
+ * Subscribe to specific event types (v2 only).
239
+ * Pass ["*"] to receive all events, or a list of event type strings to filter.
240
+ */
241
+ subscribe(events: string[]): Promise<void>;
242
+ /**
243
+ * Wait for agent to become idle (no streaming).
244
+ * Resolves when agent_end event is received.
245
+ */
246
+ waitForIdle(timeout?: number): Promise<void>;
247
+ /**
248
+ * Collect events until agent becomes idle.
249
+ */
250
+ collectEvents(timeout?: number): Promise<SdkAgentEvent[]>;
251
+ /**
252
+ * Send prompt and wait for completion, returning all events.
253
+ */
254
+ promptAndWait(message: string, images?: ImageContent[], timeout?: number): Promise<SdkAgentEvent[]>;
255
+ private handleLine;
256
+ private send;
257
+ private getData;
258
+ }
259
+ //# sourceMappingURL=rpc-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../src/rpc-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,SAAS,EAET,aAAa,EAEb,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,MAAM,gBAAgB,CAAC;AAYxB,gGAAgG;AAChG,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAChC,sEAAsE;IAC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