@letta-ai/letta-code-sdk 0.0.3 → 0.0.5
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 +108 -155
- package/dist/index.d.ts +100 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -94
- package/dist/index.js.map +7 -7
- package/dist/session.d.ts +16 -5
- package/dist/session.d.ts.map +1 -1
- package/dist/transport.d.ts +2 -4
- package/dist/transport.d.ts.map +1 -1
- package/dist/types.d.ts +77 -43
- package/dist/types.d.ts.map +1 -1
- package/dist/validation.d.ts +8 -5
- package/dist/validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/session.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Represents a conversation session with a Letta agent.
|
|
5
5
|
* Implements the V2 API pattern: send() / receive()
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { InternalSessionOptions, SDKMessage, SDKInitMessage, SendMessage } from "./types.js";
|
|
8
8
|
export declare class Session implements AsyncDisposable {
|
|
9
9
|
private options;
|
|
10
10
|
private transport;
|
|
@@ -12,17 +12,28 @@ export declare class Session implements AsyncDisposable {
|
|
|
12
12
|
private _sessionId;
|
|
13
13
|
private _conversationId;
|
|
14
14
|
private initialized;
|
|
15
|
-
constructor(options?:
|
|
16
|
-
agentId?: string;
|
|
17
|
-
});
|
|
15
|
+
constructor(options?: InternalSessionOptions);
|
|
18
16
|
/**
|
|
19
17
|
* Initialize the session (called automatically on first send)
|
|
20
18
|
*/
|
|
21
19
|
initialize(): Promise<SDKInitMessage>;
|
|
22
20
|
/**
|
|
23
21
|
* Send a message to the agent
|
|
22
|
+
*
|
|
23
|
+
* @param message - Text string or multimodal content array
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Simple text
|
|
27
|
+
* await session.send("Hello!");
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // With image
|
|
31
|
+
* await session.send([
|
|
32
|
+
* { type: "text", text: "What's in this image?" },
|
|
33
|
+
* { type: "image", source: { type: "base64", mediaType: "image/png", data: "..." } }
|
|
34
|
+
* ]);
|
|
24
35
|
*/
|
|
25
|
-
send(message:
|
|
36
|
+
send(message: SendMessage): Promise<void>;
|
|
26
37
|
/**
|
|
27
38
|
* Stream messages from the agent
|
|
28
39
|
*/
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EACV,cAAc,EASd,WAAW,EACZ,MAAM,YAAY,CAAC;AAGpB,qBAAa,OAAQ,YAAW,eAAe;IAQ3C,OAAO,CAAC,OAAO;IAPjB,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,WAAW,CAAS;gBAGlB,OAAO,GAAE,sBAA2B;IAM9C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC;IA2C3C;;;;;;;;;;;;;;;OAeG;IACG,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAW/C;;OAEG;IACI,MAAM,IAAI,cAAc,CAAC,UAAU,CAAC;IA0B3C;;OAEG;YACW,gBAAgB;IAwD9B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,GAAG,IAAI,CAE3B;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,CAElC;IAED;;OAEG;IACG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5C;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAiIzB"}
|
package/dist/transport.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Spawns the Letta Code CLI and communicates via stdin/stdout JSON streams.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { InternalSessionOptions, WireMessage } from "./types.js";
|
|
7
7
|
export declare class SubprocessTransport {
|
|
8
8
|
private options;
|
|
9
9
|
private process;
|
|
@@ -12,9 +12,7 @@ export declare class SubprocessTransport {
|
|
|
12
12
|
private messageResolvers;
|
|
13
13
|
private closed;
|
|
14
14
|
private agentId?;
|
|
15
|
-
constructor(options?:
|
|
16
|
-
agentId?: string;
|
|
17
|
-
});
|
|
15
|
+
constructor(options?: InternalSessionOptions);
|
|
18
16
|
/**
|
|
19
17
|
* Start the CLI subprocess
|
|
20
18
|
*/
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtE,qBAAa,mBAAmB;IAS5B,OAAO,CAAC,OAAO;IARjB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,gBAAgB,CAAyC;IACjE,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAS;gBAGf,OAAO,GAAE,sBAA2B;IAG9C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA4D9B;;OAEG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAiBzC;;OAEG;IACI,QAAQ,IAAI,cAAc,CAAC,WAAW,CAAC;IAQ9C;;OAEG;IACH,KAAK,IAAI,IAAI;IAeb,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,SAAS;YA2IH,OAAO;CA4CtB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,33 @@
|
|
|
5
5
|
* Protocol types are imported from @letta-ai/letta-code/protocol.
|
|
6
6
|
*/
|
|
7
7
|
export type { WireMessage, SystemInitMessage, MessageWire, ResultMessage, ErrorMessage, StreamEvent, ControlRequest, ControlResponse, CanUseToolControlRequest, CanUseToolResponse, CanUseToolResponseAllow, CanUseToolResponseDeny, SystemPromptPresetConfig, CreateBlock, } from "@letta-ai/letta-code/protocol";
|
|
8
|
-
import type { CreateBlock } from "@letta-ai/letta-code/protocol";
|
|
8
|
+
import type { CreateBlock, CanUseToolResponse } from "@letta-ai/letta-code/protocol";
|
|
9
|
+
/**
|
|
10
|
+
* Text content in a message
|
|
11
|
+
*/
|
|
12
|
+
export interface TextContent {
|
|
13
|
+
type: "text";
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Image content in a message (base64 encoded)
|
|
18
|
+
*/
|
|
19
|
+
export interface ImageContent {
|
|
20
|
+
type: "image";
|
|
21
|
+
source: {
|
|
22
|
+
type: "base64";
|
|
23
|
+
media_type: "image/png" | "image/jpeg" | "image/gif" | "image/webp";
|
|
24
|
+
data: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A single content item (text or image)
|
|
29
|
+
*/
|
|
30
|
+
export type MessageContentItem = TextContent | ImageContent;
|
|
31
|
+
/**
|
|
32
|
+
* What send() accepts - either a simple string or multimodal content array
|
|
33
|
+
*/
|
|
34
|
+
export type SendMessage = string | MessageContentItem[];
|
|
9
35
|
/**
|
|
10
36
|
* Available system prompt presets.
|
|
11
37
|
*/
|
|
@@ -35,77 +61,85 @@ export type MemoryItem = string | CreateBlock | BlockReference;
|
|
|
35
61
|
/**
|
|
36
62
|
* Default memory block preset names.
|
|
37
63
|
*/
|
|
38
|
-
export type MemoryPreset = "persona" | "human" | "
|
|
64
|
+
export type MemoryPreset = "persona" | "human" | "skills" | "loaded_skills";
|
|
39
65
|
/**
|
|
40
|
-
*
|
|
66
|
+
* Callback for custom permission handling.
|
|
41
67
|
*/
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
68
|
+
export type CanUseToolCallback = (toolName: string, toolInput: Record<string, unknown>) => Promise<CanUseToolResponse> | CanUseToolResponse;
|
|
69
|
+
/**
|
|
70
|
+
* Internal session options used by Session/Transport classes.
|
|
71
|
+
* Not user-facing - use CreateSessionOptions or CreateAgentOptions instead.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export interface InternalSessionOptions {
|
|
75
|
+
agentId?: string;
|
|
76
|
+
conversationId?: string;
|
|
77
|
+
newConversation?: boolean;
|
|
78
|
+
defaultConversation?: boolean;
|
|
79
|
+
createOnly?: boolean;
|
|
80
|
+
promptMode?: boolean;
|
|
81
|
+
model?: string;
|
|
82
|
+
systemPrompt?: SystemPromptConfig;
|
|
83
|
+
memory?: MemoryItem[];
|
|
84
|
+
persona?: string;
|
|
85
|
+
human?: string;
|
|
86
|
+
allowedTools?: string[];
|
|
87
|
+
permissionMode?: PermissionMode;
|
|
88
|
+
canUseTool?: CanUseToolCallback;
|
|
89
|
+
cwd?: string;
|
|
45
90
|
}
|
|
91
|
+
export type PermissionMode = "default" | "acceptEdits" | "bypassPermissions";
|
|
46
92
|
/**
|
|
47
|
-
*
|
|
93
|
+
* Options for createSession() and resumeSession() - restricted to options that can be applied to existing agents (LRU/Memo).
|
|
94
|
+
* For creating new agents with custom memory/persona, use createAgent().
|
|
48
95
|
*/
|
|
49
|
-
export
|
|
96
|
+
export interface CreateSessionOptions {
|
|
97
|
+
/** Model to use (e.g., "claude-sonnet-4-20250514") - updates the agent's LLM config */
|
|
98
|
+
model?: string;
|
|
99
|
+
/** System prompt preset (only presets, no custom strings or append) - updates the agent */
|
|
100
|
+
systemPrompt?: SystemPromptPreset;
|
|
101
|
+
/** List of allowed tool names */
|
|
102
|
+
allowedTools?: string[];
|
|
103
|
+
/** Permission mode */
|
|
104
|
+
permissionMode?: PermissionMode;
|
|
105
|
+
/** Working directory for the CLI process */
|
|
106
|
+
cwd?: string;
|
|
107
|
+
/** Custom permission callback - called when tool needs approval */
|
|
108
|
+
canUseTool?: CanUseToolCallback;
|
|
109
|
+
}
|
|
50
110
|
/**
|
|
51
|
-
* Options for
|
|
111
|
+
* Options for createAgent() - full control over agent creation.
|
|
52
112
|
*/
|
|
53
|
-
export interface
|
|
113
|
+
export interface CreateAgentOptions {
|
|
54
114
|
/** Model to use (e.g., "claude-sonnet-4-20250514") */
|
|
55
115
|
model?: string;
|
|
56
|
-
/** Resume a specific conversation by ID (derives agent automatically) */
|
|
57
|
-
conversationId?: string;
|
|
58
|
-
/** Create a new conversation for concurrent sessions (requires agentId) */
|
|
59
|
-
newConversation?: boolean;
|
|
60
|
-
/** Resume the last session (agent + conversation from previous run) */
|
|
61
|
-
continue?: boolean;
|
|
62
|
-
/** Use agent's default conversation (requires agentId) */
|
|
63
|
-
defaultConversation?: boolean;
|
|
64
116
|
/**
|
|
65
117
|
* System prompt configuration.
|
|
66
118
|
* - string: Use as the complete system prompt
|
|
119
|
+
* - SystemPromptPreset: Use a preset
|
|
67
120
|
* - { type: 'preset', preset, append? }: Use a preset with optional appended text
|
|
68
|
-
*
|
|
69
|
-
* Available presets: 'default', 'letta-claude', 'letta-codex', 'letta-gemini',
|
|
70
|
-
* 'claude', 'codex', 'gemini'
|
|
71
121
|
*/
|
|
72
|
-
systemPrompt?:
|
|
122
|
+
systemPrompt?: string | SystemPromptPreset | SystemPromptPresetConfigSDK;
|
|
73
123
|
/**
|
|
74
124
|
* Memory block configuration. Each item can be:
|
|
75
|
-
* - string: Preset block name ("
|
|
76
|
-
* - CreateBlock: Custom block definition
|
|
125
|
+
* - string: Preset block name ("persona", "human", "skills", "loaded_skills")
|
|
126
|
+
* - CreateBlock: Custom block definition (e.g., { label: "project", value: "..." })
|
|
77
127
|
* - { blockId: string }: Reference to existing shared block
|
|
78
|
-
*
|
|
79
|
-
* If not specified, defaults to ["persona", "human", "project"].
|
|
80
|
-
* Core blocks (skills, loaded_skills) are always included automatically.
|
|
81
128
|
*/
|
|
82
129
|
memory?: MemoryItem[];
|
|
83
|
-
/**
|
|
84
|
-
* Convenience: Set persona block value directly.
|
|
85
|
-
* Uses default block description/limit, just overrides the value.
|
|
86
|
-
* Error if persona not included in memory config.
|
|
87
|
-
*/
|
|
130
|
+
/** Convenience: Set persona block value directly */
|
|
88
131
|
persona?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Convenience: Set human block value directly.
|
|
91
|
-
*/
|
|
132
|
+
/** Convenience: Set human block value directly */
|
|
92
133
|
human?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Convenience: Set project block value directly.
|
|
95
|
-
*/
|
|
96
|
-
project?: string;
|
|
97
134
|
/** List of allowed tool names */
|
|
98
135
|
allowedTools?: string[];
|
|
99
136
|
/** Permission mode */
|
|
100
137
|
permissionMode?: PermissionMode;
|
|
101
|
-
/** Working directory */
|
|
138
|
+
/** Working directory for the CLI process */
|
|
102
139
|
cwd?: string;
|
|
103
|
-
/** Maximum conversation turns */
|
|
104
|
-
maxTurns?: number;
|
|
105
140
|
/** Custom permission callback - called when tool needs approval */
|
|
106
141
|
canUseTool?: CanUseToolCallback;
|
|
107
142
|
}
|
|
108
|
-
export type PermissionMode = "default" | "acceptEdits" | "bypassPermissions";
|
|
109
143
|
/**
|
|
110
144
|
* SDK message types - clean wrappers around wire types
|
|
111
145
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EAEtB,wBAAwB,EACxB,WAAW,GACZ,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EAEtB,wBAAwB,EACxB,WAAW,GACZ,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAMrF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,WAAW,GAAG,YAAY,GAAG,WAAW,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B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7D,aAAa,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAClD,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qCAAqC;AACrC,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,gBAAgB,GAChB,qBAAqB,CAAC"}
|
package/dist/validation.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SDK Validation
|
|
3
3
|
*
|
|
4
|
-
* Validates
|
|
4
|
+
* Validates user-provided options before spawning the CLI.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { CreateSessionOptions, CreateAgentOptions } from "./types.js";
|
|
7
7
|
/**
|
|
8
|
-
* Validate
|
|
9
|
-
* Throws an error if validation fails.
|
|
8
|
+
* Validate CreateSessionOptions (used by createSession and resumeSession).
|
|
10
9
|
*/
|
|
11
|
-
export declare function
|
|
10
|
+
export declare function validateCreateSessionOptions(options: CreateSessionOptions): void;
|
|
11
|
+
/**
|
|
12
|
+
* Validate CreateAgentOptions (used by createAgent).
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateCreateAgentOptions(options: CreateAgentOptions): void;
|
|
12
15
|
//# sourceMappingURL=validation.d.ts.map
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAoCpB;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAKhF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA6C5E"}
|