@letta-ai/letta-code 0.34.2 → 0.34.4
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/dist/gateway-core.js +166 -621
- package/dist/gateway-core.js.map +8 -13
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/mcp-oauth.js +2 -2
- package/dist/mcp-oauth.js.map +1 -1
- package/dist/memory-constraints.js +47 -13
- package/dist/memory-constraints.js.map +3 -3
- package/dist/types/agent/memory-constraints.d.ts +2 -0
- package/dist/types/agent/memory-constraints.d.ts.map +1 -1
- package/dist/types/agent/subagents/manager.d.ts.map +1 -1
- package/dist/types/agent/subagents/sandbox.d.ts +6 -0
- package/dist/types/agent/subagents/sandbox.d.ts.map +1 -1
- package/dist/types/agent/subagents/subagent-depth.d.ts +15 -0
- package/dist/types/agent/subagents/subagent-depth.d.ts.map +1 -0
- package/dist/types/agent/subagents/subagent-launcher.d.ts.map +1 -1
- package/dist/types/agent/subagents/subagent-process.d.ts +7 -0
- package/dist/types/agent/subagents/subagent-process.d.ts.map +1 -1
- package/dist/types/backend/api/agent-message.d.ts.map +1 -1
- package/dist/types/backend/dev/local-provider-errors.d.ts.map +1 -1
- package/dist/types/backend/local/local-pi-credential-store.d.ts +4 -3
- package/dist/types/backend/local/local-pi-credential-store.d.ts.map +1 -1
- package/dist/types/backend/local/local-provider-auth-store.d.ts +7 -0
- package/dist/types/backend/local/local-provider-auth-store.d.ts.map +1 -1
- package/dist/types/channels/gateway-core.d.ts +50 -8
- package/dist/types/channels/gateway-core.d.ts.map +1 -1
- package/dist/types/channels/gateway-sources.d.ts +0 -1
- package/dist/types/channels/gateway-sources.d.ts.map +1 -1
- package/dist/types/channels/message-channel-executor.d.ts +0 -1
- package/dist/types/channels/message-channel-executor.d.ts.map +1 -1
- package/dist/types/channels/message-channel-idempotency.d.ts +5 -14
- package/dist/types/channels/message-channel-idempotency.d.ts.map +1 -1
- package/dist/types/channels/message-channel-tool-definition.d.ts +1 -4
- package/dist/types/channels/message-channel-tool-definition.d.ts.map +1 -1
- package/dist/types/channels/plugin-types.d.ts +2 -3
- package/dist/types/channels/plugin-types.d.ts.map +1 -1
- package/dist/types/channels/types.d.ts +1 -3
- package/dist/types/channels/types.d.ts.map +1 -1
- package/dist/types/cli/helpers/session-context.d.ts +10 -2
- package/dist/types/cli/helpers/session-context.d.ts.map +1 -1
- package/dist/types/headless-super-run-wait.d.ts.map +1 -1
- package/dist/types/mcp-scope.d.ts +5 -0
- package/dist/types/mcp-scope.d.ts.map +1 -0
- package/dist/types/memory-constraints.d.ts +4 -0
- package/dist/types/memory-constraints.d.ts.map +1 -1
- package/dist/types/mods/mod-engine.d.ts.map +1 -1
- package/dist/types/mods/turn-start-cancel.d.ts +17 -1
- package/dist/types/mods/turn-start-cancel.d.ts.map +1 -1
- package/dist/types/reminders/engine.d.ts +2 -0
- package/dist/types/reminders/engine.d.ts.map +1 -1
- package/dist/types/runtime-execution-settings.d.ts +5 -0
- package/dist/types/runtime-execution-settings.d.ts.map +1 -1
- package/dist/types/tools/impl/bash.d.ts.map +1 -1
- package/dist/types/tools/impl/codex-app-server.d.ts.map +1 -1
- package/dist/types/tools/impl/external-coding-agent.d.ts +4 -3
- package/dist/types/tools/impl/external-coding-agent.d.ts.map +1 -1
- package/dist/types/tools/impl/foreground-sleep.d.ts +13 -0
- package/dist/types/tools/impl/foreground-sleep.d.ts.map +1 -0
- package/dist/types/tools/impl/process_manager.d.ts +2 -0
- package/dist/types/tools/impl/process_manager.d.ts.map +1 -1
- package/dist/types/tools/impl/send-agent-message.d.ts.map +1 -1
- package/dist/types/tools/impl/shell-launchers.d.ts.map +1 -1
- package/dist/types/tools/impl/task-foreground.d.ts +21 -0
- package/dist/types/tools/impl/task-foreground.d.ts.map +1 -0
- package/dist/types/tools/impl/task-stop.d.ts +1 -0
- package/dist/types/tools/impl/task-stop.d.ts.map +1 -1
- package/dist/types/tools/impl/task-transcript.d.ts +5 -0
- package/dist/types/tools/impl/task-transcript.d.ts.map +1 -0
- package/dist/types/tools/impl/task.d.ts +1 -1
- package/dist/types/tools/impl/task.d.ts.map +1 -1
- package/dist/types/tools/manager.d.ts +1 -1
- package/dist/types/tools/manager.d.ts.map +1 -1
- package/dist/types/tools/secret-substitution.d.ts +7 -0
- package/dist/types/tools/secret-substitution.d.ts.map +1 -1
- package/dist/types/tools/subagent-tool-policy.d.ts +16 -0
- package/dist/types/tools/subagent-tool-policy.d.ts.map +1 -0
- package/dist/types/tools/toolset-catalog.d.ts +1 -1
- package/dist/types/types/protocol_v2.d.ts +11 -5
- package/dist/types/types/protocol_v2.d.ts.map +1 -1
- package/dist/types/utils/checkout-readiness.d.ts +1 -1
- package/dist/types/utils/checkout-readiness.d.ts.map +1 -1
- package/dist/types/utils/secrets-store.d.ts +2 -0
- package/dist/types/utils/secrets-store.d.ts.map +1 -1
- package/dist/types/utils/shell-context.d.ts +8 -0
- package/dist/types/utils/shell-context.d.ts.map +1 -1
- package/dist/types/utils/subagent-depth-env.d.ts +9 -0
- package/dist/types/utils/subagent-depth-env.d.ts.map +1 -0
- package/dist/types/websocket/listener/queue.d.ts.map +1 -1
- package/letta.js +1559 -1608
- package/package.json +1 -1
- package/scripts/source-file-size-baseline.json +4 -4
- package/skills/creating-mods/references/events.md +2 -0
- package/skills/self-configuration/SKILL.md +32 -38
- package/dist/types/channels/gateway-assistant-relay.d.ts +0 -37
- package/dist/types/channels/gateway-assistant-relay.d.ts.map +0 -1
- package/dist/types/channels/gateway-registration-policy.d.ts +0 -14
- package/dist/types/channels/gateway-registration-policy.d.ts.map +0 -1
- package/dist/types/channels/gateway-runtime-registration.d.ts +0 -12
- package/dist/types/channels/gateway-runtime-registration.d.ts.map +0 -1
- package/dist/types/channels/gateway-runtime-state.d.ts +0 -48
- package/dist/types/channels/gateway-runtime-state.d.ts.map +0 -1
- package/dist/types/channels/gateway-runtime-tool-scopes.d.ts +0 -26
- package/dist/types/channels/gateway-runtime-tool-scopes.d.ts.map +0 -1
- package/dist/types/channels/gateway-types.d.ts +0 -71
- package/dist/types/channels/gateway-types.d.ts.map +0 -1
- package/dist/types/types/channel-account-protocol.d.ts +0 -14
- package/dist/types/types/channel-account-protocol.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"src/cli/mods/local-mod-loader.test.ts": 1043,
|
|
20
20
|
"src/cli/reflection-transcript.test.ts": 1084,
|
|
21
21
|
"src/cli/subcommands/skills.ts": 1264,
|
|
22
|
-
"src/headless.ts":
|
|
22
|
+
"src/headless.ts": 4778,
|
|
23
23
|
"src/hooks/integration.test.ts": 1147,
|
|
24
24
|
"src/index.ts": 2577,
|
|
25
25
|
"src/mods/learning-harness.ts": 2434,
|
|
26
26
|
"src/mods/mod-engine.test.ts": 2153,
|
|
27
|
-
"src/mods/mod-engine.ts":
|
|
27
|
+
"src/mods/mod-engine.ts": 1836,
|
|
28
28
|
"src/mods/package-installer.test.ts": 1248,
|
|
29
29
|
"src/mods/package-installer.ts": 1201,
|
|
30
30
|
"src/mods/package-registry.ts": 1033,
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"src/providers/chatgpt-usage-service.ts": 1112,
|
|
34
34
|
"src/settings-manager.test.ts": 1635,
|
|
35
35
|
"src/settings-manager.ts": 2092,
|
|
36
|
-
"src/tools/manager.ts":
|
|
36
|
+
"src/tools/manager.ts": 2610,
|
|
37
37
|
"src/tools/tool-execution-context.test.ts": 1092,
|
|
38
|
-
"src/types/protocol_v2.ts":
|
|
38
|
+
"src/types/protocol_v2.ts": 2548,
|
|
39
39
|
"src/websocket/listen-client-concurrency.test.ts": 2557,
|
|
40
40
|
"src/websocket/listen-client-protocol.test.ts": 5707,
|
|
41
41
|
"src/websocket/listener/commands/memory.ts": 1114,
|
|
@@ -226,6 +226,8 @@ letta.events.on("turn_start", (event) => {
|
|
|
226
226
|
|
|
227
227
|
If multiple handlers cancel, the first valid cancel reason wins. A valid reason is a non-empty string after trimming. Cancellation does not synthesize an assistant response or tool result; it only tells the host not to submit this turn.
|
|
228
228
|
|
|
229
|
+
Don't cancel every turn because the guard's own dependency failed (for example, a missing bootstrap file); that locks the user out until they edit or remove the mod and run `/reload`. Guard the risky tool with `tool_start` instead.
|
|
230
|
+
|
|
229
231
|
Handlers run in registration order. Later handlers see the current input after earlier mutations/returns. If a handler throws, its partial `event.input` mutation is rolled back and the error is recorded as a mod diagnostic.
|
|
230
232
|
|
|
231
233
|
`turn_start` is intentionally a trusted local mod point: it can rewrite user messages, approval results, and ordering. Keep transforms focused and unsurprising.
|
|
@@ -50,8 +50,10 @@ If a broken model or prompt prevents the agent from completing a turn, recover o
|
|
|
50
50
|
Local settings, server state, and the current process are different sources of truth. Inspect the layer you intend to change before writing it.
|
|
51
51
|
|
|
52
52
|
- `letta model list [--byok | --hosted]` lists available models.
|
|
53
|
-
- `letta model set [model_handle] [--reasoning <reasoning-option>] [--default]` changes the current conversation's model or
|
|
54
|
-
- `letta model get [--default]` gets the current model configuration
|
|
53
|
+
- `letta model set [model_handle] [--reasoning <reasoning-option>] [--model-settings <json>] [--default]` changes the current conversation's model, reasoning, or individual `model_settings` fields; add `--default` only when the user asks for the agent default.
|
|
54
|
+
- `letta model get [--default]` gets the current model configuration, including the full redacted `model_settings`; `--default` gets the agent's default configuration.
|
|
55
|
+
|
|
56
|
+
`letta model` reads and writes through the active backend, so it works the same on every backend. Prefer it over the REST helper scripts for anything model-related.
|
|
55
57
|
|
|
56
58
|
### Account credits and model quota
|
|
57
59
|
|
|
@@ -77,14 +79,12 @@ Use the secret-safe local/runtime report for harness settings, permissions, and
|
|
|
77
79
|
python3 <SKILL_DIR>/scripts/show_config.py --cwd "$PWD"
|
|
78
80
|
```
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Read each model scope with `letta model get` before changing it:
|
|
81
83
|
|
|
82
84
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
|
|
87
|
-
--target conversation --conversation-id "$CONVERSATION_ID" --show
|
|
85
|
+
letta model get # current conversation (or agent if none)
|
|
86
|
+
letta model get --default # agent default
|
|
87
|
+
letta model get --conversation "$CONVERSATION_ID"
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Do not infer an agent default from one conversation or infer a conversation override from the agent. Report both when diagnosing model or context differences.
|
|
@@ -116,7 +116,27 @@ Do not use API system-prompt replacement for ordinary learning. That can clobber
|
|
|
116
116
|
|
|
117
117
|
## Server-side agent and conversation settings
|
|
118
118
|
|
|
119
|
-
Server fields control model execution and agent metadata.
|
|
119
|
+
Server fields control model execution and agent metadata. Change the current conversation for model changes. Change the agent default only when the user asks for it.
|
|
120
|
+
|
|
121
|
+
### Model and model settings
|
|
122
|
+
|
|
123
|
+
Use `letta model` for the model handle, reasoning level, and any `model_settings` field (for example the output-token limit, `temperature`, or `parallel_tool_calls`). It goes through the active backend, so it needs no extra credentials or base URL.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
letta model set "openai/gpt-5.2" # select a model (applies its defaults)
|
|
127
|
+
letta model set --reasoning high # change reasoning only
|
|
128
|
+
letta model set --model-settings '{"max_tokens":16384}' # use the key `letta model get` shows
|
|
129
|
+
letta model set --model-settings '{"temperature":0.2}' --default # agent default
|
|
130
|
+
letta model get # verify
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`--model-settings` takes a JSON object and shallow-merges it into the target's current `model_settings` (the conversation override when a conversation is targeted, otherwise the agent default). It keeps the model and every field you do not name. Keys are written as given, so use the field names that `letta model get` shows for the target; for example the output-token limit is stored as `max_tokens` on some backends and `max_output_tokens` on others. Nested objects such as `reasoning` are replaced as a whole, so include every nested key you want to keep. With a handle or `--reasoning`, the model selection is applied first and the given fields are merged on top. Selecting a new handle resets settings to that model's defaults, so reapply custom fields in the same command if needed.
|
|
134
|
+
|
|
135
|
+
Provider reasoning fields differ. Read [`references/model-settings.md`](references/model-settings.md) before changing reasoning or provider-specific settings.
|
|
136
|
+
|
|
137
|
+
### REST helper for other fields
|
|
138
|
+
|
|
139
|
+
`scripts/update-agent-settings.ts` covers fields `letta model` does not: `context_window_limit`, name, description, and system prompt replacement. It talks to the REST API at `LETTA_BASE_URL` and requires `LETTA_API_KEY`, so it only works against a server that exposes the REST API; it does not work on the embedded local backend.
|
|
120
140
|
|
|
121
141
|
Required environment for live API writes:
|
|
122
142
|
|
|
@@ -135,13 +155,12 @@ The scripts in this skill default to `AGENT_ID`, `CONVERSATION_ID`, and `LETTA_B
|
|
|
135
155
|
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts --help
|
|
136
156
|
```
|
|
137
157
|
|
|
138
|
-
Patch the current conversation
|
|
158
|
+
Patch the current conversation's context window limit:
|
|
139
159
|
|
|
140
160
|
```bash
|
|
141
161
|
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
|
|
142
162
|
--target conversation \
|
|
143
163
|
--conversation-id "$CONVERSATION_ID" \
|
|
144
|
-
--model "openai/gpt-5.2" \
|
|
145
164
|
--context-window-limit 64000 \
|
|
146
165
|
--dry-run
|
|
147
166
|
```
|
|
@@ -152,7 +171,6 @@ Patch the agent default only when the user asks for it:
|
|
|
152
171
|
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
|
|
153
172
|
--target agent \
|
|
154
173
|
--agent-id "$AGENT_ID" \
|
|
155
|
-
--model "openai/gpt-5.2" \
|
|
156
174
|
--context-window-limit 64000
|
|
157
175
|
```
|
|
158
176
|
|
|
@@ -176,31 +194,7 @@ npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
|
|
|
176
194
|
--dry-run
|
|
177
195
|
```
|
|
178
196
|
|
|
179
|
-
Do not patch `llm_config` directly. Use `model
|
|
180
|
-
|
|
181
|
-
### Model settings
|
|
182
|
-
|
|
183
|
-
`model_settings` is usually replacement-style. Fetch the current object first and preserve fields you still need, or pass `--merge-model-settings`. Merge dry runs fetch current state and require `LETTA_API_KEY` because they preview preserved fields, not just the local patch fragment.
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
cat > /tmp/model-settings.json <<'JSON'
|
|
187
|
-
{
|
|
188
|
-
"provider_type": "openai",
|
|
189
|
-
"parallel_tool_calls": true,
|
|
190
|
-
"reasoning": { "reasoning_effort": "medium" }
|
|
191
|
-
}
|
|
192
|
-
JSON
|
|
193
|
-
|
|
194
|
-
npx tsx <SKILL_DIR>/scripts/update-agent-settings.ts \
|
|
195
|
-
--target agent \
|
|
196
|
-
--agent-id "$AGENT_ID" \
|
|
197
|
-
--model "openai/gpt-5.2" \
|
|
198
|
-
--model-settings-file /tmp/model-settings.json \
|
|
199
|
-
--merge-model-settings \
|
|
200
|
-
--dry-run
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Provider reasoning fields differ. Read [`references/model-settings.md`](references/model-settings.md) before changing reasoning or provider-specific settings.
|
|
197
|
+
Do not patch `llm_config` directly. Use `letta model` for the model and `model_settings`, `context_window_limit` for the context limit, and `name`/`description` for metadata. Then read back the agent or conversation (`letta model get` for model fields) and verify the result.
|
|
204
198
|
|
|
205
199
|
### Compaction settings
|
|
206
200
|
|
|
@@ -447,7 +441,7 @@ Do not start a second listener for the same channel accounts merely to apply new
|
|
|
447
441
|
|
|
448
442
|
| Script | Purpose |
|
|
449
443
|
| --- | --- |
|
|
450
|
-
| `scripts/update-agent-settings.ts` | Show or patch agent/conversation server
|
|
444
|
+
| `scripts/update-agent-settings.ts` | Show or patch REST-only agent/conversation fields (context limit, name, description, system prompt); needs a REST server and `LETTA_API_KEY` |
|
|
451
445
|
| `scripts/update-compaction-prompt.ts` | Preserve existing compaction settings while replacing the prompt |
|
|
452
446
|
| `scripts/add_permission.py` | Add allow/deny/ask/alwaysAsk rules to a chosen settings scope |
|
|
453
447
|
| `scripts/show_config.py` | Show runtime/local settings without dumping secret values |
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { StopReasonType, StreamDeltaMessage } from "../types/app-server-protocol";
|
|
2
|
-
import type { MessageChannelIdempotencyScope } from "./message-channel-idempotency";
|
|
3
|
-
import type { ChannelTurnSource } from "./types";
|
|
4
|
-
export interface GatewayAssistantTextAccumulatorState {
|
|
5
|
-
currentMessageId: string | null;
|
|
6
|
-
currentText: string;
|
|
7
|
-
deltaKeys: string[];
|
|
8
|
-
finalizedMessageIds: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface FinalizedGatewayAssistantMessage {
|
|
11
|
-
messageId: string;
|
|
12
|
-
text: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class GatewayAssistantTextAccumulator {
|
|
15
|
-
private currentMessageId;
|
|
16
|
-
private currentText;
|
|
17
|
-
private readonly deltaKeys;
|
|
18
|
-
private readonly finalizedMessageIds;
|
|
19
|
-
constructor(state?: GatewayAssistantTextAccumulatorState);
|
|
20
|
-
snapshot(): GatewayAssistantTextAccumulatorState;
|
|
21
|
-
handleDelta(message: StreamDeltaMessage): FinalizedGatewayAssistantMessage[];
|
|
22
|
-
finalizeCurrent(): FinalizedGatewayAssistantMessage | null;
|
|
23
|
-
}
|
|
24
|
-
export declare function relayFinalizedAssistantMessage(options: {
|
|
25
|
-
message: FinalizedGatewayAssistantMessage;
|
|
26
|
-
sources: ChannelTurnSource[];
|
|
27
|
-
idempotencyScope: MessageChannelIdempotencyScope;
|
|
28
|
-
relay?: (options: {
|
|
29
|
-
text: string;
|
|
30
|
-
sources: ChannelTurnSource[];
|
|
31
|
-
idempotencyScope: MessageChannelIdempotencyScope;
|
|
32
|
-
}) => void | Promise<void>;
|
|
33
|
-
}): void | Promise<void>;
|
|
34
|
-
export declare function stopReasonFromDelta(message: StreamDeltaMessage): StopReasonType | null;
|
|
35
|
-
export declare function runIdFromDelta(message: StreamDeltaMessage): string | undefined;
|
|
36
|
-
export declare function channelTurnOutcome(stopReason: StopReasonType): "completed" | "error" | "cancelled";
|
|
37
|
-
//# sourceMappingURL=gateway-assistant-relay.d.ts.map
|
|
@@ -1 +0,0 @@
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CAAC,IAAI,CAAC,CAAC;CAC5B,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBvB;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,kBAAkB,GAC1B,cAAc,GAAG,IAAI,CAOvB;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kBAAkB,GAC1B,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,cAAc,GACzB,WAAW,GAAG,OAAO,GAAG,WAAW,CAKrC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { RuntimeScope, RuntimeStartResponseMessage } from "../types/app-server-protocol";
|
|
2
|
-
import type { ChannelGatewayHooks, ChannelGatewayModelStatus } from "./gateway-types";
|
|
3
|
-
import type { ChannelTurnSource } from "./types";
|
|
4
|
-
export declare function prepareGatewayRegistrationPolicy(options: {
|
|
5
|
-
hooks: ChannelGatewayHooks;
|
|
6
|
-
runtime: RuntimeScope;
|
|
7
|
-
sources: ChannelTurnSource[];
|
|
8
|
-
override?: boolean;
|
|
9
|
-
}): Promise<{
|
|
10
|
-
automaticRelay: boolean;
|
|
11
|
-
tool: Awaited<ReturnType<ChannelGatewayHooks["buildExternalTool"]>>;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function modelStatusFromRuntimeStart(response: RuntimeStartResponseMessage, runtime: RuntimeScope): ChannelGatewayModelStatus;
|
|
14
|
-
//# sourceMappingURL=gateway-registration-policy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-registration-policy.d.ts","sourceRoot":"","sources":["../../../src/channels/gateway-registration-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,wBAAsB,gCAAgC,CAAC,OAAO,EAAE;IAC9D,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,OAAO,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CACrE,CAAC,CAeD;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,YAAY,GACpB,yBAAyB,CAiB3B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RuntimeStartExternalToolsGroup } from "../types/app-server-protocol";
|
|
2
|
-
import type { GatewayRuntimeState } from "./gateway-runtime-state";
|
|
3
|
-
import type { ChannelGatewayClient, ChannelGatewayDelivery, ChannelGatewayHooks } from "./gateway-types";
|
|
4
|
-
export declare function performGatewayRuntimeRegistration(options: {
|
|
5
|
-
client: ChannelGatewayClient;
|
|
6
|
-
hooks: ChannelGatewayHooks;
|
|
7
|
-
state: GatewayRuntimeState;
|
|
8
|
-
delivery: ChannelGatewayDelivery;
|
|
9
|
-
policyOverride?: boolean;
|
|
10
|
-
externalToolsOverride?: readonly RuntimeStartExternalToolsGroup[];
|
|
11
|
-
}): Promise<boolean>;
|
|
12
|
-
//# sourceMappingURL=gateway-runtime-registration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-runtime-registration.d.ts","sourceRoot":"","sources":["../../../src/channels/gateway-runtime-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAKlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,wBAAsB,iCAAiC,CAAC,OAAO,EAAE;IAC/D,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,SAAS,8BAA8B,EAAE,CAAC;CACnE,GAAG,OAAO,CAAC,OAAO,CAAC,CAsEnB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { RuntimeScope } from "../types/app-server-protocol";
|
|
2
|
-
import type { GatewayAssistantTextAccumulator } from "./gateway-assistant-relay";
|
|
3
|
-
import type { GatewayToolScope } from "./gateway-runtime-tool-scopes";
|
|
4
|
-
import type { ChannelGatewayModelStatus, ChannelGatewayRichDraft } from "./gateway-types";
|
|
5
|
-
import type { MessageChannelIdempotencyScope } from "./message-channel-idempotency";
|
|
6
|
-
import type { createChannelTurnProgressBuilder } from "./progress-builder";
|
|
7
|
-
import type { ChannelTurnSource } from "./types";
|
|
8
|
-
export type ActiveGatewayTurn = {
|
|
9
|
-
batchId: string;
|
|
10
|
-
routingSources: ChannelTurnSource[];
|
|
11
|
-
lifecycleSources: ChannelTurnSource[];
|
|
12
|
-
progress: ReturnType<typeof createChannelTurnProgressBuilder>;
|
|
13
|
-
richDraft: ChannelGatewayRichDraft | null;
|
|
14
|
-
runId?: string;
|
|
15
|
-
assistantText: GatewayAssistantTextAccumulator;
|
|
16
|
-
idempotencyScope: MessageChannelIdempotencyScope;
|
|
17
|
-
relayEligible: boolean;
|
|
18
|
-
toolScopes: GatewayToolScope[];
|
|
19
|
-
};
|
|
20
|
-
export type GatewayRuntimeState = {
|
|
21
|
-
runtime: RuntimeScope;
|
|
22
|
-
pendingSourcesByClientMessageId: Map<string, {
|
|
23
|
-
sources: ChannelTurnSource[];
|
|
24
|
-
disposition: "submitting" | "queued";
|
|
25
|
-
automaticRelay: boolean;
|
|
26
|
-
toolScope?: GatewayToolScope;
|
|
27
|
-
removalDisposition?: "dequeued" | "cancelled";
|
|
28
|
-
}>;
|
|
29
|
-
active: ActiveGatewayTurn | null;
|
|
30
|
-
registrationSignature: string | null;
|
|
31
|
-
registration: Promise<void> | null;
|
|
32
|
-
routedSources: ChannelTurnSource[];
|
|
33
|
-
replayedControlRequestIds: Set<string>;
|
|
34
|
-
submissionQueue: Promise<void>;
|
|
35
|
-
hookQueue: Promise<void> | null;
|
|
36
|
-
acceptedClientMessageIds: Set<string>;
|
|
37
|
-
modelStatus: ChannelGatewayModelStatus | null;
|
|
38
|
-
};
|
|
39
|
-
export declare function gatewayRuntimeKey(runtime: RuntimeScope<string | null>): string;
|
|
40
|
-
export declare function hasAgentRuntime<T extends {
|
|
41
|
-
runtime?: RuntimeScope<string | null> | null;
|
|
42
|
-
}>(value: T): value is T & {
|
|
43
|
-
runtime: RuntimeScope;
|
|
44
|
-
};
|
|
45
|
-
export declare function hasGatewayRuntimeWork(state: GatewayRuntimeState | undefined): boolean;
|
|
46
|
-
export declare function rememberAcceptedClientMessageId(state: GatewayRuntimeState, clientMessageId: string): void;
|
|
47
|
-
export declare function remainingGatewaySources(state: GatewayRuntimeState): ChannelTurnSource[];
|
|
48
|
-
//# sourceMappingURL=gateway-runtime-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-runtime-state.d.ts","sourceRoot":"","sources":["../../../src/channels/gateway-runtime-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,E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,CAAC,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,wBAAwB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,WAAW,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,GACnC,MAAM,CAER;AAED,wBAAgB,eAAe,CAC7B,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;CAAE,EAC1D,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,EAAE,YAAY,CAAA;CAAE,CAElD;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,OAAO,CAIT;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,mBAAmB,EAC1B,eAAe,EAAE,MAAM,GACtB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,GACzB,iBAAiB,EAAE,CAOrB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ExternalToolDefinitionPayload, RuntimeExternalToolsUpdateGroup, RuntimeScope, RuntimeStartExternalToolsGroup } from "../types/app-server-protocol";
|
|
2
|
-
import type { ChannelGatewayClient, ChannelGatewayToolScopeState } from "./gateway-types";
|
|
3
|
-
import type { ChannelTurnSource } from "./types";
|
|
4
|
-
export type GatewayToolScope = ChannelGatewayToolScopeState;
|
|
5
|
-
export declare class GatewayRuntimeToolScopes {
|
|
6
|
-
private readonly client;
|
|
7
|
-
private readonly states;
|
|
8
|
-
private readonly retryTimers;
|
|
9
|
-
private closed;
|
|
10
|
-
constructor(client: ChannelGatewayClient);
|
|
11
|
-
create(runtime: RuntimeScope, sources: ChannelTurnSource[], automaticRelay: boolean, tool: ExternalToolDefinitionPayload | null): GatewayToolScope;
|
|
12
|
-
retain(scope: GatewayToolScope): void;
|
|
13
|
-
detach(scope: GatewayToolScope): GatewayToolScope;
|
|
14
|
-
release(scope: GatewayToolScope): void;
|
|
15
|
-
resolve(runtime: RuntimeScope<string | null>, scopeId: string): GatewayToolScope | null;
|
|
16
|
-
selection(scope: GatewayToolScope): string[];
|
|
17
|
-
hasRetainedScopes(runtime: RuntimeScope<string | null>): boolean;
|
|
18
|
-
registrationGroups(runtime: RuntimeScope<string | null>, includeUnscoped: boolean): readonly RuntimeStartExternalToolsGroup[];
|
|
19
|
-
setDesiredUnscoped(runtime: RuntimeScope<string | null>, groups: readonly RuntimeStartExternalToolsGroup[]): void;
|
|
20
|
-
updateDesiredUnscoped(updates: readonly RuntimeExternalToolsUpdateGroup[], isBusy: (runtime: RuntimeScope<string | null>) => boolean): Promise<void>;
|
|
21
|
-
flushWhenIdle(runtime: RuntimeScope<string | null>, isBusy: () => boolean, schedule: (task: () => Promise<void>) => Promise<void>): void;
|
|
22
|
-
forgetRuntime(runtime: RuntimeScope<string | null>): void;
|
|
23
|
-
close(): void;
|
|
24
|
-
private getState;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=gateway-runtime-tool-scopes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-runtime-tool-scopes.d.ts","sourceRoot":"","sources":["../../../src/channels/gateway-runtime-tool-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,+BAA+B,EAC/B,YAAY,EACZ,8BAA8B,EAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQjD,MAAM,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAQ5D,qBAAa,wBAAwB;IAKvB,O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M,OAAO,EACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GACrD,IAAI;IA4BP,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI;IAIzD,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,QAAQ;CASjB"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { MessageCreate } from "@letta-ai/letta-client/resources/agents/agents";
|
|
2
|
-
import type { ExternalToolCallRequestMessage, ExternalToolCallResult, ExternalToolDefinitionPayload, InputAcceptedResponseMessage, InputCommand, RuntimeExternalToolsUpdateGroup, RuntimeExternalToolsUpdateResponseMessage, RuntimeScope, RuntimeStartCommand, RuntimeStartExternalToolsGroup, RuntimeStartResponseMessage, WsProtocolMessage } from "../types/app-server-protocol";
|
|
3
|
-
import type { GatewayAssistantTextAccumulatorState } from "./gateway-assistant-relay";
|
|
4
|
-
import type { MessageChannelIdempotencyScope, MessageChannelIdempotencyState } from "./message-channel-idempotency";
|
|
5
|
-
import type { ChannelControlRequestEvent, ChannelDefaultPermissionMode, ChannelTurnLifecycleEvent, ChannelTurnProgressEvent, ChannelTurnSource } from "./types";
|
|
6
|
-
export interface ChannelGatewayClient {
|
|
7
|
-
close(): void;
|
|
8
|
-
onMessage(listener: (message: WsProtocolMessage) => void): () => void;
|
|
9
|
-
onExternalToolCall(handler: (request: ExternalToolCallRequestMessage) => Promise<ExternalToolCallResult> | ExternalToolCallResult): () => void;
|
|
10
|
-
submitInput(command: Omit<InputCommand, "type">): Promise<InputAcceptedResponseMessage>;
|
|
11
|
-
runtimeStart(options: Omit<RuntimeStartCommand, "type" | "request_id"> & {
|
|
12
|
-
request_id?: string;
|
|
13
|
-
}): Promise<RuntimeStartResponseMessage>;
|
|
14
|
-
runtimeExternalToolsUpdate(options: {
|
|
15
|
-
updates: readonly RuntimeExternalToolsUpdateGroup[];
|
|
16
|
-
}): Promise<RuntimeExternalToolsUpdateResponseMessage>;
|
|
17
|
-
}
|
|
18
|
-
export interface ChannelGatewayHooks {
|
|
19
|
-
buildExternalTool(runtime: RuntimeScope, sources: ChannelTurnSource[], policy?: {
|
|
20
|
-
automaticRelay: boolean;
|
|
21
|
-
}): Promise<ExternalToolDefinitionPayload | null>;
|
|
22
|
-
resolveAssistantRelayPolicy?(runtime: RuntimeScope, sources: ChannelTurnSource[]): boolean | Promise<boolean>;
|
|
23
|
-
executeExternalTool(request: ExternalToolCallRequestMessage, sources: ChannelTurnSource[], idempotencyScope?: MessageChannelIdempotencyScope | null): Promise<ExternalToolCallResult> | ExternalToolCallResult;
|
|
24
|
-
relayAssistantText?(options: {
|
|
25
|
-
text: string;
|
|
26
|
-
sources: ChannelTurnSource[];
|
|
27
|
-
idempotencyScope: MessageChannelIdempotencyScope;
|
|
28
|
-
}): void | Promise<void>;
|
|
29
|
-
onLifecycle(event: ChannelTurnLifecycleEvent): void | Promise<void>;
|
|
30
|
-
onProgress(event: ChannelTurnProgressEvent): void | Promise<void>;
|
|
31
|
-
onControlRequest(event: ChannelControlRequestEvent): void | Promise<void>;
|
|
32
|
-
createRichDraft?(options: {
|
|
33
|
-
batchId: string;
|
|
34
|
-
sources: ChannelTurnSource[];
|
|
35
|
-
}): ChannelGatewayRichDraft | null;
|
|
36
|
-
}
|
|
37
|
-
export interface ChannelGatewayDelivery {
|
|
38
|
-
runtime: RuntimeScope;
|
|
39
|
-
content: MessageCreate["content"];
|
|
40
|
-
sources: ChannelTurnSource[];
|
|
41
|
-
clientMessageId: string;
|
|
42
|
-
defaultPermissionMode?: ChannelDefaultPermissionMode;
|
|
43
|
-
}
|
|
44
|
-
export interface ChannelGatewayActiveTurnState {
|
|
45
|
-
assistantText: GatewayAssistantTextAccumulatorState;
|
|
46
|
-
idempotency: MessageChannelIdempotencyState;
|
|
47
|
-
/** Effective policy captured when this turn was registered. */
|
|
48
|
-
automaticRelay?: boolean;
|
|
49
|
-
/** Immutable scoped tool registrations retained across ownership handoff. */
|
|
50
|
-
toolScopes?: ChannelGatewayToolScopeState[];
|
|
51
|
-
}
|
|
52
|
-
export interface ChannelGatewayToolScopeState {
|
|
53
|
-
id: string;
|
|
54
|
-
runtime: RuntimeScope;
|
|
55
|
-
sources: ChannelTurnSource[];
|
|
56
|
-
automaticRelay: boolean;
|
|
57
|
-
group?: RuntimeStartExternalToolsGroup;
|
|
58
|
-
}
|
|
59
|
-
export type ChannelGatewayHandoffDelivery = Omit<ChannelGatewayDelivery, "content"> & {
|
|
60
|
-
activeTurnState?: ChannelGatewayActiveTurnState;
|
|
61
|
-
};
|
|
62
|
-
export interface ChannelGatewayRichDraft {
|
|
63
|
-
handleDelta(delta: import("../types/app-server-protocol").StreamDeltaMessage["delta"]): void;
|
|
64
|
-
flushPending(): Promise<void>;
|
|
65
|
-
dispose(): void;
|
|
66
|
-
}
|
|
67
|
-
export interface ChannelGatewayModelStatus {
|
|
68
|
-
modelHandle: string | null;
|
|
69
|
-
scope: "agent" | "conversation";
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=gateway-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-types.d.ts","sourceRoot":"","sources":["../../../src/channels/gateway-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,YAAY,EACZ,+BAA+B,EAC/B,yCAAyC,EACzC,YAAY,EACZ,mBAAmB,EACnB,8BAA8B,EAC9B,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,+BAA+B,CAAC;AACvC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;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,8BAA8B,CAAC;CACxC;AAED,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,sBAAsB,EACtB,SAAS,CACV,GAAG;IACF,eAAe,CAAC,EAAE,6BAA6B,CAAC;CACjD,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,WAAW,CACT,KAAK,EAAE,OAAO,6BAA6B,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACvE,IAAI,CAAC;IACR,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,OAAO,GAAG,cAAc,CAAC;CACjC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type DmPolicy = "pairing" | "allowlist" | "open";
|
|
2
|
-
export type ChannelReplyMode = "tool" | "relay";
|
|
3
|
-
export type ChannelPluginConfig = Record<string, unknown>;
|
|
4
|
-
export interface ChannelAccountCreatePayload {
|
|
5
|
-
account_id?: string;
|
|
6
|
-
display_name?: string;
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
dm_policy?: DmPolicy;
|
|
9
|
-
reply_mode?: ChannelReplyMode;
|
|
10
|
-
allowed_users?: string[];
|
|
11
|
-
/** Plugin-owned account config. New fields should be added here, not centrally. */
|
|
12
|
-
config?: ChannelPluginConfig;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=channel-account-protocol.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel-account-protocol.d.ts","sourceRoot":"","sources":["../../../src/types/channel-account-protocol.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1D,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|