@letta-ai/letta-code 0.34.24 → 0.34.25
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/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/types/backend/api/schedules.d.ts +2 -2
- package/dist/types/backend/api/schedules.d.ts.map +1 -1
- package/dist/types/tools/impl/wake.d.ts +4 -2
- package/dist/types/tools/impl/wake.d.ts.map +1 -1
- package/letta.js +46 -22
- package/npm-shrinkwrap.json +18 -18
- package/package.json +2 -2
- package/scripts/codex-watch/release-analysis.test.ts +70 -0
- package/scripts/codex-watch/release-analysis.ts +5 -5
- package/skills/maintaining-deferred-memory/SKILL.md +2 -0
|
@@ -78,8 +78,8 @@ export declare function listCloudSchedules(agentId: string, options?: {
|
|
|
78
78
|
limit?: number;
|
|
79
79
|
after?: string;
|
|
80
80
|
}): Promise<ListCloudSchedulesResponse>;
|
|
81
|
-
export declare function getCloudSchedule(agentId: string, scheduleId: string): Promise<CloudSchedule>;
|
|
82
|
-
export declare function deleteCloudSchedule(agentId: string, scheduleId: string): Promise<void>;
|
|
81
|
+
export declare function getCloudSchedule(agentId: string, scheduleId: string, actingUserId?: string): Promise<CloudSchedule>;
|
|
82
|
+
export declare function deleteCloudSchedule(agentId: string, scheduleId: string, actingUserId?: string): Promise<void>;
|
|
83
83
|
export declare function listCloudScheduleHistory(agentId: string, scheduleId: string, options?: {
|
|
84
84
|
limit?: number;
|
|
85
85
|
offset?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../../../src/backend/api/schedules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAC9C;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M,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAQD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,wBAAwB,EAC/B,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,2BAA2B,CAAC,CActC;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/C,OAAO,CAAC,0BAA0B,CAAC,CAYrC;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,aAAa,CAAC,CAOxB;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAChD,OAAO,CAAC,gCAAgC,CAAC,CAY3C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createCloudSchedule, deleteCloudSchedule, listCloudSchedules } from "../../backend/api/schedules";
|
|
2
|
-
import { addTask, deleteTask, listTasks } from "../../cron";
|
|
1
|
+
import { createCloudSchedule, deleteCloudSchedule, getCloudSchedule, listCloudSchedules } from "../../backend/api/schedules";
|
|
2
|
+
import { addTask, deleteTask, getTask, listTasks } from "../../cron";
|
|
3
3
|
import { resolveCronCreatePlacement } from "../../cron/runner";
|
|
4
4
|
type WakeAction = "create" | "list" | "cancel";
|
|
5
5
|
interface WakeArgs {
|
|
@@ -16,9 +16,11 @@ interface WakeDeps {
|
|
|
16
16
|
now?: () => Date;
|
|
17
17
|
resolvePlacement?: typeof resolveCronCreatePlacement;
|
|
18
18
|
createCloud?: typeof createCloudSchedule;
|
|
19
|
+
getCloud?: typeof getCloudSchedule;
|
|
19
20
|
listCloud?: typeof listCloudSchedules;
|
|
20
21
|
deleteCloud?: typeof deleteCloudSchedule;
|
|
21
22
|
addLocal?: typeof addTask;
|
|
23
|
+
getLocal?: typeof getTask;
|
|
22
24
|
listLocal?: typeof listTasks;
|
|
23
25
|
deleteLocal?: typeof deleteTask;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wake.d.ts","sourceRoot":"","sources":["../../../../src/tools/impl/wake.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,OAAO,EAEP,UAAU,
|
|
1
|
+
{"version":3,"file":"wake.d.ts","sourceRoot":"","sources":["../../../../src/tools/impl/wake.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,OAAO,EAEP,UAAU,EACV,OAAO,EAEP,SAAS,EAEV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAGL,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AAGvB,KAAK,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/C,UAAU,QAAQ;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAkBD,UAAU,QAAQ;IAChB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrD,WAAW,CAAC,EAAE,OAAO,mBAAmB,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,gBAAgB,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,kBAAkB,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,mBAAmB,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,UAAU,CAAC;CACjC;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;CAC7B;AAsWD,wBAAsB,IAAI,CACxB,IAAI,EAAE,QAAQ,EACd,IAAI,GAAE,QAAa,GAClB,OAAO,CAAC,UAAU,CAAC,CA0BrB"}
|
package/letta.js
CHANGED
|
@@ -5967,7 +5967,7 @@ var package_default;
|
|
|
5967
5967
|
var init_package = __esm(() => {
|
|
5968
5968
|
package_default = {
|
|
5969
5969
|
name: "@letta-ai/letta-code",
|
|
5970
|
-
version: "0.34.
|
|
5970
|
+
version: "0.34.25",
|
|
5971
5971
|
lettaStartupLogProtocol: 1,
|
|
5972
5972
|
description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
5973
5973
|
type: "module",
|
|
@@ -6242,7 +6242,7 @@ var init_package = __esm(() => {
|
|
|
6242
6242
|
},
|
|
6243
6243
|
lettaLifecycleProtocol: 1,
|
|
6244
6244
|
lettaRuntimeGraphProtocol: 1,
|
|
6245
|
-
lettaRuntimeGraphSha512: "sha512-
|
|
6245
|
+
lettaRuntimeGraphSha512: "sha512-75ArKlsNj6BLjfiYR7ejV9jl0U3L7r1mXtWLYoNBVFkpR+NgT29dy3I6c7xawN3klfWjTCPVa5kpHtS7gVbD0A==",
|
|
6246
6246
|
patchedDependencies: {
|
|
6247
6247
|
"@earendil-works/pi-ai@0.99.1": "patches/@earendil-works%2Fpi-ai@0.99.1.patch"
|
|
6248
6248
|
}
|
|
@@ -186516,11 +186516,11 @@ async function listCloudSchedules(agentId, options = {}) {
|
|
|
186516
186516
|
}
|
|
186517
186517
|
});
|
|
186518
186518
|
}
|
|
186519
|
-
async function getCloudSchedule(agentId, scheduleId) {
|
|
186520
|
-
return apiRequest("GET", `${schedulePath(agentId)}/${encodeURIComponent(scheduleId)}
|
|
186519
|
+
async function getCloudSchedule(agentId, scheduleId, actingUserId) {
|
|
186520
|
+
return apiRequest("GET", `${schedulePath(agentId)}/${encodeURIComponent(scheduleId)}`, undefined, actingUserRequestOptions(actingUserId));
|
|
186521
186521
|
}
|
|
186522
|
-
async function deleteCloudSchedule(agentId, scheduleId) {
|
|
186523
|
-
await apiRequest("DELETE", `${schedulePath(agentId)}/${encodeURIComponent(scheduleId)}`, {});
|
|
186522
|
+
async function deleteCloudSchedule(agentId, scheduleId, actingUserId) {
|
|
186523
|
+
await apiRequest("DELETE", `${schedulePath(agentId)}/${encodeURIComponent(scheduleId)}`, {}, actingUserRequestOptions(actingUserId));
|
|
186524
186524
|
}
|
|
186525
186525
|
async function listCloudScheduleHistory(agentId, scheduleId, options = {}) {
|
|
186526
186526
|
return apiRequest("GET", `${schedulePath(agentId)}/${encodeURIComponent(scheduleId)}/history`, undefined, {
|
|
@@ -210996,7 +210996,7 @@ var init_mcp_client = __esm(() => {
|
|
|
210996
210996
|
init_streamableHttp();
|
|
210997
210997
|
DEFAULT_CLIENT_INFO = {
|
|
210998
210998
|
name: "letta-code",
|
|
210999
|
-
version: "0.34.
|
|
210999
|
+
version: "0.34.25"
|
|
211000
211000
|
};
|
|
211001
211001
|
});
|
|
211002
211002
|
|
|
@@ -240616,25 +240616,41 @@ async function cancelWake(args, scope, deps) {
|
|
|
240616
240616
|
const id2 = args.id?.trim();
|
|
240617
240617
|
if (!id2)
|
|
240618
240618
|
throw new Error("Wake cancel requires id.");
|
|
240619
|
-
|
|
240620
|
-
const
|
|
240621
|
-
if (
|
|
240622
|
-
if (
|
|
240623
|
-
throw new Error(
|
|
240619
|
+
args.signal?.throwIfAborted();
|
|
240620
|
+
const local = (deps.getLocal ?? getTask)(id2);
|
|
240621
|
+
if (local?.agent_id === scope.agentId && local.conversation_id === scope.conversationId && (local.status === "active" || local.status === "paused")) {
|
|
240622
|
+
if (!(deps.deleteLocal ?? deleteTask)(id2)) {
|
|
240623
|
+
throw new Error(`Wake ${id2} was already removed.`);
|
|
240624
240624
|
}
|
|
240625
|
+
return result2("success", {
|
|
240626
|
+
action: "cancelled",
|
|
240627
|
+
id: id2,
|
|
240628
|
+
runner: "local",
|
|
240629
|
+
warnings: []
|
|
240630
|
+
});
|
|
240631
|
+
}
|
|
240632
|
+
if (resolveBackendMode() === "local" || isLocalAgentId(scope.agentId)) {
|
|
240625
240633
|
throw new Error(`Wake ${id2} was not found in the current conversation.`);
|
|
240626
240634
|
}
|
|
240627
|
-
|
|
240628
|
-
|
|
240629
|
-
await (deps.
|
|
240630
|
-
}
|
|
240631
|
-
|
|
240635
|
+
let cloud;
|
|
240636
|
+
try {
|
|
240637
|
+
cloud = await (deps.getCloud ?? getCloudSchedule)(scope.agentId, id2, getRuntimeActingUserId());
|
|
240638
|
+
} catch (error5) {
|
|
240639
|
+
if (error5 instanceof ApiRequestError && (error5.status === 404 || error5.status === 405)) {
|
|
240640
|
+
throw new Error(`Wake ${id2} was not found in the current conversation.`);
|
|
240641
|
+
}
|
|
240642
|
+
throw error5;
|
|
240643
|
+
}
|
|
240644
|
+
if (cloud.conversation_id !== scope.conversationId) {
|
|
240645
|
+
throw new Error(`Wake ${id2} was not found in the current conversation.`);
|
|
240632
240646
|
}
|
|
240647
|
+
args.signal?.throwIfAborted();
|
|
240648
|
+
await (deps.deleteCloud ?? deleteCloudSchedule)(scope.agentId, id2, getRuntimeActingUserId());
|
|
240633
240649
|
return result2("success", {
|
|
240634
240650
|
action: "cancelled",
|
|
240635
240651
|
id: id2,
|
|
240636
|
-
runner:
|
|
240637
|
-
warnings:
|
|
240652
|
+
runner: "cloud",
|
|
240653
|
+
warnings: []
|
|
240638
240654
|
});
|
|
240639
240655
|
}
|
|
240640
240656
|
async function wake(args, deps = {}) {
|
|
@@ -243376,7 +243392,7 @@ class CodexAppServerClient {
|
|
|
243376
243392
|
await this.request("initialize", {
|
|
243377
243393
|
clientInfo: {
|
|
243378
243394
|
name: "letta-code",
|
|
243379
|
-
version: "0.34.
|
|
243395
|
+
version: "0.34.25"
|
|
243380
243396
|
},
|
|
243381
243397
|
capabilities: null
|
|
243382
243398
|
});
|
|
@@ -460731,7 +460747,14 @@ async function requestCloudReflectionRun(scope, args = "", backend3 = getBackend
|
|
|
460731
460747
|
if (!backend3.retrieveReflectionConfig) {
|
|
460732
460748
|
throw new Error("Unable to determine reflection ownership on this backend.");
|
|
460733
460749
|
}
|
|
460734
|
-
|
|
460750
|
+
let config2;
|
|
460751
|
+
try {
|
|
460752
|
+
config2 = await backend3.retrieveReflectionConfig(capturedScope.agentId, actingUserRequestOptions(capturedScope.actingUserId));
|
|
460753
|
+
} catch (error5) {
|
|
460754
|
+
if (error5 instanceof APIError && error5.status === 404)
|
|
460755
|
+
return null;
|
|
460756
|
+
throw error5;
|
|
460757
|
+
}
|
|
460735
460758
|
if (config2 === null || config2.cutover === false)
|
|
460736
460759
|
return null;
|
|
460737
460760
|
if (config2.cutover !== true) {
|
|
@@ -460756,6 +460779,7 @@ async function requestReflectionRun(scope, args = "", backend3 = getBackend()) {
|
|
|
460756
460779
|
return formatReflectionReceipt(receipt);
|
|
460757
460780
|
}
|
|
460758
460781
|
var init_reflection_runs2 = __esm(() => {
|
|
460782
|
+
init_error();
|
|
460759
460783
|
init_backend2();
|
|
460760
460784
|
init_reflection_runs();
|
|
460761
460785
|
});
|
|
@@ -537397,4 +537421,4 @@ function registerBunOAuthFlows() {
|
|
|
537397
537421
|
registerBunOAuthFlows();
|
|
537398
537422
|
await init_src5().then(() => exports_src2);
|
|
537399
537423
|
|
|
537400
|
-
//# debugId=
|
|
537424
|
+
//# debugId=F0CE6FA9F2A192C264756E2164756E21
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.25",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"packages": {
|
|
6
6
|
"node_modules/@alcalzone/ansi-tokenize": {
|
|
@@ -3047,9 +3047,9 @@
|
|
|
3047
3047
|
}
|
|
3048
3048
|
},
|
|
3049
3049
|
"node_modules/es-toolkit": {
|
|
3050
|
-
"version": "1.
|
|
3051
|
-
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.
|
|
3052
|
-
"integrity": "sha512-
|
|
3050
|
+
"version": "1.53.0",
|
|
3051
|
+
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.53.0.tgz",
|
|
3052
|
+
"integrity": "sha512-3+AYXp9fmJ/UhHBMYj2/U+RaUouMD90SzoItyDOB2Za7W6dB7fQApFGnZPl2MF6K8/Tv1koh1JyirSx/kju6Pw==",
|
|
3053
3053
|
"license": "MIT",
|
|
3054
3054
|
"workspaces": [
|
|
3055
3055
|
"docs",
|
|
@@ -3519,9 +3519,9 @@
|
|
|
3519
3519
|
}
|
|
3520
3520
|
},
|
|
3521
3521
|
"node_modules/hono": {
|
|
3522
|
-
"version": "4.13.
|
|
3523
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.
|
|
3524
|
-
"integrity": "sha512-
|
|
3522
|
+
"version": "4.13.14",
|
|
3523
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.14.tgz",
|
|
3524
|
+
"integrity": "sha512-yhRLQ21U6qa9Hsu2N7Qcbh8tE+WKEcoErjIo56LeSGiGXGp9sA7UpE86Ui9uexb61KakiGwuHMn2QdV7w6i6kQ==",
|
|
3525
3525
|
"license": "MIT",
|
|
3526
3526
|
"engines": {
|
|
3527
3527
|
"node": ">=16.9.0"
|
|
@@ -3687,9 +3687,9 @@
|
|
|
3687
3687
|
}
|
|
3688
3688
|
},
|
|
3689
3689
|
"node_modules/ip-address": {
|
|
3690
|
-
"version": "10.7.
|
|
3691
|
-
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.
|
|
3692
|
-
"integrity": "sha512-
|
|
3690
|
+
"version": "10.7.5",
|
|
3691
|
+
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.5.tgz",
|
|
3692
|
+
"integrity": "sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA==",
|
|
3693
3693
|
"license": "MIT",
|
|
3694
3694
|
"engines": {
|
|
3695
3695
|
"node": ">= 12"
|
|
@@ -5248,14 +5248,14 @@
|
|
|
5248
5248
|
}
|
|
5249
5249
|
},
|
|
5250
5250
|
"node_modules/unist-util-visit": {
|
|
5251
|
-
"version": "5.
|
|
5252
|
-
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.
|
|
5253
|
-
"integrity": "sha512-
|
|
5251
|
+
"version": "5.2.0",
|
|
5252
|
+
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.2.0.tgz",
|
|
5253
|
+
"integrity": "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==",
|
|
5254
5254
|
"license": "MIT",
|
|
5255
5255
|
"dependencies": {
|
|
5256
5256
|
"@types/unist": "^3.0.0",
|
|
5257
5257
|
"unist-util-is": "^6.0.0",
|
|
5258
|
-
"unist-util-visit-parents": "^6.
|
|
5258
|
+
"unist-util-visit-parents": "^6.1.0"
|
|
5259
5259
|
},
|
|
5260
5260
|
"funding": {
|
|
5261
5261
|
"type": "opencollective",
|
|
@@ -5263,9 +5263,9 @@
|
|
|
5263
5263
|
}
|
|
5264
5264
|
},
|
|
5265
5265
|
"node_modules/unist-util-visit-parents": {
|
|
5266
|
-
"version": "6.0
|
|
5267
|
-
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.
|
|
5268
|
-
"integrity": "sha512-
|
|
5266
|
+
"version": "6.1.0",
|
|
5267
|
+
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.1.0.tgz",
|
|
5268
|
+
"integrity": "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==",
|
|
5269
5269
|
"license": "MIT",
|
|
5270
5270
|
"dependencies": {
|
|
5271
5271
|
"@types/unist": "^3.0.0",
|
|
@@ -5456,7 +5456,7 @@
|
|
|
5456
5456
|
},
|
|
5457
5457
|
"": {
|
|
5458
5458
|
"name": "@letta-ai/letta-code",
|
|
5459
|
-
"version": "0.34.
|
|
5459
|
+
"version": "0.34.25",
|
|
5460
5460
|
"dependencies": {
|
|
5461
5461
|
"@earendil-works/pi-ai": "^0.99.1",
|
|
5462
5462
|
"@janhapke/sharp-electron": "0.35.3-electron.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.25",
|
|
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",
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
},
|
|
276
276
|
"lettaLifecycleProtocol": 1,
|
|
277
277
|
"lettaRuntimeGraphProtocol": 1,
|
|
278
|
-
"lettaRuntimeGraphSha512": "sha512-
|
|
278
|
+
"lettaRuntimeGraphSha512": "sha512-75ArKlsNj6BLjfiYR7ejV9jl0U3L7r1mXtWLYoNBVFkpR+NgT29dy3I6c7xawN3klfWjTCPVa5kpHtS7gVbD0A==",
|
|
279
279
|
"patchedDependencies": {
|
|
280
280
|
"@earendil-works/pi-ai@0.99.1": "patches/@earendil-works%2Fpi-ai@0.99.1.patch"
|
|
281
281
|
}
|
|
@@ -115,6 +115,76 @@ describe("Codex GitHub release fetch", () => {
|
|
|
115
115
|
expect(sleeps).toEqual([1000, 2000]);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
+
test("retries a disconnected successful response body", async () => {
|
|
119
|
+
const sleeps: number[] = [];
|
|
120
|
+
let requests = 0;
|
|
121
|
+
const releases = await listStableReleases({
|
|
122
|
+
fetchImpl: (async () => {
|
|
123
|
+
requests++;
|
|
124
|
+
if (requests === 1) {
|
|
125
|
+
return new Response(
|
|
126
|
+
new ReadableStream({
|
|
127
|
+
pull(controller) {
|
|
128
|
+
controller.error(new TypeError("fetch failed: ECONNRESET"));
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
131
|
+
{ status: 200 },
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
return Response.json(STABLES);
|
|
135
|
+
}) as typeof fetch,
|
|
136
|
+
sleep: async (delayMs) => {
|
|
137
|
+
sleeps.push(delayMs);
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
expect(requests).toBe(2);
|
|
142
|
+
expect(sleeps).toEqual([1000]);
|
|
143
|
+
expect(releases).toEqual(STABLES);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test("stops retrying disconnected bodies at the existing budget", async () => {
|
|
147
|
+
const sleeps: number[] = [];
|
|
148
|
+
let requests = 0;
|
|
149
|
+
const result = listStableReleases({
|
|
150
|
+
fetchImpl: (async () => {
|
|
151
|
+
requests++;
|
|
152
|
+
return new Response(
|
|
153
|
+
new ReadableStream({
|
|
154
|
+
pull(controller) {
|
|
155
|
+
controller.error(new TypeError("fetch failed: ECONNRESET"));
|
|
156
|
+
},
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
}) as typeof fetch,
|
|
160
|
+
sleep: async (delayMs) => {
|
|
161
|
+
sleeps.push(delayMs);
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
await expect(result).rejects.toThrow("after 3 attempts");
|
|
166
|
+
expect(requests).toBe(3);
|
|
167
|
+
expect(sleeps).toEqual([1000, 2000]);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
test("does not retry malformed JSON", async () => {
|
|
171
|
+
const sleeps: number[] = [];
|
|
172
|
+
let requests = 0;
|
|
173
|
+
const result = listStableReleases({
|
|
174
|
+
fetchImpl: (async () => {
|
|
175
|
+
requests++;
|
|
176
|
+
return new Response("not JSON");
|
|
177
|
+
}) as typeof fetch,
|
|
178
|
+
sleep: async (delayMs) => {
|
|
179
|
+
sleeps.push(delayMs);
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
await expect(result).rejects.toBeInstanceOf(SyntaxError);
|
|
184
|
+
expect(requests).toBe(1);
|
|
185
|
+
expect(sleeps).toEqual([]);
|
|
186
|
+
});
|
|
187
|
+
|
|
118
188
|
test("fails immediately on a client error", async () => {
|
|
119
189
|
const sleeps: number[] = [];
|
|
120
190
|
let requests = 0;
|
|
@@ -190,8 +190,7 @@ export async function listStableReleases(
|
|
|
190
190
|
|
|
191
191
|
for (let page = 1; page <= 10; page++) {
|
|
192
192
|
const url = `https://api.github.com/repos/${CODEX_REPO}/releases?per_page=100&page=${page}`;
|
|
193
|
-
const
|
|
194
|
-
const batch = (await res.json()) as Release[];
|
|
193
|
+
const batch = await fetchGitHubReleasesPage(url, headers, fetchImpl, sleep);
|
|
195
194
|
releases.push(...batch);
|
|
196
195
|
if (batch.length < 100) break;
|
|
197
196
|
}
|
|
@@ -205,12 +204,15 @@ async function fetchGitHubReleasesPage(
|
|
|
205
204
|
headers: Record<string, string>,
|
|
206
205
|
fetchImpl: typeof fetch,
|
|
207
206
|
sleep: (delayMs: number) => Promise<void>,
|
|
208
|
-
): Promise<
|
|
207
|
+
): Promise<Release[]> {
|
|
209
208
|
for (let attempt = 1; ; attempt++) {
|
|
210
209
|
let response: Response;
|
|
211
210
|
try {
|
|
212
211
|
response = await fetchImpl(url, { headers });
|
|
212
|
+
// A successful fetch can still lose its connection while reading the body.
|
|
213
|
+
if (response.ok) return (await response.json()) as Release[];
|
|
213
214
|
} catch (error) {
|
|
215
|
+
if (error instanceof SyntaxError) throw error;
|
|
214
216
|
if (attempt === GITHUB_RELEASES_FETCH_ATTEMPTS) {
|
|
215
217
|
throw new Error(
|
|
216
218
|
`GitHub releases API request failed after ${attempt} attempts: ${String(error)}`,
|
|
@@ -221,8 +223,6 @@ async function fetchGitHubReleasesPage(
|
|
|
221
223
|
continue;
|
|
222
224
|
}
|
|
223
225
|
|
|
224
|
-
if (response.ok) return response;
|
|
225
|
-
|
|
226
226
|
const message = `GitHub releases API failed (${response.status}): ${await response.text()}`;
|
|
227
227
|
if (response.status < 500 || attempt === GITHUB_RELEASES_FETCH_ATTEMPTS) {
|
|
228
228
|
throw new Error(message);
|
|
@@ -58,6 +58,8 @@ Discovery runs through the `MEMORY.md` chain, one level at a time:
|
|
|
58
58
|
|
|
59
59
|
After adding or moving a file, trace the path a future request would take from root `MEMORY.md` to the file. If any step depends on knowing the file already exists, fix the index.
|
|
60
60
|
|
|
61
|
+
Indexes are the only way the agent finds deferred memory: it opens a file only when every entry on the path from root names what it is looking for. Keep them accurate as memory changes. Whenever you add, move, or substantially change what a directory holds, reread its entry in each parent `MEMORY.md` up to root and rewrite it to name the topics the directory now covers, in the words a future request would use. An entry written when the directory was new goes stale as it fills, and a topic no entry mentions is effectively lost.
|
|
62
|
+
|
|
61
63
|
## Design for progressive disclosure
|
|
62
64
|
|
|
63
65
|
Each level should give the agent enough to decide whether to go deeper, and nothing it would have to read past to decide.
|