@letta-ai/letta-code 0.34.44 → 0.34.46

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 (51) hide show
  1. package/dist/agent-presets.js +9 -26
  2. package/dist/agent-presets.js.map +5 -6
  3. package/dist/app-server-client.cjs.map +2 -2
  4. package/dist/app-server-client.js.map +2 -2
  5. package/dist/channels-public.js +1 -1
  6. package/dist/channels-public.js.map +3 -3
  7. package/dist/mcp-client.js +2 -2
  8. package/dist/mcp-client.js.map +1 -1
  9. package/dist/mcp-oauth.js +2 -2
  10. package/dist/mcp-oauth.js.map +1 -1
  11. package/dist/types/agent/create-agent-request.d.ts.map +1 -1
  12. package/dist/types/agent/memory-git-hooks.d.ts.map +1 -1
  13. package/dist/types/agent/model-catalog.d.ts +7 -0
  14. package/dist/types/agent/model-catalog.d.ts.map +1 -1
  15. package/dist/types/cli/helpers/error-formatter.d.ts +2 -0
  16. package/dist/types/cli/helpers/error-formatter.d.ts.map +1 -1
  17. package/dist/types/constants.d.ts +0 -8
  18. package/dist/types/constants.d.ts.map +1 -1
  19. package/dist/types/tools/external-tool-types.d.ts +0 -2
  20. package/dist/types/tools/external-tool-types.d.ts.map +1 -1
  21. package/dist/types/tools/manager.d.ts +2 -2
  22. package/dist/types/tools/manager.d.ts.map +1 -1
  23. package/dist/types/tools/tool-policy.d.ts +18 -0
  24. package/dist/types/tools/tool-policy.d.ts.map +1 -0
  25. package/dist/types/tools/toolset.d.ts +4 -2
  26. package/dist/types/tools/toolset.d.ts.map +1 -1
  27. package/dist/types/types/app-server-info.d.ts +2 -0
  28. package/dist/types/types/app-server-info.d.ts.map +1 -1
  29. package/dist/types/types/external-tool-protocol.d.ts +26 -3
  30. package/dist/types/types/external-tool-protocol.d.ts.map +1 -1
  31. package/dist/types/types/input-create-message.d.ts +0 -2
  32. package/dist/types/types/input-create-message.d.ts.map +1 -1
  33. package/dist/types/types/queue-update-protocol.d.ts +6 -0
  34. package/dist/types/types/queue-update-protocol.d.ts.map +1 -1
  35. package/dist/types/types/runtime-start-protocol.d.ts +6 -1
  36. package/dist/types/types/runtime-start-protocol.d.ts.map +1 -1
  37. package/dist/types/utils/image-resize.d.ts.map +1 -1
  38. package/dist/types/utils/secrets-store.d.ts +9 -1
  39. package/dist/types/utils/secrets-store.d.ts.map +1 -1
  40. package/dist/types/websocket/listener/conversation-runtime.d.ts.map +1 -1
  41. package/dist/types/websocket/listener/types.d.ts +0 -1
  42. package/dist/types/websocket/listener/types.d.ts.map +1 -1
  43. package/image-resize-worker.js +3 -4
  44. package/letta.js +311 -614
  45. package/npm-shrinkwrap.json +155 -732
  46. package/package.json +3 -4
  47. package/scripts/isolated-unit-tests.json +15 -0
  48. package/scripts/smoke-image-worker.mjs +29 -4
  49. package/scripts/source-file-size-baseline.json +6 -6
  50. package/scripts/stage-pypi-deps.mjs +0 -1
  51. package/skills/working-across-computers/SKILL.md +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.34.44",
3
+ "version": "0.34.46",
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.",
@@ -153,7 +153,6 @@
153
153
  "dependencies": {
154
154
  "@cursor/sdk": "1.1.0",
155
155
  "@earendil-works/pi-ai": "^0.99.1",
156
- "@janhapke/sharp-electron": "0.35.3-electron.1",
157
156
  "@letta-ai/letta-agent-sdk": "0.8.38",
158
157
  "@letta-ai/letta-client": "^1.10.2",
159
158
  "@letta-ai/trajectory": "0.2.0",
@@ -169,7 +168,7 @@
169
168
  "node-pty": "^1.1.0",
170
169
  "open": "^10.2.0",
171
170
  "react": "18.2.0",
172
- "sharp": "^0.34.5",
171
+ "sharp": "^0.35.5",
173
172
  "shiki": "^4.0.2",
174
173
  "strip-ansi": "^7.2.0",
175
174
  "ws": "^8.19.0"
@@ -278,7 +277,7 @@
278
277
  },
279
278
  "lettaLifecycleProtocol": 1,
280
279
  "lettaRuntimeGraphProtocol": 1,
281
- "lettaRuntimeGraphSha512": "sha512-x6CZjpXvXckGCycYwdxVs0W3XTf6uzPH1il5cUWVWlNkC2w7naCOb53kNlJ0PC9/t6XHtxAPZhqhWJUlOKG2lg==",
280
+ "lettaRuntimeGraphSha512": "sha512-DMyrwe+kalQ3U0ncY7kalXtOWp1QE7bh32cJNtGoERBViCd8eeb0avXJTTyM3TSLUTzaKyZ58TXwUiZeLLGDew==",
282
281
  "patchedDependencies": {
283
282
  "@earendil-works/pi-ai@0.99.1": "patches/@earendil-works%2Fpi-ai@0.99.1.patch"
284
283
  }
@@ -164,6 +164,11 @@
164
164
  "timeoutMs": 15000,
165
165
  "reason": "Mutates the settings singleton, HOME, and the secrets service name."
166
166
  },
167
+ {
168
+ "path": "src/browser-discovery-server.test.ts",
169
+ "timeoutMs": 30000,
170
+ "reason": "Builds and launches real Node fixtures and opens live sockets; an isolated process prevents shared-batch load from exhausting the Windows fixture-output deadline."
171
+ },
167
172
  {
168
173
  "path": "src/settings-manager-auth-cache.test.ts",
169
174
  "timeoutMs": 15000,
@@ -218,6 +223,11 @@
218
223
  "timeoutMs": 30000,
219
224
  "reason": "Spawns real Git processes and mutates HOME, USER_CWD, cwd, and runtime singletons."
220
225
  },
226
+ {
227
+ "path": "src/agent/memory-git.retry.test.ts",
228
+ "timeoutMs": 30000,
229
+ "reason": "Runs real Git clone helpers against live local HTTP servers; isolate it so Windows shared-batch load cannot exhaust the per-attempt network deadlines before Git reaches the fixture."
230
+ },
221
231
  {
222
232
  "path": "src/agent/available-models.test.ts",
223
233
  "timeoutMs": 15000,
@@ -278,6 +288,11 @@
278
288
  "timeoutMs": 15000,
279
289
  "reason": "Mutates HOME and the remote-settings singleton to verify startup cwd-map repair."
280
290
  },
291
+ {
292
+ "path": "src/websocket/listener/turn-durability.test.ts",
293
+ "timeoutMs": 30000,
294
+ "reason": "Performs hundreds of synchronous durable writes and lock operations; isolate it so shared-batch load does not make Windows lock-budget assertions hit the generic 15-second timeout."
295
+ },
281
296
  {
282
297
  "path": "src/tools/impl/task-external-fork.test.ts",
283
298
  "timeoutMs": 30000,
@@ -1,4 +1,4 @@
1
- // Exercise the published Node worker with a newer Sharp installation in an
1
+ // Exercise the published Node worker with a standalone Sharp installation in an
2
2
  // ancestor directory. Sharp's JS and native binding must come from the same
3
3
  // installed package, rather than mixing bundled JS with a runtime binding.
4
4
  import assert from "node:assert/strict";
@@ -20,7 +20,7 @@ try {
20
20
  "--ignore-scripts",
21
21
  "--no-audit",
22
22
  "--no-fund",
23
- "sharp@0.35.3",
23
+ "sharp@0.35.5",
24
24
  ],
25
25
  { encoding: "utf8" },
26
26
  );
@@ -33,7 +33,7 @@ try {
33
33
  );
34
34
  const require = createRequire(worker);
35
35
  const sharp = require("sharp");
36
- assert.equal(sharp.versions.sharp, "0.35.3");
36
+ assert.equal(sharp.versions.sharp, "0.35.5");
37
37
  const png = await sharp({
38
38
  create: {
39
39
  width: 2,
@@ -62,7 +62,32 @@ try {
62
62
  assert.deepEqual(Buffer.from(decoded.data, "base64"), image);
63
63
  }
64
64
 
65
- console.log("Published image worker decoded PNG and JPEG with Sharp 0.35.3");
65
+ const oversized = await sharp({
66
+ create: {
67
+ width: 2500,
68
+ height: 100,
69
+ channels: 3,
70
+ background: { r: 70, g: 100, b: 130 },
71
+ },
72
+ })
73
+ .png()
74
+ .toBuffer();
75
+ const resized = spawnSync(process.execPath, [worker, "image/png"], {
76
+ input: oversized,
77
+ encoding: "utf8",
78
+ });
79
+ assert.equal(resized.status, 0, resized.stderr || resized.error?.message);
80
+ const output = JSON.parse(resized.stdout);
81
+ assert.equal(output.resized, true);
82
+ assert.equal(output.width, 2000);
83
+ assert.equal(output.height, 80);
84
+ const metadata = await sharp(Buffer.from(output.data, "base64")).metadata();
85
+ assert.equal(metadata.width, output.width);
86
+ assert.equal(metadata.height, output.height);
87
+
88
+ console.log(
89
+ "Published image worker decoded PNG/JPEG and resized PNG with Sharp 0.35.5",
90
+ );
66
91
  } finally {
67
92
  rmSync(root, { recursive: true, force: true });
68
93
  }
@@ -4,12 +4,12 @@
4
4
  "src/backend/local-backend.test.ts": 2472,
5
5
  "src/backend/local/local-store.ts": 3258,
6
6
  "src/backend/pi-stream-adapter.test.ts": 1255,
7
- "src/cli/app/AppCoordinator.tsx": 5131,
7
+ "src/cli/app/AppCoordinator.tsx": 5129,
8
8
  "src/cli/app/AppView.tsx": 1732,
9
9
  "src/cli/app/use-approval-flow.ts": 1099,
10
10
  "src/cli/app/use-configuration-handlers.ts": 1400,
11
- "src/cli/app/use-conversation-loop.ts": 2849,
12
- "src/cli/app/use-submit-handler.ts": 3791,
11
+ "src/cli/app/use-conversation-loop.ts": 2800,
12
+ "src/cli/app/use-submit-handler.ts": 3788,
13
13
  "src/cli/components/AgentSelector.tsx": 1104,
14
14
  "src/cli/components/InputRich.tsx": 2124,
15
15
  "src/cli/components/ModelSelector.tsx": 1259,
@@ -33,12 +33,12 @@
33
33
  "src/permissions/read-only-shell.ts": 1969,
34
34
  "src/settings-manager.test.ts": 1635,
35
35
  "src/settings-manager.ts": 2092,
36
- "src/tools/manager.ts": 2608,
37
- "src/tools/tool-execution-context.test.ts": 1092,
36
+ "src/tools/manager.ts": 2590,
37
+ "src/tools/tool-execution-context.test.ts": 1025,
38
38
  "src/types/protocol_v2.ts": 2409,
39
39
  "src/websocket/listen-client-concurrency.test.ts": 2519,
40
40
  "src/websocket/listen-client-protocol.test.ts": 5664,
41
41
  "src/websocket/listener/commands/memory.ts": 1114,
42
42
  "src/websocket/listener/file-commands.ts": 1045,
43
- "src/websocket/listener/protocol-inbound.ts": 2047
43
+ "src/websocket/listener/protocol-inbound.ts": 2041
44
44
  }
@@ -12,7 +12,6 @@ import { dirname, join, resolve } from "node:path";
12
12
 
13
13
  const root = process.cwd();
14
14
  const app = resolve(process.argv[2]);
15
- // sharp-electron is only reachable under Electron, never our bundled Node.
16
15
  // @shikijs/langs is external in the bundle so lazily-loaded grammars
17
16
  // (LET-13149) resolve from here at runtime.
18
17
  const roots = [
@@ -102,6 +102,9 @@ letta sandbox expose <port> --expires-in <duration>
102
102
 
103
103
  Choose the lifetime explicitly with a whole-second, minute, or hour duration such as `30m`, `2h`, or `24h`. The supported range is 1 minute through 24 hours; there is no implicit default. This command works only inside the managed Cloud sandbox that owns the app. It does not accept `--agent` or `--conversation`; run it in the same sandbox as the service. The JSON result contains `{ url, port, expiresAt }`. Anyone holding the URL can access the app until the exact `expiresAt`, so share it only where the user requested.
104
104
 
105
+ An exposed app only works while its sandbox is running. The sandbox sleeps after it has been idle for a while, and the app's server process does not survive a restart.
106
+ Treat exposed apps as temporary demos. Anything meant to stay up goes on Vercel.
107
+
105
108
  To add time to the same URL and port, extend the active exposure before it expires:
106
109
 
107
110
  ```bash