@letta-ai/letta-code 0.34.55 → 0.34.57

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.34.55",
3
+ "version": "0.34.57",
4
4
  "lockfileVersion": 3,
5
5
  "packages": {
6
6
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -17,9 +17,9 @@
17
17
  }
18
18
  },
19
19
  "node_modules/@anthropic-ai/sdk": {
20
- "version": "0.124.0",
21
- "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.124.0.tgz",
22
- "integrity": "sha512-cN5O8i9UVxHeOQAzj/XjshWXG8KiibJDw9OGpH2Z/eR3n/RBxdoLxDJOcfqAJWvjaMDFfHTBADU04hWRJVkDyA==",
20
+ "version": "0.129.0",
21
+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.129.0.tgz",
22
+ "integrity": "sha512-MH7LB20kNpGLUpPTe2OG5XvL/KhX8HUO9XyBaFjgFk6TLS4Xjt0VPIuMKywe7POKKPslX+QxSlVok9e+8kG5Nw==",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
25
  "json-schema-to-ts": "^3.1.1",
@@ -546,21 +546,21 @@
546
546
  }
547
547
  },
548
548
  "node_modules/@earendil-works/pi-ai": {
549
- "version": "0.99.2",
550
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.99.2.tgz",
551
- "integrity": "sha512-9RFOEdY+ZTJ1AI+UuAFs4RM0tF2Tje/R/CEv9gWTJHt0iTu8XHZs64U/EIZxNSllFmec/4HfwsOxYj1qQek9bg==",
549
+ "version": "1.5.2",
550
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-1.5.2.tgz",
551
+ "integrity": "sha512-2tWPSnV3qzfiDIY3aWluBag3vC++Vs+VsXt/UquSU5onPMohPih72FUhIhaqmDdMYubOgB3Byl9uF4Vk40JLvQ==",
552
552
  "license": "MIT",
553
553
  "dependencies": {
554
- "@anthropic-ai/sdk": "0.124.0",
554
+ "@anthropic-ai/sdk": "0.129.0",
555
555
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
556
- "@earendil-works/pi-telemetry": "^0.99.2",
556
+ "@earendil-works/pi-schema": "1.5.2",
557
+ "@earendil-works/pi-telemetry": "1.5.2",
557
558
  "@google/genai": "2.21.0",
558
559
  "@smithy/node-http-handler": "4.12.1",
559
560
  "http-proxy-agent": "9.1.0",
560
561
  "https-proxy-agent": "9.1.0",
561
562
  "openai": "7.19.0",
562
- "partial-json": "0.1.7",
563
- "typebox": "1.3.27"
563
+ "partial-json": "0.1.7"
564
564
  },
565
565
  "bin": {
566
566
  "pi-ai": "dist/cli.js"
@@ -569,10 +569,19 @@
569
569
  "node": ">=22.19.0"
570
570
  }
571
571
  },
572
+ "node_modules/@earendil-works/pi-schema": {
573
+ "version": "1.5.2",
574
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-schema/-/pi-schema-1.5.2.tgz",
575
+ "integrity": "sha512-hJoyCXWUhsSrXY5wJo2Q4kHXUsR51pNhkJHAMkWRwVMLDRtMDPkKNaa+JlVRVqTw1hjdSxcVVaFLSDbKlaTXEQ==",
576
+ "license": "MIT",
577
+ "engines": {
578
+ "node": ">=22.19.0"
579
+ }
580
+ },
572
581
  "node_modules/@earendil-works/pi-telemetry": {
573
- "version": "0.99.2",
574
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.99.2.tgz",
575
- "integrity": "sha512-WThYU4XM6jjjzH4FzLdreN7QAPS9SDdokL0W0Ldheg1ssCIJkfpK7PgebFm7/PoQub7OiXx+SRF6B/oF7z7lXA==",
582
+ "version": "1.5.2",
583
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-1.5.2.tgz",
584
+ "integrity": "sha512-m+cumjIqNh1aMISi/9ttcG3ZOwIdriPbz/eMyWmRMJCGa/WcgY1RX4lrb7HvsHhSfI/JUeBESA4nOCr8C3y5ow==",
576
585
  "license": "MIT",
577
586
  "engines": {
578
587
  "node": ">=22.19.0"
@@ -613,9 +622,9 @@
613
622
  }
614
623
  },
615
624
  "node_modules/@hono/node-server": {
616
- "version": "2.1.7",
617
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.7.tgz",
618
- "integrity": "sha512-Wr0E6S+v2Bw9FkpGNP5BQ5QbJvclUa06UVehd65WFZe6XeJwbrKQQ5wPDevc0IC+QyzbO7v3Llh5uo45IZcSnA==",
625
+ "version": "2.1.8",
626
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.8.tgz",
627
+ "integrity": "sha512-jdf7FHh6A1lzjpHHQUgxsg2GeER2vMetnAOfeActzcoli6jamlK+NAwL6Dsr5Fl3BS3tYUQzCdtZjU8Qxv7bEA==",
619
628
  "license": "MIT",
620
629
  "engines": {
621
630
  "node": ">=20"
@@ -2435,9 +2444,9 @@
2435
2444
  }
2436
2445
  },
2437
2446
  "node_modules/cron-parser": {
2438
- "version": "5.10.4",
2439
- "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.4.tgz",
2440
- "integrity": "sha512-TagNqYzoV/C7Ty7VAQjrQg+57WsEOuQEUh0tWT5Dc+l/GOuoAdWVIzFU0CqYdQswqdjUalrdmOvaMtQhErYZTA==",
2447
+ "version": "5.10.5",
2448
+ "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.5.tgz",
2449
+ "integrity": "sha512-zxFew0gkBdb9HudAqeNLIZ2Phczw8oQDGDMYc1HUYvAaxZqhML2gZyUwVqaOs23YKDWXRRvd/nNo0ycGdXt80A==",
2441
2450
  "license": "MIT",
2442
2451
  "dependencies": {
2443
2452
  "luxon": "^3.7.2"
@@ -2611,9 +2620,9 @@
2611
2620
  "license": "MIT"
2612
2621
  },
2613
2622
  "node_modules/encodeurl": {
2614
- "version": "2.0.2",
2615
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.2.tgz",
2616
- "integrity": "sha512-ddmxiyS6ETq/v5/+mdA4fykK7JgEmqcShrGmQFTaKf5o43tL8XLuMzNLLsspuIC3/qGupS7Ci2TF+feJRkYY0w==",
2623
+ "version": "2.0.3",
2624
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz",
2625
+ "integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==",
2617
2626
  "license": "MIT",
2618
2627
  "engines": {
2619
2628
  "node": ">= 0.8"
@@ -4820,12 +4829,6 @@
4820
4829
  "url": "https://opencollective.com/express"
4821
4830
  }
4822
4831
  },
4823
- "node_modules/typebox": {
4824
- "version": "1.3.27",
4825
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.27.tgz",
4826
- "integrity": "sha512-zu+jc1pcy4UiNThxikUr36f0Rybk9PEeCg/NE6adeWr/SKsdNO4EzZHYRDlv2YCVAfj3Odq3dESSo/jNyoBXzA==",
4827
- "license": "MIT"
4828
- },
4829
4832
  "node_modules/undici-types": {
4830
4833
  "version": "8.9.0",
4831
4834
  "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
@@ -5009,9 +5012,9 @@
5009
5012
  "license": "ISC"
5010
5013
  },
5011
5014
  "node_modules/ws": {
5012
- "version": "8.22.2",
5013
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.2.tgz",
5014
- "integrity": "sha512-/rEZ2ejown2N5gxVTHUu9bVVC7ttu0/Tgzf5hbTOixR3Fs7mbbXgn2DbdbcKgJOmpQMtrIUWivtYuVMnp/W/yA==",
5015
+ "version": "8.23.0",
5016
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz",
5017
+ "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==",
5015
5018
  "license": "MIT",
5016
5019
  "engines": {
5017
5020
  "node": ">=10.0.0"
@@ -5080,10 +5083,10 @@
5080
5083
  },
5081
5084
  "": {
5082
5085
  "name": "@letta-ai/letta-code",
5083
- "version": "0.34.55",
5086
+ "version": "0.34.57",
5084
5087
  "dependencies": {
5085
5088
  "@cursor/sdk": "1.1.0",
5086
- "@earendil-works/pi-ai": "^0.99.1",
5089
+ "@earendil-works/pi-ai": "^1.5.2",
5087
5090
  "@letta-ai/letta-agent-sdk": "0.8.38",
5088
5091
  "@letta-ai/letta-client": "^1.10.2",
5089
5092
  "@letta-ai/trajectory": "0.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.34.55",
3
+ "version": "0.34.57",
4
4
  "lettaStartupLogProtocol": 1,
5
5
  "lettaConfigDirProtocol": 1,
6
6
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
@@ -159,7 +159,7 @@
159
159
  },
160
160
  "dependencies": {
161
161
  "@cursor/sdk": "1.1.0",
162
- "@earendil-works/pi-ai": "^0.99.1",
162
+ "@earendil-works/pi-ai": "^1.5.2",
163
163
  "@letta-ai/letta-agent-sdk": "0.8.38",
164
164
  "@letta-ai/letta-client": "^1.10.2",
165
165
  "@letta-ai/trajectory": "0.2.0",
@@ -287,8 +287,8 @@
287
287
  },
288
288
  "lettaLifecycleProtocol": 1,
289
289
  "lettaRuntimeGraphProtocol": 1,
290
- "lettaRuntimeGraphSha512": "sha512-4ud3AFwQjvzJypKSndpdwNZurRU2pQnEsd51dNxU0ZUxUPBd4nJUbVcvBZlA9OIfOXDbD5rMrcPxaBW6RweSgQ==",
290
+ "lettaRuntimeGraphSha512": "sha512-2DHLPurunwGoDZZXyGHqrS6j4p03FpR16h+Sncfutp6GeAbBz/Z3EBOFHPfj5mzw1Wcx+4xlHbygru/i3imLHA==",
291
291
  "patchedDependencies": {
292
- "@earendil-works/pi-ai@0.99.1": "patches/@earendil-works%2Fpi-ai@0.99.1.patch"
292
+ "@earendil-works/pi-ai@1.5.2": "patches/@earendil-works%2Fpi-ai@1.5.2.patch"
293
293
  }
294
294
  }
@@ -0,0 +1,74 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { verifyUpgradePr } from "./update-tracker.ts";
3
+
4
+ const repo = "letta-ai/letta-code";
5
+ const url = `https://github.com/${repo}/pull/123`;
6
+ const analysis = { previous_version: "1.5.1", current_version: "1.5.2" };
7
+ const pull = {
8
+ author: { login: "watcher-agent" },
9
+ body: "Pi-ai-watch: 1.5.1...1.5.2",
10
+ isDraft: false,
11
+ state: "OPEN",
12
+ };
13
+
14
+ describe("pi-ai upgrade PR verification", () => {
15
+ test("accepts a ready PR and fetches it from the expected repository", () => {
16
+ const requests: Array<[string, string]> = [];
17
+ verifyUpgradePr(url, repo, "watcher-agent", analysis, (number, name) => {
18
+ requests.push([number, name]);
19
+ return pull;
20
+ });
21
+ expect(requests).toEqual([["123", repo]]);
22
+ });
23
+
24
+ test("rejects a draft or closed PR", () => {
25
+ expect(() =>
26
+ verifyUpgradePr(url, repo, "watcher-agent", analysis, () => ({
27
+ ...pull,
28
+ isDraft: true,
29
+ })),
30
+ ).toThrow("must be ready for review");
31
+ expect(() =>
32
+ verifyUpgradePr(url, repo, "watcher-agent", analysis, () => ({
33
+ ...pull,
34
+ state: "CLOSED",
35
+ })),
36
+ ).toThrow("must be open");
37
+ });
38
+
39
+ test("rejects the wrong author or release marker", () => {
40
+ expect(() =>
41
+ verifyUpgradePr(url, repo, "watcher-agent", analysis, () => ({
42
+ ...pull,
43
+ author: { login: "someone-else" },
44
+ })),
45
+ ).toThrow("does not match");
46
+ expect(() =>
47
+ verifyUpgradePr(url, repo, "watcher-agent", analysis, () => ({
48
+ ...pull,
49
+ body: "Pi-ai-watch: 1.5.0...1.5.2",
50
+ })),
51
+ ).toThrow("missing marker");
52
+ });
53
+
54
+ test("rejects malformed and other-repository URLs before fetching", () => {
55
+ let fetched = false;
56
+ const getPull = () => {
57
+ fetched = true;
58
+ return pull;
59
+ };
60
+ expect(() =>
61
+ verifyUpgradePr(`${url}/files`, repo, "watcher-agent", analysis, getPull),
62
+ ).toThrow("Invalid GitHub pull request URL");
63
+ expect(() =>
64
+ verifyUpgradePr(
65
+ "https://github.com/letta-ai/another-repo/pull/123",
66
+ repo,
67
+ "watcher-agent",
68
+ analysis,
69
+ getPull,
70
+ ),
71
+ ).toThrow(`must belong to ${repo}`);
72
+ expect(fetched).toBe(false);
73
+ });
74
+ });
@@ -146,11 +146,28 @@ function main(): void {
146
146
  );
147
147
  }
148
148
 
149
- function verifyUpgradePr(
149
+ interface UpgradePullRequest {
150
+ author: { login: string };
151
+ body: string;
152
+ isDraft: boolean;
153
+ state: string;
154
+ }
155
+
156
+ export function verifyUpgradePr(
150
157
  prUrl: string,
151
158
  expectedRepo: string,
152
159
  expectedGithubLogin: string,
153
- analysis: PiAiWatchAnalysis,
160
+ analysis: Pick<PiAiWatchAnalysis, "previous_version" | "current_version">,
161
+ getPull: (number: string, repo: string) => UpgradePullRequest = (number, repo) =>
162
+ ghJson<UpgradePullRequest>([
163
+ "pr",
164
+ "view",
165
+ number,
166
+ "--repo",
167
+ repo,
168
+ "--json",
169
+ "author,body,isDraft,state",
170
+ ]),
154
171
  ): void {
155
172
  const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)$/.exec(
156
173
  prUrl,
@@ -160,27 +177,14 @@ function verifyUpgradePr(
160
177
  if (`${owner}/${repo}` !== expectedRepo) {
161
178
  throw new Error(`pi-ai upgrade PR must belong to ${expectedRepo}`);
162
179
  }
163
- const pull = ghJson<{
164
- author: { login: string };
165
- body: string;
166
- isDraft: boolean;
167
- state: string;
168
- }>([
169
- "pr",
170
- "view",
171
- number as string,
172
- "--repo",
173
- `${owner}/${repo}`,
174
- "--json",
175
- "author,body,isDraft,state",
176
- ]);
180
+ const pull = getPull(number as string, `${owner}/${repo}`);
177
181
  const marker = `Pi-ai-watch: ${analysis.previous_version}...${analysis.current_version}`;
178
182
  if (pull.author.login !== expectedGithubLogin) {
179
183
  throw new Error(
180
184
  `pi-ai PR author ${pull.author.login} does not match ${expectedGithubLogin}`,
181
185
  );
182
186
  }
183
- if (!pull.isDraft) throw new Error("pi-ai upgrade PR must be a draft");
187
+ if (pull.isDraft) throw new Error("pi-ai upgrade PR must be ready for review");
184
188
  if (pull.state !== "OPEN") throw new Error("pi-ai upgrade PR must be open");
185
189
  if (!pull.body.includes(marker)) {
186
190
  throw new Error(`pi-ai upgrade PR is missing marker: ${marker}`);
@@ -212,4 +216,4 @@ function defaultNotes(outcome: TrackerOutcome): string {
212
216
  }
213
217
  }
214
218
 
215
- main();
219
+ if (import.meta.main) main();
@@ -20,7 +20,7 @@
20
20
  "src/cli/reflection-transcript.test.ts": 1084,
21
21
  "src/cli/subcommands/mcp.ts": 1045,
22
22
  "src/cli/subcommands/skills.ts": 1243,
23
- "src/headless.ts": 4821,
23
+ "src/headless.ts": 4780,
24
24
  "src/hooks/integration.test.ts": 1147,
25
25
  "src/index.ts": 2543,
26
26
  "src/mods/learning-harness.ts": 2434,
@@ -44,6 +44,7 @@ Recommendation as of 2026-10-29. Video models move fast, so this will go stale;
44
44
  - **Fast:** `minimax/hailuo-3-max` (MiniMax H3). Also top tier; renders in well under a minute. Use it for quick replies in a live thread or for iterating on a prompt, then rerun the final cut on Seedance.
45
45
  - Other top-tier models on the endpoint include `alibaba/wan-3.0`, `black-forest-labs/flux-3-video` and `heygen/heygen-video-1`. Some providers filter prompts more strictly than others; if one rejects a prompt, try another model rather than rewording around the filter.
46
46
  - `heygen/avatar-iv` makes a talking head from one photo.
47
+ - `alibaba/wan-3.0` does reference-guided generation: image `input_references` hold a person's identity, and an `audio_url` reference drives lip-sync to that clip. Use it for a talking head of a specific person in their own voice: pass a few front-facing photos and a clip of them (or their generated voice) saying the exact script.
47
48
 
48
49
  ## Writing the prompt
49
50
 
@@ -116,10 +117,10 @@ Required: `model`. `prompt` is required by every model except those that can gen
116
117
  - `generate_audio` (bool) — only meaningful if the model's `generate_audio` capability is true.
117
118
  - `seed` (int) — honored only if the model's `seed` capability is true.
118
119
  - `frame_images[]` — image-to-video; each entry is `{ type: "image_url", image_url: { url }, frame_type: "first_frame" | "last_frame" }`.
119
- - `input_references[]` — reference-to-video (style guidance); image entries have the same shape, no `frame_type`. Audio and video references are `{ type: "audio_url", audio_url: { url } }` and `{ type: "video_url", video_url: { url } }`; only some models (such as `bytedance/seedance-2.5`) use them, and the rest ignore them. If both arrays are present, `frame_images` wins.
120
+ - `input_references[]` — reference-to-video (style guidance); image entries have the same shape, no `frame_type`. Audio and video references are `{ type: "audio_url", audio_url: { url } }` and `{ type: "video_url", video_url: { url } }`; only some models (such as `bytedance/seedance-2.5` and `alibaba/wan-3.0`) use them, and the rest ignore them. If both arrays are present, `frame_images` wins.
120
121
  - `provider.options.<slug>.parameters.<key>` — provider passthrough, see below.
121
122
 
122
- Image `url` can be a public `https://` URL or a local-file data URL: `MIME=image/png; B64=$(base64 < file.png | tr -d '\n'); url="data:${MIME};base64,${B64}"`. Audio and video references take URLs the same way.
123
+ Image `url` can be a public `https://` URL or a local-file data URL: `MIME=image/png; B64=$(base64 < file.png | tr -d '\n'); url="data:${MIME};base64,${B64}"`. Audio and video references must be public `https://` URLs; data URLs are rejected, so host the file somewhere public first.
123
124
 
124
125
  ## Provider passthrough
125
126
 
@@ -160,7 +161,7 @@ Example:
160
161
  ## Chaining with other skills
161
162
 
162
163
  - **Keyframes:** generate stills with the `image-generation` skill, then pass them as `frame_images` (`first_frame` / `last_frame`) or image `input_references` as data URLs.
163
- - **Sound:** make a voiceover with the `speech-generation` skill or a soundtrack with the `music-generation` skill, then pass the audio as an `audio_url` input reference to a model that uses audio, or mix it onto the finished MP4 (for example with `ffmpeg`).
164
+ - **Sound:** make a voiceover with the `speech-generation` skill or a soundtrack with the `music-generation` skill, then host it at a public `https://` URL and pass that as an `audio_url` input reference to a model that uses audio, or mix it onto the finished MP4 (for example with `ffmpeg`).
164
165
 
165
166
  ## Notes
166
167