@letta-ai/letta-code 0.26.2 → 0.26.4
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 +12 -0
- package/letta.js +73427 -52818
- package/package.json +2 -1
- package/skills/creating-extensions/SKILL.md +48 -9
- package/skills/creating-extensions/references/architecture.md +138 -0
- package/skills/creating-extensions/references/btw-command.md +30 -14
- package/skills/creating-extensions/references/commands.md +18 -13
- package/skills/creating-extensions/references/events.md +215 -0
- package/skills/creating-extensions/references/tools.md +4 -0
- package/skills/creating-extensions/references/ui.md +5 -1
- package/skills/customizing-commands/SKILL.md +6 -4
- package/skills/customizing-statusline/SKILL.md +4 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: customizing-commands
|
|
3
|
-
description: Creates, edits, and enables Letta Code extension-provided slash commands. Use when the user asks to add a custom /command, slash command, command shortcut,
|
|
3
|
+
description: Creates, edits, and enables Letta Code extension-provided slash commands. Use when the user asks to add a custom /command, slash command, command shortcut, scoped conversation-backed command, or command-driven panel behavior.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Customizing Commands
|
|
7
7
|
|
|
8
|
-
Use this as the command-specific entrypoint for local extension slash commands. For broader extension work, recipes live in `../creating-extensions/references/commands.md`, `../creating-extensions/references/ui.md`, and `../creating-extensions/references/btw-command.md`.
|
|
8
|
+
Use this as the command-specific entrypoint for local extension slash commands. For broader extension work, recipes live in `../creating-extensions/references/commands.md`, `../creating-extensions/references/architecture.md`, `../creating-extensions/references/ui.md`, and `../creating-extensions/references/btw-command.md`.
|
|
9
9
|
|
|
10
10
|
Extension files live in:
|
|
11
11
|
|
|
@@ -23,6 +23,7 @@ Use a focused file name, e.g. `~/.letta/extensions/review.ts` or `~/.letta/exten
|
|
|
23
23
|
| `/foo` starts a reusable agent workflow | Skill + thin extension command |
|
|
24
24
|
| Agent/model should autonomously call the capability | Extension tool, not a command |
|
|
25
25
|
| Command shows transient progress/results | Extension command + panel |
|
|
26
|
+
| Command needs model output while the main agent is busy | `runWhenBusy: true` command + forked `ctx.conversation` |
|
|
26
27
|
|
|
27
28
|
If the command is a durable workflow like `/goal`, put the workflow instructions in a skill and keep the extension command as a small launcher/prompt.
|
|
28
29
|
|
|
@@ -76,13 +77,14 @@ type ExtensionCommandResult =
|
|
|
76
77
|
- Command IDs omit the slash: `id: "review"`, not `"/review"`.
|
|
77
78
|
- Use lowercase slugs with letters, numbers, and hyphens.
|
|
78
79
|
- Do not register built-in command IDs.
|
|
79
|
-
- `runWhenBusy: true` commands must not return `prompt` while the main agent is busy; use
|
|
80
|
+
- `runWhenBusy: true` commands must not return `prompt` while the main agent is busy; use scoped conversation helpers/panels and return `handled`.
|
|
80
81
|
- `showInTranscript: false` commands should usually return `handled`, not `prompt`.
|
|
81
82
|
- Do not import Letta Code app internals.
|
|
82
83
|
- Do not do surprising side effects on startup; extensions activate on app start and `/reload`.
|
|
83
84
|
|
|
84
85
|
## More recipes
|
|
85
86
|
|
|
86
|
-
- Simple output command, panel command,
|
|
87
|
+
- Simple output command, panel command, busy-safe conversation command: `../creating-extensions/references/commands.md`
|
|
88
|
+
- Complex command architecture, state, cleanup: `../creating-extensions/references/architecture.md`
|
|
87
89
|
- Panel/status UI patterns: `../creating-extensions/references/ui.md`
|
|
88
90
|
- Complete `/btw` side-question recipe: `../creating-extensions/references/btw-command.md`
|
|
@@ -31,9 +31,10 @@ A custom statusline owns the whole idle row. Do not preserve legacy left/right s
|
|
|
31
31
|
3. If it does not exist, start from the built-in default template or synthesize a focused starter for the user's request.
|
|
32
32
|
4. If the user asks to migrate, import a `.sh` file, or match a shell prompt, read `references/migration.md`.
|
|
33
33
|
5. If API details or concrete patterns are needed, read `references/api.md` and `references/examples.md`.
|
|
34
|
-
6.
|
|
35
|
-
7.
|
|
36
|
-
8.
|
|
34
|
+
6. If the request combines statusline work with commands, tools, events, panels, or stateful extension behavior, also use `creating-extensions` and its `references/architecture.md`.
|
|
35
|
+
7. Guard statusline-specific behavior with `letta.capabilities.ui.customStatuslineRenderer` when writing new files.
|
|
36
|
+
8. Edit `~/.letta/extensions/statusline.tsx`.
|
|
37
|
+
9. Summarize the absolute file path changed and tell the user to run `/reload` unless the command can reload automatically.
|
|
37
38
|
|
|
38
39
|
## Bare `/statusline` behavior
|
|
39
40
|
|