@letta-ai/letta-code 0.34.16 → 0.34.18
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/README.md +14 -5
- package/dist/agent-presets.js +5 -1
- package/dist/agent-presets.js.map +2 -2
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/mcp-oauth.js +30 -28
- package/dist/mcp-oauth.js.map +4 -4
- package/dist/types/agent/client-skills.d.ts.map +1 -1
- package/dist/types/agent/message.d.ts.map +1 -1
- package/dist/types/agent/model-handles.d.ts.map +1 -1
- package/dist/types/agent/preloaded-skills.d.ts +4 -0
- package/dist/types/agent/preloaded-skills.d.ts.map +1 -0
- package/dist/types/agent/skills.d.ts.map +1 -1
- package/dist/types/agent/subagents/child-send-tracking.d.ts.map +1 -1
- package/dist/types/agent/subagents/index.d.ts.map +1 -1
- package/dist/types/agent/subagents/manager.d.ts.map +1 -1
- package/dist/types/agent/subagents/remote-turn-wait.d.ts.map +1 -1
- package/dist/types/agent/subagents/subagent-stream.d.ts.map +1 -1
- package/dist/types/agent/turn-recovery-policy.d.ts +1 -1
- package/dist/types/agent/turn-recovery-policy.d.ts.map +1 -1
- package/dist/types/auth/oauth.d.ts +8 -1
- package/dist/types/auth/oauth.d.ts.map +1 -1
- package/dist/types/backend/api/conversation-enqueue.d.ts +4 -1
- package/dist/types/backend/api/conversation-enqueue.d.ts.map +1 -1
- package/dist/types/backend/dev/fake-headless-backend.d.ts +9 -2
- package/dist/types/backend/dev/fake-headless-backend.d.ts.map +1 -1
- package/dist/types/backend/local/compaction.d.ts +5 -0
- package/dist/types/backend/local/compaction.d.ts.map +1 -1
- package/dist/types/backend/local/local-backend.d.ts.map +1 -1
- package/dist/types/headless-listener-launch.d.ts +5 -3
- package/dist/types/headless-listener-launch.d.ts.map +1 -1
- package/dist/types/headless-super-run-wait.d.ts +1 -1
- package/dist/types/headless-super-run-wait.d.ts.map +1 -1
- package/dist/types/mcp-oauth-callback.d.ts +5 -1
- package/dist/types/mcp-oauth-callback.d.ts.map +1 -1
- package/dist/types/mcp-oauth.d.ts.map +1 -1
- package/dist/types/tools/impl/code-mode.d.ts +23 -0
- package/dist/types/tools/impl/code-mode.d.ts.map +1 -0
- package/dist/types/tools/impl/process_manager.d.ts +1 -0
- package/dist/types/tools/impl/process_manager.d.ts.map +1 -1
- package/dist/types/tools/impl/remote-external-coding-agent.d.ts +1 -0
- package/dist/types/tools/impl/remote-external-coding-agent.d.ts.map +1 -1
- package/dist/types/tools/impl/task-stop.d.ts.map +1 -1
- package/dist/types/tools/impl/workflow.d.ts +5 -0
- package/dist/types/tools/impl/workflow.d.ts.map +1 -1
- package/dist/types/tools/manager.d.ts.map +1 -1
- package/dist/types/tools/script-tool-scope.d.ts +19 -0
- package/dist/types/tools/script-tool-scope.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/toolset-catalog.d.ts +1 -1
- package/dist/types/tools/toolset-catalog.d.ts.map +1 -1
- package/dist/types/tools/workflow/sdk-spawner.d.ts.map +1 -1
- package/dist/types/tools/workflow/types.d.ts +2 -0
- package/dist/types/tools/workflow/types.d.ts.map +1 -1
- package/dist/types/tools/workflow/workflow-engine.d.ts +2 -0
- package/dist/types/tools/workflow/workflow-engine.d.ts.map +1 -1
- package/letta.js +13825 -13502
- package/npm-shrinkwrap.json +86 -86
- package/package.json +2 -2
- package/scripts/source-file-size-baseline.json +3 -3
- package/skills/creating-skills/SKILL.md +14 -13
- package/skills/maintaining-core-memory/SKILL.md +101 -0
- package/skills/maintaining-deferred-memory/SKILL.md +84 -0
- package/skills/music-generation/LICENSE +21 -0
- package/skills/music-generation/SKILL.md +164 -0
- package/skills/speech-generation/SKILL.md +15 -36
- package/skills/workflow-authoring/SKILL.md +3 -1
package/dist/mcp-oauth.js
CHANGED
|
@@ -17392,7 +17392,7 @@ class StreamableHTTPClientTransport {
|
|
|
17392
17392
|
// src/mcp-client.ts
|
|
17393
17393
|
var DEFAULT_CLIENT_INFO = {
|
|
17394
17394
|
name: "letta-code",
|
|
17395
|
-
version: "0.34.
|
|
17395
|
+
version: "0.34.18"
|
|
17396
17396
|
};
|
|
17397
17397
|
async function connectMcpServer(config2, options = {}) {
|
|
17398
17398
|
let client = new Client(options.clientInfo ?? DEFAULT_CLIENT_INFO);
|
|
@@ -17557,14 +17557,31 @@ import { randomBytes } from "node:crypto";
|
|
|
17557
17557
|
|
|
17558
17558
|
// src/mcp-oauth-callback.ts
|
|
17559
17559
|
import { createServer } from "node:http";
|
|
17560
|
+
|
|
17561
|
+
// src/mcp-oauth-client-name.ts
|
|
17562
|
+
var DEFAULT_MCP_OAUTH_CLIENT_NAME = "Letta Code";
|
|
17563
|
+
var MAX_MCP_OAUTH_CLIENT_NAME_LENGTH = 64;
|
|
17564
|
+
function resolveMcpOAuthClientName(clientName) {
|
|
17565
|
+
if (clientName === undefined)
|
|
17566
|
+
return DEFAULT_MCP_OAUTH_CLIENT_NAME;
|
|
17567
|
+
const trimmed = clientName.trim();
|
|
17568
|
+
if (!trimmed)
|
|
17569
|
+
throw new Error("MCP OAuth client name must not be empty");
|
|
17570
|
+
if (trimmed.length > MAX_MCP_OAUTH_CLIENT_NAME_LENGTH) {
|
|
17571
|
+
throw new Error(`MCP OAuth client name must be at most ${MAX_MCP_OAUTH_CLIENT_NAME_LENGTH} characters`);
|
|
17572
|
+
}
|
|
17573
|
+
return trimmed;
|
|
17574
|
+
}
|
|
17575
|
+
|
|
17576
|
+
// src/mcp-oauth-callback.ts
|
|
17560
17577
|
var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
|
|
17561
|
-
async function startOAuthCallbackServer(preferredPort) {
|
|
17578
|
+
async function startOAuthCallbackServer(preferredPort, appName = DEFAULT_MCP_OAUTH_CLIENT_NAME) {
|
|
17562
17579
|
try {
|
|
17563
|
-
return await startOAuthCallbackServerOnPort(preferredPort ?? 0);
|
|
17580
|
+
return await startOAuthCallbackServerOnPort(preferredPort ?? 0, appName);
|
|
17564
17581
|
} catch (error2) {
|
|
17565
17582
|
if (!preferredPort)
|
|
17566
17583
|
throw error2;
|
|
17567
|
-
return startOAuthCallbackServerOnPort(0);
|
|
17584
|
+
return startOAuthCallbackServerOnPort(0, appName);
|
|
17568
17585
|
}
|
|
17569
17586
|
}
|
|
17570
17587
|
function callbackPort(redirectUrl) {
|
|
@@ -17577,7 +17594,7 @@ function callbackPort(redirectUrl) {
|
|
|
17577
17594
|
return;
|
|
17578
17595
|
}
|
|
17579
17596
|
}
|
|
17580
|
-
async function startOAuthCallbackServerOnPort(port) {
|
|
17597
|
+
async function startOAuthCallbackServerOnPort(port, appName) {
|
|
17581
17598
|
const expectedState = {};
|
|
17582
17599
|
let server;
|
|
17583
17600
|
let completed = false;
|
|
@@ -17627,25 +17644,25 @@ async function startOAuthCallbackServerOnPort(port) {
|
|
|
17627
17644
|
const domain = url2.searchParams.get("domain");
|
|
17628
17645
|
if (!state || state !== expectedState.value) {
|
|
17629
17646
|
response.writeHead(400, { "Content-Type": "text/html" });
|
|
17630
|
-
response.end(callbackPage("Authorization failed", "Invalid OAuth callback"));
|
|
17647
|
+
response.end(callbackPage(appName, "Authorization failed", "Invalid OAuth callback"));
|
|
17631
17648
|
return;
|
|
17632
17649
|
}
|
|
17633
17650
|
if (error2) {
|
|
17634
17651
|
response.writeHead(400, { "Content-Type": "text/html" });
|
|
17635
17652
|
reject?.(new Error(`MCP OAuth authorization failed: ${error2}`));
|
|
17636
|
-
response.end(callbackPage("Authorization failed", error2), () => {
|
|
17653
|
+
response.end(callbackPage(appName, "Authorization failed", error2), () => {
|
|
17637
17654
|
closeServer(true);
|
|
17638
17655
|
});
|
|
17639
17656
|
return;
|
|
17640
17657
|
}
|
|
17641
17658
|
if (!code) {
|
|
17642
17659
|
response.writeHead(400, { "Content-Type": "text/html" });
|
|
17643
|
-
response.end(callbackPage("Authorization failed", "Missing authorization code"));
|
|
17660
|
+
response.end(callbackPage(appName, "Authorization failed", "Missing authorization code"));
|
|
17644
17661
|
return;
|
|
17645
17662
|
}
|
|
17646
17663
|
response.writeHead(200, { "Content-Type": "text/html" });
|
|
17647
17664
|
settle?.(domain ? { code, domain } : { code });
|
|
17648
|
-
response.end(callbackPage("Authorization complete",
|
|
17665
|
+
response.end(callbackPage(appName, "Authorization complete", `You can close this tab and return to ${appName}.`), () => {
|
|
17649
17666
|
closeServer(true);
|
|
17650
17667
|
});
|
|
17651
17668
|
});
|
|
@@ -17694,8 +17711,8 @@ Content-Length: 0\r
|
|
|
17694
17711
|
}
|
|
17695
17712
|
};
|
|
17696
17713
|
}
|
|
17697
|
-
function callbackPage(title, message) {
|
|
17698
|
-
return `<!doctype html><html><body style="font-family:system-ui;padding:2rem"><h1>${escapeHtml(title)}</h1><p>${escapeHtml(message)}</p></body></html>`;
|
|
17714
|
+
function callbackPage(appName, title, message) {
|
|
17715
|
+
return `<!doctype html><html><head><meta charset="utf-8"><title>${escapeHtml(`${title} - ${appName}`)}</title></head><body style="font-family:system-ui;padding:2rem"><h1>${escapeHtml(title)}</h1><p>${escapeHtml(message)}</p></body></html>`;
|
|
17699
17716
|
}
|
|
17700
17717
|
function escapeHtml(value) {
|
|
17701
17718
|
return value.replace(/[&<>"']/g, (character) => {
|
|
@@ -17710,21 +17727,6 @@ function escapeHtml(value) {
|
|
|
17710
17727
|
});
|
|
17711
17728
|
}
|
|
17712
17729
|
|
|
17713
|
-
// src/mcp-oauth-client-name.ts
|
|
17714
|
-
var DEFAULT_MCP_OAUTH_CLIENT_NAME = "Letta Code";
|
|
17715
|
-
var MAX_MCP_OAUTH_CLIENT_NAME_LENGTH = 64;
|
|
17716
|
-
function resolveMcpOAuthClientName(clientName) {
|
|
17717
|
-
if (clientName === undefined)
|
|
17718
|
-
return DEFAULT_MCP_OAUTH_CLIENT_NAME;
|
|
17719
|
-
const trimmed = clientName.trim();
|
|
17720
|
-
if (!trimmed)
|
|
17721
|
-
throw new Error("MCP OAuth client name must not be empty");
|
|
17722
|
-
if (trimmed.length > MAX_MCP_OAUTH_CLIENT_NAME_LENGTH) {
|
|
17723
|
-
throw new Error(`MCP OAuth client name must be at most ${MAX_MCP_OAUTH_CLIENT_NAME_LENGTH} characters`);
|
|
17724
|
-
}
|
|
17725
|
-
return trimmed;
|
|
17726
|
-
}
|
|
17727
|
-
|
|
17728
17730
|
// src/mcp-oauth-identity.ts
|
|
17729
17731
|
import { createHash } from "node:crypto";
|
|
17730
17732
|
function mcpOAuthCredentialKey(agentId, serverName, serverUrl) {
|
|
@@ -17893,7 +17895,7 @@ async function createMcpOAuthSessionWithStorage(options) {
|
|
|
17893
17895
|
await releaseCredentialCoordinator(coordinationKey);
|
|
17894
17896
|
return;
|
|
17895
17897
|
}
|
|
17896
|
-
callback = options.interactive ? await startOAuthCallbackServer(callbackPort(persisted?.redirectUrl)) : undefined;
|
|
17898
|
+
callback = options.interactive ? await startOAuthCallbackServer(callbackPort(persisted?.redirectUrl), clientName) : undefined;
|
|
17897
17899
|
const redirectUrl = callback?.redirectUrl ?? persisted?.redirectUrl;
|
|
17898
17900
|
if (!redirectUrl) {
|
|
17899
17901
|
await releaseCredentialCoordinator(coordinationKey);
|
|
@@ -18606,4 +18608,4 @@ export {
|
|
|
18606
18608
|
authorizeMcpServerWithStorage
|
|
18607
18609
|
};
|
|
18608
18610
|
|
|
18609
|
-
//# debugId=
|
|
18611
|
+
//# debugId=BC2AA3213E5ACD8C64756E2164756E21
|