@poncho-ai/harness 0.37.2 → 0.38.0
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +20 -0
- package/dist/index.d.ts +66 -34
- package/dist/index.js +341 -50
- package/package.json +1 -1
- package/src/harness.ts +4 -3
- package/src/reminder-store.ts +183 -16
- package/src/reminder-tools.ts +102 -6
- package/src/state.ts +29 -3
- package/src/storage/engine.ts +10 -10
- package/src/storage/memory-engine.ts +25 -10
- package/src/storage/schema.ts +11 -0
- package/src/storage/sql-dialect.ts +80 -15
- package/src/storage/store-adapters.ts +11 -11
- package/src/vfs/bash-manager.ts +16 -2
- package/src/vfs/edit-file-tool.ts +9 -8
- package/src/vfs/read-file-tool.ts +14 -15
- package/src/vfs/write-file-tool.ts +6 -5
- package/test/reminder-store.test.ts +193 -4
- package/test/storage-engine.test.ts +25 -0
|
@@ -64,6 +64,31 @@ function runEngineTests(name: string, factory: () => Promise<{ engine: StorageEn
|
|
|
64
64
|
expect(results).toHaveLength(1);
|
|
65
65
|
expect(results[0].title).toBe("alpha beta");
|
|
66
66
|
});
|
|
67
|
+
|
|
68
|
+
it("persists parentConversationId atomically when provided to create", async () => {
|
|
69
|
+
const parent = await engine.conversations.create("o", "Parent");
|
|
70
|
+
const child = await engine.conversations.create("o", "Child", null, {
|
|
71
|
+
parentConversationId: parent.conversationId,
|
|
72
|
+
subagentMeta: { task: "do thing", status: "running" },
|
|
73
|
+
messages: [{ role: "user", content: "do thing" }],
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// Returned object reflects init fields
|
|
77
|
+
expect(child.parentConversationId).toBe(parent.conversationId);
|
|
78
|
+
expect(child.subagentMeta?.task).toBe("do thing");
|
|
79
|
+
expect(child.messages).toHaveLength(1);
|
|
80
|
+
|
|
81
|
+
// listSummaries reads the dedicated column — child must be linked to parent.
|
|
82
|
+
const summaries = await engine.conversations.list("o");
|
|
83
|
+
const childSummary = summaries.find((s) => s.conversationId === child.conversationId);
|
|
84
|
+
expect(childSummary?.parentConversationId).toBe(parent.conversationId);
|
|
85
|
+
|
|
86
|
+
// get() rehydrates from data blob — parent + meta must round-trip.
|
|
87
|
+
const reloaded = await engine.conversations.get(child.conversationId);
|
|
88
|
+
expect(reloaded?.parentConversationId).toBe(parent.conversationId);
|
|
89
|
+
expect(reloaded?.subagentMeta?.task).toBe("do thing");
|
|
90
|
+
expect(reloaded?.messages).toHaveLength(1);
|
|
91
|
+
});
|
|
67
92
|
});
|
|
68
93
|
|
|
69
94
|
// -- Memory --
|