@letta-ai/letta-code 0.12.9-next.5 → 0.12.9-next.6
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/letta.js +38 -11
- package/package.json +1 -1
package/letta.js
CHANGED
|
@@ -3065,7 +3065,7 @@ var package_default;
|
|
|
3065
3065
|
var init_package = __esm(() => {
|
|
3066
3066
|
package_default = {
|
|
3067
3067
|
name: "@letta-ai/letta-code",
|
|
3068
|
-
version: "0.12.9-next.
|
|
3068
|
+
version: "0.12.9-next.6",
|
|
3069
3069
|
description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
3070
3070
|
type: "module",
|
|
3071
3071
|
bin: {
|
|
@@ -52684,6 +52684,7 @@ async function handleHeadlessCommand(argv, model, skillsDirectory) {
|
|
|
52684
52684
|
continue: { type: "boolean", short: "c" },
|
|
52685
52685
|
resume: { type: "boolean", short: "r" },
|
|
52686
52686
|
conversation: { type: "string" },
|
|
52687
|
+
"new-agent": { type: "boolean" },
|
|
52687
52688
|
new: { type: "boolean" },
|
|
52688
52689
|
agent: { type: "string", short: "a" },
|
|
52689
52690
|
model: { type: "string", short: "m" },
|
|
@@ -52769,11 +52770,16 @@ In headless mode, use:
|
|
|
52769
52770
|
--conversation <id> Resume a specific conversation by ID`);
|
|
52770
52771
|
process.exit(1);
|
|
52771
52772
|
}
|
|
52773
|
+
if (values.new) {
|
|
52774
|
+
console.error(`Error: --new has been renamed to --new-agent
|
|
52775
|
+
Usage: letta -p "..." --new-agent`);
|
|
52776
|
+
process.exit(1);
|
|
52777
|
+
}
|
|
52772
52778
|
let agent = null;
|
|
52773
52779
|
const specifiedAgentId = values.agent;
|
|
52774
52780
|
const specifiedConversationId = values.conversation;
|
|
52775
52781
|
const shouldContinue = values.continue;
|
|
52776
|
-
const forceNew = values
|
|
52782
|
+
const forceNew = values["new-agent"];
|
|
52777
52783
|
const systemPromptPreset = values.system;
|
|
52778
52784
|
const systemCustom = values["system-custom"];
|
|
52779
52785
|
const systemAppend = values["system-append"];
|
|
@@ -60558,6 +60564,7 @@ function getMessageStats2(messages) {
|
|
|
60558
60564
|
}
|
|
60559
60565
|
function ConversationSelector2({
|
|
60560
60566
|
agentId,
|
|
60567
|
+
agentName,
|
|
60561
60568
|
currentConversationId,
|
|
60562
60569
|
onSelect,
|
|
60563
60570
|
onNewConversation,
|
|
@@ -60859,8 +60866,11 @@ function ConversationSelector2({
|
|
|
60859
60866
|
children: [
|
|
60860
60867
|
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
60861
60868
|
dimColor: true,
|
|
60862
|
-
children:
|
|
60863
|
-
|
|
60869
|
+
children: [
|
|
60870
|
+
"No conversations for ",
|
|
60871
|
+
agentName || agentId.slice(0, 12)
|
|
60872
|
+
]
|
|
60873
|
+
}, undefined, true, undefined, this),
|
|
60864
60874
|
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
60865
60875
|
dimColor: true,
|
|
60866
60876
|
children: "Press N to start a new conversation"
|
|
@@ -78123,6 +78133,7 @@ Plan file path: ${planFilePath}`;
|
|
|
78123
78133
|
}, undefined, false, undefined, this),
|
|
78124
78134
|
activeOverlay === "conversations" && /* @__PURE__ */ jsx_dev_runtime60.jsxDEV(ConversationSelector2, {
|
|
78125
78135
|
agentId,
|
|
78136
|
+
agentName: agentName ?? undefined,
|
|
78126
78137
|
currentConversationId: conversationId,
|
|
78127
78138
|
onSelect: async (convId) => {
|
|
78128
78139
|
closeOverlay();
|
|
@@ -78942,6 +78953,7 @@ async function ensureDefaultAgents(client) {
|
|
|
78942
78953
|
const existingMemo = await findDefaultAgent(client, MEMO_TAG);
|
|
78943
78954
|
if (existingMemo) {
|
|
78944
78955
|
memoAgent = existingMemo;
|
|
78956
|
+
settingsManager.pinGlobal(existingMemo.id);
|
|
78945
78957
|
} else {
|
|
78946
78958
|
const { agent } = await createAgent(DEFAULT_AGENT_CONFIGS.memo);
|
|
78947
78959
|
await addTagToAgent(client, agent.id, MEMO_TAG);
|
|
@@ -78949,7 +78961,9 @@ async function ensureDefaultAgents(client) {
|
|
|
78949
78961
|
settingsManager.pinGlobal(agent.id);
|
|
78950
78962
|
}
|
|
78951
78963
|
const existingIncognito = await findDefaultAgent(client, INCOGNITO_TAG);
|
|
78952
|
-
if (
|
|
78964
|
+
if (existingIncognito) {
|
|
78965
|
+
settingsManager.pinGlobal(existingIncognito.id);
|
|
78966
|
+
} else {
|
|
78953
78967
|
const { agent } = await createAgent(DEFAULT_AGENT_CONFIGS.incognito);
|
|
78954
78968
|
await addTagToAgent(client, agent.id, INCOGNITO_TAG);
|
|
78955
78969
|
settingsManager.pinGlobal(agent.id);
|
|
@@ -78980,7 +78994,7 @@ var init_defaults = __esm(async () => {
|
|
|
78980
78994
|
name: "Incognito",
|
|
78981
78995
|
description: INCOGNITO_DESCRIPTION,
|
|
78982
78996
|
initBlocks: ["skills", "loaded_skills"],
|
|
78983
|
-
baseTools: ["web_search", "conversation_search", "fetch_webpage"
|
|
78997
|
+
baseTools: ["web_search", "conversation_search", "fetch_webpage"]
|
|
78984
78998
|
}
|
|
78985
78999
|
};
|
|
78986
79000
|
});
|
|
@@ -79888,6 +79902,7 @@ function getMessageStats(messages) {
|
|
|
79888
79902
|
}
|
|
79889
79903
|
function ConversationSelector({
|
|
79890
79904
|
agentId,
|
|
79905
|
+
agentName,
|
|
79891
79906
|
currentConversationId,
|
|
79892
79907
|
onSelect,
|
|
79893
79908
|
onNewConversation,
|
|
@@ -80189,8 +80204,11 @@ function ConversationSelector({
|
|
|
80189
80204
|
children: [
|
|
80190
80205
|
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
80191
80206
|
dimColor: true,
|
|
80192
|
-
children:
|
|
80193
|
-
|
|
80207
|
+
children: [
|
|
80208
|
+
"No conversations for ",
|
|
80209
|
+
agentName || agentId.slice(0, 12)
|
|
80210
|
+
]
|
|
80211
|
+
}, undefined, true, undefined, this),
|
|
80194
80212
|
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
80195
80213
|
dimColor: true,
|
|
80196
80214
|
children: "Press N to start a new conversation"
|
|
@@ -81927,6 +81945,7 @@ async function main() {
|
|
|
81927
81945
|
continue: { type: "boolean" },
|
|
81928
81946
|
resume: { type: "boolean", short: "r" },
|
|
81929
81947
|
conversation: { type: "string", short: "C" },
|
|
81948
|
+
"new-agent": { type: "boolean" },
|
|
81930
81949
|
new: { type: "boolean" },
|
|
81931
81950
|
"init-blocks": { type: "string" },
|
|
81932
81951
|
"base-tools": { type: "string" },
|
|
@@ -81993,7 +82012,12 @@ Note: Flags should use double dashes for full names (e.g., --yolo, not -yolo)`);
|
|
|
81993
82012
|
const shouldContinue = values.continue ?? false;
|
|
81994
82013
|
const shouldResume = values.resume ?? false;
|
|
81995
82014
|
const specifiedConversationId = values.conversation ?? null;
|
|
81996
|
-
const forceNew = values
|
|
82015
|
+
const forceNew = values["new-agent"] ?? false;
|
|
82016
|
+
if (values.new) {
|
|
82017
|
+
console.error(`Error: --new has been renamed to --new-agent
|
|
82018
|
+
Usage: letta --new-agent`);
|
|
82019
|
+
process.exit(1);
|
|
82020
|
+
}
|
|
81997
82021
|
const initBlocksRaw = values["init-blocks"];
|
|
81998
82022
|
const baseToolsRaw = values["base-tools"];
|
|
81999
82023
|
let specifiedAgentId = values.agent ?? null;
|
|
@@ -82251,6 +82275,7 @@ Error: ${message}`);
|
|
|
82251
82275
|
const [agentProvenance, setAgentProvenance] = useState40(null);
|
|
82252
82276
|
const [selectedGlobalAgentId, setSelectedGlobalAgentId] = useState40(null);
|
|
82253
82277
|
const [resumeAgentId, setResumeAgentId] = useState40(null);
|
|
82278
|
+
const [resumeAgentName, setResumeAgentName] = useState40(null);
|
|
82254
82279
|
const [selectedConversationId, setSelectedConversationId] = useState40(null);
|
|
82255
82280
|
const [userRequestedNewAgent, setUserRequestedNewAgent] = useState40(false);
|
|
82256
82281
|
useEffect28(() => {
|
|
@@ -82334,8 +82359,9 @@ Error: ${message}`);
|
|
|
82334
82359
|
const lastAgentId = lastSession?.agentId ?? localSettings.lastAgent;
|
|
82335
82360
|
if (lastAgentId) {
|
|
82336
82361
|
try {
|
|
82337
|
-
await client.agents.retrieve(lastAgentId);
|
|
82362
|
+
const agent = await client.agents.retrieve(lastAgentId);
|
|
82338
82363
|
setResumeAgentId(lastAgentId);
|
|
82364
|
+
setResumeAgentName(agent.name ?? null);
|
|
82339
82365
|
setLoadingState("selecting_conversation");
|
|
82340
82366
|
return;
|
|
82341
82367
|
} catch {}
|
|
@@ -82643,6 +82669,7 @@ Error during initialization: ${message}`);
|
|
|
82643
82669
|
if (loadingState === "selecting_conversation" && resumeAgentId) {
|
|
82644
82670
|
return React14.createElement(ConversationSelector, {
|
|
82645
82671
|
agentId: resumeAgentId,
|
|
82672
|
+
agentName: resumeAgentName ?? undefined,
|
|
82646
82673
|
currentConversationId: "",
|
|
82647
82674
|
onSelect: (conversationId2) => {
|
|
82648
82675
|
setSelectedConversationId(conversationId2);
|
|
@@ -82720,4 +82747,4 @@ Error during initialization: ${message}`);
|
|
|
82720
82747
|
}
|
|
82721
82748
|
main();
|
|
82722
82749
|
|
|
82723
|
-
//# debugId=
|
|
82750
|
+
//# debugId=5CF9112A95B53A7C64756E2164756E21
|