@letta-ai/letta-code 0.27.23 → 0.27.24

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.
@@ -166,6 +166,10 @@ There are two ways to change memory:
166
166
  - **The \`memory\` tool (shorthand).** Use it for small, targeted edits. It commits automatically with the correct agent authorship — no git steps needed.
167
167
  - **Direct file edits (full control).** For larger changes — restructuring directories, rewriting several blocks — edit the projected files directly, then commit:
168
168
 
169
+ Memory markdown files must start with YAML frontmatter containing a non-empty \`description:\` field. The \`memory\` and \`memory_apply_patch\` tools add and preserve this automatically; when using raw file edits, preserve existing frontmatter or add it before committing. The MemFS pre-commit hook enforces this requirement, rejects unknown keys, and prevents changes to protected \`read_only\` files. Skill \`SKILL.md\` files use their own skill frontmatter format.
170
+
171
+ \`$AGENT_NAME\` is normally populated when the runtime knows the current agent name, but direct shell environments can still miss it. Use a non-empty author name fallback when committing directly.
172
+
169
173
  \`\`\`bash
170
174
  cd "$MEMORY_DIR"
171
175
 
@@ -173,8 +177,9 @@ cd "$MEMORY_DIR"
173
177
  git status
174
178
 
175
179
  # Commit your changes
176
- git add .
177
- git commit --author="$AGENT_NAME <$AGENT_ID@letta.com>" -m "<type>: <what changed>"
180
+ git add <specific files>
181
+ author_name="\${AGENT_NAME:-$AGENT_ID}"
182
+ git commit --author="$author_name <$AGENT_ID@letta.com>" -m "<type>: <what changed>"
178
183
  \`\`\`
179
184
 
180
185
  Your context is git-tracked, so you can always inspect or revert past changes:
@@ -1602,7 +1607,8 @@ var models_default = {
1602
1607
  context_window: 140000,
1603
1608
  max_output_tokens: 28000,
1604
1609
  parallel_tool_calls: true
1605
- }
1610
+ },
1611
+ isFeatured: true
1606
1612
  },
1607
1613
  {
1608
1614
  id: "auto-chat",
@@ -1627,7 +1633,8 @@ var models_default = {
1627
1633
  context_window: 200000,
1628
1634
  max_output_tokens: 28000,
1629
1635
  parallel_tool_calls: true
1630
- }
1636
+ },
1637
+ isFeatured: true
1631
1638
  },
1632
1639
  {
1633
1640
  id: "fable",
@@ -1636,7 +1643,7 @@ var models_default = {
1636
1643
  description: "Fable 5 (high reasoning)",
1637
1644
  isFeatured: true,
1638
1645
  updateArgs: {
1639
- context_window: 1e6,
1646
+ context_window: 200000,
1640
1647
  max_output_tokens: 128000,
1641
1648
  enable_reasoner: true,
1642
1649
  reasoning_effort: "high",
@@ -1649,7 +1656,7 @@ var models_default = {
1649
1656
  label: "Fable 5",
1650
1657
  description: "Fable 5 (low reasoning)",
1651
1658
  updateArgs: {
1652
- context_window: 1e6,
1659
+ context_window: 200000,
1653
1660
  max_output_tokens: 128000,
1654
1661
  enable_reasoner: true,
1655
1662
  reasoning_effort: "low",
@@ -1663,7 +1670,7 @@ var models_default = {
1663
1670
  label: "Fable 5",
1664
1671
  description: "Fable 5 (med reasoning)",
1665
1672
  updateArgs: {
1666
- context_window: 1e6,
1673
+ context_window: 200000,
1667
1674
  max_output_tokens: 128000,
1668
1675
  enable_reasoner: true,
1669
1676
  reasoning_effort: "medium",
@@ -1677,7 +1684,7 @@ var models_default = {
1677
1684
  label: "Fable 5",
1678
1685
  description: "Fable 5 (extra-high reasoning)",
1679
1686
  updateArgs: {
1680
- context_window: 1e6,
1687
+ context_window: 200000,
1681
1688
  max_output_tokens: 128000,
1682
1689
  enable_reasoner: true,
1683
1690
  reasoning_effort: "xhigh",
@@ -1690,7 +1697,74 @@ var models_default = {
1690
1697
  label: "Fable 5",
1691
1698
  description: "Fable 5 (max reasoning)",
1692
1699
  updateArgs: {
1693
- context_window: 1e6,
1700
+ context_window: 200000,
1701
+ max_output_tokens: 128000,
1702
+ enable_reasoner: true,
1703
+ reasoning_effort: "max",
1704
+ parallel_tool_calls: true
1705
+ }
1706
+ },
1707
+ {
1708
+ id: "fable-1m",
1709
+ handle: "anthropic/claude-fable-5",
1710
+ label: "Fable 5 1M",
1711
+ description: "Claude Fable 5 with 1M token context window (high reasoning)",
1712
+ updateArgs: {
1713
+ context_window: 950000,
1714
+ max_output_tokens: 128000,
1715
+ enable_reasoner: true,
1716
+ reasoning_effort: "high",
1717
+ parallel_tool_calls: true
1718
+ }
1719
+ },
1720
+ {
1721
+ id: "fable-1m-low",
1722
+ handle: "anthropic/claude-fable-5",
1723
+ label: "Fable 5 1M",
1724
+ description: "Fable 5 1M (low reasoning)",
1725
+ updateArgs: {
1726
+ context_window: 950000,
1727
+ max_output_tokens: 128000,
1728
+ enable_reasoner: true,
1729
+ reasoning_effort: "low",
1730
+ max_reasoning_tokens: 4000,
1731
+ parallel_tool_calls: true
1732
+ }
1733
+ },
1734
+ {
1735
+ id: "fable-1m-medium",
1736
+ handle: "anthropic/claude-fable-5",
1737
+ label: "Fable 5 1M",
1738
+ description: "Fable 5 1M (med reasoning)",
1739
+ updateArgs: {
1740
+ context_window: 950000,
1741
+ max_output_tokens: 128000,
1742
+ enable_reasoner: true,
1743
+ reasoning_effort: "medium",
1744
+ max_reasoning_tokens: 12000,
1745
+ parallel_tool_calls: true
1746
+ }
1747
+ },
1748
+ {
1749
+ id: "fable-1m-xhigh",
1750
+ handle: "anthropic/claude-fable-5",
1751
+ label: "Fable 5 1M",
1752
+ description: "Fable 5 1M (extra-high reasoning)",
1753
+ updateArgs: {
1754
+ context_window: 950000,
1755
+ max_output_tokens: 128000,
1756
+ enable_reasoner: true,
1757
+ reasoning_effort: "xhigh",
1758
+ parallel_tool_calls: true
1759
+ }
1760
+ },
1761
+ {
1762
+ id: "fable-1m-max",
1763
+ handle: "anthropic/claude-fable-5",
1764
+ label: "Fable 5 1M",
1765
+ description: "Fable 5 1M (max reasoning)",
1766
+ updateArgs: {
1767
+ context_window: 950000,
1694
1768
  max_output_tokens: 128000,
1695
1769
  enable_reasoner: true,
1696
1770
  reasoning_effort: "max",
@@ -1789,8 +1863,7 @@ var models_default = {
1789
1863
  reasoning_effort: "high",
1790
1864
  enable_reasoner: true,
1791
1865
  parallel_tool_calls: true
1792
- },
1793
- isFeatured: true
1866
+ }
1794
1867
  },
1795
1868
  {
1796
1869
  id: "opus-4.8-1m-no-reasoning",
@@ -2053,7 +2126,6 @@ var models_default = {
2053
2126
  handle: "anthropic/claude-sonnet-4-6",
2054
2127
  label: "Sonnet 4.6 1M",
2055
2128
  description: "Claude Sonnet 4.6 with 1M token context window (high reasoning)",
2056
- isFeatured: true,
2057
2129
  updateArgs: {
2058
2130
  context_window: 9500000,
2059
2131
  max_output_tokens: 128000,
@@ -2935,7 +3007,6 @@ var models_default = {
2935
3007
  handle: "openai/gpt-5.4",
2936
3008
  label: "GPT-5.4",
2937
3009
  description: "OpenAI's most capable model (high reasoning)",
2938
- isFeatured: true,
2939
3010
  updateArgs: {
2940
3011
  reasoning_effort: "high",
2941
3012
  verbosity: "medium",
@@ -3092,7 +3163,6 @@ var models_default = {
3092
3163
  handle: "openai/gpt-5.4-mini",
3093
3164
  label: "GPT-5.4 Mini",
3094
3165
  description: "Fast, efficient GPT-5.4 variant (med reasoning)",
3095
- isFeatured: true,
3096
3166
  updateArgs: {
3097
3167
  reasoning_effort: "medium",
3098
3168
  verbosity: "low",
@@ -3305,7 +3375,8 @@ var models_default = {
3305
3375
  context_window: 1048576,
3306
3376
  max_output_tokens: 384000,
3307
3377
  parallel_tool_calls: true
3308
- }
3378
+ },
3379
+ isFeatured: true
3309
3380
  },
3310
3381
  {
3311
3382
  id: "glm-5.2",
@@ -3349,7 +3420,6 @@ var models_default = {
3349
3420
  handle: "minimax/MiniMax-M2.7",
3350
3421
  label: "MiniMax 2.7",
3351
3422
  description: "MiniMax's M2.7 coding model",
3352
- isFeatured: true,
3353
3423
  free: true,
3354
3424
  updateArgs: {
3355
3425
  context_window: 160000,
@@ -3765,4 +3835,4 @@ export {
3765
3835
  DEFAULT_CREATED_AGENT_BASE_TOOLS
3766
3836
  };
3767
3837
 
3768
- //# debugId=CBBF7FD8794E919564756E2164756E21
3838
+ //# debugId=8015D3367242D26164756E2164756E21
@@ -11,7 +11,7 @@
11
11
  "/**\n * Pure personality preset definitions and content builders.\n *\n * This module must stay free of Node/backend imports: it is bundled into the\n * browser-safe `@letta-ai/letta-code/agent-presets` package export so that\n * other surfaces (e.g. the chat web app) can build byte-identical agent\n * creation payloads. Filesystem application of personalities lives in\n * `personality.ts`.\n */\n\nimport { parseMdxFrontmatter } from \"./memory\";\nimport { MEMORY_PROMPTS, SYSTEM_PROMPTS } from \"./prompt-assets\";\n\nexport interface PersonalityOption {\n id: \"blank\" | \"kawaii\" | \"codex\" | \"claude\" | \"linus\" | \"memo\" | \"tutorial\";\n label: string;\n description: string;\n /** Model ID from models.json to use when no explicit model is provided. */\n defaultModel?: string;\n}\n\nexport const PERSONALITY_OPTIONS: PersonalityOption[] = [\n {\n id: \"memo\",\n label: \"Letta Code\",\n description: \"The memory-first agent\",\n },\n {\n id: \"tutorial\",\n label: \"Tutor\",\n description: \"A tutor-guide that teaches Letta through real work\",\n },\n {\n id: \"blank\",\n label: \"Blank\",\n description: \"Blank starter — you provide the personality\",\n },\n {\n id: \"linus\",\n label: \"Linus\",\n description: \"Code with a stern hand\",\n },\n {\n id: \"kawaii\",\n label: \"Letta-Chan\",\n description: \"sugoi~ (◕‿◕)✨\",\n defaultModel: \"auto-chat\",\n },\n {\n id: \"claude\",\n label: \"Letta Code\",\n description: \"Vanilla Claude flavors\",\n },\n {\n id: \"codex\",\n label: \"Letta Code\",\n description: \"Vanilla Codex flavors\",\n },\n];\n\nexport type PersonalityId = PersonalityOption[\"id\"];\n\nexport const DEFAULT_CREATE_AGENT_PERSONALITIES = [\n \"memo\",\n \"tutorial\",\n \"blank\",\n \"linus\",\n \"kawaii\",\n] as const;\n\nexport type DefaultCreateAgentPersonalityId =\n (typeof DEFAULT_CREATE_AGENT_PERSONALITIES)[number];\n\nconst PERSONALITY_ALIASES: Record<string, PersonalityId> = {\n \"letta-code\": \"memo\",\n lettacode: \"memo\",\n memo: \"memo\",\n};\n\nexport interface PersonalityBlockDefinition {\n value: string;\n description?: string;\n templatePromptAssetName: string;\n}\n\nexport const ONBOARDING_PERSONALITIES = [\n \"tutorial\",\n] as const satisfies readonly PersonalityId[];\n\nexport function supportsOnboardingBlock(\n personalityId: PersonalityId,\n): personalityId is (typeof ONBOARDING_PERSONALITIES)[number] {\n return (ONBOARDING_PERSONALITIES as readonly PersonalityId[]).includes(\n personalityId,\n );\n}\n\nexport const FRONTMATTER_REGEX = /^(---\\n[\\s\\S]*?\\n---)\\n*/;\nconst EDITABLE_FRONTMATTER_KEYS = [\n \"description\",\n \"limit\",\n \"read_only\",\n] as const;\n\nexport function normalizeComparableContent(content: string): string {\n return content.replace(/\\r\\n/g, \"\\n\").trim();\n}\n\nfunction ensureTrailingNewline(content: string): string {\n return `${content.trimEnd()}\\n`;\n}\n\nfunction getPromptTemplate(promptAssetName: string): {\n frontmatter: Record<string, string>;\n body: string;\n} {\n const rawPrompt = MEMORY_PROMPTS[promptAssetName];\n if (!rawPrompt) {\n throw new Error(`Missing built-in prompt content for ${promptAssetName}`);\n }\n\n return parseMdxFrontmatter(rawPrompt);\n}\n\nfunction getPromptBody(promptAssetName: string): string {\n const { body } = getPromptTemplate(promptAssetName);\n if (!body.trim()) {\n throw new Error(`${promptAssetName} has empty body content`);\n }\n\n return ensureTrailingNewline(body);\n}\n\nfunction getEditablePromptFrontmatter(\n promptAssetName: string,\n): Record<string, string> {\n const { frontmatter } = getPromptTemplate(promptAssetName);\n return Object.fromEntries(\n Object.entries(frontmatter).filter(([key]) =>\n (EDITABLE_FRONTMATTER_KEYS as readonly string[]).includes(key),\n ),\n );\n}\n\nexport function serializeFrontmatter(\n frontmatter: Record<string, string>,\n): string {\n const orderedKeys = [\n ...EDITABLE_FRONTMATTER_KEYS,\n ...Object.keys(frontmatter).filter(\n (key) => !(EDITABLE_FRONTMATTER_KEYS as readonly string[]).includes(key),\n ),\n ];\n const lines: string[] = [];\n\n for (const key of orderedKeys) {\n const value = frontmatter[key];\n if (value === undefined) {\n continue;\n }\n lines.push(`${key}: ${value}`);\n }\n\n return `---\\n${lines.join(\"\\n\")}\\n---`;\n}\n\nexport function buildDefaultMemoryFile(\n templatePromptAssetName: string,\n body: string,\n description?: string,\n): string {\n const normalizedBody = ensureTrailingNewline(body.trim());\n if (!normalizedBody.trim()) {\n throw new Error(\"Memory content cannot be empty\");\n }\n\n const frontmatter = getEditablePromptFrontmatter(templatePromptAssetName);\n if (description !== undefined) {\n frontmatter.description = description;\n }\n\n if (Object.keys(frontmatter).length === 0) {\n return normalizedBody;\n }\n\n return `${serializeFrontmatter(frontmatter)}\\n\\n${normalizedBody}`;\n}\n\nfunction getSystemPromptById(systemPromptId: string): string {\n const prompt = SYSTEM_PROMPTS.find(\n (candidate) => candidate.id === systemPromptId,\n );\n if (!prompt || !prompt.content.trim()) {\n throw new Error(`Missing built-in prompt content for ${systemPromptId}`);\n }\n return prompt.content;\n}\n\nexport function getPersonalityOption(\n personalityId: PersonalityId,\n): PersonalityOption {\n const option = PERSONALITY_OPTIONS.find(\n (candidate) => candidate.id === personalityId,\n );\n if (!option) {\n throw new Error(`Unknown personality: ${personalityId}`);\n }\n return option;\n}\n\nexport function resolvePersonalityId(input: string): PersonalityId | null {\n const normalized = input.trim().toLowerCase();\n if (!normalized) {\n return null;\n }\n\n const direct = PERSONALITY_OPTIONS.find(\n (candidate) => candidate.id === normalized,\n );\n if (direct) {\n return direct.id;\n }\n\n return PERSONALITY_ALIASES[normalized] ?? null;\n}\n\nexport function getPersonalityContent(personalityId: PersonalityId): string {\n if (personalityId === \"memo\") {\n return getPromptBody(\"persona_memo.mdx\");\n }\n\n if (personalityId === \"tutorial\") {\n return getPromptBody(\"persona_tutorial.mdx\");\n }\n\n if (personalityId === \"blank\") {\n return getPromptBody(\"persona_blank.mdx\");\n }\n\n if (personalityId === \"kawaii\") {\n return getPromptBody(\"persona_kawaii.mdx\");\n }\n\n if (personalityId === \"codex\") {\n return ensureTrailingNewline(getSystemPromptById(\"source-codex\"));\n }\n\n if (personalityId === \"linus\") {\n return getPromptBody(\"persona_linus.mdx\");\n }\n\n return ensureTrailingNewline(getSystemPromptById(\"source-claude\"));\n}\n\nexport function getDefaultHumanContent(): string {\n return getPromptBody(\"human.mdx\");\n}\n\nexport function getPersonalityHumanContent(\n personalityId: PersonalityId,\n): string {\n if (personalityId === \"memo\" || personalityId === \"tutorial\") {\n return getPromptBody(\"human_memo.mdx\");\n }\n\n if (personalityId === \"linus\") {\n return getPromptBody(\"human_linus.mdx\");\n }\n\n if (personalityId === \"kawaii\") {\n return getPromptBody(\"human_kawaii.mdx\");\n }\n\n if (personalityId === \"blank\") {\n return getDefaultHumanContent();\n }\n\n return getDefaultHumanContent();\n}\n\nexport function getPersonalityBlockValues(personalityId: PersonalityId): {\n persona: string;\n human: string;\n} {\n const overrides = getPersonalityBlockDefinitions(personalityId);\n return {\n persona: overrides.persona.value,\n human: overrides.human.value,\n };\n}\n\nexport function getPersonalityBlockDefinitions(personalityId: PersonalityId): {\n persona: PersonalityBlockDefinition;\n human: PersonalityBlockDefinition;\n onboarding?: PersonalityBlockDefinition;\n} {\n const personaTemplatePromptAssetName =\n personalityId === \"memo\"\n ? \"persona_memo.mdx\"\n : personalityId === \"tutorial\"\n ? \"persona_tutorial.mdx\"\n : personalityId === \"blank\"\n ? \"persona_blank.mdx\"\n : personalityId === \"kawaii\"\n ? \"persona_kawaii.mdx\"\n : personalityId === \"linus\"\n ? \"persona_linus.mdx\"\n : \"persona.mdx\";\n const humanTemplatePromptAssetName =\n personalityId === \"memo\" || personalityId === \"tutorial\"\n ? \"human_memo.mdx\"\n : personalityId === \"kawaii\"\n ? \"human_kawaii.mdx\"\n : personalityId === \"linus\"\n ? \"human_linus.mdx\"\n : \"human.mdx\";\n\n return {\n persona: {\n value: getPersonalityContent(personalityId),\n description: getEditablePromptFrontmatter(personaTemplatePromptAssetName)\n .description,\n templatePromptAssetName: personaTemplatePromptAssetName,\n },\n human: {\n value: getPersonalityHumanContent(personalityId),\n description: getEditablePromptFrontmatter(humanTemplatePromptAssetName)\n .description,\n templatePromptAssetName: humanTemplatePromptAssetName,\n },\n ...(supportsOnboardingBlock(personalityId)\n ? {\n onboarding: {\n value: getPromptBody(\"onboarding.mdx\"),\n description:\n getEditablePromptFrontmatter(\"onboarding.mdx\").description,\n templatePromptAssetName: \"onboarding.mdx\",\n },\n }\n : {}),\n };\n}\n\nexport interface PersonalityMemoryBlock {\n label: string;\n value: string;\n description?: string;\n}\n\n/**\n * Build the memory blocks a new agent gets for a personality: the default\n * blocks with persona/human values replaced by the personality's content,\n * plus the onboarding block for personalities that support it.\n *\n * Shared by the CLI create path (`buildCreateAgentOptionsForPersonality`) and\n * the exported wire payload builder (`buildCreateAgentRequestForPersonality`).\n */\nexport function buildPersonalityMemoryBlocks(\n personalityId: PersonalityId,\n defaultMemoryBlocks: Array<{\n label: string;\n value: string;\n description?: string | null;\n }>,\n): PersonalityMemoryBlock[] {\n const blockDefinitions = getPersonalityBlockDefinitions(personalityId);\n\n const memoryBlocks = defaultMemoryBlocks.map((block) => {\n if (block.label === \"persona\") {\n return {\n label: block.label,\n value: blockDefinitions.persona.value,\n description:\n blockDefinitions.persona.description ??\n block.description ??\n undefined,\n };\n }\n\n if (block.label === \"human\") {\n return {\n label: block.label,\n value: blockDefinitions.human.value,\n description:\n blockDefinitions.human.description ?? block.description ?? undefined,\n };\n }\n\n return {\n label: block.label,\n value: block.value,\n description: block.description ?? undefined,\n };\n });\n\n if (blockDefinitions.onboarding) {\n memoryBlocks.push({\n label: \"onboarding\",\n value: blockDefinitions.onboarding.value,\n description: blockDefinitions.onboarding.description,\n });\n }\n\n return memoryBlocks;\n}\n",
12
12
  "/**\n * Pure builder for the `POST /v1/agents` wire payload of a Letta Code\n * personality agent.\n *\n * This is the shared source of truth between the CLI create path\n * (`createAgentForPersonality` → `createAgent`) and external surfaces that\n * create Letta Code agents directly through Core (e.g. the chat web app via\n * the `@letta-ai/letta-code/agent-presets` package export). It must stay free\n * of Node/backend imports so it can be bundled for the browser.\n *\n * Intentional differences from the CLI's `createAgent`:\n * - `context_window_limit` is omitted (the CLI resolves it via the models\n * API at runtime); Core applies the default for the model handle.\n * - `embedding` is omitted (CLI only sets it when explicitly configured).\n */\n\nimport { DEFAULT_SUMMARIZATION_MODEL } from \"@/constants\";\nimport { buildCreatedAgentTags } from \"./agent-tags\";\nimport { getDefaultMemoryBlocks } from \"./memory\";\nimport { getDefaultModel, resolveModel } from \"./model-catalog\";\nimport {\n buildPersonalityMemoryBlocks,\n getPersonalityOption,\n type PersonalityId,\n type PersonalityMemoryBlock,\n} from \"./personality-presets\";\nimport { buildSystemPrompt } from \"./prompt-assets\";\n\n/** Agent type used for all Letta Code agents. */\nexport const LETTA_CODE_AGENT_TYPE = \"letta_v1_agent\";\n\n/**\n * Server-side tools attached to created agents. Client-side tools (Read,\n * Write, Bash, etc.) are passed via client_tools at runtime instead.\n */\nexport const DEFAULT_CREATED_AGENT_BASE_TOOLS = [\"web_search\", \"fetch_webpage\"];\n\nexport interface CreateAgentRequestForPersonality {\n agent_type: string;\n name: string;\n description: string;\n model: string;\n system: string;\n memory_blocks: PersonalityMemoryBlock[];\n tags: string[];\n tools: string[];\n include_base_tools: boolean;\n include_base_tool_rules: boolean;\n initial_message_sequence: never[];\n parallel_tool_calls: boolean;\n compaction_settings: { model: string };\n}\n\n/**\n * Build the Core create-agent request body for a Letta Code personality\n * agent with git-backed (MemFS) memory — byte-identical content to what the\n * CLI sends when creating the same personality against the Letta API.\n */\nexport async function buildCreateAgentRequestForPersonality(params: {\n personalityId: PersonalityId;\n name?: string;\n description?: string;\n /** Model ID or handle; defaults to the personality's default model. */\n model?: string;\n /** Extra tags (e.g. a favorite tag) appended to the Letta Code tags. */\n extraTags?: string[];\n}): Promise<CreateAgentRequestForPersonality> {\n const { personalityId, name, description, model, extraTags } = params;\n const personality = getPersonalityOption(personalityId);\n\n const modelIdentifier = model ?? personality.defaultModel;\n const modelHandle = modelIdentifier\n ? resolveModel(modelIdentifier)\n : getDefaultModel();\n if (!modelHandle) {\n throw new Error(`Unknown model: ${modelIdentifier}`);\n }\n\n const defaultMemoryBlocks = await getDefaultMemoryBlocks();\n\n return {\n agent_type: LETTA_CODE_AGENT_TYPE,\n name: name ?? personality.label,\n description: description ?? personality.description,\n model: modelHandle,\n system: buildSystemPrompt(\"default\", \"memfs\"),\n memory_blocks: buildPersonalityMemoryBlocks(\n personalityId,\n defaultMemoryBlocks,\n ),\n tags: buildCreatedAgentTags({ enableMemfs: true, tags: extraTags }),\n tools: [...DEFAULT_CREATED_AGENT_BASE_TOOLS],\n include_base_tools: false,\n include_base_tool_rules: false,\n initial_message_sequence: [],\n parallel_tool_calls: true,\n compaction_settings: { model: DEFAULT_SUMMARIZATION_MODEL },\n };\n}\n"
13
13
  ],
14
- "mappings": ";AAQO,IAAM,wBAAwB;AAG9B,IAAM,0BAA0B;AAGhC,IAAM,yBAAyB;AAQ/B,SAAS,qBAAqB,CACnC,UAAwC,CAAC,GAC/B;AAAA,EACV,MAAM,OAAO,CAAC,qBAAqB;AAAA,EACnC,IAAI,QAAQ,YAAY;AAAA,IACtB,KAAK,KAAK,uBAAuB;AAAA,EACnC;AAAA,EACA,IAAI,QAAQ,aAAa;AAAA,IACvB,KAAK,KAAK,sBAAsB;AAAA,EAClC;AAAA,EACA,IAAI,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,IAAI,GAAG;AAAA,IAC/C,KAAK,KAAK,GAAG,QAAQ,IAAI;AAAA,EAC3B;AAAA,EACA,OAAO,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC;AAAA;;ACvB1B,IAAM,8BAA8B;AA2BpC,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB,IAAI;AACjC,IAAM,wBAAwB,KAAK;AAEnC,IAAM,mBAAmB;AACzB,IAAM,oBAAoB,IAAI;AAC9B,IAAM,qBAAqB,KAAK;AAoBhC,IAAM,+BAA+B,KAAK;;;ACjE1C,IAAM,yBAAyB,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IACZ,MAAM,QAAQ,YAAY;AAAA,IAC1B,aAAa,eAAe,YAAY;AAAA,IACxC,OAAO;AAAA,IACP,QAAQ,kBAAkB,WAAW,OAAO;AAAA,IAC5C,eAAe,6BACb,eACA,mBACF;AAAA,IACA,MAAM,sBAAsB,EAAE,aAAa,MAAM,MAAM,UAAU,CAAC;AAAA,IAClE,OAAO,CAAC,GAAG,gCAAgC;AAAA,IAC3C,oBAAoB;AAAA,IACpB,yBAAyB;AAAA,IACzB,0BAA0B,CAAC;AAAA,IAC3B,qBAAqB;AAAA,IACrB,qBAAqB,EAAE,OAAO,4BAA4B;AAAA,EAC5D;AAAA;",
15
+ "debugId": "8015D3367242D26164756E2164756E21",
16
16
  "names": []
17
17
  }
@@ -25,25 +25,6 @@ export declare const models: ({
25
25
  };
26
26
  isFeatured: boolean;
27
27
  shortLabel?: undefined;
28
- } | {
29
- id: string;
30
- handle: string;
31
- label: string;
32
- description: string;
33
- free: boolean;
34
- updateArgs: {
35
- context_window: number;
36
- max_output_tokens: number;
37
- parallel_tool_calls: boolean;
38
- enable_reasoner?: undefined;
39
- reasoning_effort?: undefined;
40
- max_reasoning_tokens?: undefined;
41
- verbosity?: undefined;
42
- temperature?: undefined;
43
- };
44
- isDefault?: undefined;
45
- isFeatured?: undefined;
46
- shortLabel?: undefined;
47
28
  } | {
48
29
  id: string;
49
30
  handle: string;
@@ -239,17 +220,17 @@ export declare const models: ({
239
220
  handle: string;
240
221
  label: string;
241
222
  description: string;
242
- isFeatured: boolean;
243
223
  updateArgs: {
244
- reasoning_effort: string;
245
- verbosity: string;
246
224
  context_window: number;
247
- max_output_tokens: null;
225
+ max_output_tokens: number;
248
226
  parallel_tool_calls: boolean;
249
227
  enable_reasoner?: undefined;
228
+ reasoning_effort?: undefined;
250
229
  max_reasoning_tokens?: undefined;
230
+ verbosity?: undefined;
251
231
  temperature?: undefined;
252
232
  };
233
+ isFeatured: boolean;
253
234
  isDefault?: undefined;
254
235
  free?: undefined;
255
236
  shortLabel?: undefined;
@@ -277,7 +258,7 @@ export declare const models: ({
277
258
  handle: string;
278
259
  label: string;
279
260
  description: string;
280
- isFeatured: boolean;
261
+ free: boolean;
281
262
  updateArgs: {
282
263
  context_window: number;
283
264
  max_output_tokens: number;
@@ -289,7 +270,7 @@ export declare const models: ({
289
270
  temperature?: undefined;
290
271
  };
291
272
  isDefault?: undefined;
292
- free?: undefined;
273
+ isFeatured?: undefined;
293
274
  shortLabel?: undefined;
294
275
  } | {
295
276
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../src/agent/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoB,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAcnE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAaxC"}
1
+ {"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../src/agent/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoB,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAcnE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAaxC"}
package/letta.js CHANGED
@@ -4672,7 +4672,7 @@ var package_default;
4672
4672
  var init_package = __esm(() => {
4673
4673
  package_default = {
4674
4674
  name: "@letta-ai/letta-code",
4675
- version: "0.27.23",
4675
+ version: "0.27.24",
4676
4676
  description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
4677
4677
  type: "module",
4678
4678
  packageManager: "bun@1.3.0",
@@ -6533,11 +6533,13 @@ var init_skill_sources = __esm(() => {
6533
6533
  // src/agent/context.ts
6534
6534
  var exports_context = {};
6535
6535
  __export(exports_context, {
6536
+ setCurrentAgentName: () => setCurrentAgentName,
6536
6537
  setCurrentAgentId: () => setCurrentAgentId,
6537
6538
  setConversationId: () => setConversationId,
6538
6539
  setAgentContext: () => setAgentContext,
6539
6540
  getSkillsDirectory: () => getSkillsDirectory,
6540
6541
  getSkillSources: () => getSkillSources,
6542
+ getCurrentAgentName: () => getCurrentAgentName,
6541
6543
  getCurrentAgentId: () => getCurrentAgentId,
6542
6544
  getConversationId: () => getConversationId
6543
6545
  });
@@ -6546,6 +6548,7 @@ function getContext() {
6546
6548
  if (!global2[CONTEXT_KEY]) {
6547
6549
  global2[CONTEXT_KEY] = {
6548
6550
  agentId: null,
6551
+ agentName: null,
6549
6552
  skillsDirectory: null,
6550
6553
  skillSources: [...ALL_SKILL_SOURCES],
6551
6554
  conversationId: null
@@ -6553,24 +6556,43 @@ function getContext() {
6553
6556
  }
6554
6557
  return global2[CONTEXT_KEY];
6555
6558
  }
6556
- function setAgentContext(agentId, skillsDirectory, skillSources) {
6559
+ function setAgentContext(agentId, skillsDirectory, skillSources, agentName) {
6557
6560
  context.agentId = agentId;
6561
+ context.agentName = normalizeAgentName(agentName);
6558
6562
  context.skillsDirectory = skillsDirectory || null;
6559
6563
  context.skillSources = skillSources !== undefined ? [...skillSources] : [...ALL_SKILL_SOURCES];
6560
6564
  if (getRuntimeContext()) {
6561
6565
  updateRuntimeContext({
6562
6566
  agentId,
6567
+ agentName: context.agentName,
6563
6568
  skillsDirectory: skillsDirectory || null,
6564
6569
  skillSources: skillSources !== undefined ? [...skillSources] : [...ALL_SKILL_SOURCES]
6565
6570
  });
6566
6571
  }
6567
6572
  }
6568
6573
  function setCurrentAgentId(agentId) {
6574
+ const agentChanged = context.agentId !== agentId;
6569
6575
  context.agentId = agentId;
6576
+ if (agentId === null || agentChanged) {
6577
+ context.agentName = null;
6578
+ }
6570
6579
  if (getRuntimeContext()) {
6571
- updateRuntimeContext({ agentId });
6580
+ updateRuntimeContext({
6581
+ agentId,
6582
+ ...agentId === null || agentChanged ? { agentName: null } : {}
6583
+ });
6572
6584
  }
6573
6585
  }
6586
+ function setCurrentAgentName(agentName) {
6587
+ context.agentName = normalizeAgentName(agentName);
6588
+ if (getRuntimeContext()) {
6589
+ updateRuntimeContext({ agentName: context.agentName });
6590
+ }
6591
+ }
6592
+ function normalizeAgentName(agentName) {
6593
+ const trimmed = typeof agentName === "string" ? agentName.trim() : "";
6594
+ return trimmed || null;
6595
+ }
6574
6596
  function getCurrentAgentId() {
6575
6597
  const runtimeContext = getRuntimeContext();
6576
6598
  if (runtimeContext && "agentId" in runtimeContext) {
@@ -6584,6 +6606,14 @@ function getCurrentAgentId() {
6584
6606
  }
6585
6607
  return context.agentId;
6586
6608
  }
6609
+ function getCurrentAgentName() {
6610
+ const runtimeContext = getRuntimeContext();
6611
+ if (runtimeContext && "agentName" in runtimeContext) {
6612
+ const trimmed = runtimeContext.agentName?.trim();
6613
+ return trimmed || null;
6614
+ }
6615
+ return context.agentName;
6616
+ }
6587
6617
  function getSkillsDirectory() {
6588
6618
  const runtimeContext = getRuntimeContext();
6589
6619
  if (runtimeContext && "skillsDirectory" in runtimeContext) {
@@ -141240,6 +141270,10 @@ There are two ways to change memory:
141240
141270
  - **The \`memory\` tool (shorthand).** Use it for small, targeted edits. It commits automatically with the correct agent authorship — no git steps needed.
141241
141271
  - **Direct file edits (full control).** For larger changes — restructuring directories, rewriting several blocks — edit the projected files directly, then commit:
141242
141272
 
141273
+ Memory markdown files must start with YAML frontmatter containing a non-empty \`description:\` field. The \`memory\` and \`memory_apply_patch\` tools add and preserve this automatically; when using raw file edits, preserve existing frontmatter or add it before committing. The MemFS pre-commit hook enforces this requirement, rejects unknown keys, and prevents changes to protected \`read_only\` files. Skill \`SKILL.md\` files use their own skill frontmatter format.
141274
+
141275
+ \`$AGENT_NAME\` is normally populated when the runtime knows the current agent name, but direct shell environments can still miss it. Use a non-empty author name fallback when committing directly.
141276
+
141243
141277
  \`\`\`bash
141244
141278
  cd "$MEMORY_DIR"
141245
141279
 
@@ -141247,8 +141281,9 @@ cd "$MEMORY_DIR"
141247
141281
  git status
141248
141282
 
141249
141283
  # Commit your changes
141250
- git add .
141251
- git commit --author="$AGENT_NAME <$AGENT_ID@letta.com>" -m "<type>: <what changed>"
141284
+ git add <specific files>
141285
+ author_name="\${AGENT_NAME:-$AGENT_ID}"
141286
+ git commit --author="$author_name <$AGENT_ID@letta.com>" -m "<type>: <what changed>"
141252
141287
  \`\`\`
141253
141288
 
141254
141289
  Your context is git-tracked, so you can always inspect or revert past changes:
@@ -144697,7 +144732,8 @@ var init_models7 = __esm(() => {
144697
144732
  context_window: 140000,
144698
144733
  max_output_tokens: 28000,
144699
144734
  parallel_tool_calls: true
144700
- }
144735
+ },
144736
+ isFeatured: true
144701
144737
  },
144702
144738
  {
144703
144739
  id: "auto-chat",
@@ -144722,7 +144758,8 @@ var init_models7 = __esm(() => {
144722
144758
  context_window: 200000,
144723
144759
  max_output_tokens: 28000,
144724
144760
  parallel_tool_calls: true
144725
- }
144761
+ },
144762
+ isFeatured: true
144726
144763
  },
144727
144764
  {
144728
144765
  id: "fable",
@@ -144731,7 +144768,7 @@ var init_models7 = __esm(() => {
144731
144768
  description: "Fable 5 (high reasoning)",
144732
144769
  isFeatured: true,
144733
144770
  updateArgs: {
144734
- context_window: 1e6,
144771
+ context_window: 200000,
144735
144772
  max_output_tokens: 128000,
144736
144773
  enable_reasoner: true,
144737
144774
  reasoning_effort: "high",
@@ -144744,7 +144781,7 @@ var init_models7 = __esm(() => {
144744
144781
  label: "Fable 5",
144745
144782
  description: "Fable 5 (low reasoning)",
144746
144783
  updateArgs: {
144747
- context_window: 1e6,
144784
+ context_window: 200000,
144748
144785
  max_output_tokens: 128000,
144749
144786
  enable_reasoner: true,
144750
144787
  reasoning_effort: "low",
@@ -144758,7 +144795,7 @@ var init_models7 = __esm(() => {
144758
144795
  label: "Fable 5",
144759
144796
  description: "Fable 5 (med reasoning)",
144760
144797
  updateArgs: {
144761
- context_window: 1e6,
144798
+ context_window: 200000,
144762
144799
  max_output_tokens: 128000,
144763
144800
  enable_reasoner: true,
144764
144801
  reasoning_effort: "medium",
@@ -144772,7 +144809,7 @@ var init_models7 = __esm(() => {
144772
144809
  label: "Fable 5",
144773
144810
  description: "Fable 5 (extra-high reasoning)",
144774
144811
  updateArgs: {
144775
- context_window: 1e6,
144812
+ context_window: 200000,
144776
144813
  max_output_tokens: 128000,
144777
144814
  enable_reasoner: true,
144778
144815
  reasoning_effort: "xhigh",
@@ -144785,7 +144822,74 @@ var init_models7 = __esm(() => {
144785
144822
  label: "Fable 5",
144786
144823
  description: "Fable 5 (max reasoning)",
144787
144824
  updateArgs: {
144788
- context_window: 1e6,
144825
+ context_window: 200000,
144826
+ max_output_tokens: 128000,
144827
+ enable_reasoner: true,
144828
+ reasoning_effort: "max",
144829
+ parallel_tool_calls: true
144830
+ }
144831
+ },
144832
+ {
144833
+ id: "fable-1m",
144834
+ handle: "anthropic/claude-fable-5",
144835
+ label: "Fable 5 1M",
144836
+ description: "Claude Fable 5 with 1M token context window (high reasoning)",
144837
+ updateArgs: {
144838
+ context_window: 950000,
144839
+ max_output_tokens: 128000,
144840
+ enable_reasoner: true,
144841
+ reasoning_effort: "high",
144842
+ parallel_tool_calls: true
144843
+ }
144844
+ },
144845
+ {
144846
+ id: "fable-1m-low",
144847
+ handle: "anthropic/claude-fable-5",
144848
+ label: "Fable 5 1M",
144849
+ description: "Fable 5 1M (low reasoning)",
144850
+ updateArgs: {
144851
+ context_window: 950000,
144852
+ max_output_tokens: 128000,
144853
+ enable_reasoner: true,
144854
+ reasoning_effort: "low",
144855
+ max_reasoning_tokens: 4000,
144856
+ parallel_tool_calls: true
144857
+ }
144858
+ },
144859
+ {
144860
+ id: "fable-1m-medium",
144861
+ handle: "anthropic/claude-fable-5",
144862
+ label: "Fable 5 1M",
144863
+ description: "Fable 5 1M (med reasoning)",
144864
+ updateArgs: {
144865
+ context_window: 950000,
144866
+ max_output_tokens: 128000,
144867
+ enable_reasoner: true,
144868
+ reasoning_effort: "medium",
144869
+ max_reasoning_tokens: 12000,
144870
+ parallel_tool_calls: true
144871
+ }
144872
+ },
144873
+ {
144874
+ id: "fable-1m-xhigh",
144875
+ handle: "anthropic/claude-fable-5",
144876
+ label: "Fable 5 1M",
144877
+ description: "Fable 5 1M (extra-high reasoning)",
144878
+ updateArgs: {
144879
+ context_window: 950000,
144880
+ max_output_tokens: 128000,
144881
+ enable_reasoner: true,
144882
+ reasoning_effort: "xhigh",
144883
+ parallel_tool_calls: true
144884
+ }
144885
+ },
144886
+ {
144887
+ id: "fable-1m-max",
144888
+ handle: "anthropic/claude-fable-5",
144889
+ label: "Fable 5 1M",
144890
+ description: "Fable 5 1M (max reasoning)",
144891
+ updateArgs: {
144892
+ context_window: 950000,
144789
144893
  max_output_tokens: 128000,
144790
144894
  enable_reasoner: true,
144791
144895
  reasoning_effort: "max",
@@ -144884,8 +144988,7 @@ var init_models7 = __esm(() => {
144884
144988
  reasoning_effort: "high",
144885
144989
  enable_reasoner: true,
144886
144990
  parallel_tool_calls: true
144887
- },
144888
- isFeatured: true
144991
+ }
144889
144992
  },
144890
144993
  {
144891
144994
  id: "opus-4.8-1m-no-reasoning",
@@ -145148,7 +145251,6 @@ var init_models7 = __esm(() => {
145148
145251
  handle: "anthropic/claude-sonnet-4-6",
145149
145252
  label: "Sonnet 4.6 1M",
145150
145253
  description: "Claude Sonnet 4.6 with 1M token context window (high reasoning)",
145151
- isFeatured: true,
145152
145254
  updateArgs: {
145153
145255
  context_window: 9500000,
145154
145256
  max_output_tokens: 128000,
@@ -146030,7 +146132,6 @@ var init_models7 = __esm(() => {
146030
146132
  handle: "openai/gpt-5.4",
146031
146133
  label: "GPT-5.4",
146032
146134
  description: "OpenAI's most capable model (high reasoning)",
146033
- isFeatured: true,
146034
146135
  updateArgs: {
146035
146136
  reasoning_effort: "high",
146036
146137
  verbosity: "medium",
@@ -146187,7 +146288,6 @@ var init_models7 = __esm(() => {
146187
146288
  handle: "openai/gpt-5.4-mini",
146188
146289
  label: "GPT-5.4 Mini",
146189
146290
  description: "Fast, efficient GPT-5.4 variant (med reasoning)",
146190
- isFeatured: true,
146191
146291
  updateArgs: {
146192
146292
  reasoning_effort: "medium",
146193
146293
  verbosity: "low",
@@ -146400,7 +146500,8 @@ var init_models7 = __esm(() => {
146400
146500
  context_window: 1048576,
146401
146501
  max_output_tokens: 384000,
146402
146502
  parallel_tool_calls: true
146403
- }
146503
+ },
146504
+ isFeatured: true
146404
146505
  },
146405
146506
  {
146406
146507
  id: "glm-5.2",
@@ -146444,7 +146545,6 @@ var init_models7 = __esm(() => {
146444
146545
  handle: "minimax/MiniMax-M2.7",
146445
146546
  label: "MiniMax 2.7",
146446
146547
  description: "MiniMax's M2.7 coding model",
146447
- isFeatured: true,
146448
146548
  free: true,
146449
146549
  updateArgs: {
146450
146550
  context_window: 160000,
@@ -151819,12 +151919,14 @@ var init_commands = __esm(() => {
151819
151919
  import { randomUUID as randomUUID8 } from "node:crypto";
151820
151920
  import { mkdir as mkdir4, readFile as readFile4, writeFile as writeFile6 } from "node:fs/promises";
151821
151921
  import { basename as basename6, extname as extname3, join as join12 } from "node:path";
151822
- function mapSlackThreadMessage(message) {
151922
+ async function mapSlackThreadMessage(message, attachmentOptions) {
151923
+ const attachments = await resolveSlackMessageAttachments(message, attachmentOptions);
151823
151924
  return {
151824
151925
  text: resolveSlackThreadMessageText(message),
151825
151926
  userId: isNonEmptyString2(message.user) ? message.user : undefined,
151826
151927
  botId: isNonEmptyString2(message.bot_id) ? message.bot_id : undefined,
151827
- ts: isNonEmptyString2(message.ts) ? message.ts : undefined
151928
+ ts: isNonEmptyString2(message.ts) ? message.ts : undefined,
151929
+ ...attachments.length > 0 ? { attachments } : {}
151828
151930
  };
151829
151931
  }
151830
151932
  function asRecord(value) {
@@ -152128,12 +152230,11 @@ function collectSlackFiles(rawEvent) {
152128
152230
  }
152129
152231
  return Array.from(deduped.values()).slice(0, MAX_SLACK_ATTACHMENTS);
152130
152232
  }
152131
- async function resolveSlackInboundAttachments(params) {
152132
- const files = collectSlackFiles(params.rawEvent);
152133
- if (files.length === 0) {
152233
+ async function resolveSlackFilesAsAttachments(params) {
152234
+ if (params.files.length === 0) {
152134
152235
  return [];
152135
152236
  }
152136
- const resolved = await Promise.all(files.map((file3) => downloadSlackAttachment({
152237
+ const resolved = await Promise.all(params.files.map((file3) => downloadSlackAttachment({
152137
152238
  accountId: params.accountId,
152138
152239
  token: params.token,
152139
152240
  file: file3,
@@ -152141,6 +152242,44 @@ async function resolveSlackInboundAttachments(params) {
152141
152242
  }).catch(() => null)));
152142
152243
  return resolved.filter((attachment) => Boolean(attachment));
152143
152244
  }
152245
+ function resolveSlackThreadAttachmentOptions(params) {
152246
+ if (!isNonEmptyString2(params.accountId) || !isNonEmptyString2(params.token)) {
152247
+ return;
152248
+ }
152249
+ return {
152250
+ accountId: params.accountId,
152251
+ token: params.token,
152252
+ transcribeVoice: params.transcribeVoice
152253
+ };
152254
+ }
152255
+ function hasSlackThreadMessageContent(message, attachmentOptions) {
152256
+ if (resolveSlackThreadMessageText(message)) {
152257
+ return true;
152258
+ }
152259
+ return Boolean(attachmentOptions && collectSlackFiles(message).length > 0);
152260
+ }
152261
+ function hasHydratedSlackThreadMessageContent(message) {
152262
+ return message.text.length > 0 || Boolean(message.attachments?.length);
152263
+ }
152264
+ async function resolveSlackMessageAttachments(message, attachmentOptions) {
152265
+ if (!attachmentOptions) {
152266
+ return [];
152267
+ }
152268
+ return resolveSlackFilesAsAttachments({
152269
+ accountId: attachmentOptions.accountId,
152270
+ token: attachmentOptions.token,
152271
+ files: collectSlackFiles(message),
152272
+ transcribeVoice: attachmentOptions.transcribeVoice
152273
+ });
152274
+ }
152275
+ async function resolveSlackInboundAttachments(params) {
152276
+ return resolveSlackFilesAsAttachments({
152277
+ accountId: params.accountId,
152278
+ token: params.token,
152279
+ files: collectSlackFiles(params.rawEvent),
152280
+ transcribeVoice: params.transcribeVoice
152281
+ });
152282
+ }
152144
152283
  async function resolveSlackThreadStarter(params) {
152145
152284
  try {
152146
152285
  const response = await params.client.conversations.replies({
@@ -152153,16 +152292,12 @@ async function resolveSlackThreadStarter(params) {
152153
152292
  if (!message) {
152154
152293
  return null;
152155
152294
  }
152156
- const text = resolveSlackThreadMessageText(message);
152157
- if (!text) {
152295
+ const attachmentOptions = resolveSlackThreadAttachmentOptions(params);
152296
+ if (!hasSlackThreadMessageContent(message, attachmentOptions)) {
152158
152297
  return null;
152159
152298
  }
152160
- return {
152161
- text,
152162
- userId: isNonEmptyString2(message.user) ? message.user : undefined,
152163
- botId: isNonEmptyString2(message.bot_id) ? message.bot_id : undefined,
152164
- ts: isNonEmptyString2(message.ts) ? message.ts : undefined
152165
- };
152299
+ const mapped3 = await mapSlackThreadMessage(message, attachmentOptions);
152300
+ return hasHydratedSlackThreadMessageContent(mapped3) ? mapped3 : null;
152166
152301
  } catch {
152167
152302
  return null;
152168
152303
  }
@@ -152174,6 +152309,7 @@ async function resolveSlackThreadHistory(params) {
152174
152309
  }
152175
152310
  const fetchLimit = 200;
152176
152311
  const retained = [];
152312
+ const attachmentOptions = resolveSlackThreadAttachmentOptions(params);
152177
152313
  let cursor;
152178
152314
  try {
152179
152315
  do {
@@ -152185,8 +152321,7 @@ async function resolveSlackThreadHistory(params) {
152185
152321
  ...cursor ? { cursor } : {}
152186
152322
  });
152187
152323
  for (const message of response.messages ?? []) {
152188
- const text = resolveSlackThreadMessageText(message);
152189
- if (!text) {
152324
+ if (!hasSlackThreadMessageContent(message, attachmentOptions)) {
152190
152325
  continue;
152191
152326
  }
152192
152327
  if (params.currentMessageTs && message.ts === params.currentMessageTs) {
@@ -152203,7 +152338,8 @@ async function resolveSlackThreadHistory(params) {
152203
152338
  const nextCursor = response.response_metadata?.next_cursor;
152204
152339
  cursor = typeof nextCursor === "string" && nextCursor.trim().length > 0 ? nextCursor.trim() : undefined;
152205
152340
  } while (cursor);
152206
- return retained.map(mapSlackThreadMessage);
152341
+ const mapped3 = await Promise.all(retained.map((message) => mapSlackThreadMessage(message, attachmentOptions)));
152342
+ return mapped3.filter(hasHydratedSlackThreadMessageContent);
152207
152343
  } catch {
152208
152344
  return [];
152209
152345
  }
@@ -152214,6 +152350,7 @@ async function resolveSlackChannelHistory(params) {
152214
152350
  return [];
152215
152351
  }
152216
152352
  const fetchLimit = Math.min(Math.max(maxMessages * 3, maxMessages), 100);
152353
+ const attachmentOptions = resolveSlackThreadAttachmentOptions(params);
152217
152354
  try {
152218
152355
  const response = await params.client.conversations.history({
152219
152356
  channel: params.channelId,
@@ -152225,9 +152362,10 @@ async function resolveSlackChannelHistory(params) {
152225
152362
  if (message.ts === params.beforeTs) {
152226
152363
  return false;
152227
152364
  }
152228
- return Boolean(resolveSlackThreadMessageText(message));
152365
+ return hasSlackThreadMessageContent(message, attachmentOptions);
152229
152366
  }).slice(0, fetchLimit).reverse();
152230
- return retained.slice(-maxMessages).map(mapSlackThreadMessage);
152367
+ const mapped3 = await Promise.all(retained.slice(-maxMessages).map((message) => mapSlackThreadMessage(message, attachmentOptions)));
152368
+ return mapped3.filter(hasHydratedSlackThreadMessageContent);
152231
152369
  } catch {
152232
152370
  return [];
152233
152371
  }
@@ -153193,22 +153331,30 @@ function createSlackAdapter(config3) {
153193
153331
  return msg;
153194
153332
  }
153195
153333
  const slackApp = await ensureApp();
153334
+ const threadAttachmentParams = {
153335
+ accountId: config3.accountId,
153336
+ token: config3.botToken,
153337
+ transcribeVoice: config3.transcribeVoice === true
153338
+ };
153196
153339
  const starter = shouldHydrateExistingThreadContext && isFirstRouteTurn ? await resolveSlackThreadStarter({
153197
153340
  channelId: msg.chatId,
153198
153341
  threadTs: msg.threadId,
153199
- client: slackApp.client
153342
+ client: slackApp.client,
153343
+ ...threadAttachmentParams
153200
153344
  }) : null;
153201
153345
  const resolvedHistory = shouldHydrateExistingThreadContext ? await resolveSlackThreadHistory({
153202
153346
  channelId: msg.chatId,
153203
153347
  threadTs: msg.threadId,
153204
153348
  client: slackApp.client,
153205
153349
  currentMessageTs: msg.messageId,
153206
- limit: INITIAL_SLACK_THREAD_HISTORY_LIMIT
153350
+ limit: INITIAL_SLACK_THREAD_HISTORY_LIMIT,
153351
+ ...threadAttachmentParams
153207
153352
  }) : await resolveSlackChannelHistory({
153208
153353
  channelId: msg.chatId,
153209
153354
  beforeTs: msg.messageId,
153210
153355
  client: slackApp.client,
153211
- limit: INITIAL_SLACK_THREAD_HISTORY_LIMIT
153356
+ limit: INITIAL_SLACK_THREAD_HISTORY_LIMIT,
153357
+ ...threadAttachmentParams
153212
153358
  });
153213
153359
  const history = shouldHydrateExistingThreadContext && !isFirstRouteTurn ? resolvedHistory.filter((entry) => isNonEmptyString3(entry.botId)) : resolvedHistory;
153214
153360
  if (!starter && history.length === 0) {
@@ -153244,7 +153390,8 @@ function createSlackAdapter(config3) {
153244
153390
  messageId: starter.ts,
153245
153391
  senderId: starter.userId ?? starter.botId,
153246
153392
  senderName: resolveThreadSenderName(starter.userId, starter.botId),
153247
- text: starter.text
153393
+ text: starter.text,
153394
+ ...starter.attachments?.length ? { attachments: starter.attachments } : {}
153248
153395
  }
153249
153396
  } : {},
153250
153397
  ...history.length > 0 ? {
@@ -153252,7 +153399,8 @@ function createSlackAdapter(config3) {
153252
153399
  messageId: entry.ts,
153253
153400
  senderId: entry.userId ?? entry.botId,
153254
153401
  senderName: resolveThreadSenderName(entry.userId, entry.botId),
153255
- text: entry.text
153402
+ text: entry.text,
153403
+ ...entry.attachments?.length ? { attachments: entry.attachments } : {}
153256
153404
  }))
153257
153405
  } : {}
153258
153406
  }
@@ -159822,6 +159970,15 @@ function escapeXmlText(text) {
159822
159970
  function escapeXmlAttribute(text) {
159823
159971
  return escapeXmlText(text).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
159824
159972
  }
159973
+ function hasNotificationAttachmentPaths(msg) {
159974
+ if (msg.attachments?.length) {
159975
+ return true;
159976
+ }
159977
+ if (msg.threadContext?.starter?.attachments?.length) {
159978
+ return true;
159979
+ }
159980
+ return Boolean(msg.threadContext?.history?.some((entry) => entry.attachments?.length));
159981
+ }
159825
159982
  function buildChannelReminderText(msg) {
159826
159983
  const localTime = escapeXmlText(getLocalTime());
159827
159984
  const escapedChannel = escapeXmlText(msg.channel);
@@ -159857,7 +160014,7 @@ function buildChannelReminderText(msg) {
159857
160014
  if (msg.channel === "signal") {
159858
160015
  lines.splice(lines.length - 2, 0, 'On Signal, MessageChannel also supports action="react" with emoji + messageId, and action="upload-file" with media. Replies are sent as the linked Signal account through signal-cli-rest-api.');
159859
160016
  }
159860
- if (msg.attachments?.length) {
160017
+ if (hasNotificationAttachmentPaths(msg)) {
159861
160018
  lines.splice(lines.length - 2, 0, "If this notification includes attachment local_path values, you may be able to inspect those files using local file or image tools available in your current toolset (for example Read or ViewImage), using the local_path.");
159862
160019
  }
159863
160020
  return lines.join(`
@@ -159948,8 +160105,13 @@ function buildThreadContextEntryXml(tagName, entry) {
159948
160105
  attrs.push(`message_id="${escapeXmlAttribute(entry.messageId)}"`);
159949
160106
  }
159950
160107
  const attrString = attrs.length > 0 ? ` ${attrs.join(" ")}` : "";
160108
+ const body = [
160109
+ ...entry.text ? [escapeXmlText(entry.text)] : [],
160110
+ ...(entry.attachments ?? []).map(buildAttachmentXml)
160111
+ ].join(`
160112
+ `);
159951
160113
  return `<${tagName}${attrString}>
159952
- ${escapeXmlText(entry.text)}
160114
+ ${body}
159953
160115
  </${tagName}>`;
159954
160116
  }
159955
160117
  function buildThreadContextXml(msg) {
@@ -167949,6 +168111,10 @@ function getShellEnv() {
167949
168111
  if (agentId) {
167950
168112
  env3.LETTA_AGENT_ID = agentId;
167951
168113
  env3.AGENT_ID = agentId;
168114
+ const agentName = getCurrentAgentName()?.trim() || env3.AGENT_NAME?.trim();
168115
+ if (agentName) {
168116
+ env3.AGENT_NAME = agentName;
168117
+ }
167952
168118
  try {
167953
168119
  const localBackendNoMemfs = isLocalBackendMemfsDisabledForProcess();
167954
168120
  const localBackendEnabled = process.env.LETTA_LOCAL_BACKEND_EXPERIMENTAL === "1" || process.env.LETTA_LOCAL_BACKEND_EXPERIMENTAL?.toLowerCase() === "true";
@@ -363661,7 +363827,7 @@ function getMemoryGitIdentityEnvOverrides(command, workdir) {
363661
363827
  if (!scopedToMemoryDir) {
363662
363828
  return;
363663
363829
  }
363664
- const agentName = (process.env.AGENT_NAME || "").trim() || agentId;
363830
+ const agentName = getCurrentAgentNameOrEnv() || agentId;
363665
363831
  const agentEmail = `${agentId}@letta.com`;
363666
363832
  return {
363667
363833
  GIT_AUTHOR_NAME: agentName,
@@ -363679,6 +363845,14 @@ function getCurrentAgentIdOrEnv() {
363679
363845
  } catch {}
363680
363846
  return (process.env.LETTA_AGENT_ID || process.env.AGENT_ID || "").trim();
363681
363847
  }
363848
+ function getCurrentAgentNameOrEnv() {
363849
+ const scopedName = getCurrentAgentName()?.trim();
363850
+ if (scopedName) {
363851
+ return scopedName;
363852
+ }
363853
+ const envName = process.env.AGENT_NAME?.trim();
363854
+ return envName || null;
363855
+ }
363682
363856
  function containsGitCommitInvocation(command) {
363683
363857
  const segments = command.split(/&&|\|\||;|\|/).map((segment) => segment.trim()).filter(Boolean);
363684
363858
  for (const segment of segments) {
@@ -373739,6 +373913,7 @@ async function prepareToolExecutionContextForScope(params) {
373739
373913
  agent: agent2,
373740
373914
  runtimeContext: {
373741
373915
  agentId,
373916
+ agentName: agent2.name ?? null,
373742
373917
  conversationId: scopedConversationId,
373743
373918
  workingDirectory,
373744
373919
  ...channelToolScope.channels.length > 0 ? { channelToolScope } : {},
@@ -438900,6 +439075,7 @@ async function handleIncomingMessage(msg, socket, runtime, onStatusChange, conne
438900
439075
  conversationId
438901
439076
  });
438902
439077
  setCurrentAgentId(agentId);
439078
+ setCurrentAgentName(listenAgentMetadata?.name ?? null);
438903
439079
  setConversationId(conversationId);
438904
439080
  if (isDebugEnabled()) {
438905
439081
  console.log(`[Listen] Handling message: agentId=${agentId}, requestedConversationId=${requestedConversationId}, conversationId=${conversationId}`);
@@ -438959,6 +439135,7 @@ async function handleIncomingMessage(msg, socket, runtime, onStatusChange, conne
438959
439135
  lastRunAt: cachedAgent.last_run_completion ?? null
438960
439136
  };
438961
439137
  }
439138
+ setCurrentAgentName(listenAgentMetadata?.name ?? cachedAgent?.name ?? null);
438962
439139
  const { parts: reminderParts } = await buildSharedReminderParts(buildListenReminderContext({
438963
439140
  agentId: agentId || "",
438964
439141
  conversationId,
@@ -454283,6 +454460,7 @@ var exports_defaults = {};
454283
454460
  __export(exports_defaults, {
454284
454461
  selectDefaultAgentModel: () => selectDefaultAgentModel,
454285
454462
  ensureDefaultAgents: () => ensureDefaultAgents,
454463
+ TUTOR_TAG: () => TUTOR_TAG,
454286
454464
  MEMO_TAG: () => MEMO_TAG,
454287
454465
  DEFAULT_AGENT_CONFIGS: () => DEFAULT_AGENT_CONFIGS
454288
454466
  });
@@ -454350,29 +454528,39 @@ async function ensureDefaultAgents(backend4, options3) {
454350
454528
  if (!settingsManager.shouldCreateDefaultAgents()) {
454351
454529
  return null;
454352
454530
  }
454531
+ const personality = options3?.personality ?? "memo";
454353
454532
  try {
454354
454533
  const { isLettaCloud: isLettaCloud2 } = await Promise.resolve().then(() => (init_memory_filesystem2(), exports_memory_filesystem));
454355
454534
  const willAutoEnableMemfs = backend4.capabilities.remoteMemfs && await isLettaCloud2();
454356
454535
  const memoryPromptMode = backend4.capabilities.localMemfs ? "local-memfs" : willAutoEnableMemfs ? "memfs" : undefined;
454357
- const { agent: agent2 } = await createAgent({
454536
+ const model = await resolveDefaultAgentModel(backend4, options3?.preferredModel);
454537
+ const createOptions = personality === "tutorial" ? {
454538
+ ...await buildCreateAgentOptionsForPersonality2({
454539
+ personalityId: "tutorial",
454540
+ model
454541
+ }),
454542
+ memoryPromptMode
454543
+ } : {
454358
454544
  ...DEFAULT_AGENT_CONFIGS.memo,
454359
- model: await resolveDefaultAgentModel(backend4, options3?.preferredModel),
454545
+ model,
454360
454546
  memoryPromptMode
454361
- });
454362
- await addTagToAgent(backend4, agent2.id, MEMO_TAG);
454547
+ };
454548
+ const { agent: agent2 } = await createAgent(createOptions);
454549
+ await addTagToAgent(backend4, agent2.id, personality === "tutorial" ? TUTOR_TAG : MEMO_TAG);
454363
454550
  settingsManager.pinAgent(agent2.id);
454364
454551
  return agent2;
454365
454552
  } catch (err) {
454366
454553
  throw new Error(`Failed to create default agents: ${err instanceof Error ? err.message : String(err)}`);
454367
454554
  }
454368
454555
  }
454369
- var MEMO_TAG = "default:memo", MEMO_PERSONA, MEMO_HUMAN, MEMO_DESCRIPTION = "The default Letta Code agent with persistent memory", DEFAULT_AGENT_CONFIGS;
454556
+ var MEMO_TAG = "default:memo", TUTOR_TAG = "default:tutorial", MEMO_PERSONA, MEMO_HUMAN, MEMO_DESCRIPTION = "The default Letta Code agent with persistent memory", DEFAULT_AGENT_CONFIGS;
454370
454557
  var init_defaults = __esm(() => {
454371
454558
  init_client2();
454372
454559
  init_settings_manager();
454373
454560
  init_create6();
454374
454561
  init_memory5();
454375
454562
  init_model();
454563
+ init_personality();
454376
454564
  init_prompt_assets();
454377
454565
  MEMO_PERSONA = parseMdxFrontmatter(MEMORY_PROMPTS["persona_memo.mdx"] ?? "").body;
454378
454566
  MEMO_HUMAN = parseMdxFrontmatter(MEMORY_PROMPTS["human_memo.mdx"] ?? "").body;
@@ -455269,7 +455457,7 @@ Current session AGENT_ID=${process.env.AGENT_ID}; --backend local switches to a
455269
455457
  await settingsManager.loadLocalProjectSettings();
455270
455458
  settingsManager.persistSession(agent2.id, conversationId);
455271
455459
  }
455272
- setAgentContext(agent2.id, skillsDirectory, resolvedSkillSources);
455460
+ setAgentContext(agent2.id, skillsDirectory, resolvedSkillSources, agent2.name ?? null);
455273
455461
  const outputFormat = values2["output-format"] || "text";
455274
455462
  const includePartialMessages = Boolean(values2["include-partial-messages"]);
455275
455463
  if (!["text", "json", "stream-json"].includes(outputFormat)) {
@@ -517431,7 +517619,7 @@ __export(exports_resolve_startup_agent, {
517431
517619
  });
517432
517620
  function resolveStartupTarget(input) {
517433
517621
  if (input.forceNew) {
517434
- return { action: "create" };
517622
+ return { action: "create", trigger: "force-new" };
517435
517623
  }
517436
517624
  if (input.pinnedAgentId && input.pinnedAgentExists) {
517437
517625
  const conversationId = input.pinnedAgentId === input.localAgentId ? input.localConversationId ?? undefined : undefined;
@@ -517470,7 +517658,7 @@ function resolveStartupTarget(input) {
517470
517658
  if (input.pinnedCount > 0) {
517471
517659
  return { action: "select" };
517472
517660
  }
517473
- return { action: "create" };
517661
+ return { action: "create", trigger: "fresh-start" };
517474
517662
  }
517475
517663
 
517476
517664
  // src/agent/defaults.ts
@@ -517478,6 +517666,7 @@ var exports_defaults2 = {};
517478
517666
  __export(exports_defaults2, {
517479
517667
  selectDefaultAgentModel: () => selectDefaultAgentModel2,
517480
517668
  ensureDefaultAgents: () => ensureDefaultAgents2,
517669
+ TUTOR_TAG: () => TUTOR_TAG2,
517481
517670
  MEMO_TAG: () => MEMO_TAG2,
517482
517671
  DEFAULT_AGENT_CONFIGS: () => DEFAULT_AGENT_CONFIGS2
517483
517672
  });
@@ -517545,29 +517734,39 @@ async function ensureDefaultAgents2(backend4, options3) {
517545
517734
  if (!settingsManager.shouldCreateDefaultAgents()) {
517546
517735
  return null;
517547
517736
  }
517737
+ const personality = options3?.personality ?? "memo";
517548
517738
  try {
517549
517739
  const { isLettaCloud: isLettaCloud2 } = await Promise.resolve().then(() => (init_memory_filesystem2(), exports_memory_filesystem));
517550
517740
  const willAutoEnableMemfs = backend4.capabilities.remoteMemfs && await isLettaCloud2();
517551
517741
  const memoryPromptMode = backend4.capabilities.localMemfs ? "local-memfs" : willAutoEnableMemfs ? "memfs" : undefined;
517552
- const { agent: agent2 } = await createAgent({
517742
+ const model = await resolveDefaultAgentModel2(backend4, options3?.preferredModel);
517743
+ const createOptions = personality === "tutorial" ? {
517744
+ ...await buildCreateAgentOptionsForPersonality2({
517745
+ personalityId: "tutorial",
517746
+ model
517747
+ }),
517748
+ memoryPromptMode
517749
+ } : {
517553
517750
  ...DEFAULT_AGENT_CONFIGS2.memo,
517554
- model: await resolveDefaultAgentModel2(backend4, options3?.preferredModel),
517751
+ model,
517555
517752
  memoryPromptMode
517556
- });
517557
- await addTagToAgent2(backend4, agent2.id, MEMO_TAG2);
517753
+ };
517754
+ const { agent: agent2 } = await createAgent(createOptions);
517755
+ await addTagToAgent2(backend4, agent2.id, personality === "tutorial" ? TUTOR_TAG2 : MEMO_TAG2);
517558
517756
  settingsManager.pinAgent(agent2.id);
517559
517757
  return agent2;
517560
517758
  } catch (err) {
517561
517759
  throw new Error(`Failed to create default agents: ${err instanceof Error ? err.message : String(err)}`);
517562
517760
  }
517563
517761
  }
517564
- var MEMO_TAG2 = "default:memo", MEMO_PERSONA2, MEMO_HUMAN2, MEMO_DESCRIPTION2 = "The default Letta Code agent with persistent memory", DEFAULT_AGENT_CONFIGS2;
517762
+ var MEMO_TAG2 = "default:memo", TUTOR_TAG2 = "default:tutorial", MEMO_PERSONA2, MEMO_HUMAN2, MEMO_DESCRIPTION2 = "The default Letta Code agent with persistent memory", DEFAULT_AGENT_CONFIGS2;
517565
517763
  var init_defaults2 = __esm(() => {
517566
517764
  init_client2();
517567
517765
  init_settings_manager();
517568
517766
  init_create6();
517569
517767
  init_memory5();
517570
517768
  init_model();
517769
+ init_personality();
517571
517770
  init_prompt_assets();
517572
517771
  MEMO_PERSONA2 = parseMdxFrontmatter(MEMORY_PROMPTS["persona_memo.mdx"] ?? "").body;
517573
517772
  MEMO_HUMAN2 = parseMdxFrontmatter(MEMORY_PROMPTS["human_memo.mdx"] ?? "").body;
@@ -519791,6 +519990,7 @@ function getContext2() {
519791
519990
  if (!global2[CONTEXT_KEY2]) {
519792
519991
  global2[CONTEXT_KEY2] = {
519793
519992
  agentId: null,
519993
+ agentName: null,
519794
519994
  skillsDirectory: null,
519795
519995
  skillSources: [...ALL_SKILL_SOURCES],
519796
519996
  conversationId: null
@@ -519799,18 +519999,24 @@ function getContext2() {
519799
519999
  return global2[CONTEXT_KEY2];
519800
520000
  }
519801
520001
  var context2 = getContext2();
519802
- function setAgentContext2(agentId, skillsDirectory, skillSources) {
520002
+ function setAgentContext2(agentId, skillsDirectory, skillSources, agentName) {
519803
520003
  context2.agentId = agentId;
520004
+ context2.agentName = normalizeAgentName2(agentName);
519804
520005
  context2.skillsDirectory = skillsDirectory || null;
519805
520006
  context2.skillSources = skillSources !== undefined ? [...skillSources] : [...ALL_SKILL_SOURCES];
519806
520007
  if (getRuntimeContext()) {
519807
520008
  updateRuntimeContext({
519808
520009
  agentId,
520010
+ agentName: context2.agentName,
519809
520011
  skillsDirectory: skillsDirectory || null,
519810
520012
  skillSources: skillSources !== undefined ? [...skillSources] : [...ALL_SKILL_SOURCES]
519811
520013
  });
519812
520014
  }
519813
520015
  }
520016
+ function normalizeAgentName2(agentName) {
520017
+ const trimmed = typeof agentName === "string" ? agentName.trim() : "";
520018
+ return trimmed || null;
520019
+ }
519814
520020
  function setConversationId2(conversationId) {
519815
520021
  context2.conversationId = conversationId;
519816
520022
  if (getRuntimeContext()) {
@@ -528979,6 +529185,27 @@ async function deleteSkillDirectory(params) {
528979
529185
  rmSync13(targetPath, { recursive: true, force: true });
528980
529186
  return { name, path: normalize5(targetPath) };
528981
529187
  }
529188
+ async function loadSkillMemorySyncFn() {
529189
+ const { syncPendingMemoryCommitsAfterTurn: syncPendingMemoryCommitsAfterTurn2 } = await Promise.resolve().then(() => (init_memory_git(), exports_memory_git));
529190
+ return syncPendingMemoryCommitsAfterTurn2;
529191
+ }
529192
+ async function syncCommittedRemoteSkillMemoryChange(params) {
529193
+ if (!params.committed || isLocalAgentId(params.agentId)) {
529194
+ return;
529195
+ }
529196
+ try {
529197
+ const syncFn = params.syncFn ?? await loadSkillMemorySyncFn();
529198
+ const result = await syncFn(params.agentId, {
529199
+ memoryDir: params.memoryDir
529200
+ });
529201
+ return { status: result.status, summary: result.summary };
529202
+ } catch (error54) {
529203
+ return {
529204
+ status: "push_failed",
529205
+ summary: error54 instanceof Error ? error54.message : String(error54)
529206
+ };
529207
+ }
529208
+ }
528982
529209
  async function installSkill(specifier, agentId, force) {
528983
529210
  const source2 = resolveSkillSourceSpecifier(specifier);
528984
529211
  if (!source2) {
@@ -529014,7 +529241,8 @@ async function installSkill(specifier, agentId, force) {
529014
529241
  source: specifier,
529015
529242
  ...result,
529016
529243
  committed: commit.committed,
529017
- commitSha: commit.sha
529244
+ commitSha: commit.sha,
529245
+ memorySync: commit.memorySync
529018
529246
  };
529019
529247
  } finally {
529020
529248
  if (tmpDir)
@@ -529054,7 +529282,12 @@ async function commitSkillMemoryChange(params) {
529054
529282
  },
529055
529283
  syncMode: isLocalAgentId(params.agentId) ? "local" : "remote"
529056
529284
  });
529057
- return { committed: result.committed, sha: result.sha };
529285
+ const memorySync = await syncCommittedRemoteSkillMemoryChange({
529286
+ agentId: params.agentId,
529287
+ memoryDir: params.memoryDir,
529288
+ committed: result.committed
529289
+ });
529290
+ return { committed: result.committed, sha: result.sha, memorySync };
529058
529291
  }
529059
529292
  async function listSkills(agentId) {
529060
529293
  const memoryDir = await getAgentMemoryDir(agentId);
@@ -529075,7 +529308,8 @@ async function deleteSkill(skillName, agentId) {
529075
529308
  deleted: true,
529076
529309
  ...result,
529077
529310
  committed: commit.committed,
529078
- commitSha: commit.sha
529311
+ commitSha: commit.sha,
529312
+ memorySync: commit.memorySync
529079
529313
  };
529080
529314
  }
529081
529315
  async function initializeAndResolveAgent(values2, promptStatusMessage) {
@@ -532205,7 +532439,8 @@ Error: ${message}`);
532205
532439
  const { ensureDefaultAgents: ensureDefaultAgents3 } = await Promise.resolve().then(() => (init_defaults2(), exports_defaults2));
532206
532440
  try {
532207
532441
  const defaultAgent = await ensureDefaultAgents3(getBackend(), {
532208
- preferredModel: model
532442
+ preferredModel: model,
532443
+ personality: target2.trigger === "fresh-start" ? "tutorial" : "memo"
532209
532444
  });
532210
532445
  if (defaultAgent) {
532211
532446
  startupCreatedAgentRef.current = defaultAgent;
@@ -532415,7 +532650,7 @@ Error: ${message}`);
532415
532650
  } catch {
532416
532651
  await settingsManager2.loadLocalProjectSettings();
532417
532652
  }
532418
- setAgentContext2(agent2.id, skillsDirectory2, resolvedSkillSources);
532653
+ setAgentContext2(agent2.id, skillsDirectory2, resolvedSkillSources, agent2.name ?? null);
532419
532654
  let startupMemfsFlag = autoEnableMemfsForFreshAgent ? true : memfsFlag;
532420
532655
  if (backend4.capabilities.remoteMemfs && !autoEnableMemfsForFreshAgent) {
532421
532656
  const { hydrateMemfsSettingFromAgent: hydrateMemfsSettingFromAgent3, isLettaCloud: isLettaCloud3 } = await Promise.resolve().then(() => (init_memory_filesystem3(), exports_memory_filesystem2));
@@ -532743,4 +532978,4 @@ Error during initialization: ${message}`);
532743
532978
  }
532744
532979
  main2();
532745
532980
 
532746
- //# debugId=E2E63DE64562692D64756E2164756E21
532981
+ //# debugId=653353B267C6711064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.27.23",
3
+ "version": "0.27.24",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.0",
@@ -116,7 +116,8 @@ Review changes, then commit with a descriptive message:
116
116
  cd $MEMORY_DIR
117
117
  git status # Review what changed before staging
118
118
  git add <specific files> # Stage targeted paths — avoid blind `git add -A`
119
- git commit --author="<AGENT_NAME> <<ACTUAL_AGENT_ID>@letta.com>" -m "fix(doctor): <summary> 🏥
119
+ author_name="${AGENT_NAME:-$AGENT_ID}"
120
+ git commit --author="$author_name <$AGENT_ID@letta.com>" -m "fix(doctor): <summary> 🏥
120
121
 
121
122
  <identified issues and implemented solutions>"
122
123
 
@@ -155,7 +155,7 @@ Before finishing, verify:
155
155
  | `references/providers.md` | Adding a custom model/API provider for local agents |
156
156
  | `references/events.md` | Reacting to lifecycle/tool/turn events or transforming turns/tools |
157
157
  | `references/permissions.md` | Enforcing dynamic tool allow/ask/deny policy before approval/execution |
158
- | `references/ui.md` | Panels (including order-0 statusline) or `ui.panels` capability guards are involved |
158
+ | `references/ui.md` | Panels (including order-0 statusline and order-1 dreaming indicator) or `ui.panels` capability guards are involved |
159
159
  | `references/plan-mode.md` | Recreating plan mode with commands, tools, events, permissions, and local state |
160
160
  | `references/analysis-mode.md` | Phrase-triggered diagnostic mode with turn reminders (simpler than plan-mode) |
161
161
  | `references/architecture.md` | Multiple capabilities, local state, cleanup, background model work, or non-trivial composition |
@@ -38,7 +38,7 @@ if (letta.capabilities.ui.panels) {
38
38
  `order` is a signed coordinate around the input:
39
39
 
40
40
  - `order > 1` — additive panels above the input, higher nearer the top (default `100`).
41
- - `order === 1` — replaces the default product-status row (currently dreaming/reflection status). Use this only when intentionally overriding that row; otherwise use `order > 1`.
41
+ - `order === 1` — replaces the default dreaming/reflection indicator above the input. Use this only when intentionally overriding that row; otherwise use `order > 1`.
42
42
  - `order === 0` — the primary line just below the input, overriding the built-in `agent · model`. This is the statusline slot; use `customizing-statusline` for that work.
43
43
  - `order < 0` — stacks below the primary line, `-1` closest.
44
44
 
@@ -51,6 +51,12 @@ render(ctx: {
51
51
  width: number;
52
52
  agent: { id, name };
53
53
  model: { id, displayName, provider, reasoningEffort };
54
+ backgroundAgents: Array<{
55
+ type: string;
56
+ status: string;
57
+ durationMs: number;
58
+ agentId: string | null;
59
+ }>;
54
60
  subagents: { list(): SubagentLifecycleItem[] };
55
61
  row(left, right, width): string;
56
62
  columns(parts: string[], width): string;
@@ -63,6 +69,39 @@ render(ctx: {
63
69
 
64
70
  Close panels when they are transient, and close/replace long-lived panels from the activation disposer if reload should remove them.
65
71
 
72
+ ### Panel use case: dreaming indicator overrides
73
+
74
+ When a user asks to change the "dreaming" UI/indicator, the reflection status above the input, or to add the full background-agent URL, use an `order: 1` panel replacement. The user should not need to know any internal row/component name.
75
+
76
+ Checklist:
77
+
78
+ - Open a panel with `order: 1`, not an additive panel.
79
+ - Read active hidden background agents from `ctx.backgroundAgents`; filter by `status` (`pending`/`running`).
80
+ - Use `agent.agentId` to build `https://app.letta.com/chat/${agent.agentId}`.
81
+ - If the user asks for the full URL, render visible text; do not use `ctx.link()` because it hides the URL behind OSC-8.
82
+ - If preserving animation, own the timer and call `panel.update()`; clean up timer and panel in the disposer.
83
+ - Keep `render()` pure: do not call diagnostics or mutate external state from render.
84
+
85
+ Critical shape:
86
+
87
+ ```ts
88
+ const panel = letta.ui.openPanel({
89
+ id: "dreaming-url",
90
+ order: 1,
91
+ render(ctx) {
92
+ const agent = ctx.backgroundAgents.find(
93
+ (a) => a.status === "pending" || a.status === "running",
94
+ );
95
+ if (!agent) return "";
96
+
97
+ const url = agent.agentId
98
+ ? `https://app.letta.com/chat/${agent.agentId}`
99
+ : null;
100
+ // Render spinner/label/elapsed, plus visible URL if requested.
101
+ },
102
+ });
103
+ ```
104
+
66
105
  ### Commands that open panels
67
106
 
68
107
  If a command's `run()` opens a panel, guard the command **registration** on `letta.capabilities.ui.panels` — not just the `openPanel` call:
@@ -706,7 +706,8 @@ Check if they're satisfied or want further refinement. Then commit and push memo
706
706
  cd $MEMORY_DIR
707
707
  git status # Review what changed before staging
708
708
  git add <specific files> # Stage targeted paths — avoid blind `git add -A`
709
- git commit --author="<AGENT_NAME> <<ACTUAL_AGENT_ID>@letta.com>" -m "feat(init): <summary> ✨
709
+ author_name="${AGENT_NAME:-$AGENT_ID}"
710
+ git commit --author="$author_name <$AGENT_ID@letta.com>" -m "feat(init): <summary> ✨
710
711
 
711
712
  <what was initialized and key decisions made>"
712
713