@limo-labs/deity 0.1.0-alpha.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/README.md +519 -0
- package/dist/src/component.d.ts +19 -0
- package/dist/src/component.d.ts.map +1 -0
- package/dist/src/component.js +2 -0
- package/dist/src/component.js.map +1 -0
- package/dist/src/context/context-scope.d.ts +24 -0
- package/dist/src/context/context-scope.d.ts.map +1 -0
- package/dist/src/context/context-scope.js +19 -0
- package/dist/src/context/context-scope.js.map +1 -0
- package/dist/src/context/memory-view.d.ts +62 -0
- package/dist/src/context/memory-view.d.ts.map +1 -0
- package/dist/src/context/memory-view.js +104 -0
- package/dist/src/context/memory-view.js.map +1 -0
- package/dist/src/context/scoped-context.d.ts +51 -0
- package/dist/src/context/scoped-context.d.ts.map +1 -0
- package/dist/src/context/scoped-context.js +74 -0
- package/dist/src/context/scoped-context.js.map +1 -0
- package/dist/src/context/scoped-execution-context.d.ts +55 -0
- package/dist/src/context/scoped-execution-context.d.ts.map +1 -0
- package/dist/src/context/scoped-execution-context.js +78 -0
- package/dist/src/context/scoped-execution-context.js.map +1 -0
- package/dist/src/conversation/conversation-manager.d.ts +272 -0
- package/dist/src/conversation/conversation-manager.d.ts.map +1 -0
- package/dist/src/conversation/conversation-manager.js +11 -0
- package/dist/src/conversation/conversation-manager.js.map +1 -0
- package/dist/src/conversation/conversation-pruner.d.ts +190 -0
- package/dist/src/conversation/conversation-pruner.d.ts.map +1 -0
- package/dist/src/conversation/conversation-pruner.js +274 -0
- package/dist/src/conversation/conversation-pruner.js.map +1 -0
- package/dist/src/conversation/conversation-tree.d.ts +185 -0
- package/dist/src/conversation/conversation-tree.d.ts.map +1 -0
- package/dist/src/conversation/conversation-tree.js +288 -0
- package/dist/src/conversation/conversation-tree.js.map +1 -0
- package/dist/src/conversation/file-conversation-store.d.ts +93 -0
- package/dist/src/conversation/file-conversation-store.d.ts.map +1 -0
- package/dist/src/conversation/file-conversation-store.js +284 -0
- package/dist/src/conversation/file-conversation-store.js.map +1 -0
- package/dist/src/conversation/in-memory-conversation-store.d.ts +36 -0
- package/dist/src/conversation/in-memory-conversation-store.d.ts.map +1 -0
- package/dist/src/conversation/in-memory-conversation-store.js +146 -0
- package/dist/src/conversation/in-memory-conversation-store.js.map +1 -0
- package/dist/src/copilot-adapter.d.ts +33 -0
- package/dist/src/copilot-adapter.d.ts.map +1 -0
- package/dist/src/copilot-adapter.js +119 -0
- package/dist/src/copilot-adapter.js.map +1 -0
- package/dist/src/file-trace-enhanced.d.ts +123 -0
- package/dist/src/file-trace-enhanced.d.ts.map +1 -0
- package/dist/src/file-trace-enhanced.js +177 -0
- package/dist/src/file-trace-enhanced.js.map +1 -0
- package/dist/src/file-trace.d.ts +24 -0
- package/dist/src/file-trace.d.ts.map +1 -0
- package/dist/src/file-trace.js +60 -0
- package/dist/src/file-trace.js.map +1 -0
- package/dist/src/index.d.ts +63 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +40 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/json-store.d.ts +27 -0
- package/dist/src/json-store.d.ts.map +1 -0
- package/dist/src/json-store.js +93 -0
- package/dist/src/json-store.js.map +1 -0
- package/dist/src/llm.d.ts +35 -0
- package/dist/src/llm.d.ts.map +1 -0
- package/dist/src/llm.js +2 -0
- package/dist/src/llm.js.map +1 -0
- package/dist/src/memory/cold-storage.d.ts +60 -0
- package/dist/src/memory/cold-storage.d.ts.map +1 -0
- package/dist/src/memory/cold-storage.js +132 -0
- package/dist/src/memory/cold-storage.js.map +1 -0
- package/dist/src/memory/compression.d.ts +161 -0
- package/dist/src/memory/compression.d.ts.map +1 -0
- package/dist/src/memory/compression.js +193 -0
- package/dist/src/memory/compression.js.map +1 -0
- package/dist/src/memory/hot-memory.d.ts +69 -0
- package/dist/src/memory/hot-memory.d.ts.map +1 -0
- package/dist/src/memory/hot-memory.js +116 -0
- package/dist/src/memory/hot-memory.js.map +1 -0
- package/dist/src/memory/memory-budget.d.ts +162 -0
- package/dist/src/memory/memory-budget.d.ts.map +1 -0
- package/dist/src/memory/memory-budget.js +241 -0
- package/dist/src/memory/memory-budget.js.map +1 -0
- package/dist/src/memory/memory-config.d.ts +419 -0
- package/dist/src/memory/memory-config.d.ts.map +1 -0
- package/dist/src/memory/memory-config.js +297 -0
- package/dist/src/memory/memory-config.js.map +1 -0
- package/dist/src/memory/prefetcher.d.ts +137 -0
- package/dist/src/memory/prefetcher.d.ts.map +1 -0
- package/dist/src/memory/prefetcher.js +186 -0
- package/dist/src/memory/prefetcher.js.map +1 -0
- package/dist/src/memory/tiered-memory.d.ts +116 -0
- package/dist/src/memory/tiered-memory.d.ts.map +1 -0
- package/dist/src/memory/tiered-memory.js +215 -0
- package/dist/src/memory/tiered-memory.js.map +1 -0
- package/dist/src/memory/warm-storage.d.ts +74 -0
- package/dist/src/memory/warm-storage.d.ts.map +1 -0
- package/dist/src/memory/warm-storage.js +207 -0
- package/dist/src/memory/warm-storage.js.map +1 -0
- package/dist/src/openai-adapter.d.ts +20 -0
- package/dist/src/openai-adapter.d.ts.map +1 -0
- package/dist/src/openai-adapter.js +73 -0
- package/dist/src/openai-adapter.js.map +1 -0
- package/dist/src/parser.d.ts +27 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +76 -0
- package/dist/src/parser.js.map +1 -0
- package/dist/src/runtime.d.ts +172 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +436 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/schema-utils.d.ts +7 -0
- package/dist/src/schema-utils.d.ts.map +1 -0
- package/dist/src/schema-utils.js +71 -0
- package/dist/src/schema-utils.js.map +1 -0
- package/dist/src/stage.d.ts +139 -0
- package/dist/src/stage.d.ts.map +1 -0
- package/dist/src/stage.js +2 -0
- package/dist/src/stage.js.map +1 -0
- package/dist/src/store.d.ts +51 -0
- package/dist/src/store.d.ts.map +1 -0
- package/dist/src/store.js +2 -0
- package/dist/src/store.js.map +1 -0
- package/dist/src/tool.d.ts +12 -0
- package/dist/src/tool.d.ts.map +1 -0
- package/dist/src/tool.js +2 -0
- package/dist/src/tool.js.map +1 -0
- package/dist/src/trace.d.ts +60 -0
- package/dist/src/trace.d.ts.map +1 -0
- package/dist/src/trace.js +2 -0
- package/dist/src/trace.js.map +1 -0
- package/dist/src/validator.d.ts +17 -0
- package/dist/src/validator.d.ts.map +1 -0
- package/dist/src/validator.js +21 -0
- package/dist/src/validator.js.map +1 -0
- package/dist/src/workflow.d.ts +192 -0
- package/dist/src/workflow.d.ts.map +1 -0
- package/dist/src/workflow.js +50 -0
- package/dist/src/workflow.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TraceEntry, TraceLogger } from "./trace.js";
|
|
2
|
+
/**
|
|
3
|
+
* File-based append-only trace logger.
|
|
4
|
+
* Writes JSON lines (one JSON object per line) for easy streaming and parsing.
|
|
5
|
+
*/
|
|
6
|
+
export declare class FileTraceLogger implements TraceLogger {
|
|
7
|
+
private entries;
|
|
8
|
+
private filePath;
|
|
9
|
+
private stream;
|
|
10
|
+
constructor(filePath: string);
|
|
11
|
+
log(entry: Omit<TraceEntry, "timestamp">): void;
|
|
12
|
+
getEntries(): TraceEntry[];
|
|
13
|
+
flush(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* In-memory trace logger for testing.
|
|
17
|
+
*/
|
|
18
|
+
export declare class InMemoryTraceLogger implements TraceLogger {
|
|
19
|
+
private entries;
|
|
20
|
+
log(entry: Omit<TraceEntry, "timestamp">): void;
|
|
21
|
+
getEntries(): TraceEntry[];
|
|
22
|
+
flush(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=file-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-trace.d.ts","sourceRoot":"","sources":["../../src/file-trace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D;;;GAGG;AACH,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAiB;gBAEnB,QAAQ,EAAE,MAAM;IAW5B,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,IAAI;IAS/C,UAAU,IAAI,UAAU,EAAE;IAIpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B;AAED;;GAEG;AACH,qBAAa,mBAAoB,YAAW,WAAW;IACrD,OAAO,CAAC,OAAO,CAAoB;IAEnC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,IAAI;IAO/C,UAAU,IAAI,UAAU,EAAE;IAIpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
/**
|
|
3
|
+
* File-based append-only trace logger.
|
|
4
|
+
* Writes JSON lines (one JSON object per line) for easy streaming and parsing.
|
|
5
|
+
*/
|
|
6
|
+
export class FileTraceLogger {
|
|
7
|
+
entries = [];
|
|
8
|
+
filePath;
|
|
9
|
+
stream;
|
|
10
|
+
constructor(filePath) {
|
|
11
|
+
this.filePath = filePath;
|
|
12
|
+
const dir = filePath.substring(0, filePath.lastIndexOf("/") === -1
|
|
13
|
+
? filePath.lastIndexOf("\\")
|
|
14
|
+
: filePath.lastIndexOf("/"));
|
|
15
|
+
if (dir) {
|
|
16
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
this.stream = fs.createWriteStream(filePath, { flags: "a" });
|
|
19
|
+
}
|
|
20
|
+
log(entry) {
|
|
21
|
+
const full = {
|
|
22
|
+
...entry,
|
|
23
|
+
timestamp: new Date().toISOString(),
|
|
24
|
+
};
|
|
25
|
+
this.entries.push(full);
|
|
26
|
+
this.stream.write(JSON.stringify(full) + "\n");
|
|
27
|
+
}
|
|
28
|
+
getEntries() {
|
|
29
|
+
return [...this.entries];
|
|
30
|
+
}
|
|
31
|
+
async flush() {
|
|
32
|
+
return new Promise((resolve, reject) => {
|
|
33
|
+
this.stream.end((err) => {
|
|
34
|
+
if (err)
|
|
35
|
+
reject(err);
|
|
36
|
+
else
|
|
37
|
+
resolve();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* In-memory trace logger for testing.
|
|
44
|
+
*/
|
|
45
|
+
export class InMemoryTraceLogger {
|
|
46
|
+
entries = [];
|
|
47
|
+
log(entry) {
|
|
48
|
+
this.entries.push({
|
|
49
|
+
...entry,
|
|
50
|
+
timestamp: new Date().toISOString(),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getEntries() {
|
|
54
|
+
return [...this.entries];
|
|
55
|
+
}
|
|
56
|
+
async flush() {
|
|
57
|
+
// no-op for in-memory
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=file-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-trace.js","sourceRoot":"","sources":["../../src/file-trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B;;;GAGG;AACH,MAAM,OAAO,eAAe;IAClB,OAAO,GAAiB,EAAE,CAAC;IAC3B,QAAQ,CAAS;IACjB,MAAM,CAAiB;IAE/B,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChE,CAAC,CAAC,QAAQ,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,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;IAED,UAAU;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,KAAK;QACT,sBAAsB;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type { Message, ValidationResult } from "./component.js";
|
|
2
|
+
export type { AgentComponent, ExecutionContext } from "./stage.js";
|
|
3
|
+
export type { Tool } from "./tool.js";
|
|
4
|
+
export type { LLMAdapter, LLMResponse, GenerationConfig, ToolCall } from "./llm.js";
|
|
5
|
+
export type { StateStore, StageRecord } from "./store.js";
|
|
6
|
+
export type { TraceLogger, TraceEntry, TraceMemoryStats, TracePerformanceMetrics } from "./trace.js";
|
|
7
|
+
export type { MemoryConfig, HotMemoryConfig, WarmStorageConfig, ColdStorageConfig, DeepPartial, } from "./memory/memory-config.js";
|
|
8
|
+
export type { TieredMemoryConfig, MemoryStats } from "./memory/tiered-memory.js";
|
|
9
|
+
export type { HotMemoryStats } from "./memory/hot-memory.js";
|
|
10
|
+
export type { WarmStorageStats } from "./memory/warm-storage.js";
|
|
11
|
+
export type { ColdStorageStats } from "./memory/cold-storage.js";
|
|
12
|
+
export type { PrefetchHint } from "./memory/prefetcher.js";
|
|
13
|
+
export type { CompressionAdapter, CompressionAlgorithm, } from "./memory/compression.js";
|
|
14
|
+
export type { MemoryBudgetConfig, MemoryUsage, } from "./memory/memory-budget.js";
|
|
15
|
+
export { TieredMemoryManager } from "./memory/tiered-memory.js";
|
|
16
|
+
export { HotMemory } from "./memory/hot-memory.js";
|
|
17
|
+
export { WarmStorage } from "./memory/warm-storage.js";
|
|
18
|
+
export { ColdStorage } from "./memory/cold-storage.js";
|
|
19
|
+
export { MemoryPrefetcher } from "./memory/prefetcher.js";
|
|
20
|
+
export { GzipCompression, LZ4Compression, NoCompression, createCompressionAdapter, getAvailableAlgorithms, isCompressionAvailable, } from "./memory/compression.js";
|
|
21
|
+
export { MemoryBudget } from "./memory/memory-budget.js";
|
|
22
|
+
export { MemoryPresets, validateMemoryConfig, mergeMemoryConfig, createMemoryConfig, getDefaultMemoryConfig, createTieredMemoryManager, HotMemoryConfigSchema, WarmStorageConfigSchema, ColdStorageConfigSchema, MemoryConfigSchema, } from "./memory/memory-config.js";
|
|
23
|
+
export type { ContextScope, AccessMode } from "./context/context-scope.js";
|
|
24
|
+
export { isStageVisible, isAccessAllowed } from "./context/context-scope.js";
|
|
25
|
+
export { MemoryView, AccessDeniedError } from "./context/memory-view.js";
|
|
26
|
+
export { ScopedExecutionContext } from "./context/scoped-execution-context.js";
|
|
27
|
+
export type { ConversationManager, ConversationMessage, ConversationQuery, ConversationSnapshot, ConversationStats, MessageMetadata, PruneStrategy, } from "./conversation/conversation-manager.js";
|
|
28
|
+
export { FileConversationStore } from "./conversation/file-conversation-store.js";
|
|
29
|
+
export { InMemoryConversationStore } from "./conversation/in-memory-conversation-store.js";
|
|
30
|
+
export { ConversationPruner } from "./conversation/conversation-pruner.js";
|
|
31
|
+
export { ConversationTree } from "./conversation/conversation-tree.js";
|
|
32
|
+
export type { ConversationBranch } from "./conversation/conversation-tree.js";
|
|
33
|
+
export { runWorkflow, defineWorkflow, StageFailedError, ScopeViolationError } from "./runtime.js";
|
|
34
|
+
export type { Workflow, WorkflowConfig } from "./runtime.js";
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `runWorkflow()` instead. Will be removed in v3.0.0.
|
|
37
|
+
*/
|
|
38
|
+
export { runPipeline } from "./runtime.js";
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `definePipeline()` instead. Will be removed in v3.0.0.
|
|
41
|
+
*/
|
|
42
|
+
export { definePipeline } from "./runtime.js";
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `Workflow` type instead. Will be removed in v3.0.0.
|
|
45
|
+
*/
|
|
46
|
+
export type { Pipeline } from "./runtime.js";
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Use `WorkflowConfig` type instead. Will be removed in v3.0.0.
|
|
49
|
+
*/
|
|
50
|
+
export type { PipelineConfig } from "./runtime.js";
|
|
51
|
+
export { JsonFileStore, hashPrompt } from "./json-store.js";
|
|
52
|
+
export { FileTraceLogger, InMemoryTraceLogger } from "./file-trace.js";
|
|
53
|
+
export { EnhancedTraceLogger, createEnhancedLogger } from "./file-trace-enhanced.js";
|
|
54
|
+
export type { EnhancedTraceOptions } from "./file-trace-enhanced.js";
|
|
55
|
+
export { parseOutput, extractJSON } from "./parser.js";
|
|
56
|
+
export type { ParseResult } from "./parser.js";
|
|
57
|
+
export { validateSchema, formatZodError } from "./validator.js";
|
|
58
|
+
export { OpenAIAdapter } from "./openai-adapter.js";
|
|
59
|
+
export type { OpenAIAdapterConfig } from "./openai-adapter.js";
|
|
60
|
+
export { CopilotAdapter } from "./copilot-adapter.js";
|
|
61
|
+
export type { CopilotAdapterConfig } from "./copilot-adapter.js";
|
|
62
|
+
export { zodToJsonSchema } from "./schema-utils.js";
|
|
63
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnE,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAGrG,YAAY,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB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Ac,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { TieredMemoryManager } from "./memory/tiered-memory.js";
|
|
2
|
+
export { HotMemory } from "./memory/hot-memory.js";
|
|
3
|
+
export { WarmStorage } from "./memory/warm-storage.js";
|
|
4
|
+
export { ColdStorage } from "./memory/cold-storage.js";
|
|
5
|
+
export { MemoryPrefetcher } from "./memory/prefetcher.js";
|
|
6
|
+
export { GzipCompression, LZ4Compression, NoCompression, createCompressionAdapter, getAvailableAlgorithms, isCompressionAvailable, } from "./memory/compression.js";
|
|
7
|
+
export { MemoryBudget } from "./memory/memory-budget.js";
|
|
8
|
+
export { MemoryPresets, validateMemoryConfig, mergeMemoryConfig, createMemoryConfig, getDefaultMemoryConfig, createTieredMemoryManager, HotMemoryConfigSchema, WarmStorageConfigSchema, ColdStorageConfigSchema, MemoryConfigSchema, } from "./memory/memory-config.js";
|
|
9
|
+
export { isStageVisible, isAccessAllowed } from "./context/context-scope.js";
|
|
10
|
+
export { MemoryView, AccessDeniedError } from "./context/memory-view.js";
|
|
11
|
+
export { ScopedExecutionContext } from "./context/scoped-execution-context.js";
|
|
12
|
+
export { FileConversationStore } from "./conversation/file-conversation-store.js";
|
|
13
|
+
export { InMemoryConversationStore } from "./conversation/in-memory-conversation-store.js";
|
|
14
|
+
export { ConversationPruner } from "./conversation/conversation-pruner.js";
|
|
15
|
+
export { ConversationTree } from "./conversation/conversation-tree.js";
|
|
16
|
+
// Runtime - New terminology (v2.0+)
|
|
17
|
+
export { runWorkflow, defineWorkflow, StageFailedError, ScopeViolationError } from "./runtime.js";
|
|
18
|
+
// Runtime - Deprecated terminology (v1.x, will be removed in v3.0)
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use `runWorkflow()` instead. Will be removed in v3.0.0.
|
|
21
|
+
*/
|
|
22
|
+
export { runPipeline } from "./runtime.js";
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use `definePipeline()` instead. Will be removed in v3.0.0.
|
|
25
|
+
*/
|
|
26
|
+
export { definePipeline } from "./runtime.js";
|
|
27
|
+
// Implementations
|
|
28
|
+
export { JsonFileStore, hashPrompt } from "./json-store.js";
|
|
29
|
+
export { FileTraceLogger, InMemoryTraceLogger } from "./file-trace.js";
|
|
30
|
+
export { EnhancedTraceLogger, createEnhancedLogger } from "./file-trace-enhanced.js";
|
|
31
|
+
// Parser
|
|
32
|
+
export { parseOutput, extractJSON } from "./parser.js";
|
|
33
|
+
// Validator
|
|
34
|
+
export { validateSchema, formatZodError } from "./validator.js";
|
|
35
|
+
// LLM Adapters
|
|
36
|
+
export { OpenAIAdapter } from "./openai-adapter.js";
|
|
37
|
+
export { CopilotAdapter } from "./copilot-adapter.js";
|
|
38
|
+
// Schema utilities
|
|
39
|
+
export { zodToJsonSchema } from "./schema-utils.js";
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,wBA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AAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAe;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { StateStore, StageRecord } from "./store.js";
|
|
2
|
+
/**
|
|
3
|
+
* JSON file-based state store.
|
|
4
|
+
* Each stage gets its own JSON file for crash safety.
|
|
5
|
+
* Uses write-to-temp-then-rename for atomic writes.
|
|
6
|
+
*/
|
|
7
|
+
export declare class JsonFileStore implements StateStore {
|
|
8
|
+
private dir;
|
|
9
|
+
constructor(dir: string);
|
|
10
|
+
private filePath;
|
|
11
|
+
private readRecord;
|
|
12
|
+
private writeRecord;
|
|
13
|
+
hasValidCheckpoint(stageId: string, currentPromptHash: string): Promise<boolean>;
|
|
14
|
+
load(stageId: string): Promise<unknown | undefined>;
|
|
15
|
+
save(stageId: string, output: unknown, metadata: Omit<StageRecord, "stageId" | "status" | "output" | "timestamp">): Promise<void>;
|
|
16
|
+
markFailed(stageId: string, errors: string[], metadata: Omit<StageRecord, "stageId" | "status" | "validationErrors" | "timestamp">): Promise<void>;
|
|
17
|
+
loadAll(): Promise<Record<string, StageRecord>>;
|
|
18
|
+
clear(stageId: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Compute SHA-256 hash of prompt messages for cache invalidation.
|
|
22
|
+
*/
|
|
23
|
+
export declare function hashPrompt(messages: Array<{
|
|
24
|
+
role: string;
|
|
25
|
+
content: string;
|
|
26
|
+
}>): string;
|
|
27
|
+
//# sourceMappingURL=json-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-store.d.ts","sourceRoot":"","sources":["../../src/json-store.ts"],"names":[],"mappings":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* JSON file-based state store.
|
|
6
|
+
* Each stage gets its own JSON file for crash safety.
|
|
7
|
+
* Uses write-to-temp-then-rename for atomic writes.
|
|
8
|
+
*/
|
|
9
|
+
export class JsonFileStore {
|
|
10
|
+
dir;
|
|
11
|
+
constructor(dir) {
|
|
12
|
+
this.dir = dir;
|
|
13
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
14
|
+
}
|
|
15
|
+
filePath(stageId) {
|
|
16
|
+
return path.join(this.dir, `${stageId}.json`);
|
|
17
|
+
}
|
|
18
|
+
readRecord(stageId) {
|
|
19
|
+
const fp = this.filePath(stageId);
|
|
20
|
+
if (!fs.existsSync(fp))
|
|
21
|
+
return undefined;
|
|
22
|
+
const raw = fs.readFileSync(fp, "utf-8");
|
|
23
|
+
return JSON.parse(raw);
|
|
24
|
+
}
|
|
25
|
+
writeRecord(record) {
|
|
26
|
+
const fp = this.filePath(record.stageId);
|
|
27
|
+
const tmp = fp + ".tmp";
|
|
28
|
+
fs.writeFileSync(tmp, JSON.stringify(record, null, 2), "utf-8");
|
|
29
|
+
fs.renameSync(tmp, fp);
|
|
30
|
+
}
|
|
31
|
+
async hasValidCheckpoint(stageId, currentPromptHash) {
|
|
32
|
+
const record = this.readRecord(stageId);
|
|
33
|
+
if (!record)
|
|
34
|
+
return false;
|
|
35
|
+
if (record.status !== "completed")
|
|
36
|
+
return false;
|
|
37
|
+
if (record.promptHash !== currentPromptHash)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
async load(stageId) {
|
|
42
|
+
const record = this.readRecord(stageId);
|
|
43
|
+
if (!record || record.status !== "completed")
|
|
44
|
+
return undefined;
|
|
45
|
+
return record.output;
|
|
46
|
+
}
|
|
47
|
+
async save(stageId, output, metadata) {
|
|
48
|
+
const record = {
|
|
49
|
+
stageId,
|
|
50
|
+
status: "completed",
|
|
51
|
+
output,
|
|
52
|
+
timestamp: new Date().toISOString(),
|
|
53
|
+
...metadata,
|
|
54
|
+
};
|
|
55
|
+
this.writeRecord(record);
|
|
56
|
+
}
|
|
57
|
+
async markFailed(stageId, errors, metadata) {
|
|
58
|
+
const record = {
|
|
59
|
+
stageId,
|
|
60
|
+
status: "failed",
|
|
61
|
+
validationErrors: errors,
|
|
62
|
+
timestamp: new Date().toISOString(),
|
|
63
|
+
...metadata,
|
|
64
|
+
};
|
|
65
|
+
this.writeRecord(record);
|
|
66
|
+
}
|
|
67
|
+
async loadAll() {
|
|
68
|
+
const result = {};
|
|
69
|
+
if (!fs.existsSync(this.dir))
|
|
70
|
+
return result;
|
|
71
|
+
const files = fs.readdirSync(this.dir).filter((f) => f.endsWith(".json"));
|
|
72
|
+
for (const file of files) {
|
|
73
|
+
const raw = fs.readFileSync(path.join(this.dir, file), "utf-8");
|
|
74
|
+
const record = JSON.parse(raw);
|
|
75
|
+
result[record.stageId] = record;
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
async clear(stageId) {
|
|
80
|
+
const fp = this.filePath(stageId);
|
|
81
|
+
if (fs.existsSync(fp)) {
|
|
82
|
+
fs.unlinkSync(fp);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Compute SHA-256 hash of prompt messages for cache invalidation.
|
|
88
|
+
*/
|
|
89
|
+
export function hashPrompt(messages) {
|
|
90
|
+
const data = JSON.stringify(messages);
|
|
91
|
+
return crypto.createHash("sha256").update(data).digest("hex");
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=json-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-store.js","sourceRoot":"","sources":["../../src/json-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAGtC;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAChB,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,EAAE,CAAC;YACzB,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAgB,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;QAClC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAe;QACzB,MAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;YACtB,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,QAAkD;IAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Message } from "./component.js";
|
|
2
|
+
import type { Tool } from "./tool.js";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for LLM generation.
|
|
5
|
+
*/
|
|
6
|
+
export interface GenerationConfig {
|
|
7
|
+
temperature?: number;
|
|
8
|
+
maxTokens?: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A tool call requested by the LLM.
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolCall {
|
|
15
|
+
id: string;
|
|
16
|
+
toolName: string;
|
|
17
|
+
arguments: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Structured response from the LLM.
|
|
21
|
+
* Carries both text content and optional tool calls.
|
|
22
|
+
*/
|
|
23
|
+
export interface LLMResponse {
|
|
24
|
+
content: string;
|
|
25
|
+
toolCalls?: ToolCall[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Abstract LLM adapter interface.
|
|
29
|
+
* Implementations wrap specific model APIs (OpenAI, Anthropic, etc.).
|
|
30
|
+
* Runtime treats LLM as opaque computation.
|
|
31
|
+
*/
|
|
32
|
+
export interface LLMAdapter {
|
|
33
|
+
generate(messages: Message[], tools?: Tool[], config?: GenerationConfig): Promise<LLMResponse>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=llm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/llm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CACN,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,CAAC,EAAE,IAAI,EAAE,EACd,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,WAAW,CAAC,CAAC;CACzB"}
|
package/dist/src/llm.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../../src/llm.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for cold storage (uncompressed disk archive).
|
|
3
|
+
*/
|
|
4
|
+
export interface ColdStorageConfig {
|
|
5
|
+
/** Directory for cold archive files (default: .deity/archive) */
|
|
6
|
+
directory?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Statistics for cold storage usage.
|
|
10
|
+
*/
|
|
11
|
+
export interface ColdStorageStats {
|
|
12
|
+
fileCount: number;
|
|
13
|
+
totalSize: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Cold storage layer using regular JSON files on disk.
|
|
17
|
+
* No size limit - intended for long-term archive.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ColdStorage {
|
|
20
|
+
private config;
|
|
21
|
+
constructor(config?: ColdStorageConfig);
|
|
22
|
+
/**
|
|
23
|
+
* Initialize cold storage directory.
|
|
24
|
+
*/
|
|
25
|
+
init(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Get a value from cold storage.
|
|
28
|
+
* Returns undefined if not found.
|
|
29
|
+
*/
|
|
30
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Set a value in cold storage.
|
|
33
|
+
*/
|
|
34
|
+
set<T>(key: string, value: T): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if a key exists in cold storage.
|
|
37
|
+
*/
|
|
38
|
+
has(key: string): Promise<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Delete a value from cold storage.
|
|
41
|
+
*/
|
|
42
|
+
delete(key: string): Promise<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Clear all files from cold storage.
|
|
45
|
+
*/
|
|
46
|
+
clear(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Get statistics about cold storage usage.
|
|
49
|
+
*/
|
|
50
|
+
stats(): Promise<ColdStorageStats>;
|
|
51
|
+
/**
|
|
52
|
+
* List all keys in cold storage.
|
|
53
|
+
*/
|
|
54
|
+
listKeys(): Promise<string[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Get file path for a key.
|
|
57
|
+
*/
|
|
58
|
+
private getFilePath;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=cold-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cold-storage.d.ts","sourceRoot":"","sources":["../../../src/memory/cold-storage.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAA8B;gBAEhC,MAAM,GAAE,iBAAsB;IAO1C;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;OAGG;IACG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAYjD;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAelD;;OAEG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUxC;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW3C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAsBxC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAWnC;;OAEG;IACH,OAAO,CAAC,WAAW;CAKpB"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import { join, dirname } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Cold storage layer using regular JSON files on disk.
|
|
5
|
+
* No size limit - intended for long-term archive.
|
|
6
|
+
*/
|
|
7
|
+
export class ColdStorage {
|
|
8
|
+
config;
|
|
9
|
+
constructor(config = {}) {
|
|
10
|
+
this.config = {
|
|
11
|
+
directory: config.directory ?? join(process.cwd(), ".deity", "archive"),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Initialize cold storage directory.
|
|
16
|
+
*/
|
|
17
|
+
async init() {
|
|
18
|
+
await fs.mkdir(this.config.directory, { recursive: true });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get a value from cold storage.
|
|
22
|
+
* Returns undefined if not found.
|
|
23
|
+
*/
|
|
24
|
+
async get(key) {
|
|
25
|
+
const filePath = this.getFilePath(key);
|
|
26
|
+
try {
|
|
27
|
+
const json = await fs.readFile(filePath, "utf-8");
|
|
28
|
+
return JSON.parse(json);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// File doesn't exist or is corrupted
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Set a value in cold storage.
|
|
37
|
+
*/
|
|
38
|
+
async set(key, value) {
|
|
39
|
+
const filePath = this.getFilePath(key);
|
|
40
|
+
// Ensure directory exists
|
|
41
|
+
await fs.mkdir(dirname(filePath), { recursive: true });
|
|
42
|
+
// Write JSON
|
|
43
|
+
const json = JSON.stringify(value, null, 2);
|
|
44
|
+
// Write atomically (write to temp file, then rename)
|
|
45
|
+
const tempPath = `${filePath}.tmp`;
|
|
46
|
+
await fs.writeFile(tempPath, json, "utf-8");
|
|
47
|
+
await fs.rename(tempPath, filePath);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a key exists in cold storage.
|
|
51
|
+
*/
|
|
52
|
+
async has(key) {
|
|
53
|
+
const filePath = this.getFilePath(key);
|
|
54
|
+
try {
|
|
55
|
+
await fs.access(filePath);
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete a value from cold storage.
|
|
64
|
+
*/
|
|
65
|
+
async delete(key) {
|
|
66
|
+
const filePath = this.getFilePath(key);
|
|
67
|
+
try {
|
|
68
|
+
await fs.unlink(filePath);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Clear all files from cold storage.
|
|
77
|
+
*/
|
|
78
|
+
async clear() {
|
|
79
|
+
try {
|
|
80
|
+
await fs.rm(this.config.directory, { recursive: true, force: true });
|
|
81
|
+
await fs.mkdir(this.config.directory, { recursive: true });
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Directory might not exist yet
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get statistics about cold storage usage.
|
|
89
|
+
*/
|
|
90
|
+
async stats() {
|
|
91
|
+
let fileCount = 0;
|
|
92
|
+
let totalSize = 0;
|
|
93
|
+
try {
|
|
94
|
+
const files = await fs.readdir(this.config.directory);
|
|
95
|
+
for (const file of files) {
|
|
96
|
+
if (file.endsWith(".json")) {
|
|
97
|
+
const filePath = join(this.config.directory, file);
|
|
98
|
+
const stat = await fs.stat(filePath);
|
|
99
|
+
fileCount++;
|
|
100
|
+
totalSize += stat.size;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Directory might not exist yet
|
|
106
|
+
}
|
|
107
|
+
return { fileCount, totalSize };
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* List all keys in cold storage.
|
|
111
|
+
*/
|
|
112
|
+
async listKeys() {
|
|
113
|
+
try {
|
|
114
|
+
const files = await fs.readdir(this.config.directory);
|
|
115
|
+
return files
|
|
116
|
+
.filter((file) => file.endsWith(".json"))
|
|
117
|
+
.map((file) => file.replace(".json", ""));
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get file path for a key.
|
|
125
|
+
*/
|
|
126
|
+
getFilePath(key) {
|
|
127
|
+
// Sanitize key to be filesystem-safe
|
|
128
|
+
const safeKey = key.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
129
|
+
return join(this.config.directory, `${safeKey}.json`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=cold-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cold-storage.js","sourceRoot":"","sources":["../../../src/memory/cold-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkB1C;;;GAGG;AACH,MAAM,OAAO,WAAW;IACd,MAAM,CAA8B;IAE5C,YAAY,SAA4B,EAAE;QACxC,IAAI,CAAC,MAAM,GAAG;YACZ,SAAS,EACP,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC;SAC/D,CAAC;IACJ,CAAC;IAED;;OAEG;IAC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