gsd-pi 2.53.0-dev.07ffe51 → 2.53.0-dev.a67436f
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.
- package/dist/headless-ui.d.ts +2 -2
- package/dist/headless-ui.js +18 -15
- package/dist/headless.d.ts +11 -0
- package/dist/headless.js +178 -38
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +18 -18
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +18 -18
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/mcp-server/README.md +6 -6
- package/packages/mcp-server/package.json +14 -4
- package/packages/mcp-server/src/cli.ts +1 -1
- package/packages/mcp-server/src/index.ts +1 -1
- package/packages/mcp-server/src/mcp-server.test.ts +2 -2
- package/packages/mcp-server/src/session-manager.ts +2 -2
- package/packages/mcp-server/src/types.ts +1 -1
- package/packages/rpc-client/README.md +125 -0
- package/packages/rpc-client/examples/basic-usage.ts +13 -0
- package/packages/rpc-client/package.json +17 -3
- package/packages/rpc-client/src/index.ts +10 -0
- package/packages/rpc-client/src/jsonl.ts +64 -0
- package/packages/rpc-client/src/rpc-client.test.ts +568 -0
- package/packages/rpc-client/src/rpc-client.ts +666 -0
- package/packages/rpc-client/src/rpc-types.ts +399 -0
- package/packages/rpc-client/tsconfig.examples.json +17 -0
- package/packages/rpc-client/tsconfig.json +24 -0
- /package/dist/web/standalone/.next/static/{Q5pfrfJIvgUKR3LJLVB0T → YO-PWFRitlHM-L-dotlmm}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{Q5pfrfJIvgUKR3LJLVB0T → YO-PWFRitlHM-L-dotlmm}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-bca0e732db0dcec3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--YO_PWFRitlHM_L_dotlmm--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-bca0e732db0dcec3.js"/><script src="/_next/static/chunks/4bd1b696-e5d7c65570c947b7.js" async=""></script><script src="/_next/static/chunks/3794-337d1ca25ad99a89.js" async=""></script><script src="/_next/static/chunks/main-app-fdab67f7802d7832.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-bca0e732db0dcec3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"YO-PWFRitlHM-L-dotlmm\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"0tL+7ksLlV/th0yT7FVXnLzmrMCL/qBBglcyh8bskpY="}
|
|
@@ -15,7 +15,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
15
15
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
16
16
|
|
|
17
17
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
18
|
-
const nextConfig = {"env":{},"typescript":{"ignoreBuildErrors":true},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/__w/gsd-2/gsd-2","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"dynamicOnHover":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":
|
|
18
|
+
const nextConfig = {"env":{},"typescript":{"ignoreBuildErrors":true},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/__w/gsd-2/gsd-2","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"dynamicOnHover":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":5,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":false,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":false,"lockDistDir":true,"isolatedDevBuild":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":false,"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.mjs","serverExternalPackages":["@gsd/native","node-pty"],"turbopack":{"root":"/__w/gsd-2/gsd-2"},"distDirRoot":".next"}
|
|
19
19
|
|
|
20
20
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gsd/mcp-server
|
|
1
|
+
# @gsd-build/mcp-server
|
|
2
2
|
|
|
3
3
|
MCP server exposing GSD orchestration tools for Claude Code, Cursor, and other MCP-compatible clients.
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ Start GSD auto-mode sessions, poll progress, resolve blockers, and retrieve resu
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @gsd/mcp-server
|
|
10
|
+
npm install @gsd-build/mcp-server
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Or with the monorepo workspace:
|
|
@@ -180,12 +180,12 @@ Resolve a pending blocker in a session by sending a response to the blocked UI r
|
|
|
180
180
|
|
|
181
181
|
```
|
|
182
182
|
┌─────────────────┐ stdio ┌──────────────────┐
|
|
183
|
-
│ MCP Client │ ◄────────────► │ @gsd/mcp-server │
|
|
183
|
+
│ MCP Client │ ◄────────────► │ @gsd-build/mcp-server │
|
|
184
184
|
│ (Claude Code, │ JSON-RPC │ │
|
|
185
185
|
│ Cursor, etc.) │ │ SessionManager │
|
|
186
186
|
└─────────────────┘ │ │ │
|
|
187
187
|
│ ▼ │
|
|
188
|
-
│ @gsd/rpc-client │
|
|
188
|
+
│ @gsd-build/rpc-client │
|
|
189
189
|
│ │ │
|
|
190
190
|
│ ▼ │
|
|
191
191
|
│ GSD CLI (child │
|
|
@@ -193,9 +193,9 @@ Resolve a pending blocker in a session by sending a response to the blocked UI r
|
|
|
193
193
|
└──────────────────┘
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
- **@gsd/mcp-server** — MCP protocol adapter. Translates MCP tool calls into SessionManager operations.
|
|
196
|
+
- **@gsd-build/mcp-server** — MCP protocol adapter. Translates MCP tool calls into SessionManager operations.
|
|
197
197
|
- **SessionManager** — Manages RpcClient lifecycle. One session per project directory. Tracks events in a ring buffer (last 50), detects blockers, accumulates cost.
|
|
198
|
-
- **@gsd/rpc-client** — Low-level RPC client that spawns and communicates with the GSD CLI process via JSON-RPC over stdio.
|
|
198
|
+
- **@gsd-build/rpc-client** — Low-level RPC client that spawns and communicates with the GSD CLI process via JSON-RPC over stdio.
|
|
199
199
|
|
|
200
200
|
## License
|
|
201
201
|
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@gsd/mcp-server",
|
|
3
|
-
"version": "2.
|
|
2
|
+
"name": "@gsd-build/mcp-server",
|
|
3
|
+
"version": "2.52.0",
|
|
4
4
|
"description": "MCP server exposing GSD orchestration tools for Claude Code, Cursor, and other MCP clients",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/gsd-build/gsd-2.git",
|
|
9
|
+
"directory": "packages/mcp-server"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
5
14
|
"type": "module",
|
|
6
15
|
"main": "./dist/index.js",
|
|
7
16
|
"types": "./dist/index.d.ts",
|
|
@@ -20,7 +29,7 @@
|
|
|
20
29
|
},
|
|
21
30
|
"dependencies": {
|
|
22
31
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
23
|
-
"@gsd/rpc-client": "
|
|
32
|
+
"@gsd-build/rpc-client": "^2.52.0",
|
|
24
33
|
"zod": "^4.0.0"
|
|
25
34
|
},
|
|
26
35
|
"devDependencies": {
|
|
@@ -31,6 +40,7 @@
|
|
|
31
40
|
"node": ">=22.0.0"
|
|
32
41
|
},
|
|
33
42
|
"files": [
|
|
34
|
-
"dist"
|
|
43
|
+
"dist",
|
|
44
|
+
"!dist/**/*.test.*"
|
|
35
45
|
]
|
|
36
46
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @gsd/mcp-server — Integration and unit tests.
|
|
2
|
+
* @gsd-build/mcp-server — Integration and unit tests.
|
|
3
3
|
*
|
|
4
|
-
* Strategy: We cannot mock @gsd/rpc-client at the module level without
|
|
4
|
+
* Strategy: We cannot mock @gsd-build/rpc-client at the module level without
|
|
5
5
|
* --experimental-test-module-mocks. Instead we test by:
|
|
6
6
|
*
|
|
7
7
|
* 1. Subclassing SessionManager to inject a mock client factory
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
import { execSync } from 'node:child_process';
|
|
10
10
|
import { resolve } from 'node:path';
|
|
11
|
-
import { RpcClient } from '@gsd/rpc-client';
|
|
12
|
-
import type { SdkAgentEvent, RpcInitResult, RpcCostUpdateEvent, RpcExtensionUIRequest } from '@gsd/rpc-client';
|
|
11
|
+
import { RpcClient } from '@gsd-build/rpc-client';
|
|
12
|
+
import type { SdkAgentEvent, RpcInitResult, RpcCostUpdateEvent, RpcExtensionUIRequest } from '@gsd-build/rpc-client';
|
|
13
13
|
import type {
|
|
14
14
|
ManagedSession,
|
|
15
15
|
ExecuteOptions,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* MCP Server types — session lifecycle and orchestration.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { RpcClient, SdkAgentEvent, RpcCostUpdateEvent, RpcExtensionUIRequest } from '@gsd/rpc-client';
|
|
5
|
+
import type { RpcClient, SdkAgentEvent, RpcCostUpdateEvent, RpcExtensionUIRequest } from '@gsd-build/rpc-client';
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
// Session Status
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# @gsd-build/rpc-client
|
|
2
|
+
|
|
3
|
+
Standalone RPC client SDK for GSD. Spawn the agent process, perform a v2 protocol handshake, send commands, and consume typed events via an async generator — all in a few lines of TypeScript.
|
|
4
|
+
|
|
5
|
+
Zero internal dependencies. Ships its own inlined types.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @gsd-build/rpc-client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { RpcClient } from '@gsd-build/rpc-client';
|
|
17
|
+
|
|
18
|
+
const client = new RpcClient({ cwd: process.cwd() });
|
|
19
|
+
await client.start();
|
|
20
|
+
const { sessionId } = await client.init({ clientId: 'my-app' });
|
|
21
|
+
console.log(`Session: ${sessionId}`);
|
|
22
|
+
|
|
23
|
+
await client.prompt('Create a hello world script');
|
|
24
|
+
for await (const event of client.events()) {
|
|
25
|
+
if (event.type === 'execution_complete') break;
|
|
26
|
+
console.log(event.type);
|
|
27
|
+
}
|
|
28
|
+
await client.shutdown();
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
### Constructor
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
const client = new RpcClient(options?: RpcClientOptions);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
| Option | Type | Description |
|
|
40
|
+
|------------|--------------------------|------------------------------------------|
|
|
41
|
+
| `cliPath` | `string` | Path to the CLI entry point |
|
|
42
|
+
| `cwd` | `string` | Working directory for the agent |
|
|
43
|
+
| `env` | `Record<string, string>` | Environment variables |
|
|
44
|
+
| `provider` | `string` | AI provider (e.g. `"anthropic"`) |
|
|
45
|
+
| `model` | `string` | Model ID (e.g. `"claude-sonnet"`) |
|
|
46
|
+
| `args` | `string[]` | Additional CLI arguments |
|
|
47
|
+
|
|
48
|
+
### Lifecycle
|
|
49
|
+
|
|
50
|
+
| Method | Description |
|
|
51
|
+
|---------------|------------------------------------------------|
|
|
52
|
+
| `start()` | Spawn the agent process |
|
|
53
|
+
| `init(opts?)` | v2 handshake — returns `sessionId`, capabilities |
|
|
54
|
+
| `shutdown()` | Graceful shutdown |
|
|
55
|
+
| `stop()` | Force-kill the process |
|
|
56
|
+
|
|
57
|
+
### Commands
|
|
58
|
+
|
|
59
|
+
| Method | Description |
|
|
60
|
+
|--------------------------------|----------------------------------------|
|
|
61
|
+
| `prompt(message, images?)` | Send a prompt |
|
|
62
|
+
| `steer(message, images?)` | Interrupt with a steering message |
|
|
63
|
+
| `followUp(message, images?)` | Queue a follow-up message |
|
|
64
|
+
| `abort()` | Abort current operation |
|
|
65
|
+
| `subscribe(events)` | Subscribe to event types (`["*"]` for all) |
|
|
66
|
+
|
|
67
|
+
### Events
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// Async generator — recommended
|
|
71
|
+
for await (const event of client.events()) {
|
|
72
|
+
console.log(event.type);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Callback-based
|
|
76
|
+
const unsubscribe = client.onEvent((event) => {
|
|
77
|
+
console.log(event.type);
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Helpers
|
|
82
|
+
|
|
83
|
+
| Method | Description |
|
|
84
|
+
|---------------------------------------|------------------------------------------|
|
|
85
|
+
| `waitForIdle(timeout?)` | Wait for `agent_end` event |
|
|
86
|
+
| `collectEvents(timeout?)` | Collect events until idle |
|
|
87
|
+
| `promptAndWait(message, images?, t?)` | Send prompt and collect events |
|
|
88
|
+
|
|
89
|
+
### Session & Model
|
|
90
|
+
|
|
91
|
+
| Method | Description |
|
|
92
|
+
|----------------------------------|-----------------------------------|
|
|
93
|
+
| `getState()` | Get session state |
|
|
94
|
+
| `setModel(provider, modelId)` | Set model |
|
|
95
|
+
| `cycleModel()` | Cycle to next model |
|
|
96
|
+
| `getAvailableModels()` | List available models |
|
|
97
|
+
| `setThinkingLevel(level)` | Set thinking level |
|
|
98
|
+
| `cycleThinkingLevel()` | Cycle thinking level |
|
|
99
|
+
| `compact(instructions?)` | Compact session context |
|
|
100
|
+
| `getSessionStats()` | Get session statistics |
|
|
101
|
+
| `bash(command)` | Execute a bash command |
|
|
102
|
+
| `newSession(parent?)` | Start a new session |
|
|
103
|
+
| `sendUIResponse(id, response)` | Respond to extension UI requests |
|
|
104
|
+
|
|
105
|
+
## Type Exports
|
|
106
|
+
|
|
107
|
+
All protocol types are exported from the package root:
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
import type {
|
|
111
|
+
RpcCommand,
|
|
112
|
+
RpcResponse,
|
|
113
|
+
RpcInitResult,
|
|
114
|
+
RpcExecutionCompleteEvent,
|
|
115
|
+
RpcCostUpdateEvent,
|
|
116
|
+
RpcV2Event,
|
|
117
|
+
SessionStats,
|
|
118
|
+
SdkAgentEvent,
|
|
119
|
+
RpcClientOptions,
|
|
120
|
+
} from '@gsd-build/rpc-client';
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RpcClient } from '@gsd-build/rpc-client';
|
|
2
|
+
|
|
3
|
+
const client = new RpcClient({ cwd: process.cwd() });
|
|
4
|
+
await client.start();
|
|
5
|
+
const { sessionId } = await client.init({ clientId: 'my-app' });
|
|
6
|
+
console.log(`Session: ${sessionId}`);
|
|
7
|
+
|
|
8
|
+
await client.prompt('Create a hello world script');
|
|
9
|
+
for await (const event of client.events()) {
|
|
10
|
+
if (event.type === 'execution_complete') break;
|
|
11
|
+
console.log(event.type);
|
|
12
|
+
}
|
|
13
|
+
await client.shutdown();
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@gsd/rpc-client",
|
|
3
|
-
"version": "2.
|
|
2
|
+
"name": "@gsd-build/rpc-client",
|
|
3
|
+
"version": "2.52.0",
|
|
4
4
|
"description": "Standalone RPC client SDK for GSD — zero internal dependencies",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/gsd-build/gsd-2.git",
|
|
9
|
+
"directory": "packages/rpc-client"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
5
14
|
"type": "module",
|
|
6
15
|
"main": "./dist/index.js",
|
|
7
16
|
"types": "./dist/index.d.ts",
|
|
@@ -12,8 +21,13 @@
|
|
|
12
21
|
}
|
|
13
22
|
},
|
|
14
23
|
"files": [
|
|
15
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"!dist/**/*.test.*"
|
|
16
26
|
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc -p tsconfig.json",
|
|
29
|
+
"test": "node --test dist/rpc-client.test.js"
|
|
30
|
+
},
|
|
17
31
|
"engines": {
|
|
18
32
|
"node": ">=22.0.0"
|
|
19
33
|
}
|
|
@@ -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
|
+
|
|
7
|
+
export * from "./rpc-types.js";
|
|
8
|
+
export { serializeJsonLine, attachJsonlLineReader } from "./jsonl.js";
|
|
9
|
+
export { RpcClient } from "./rpc-client.js";
|
|
10
|
+
export type { RpcClientOptions, RpcEventListener, SdkAgentEvent } from "./rpc-client.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Readable } from "node:stream";
|
|
2
|
+
import { StringDecoder } from "node:string_decoder";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Serialize a single strict JSONL record.
|
|
6
|
+
*
|
|
7
|
+
* Framing is LF-only. Payload strings may contain other Unicode separators such as
|
|
8
|
+
* U+2028 and U+2029. Clients must split records on `\n` only.
|
|
9
|
+
*/
|
|
10
|
+
export function serializeJsonLine(value: unknown): string {
|
|
11
|
+
return `${JSON.stringify(value)}\n`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Attach an LF-only JSONL reader to a stream.
|
|
16
|
+
*
|
|
17
|
+
* This intentionally does not use Node readline. Readline splits on additional
|
|
18
|
+
* Unicode separators that are valid inside JSON strings and therefore does not
|
|
19
|
+
* implement strict JSONL framing.
|
|
20
|
+
*/
|
|
21
|
+
export function attachJsonlLineReader(stream: Readable, onLine: (line: string) => void): () => void {
|
|
22
|
+
const decoder = new StringDecoder("utf8");
|
|
23
|
+
let buffer = "";
|
|
24
|
+
|
|
25
|
+
const emitLine = (line: string) => {
|
|
26
|
+
onLine(line.endsWith("\r") ? line.slice(0, -1) : line);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const onData = (chunk: string | Buffer) => {
|
|
30
|
+
buffer += typeof chunk === "string" ? chunk : decoder.write(chunk);
|
|
31
|
+
|
|
32
|
+
while (true) {
|
|
33
|
+
const newlineIndex = buffer.indexOf("\n");
|
|
34
|
+
if (newlineIndex === -1) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
emitLine(buffer.slice(0, newlineIndex));
|
|
39
|
+
buffer = buffer.slice(newlineIndex + 1);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const onEnd = () => {
|
|
44
|
+
buffer += decoder.end();
|
|
45
|
+
if (buffer.length > 0) {
|
|
46
|
+
emitLine(buffer);
|
|
47
|
+
buffer = "";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const onError = (_err: Error) => {
|
|
52
|
+
// Stream errors are non-fatal for JSONL reading
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
stream.on("data", onData);
|
|
56
|
+
stream.on("end", onEnd);
|
|
57
|
+
stream.on("error", onError);
|
|
58
|
+
|
|
59
|
+
return () => {
|
|
60
|
+
stream.off("data", onData);
|
|
61
|
+
stream.off("end", onEnd);
|
|
62
|
+
stream.off("error", onError);
|
|
63
|
+
};
|
|
64
|
+
}
|