@letta-ai/letta-code 0.33.4 → 0.33.6
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 +2 -0
- package/dist/app-server-client.cjs +2 -2
- package/dist/app-server-client.cjs.map +3 -3
- package/dist/app-server-client.js +2 -2
- package/dist/app-server-client.js.map +3 -3
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/types/agent/subagents/names.d.ts +1 -1
- package/dist/types/agent/subagents/names.d.ts.map +1 -1
- package/dist/types/backend/backend.d.ts +14 -0
- package/dist/types/backend/backend.d.ts.map +1 -1
- package/dist/types/backend/dev/fake-headless-backend.d.ts.map +1 -1
- package/dist/types/backend/local/local-backend.d.ts +9 -0
- package/dist/types/backend/local/local-backend.d.ts.map +1 -1
- package/dist/types/backend/local/local-conversation-record.d.ts +8 -0
- package/dist/types/backend/local/local-conversation-record.d.ts.map +1 -0
- package/dist/types/backend/local/local-store.d.ts +14 -1
- package/dist/types/backend/local/local-store.d.ts.map +1 -1
- package/dist/types/backend/local/local-types.d.ts +7 -0
- package/dist/types/backend/local/local-types.d.ts.map +1 -1
- package/dist/types/cli/helpers/app-urls.d.ts +7 -0
- package/dist/types/cli/helpers/app-urls.d.ts.map +1 -1
- package/dist/types/reflection-settings.d.ts +2 -0
- package/dist/types/reflection-settings.d.ts.map +1 -1
- package/dist/types/tools/impl/external-coding-agent-task.d.ts +2 -0
- package/dist/types/tools/impl/external-coding-agent-task.d.ts.map +1 -1
- package/dist/types/tools/impl/external-coding-agent.d.ts +2 -0
- package/dist/types/tools/impl/external-coding-agent.d.ts.map +1 -1
- package/dist/types/tools/impl/native-session-capture.d.ts +19 -0
- package/dist/types/tools/impl/native-session-capture.d.ts.map +1 -0
- package/dist/types/tools/impl/send-agent-message.d.ts.map +1 -1
- package/dist/types/tools/impl/task.d.ts.map +1 -1
- package/dist/types/tools/impl/workflow.d.ts.map +1 -1
- package/dist/types/tools/workflow/decide.d.ts +32 -0
- package/dist/types/tools/workflow/decide.d.ts.map +1 -0
- package/dist/types/tools/workflow/execution-registry.d.ts.map +1 -1
- package/dist/types/tools/workflow/journal.d.ts +15 -2
- package/dist/types/tools/workflow/journal.d.ts.map +1 -1
- package/dist/types/tools/workflow/sdk-loader.d.ts +5 -2
- package/dist/types/tools/workflow/sdk-loader.d.ts.map +1 -1
- package/dist/types/tools/workflow/sdk-spawner.d.ts +23 -0
- package/dist/types/tools/workflow/sdk-spawner.d.ts.map +1 -1
- package/dist/types/tools/workflow/types.d.ts +13 -3
- package/dist/types/tools/workflow/types.d.ts.map +1 -1
- package/dist/types/tools/workflow/workflow-engine.d.ts +1 -1
- package/dist/types/tools/workflow/workflow-engine.d.ts.map +1 -1
- package/dist/types/types/app-server-info.d.ts +2 -0
- package/dist/types/types/app-server-info.d.ts.map +1 -1
- package/letta.js +2512 -1850
- package/package.json +2 -2
- package/scripts/source-file-size-baseline.json +1 -1
- package/skills/workflow-authoring/SKILL.md +36 -5
- package/skills/working-across-computers/SKILL.md +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.6",
|
|
4
4
|
"lettaStartupLogProtocol": 1,
|
|
5
5
|
"description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
6
6
|
"type": "module",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"dependencies": {
|
|
133
133
|
"@earendil-works/pi-ai": "^0.87.1",
|
|
134
134
|
"@janhapke/sharp-electron": "0.35.3-electron.1",
|
|
135
|
-
"@letta-ai/letta-agent-sdk": "
|
|
135
|
+
"@letta-ai/letta-agent-sdk": "0.8.21",
|
|
136
136
|
"@letta-ai/letta-client": "^1.10.2",
|
|
137
137
|
"@letta-ai/trajectory": "0.2.0",
|
|
138
138
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"src/agent/client-skills.test.ts": 1134,
|
|
3
3
|
"src/agent/memory-git.ts": 2013,
|
|
4
4
|
"src/backend/local-backend.test.ts": 2472,
|
|
5
|
-
"src/backend/local/local-store.ts":
|
|
5
|
+
"src/backend/local/local-store.ts": 3267,
|
|
6
6
|
"src/backend/pi-stream-adapter.test.ts": 1255,
|
|
7
7
|
"src/cli/app/AppCoordinator.tsx": 5109,
|
|
8
8
|
"src/cli/app/AppView.tsx": 1735,
|
|
@@ -64,7 +64,9 @@ the tool's `model` input) accepts any handle or alias listed by
|
|
|
64
64
|
`letta model list`; an unknown value resolves that call to `null`. Use a
|
|
65
65
|
cheaper model for mechanical stages only when you know a valid handle.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Use the invoking backend for workflow workers. Local execution requires an Agent
|
|
68
|
+
SDK and App Server with local conversation support; `decide()` still uses the
|
|
69
|
+
Cloud decisions service.
|
|
68
70
|
|
|
69
71
|
## Script body hooks
|
|
70
72
|
|
|
@@ -78,7 +80,8 @@ Workflow subagents require the API backend.
|
|
|
78
80
|
`json`, `model`, `effort` (`'low'` for mechanical stages, higher for the
|
|
79
81
|
hardest verify/judge stages), `allowedTools`, `systemPrompt` (extra system
|
|
80
82
|
prompt for this subagent), `timeoutMs` (default 10 minutes), `maxToolCalls`
|
|
81
|
-
(positive safe integer; default 1000 unique tool calls for this subagent)
|
|
83
|
+
(positive safe integer; default 1000 unique tool calls for this subagent),
|
|
84
|
+
`conversationId` (resume a worker — see "Diagnosing a run").
|
|
82
85
|
- `pipeline(items, stage1, stage2, ...)` → run each item through all stages
|
|
83
86
|
independently, NO barrier between stages. Item A can be in stage 3 while
|
|
84
87
|
item B is still in stage 1. This is the DEFAULT for multi-stage work.
|
|
@@ -95,9 +98,30 @@ Workflow subagents require the API backend.
|
|
|
95
98
|
- `phase(title)` — start a new phase; subsequent agent() calls are grouped
|
|
96
99
|
under this title in progress output.
|
|
97
100
|
- `log(message)` — emit a progress message to the user.
|
|
101
|
+
- `decide(state, questions, opts?)` → Promise; not a subagent call. Ask a
|
|
102
|
+
calibrated Jev model (chosen internally — no model option) questions about
|
|
103
|
+
`state`. `questions` is a non-empty OBJECT keyed by question id — never an
|
|
104
|
+
array. Each question needs `instructions` and a `type`: `choice` (criteria
|
|
105
|
+
map of id → description, ≤255), `score` (criteria array of strings, unlike
|
|
106
|
+
`questions`), `noul` (no criteria). Returns a response whose `answers` are
|
|
107
|
+
keyed by the same ids and calibrated, or `null` after one retried invalid
|
|
108
|
+
answer — guard `if (!call)`; API errors throw.
|
|
109
|
+
|
|
110
|
+
const call = await decide(evidence, {
|
|
111
|
+
behavior: { type: 'choice', instructions: 'Is this behavior a bug?',
|
|
112
|
+
criteria: { bad: 'Wrong or harmful', not_bad: 'Expected or harmless' } },
|
|
113
|
+
})
|
|
114
|
+
const verdict = call?.answers?.behavior?.choice // 'bad' | 'not_bad'
|
|
115
|
+
|
|
98
116
|
- `args` — the value passed as the tool's `args` input, verbatim. Pass
|
|
99
117
|
arrays/objects as actual JSON values, NOT as a JSON-encoded string.
|
|
100
118
|
|
|
119
|
+
`decide()` sees only the `state` you pass; it cannot read files. When compact,
|
|
120
|
+
bounded items are already prepared, pass them via `args` and call `decide()`
|
|
121
|
+
on each directly — don't spawn `agent()` readers just to relay inputs. Raw
|
|
122
|
+
large traces don't belong in `args`: prepare bounded state that preserves the
|
|
123
|
+
user instruction, observed action, and outcome, and mark what was omitted.
|
|
124
|
+
|
|
101
125
|
Scripts are plain JavaScript, NOT TypeScript — type annotations, interfaces,
|
|
102
126
|
and generics fail to parse. The script body runs in an async context — use
|
|
103
127
|
`await` directly and `return` the final result. Standard JS built-ins (JSON,
|
|
@@ -125,9 +149,9 @@ A barrier is NOT justified by:
|
|
|
125
149
|
slowest takes 3× the fastest, a barrier wastes 2/3 of the fast finders'
|
|
126
150
|
idle time.
|
|
127
151
|
|
|
128
|
-
|
|
129
|
-
excess calls queue and run as slots free up,
|
|
130
|
-
|
|
152
|
+
`agent()` and `decide()` share one pool of concurrent slots per run
|
|
153
|
+
(`maxConcurrent`, default 16) — excess calls queue and run as slots free up,
|
|
154
|
+
so passing 100 items is fine. Each has its own 1000-call lifetime backstop.
|
|
131
155
|
A single parallel()/pipeline() call accepts at most 4096 items.
|
|
132
156
|
|
|
133
157
|
When a barrier IS correct — dedup across all findings before expensive
|
|
@@ -216,3 +240,10 @@ diagnosing why a workflow returned an empty or unexpected result, read that
|
|
|
216
240
|
journal — it records each agent's actual return value and, for a `null`,
|
|
217
241
|
which guard or error produced it. A failed run is not resumable: fix the
|
|
218
242
|
script and launch it again.
|
|
243
|
+
|
|
244
|
+
The script is never replayed, but one worker can continue:
|
|
245
|
+
`agent(prompt, {conversationId})` re-prompts it with history and model intact,
|
|
246
|
+
using a journal ID and only once its last Run is terminal. Local workers can
|
|
247
|
+
only continue inside the same workflow execution that observed their completed
|
|
248
|
+
turn. Tools default to `[]`; `schema` and `effort` are chosen per turn. Needs
|
|
249
|
+
SDK 0.8.20+.
|
|
@@ -92,3 +92,14 @@ letta sandbox download <sandbox-path> --agent <agent-id> --to <local-path>
|
|
|
92
92
|
- Download sources must be under `/root/downloads`; `--to` selects the destination path on the receiving computer. Without `--to`, download saves under the source file's basename.
|
|
93
93
|
- Transfer files directly, not as base64 or file contents through model messages. Return the path and destination IDs; verify received contents or checksums.
|
|
94
94
|
- These commands transfer files to/from Cloud sandboxes, not arbitrary remote filesystems. No sandbox ID or separate wake command is needed.
|
|
95
|
+
|
|
96
|
+
## Share a live view of a Cloud sandbox desktop
|
|
97
|
+
|
|
98
|
+
When someone outside chat (Slack, email, a teammate) needs to watch or drive the sandbox desktop, mint a viewer link:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
letta sandbox desktop-link # this conversation's sandbox
|
|
102
|
+
letta sandbox desktop-link --conversation <conv-id> # another Cloud conversation
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
It prints `{ url, expiresAt }`. The URL opens the desktop in a browser tab with no sign-in. Anyone holding it can view and control the desktop until `expiresAt` (about one hour), so hand it to the person who asked, in a private message or thread, and say when it expires. Mint a new one if it lapses. The sandbox must be a ready Linux VM with desktop support; the command reports the server's error otherwise.
|