@memorymsh/sdk 0.1.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 +104 -0
- package/dist/adapters/crewaiAdapter.d.ts +11 -0
- package/dist/adapters/crewaiAdapter.js +36 -0
- package/dist/adapters/langgraphAdapter.d.ts +13 -0
- package/dist/adapters/langgraphAdapter.js +45 -0
- package/dist/adapters/openaiAgentsMiddleware.d.ts +12 -0
- package/dist/adapters/openaiAgentsMiddleware.js +38 -0
- package/dist/adapters/toolWrapper.d.ts +13 -0
- package/dist/adapters/toolWrapper.js +48 -0
- package/dist/client.d.ts +44 -0
- package/dist/client.js +253 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/types.d.ts +139 -0
- package/dist/types.js +1 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# MemoryMesh TypeScript SDK
|
|
2
|
+
|
|
3
|
+
MemoryMesh gives AI agents durable working memory, inspectable run receipts, checkpoints, and recovery state. Use this SDK from Node, browser apps, agent frameworks, or internal tools.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @memorymsh/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { MemoryMeshClient } from "@memorymsh/sdk";
|
|
15
|
+
|
|
16
|
+
const client = new MemoryMeshClient({
|
|
17
|
+
baseUrl: "https://api-two-blue-75.vercel.app",
|
|
18
|
+
apiKey: process.env.MEMORYMESH_API_KEY,
|
|
19
|
+
defaultMemoryBackend: "cognee_cloud",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const receipt = await client.runAgent({
|
|
23
|
+
agentId: "research",
|
|
24
|
+
task: "Compare durable memory options for coding agents.",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
console.log(receipt.final_output);
|
|
28
|
+
console.log(receipt.memory_operations);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Memory
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
await client.remember({
|
|
35
|
+
text: "The build agent should preserve project constraints before editing.",
|
|
36
|
+
dataset: "agent-lessons",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const matches = await client.recall({
|
|
40
|
+
query: "What should the build agent remember before editing?",
|
|
41
|
+
dataset: "agent-lessons",
|
|
42
|
+
topK: 3,
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Auth
|
|
47
|
+
|
|
48
|
+
The SDK defaults to the production MemoryMesh API header:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
new MemoryMeshClient({
|
|
52
|
+
baseUrl: "https://your-memorymesh-api.example.com",
|
|
53
|
+
apiKey: process.env.MEMORYMESH_API_KEY,
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
For gateways that expect bearer auth:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
new MemoryMeshClient({
|
|
61
|
+
baseUrl: "https://your-memorymesh-api.example.com",
|
|
62
|
+
apiKey: process.env.MEMORYMESH_API_KEY,
|
|
63
|
+
apiKeyHeader: "Authorization",
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Tool Tracing
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { MemoryMeshClient, wrapTool } from "@memorymsh/sdk";
|
|
71
|
+
|
|
72
|
+
const client = new MemoryMeshClient("http://localhost:8000");
|
|
73
|
+
const run = await client.startRun({
|
|
74
|
+
agentId: "support-agent",
|
|
75
|
+
task: "Investigate payment failures.",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const fetchTickets = wrapTool(
|
|
79
|
+
client,
|
|
80
|
+
run.task_id,
|
|
81
|
+
async (status: string) => [{ id: "ticket_1", status }],
|
|
82
|
+
{
|
|
83
|
+
toolName: "fetch_tickets",
|
|
84
|
+
validation: (_args, result) => ({ records: result.length }),
|
|
85
|
+
checkpointAfter: true,
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
await fetchTickets("open");
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Error Handling
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { MemoryMeshError } from "@memorymsh/sdk";
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
await client.memoryStatus("cognee_cloud", true);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
if (error instanceof MemoryMeshError) {
|
|
101
|
+
console.error(error.status, error.detail ?? error.body);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MemoryMeshClient } from "../client.js";
|
|
2
|
+
import type { Json } from "../types.js";
|
|
3
|
+
export declare class MemoryMeshCrewAIAdapter {
|
|
4
|
+
private client;
|
|
5
|
+
private taskId;
|
|
6
|
+
private crewName;
|
|
7
|
+
constructor(client: MemoryMeshClient, taskId: string, crewName?: string);
|
|
8
|
+
wrapTask<TArgs extends unknown[], TResult>(taskName: string, fn: (...args: TArgs) => Promise<TResult> | TResult): (...args: TArgs) => Promise<TResult>;
|
|
9
|
+
wrapTool<TArgs extends unknown[], TResult>(toolName: string, fn: (...args: TArgs) => Promise<TResult> | TResult, toolType?: "read" | "write" | "external_action" | "unknown"): (...args: TArgs) => Promise<TResult>;
|
|
10
|
+
recordHandoff(fromAgent: string, toAgent: string, context: Record<string, Json>): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { wrapTool } from "./toolWrapper.js";
|
|
2
|
+
export class MemoryMeshCrewAIAdapter {
|
|
3
|
+
constructor(client, taskId, crewName = "crew") {
|
|
4
|
+
this.client = client;
|
|
5
|
+
this.taskId = taskId;
|
|
6
|
+
this.crewName = crewName;
|
|
7
|
+
}
|
|
8
|
+
wrapTask(taskName, fn) {
|
|
9
|
+
return async (...args) => {
|
|
10
|
+
await this.client.recordEvent(this.taskId, "plan_prepared", {
|
|
11
|
+
framework: "crewai",
|
|
12
|
+
crew: this.crewName,
|
|
13
|
+
task: taskName,
|
|
14
|
+
});
|
|
15
|
+
const result = await fn(...args);
|
|
16
|
+
await this.client.saveCheckpoint(this.taskId, {
|
|
17
|
+
checkpointName: `${this.crewName}.${taskName}.complete`,
|
|
18
|
+
state: { task: taskName, result: JSON.parse(JSON.stringify(result)) },
|
|
19
|
+
resumeState: { currentStep: `after:${taskName}`, pendingActions: [] },
|
|
20
|
+
metadata: { framework: "crewai", crew: this.crewName, task: taskName },
|
|
21
|
+
});
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
wrapTool(toolName, fn, toolType = "read") {
|
|
26
|
+
return wrapTool(this.client, this.taskId, fn, { toolName, toolType });
|
|
27
|
+
}
|
|
28
|
+
recordHandoff(fromAgent, toAgent, context) {
|
|
29
|
+
return this.client.recordEvent(this.taskId, "task_modified", {
|
|
30
|
+
framework: "crewai",
|
|
31
|
+
crew: this.crewName,
|
|
32
|
+
handoff: { from: fromAgent, to: toAgent },
|
|
33
|
+
context,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MemoryMeshClient } from "../client.js";
|
|
2
|
+
import type { Json } from "../types.js";
|
|
3
|
+
export type GraphState = Record<string, Json>;
|
|
4
|
+
export declare class MemoryMeshLangGraphAdapter {
|
|
5
|
+
private client;
|
|
6
|
+
private taskId;
|
|
7
|
+
private graphName;
|
|
8
|
+
constructor(client: MemoryMeshClient, taskId: string, graphName?: string);
|
|
9
|
+
wrapNode<TState extends GraphState>(nodeName: string, fn: (state: TState) => Promise<TState> | TState): (state: TState) => Promise<TState>;
|
|
10
|
+
restoreState(checkpointId: string): Promise<Record<string, unknown>>;
|
|
11
|
+
recordEdges(edges: string[]): Promise<unknown>;
|
|
12
|
+
}
|
|
13
|
+
export declare const MemoryMeshCheckpointer: typeof MemoryMeshLangGraphAdapter;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export class MemoryMeshLangGraphAdapter {
|
|
2
|
+
constructor(client, taskId, graphName = "langgraph") {
|
|
3
|
+
this.client = client;
|
|
4
|
+
this.taskId = taskId;
|
|
5
|
+
this.graphName = graphName;
|
|
6
|
+
}
|
|
7
|
+
wrapNode(nodeName, fn) {
|
|
8
|
+
return async (state) => {
|
|
9
|
+
await this.client.recordEvent(this.taskId, "tool_execution_started", {
|
|
10
|
+
framework: "langgraph",
|
|
11
|
+
graph: this.graphName,
|
|
12
|
+
node: nodeName,
|
|
13
|
+
});
|
|
14
|
+
const result = await fn(state);
|
|
15
|
+
const checkpoint = await this.client.saveCheckpoint(this.taskId, {
|
|
16
|
+
checkpointName: `${this.graphName}.${nodeName}.complete`,
|
|
17
|
+
state: { inputState: state, outputState: result },
|
|
18
|
+
resumeState: { currentStep: `after:${nodeName}`, pendingActions: [] },
|
|
19
|
+
metadata: { framework: "langgraph", graph: this.graphName, node: nodeName },
|
|
20
|
+
});
|
|
21
|
+
await this.client.recordEvent(this.taskId, "checkpoint_saved", {
|
|
22
|
+
framework: "langgraph",
|
|
23
|
+
node: nodeName,
|
|
24
|
+
checkpoint,
|
|
25
|
+
});
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async restoreState(checkpointId) {
|
|
30
|
+
const restored = await this.client.restoreCheckpoint(checkpointId);
|
|
31
|
+
await this.client.recordEvent(this.taskId, "checkpoint_restored", {
|
|
32
|
+
framework: "langgraph",
|
|
33
|
+
checkpointId,
|
|
34
|
+
});
|
|
35
|
+
return (restored.resume_state ?? restored.resumeState ?? restored.state ?? {});
|
|
36
|
+
}
|
|
37
|
+
recordEdges(edges) {
|
|
38
|
+
return this.client.recordEvent(this.taskId, "plan_prepared", {
|
|
39
|
+
framework: "langgraph",
|
|
40
|
+
graph: this.graphName,
|
|
41
|
+
edges,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export const MemoryMeshCheckpointer = MemoryMeshLangGraphAdapter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MemoryMeshClient } from "../client.js";
|
|
2
|
+
import type { Json } from "../types.js";
|
|
3
|
+
export declare class MemoryMeshOpenAIAgentsMiddleware {
|
|
4
|
+
private client;
|
|
5
|
+
private taskId;
|
|
6
|
+
private agentId;
|
|
7
|
+
constructor(client: MemoryMeshClient, taskId: string, agentId: string);
|
|
8
|
+
onAgentStart(instructions: string, metadata?: Record<string, Json>): Promise<unknown>;
|
|
9
|
+
onPlan(plan: Record<string, Json>): Promise<unknown>;
|
|
10
|
+
wrapTool<TArgs extends unknown[], TResult>(toolName: string, fn: (...args: TArgs) => Promise<TResult> | TResult, toolType?: "read" | "write" | "external_action" | "unknown"): (...args: TArgs) => Promise<TResult>;
|
|
11
|
+
onFinalAnswer(answer: string, metadata?: Record<string, Json>): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { wrapTool } from "./toolWrapper.js";
|
|
2
|
+
export class MemoryMeshOpenAIAgentsMiddleware {
|
|
3
|
+
constructor(client, taskId, agentId) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
this.taskId = taskId;
|
|
6
|
+
this.agentId = agentId;
|
|
7
|
+
}
|
|
8
|
+
onAgentStart(instructions, metadata = {}) {
|
|
9
|
+
return this.client.recordEvent(this.taskId, "request_received", {
|
|
10
|
+
framework: "openai-agents",
|
|
11
|
+
agentId: this.agentId,
|
|
12
|
+
instructions,
|
|
13
|
+
metadata,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
onPlan(plan) {
|
|
17
|
+
return this.client.recordEvent(this.taskId, "plan_prepared", {
|
|
18
|
+
framework: "openai-agents",
|
|
19
|
+
agentId: this.agentId,
|
|
20
|
+
plan,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
wrapTool(toolName, fn, toolType = "read") {
|
|
24
|
+
return wrapTool(this.client, this.taskId, fn, {
|
|
25
|
+
toolName,
|
|
26
|
+
toolType,
|
|
27
|
+
checkpointAfter: toolType === "read",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
onFinalAnswer(answer, metadata = {}) {
|
|
31
|
+
return this.client.recordEvent(this.taskId, "final_answer", {
|
|
32
|
+
framework: "openai-agents",
|
|
33
|
+
agentId: this.agentId,
|
|
34
|
+
answer,
|
|
35
|
+
metadata,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MemoryMeshClient } from "../client.js";
|
|
2
|
+
import type { Json } from "../types.js";
|
|
3
|
+
export type ToolType = "read" | "write" | "external_action" | "unknown";
|
|
4
|
+
export interface ToolWrapperConfig<TArgs extends unknown[] = unknown[], TResult = unknown> {
|
|
5
|
+
toolName: string;
|
|
6
|
+
toolType?: ToolType;
|
|
7
|
+
checkpointAfter?: boolean;
|
|
8
|
+
checkpointName?: string;
|
|
9
|
+
validation?: Record<string, Json> | ((args: TArgs, result: TResult) => Record<string, Json>);
|
|
10
|
+
observedSignals?: Record<string, Json> | ((args: TArgs, result: TResult) => Record<string, Json>);
|
|
11
|
+
idempotencyKey?: string | ((args: TArgs) => string | undefined);
|
|
12
|
+
}
|
|
13
|
+
export declare function wrapTool<TArgs extends unknown[], TResult>(client: MemoryMeshClient, taskId: string, fn: (...args: TArgs) => Promise<TResult> | TResult, config: ToolWrapperConfig<TArgs, TResult>): (...args: TArgs) => Promise<TResult>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
function toRecord(value) {
|
|
2
|
+
if (value && typeof value === "object" && !Array.isArray(value))
|
|
3
|
+
return value;
|
|
4
|
+
return { value: value };
|
|
5
|
+
}
|
|
6
|
+
function resolveValue(value, args, result) {
|
|
7
|
+
if (!value)
|
|
8
|
+
return {};
|
|
9
|
+
if (typeof value === "function")
|
|
10
|
+
return value(args, result);
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
export function wrapTool(client, taskId, fn, config) {
|
|
14
|
+
return async (...args) => {
|
|
15
|
+
const toolType = config.toolType ?? "read";
|
|
16
|
+
const idempotencyKey = typeof config.idempotencyKey === "function" ? config.idempotencyKey(args) : config.idempotencyKey;
|
|
17
|
+
if ((toolType === "write" || toolType === "external_action") && idempotencyKey) {
|
|
18
|
+
const action = await client.executeAction(taskId, {
|
|
19
|
+
toolName: config.toolName,
|
|
20
|
+
toolType,
|
|
21
|
+
idempotencyKey,
|
|
22
|
+
input: { args: args },
|
|
23
|
+
});
|
|
24
|
+
const maybeReplay = action;
|
|
25
|
+
if (maybeReplay.replayed || maybeReplay.duplicate)
|
|
26
|
+
return (maybeReplay.result ?? action);
|
|
27
|
+
}
|
|
28
|
+
const result = await fn(...args);
|
|
29
|
+
await client.recordToolTrace(taskId, {
|
|
30
|
+
tool: config.toolName,
|
|
31
|
+
toolType,
|
|
32
|
+
input: { args: args },
|
|
33
|
+
output: toRecord(result),
|
|
34
|
+
validation: resolveValue(config.validation, args, result),
|
|
35
|
+
observedSignals: resolveValue(config.observedSignals, args, result),
|
|
36
|
+
idempotencyKey,
|
|
37
|
+
});
|
|
38
|
+
if (config.checkpointAfter) {
|
|
39
|
+
await client.saveCheckpoint(taskId, {
|
|
40
|
+
checkpointName: config.checkpointName ?? `${config.toolName}_complete`,
|
|
41
|
+
state: { tool: config.toolName, result: toRecord(result) },
|
|
42
|
+
resumeState: { currentStep: `after:${config.toolName}`, pendingActions: [] },
|
|
43
|
+
metadata: { source: "wrapTool", toolType },
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ActionExecutionInput, AgentRunInput, AgentRunReceipt, CheckpointInput, CodingAgentRunInput, FireworksPlanInput, HealthResponse, MemoryInput, MemoryMeshClientOptions, StartRunInput, ToolTraceInput, VoiceSummaryInput } from "./types.js";
|
|
2
|
+
export declare class MemoryMeshError extends Error {
|
|
3
|
+
readonly status: number;
|
|
4
|
+
readonly body: string;
|
|
5
|
+
readonly detail?: unknown;
|
|
6
|
+
constructor(message: string, status: number, body: string, detail?: unknown);
|
|
7
|
+
}
|
|
8
|
+
export declare class MemoryMeshClient {
|
|
9
|
+
private readonly baseUrl;
|
|
10
|
+
private readonly apiKey?;
|
|
11
|
+
private readonly apiKeyHeader;
|
|
12
|
+
private readonly fetchImpl;
|
|
13
|
+
private readonly defaultHeaders;
|
|
14
|
+
private readonly defaultMemoryBackend?;
|
|
15
|
+
constructor(baseUrlOrOptions: string | MemoryMeshClientOptions, apiKey?: string);
|
|
16
|
+
private authHeaders;
|
|
17
|
+
private request;
|
|
18
|
+
health(): Promise<HealthResponse>;
|
|
19
|
+
systemStatus(): Promise<unknown>;
|
|
20
|
+
startRun(input: StartRunInput): Promise<unknown>;
|
|
21
|
+
recoverTask(checkpointId: string, input?: Partial<StartRunInput>): Promise<unknown>;
|
|
22
|
+
recordEvent(taskId: string, code: string, payload?: Record<string, unknown>): Promise<unknown>;
|
|
23
|
+
recordToolTrace(taskId: string, trace: ToolTraceInput): Promise<unknown>;
|
|
24
|
+
saveCheckpoint(taskId: string, checkpoint: CheckpointInput): Promise<unknown>;
|
|
25
|
+
restoreCheckpoint(checkpointId: string): Promise<unknown>;
|
|
26
|
+
modifyTask(taskId: string, newTaskDescription: string, modification: string, parentCheckpointId?: string): Promise<unknown>;
|
|
27
|
+
approveMemory(taskId: string, rule: string, appliesTo: string[], confidence?: number, evidence?: Record<string, unknown>): Promise<unknown>;
|
|
28
|
+
executeAction(taskId: string, input: ActionExecutionInput): Promise<unknown>;
|
|
29
|
+
listEvents(taskId: string): Promise<unknown>;
|
|
30
|
+
streamEvents(taskId: string): EventSource;
|
|
31
|
+
streamEventIterator(taskId: string): AsyncGenerator<unknown>;
|
|
32
|
+
generatePlan(input: FireworksPlanInput): Promise<unknown>;
|
|
33
|
+
synthesizeRunSummary(input: VoiceSummaryInput): Promise<unknown>;
|
|
34
|
+
memoryStatus(backend?: string, probe?: boolean): Promise<unknown>;
|
|
35
|
+
remember(input: MemoryInput): Promise<unknown>;
|
|
36
|
+
recall(input: MemoryInput): Promise<unknown>;
|
|
37
|
+
improveMemory(input: MemoryInput): Promise<unknown>;
|
|
38
|
+
forgetMemory(dataset?: string, sessionId?: string, everything?: boolean, backend?: string): Promise<unknown>;
|
|
39
|
+
runAgent(input: AgentRunInput): Promise<AgentRunReceipt>;
|
|
40
|
+
runCodingAgent(input?: CodingAgentRunInput): Promise<unknown>;
|
|
41
|
+
runCodingAgentRecoveryDemo(repositoryName?: string, realAgent?: boolean, backend?: string): Promise<unknown>;
|
|
42
|
+
runDualBackendProof(repositoryName?: string, backends?: string[]): Promise<unknown>;
|
|
43
|
+
partnerStatus(): Promise<unknown>;
|
|
44
|
+
}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
export class MemoryMeshError extends Error {
|
|
2
|
+
constructor(message, status, body, detail) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.name = "MemoryMeshError";
|
|
5
|
+
this.status = status;
|
|
6
|
+
this.body = body;
|
|
7
|
+
this.detail = detail;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export class MemoryMeshClient {
|
|
11
|
+
constructor(baseUrlOrOptions, apiKey) {
|
|
12
|
+
const options = typeof baseUrlOrOptions === "string" ? { baseUrl: baseUrlOrOptions, apiKey } : baseUrlOrOptions;
|
|
13
|
+
this.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
14
|
+
this.apiKey = options.apiKey;
|
|
15
|
+
this.apiKeyHeader = options.apiKeyHeader ?? "X-MemoryMesh-API-Key";
|
|
16
|
+
this.fetchImpl = options.fetch ?? fetch;
|
|
17
|
+
this.defaultHeaders = options.defaultHeaders ?? {};
|
|
18
|
+
this.defaultMemoryBackend = options.defaultMemoryBackend;
|
|
19
|
+
}
|
|
20
|
+
authHeaders() {
|
|
21
|
+
if (!this.apiKey)
|
|
22
|
+
return {};
|
|
23
|
+
if (this.apiKeyHeader.toLowerCase() === "authorization") {
|
|
24
|
+
return { Authorization: this.apiKey.toLowerCase().startsWith("bearer ") ? this.apiKey : `Bearer ${this.apiKey}` };
|
|
25
|
+
}
|
|
26
|
+
return { [this.apiKeyHeader]: this.apiKey };
|
|
27
|
+
}
|
|
28
|
+
async request(path, init = {}) {
|
|
29
|
+
const headers = {
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
...this.defaultHeaders,
|
|
32
|
+
...this.authHeaders(),
|
|
33
|
+
...init.headers,
|
|
34
|
+
};
|
|
35
|
+
const res = await this.fetchImpl(`${this.baseUrl}${path}`, { ...init, headers });
|
|
36
|
+
const body = await res.text();
|
|
37
|
+
if (!res.ok) {
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = body ? JSON.parse(body) : undefined;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
parsed = undefined;
|
|
44
|
+
}
|
|
45
|
+
const detail = parsed?.detail ?? parsed?.message;
|
|
46
|
+
const message = typeof detail === "string" ? detail : `MemoryMesh request failed: ${res.status}`;
|
|
47
|
+
throw new MemoryMeshError(message, res.status, body, detail);
|
|
48
|
+
}
|
|
49
|
+
return (body ? JSON.parse(body) : {});
|
|
50
|
+
}
|
|
51
|
+
health() {
|
|
52
|
+
return this.request("/health");
|
|
53
|
+
}
|
|
54
|
+
systemStatus() {
|
|
55
|
+
return this.request("/api/system/status");
|
|
56
|
+
}
|
|
57
|
+
startRun(input) {
|
|
58
|
+
return this.request("/api/tasks/run", {
|
|
59
|
+
method: "POST",
|
|
60
|
+
body: JSON.stringify({
|
|
61
|
+
agent_id: input.agentId,
|
|
62
|
+
task_description: input.task,
|
|
63
|
+
dataset_type: input.datasetType ?? "support_tickets",
|
|
64
|
+
task_version: input.taskVersion,
|
|
65
|
+
parent_checkpoint_id: input.parentCheckpointId,
|
|
66
|
+
simulate_restart: input.simulateRestart,
|
|
67
|
+
task_modification: input.taskModification,
|
|
68
|
+
idempotency_key: input.idempotencyKey,
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
recoverTask(checkpointId, input = {}) {
|
|
73
|
+
return this.request(`/api/tasks/recover`, {
|
|
74
|
+
method: "POST",
|
|
75
|
+
body: JSON.stringify({
|
|
76
|
+
checkpoint_id: checkpointId,
|
|
77
|
+
task_description: input.task,
|
|
78
|
+
agent_id: input.agentId,
|
|
79
|
+
dataset_type: input.datasetType,
|
|
80
|
+
task_modification: input.taskModification,
|
|
81
|
+
idempotency_key: input.idempotencyKey,
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
recordEvent(taskId, code, payload = {}) {
|
|
86
|
+
return this.request(`/api/runs/${taskId}/events`, { method: "POST", body: JSON.stringify({ code, payload }) });
|
|
87
|
+
}
|
|
88
|
+
recordToolTrace(taskId, trace) {
|
|
89
|
+
return this.request(`/api/runs/${taskId}/tool-traces`, {
|
|
90
|
+
method: "POST",
|
|
91
|
+
body: JSON.stringify({
|
|
92
|
+
tool: trace.tool,
|
|
93
|
+
tool_type: trace.toolType ?? "read",
|
|
94
|
+
input: trace.input,
|
|
95
|
+
output: trace.output,
|
|
96
|
+
validation: trace.validation ?? {},
|
|
97
|
+
observed_signals: trace.observedSignals ?? {},
|
|
98
|
+
checkpoint_id: trace.checkpointId,
|
|
99
|
+
trace_id: trace.traceId,
|
|
100
|
+
idempotency_key: trace.idempotencyKey,
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
saveCheckpoint(taskId, checkpoint) {
|
|
105
|
+
return this.request(`/api/runs/${taskId}/checkpoints`, {
|
|
106
|
+
method: "POST",
|
|
107
|
+
body: JSON.stringify({
|
|
108
|
+
checkpoint_name: checkpoint.checkpointName,
|
|
109
|
+
state: checkpoint.state,
|
|
110
|
+
resume_state: checkpoint.resumeState ?? {},
|
|
111
|
+
safe_to_resume: checkpoint.safeToResume ?? true,
|
|
112
|
+
requires_human_review: checkpoint.requiresHumanReview ?? false,
|
|
113
|
+
metadata: checkpoint.metadata ?? {},
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
restoreCheckpoint(checkpointId) {
|
|
118
|
+
return this.request(`/api/checkpoints/${checkpointId}/restore`, { method: "POST", body: JSON.stringify({}) });
|
|
119
|
+
}
|
|
120
|
+
modifyTask(taskId, newTaskDescription, modification, parentCheckpointId) {
|
|
121
|
+
return this.request(`/api/tasks/${taskId}/modify`, {
|
|
122
|
+
method: "POST",
|
|
123
|
+
body: JSON.stringify({ new_task_description: newTaskDescription, modification, parent_checkpoint_id: parentCheckpointId }),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
approveMemory(taskId, rule, appliesTo, confidence = 0.8, evidence = {}) {
|
|
127
|
+
return this.request(`/api/runs/${taskId}/memory/approve`, {
|
|
128
|
+
method: "POST",
|
|
129
|
+
body: JSON.stringify({ rule, applies_to: appliesTo, confidence, evidence }),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
executeAction(taskId, input) {
|
|
133
|
+
return this.request(`/api/runs/${taskId}/actions/execute`, {
|
|
134
|
+
method: "POST",
|
|
135
|
+
body: JSON.stringify({
|
|
136
|
+
tool_name: input.toolName,
|
|
137
|
+
tool_type: input.toolType ?? "external_action",
|
|
138
|
+
idempotency_key: input.idempotencyKey,
|
|
139
|
+
input: input.input ?? {},
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
listEvents(taskId) {
|
|
144
|
+
return this.request(`/api/runs/${taskId}/events`);
|
|
145
|
+
}
|
|
146
|
+
streamEvents(taskId) {
|
|
147
|
+
return new EventSource(`${this.baseUrl}/api/runs/${taskId}/stream`);
|
|
148
|
+
}
|
|
149
|
+
async *streamEventIterator(taskId) {
|
|
150
|
+
const res = await this.fetchImpl(`${this.baseUrl}/api/runs/${taskId}/stream`, {
|
|
151
|
+
headers: { ...this.defaultHeaders, ...this.authHeaders() },
|
|
152
|
+
});
|
|
153
|
+
if (!res.ok)
|
|
154
|
+
throw new MemoryMeshError(`MemoryMesh stream failed: ${res.status}`, res.status, await res.text());
|
|
155
|
+
if (!res.body)
|
|
156
|
+
return;
|
|
157
|
+
const reader = res.body.getReader();
|
|
158
|
+
const decoder = new TextDecoder();
|
|
159
|
+
let buffer = "";
|
|
160
|
+
while (true) {
|
|
161
|
+
const { value, done } = await reader.read();
|
|
162
|
+
if (done)
|
|
163
|
+
break;
|
|
164
|
+
buffer += decoder.decode(value, { stream: true });
|
|
165
|
+
const lines = buffer.split(/\r?\n/);
|
|
166
|
+
buffer = lines.pop() ?? "";
|
|
167
|
+
for (const line of lines) {
|
|
168
|
+
if (line.startsWith("data: "))
|
|
169
|
+
yield JSON.parse(line.slice("data: ".length));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
generatePlan(input) {
|
|
174
|
+
return this.request(`/api/ai/plan`, {
|
|
175
|
+
method: "POST",
|
|
176
|
+
body: JSON.stringify({ task_description: input.task, run_events: input.runEvents ?? [], checkpoint_id: input.checkpointId, task_version: input.taskVersion ?? 1 }),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
synthesizeRunSummary(input) {
|
|
180
|
+
return this.request(`/api/voice/run-summary`, {
|
|
181
|
+
method: "POST",
|
|
182
|
+
body: JSON.stringify({ text: input.text, voice_id: input.voiceId, run_id: input.runId, checkpoint_id: input.checkpointId }),
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
memoryStatus(backend, probe = false) {
|
|
186
|
+
const params = new URLSearchParams();
|
|
187
|
+
if (backend ?? this.defaultMemoryBackend)
|
|
188
|
+
params.set("backend", backend ?? this.defaultMemoryBackend ?? "");
|
|
189
|
+
if (probe)
|
|
190
|
+
params.set("probe", "true");
|
|
191
|
+
return this.request(`/api/memory/status${params.toString() ? `?${params}` : ""}`);
|
|
192
|
+
}
|
|
193
|
+
remember(input) {
|
|
194
|
+
return this.request(`/api/memory/remember`, {
|
|
195
|
+
method: "POST",
|
|
196
|
+
body: JSON.stringify({ text: input.text, dataset: input.dataset, session_id: input.sessionId, metadata: input.metadata ?? {}, backend: input.backend ?? this.defaultMemoryBackend }),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
recall(input) {
|
|
200
|
+
return this.request(`/api/memory/recall`, {
|
|
201
|
+
method: "POST",
|
|
202
|
+
body: JSON.stringify({ query: input.query, dataset: input.dataset, session_id: input.sessionId, top_k: input.topK ?? 5, metadata: input.metadata ?? {}, backend: input.backend ?? this.defaultMemoryBackend }),
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
improveMemory(input) {
|
|
206
|
+
return this.request(`/api/memory/improve`, {
|
|
207
|
+
method: "POST",
|
|
208
|
+
body: JSON.stringify({ feedback: input.feedback ?? input.text, dataset: input.dataset, session_id: input.sessionId, metadata: input.metadata ?? {}, backend: input.backend ?? this.defaultMemoryBackend }),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
forgetMemory(dataset = "memorymesh-agent-work-memory", sessionId, everything = false, backend) {
|
|
212
|
+
return this.request(`/api/memory/forget`, { method: "POST", body: JSON.stringify({ dataset, session_id: sessionId, everything, backend: backend ?? this.defaultMemoryBackend }) });
|
|
213
|
+
}
|
|
214
|
+
runAgent(input) {
|
|
215
|
+
return this.request(`/api/agents/run`, {
|
|
216
|
+
method: "POST",
|
|
217
|
+
body: JSON.stringify({
|
|
218
|
+
agent_id: input.agentId ?? "build",
|
|
219
|
+
task: input.task,
|
|
220
|
+
repository_name: input.repositoryName,
|
|
221
|
+
workspace_path: input.workspacePath,
|
|
222
|
+
github_url: input.githubUrl,
|
|
223
|
+
backend: input.backend ?? this.defaultMemoryBackend,
|
|
224
|
+
}),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
runCodingAgent(input = {}) {
|
|
228
|
+
return this.request(`/api/coding-agent/run`, {
|
|
229
|
+
method: "POST",
|
|
230
|
+
body: JSON.stringify({
|
|
231
|
+
task: input.task,
|
|
232
|
+
repository_name: input.repositoryName ?? "sample-dashboard-service",
|
|
233
|
+
workspace_path: input.workspacePath,
|
|
234
|
+
dataset: input.dataset,
|
|
235
|
+
session_id: input.sessionId,
|
|
236
|
+
reset_workspace: input.resetWorkspace ?? true,
|
|
237
|
+
simulate_context_loss: input.simulateContextLoss ?? true,
|
|
238
|
+
run_tests: input.runTests ?? true,
|
|
239
|
+
forget_after_run: input.forgetAfterRun ?? false,
|
|
240
|
+
backend: input.backend,
|
|
241
|
+
}),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
runCodingAgentRecoveryDemo(repositoryName = "sample-dashboard-service", realAgent = true, backend) {
|
|
245
|
+
return this.request(`/api/demo/coding-agent-recovery`, { method: "POST", body: JSON.stringify({ repository_name: repositoryName, real_agent: realAgent, backend }) });
|
|
246
|
+
}
|
|
247
|
+
runDualBackendProof(repositoryName = "sample-dashboard-service", backends = ["local_cognee", "cognee_cloud"]) {
|
|
248
|
+
return this.request(`/api/demo/dual-backend-proof`, { method: "POST", body: JSON.stringify({ repository_name: repositoryName, backends }) });
|
|
249
|
+
}
|
|
250
|
+
partnerStatus() {
|
|
251
|
+
return this.request(`/api/partners/status`);
|
|
252
|
+
}
|
|
253
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { MemoryMeshClient, MemoryMeshError } from "./client.js";
|
|
2
|
+
export { MemoryMeshCrewAIAdapter } from "./adapters/crewaiAdapter.js";
|
|
3
|
+
export { MemoryMeshCheckpointer, MemoryMeshLangGraphAdapter } from "./adapters/langgraphAdapter.js";
|
|
4
|
+
export { MemoryMeshOpenAIAgentsMiddleware } from "./adapters/openaiAgentsMiddleware.js";
|
|
5
|
+
export { wrapTool } from "./adapters/toolWrapper.js";
|
|
6
|
+
export type { ToolType, ToolWrapperConfig } from "./adapters/toolWrapper.js";
|
|
7
|
+
export type { ActionExecutionInput, AgentId, AgentRunInput, AgentRunReceipt, CheckpointInput, FireworksPlanInput, HealthResponse, Json, MemoryInput, MemoryMeshClientOptions, MemoryMeshErrorBody, MemoryBackend, MemoryOperation, ResumeStateInput, StartRunInput, ToolTraceInput, VoiceSummaryInput, } from "./types.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { MemoryMeshClient, MemoryMeshError } from "./client.js";
|
|
2
|
+
export { MemoryMeshCrewAIAdapter } from "./adapters/crewaiAdapter.js";
|
|
3
|
+
export { MemoryMeshCheckpointer, MemoryMeshLangGraphAdapter } from "./adapters/langgraphAdapter.js";
|
|
4
|
+
export { MemoryMeshOpenAIAgentsMiddleware } from "./adapters/openaiAgentsMiddleware.js";
|
|
5
|
+
export { wrapTool } from "./adapters/toolWrapper.js";
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export type Json = string | number | boolean | null | Json[] | {
|
|
2
|
+
[key: string]: Json;
|
|
3
|
+
};
|
|
4
|
+
export type MemoryBackend = "local_cognee" | "cognee_cloud" | "offline_mirror";
|
|
5
|
+
export type AgentId = "build" | "research" | "support" | (string & {});
|
|
6
|
+
export interface MemoryMeshClientOptions {
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
apiKeyHeader?: "X-MemoryMesh-API-Key" | "Authorization" | (string & {});
|
|
10
|
+
fetch?: typeof fetch;
|
|
11
|
+
defaultMemoryBackend?: MemoryBackend;
|
|
12
|
+
defaultHeaders?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface MemoryMeshErrorBody {
|
|
15
|
+
detail?: unknown;
|
|
16
|
+
message?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface HealthResponse {
|
|
20
|
+
status?: string;
|
|
21
|
+
app?: string;
|
|
22
|
+
version?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface StartRunInput {
|
|
26
|
+
agentId: string;
|
|
27
|
+
task: string;
|
|
28
|
+
datasetType?: string;
|
|
29
|
+
taskVersion?: number;
|
|
30
|
+
parentCheckpointId?: string;
|
|
31
|
+
simulateRestart?: boolean;
|
|
32
|
+
taskModification?: string;
|
|
33
|
+
idempotencyKey?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ToolTraceInput {
|
|
36
|
+
tool: string;
|
|
37
|
+
toolType?: "read" | "write" | "external_action" | "unknown";
|
|
38
|
+
input: Record<string, Json>;
|
|
39
|
+
output: Record<string, Json>;
|
|
40
|
+
validation?: Record<string, Json>;
|
|
41
|
+
observedSignals?: Record<string, Json>;
|
|
42
|
+
checkpointId?: string;
|
|
43
|
+
traceId?: string;
|
|
44
|
+
idempotencyKey?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ResumeStateInput {
|
|
47
|
+
currentStep?: string;
|
|
48
|
+
pageToken?: string | null;
|
|
49
|
+
partialResultsRef?: string | null;
|
|
50
|
+
partialResults?: Record<string, Json>[];
|
|
51
|
+
validatedRecords?: number;
|
|
52
|
+
pendingActions?: Record<string, Json>[];
|
|
53
|
+
observedSignals?: Record<string, Json>;
|
|
54
|
+
}
|
|
55
|
+
export interface CheckpointInput {
|
|
56
|
+
checkpointName: string;
|
|
57
|
+
state: Record<string, Json>;
|
|
58
|
+
resumeState?: ResumeStateInput;
|
|
59
|
+
safeToResume?: boolean;
|
|
60
|
+
requiresHumanReview?: boolean;
|
|
61
|
+
metadata?: Record<string, Json>;
|
|
62
|
+
}
|
|
63
|
+
export interface ActionExecutionInput {
|
|
64
|
+
toolName: string;
|
|
65
|
+
toolType?: "write" | "external_action" | "read" | "unknown";
|
|
66
|
+
idempotencyKey: string;
|
|
67
|
+
input?: Record<string, Json>;
|
|
68
|
+
}
|
|
69
|
+
export interface FireworksPlanInput {
|
|
70
|
+
task: string;
|
|
71
|
+
runEvents?: string[];
|
|
72
|
+
checkpointId?: string;
|
|
73
|
+
taskVersion?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface VoiceSummaryInput {
|
|
76
|
+
text: string;
|
|
77
|
+
voiceId?: string;
|
|
78
|
+
runId?: string;
|
|
79
|
+
checkpointId?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface MemoryInput {
|
|
82
|
+
text?: string;
|
|
83
|
+
query?: string;
|
|
84
|
+
feedback?: string;
|
|
85
|
+
dataset?: string;
|
|
86
|
+
sessionId?: string;
|
|
87
|
+
topK?: number;
|
|
88
|
+
metadata?: Record<string, Json>;
|
|
89
|
+
backend?: MemoryBackend;
|
|
90
|
+
}
|
|
91
|
+
export interface AgentRunInput {
|
|
92
|
+
agentId?: AgentId;
|
|
93
|
+
task: string;
|
|
94
|
+
repositoryName?: string;
|
|
95
|
+
workspacePath?: string;
|
|
96
|
+
githubUrl?: string;
|
|
97
|
+
backend?: MemoryBackend;
|
|
98
|
+
}
|
|
99
|
+
export interface MemoryOperation {
|
|
100
|
+
operation?: string;
|
|
101
|
+
provider?: string;
|
|
102
|
+
backend?: MemoryBackend | string;
|
|
103
|
+
status?: string;
|
|
104
|
+
fallback_used?: boolean;
|
|
105
|
+
error?: string | null;
|
|
106
|
+
dataset?: string;
|
|
107
|
+
session_id?: string;
|
|
108
|
+
content?: unknown;
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
export interface AgentRunReceipt {
|
|
112
|
+
run_id: string;
|
|
113
|
+
task_id: string;
|
|
114
|
+
agent_id: string;
|
|
115
|
+
agent_name: string;
|
|
116
|
+
task: string;
|
|
117
|
+
status: string;
|
|
118
|
+
final_output: string;
|
|
119
|
+
evidence: unknown[];
|
|
120
|
+
memory_operations: MemoryOperation[];
|
|
121
|
+
tool_traces: unknown[];
|
|
122
|
+
recovery: Record<string, unknown>;
|
|
123
|
+
outcome: Record<string, unknown>;
|
|
124
|
+
model_trace: Record<string, unknown>;
|
|
125
|
+
created_at: string;
|
|
126
|
+
raw?: Record<string, unknown>;
|
|
127
|
+
}
|
|
128
|
+
export interface CodingAgentRunInput {
|
|
129
|
+
task?: string;
|
|
130
|
+
repositoryName?: string;
|
|
131
|
+
workspacePath?: string;
|
|
132
|
+
dataset?: string;
|
|
133
|
+
sessionId?: string;
|
|
134
|
+
resetWorkspace?: boolean;
|
|
135
|
+
simulateContextLoss?: boolean;
|
|
136
|
+
runTests?: boolean;
|
|
137
|
+
forgetAfterRun?: boolean;
|
|
138
|
+
backend?: MemoryBackend;
|
|
139
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@memorymsh/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript SDK for MemoryMesh durable agent memory, receipts, checkpoints, and Cognee-backed runtime state.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/othnielObasi/memorymesh.git",
|
|
23
|
+
"directory": "packages/sdk-typescript"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"memorymesh",
|
|
27
|
+
"cognee",
|
|
28
|
+
"agent-memory",
|
|
29
|
+
"ai-agents",
|
|
30
|
+
"checkpoints",
|
|
31
|
+
"tool-tracing",
|
|
32
|
+
"llm"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc -p tsconfig.json",
|
|
39
|
+
"prepack": "npm run build"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"typescript": "^5.0.0"
|
|
43
|
+
}
|
|
44
|
+
}
|