typebulb 0.27.2 → 0.28.1

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
@@ -41,6 +41,8 @@ typebulb agent:{claude|pi} Open a named harness's mirror in the foreground
41
41
  typebulb skill Print this README as an Agent Skill on stdout
42
42
  typebulb call <file> <fn> […] Invoke one server.ts export headlessly: prints its return as JSON to stdout, logs/errors to stderr (needs --trust)
43
43
  typebulb send <file> [msg] Push a message into a running bulb's page (its tb.onMessage handlers); the client-side twin of call, no --trust
44
+ typebulb pull <url|file> Fetch a bulb from typebulb.com into typebulbs/u/<user>/<slug>.bulb.md
45
+ typebulb push <file> Upload a local bulb to typebulb.com as you (needs TYPEBULB_TOKEN in .env)
44
46
  typebulb check [file.bulb.md] Type-check a bulb without running it
45
47
  typebulb predict [file] Report the capability a bulb probably needs, without running it
46
48
  typebulb models List AI models for tb.ai, filtered by your .env API keys
@@ -193,10 +195,6 @@ everywhere.
193
195
  - **Embeds also have no persistent storage** (`localStorage`, `IndexedDB`, cookies, same-origin Workers all fail — a client-only sandboxed iframe), so keep state in memory. `tb.mode === 'embedded'` lets a bulb detect this and self-adjust.
194
196
  - **`tb.proxy` only rewrites allow-listed CDNs** — `esm.sh`, `unpkg.com`, `cdn.jsdelivr.net`, `cdnjs.cloudflare.com`; any other host 403s. Serve a WASM/worker asset (a tesseract or ffmpeg core, a pdf.js worker) from one of these.
195
197
 
196
- ## Portability back to typebulb.com
197
-
198
- A local `.bulb.md` can be re-imported into typebulb.com. If it has a `**server.ts**` block you'll be warned on import, since `server.ts` is only meaningful locally.
199
-
200
198
  ## Agent Harness Support
201
199
 
202
200
  The agent mirror gives the user a great scratchpad experience for the **Claude Code** and **Pi** agent harnesses (`npx typebulb agent:{claude|pi}`). This lets the user:
@@ -423,6 +421,15 @@ Breaking the loop stops the stream; same options as `tb.ai()`. **`kind: "reasoni
423
421
 
424
422
  The user can proxy claude with the agent mirror's model switcher, to any model on [OpenRouter](https://openrouter.ai) model instead of Anthropic. This lets the user use OpenRouter models with Claude Code's harness.
425
423
 
424
+ ## Push & Pull (typebulb.com)
425
+
426
+ One bulb per command, between typebulb.com and its conventional local file — the path IS the remote identity: `typebulbs/u/ben/birds.bulb.md` ↔ `typebulb.com/u/ben/birds`.
427
+
428
+ - **Pull**: `typebulb pull <bulb-url>` (or an existing local file, to refresh in place). Unlisted and public bulbs need no login. A local file with real changes is refused; `--force` overwrites it.
429
+ - **Push**: `typebulb push <file>` uploads as you — set `TYPEBULB_TOKEN` in `.env` (minted on your typebulb.com settings page). A slug that doesn't exist yet is created, unlisted. If the site copy changed since your last pull/push, the push is refused; `--force` overwrites it. A `**server.ts**` block is stripped from the site copy (CLI-only); your local file is never modified.
430
+ - **In the agent mirror**, the launcher lists your typebulb.com bulbs (pull-on-play) and local `u/<user>/` rows carry pull/push icons — same rules, same `--force` confirm.
431
+ - `TYPEBULB_ORIGIN` in `.env` overrides the default `https://typebulb.com` host.
432
+
426
433
  ## Charts
427
434
 
428
435
  Mermaid's `xychart-beta` is static, unlabeled bars and lines — no tooltips, no legend, no other chart types. Anything more is a bulb. Start from this skeleton: