@poncho-ai/harness 0.59.1 → 0.59.2

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,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.59.1 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
2
+ > @poncho-ai/harness@0.59.2 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
3
3
  > node scripts/embed-docs.js && tsup src/index.ts --format esm --dts
4
4
 
5
5
  [embed-docs] Generated poncho-docs.ts with 4 topics
@@ -9,8 +9,8 @@
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
11
  ESM dist/isolate-F2PPSUL6.js 53.82 KB
12
- ESM dist/index.js 567.42 KB
13
- ESM ⚡️ Build success in 233ms
12
+ ESM dist/index.js 567.57 KB
13
+ ESM ⚡️ Build success in 251ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 7196ms
15
+ DTS ⚡️ Build success in 7447ms
16
16
  DTS dist/index.d.ts 104.68 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @poncho-ai/harness
2
2
 
3
+ ## 0.59.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ac0faae`](https://github.com/cesr/poncho-ai/commit/ac0faae54365afda5ef518b0a306a8cde5978ca8) Thanks [@cesr](https://github.com/cesr)! - conversations.rename now does a targeted title-column UPDATE instead of a
8
+ whole-row get→mutate→update. The read-modify-write raced a streaming turn's
9
+ per-step draft persist: a rename landing mid-run wrote the stale blob back
10
+ and silently reverted the turn's persisted progress.
11
+
3
12
  ## 0.59.1
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3966,11 +3966,15 @@ var SqlStorageEngine = class {
3966
3966
  );
3967
3967
  },
3968
3968
  rename: async (conversationId, title) => {
3969
- const conv = await this.conversations.get(conversationId);
3970
- if (!conv) return void 0;
3971
- conv.title = normalizeTitle2(title);
3972
- await this.conversations.update(conv);
3973
- return conv;
3969
+ const normalized = normalizeTitle2(title);
3970
+ await this.executor.run(
3971
+ rewrite(
3972
+ `UPDATE conversations SET title = $1, updated_at = $2 WHERE id = $3`,
3973
+ this.dialect
3974
+ ),
3975
+ [normalized, (/* @__PURE__ */ new Date()).toISOString(), conversationId]
3976
+ );
3977
+ return this.conversations.get(conversationId);
3974
3978
  },
3975
3979
  delete: async (conversationId) => {
3976
3980
  const row = await this.executor.get(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/harness",
3
- "version": "0.59.1",
3
+ "version": "0.59.2",
4
4
  "description": "Agent execution runtime - conversation loop, tool dispatch, streaming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -557,11 +557,21 @@ export abstract class SqlStorageEngine implements StorageEngine {
557
557
  conversationId: string,
558
558
  title: string,
559
559
  ): Promise<Conversation | undefined> => {
560
- const conv = await this.conversations.get(conversationId);
561
- if (!conv) return undefined;
562
- conv.title = normalizeTitle(title);
563
- await this.conversations.update(conv);
564
- return conv;
560
+ // Targeted column update — deliberately NOT get→mutate→update().
561
+ // The whole-row read-modify-write races a streaming turn's per-step
562
+ // draft persist: rename reads the row at T0, the turn persists step
563
+ // N's draft at T1, rename writes T0's stale blob back at T2 and
564
+ // silently reverts the turn's progress. Title lives in its own
565
+ // column, so touch only that (+ updated_at for sidebar ordering).
566
+ const normalized = normalizeTitle(title);
567
+ await this.executor.run(
568
+ rewrite(
569
+ `UPDATE conversations SET title = $1, updated_at = $2 WHERE id = $3`,
570
+ this.dialect,
571
+ ),
572
+ [normalized, new Date().toISOString(), conversationId],
573
+ );
574
+ return this.conversations.get(conversationId);
565
575
  },
566
576
 
567
577
  delete: async (conversationId: string): Promise<boolean> => {