@letta-ai/letta-code 0.27.22 โ 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.
- package/dist/agent-presets.js +87 -17
- package/dist/agent-presets.js.map +2 -2
- package/dist/types/agent/model-catalog.d.ts +6 -25
- package/dist/types/agent/model-catalog.d.ts.map +1 -1
- package/letta.js +3083 -2792
- package/package.json +1 -1
- package/skills/context-doctor/SKILL.md +2 -1
- package/skills/creating-mods/SKILL.md +1 -1
- package/skills/creating-mods/references/ui.md +44 -2
- package/skills/customizing-statusline/references/api.md +5 -2
- package/skills/initializing-memory/SKILL.md +2 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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 |
|
|
@@ -37,7 +37,8 @@ if (letta.capabilities.ui.panels) {
|
|
|
37
37
|
|
|
38
38
|
`order` is a signed coordinate around the input:
|
|
39
39
|
|
|
40
|
-
- `order >
|
|
40
|
+
- `order > 1` โ additive panels above the input, higher nearer the top (default `100`).
|
|
41
|
+
- `order === 1` โ replaces the default dreaming/reflection indicator above the input. Use this only when intentionally overriding that row; otherwise use `order > 1`.
|
|
41
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.
|
|
42
43
|
- `order < 0` โ stacks below the primary line, `-1` closest.
|
|
43
44
|
|
|
@@ -50,16 +51,57 @@ render(ctx: {
|
|
|
50
51
|
width: number;
|
|
51
52
|
agent: { id, name };
|
|
52
53
|
model: { id, displayName, provider, reasoningEffort };
|
|
54
|
+
backgroundAgents: Array<{
|
|
55
|
+
type: string;
|
|
56
|
+
status: string;
|
|
57
|
+
durationMs: number;
|
|
58
|
+
agentId: string | null;
|
|
59
|
+
}>;
|
|
60
|
+
subagents: { list(): SubagentLifecycleItem[] };
|
|
53
61
|
row(left, right, width): string;
|
|
54
62
|
columns(parts: string[], width): string;
|
|
63
|
+
link(label: string, url: string): string;
|
|
55
64
|
chalk: ChalkInstance;
|
|
56
65
|
}): string | string[]
|
|
57
66
|
```
|
|
58
67
|
|
|
59
|
-
`row`/`columns` are ANSI-aware, so chalk-colored segments align correctly.
|
|
68
|
+
`row`/`columns` are ANSI-aware, so chalk-colored segments and OSC-8 links align correctly. Use `link(label, url)` when a compact label should hyperlink to a URL without rendering the whole URL.
|
|
60
69
|
|
|
61
70
|
Close panels when they are transient, and close/replace long-lived panels from the activation disposer if reload should remove them.
|
|
62
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
|
+
|
|
63
105
|
### Commands that open panels
|
|
64
106
|
|
|
65
107
|
If a command's `run()` opens a panel, guard the command **registration** on `letta.capabilities.ui.panels` โ not just the `openPanel` call:
|
|
@@ -52,7 +52,8 @@ letta.ui.closePanel(id: string): void
|
|
|
52
52
|
|
|
53
53
|
`order` is a signed coordinate around the input:
|
|
54
54
|
|
|
55
|
-
- `order >
|
|
55
|
+
- `order > 1` โ additive panels above the input. Higher numbers render nearer the top. Default when omitted is `100`.
|
|
56
|
+
- `order === 1` โ replaces the default product-status row (currently dreaming/reflection status). Use this only when intentionally overriding that row; otherwise use `order > 1`.
|
|
56
57
|
- `order === 0` โ the primary line just below the input. Overrides the built-in `agent ยท model`. Use this for the statusline.
|
|
57
58
|
- `order < 0` โ stacks below the primary line. `-1` sits closest to it, more-negative lower.
|
|
58
59
|
|
|
@@ -65,13 +66,15 @@ render(ctx: {
|
|
|
65
66
|
width: number; // visible columns available to the panel
|
|
66
67
|
agent: { id, name }; // live at render time
|
|
67
68
|
model: { id, displayName, provider, reasoningEffort };
|
|
69
|
+
subagents: { list(): SubagentLifecycleItem[] };
|
|
68
70
|
row(left, right, width): string; // left + right, right-aligned, ANSI-aware
|
|
69
71
|
columns(parts: string[], width): string; // spread parts evenly, ANSI-aware
|
|
72
|
+
link(label: string, url: string): string; // compact OSC-8 hyperlink helper
|
|
70
73
|
chalk: ChalkInstance; // color helper
|
|
71
74
|
}): string | string[]
|
|
72
75
|
```
|
|
73
76
|
|
|
74
|
-
- `row`/`columns` measure visible width with ANSI stripped, so chalk-colored segments align correctly.
|
|
77
|
+
- `row`/`columns` measure visible width with ANSI stripped, so chalk-colored segments and links align correctly.
|
|
75
78
|
- The host clips each line to `width` and caps total height; the mod owns layout within that.
|
|
76
79
|
|
|
77
80
|
## Render rules
|
|
@@ -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
|
-
|
|
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
|
|