@guuey/agent-client 0.16.3 → 0.16.5

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.
@@ -103,10 +103,23 @@ export interface CreateWebAdaptersOptions {
103
103
  export declare function createWebAdapters(opts?: CreateWebAdaptersOptions): AgentInvokeAdapters;
104
104
  /** Options for {@link createUiResourceReader} — same credential surface as the history adapter. */
105
105
  export interface CreateUiResourceReaderOptions {
106
- /** The guuey public API base (`…/v1`). */
107
- apiBaseUrl: string;
108
- /** The thread whose persisted locators this reader may resolve. */
109
- threadId: string;
106
+ /**
107
+ * The guuey public API base (`…/v1`) — the PLATFORM door's half.
108
+ * Optional since guuey#368's local-dev fix: a surface with only a pod
109
+ * (a `guuey dev` scaffold, any podful host pre-link) builds a POD-ONLY
110
+ * reader — live locators resolve; persisted-door reads are honest
111
+ * misses. The platform door needs BOTH this and `threadId`.
112
+ */
113
+ apiBaseUrl?: string;
114
+ /**
115
+ * The thread whose persisted locators this reader may resolve — the
116
+ * platform door's scope. Optional for the same pod-only case: before a
117
+ * thread exists (or where the transport never mints one — local dev),
118
+ * the pod door alone serves live turns, which is exactly the window
119
+ * where a threadId cannot exist yet. The OLD gate ("no thread ⇒ no
120
+ * read") starved that window to zero requests — the docs-lab repro.
121
+ */
122
+ threadId?: string;
110
123
  /**
111
124
  * The pod base (or full invoke URL — same normalization as the invoke
112
125
  * transport). When set, the reader tries the POD door first
@@ -1 +1 @@
1
- {"version":3,"file":"web-adapters.d.ts","sourceRoot":"","sources":["../src/web-adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAIL,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAmB,aAAa,EAAE,MAAM,YAAY,CAAC;AAItF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B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACpF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,qBAAqB,CAAC,CA6D1D"}
@@ -267,6 +267,10 @@ export function createUiResourceReader(options) {
267
267
  if (live !== undefined)
268
268
  return live;
269
269
  }
270
+ // The platform door needs both its halves; a pod-only assembly stops
271
+ // here — the pod miss above IS the answer (honest placeholder).
272
+ if (options.apiBaseUrl === undefined || options.threadId === undefined)
273
+ return undefined;
270
274
  return readDoor(`${options.apiBaseUrl}/threads/${encodeURIComponent(options.threadId)}/ui-resource${query}`);
271
275
  };
272
276
  return createMcpUiResourceReader({ readResource });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guuey/agent-client",
3
- "version": "0.16.3",
3
+ "version": "0.16.5",
4
4
  "description": "Client SDK for Guuey's agent runtime: the `useAgentInvoke` React hook + pure SSE helpers that speak the /agent/invoke streaming contract, plus the paginated thread-history read plane. Host adapters (storage / id / transport) are injected, so it runs on web (Next) and React Native alike.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@silverprotocol/core": "0.5.2",
38
- "@guuey/mcp-apps-host": "0.16.3"
38
+ "@guuey/mcp-apps-host": "0.16.5"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=18"
@@ -224,10 +224,23 @@ export function createWebAdapters(
224
224
 
225
225
  /** Options for {@link createUiResourceReader} — same credential surface as the history adapter. */
226
226
  export interface CreateUiResourceReaderOptions {
227
- /** The guuey public API base (`…/v1`). */
228
- apiBaseUrl: string;
229
- /** The thread whose persisted locators this reader may resolve. */
230
- threadId: string;
227
+ /**
228
+ * The guuey public API base (`…/v1`) — the PLATFORM door's half.
229
+ * Optional since guuey#368's local-dev fix: a surface with only a pod
230
+ * (a `guuey dev` scaffold, any podful host pre-link) builds a POD-ONLY
231
+ * reader — live locators resolve; persisted-door reads are honest
232
+ * misses. The platform door needs BOTH this and `threadId`.
233
+ */
234
+ apiBaseUrl?: string;
235
+ /**
236
+ * The thread whose persisted locators this reader may resolve — the
237
+ * platform door's scope. Optional for the same pod-only case: before a
238
+ * thread exists (or where the transport never mints one — local dev),
239
+ * the pod door alone serves live turns, which is exactly the window
240
+ * where a threadId cannot exist yet. The OLD gate ("no thread ⇒ no
241
+ * read") starved that window to zero requests — the docs-lab repro.
242
+ */
243
+ threadId?: string;
231
244
  /**
232
245
  * The pod base (or full invoke URL — same normalization as the invoke
233
246
  * transport). When set, the reader tries the POD door first
@@ -402,6 +415,9 @@ export function createUiResourceReader(
402
415
  const live = await readDoor(`${podUrl}${query}`);
403
416
  if (live !== undefined) return live;
404
417
  }
418
+ // The platform door needs both its halves; a pod-only assembly stops
419
+ // here — the pod miss above IS the answer (honest placeholder).
420
+ if (options.apiBaseUrl === undefined || options.threadId === undefined) return undefined;
405
421
  return readDoor(
406
422
  `${options.apiBaseUrl}/threads/${encodeURIComponent(options.threadId)}/ui-resource${query}`,
407
423
  );