@letta-ai/letta-code 0.34.54 → 0.34.56

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.
Files changed (30) hide show
  1. package/dist/mcp-client.js +2 -2
  2. package/dist/mcp-client.js.map +1 -1
  3. package/dist/mcp-oauth.js +2 -2
  4. package/dist/mcp-oauth.js.map +1 -1
  5. package/dist/types/agent/subagents/parent-transcript.d.ts +5 -3
  6. package/dist/types/agent/subagents/parent-transcript.d.ts.map +1 -1
  7. package/dist/types/backend/api/unified-mcp.d.ts +1 -0
  8. package/dist/types/backend/api/unified-mcp.d.ts.map +1 -1
  9. package/dist/types/reminders/engine.d.ts +1 -1
  10. package/dist/types/reminders/engine.d.ts.map +1 -1
  11. package/dist/types/reminders/state.d.ts +0 -5
  12. package/dist/types/reminders/state.d.ts.map +1 -1
  13. package/dist/types/tools/impl/external-fork-context.d.ts +2 -8
  14. package/dist/types/tools/impl/external-fork-context.d.ts.map +1 -1
  15. package/dist/types/tools/impl/native-session-capture.d.ts.map +1 -1
  16. package/dist/types/tools/impl/native-session-owner.d.ts +1 -0
  17. package/dist/types/tools/impl/native-session-owner.d.ts.map +1 -1
  18. package/dist/types/tools/impl/remote-external-coding-agent.d.ts.map +1 -1
  19. package/dist/types/tools/impl/task-agent-selection.d.ts +1 -1
  20. package/dist/types/tools/impl/task-agent-selection.d.ts.map +1 -1
  21. package/dist/types/tools/impl/watch-pr.d.ts +1 -0
  22. package/dist/types/tools/impl/watch-pr.d.ts.map +1 -1
  23. package/dist/types/utils/version.d.ts +23 -0
  24. package/dist/types/utils/version.d.ts.map +1 -0
  25. package/letta.js +636 -644
  26. package/npm-shrinkwrap.json +2 -2
  27. package/package.json +1 -1
  28. package/scripts/pi-ai-watch/update-tracker.test.ts +74 -0
  29. package/scripts/pi-ai-watch/update-tracker.ts +22 -18
  30. package/skills/video-generation/SKILL.md +4 -3
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.34.54",
3
+ "version": "0.34.56",
4
4
  "lockfileVersion": 3,
5
5
  "packages": {
6
6
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -5080,7 +5080,7 @@
5080
5080
  },
5081
5081
  "": {
5082
5082
  "name": "@letta-ai/letta-code",
5083
- "version": "0.34.54",
5083
+ "version": "0.34.56",
5084
5084
  "dependencies": {
5085
5085
  "@cursor/sdk": "1.1.0",
5086
5086
  "@earendil-works/pi-ai": "^0.99.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.34.54",
3
+ "version": "0.34.56",
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.",
@@ -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();
@@ -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