@h-rig/memory-plugin 0.0.6-alpha.156

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.
@@ -0,0 +1,27 @@
1
+ import { nativeWriteTreeCommit } from "@rig/runtime/control-plane/native/git-native";
2
+ import { applyMemoryEvent, hasMemoryEvent, openMemoryDb } from "./db";
3
+ import { embedChangedMemoryItems } from "./embed";
4
+ import { readCanonicalMemoryDb } from "./read";
5
+ import type { MemoryEventInput, MemoryEmbedder } from "@rig/contracts";
6
+ type Awaitable<T> = T | Promise<T>;
7
+ type CanonicalMemoryWriteDeps = {
8
+ readCanonicalMemoryDb: typeof readCanonicalMemoryDb;
9
+ openMemoryDb: typeof openMemoryDb;
10
+ applyMemoryEvent: typeof applyMemoryEvent;
11
+ hasMemoryEvent: typeof hasMemoryEvent;
12
+ embedChangedMemoryItems: typeof embedChangedMemoryItems;
13
+ writeTreeCommit: typeof nativeWriteTreeCommit;
14
+ pushRefWithLease: (repoPath: string, localOid: string, remoteRef: string, expectedOldOid: string, remote?: string) => Awaitable<string>;
15
+ };
16
+ export type PromoteCanonicalMemoryInput = {
17
+ event: MemoryEventInput;
18
+ embedder?: MemoryEmbedder;
19
+ message?: string;
20
+ };
21
+ export type PromoteCanonicalMemoryResult = {
22
+ outcome: "applied";
23
+ baseOid: string;
24
+ commitOid: string;
25
+ };
26
+ export declare function promoteCanonicalMemoryEvent(projectRoot: string, input: PromoteCanonicalMemoryInput, deps?: Partial<CanonicalMemoryWriteDeps>): Promise<PromoteCanonicalMemoryResult>;
27
+ export {};