@guuey/threads 0.5.0 → 0.6.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"fold-rows.d.ts","sourceRoot":"","sources":["../src/fold-rows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,YAAY,EAEZ,cAAc,EACd,OAAO,EACP,cAAc,EACd,SAAS,EACV,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAwC,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG3G,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB;AASD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAMlD;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,MAAM,GAAG;IAAE,UAAU,CAAC,EAAE,YAAY,CAAA;CAAE,GAC1C,gBAAgB,CAyBlB;AAkDD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,CAiC/E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAqBlF;AAOD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,SAAS,CAY/D;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAMjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,gBAAgB,EAAE,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CAMjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,gBAAgB,EAAE,EACxB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GACtC,cAAc,CA2BhB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,SAAS,GAAG,SAAS,EACjC,iBAAiB,EAAE,cAAc,EAAE,GAClC,OAAO,EAAE,CAmBX"}
package/dist/fold-rows.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AgMessage as AgMessageSchema } from "@silverprotocol/core";
2
- import { asUiResource, scanProviderRawForUiResource, uiLocator } from "@guuey/mcp-apps-host/narrowing";
2
+ import { asUiResource, scanProviderRawForUiResource, toolResultLocator } from "@guuey/mcp-apps-host/narrowing";
3
3
  /** AgRole → the row's coarse authorRole projection (secondary; role of record lives in content). */
4
4
  function roleToAuthor(role) {
5
5
  if (role === "user")
@@ -107,14 +107,16 @@ export function uiCardArtifactsFromMessages(messages) {
107
107
  // one producer) persists as a PLACEHOLDER row: the locator without
108
108
  // mount material (mount = re-fetch of the resourceUri). Before this,
109
109
  // locator-only results persisted nothing and vanished from history.
110
- // The locator arm leans on an UPSTREAM gate (guuey#170): the
111
- // claude-agent-sdk facet stamps `uiData` only when the result's
112
- // sibling `_meta.ui` is present, so ggui's meta-less amend/no-op
113
- // update results arrive here WITHOUT uiData and mint nothing. This
114
- // projector itself never reads `_meta` mount material rides
115
- // uiData/content only (see the metaOnly pin in fold-rows.test.ts).
110
+ // The locator reads BOTH channels (guuey#209): the claude-agent-sdk
111
+ // facet stamps `uiData` only when the result's sibling `_meta.ui` is
112
+ // present (guuey#170); a producer that withholds `_meta` delivers the
113
+ // same `ui://` locator in `structuredContent` instead without this
114
+ // read the render's own locator would never mint a placeholder row and
115
+ // the read plane 404s it. Mount MATERIAL still never rides `_meta` here
116
+ // (see the metaOnly pin in fold-rows.test.ts): a bare locator persists
117
+ // as a placeholder whose mount is a re-fetch.
116
118
  const carriesUi = asUiResource(block.uiData) !== undefined ||
117
- uiLocator(block.uiData) !== undefined ||
119
+ toolResultLocator(block) !== undefined ||
118
120
  block.content.some((part) => part.type === "provider-raw" && scanProviderRawForUiResource(part.raw) !== undefined);
119
121
  if (!carriesUi)
120
122
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guuey/threads",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Universal session/thread persistence for AgJSON agents — the ThreadStore contract (append-fold, history, snapshots), the fold↔row mapping, and an in-memory binding. Guuey's hosted runtime is one binding; implement the port against your own store and run the exported contract suite for the same guarantees.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,8 +22,8 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@silverprotocol/core": "0.4.1",
26
- "@guuey/mcp-apps-host": "0.5.0"
25
+ "@silverprotocol/core": "0.5.0",
26
+ "@guuey/mcp-apps-host": "0.6.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^24.0.0",