@letta-ai/letta-code 0.30.23 → 0.30.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/gateway-core.js +39 -3
- package/dist/gateway-core.js.map +3 -3
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/types/agent/client-skills-watcher.d.ts +23 -0
- package/dist/types/agent/client-skills-watcher.d.ts.map +1 -0
- package/dist/types/agent/client-skills.d.ts +2 -0
- package/dist/types/agent/client-skills.d.ts.map +1 -1
- package/dist/types/agent/message.d.ts.map +1 -1
- package/dist/types/backend/backend.d.ts +1 -0
- package/dist/types/backend/backend.d.ts.map +1 -1
- package/dist/types/backend/local/local-backend.d.ts +1 -0
- package/dist/types/backend/local/local-backend.d.ts.map +1 -1
- package/dist/types/channels/gateway-core.d.ts +4 -1
- package/dist/types/channels/gateway-core.d.ts.map +1 -1
- package/dist/types/helpers/working-directory.d.ts +2 -0
- package/dist/types/helpers/working-directory.d.ts.map +1 -0
- package/dist/types/tools/impl/bash.d.ts.map +1 -1
- package/dist/types/tools/impl/enter-worktree.d.ts.map +1 -1
- package/dist/types/tools/impl/exec-command.d.ts +1 -0
- package/dist/types/tools/impl/exec-command.d.ts.map +1 -1
- package/dist/types/tools/impl/monitor.d.ts.map +1 -1
- package/dist/types/tools/impl/process_manager.d.ts +7 -1
- package/dist/types/tools/impl/process_manager.d.ts.map +1 -1
- package/dist/types/tools/impl/runtime-working-directory.d.ts +6 -0
- package/dist/types/tools/impl/runtime-working-directory.d.ts.map +1 -0
- package/dist/types/tools/impl/set-working-directory.d.ts +11 -0
- package/dist/types/tools/impl/set-working-directory.d.ts.map +1 -0
- package/dist/types/tools/tool-definitions.d.ts +1 -0
- package/dist/types/tools/tool-definitions.d.ts.map +1 -1
- package/dist/types/tools/tool-permissions.d.ts.map +1 -1
- package/dist/types/types/protocol.d.ts +3 -3
- package/dist/types/types/protocol.d.ts.map +1 -1
- package/dist/types/websocket/listener/types.d.ts +3 -0
- package/dist/types/websocket/listener/types.d.ts.map +1 -1
- package/letta.js +3578 -2862
- package/package.json +1 -1
- package/scripts/source-file-size-baseline.json +3 -4
package/dist/gateway-core.js
CHANGED
|
@@ -1468,6 +1468,29 @@ class ChannelGateway {
|
|
|
1468
1468
|
throw error;
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
|
+
adoptQueuedDelivery(delivery) {
|
|
1472
|
+
const state = this.getState(delivery.runtime);
|
|
1473
|
+
const sources = uniqueLifecycleSources(delivery.sources);
|
|
1474
|
+
const pending = state.pendingSourcesByClientMessageId.get(delivery.clientMessageId);
|
|
1475
|
+
if (pending) {
|
|
1476
|
+
const matches = pending.disposition === "queued" && JSON.stringify(pending.sources) === JSON.stringify(sources);
|
|
1477
|
+
if (matches)
|
|
1478
|
+
return;
|
|
1479
|
+
throw new Error(`Cannot adopt queued delivery ${delivery.clientMessageId}; conflicting metadata exists`);
|
|
1480
|
+
}
|
|
1481
|
+
if (state.acceptedClientMessageIds.has(delivery.clientMessageId) || state.active?.batchId === `channel-${delivery.clientMessageId}`) {
|
|
1482
|
+
throw new Error(`Cannot adopt queued delivery ${delivery.clientMessageId}; it is not queued`);
|
|
1483
|
+
}
|
|
1484
|
+
state.pendingSourcesByClientMessageId.set(delivery.clientMessageId, {
|
|
1485
|
+
sources,
|
|
1486
|
+
disposition: "queued"
|
|
1487
|
+
});
|
|
1488
|
+
state.routedSources = uniqueRoutedSources([
|
|
1489
|
+
...state.routedSources,
|
|
1490
|
+
...delivery.sources
|
|
1491
|
+
]);
|
|
1492
|
+
this.rememberAcceptedClientMessageId(state, delivery.clientMessageId);
|
|
1493
|
+
}
|
|
1471
1494
|
async restoreRuntime(runtime, sources) {
|
|
1472
1495
|
const state = this.getState(runtime);
|
|
1473
1496
|
state.replayedControlRequestIds.clear();
|
|
@@ -1600,9 +1623,22 @@ class ChannelGateway {
|
|
|
1600
1623
|
return tool !== null;
|
|
1601
1624
|
});
|
|
1602
1625
|
}
|
|
1603
|
-
async releaseRuntimeTools(runtime, routedSources = []) {
|
|
1626
|
+
async releaseRuntimeTools(runtime, routedSources = [], options = {}) {
|
|
1604
1627
|
await this.enqueueRegistration(async () => {
|
|
1605
|
-
|
|
1628
|
+
const key = runtimeKey(runtime);
|
|
1629
|
+
const state = this.states.get(key);
|
|
1630
|
+
if (options.cleanupIdleRuntime) {
|
|
1631
|
+
if (routedSources.length > 0 || (state?.routedSources.length ?? 0) > 0) {
|
|
1632
|
+
throw new Error("Cannot clean up a routed channel runtime");
|
|
1633
|
+
}
|
|
1634
|
+
if (state?.active) {
|
|
1635
|
+
throw new Error("Cannot clean up an active channel runtime");
|
|
1636
|
+
}
|
|
1637
|
+
if ((state?.pendingSourcesByClientMessageId.size ?? 0) > 0) {
|
|
1638
|
+
throw new Error("Cannot clean up a queued channel runtime");
|
|
1639
|
+
}
|
|
1640
|
+
this.states.delete(key);
|
|
1641
|
+
} else if (routedSources.length > 0 || state) {
|
|
1606
1642
|
return;
|
|
1607
1643
|
}
|
|
1608
1644
|
const response = await this.client.runtimeExternalToolsUpdate({
|
|
@@ -2965,4 +3001,4 @@ export {
|
|
|
2965
3001
|
ChannelControlRequestCoordinator
|
|
2966
3002
|
};
|
|
2967
3003
|
|
|
2968
|
-
//# debugId=
|
|
3004
|
+
//# debugId=B5A9D0FB6AC1A49564756E2164756E21
|