mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(chord): Chord v2 is the package's root
src/next is src (the main export), src/next-node is src/node with short subpaths (/http, /workers, /plugins, /plugins/runtime, /app, /surfaces, /web, /react, /tui, /tui/launcher); the foundations get /json and /watch; Chord v1 moves to src/old (/old, /old/node) until p2 runs on v2; tests and docs move likewise (test/, docs/, test/old, docs/old). Durable and env import the foundations from their subpaths.
This commit is contained in:
parent
0a4fad5489
commit
e9c0ff4d84
966 changed files with 2968 additions and 2804 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
createModels,
|
||||
type FauxProviderHandle,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type AssistantImages,
|
||||
type ClassifierResult,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtemp, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { dirname, join } from "node:path";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { type AssistantMessage, fauxAssistantMessage, fauxText, fauxToolCall } from "@earendil-works/pi-ai";
|
||||
import { type CodemodeRun, CodemodeSandbox } from "@earendil-works/pi-codemode";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { tmpdir } from "node:os";
|
|||
import { join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { promisify } from "node:util";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT as context } from "@earendil-works/chord/context";
|
||||
import { createModels } from "@earendil-works/pi-ai/models";
|
||||
import { type Conversation, createRegistry, type EntryId, Harness, LiveDoc, type Storage } from "../src/index.ts";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// Run from packages/durable:
|
||||
// node --conditions=source --experimental-strip-types test/examples/21-subagent-foreground.ts
|
||||
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import type { AssistantMessage, FauxResponseStep } from "@earendil-works/pi-ai";
|
||||
import { createModels } from "@earendil-works/pi-ai/models";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import {
|
||||
createHost,
|
||||
defineFacet,
|
||||
|
|
@ -17,7 +16,8 @@ import {
|
|||
openStore,
|
||||
sqliteBackend,
|
||||
str,
|
||||
} from "@earendil-works/chord/next";
|
||||
} from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import { openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import { createRegistry, Harness, ROOT_CONVERSATION_ID } from "../../src/index.ts";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
// Run from packages/durable:
|
||||
// node --conditions=source --experimental-strip-types test/examples/36-durable-views.ts
|
||||
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import {
|
||||
arr,
|
||||
createHost,
|
||||
|
|
@ -17,7 +16,8 @@ import {
|
|||
openStore,
|
||||
sqliteBackend,
|
||||
str,
|
||||
} from "@earendil-works/chord/next";
|
||||
} from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import { openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import { createRegistry, Harness, ROOT_CONVERSATION_ID } from "../../src/index.ts";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
// Run from packages/durable:
|
||||
// node --conditions=source --experimental-strip-types test/examples/37-harness-registry.ts
|
||||
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import {
|
||||
arr,
|
||||
createHost,
|
||||
|
|
@ -19,7 +18,8 @@ import {
|
|||
type RegistryTable,
|
||||
sqliteBackend,
|
||||
str,
|
||||
} from "@earendil-works/chord/next";
|
||||
} from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import { openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Draft, JsonValue } from "@earendil-works/chord";
|
||||
import type { Draft } from "@earendil-works/chord/delta";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { fauxAssistantMessage, fauxToolCall } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
CompactionTask,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type CommitResult,
|
||||
createSession,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { createModels, type Message } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
type ContextView,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Group commit and the scheduler (docs/group-commit.md §6): decisions read the scheduler's memory in regions that
|
||||
// wait for the unpublished commits whose keys they read, memberships written at admission, outcomes, and close.
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type ConversationId,
|
||||
createRegistry,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { withAbortSignal } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { createModels, fauxAssistantMessage, fauxText, fauxToolCall } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
type Conversation,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
fauxAssistantMessage,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import { withAbortSignal } from "@earendil-works/chord/context";
|
||||
import { applyImmutable } from "@earendil-works/chord/delta";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
fauxAssistantMessage,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// document) and for task document watches, which end with their task.
|
||||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { WatchCall } from "@earendil-works/chord";
|
||||
import { withAbortSignal } from "@earendil-works/chord/context";
|
||||
import type { WatchCall } from "@earendil-works/chord/watch";
|
||||
import {
|
||||
type ConversationView,
|
||||
defineDoc,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { copyJson } from "@earendil-works/chord";
|
||||
import { type Op, track } from "@earendil-works/chord/delta";
|
||||
import { copyJson } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
type AssistantMessageEvent,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { BACKGROUND_CONTEXT as context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
arr,
|
||||
createHost,
|
||||
|
|
@ -10,7 +9,8 @@ import {
|
|||
type Native,
|
||||
type RegistryTable,
|
||||
str,
|
||||
} from "@earendil-works/chord/next";
|
||||
} from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT as context } from "@earendil-works/chord/context";
|
||||
import { createModels } from "@earendil-works/pi-ai/models";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { runInNewContext } from "node:vm";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
createRegistry,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtempSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
fauxAssistantMessage,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
fauxAssistantMessage,
|
||||
fauxText,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import { applyImmutable, type Op } from "@earendil-works/chord/delta";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type ConversationId,
|
||||
type ConversationView,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
createRegistry,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { withAbortSignal, withCancel } from "@earendil-works/chord/context";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
fauxAssistantMessage,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { dirname, join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
fauxAssistantMessage,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
type FauxResponseStep,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { GCProfiler, getHeapStatistics, setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { Draft } from "@earendil-works/chord";
|
||||
import type { Draft } from "@earendil-works/chord/delta";
|
||||
import { applyImmutable, type Op } from "@earendil-works/chord/delta";
|
||||
import {
|
||||
type AssistantMessage,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
/// <reference lib="dom" />
|
||||
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { registerStorageConformance } from "@earendil-works/pi-durable/testing";
|
||||
import { IDBKeyRange as FakeIDBKeyRange, IDBObjectStore as FakeIDBObjectStore, IDBFactory } from "fake-indexeddb";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { mkdtemp, readdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { basename, join } from "node:path";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { registerStorageConformance } from "@earendil-works/pi-durable/testing";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { err, FileError, type FileSystem, type Result } from "../src/env/index.ts";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { basename, join } from "node:path";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type CommitPublication,
|
||||
type CommitResult,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { idFromNumber } from "../src/ids.ts";
|
||||
import { CachedStorage } from "../src/session/cached-storage.ts";
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// each kind of listener then sees.
|
||||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import { applyImmutable } from "@earendil-works/chord/delta";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type CommitChange,
|
||||
type CommitOptions,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Draft } from "@earendil-works/chord";
|
||||
import type { Draft } from "@earendil-works/chord/delta";
|
||||
import {
|
||||
type ConversationId,
|
||||
createSession,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import type { Draft, JsonValue } from "@earendil-works/chord";
|
||||
import type { Draft } from "@earendil-works/chord/delta";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type ConversationId,
|
||||
defineDoc,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Group commit on the Session line (docs/group-commit.md): batching, gates, outcome fences, publication, failures per
|
||||
// part, upkeep through the writer, backpressure, bounds, and a randomized interleaving against an oracle.
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type CommitOptions,
|
||||
type CommitResult,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// Tests for `Session.observeDoc()`, the synchronous observer of one document address that watches are built on.
|
||||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { WatchCall, WatchEnd } from "@earendil-works/chord";
|
||||
import { withAbortSignal } from "@earendil-works/chord/context";
|
||||
import type { WatchCall, WatchEnd } from "@earendil-works/chord/watch";
|
||||
import {
|
||||
type CommitObserver,
|
||||
type ConversationId,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import {
|
||||
type CommitChange,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { JsonValue } from "@earendil-works/chord";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import {
|
||||
type ConversationId,
|
||||
defineDoc,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { Context, WatchCall, WatchEnd } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import {
|
||||
BACKGROUND_CONTEXT,
|
||||
createContextKey,
|
||||
|
|
@ -9,6 +9,7 @@ import {
|
|||
withContextValue,
|
||||
} from "@earendil-works/chord/context";
|
||||
import { applyImmutable } from "@earendil-works/chord/delta";
|
||||
import type { WatchCall, WatchEnd } from "@earendil-works/chord/watch";
|
||||
import { type DocumentWatch, defineDoc, defineDocFamily, MemoryStorage } from "@earendil-works/pi-durable";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { SessionImpl } from "../src/session/session.ts";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
* patterns end to end.
|
||||
*/
|
||||
|
||||
import type { Context, Draft } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import type { Draft } from "@earendil-works/chord/delta";
|
||||
import type { AssistantMessage, Models, ToolCall } from "@earendil-works/pi-ai";
|
||||
import {
|
||||
type Conversation,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@ import { mkdtemp, rm, stat } from "node:fs/promises";
|
|||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { DatabaseSync } from "node:sqlite";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import type { SqliteDatabase } from "@earendil-works/chord/sqlite";
|
||||
import { registerStorageConformance } from "@earendil-works/pi-durable/testing";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { tmpdir } from "node:os";
|
|||
import { join } from "node:path";
|
||||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import { type ChordStore, createHost, openStore, sqliteBackend } from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT, withTelemetry } from "@earendil-works/chord/context";
|
||||
import { type ChordStore, createHost, openStore, sqliteBackend } from "@earendil-works/chord/next";
|
||||
import type { SqliteDatabase, SqliteExecutor } from "@earendil-works/chord/sqlite";
|
||||
import { openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { InMemoryTelemetryContext } from "@earendil-works/pi-telemetry";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// StoreStorage over a SQLite file for tests: a store opened on the file, Durable's storage in it under a test owner
|
||||
// name, and a close that closes the store too (the app's part: in tests the storage is the store's only owner).
|
||||
|
||||
import { openStore, sqliteBackend } from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
||||
import { openStore, sqliteBackend } from "@earendil-works/chord/next";
|
||||
import { type NodeSqliteDatabaseOptions, openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { StoreStorage } from "../src/storage/store/index.ts";
|
||||
import type { Storage } from "../src/types.ts";
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import { tmpdir } from "node:os";
|
|||
import { join } from "node:path";
|
||||
import { setFlagsFromString } from "node:v8";
|
||||
import { runInNewContext } from "node:vm";
|
||||
import type { Context } from "@earendil-works/chord";
|
||||
import { BACKGROUND_CONTEXT, withTelemetry } from "@earendil-works/chord/context";
|
||||
import {
|
||||
applyBatch,
|
||||
type ChordStore,
|
||||
|
|
@ -23,7 +21,9 @@ import {
|
|||
type Store,
|
||||
sqliteBackend,
|
||||
str,
|
||||
} from "@earendil-works/chord/next";
|
||||
} from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT, withTelemetry } from "@earendil-works/chord/context";
|
||||
import { openNodeSqliteDatabase } from "@earendil-works/chord/sqlite/node";
|
||||
import { createModels } from "@earendil-works/pi-ai";
|
||||
import { registerStorageConformance } from "@earendil-works/pi-durable/testing";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ import { appendFileSync, mkdirSync, rmSync } from "node:fs";
|
|||
import { symlink } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import type { Context, JsonValue } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { BACKGROUND_CONTEXT, withAbortSignal } from "@earendil-works/chord/context";
|
||||
import type { JsonValue } from "@earendil-works/chord/json";
|
||||
import type {
|
||||
ToolDiagnostic,
|
||||
ToolExecutionApi,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from "@earendil-works/chord";
|
||||
import type { Context } from "@earendil-works/chord/context";
|
||||
import { expect, expectTypeOf, it } from "vitest";
|
||||
import { idFromNumber, seqFromNumber } from "../src/ids.ts";
|
||||
import type {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue