feat(agent): prepare session storage foundation for harness v2

This commit is contained in:
Christian Klotz 2026-08-02 10:48:55 +03:00
parent 14551e7694
commit cbc893b0d4
No known key found for this signature in database
31 changed files with 887 additions and 850 deletions

View file

@ -6,7 +6,7 @@ import {
bashExecutionToText,
convertToLlm,
createCustomMessage,
createInMemorySessionStore,
createInMemorySessionCollection,
createSessionRepository,
FileError,
formatPromptTemplateInvocation,
@ -29,7 +29,7 @@ const stream = createAssistantMessageEventStream();
const agent = new Agent({ initialState: { model }, streamFn: streamSimple });
agent.steer({ role: "user", content: [{ type: "text", text: "queued" }], timestamp: 0 });
const repo = createSessionRepository({ store: createInMemorySessionStore() });
const repo = createSessionRepository({ collection: createInMemorySessionCollection() });
const result = getOrThrow(ok({ value: 1 }));
const customMessage = createCustomMessage("note", "hello", true, undefined, "2026-01-01T00:00:00.000Z");
const llmMessages = convertToLlm([customMessage]);