@scitrera/memorylayer-sdk 0.0.3
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 +374 -0
- package/dist/client.d.ts +75 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +371 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +43 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +410 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +97 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +20 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +51 -0
- package/dist/utils.js.map +1 -0
- package/package.json +45 -0
- package/vitest.config.ts +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
# MemoryLayer TypeScript SDK
|
|
2
|
+
|
|
3
|
+
TypeScript/JavaScript SDK for [MemoryLayer.ai](https://memorylayer.ai) - memory infrastructure for AI agents.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @scitrera/memorylayer-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { MemoryLayerClient, MemoryType } from "@scitrera/memorylayer-sdk";
|
|
15
|
+
|
|
16
|
+
const client = new MemoryLayerClient({
|
|
17
|
+
baseUrl: "http://localhost:61001", // Optional, this is the default
|
|
18
|
+
apiKey: "your-api-key", // Optional for local development
|
|
19
|
+
workspaceId: "my-workspace",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Store a memory
|
|
23
|
+
const memory = await client.remember("User prefers dark mode", {
|
|
24
|
+
type: MemoryType.SEMANTIC,
|
|
25
|
+
importance: 0.8,
|
|
26
|
+
tags: ["preference", "ui"],
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Recall memories
|
|
30
|
+
const result = await client.recall("What are the user's UI preferences?", {
|
|
31
|
+
limit: 5,
|
|
32
|
+
minRelevance: 0.7,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
console.log(result.memories);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Full TypeScript Support** - Complete type definitions included
|
|
41
|
+
- **Memory Operations** - Remember, recall, reflect, forget, decay
|
|
42
|
+
- **Relationship Graph** - Link memories with 60+ typed relationships
|
|
43
|
+
- **Session Management** - Working memory with TTL and commit
|
|
44
|
+
- **Batch Operations** - Bulk create, update, delete
|
|
45
|
+
- **Graph Traversal** - Multi-hop relationship queries
|
|
46
|
+
- **Error Handling** - Typed exception hierarchy
|
|
47
|
+
|
|
48
|
+
## Core Memory Operations
|
|
49
|
+
|
|
50
|
+
### Remember (Store)
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// Basic storage
|
|
54
|
+
const memory = await client.remember("Fixed authentication bug in login flow");
|
|
55
|
+
|
|
56
|
+
// With options
|
|
57
|
+
const memory = await client.remember("Implemented retry logic with exponential backoff", {
|
|
58
|
+
type: MemoryType.PROCEDURAL,
|
|
59
|
+
subtype: MemorySubtype.CODE_PATTERN,
|
|
60
|
+
importance: 0.9,
|
|
61
|
+
tags: ["retry", "error-handling"],
|
|
62
|
+
metadata: {
|
|
63
|
+
file: "src/api/client.ts",
|
|
64
|
+
author: "alice@example.com",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Recall (Retrieve)
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// Simple recall
|
|
73
|
+
const result = await client.recall("How do we handle retries?");
|
|
74
|
+
|
|
75
|
+
// Advanced recall with filters
|
|
76
|
+
const result = await client.recall("authentication patterns", {
|
|
77
|
+
types: [MemoryType.PROCEDURAL, MemoryType.SEMANTIC],
|
|
78
|
+
tags: ["auth"],
|
|
79
|
+
limit: 10,
|
|
80
|
+
minRelevance: 0.6,
|
|
81
|
+
includeAssociations: true,
|
|
82
|
+
createdAfter: new Date("2024-01-01"),
|
|
83
|
+
mode: RecallMode.RAG, // or LLM, HYBRID
|
|
84
|
+
detailLevel: DetailLevel.FULL, // or ABSTRACT, OVERVIEW
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Reflect (Synthesize)
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
const reflection = await client.reflect(
|
|
92
|
+
"What patterns have we learned about error handling?",
|
|
93
|
+
{
|
|
94
|
+
maxTokens: 1000,
|
|
95
|
+
depth: 3,
|
|
96
|
+
types: [MemoryType.PROCEDURAL],
|
|
97
|
+
includeSources: true,
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
console.log(reflection.reflection);
|
|
102
|
+
console.log(`Based on ${reflection.source_memories.length} memories`);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Memory Management
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// Get a specific memory
|
|
109
|
+
const memory = await client.getMemory("mem-123");
|
|
110
|
+
|
|
111
|
+
// Update a memory
|
|
112
|
+
const updated = await client.updateMemory("mem-123", {
|
|
113
|
+
importance: 0.95,
|
|
114
|
+
tags: ["critical", "security"],
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Soft delete (archive)
|
|
118
|
+
await client.forget("mem-123");
|
|
119
|
+
|
|
120
|
+
// Hard delete (permanent)
|
|
121
|
+
await client.forget("mem-123", true);
|
|
122
|
+
|
|
123
|
+
// Apply decay to reduce importance
|
|
124
|
+
const decayed = await client.decay("mem-123", 0.1);
|
|
125
|
+
|
|
126
|
+
// Trace memory provenance
|
|
127
|
+
const trace = await client.traceMemory("mem-123");
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Batch Operations
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
const result = await client.batchMemories([
|
|
134
|
+
{ action: "create", memory: { content: "Memory 1", importance: 0.7 } },
|
|
135
|
+
{ action: "create", memory: { content: "Memory 2", importance: 0.8 } },
|
|
136
|
+
{ action: "delete", memory_id: "mem-old", hard: false },
|
|
137
|
+
]);
|
|
138
|
+
|
|
139
|
+
console.log(`Successful: ${result.successful}, Failed: ${result.failed}`);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Associations
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
import { RelationshipType } from "@scitrera/memorylayer-sdk";
|
|
146
|
+
|
|
147
|
+
// Create relationships between memories
|
|
148
|
+
const association = await client.associate(
|
|
149
|
+
"mem-problem-123",
|
|
150
|
+
"mem-solution-456",
|
|
151
|
+
RelationshipType.SOLVES,
|
|
152
|
+
0.9
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// Or use the full options interface
|
|
156
|
+
const association = await client.createAssociation({
|
|
157
|
+
sourceId: "mem-problem-123",
|
|
158
|
+
targetId: "mem-solution-456",
|
|
159
|
+
relationship: RelationshipType.SOLVES,
|
|
160
|
+
strength: 0.9,
|
|
161
|
+
metadata: { verified: true },
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Get all associations for a memory
|
|
165
|
+
const associations = await client.getAssociations("mem-123", "both");
|
|
166
|
+
|
|
167
|
+
// Traverse the knowledge graph
|
|
168
|
+
const result = await client.traverseGraph("mem-123", {
|
|
169
|
+
relationshipTypes: [RelationshipType.CAUSES, RelationshipType.LEADS_TO],
|
|
170
|
+
maxDepth: 3,
|
|
171
|
+
direction: "both",
|
|
172
|
+
minStrength: 0.5,
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Session Management
|
|
177
|
+
|
|
178
|
+
Sessions provide working memory with TTL that can be committed to long-term storage.
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
// Create a session (auto-sets session ID for subsequent requests)
|
|
182
|
+
const { session, briefing } = await client.createSession({
|
|
183
|
+
workspaceId: "my-workspace",
|
|
184
|
+
ttlSeconds: 3600,
|
|
185
|
+
briefing: true, // Get briefing on session start
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// Session ID is automatically included in subsequent requests
|
|
189
|
+
// Or manually manage it:
|
|
190
|
+
client.setSession(session.id);
|
|
191
|
+
console.log(client.getSessionId());
|
|
192
|
+
client.clearSession();
|
|
193
|
+
|
|
194
|
+
// Store working memory on server
|
|
195
|
+
await client.setWorkingMemory(session.id, "current_task", {
|
|
196
|
+
description: "Debugging auth",
|
|
197
|
+
file: "auth.py"
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// Retrieve working memory
|
|
201
|
+
const memory = await client.getWorkingMemory(session.id, "current_task");
|
|
202
|
+
|
|
203
|
+
// Extend session TTL
|
|
204
|
+
const updated = await client.touchSession(session.id);
|
|
205
|
+
|
|
206
|
+
// Commit working memory to long-term storage
|
|
207
|
+
const commitResult = await client.commitSession(session.id, {
|
|
208
|
+
minImportance: 0.5,
|
|
209
|
+
deduplicate: true,
|
|
210
|
+
maxMemories: 50,
|
|
211
|
+
});
|
|
212
|
+
console.log(`Created ${commitResult.memories_created} memories`);
|
|
213
|
+
|
|
214
|
+
// Delete session
|
|
215
|
+
await client.deleteSession(session.id);
|
|
216
|
+
|
|
217
|
+
// Get briefing of recent activity
|
|
218
|
+
const briefing = await client.getBriefing(24, true);
|
|
219
|
+
console.log(briefing.recent_activity_summary);
|
|
220
|
+
console.log(briefing.open_threads);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Workspace Management
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
// Create a workspace
|
|
227
|
+
const workspace = await client.createWorkspace("My Project", {
|
|
228
|
+
embedding_model: "text-embedding-3-small",
|
|
229
|
+
default_importance: 0.5,
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// Get workspace details
|
|
233
|
+
const workspace = await client.getWorkspace("ws-123");
|
|
234
|
+
|
|
235
|
+
// Update workspace
|
|
236
|
+
const updated = await client.updateWorkspace("ws-123", {
|
|
237
|
+
name: "New Name",
|
|
238
|
+
settings: { key: "value" },
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// Get workspace schema (relationship types, memory subtypes)
|
|
242
|
+
const schema = await client.getWorkspaceSchema("ws-123");
|
|
243
|
+
console.log(schema.relationship_types);
|
|
244
|
+
console.log(schema.memory_subtypes);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Types & Enums
|
|
248
|
+
|
|
249
|
+
### MemoryType
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
enum MemoryType {
|
|
253
|
+
EPISODIC = "episodic", // Events and experiences
|
|
254
|
+
SEMANTIC = "semantic", // Facts and knowledge
|
|
255
|
+
PROCEDURAL = "procedural", // How-to knowledge
|
|
256
|
+
WORKING = "working", // Temporary context
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### MemorySubtype
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
enum MemorySubtype {
|
|
264
|
+
SOLUTION = "solution",
|
|
265
|
+
PROBLEM = "problem",
|
|
266
|
+
CODE_PATTERN = "code_pattern",
|
|
267
|
+
FIX = "fix",
|
|
268
|
+
ERROR = "error",
|
|
269
|
+
WORKFLOW = "workflow",
|
|
270
|
+
PREFERENCE = "preference",
|
|
271
|
+
DECISION = "decision",
|
|
272
|
+
PROFILE = "profile",
|
|
273
|
+
ENTITY = "entity",
|
|
274
|
+
EVENT = "event",
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### RecallMode
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
enum RecallMode {
|
|
282
|
+
RAG = "rag", // Vector similarity search
|
|
283
|
+
LLM = "llm", // LLM-powered semantic search
|
|
284
|
+
HYBRID = "hybrid", // Combination of both
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### RelationshipType
|
|
289
|
+
|
|
290
|
+
60+ relationship types across 11 categories. Most commonly used:
|
|
291
|
+
|
|
292
|
+
- **Hierarchical**: `parent_of`, `child_of`, `part_of`, `contains`, `instance_of`, `subtype_of`
|
|
293
|
+
- **Causal**: `causes`, `triggers`, `leads_to`, `prevents`
|
|
294
|
+
- **Solution**: `solves`, `addresses`, `alternative_to`, `improves`
|
|
295
|
+
- **Context**: `occurs_in`, `applies_to`, `works_with`, `requires`
|
|
296
|
+
- **Learning**: `builds_on`, `contradicts`, `confirms`, `supersedes`
|
|
297
|
+
- **Similarity**: `similar_to`, `variant_of`, `related_to`
|
|
298
|
+
- **Workflow**: `follows`, `depends_on`, `enables`, `blocks`
|
|
299
|
+
- **Quality**: `effective_for`, `preferred_over`, `deprecated_by`
|
|
300
|
+
- **Temporal**: `precedes`, `concurrent_with`, `follows_temporally`
|
|
301
|
+
- **Refinement**: `refines`, `abstracts`, `specializes`, `generalizes`
|
|
302
|
+
- **Reference**: `references`, `referenced_by`
|
|
303
|
+
|
|
304
|
+
Use `getWorkspaceSchema()` to list all available types.
|
|
305
|
+
|
|
306
|
+
## Error Handling
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import {
|
|
310
|
+
MemoryLayerError,
|
|
311
|
+
AuthenticationError,
|
|
312
|
+
AuthorizationError,
|
|
313
|
+
NotFoundError,
|
|
314
|
+
ValidationError,
|
|
315
|
+
RateLimitError,
|
|
316
|
+
} from "@scitrera/memorylayer-sdk";
|
|
317
|
+
|
|
318
|
+
try {
|
|
319
|
+
await client.remember("test");
|
|
320
|
+
} catch (error) {
|
|
321
|
+
if (error instanceof AuthenticationError) {
|
|
322
|
+
console.error("Invalid API key");
|
|
323
|
+
} else if (error instanceof AuthorizationError) {
|
|
324
|
+
console.error("Access denied");
|
|
325
|
+
} else if (error instanceof NotFoundError) {
|
|
326
|
+
console.error("Resource not found");
|
|
327
|
+
} else if (error instanceof ValidationError) {
|
|
328
|
+
console.error("Validation failed:", error.details);
|
|
329
|
+
} else if (error instanceof RateLimitError) {
|
|
330
|
+
console.error(`Rate limited. Retry after ${error.retryAfter}s`);
|
|
331
|
+
} else if (error instanceof MemoryLayerError) {
|
|
332
|
+
console.error(`Error ${error.statusCode}: ${error.message}`);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Configuration
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
const client = new MemoryLayerClient({
|
|
341
|
+
baseUrl: "http://localhost:61001", // Default
|
|
342
|
+
apiKey: process.env.MEMORYLAYER_API_KEY,
|
|
343
|
+
workspaceId: process.env.MEMORYLAYER_WORKSPACE_ID,
|
|
344
|
+
sessionId: "optional-session-id", // Auto-include in requests
|
|
345
|
+
timeout: 30000, // Request timeout in ms (default: 30000)
|
|
346
|
+
});
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## Development
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# Install dependencies
|
|
353
|
+
npm install
|
|
354
|
+
|
|
355
|
+
# Build
|
|
356
|
+
npm run build
|
|
357
|
+
|
|
358
|
+
# Run tests
|
|
359
|
+
npm test
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## TypeScript Support
|
|
363
|
+
|
|
364
|
+
This SDK is written in TypeScript and provides full type definitions out of the box. No need for `@types/*` packages.
|
|
365
|
+
|
|
366
|
+
## License
|
|
367
|
+
|
|
368
|
+
Apache 2.0 License - see LICENSE file for details.
|
|
369
|
+
|
|
370
|
+
## Links
|
|
371
|
+
|
|
372
|
+
- [Documentation](https://docs.memorylayer.ai)
|
|
373
|
+
- [GitHub](https://github.com/scitrera/memorylayer)
|
|
374
|
+
- [Homepage](https://memorylayer.ai)
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Memory, RecallResult, ReflectResult, Association, Session, SessionBriefing, Workspace, Context, RememberOptions, RecallOptions, ReflectOptions, ClientConfig, SessionCreateOptions, SessionStartResponse, CommitOptions, CommitResponse, GraphTraverseOptions, GraphQueryResult, BatchOperation, BatchResult, AssociationCreateOptions, WorkspaceSchema, ContextExecOptions, ContextExecResult, ContextInspectOptions, ContextInspectResult, ContextLoadOptions, ContextLoadResult, ContextInjectOptions, ContextInjectResult, ContextQueryOptions, ContextQueryResult, ContextRlmOptions, ContextRlmResult, ContextStatusResult } from "./types.js";
|
|
2
|
+
import { RelationshipType } from "./types.js";
|
|
3
|
+
export declare class MemoryLayerClient {
|
|
4
|
+
private baseUrl;
|
|
5
|
+
private apiKey?;
|
|
6
|
+
private workspaceId?;
|
|
7
|
+
private sessionId?;
|
|
8
|
+
private timeout;
|
|
9
|
+
constructor(config?: ClientConfig);
|
|
10
|
+
/**
|
|
11
|
+
* Set the active session ID. All subsequent requests will include
|
|
12
|
+
* this session ID in the X-Session-ID header, enabling session-based
|
|
13
|
+
* workspace resolution.
|
|
14
|
+
*/
|
|
15
|
+
setSession(sessionId: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Clear the active session ID.
|
|
18
|
+
*/
|
|
19
|
+
clearSession(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the current session ID, if any.
|
|
22
|
+
*/
|
|
23
|
+
getSessionId(): string | undefined;
|
|
24
|
+
private request;
|
|
25
|
+
private handleError;
|
|
26
|
+
remember(content: string, options?: RememberOptions): Promise<Memory>;
|
|
27
|
+
recall(query: string, options?: RecallOptions): Promise<RecallResult>;
|
|
28
|
+
reflect(query: string, options?: ReflectOptions): Promise<ReflectResult>;
|
|
29
|
+
getMemory(memoryId: string): Promise<Memory>;
|
|
30
|
+
updateMemory(memoryId: string, updates: Partial<RememberOptions> & {
|
|
31
|
+
content?: string;
|
|
32
|
+
}): Promise<Memory>;
|
|
33
|
+
forget(memoryId: string, hard?: boolean): Promise<void>;
|
|
34
|
+
decay(memoryId: string, decayRate?: number): Promise<Memory>;
|
|
35
|
+
associate(sourceId: string, targetId: string, relationship: RelationshipType, strength?: number): Promise<Association>;
|
|
36
|
+
getAssociations(memoryId: string, direction?: "outgoing" | "incoming" | "both"): Promise<Association[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a new session.
|
|
39
|
+
*
|
|
40
|
+
* @param options Session creation options
|
|
41
|
+
* @param autoSetSession If true (default), automatically set this session
|
|
42
|
+
* as the active session for subsequent requests
|
|
43
|
+
*/
|
|
44
|
+
createSession(options?: SessionCreateOptions, autoSetSession?: boolean): Promise<SessionStartResponse>;
|
|
45
|
+
getSession(sessionId: string): Promise<Session>;
|
|
46
|
+
deleteSession(sessionId: string): Promise<void>;
|
|
47
|
+
setWorkingMemory(sessionId: string, key: string, value: unknown): Promise<void>;
|
|
48
|
+
getWorkingMemory(sessionId: string, key?: string): Promise<Record<string, unknown>>;
|
|
49
|
+
commitSession(sessionId: string, options?: CommitOptions): Promise<CommitResponse>;
|
|
50
|
+
touchSession(sessionId: string, ttlSeconds?: number): Promise<Session>;
|
|
51
|
+
getBriefing(lookbackHours?: number, includeContradictions?: boolean): Promise<SessionBriefing>;
|
|
52
|
+
createWorkspace(name: string, settings?: Record<string, unknown>): Promise<Workspace>;
|
|
53
|
+
getWorkspace(workspaceId?: string): Promise<Workspace>;
|
|
54
|
+
updateWorkspace(workspaceId: string, updates: {
|
|
55
|
+
name?: string;
|
|
56
|
+
settings?: Record<string, unknown>;
|
|
57
|
+
}): Promise<Workspace>;
|
|
58
|
+
createContext(name: string, description?: string, settings?: Record<string, unknown>): Promise<Context>;
|
|
59
|
+
listContexts(): Promise<Context[]>;
|
|
60
|
+
batchMemories(operations: BatchOperation[]): Promise<BatchResult>;
|
|
61
|
+
traceMemory(memoryId: string): Promise<Record<string, unknown>>;
|
|
62
|
+
traverseGraph(startMemoryId: string, options?: GraphTraverseOptions): Promise<GraphQueryResult>;
|
|
63
|
+
createAssociation(options: AssociationCreateOptions): Promise<Association>;
|
|
64
|
+
getWorkspaceSchema(workspaceId?: string): Promise<WorkspaceSchema>;
|
|
65
|
+
contextExec(code: string, options?: ContextExecOptions): Promise<ContextExecResult>;
|
|
66
|
+
contextInspect(options?: ContextInspectOptions): Promise<ContextInspectResult>;
|
|
67
|
+
contextLoad(varName: string, query: string, options?: ContextLoadOptions): Promise<ContextLoadResult>;
|
|
68
|
+
contextInject(key: string, value: unknown, options?: ContextInjectOptions): Promise<ContextInjectResult>;
|
|
69
|
+
contextQuery(prompt: string, variables: string[], options?: ContextQueryOptions): Promise<ContextQueryResult>;
|
|
70
|
+
contextRlm(goal: string, options?: ContextRlmOptions): Promise<ContextRlmResult>;
|
|
71
|
+
contextStatus(): Promise<ContextStatusResult>;
|
|
72
|
+
contextCleanup(): Promise<void>;
|
|
73
|
+
contextCheckpoint(): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAC1E,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAChF,oBAAoB,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EACzE,oBAAoB,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,EACnE,wBAAwB,EAAE,eAAe,EACzC,kBAAkB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAClF,kBAAkB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAChF,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAC5E,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CA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