@fro.bot/systematic 3.35.2 → 3.35.3

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/index.js CHANGED
@@ -1867,7 +1867,20 @@ function restorePart(store, sessionID, part) {
1867
1867
  const full = store.peek(sessionID, part.id);
1868
1868
  if (full === undefined)
1869
1869
  return;
1870
- part.result = { type: "content", value: [{ type: "text", text: full }] };
1870
+ part.result = restoredResult(part.result, full);
1871
+ }
1872
+ function restoredResult(result, full) {
1873
+ if (!isRecord(result))
1874
+ return result;
1875
+ if (result.type === "text") {
1876
+ return result.value === full ? result : { type: "text", value: full };
1877
+ }
1878
+ if (result.type !== "content" || !Array.isArray(result.value))
1879
+ return result;
1880
+ const [only, ...more] = result.value;
1881
+ if (more.length === 0 && isRecord(only) && only.type === "text" && only.text === full)
1882
+ return result;
1883
+ return { ...result, value: [{ type: "text", text: full }] };
1871
1884
  }
1872
1885
  function createToolDefinition(ctx, descriptor, store, guard) {
1873
1886
  return {
@@ -67,10 +67,11 @@ export declare function readBundledSkills(bundledSkillsDir: string, enabledSkill
67
67
  */
68
68
  export declare function addBundledSkill(editor: V2SkillEditor, skill: V2SkillRecord, reported: Set<string>, report: (message: string) => void): void;
69
69
  /**
70
- * Put the full text back into the tool results of a model request. Matching is
71
- * by session, tool name and call id. Nothing depends on the host's marker
72
- * text. The store is read, not emptied: the host builds each request from
73
- * history, so the same result is restored on every later request.
70
+ * Put the full text back into the tool results of a model request where the
71
+ * host cut it. Matching is by session, tool name and call id. Nothing depends
72
+ * on the host's marker text. The store is read, not emptied: the host builds
73
+ * each request from history, so the same result is restored on every later
74
+ * request.
74
75
  */
75
76
  export declare function restoreSkillResults(store: SkillOutputStore, event: unknown): void;
76
77
  export declare const installSkills: V2Installer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.35.2",
3
+ "version": "3.35.3",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",