typebulb 0.11.6 → 0.11.7

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 CHANGED
@@ -70,7 +70,7 @@ createRoot(document.getElementById("root")!).render(<App />)
70
70
  .card {
71
71
  max-width: 360px;
72
72
  margin: 0 auto; /* horizontal centering only */
73
- padding: 24px 16px; /* vertical space as padding, never margin (see Emitting an embedded bulb) */
73
+ padding: 24px 16px; /* vertical space as padding, never margin (see Sizing) */
74
74
  font: 14px system-ui, sans-serif;
75
75
  display: grid;
76
76
  gap: 12px;
@@ -126,7 +126,9 @@ typebulb predict [file] Report the capability a bulb probably needs, with
126
126
  typebulb models List AI models for tb.ai, filtered by your .env API keys
127
127
  typebulb logs [file|pid] Print a running bulb's captured console (no arg: list running servers; -f follow, -n N tail)
128
128
  typebulb stop [file|pid] Stop a running bulb (no arg: list this project's running servers)
129
- typebulb stop --all Stop every running bulb and viewer, all projects (housekeeping)
129
+ typebulb stop --bulbs Stop this project's bulbs; the agent viewer keeps running
130
+ typebulb stop --agent Stop this project's agent viewer; its bulbs keep running
131
+ typebulb stop --global Stop every running bulb and viewer, all projects (housekeeping)
130
132
  typebulb trust [file] Remember a bulb as trusted (no arg: list trusted bulbs)
131
133
  typebulb untrust <file> Forget a bulb's trust (back to sandboxed)
132
134
  typebulb --no-watch <file> Disable hot reload
@@ -249,18 +251,24 @@ To render a bulb live inline, wrap the **entire** bulb — frontmatter and all b
249
251
 
250
252
  The agent viewer turns that block into a live, sandboxed app, with a *breakout ↗* control that saves it as a `.bulb.md` in the `typebulbs/` folder — editable with hot reload, and sandboxed unless you trust it. Embedded bulbs are client-only — no `server.ts`, no `tb.fs`/`tb.ai`, no storage.
251
253
 
252
- **Sizing is the viewer's job, not yours.** The agent viewer renders each embed *inline* by default fit to the conversation column, with height capped so a tall bulb doesn't run away plus a per-embed toggle to *spread* it to the full transcript width and height. Don't fight the layout from inside the bulb: no need to set a width, reserve height, or guess how much room you'll get.
254
+ **Fixing a broken embed?** Re-emit it under the *same* `name:` — the viewer folds the old version into a stub and keeps your fix as the live one. (A rename is treated as a new bulb.)
255
+
256
+ **A broken embed reads back.** Emit it and move on; embeds usually just work. If the user says one broke, the viewer has already forwarded its compile/runtime error to `typebulb logs claude`, name-tagged (`[embed <name>]`) — pull it from there and fix, instead of asking the user to copy-paste.
257
+
258
+ ## Sizing
259
+
260
+ The host owns a bulb's **width**; you own its **height**.
261
+
262
+ **Width is the host's.** Standalone, a bulb fills its browser window; in the agent viewer, an embed fits the conversation column by default, with a per-embed *spread* toggle to the full transcript width — and a cap so a tall embed doesn't run away down the transcript. Don't set a width or guess how much room you'll get.
253
263
 
254
- **Prefer `padding` over `margin` for vertical space on the root.** The viewer measures an embed by `document.body.scrollHeight`, and the runtime makes `body` a block formatting context so a root child's vertical margin (yours, or a UA default like `<h1>`'s) is contained rather than escaping the measurement so you no longer have to get this exactly right. It's still cleaner to keep the horizontal `auto` for centering and move the vertical space to padding:
264
+ **Height follows your content.** Prose, a form, a chart flow to their natural height set none. A full-bleed canvas is the exception: it has no natural height, so give its root `height: 100dvh` (or `100%`), never a fixed pixel value that leaves dead space once the bulb is in its own window.
265
+
266
+ **When embedded, keep vertical space on the root in `padding`, not `margin`.** The viewer measures an embed by `document.body.scrollHeight`, and the runtime makes `body` a block formatting context so a root child's vertical margin (yours, or a UA default like `<h1>`'s) is contained rather than escaping the measurement — so you no longer have to get this exactly right. It's still cleaner to keep the horizontal `auto` for centering and move the vertical space to padding:
255
267
 
256
268
  ```css
257
269
  .wrap { margin: 0 auto; padding: 24px 16px; } /* not: margin: 24px auto */
258
270
  ```
259
271
 
260
- **Fixing a broken embed?** Re-emit it under the *same* `name:` — the viewer folds the old version into a stub and keeps your fix as the live one. (A rename is treated as a new bulb.)
261
-
262
- **A broken embed reads back.** Emit it and move on; embeds usually just work. If the user says one broke, the viewer has already forwarded its compile/runtime error to `typebulb logs claude`, name-tagged (`[embed <name>]`) — pull it from there and fix, instead of asking the user to copy-paste.
263
-
264
272
  ## Tips for Agents
265
273
 
266
274
  - **`config.json` `description`** is the bulb's SEO meta description — keep it to one or two plain sentences (~150–160 chars), or it gets truncated.