typebulb 0.11.4 → 0.11.5

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.
@@ -11,6 +11,7 @@
11
11
  --tool-bg: rgb(245, 246, 248);
12
12
  --err: rgb(206, 60, 60);
13
13
  --diff-add: rgb(40, 140, 70);
14
+ --fold-marker: rgb(24, 145, 72);
14
15
  /* Prose measure for text (bubbles + notes) — kept to a readable line length.
15
16
  Diagrams break out wider than this; see .md .mermaid. */
16
17
  --content-max: 800px;
@@ -28,6 +29,7 @@ html[data-theme="dark"] {
28
29
  --tool-bg: rgb(30, 31, 36);
29
30
  --err: rgb(240, 120, 120);
30
31
  --diff-add: rgb(120, 210, 140);
32
+ --fold-marker: rgb(0, 255, 0);
31
33
  color-scheme: dark;
32
34
  }
33
35
 
@@ -895,22 +897,25 @@ a.server-port:hover { color: var(--accent); text-decoration: underline; }
895
897
  .turn-summary-text { font-style: italic; }
896
898
  .turn-summary:hover .turn-summary-text { color: var(--fg); }
897
899
 
898
- /* A superseded embed (an earlier same-name version) folds to this "<Name> — Version N" stub — it
899
- reclaims the bulb's full height but is deliberately a filled, accent-tinted block, NOT a subdued line,
900
- so it reads as a stable marker in the bulb's development story rather than leaving a "where did my bulb
901
- go?" gap. Its look never depends on outcome: errors show only inside the embed when expanded, so the
902
- title never flips color. Click to expand the older bulb (rerun fresh) back in. */
900
+ /* A superseded embed (an earlier same-name version) folds to this "💡 <Name> — Version N" stub — it
901
+ reclaims the bulb's full height. Marker-green text (--fold-marker: lime in dark, deep green in light)
902
+ on a neutral gray fill (--panel) that hugs the text (width:max-content), no border: text-hugging and
903
+ borderless keeps it distinct from the page's full-width bordered panels and clear of the live bulb's
904
+ hover pills, and the colored title rides a gray pill rather than a green block. Its look never depends
905
+ on outcome: errors show only inside the embed when expanded, so the title never changes. Click to
906
+ expand the older bulb (rerun fresh) back in. */
903
907
  .bulb-fold {
904
908
  display: flex;
909
+ width: max-content;
910
+ max-width: 100%;
905
911
  align-items: center;
906
912
  gap: .5rem;
907
- padding: .4rem .6rem;
908
- border-radius: 8px;
909
- background: color-mix(in srgb, var(--accent) 8%, var(--panel));
910
- border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
911
- color: var(--accent);
913
+ padding: .3rem .55rem;
914
+ border-radius: 6px;
915
+ background: var(--panel);
916
+ color: var(--fold-marker);
912
917
  font-size: .9rem;
913
- font-weight: 500;
918
+ font-weight: 600;
914
919
  cursor: pointer;
915
920
  user-select: none;
916
921
  }
@@ -918,7 +923,7 @@ a.server-port:hover { color: var(--accent); text-decoration: underline; }
918
923
  reset (above) would zero a plain `margin` here. Scope it under `.md` so it outweighs that reset
919
924
  (equal specificity, later in source) and the stub actually gets its breathing room. */
920
925
  .md .bulb-fold { margin: .7rem 0; }
921
- .bulb-fold:hover { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
926
+ .bulb-fold:hover { background: color-mix(in srgb, var(--fg) 8%, var(--panel)); }
922
927
  .bulb-fold .tool-caret { color: inherit; } /* follow the accent row color */
923
928
  /* Verb + summary are inline siblings sharing one line box and font, so they sit
924
929
  on a common baseline. Ellipsis truncation lives on the wrapper, not the
package/dist/index.js CHANGED
@@ -731,6 +731,6 @@ ${Vi}
731
731
  `);async function v(){await(await import("esbuild")).build({entryPoints:[I.join(c,"client","index.ts")],bundle:!0,platform:"browser",format:"esm",outfile:I.join(a,"client.js")});for(let T of["styles.css","index.html"])Na(I.join(c,T),I.join(a,T))}let $;if(r.watch&&n){let E=La(c),T=!1;$=Ut({dir:E?c:a,onChange:async()=>{if(!T){T=!0;try{E&&await v(),console.log(`Viewer rebuilt. Browser reloading...
732
732
  `),n.emit("reload")}catch(p){console.error("Viewer rebuild failed:",p instanceof Error?p.message:p)}finally{T=!1}}}})}r.open&&await Pe(g);let O=async()=>{console.log(`
733
733
  Shutting down...`),m.close(),$?.(),t(),await Ze(process.pid),process.exit(0)};process.on("SIGINT",O),process.on("SIGTERM",O)}import*as qs from"path";import{EventEmitter as Ja}from"events";async function Gs(r,e,t,n,s){let o=ne(t),i=!1,a=async()=>{let{bulb:c,config:l}=await G(r);i||(_e(o,r,c.server),i=!0),await ur(c.server,s,n,l.dependencies)};if(console.log(`Running ${qs.basename(r)}...`),await a(),e){console.log(`Watching for changes...
734
- `);let c=new Ja;c.on("reload",async()=>{try{console.log("Re-running..."),await a()}catch(l){console.error("Error:",l)}}),Lt({bulbPath:r,emitter:c})}}var Ks="0.11.4";async function Ha(){let r=zr(process.argv.slice(2));if(r.version&&(console.log(`typebulb ${Ks}`),process.exit(0)),r.help&&(qr(),process.exit(0)),r.subcommand==="logs"){await ns(r.file||void 0,{follow:r.follow,lines:r.lines});return}if(r.subcommand==="stop"){r.all?await os():await ss(r.file||void 0);return}if(r.subcommand==="skill"){await Zn(Ks);return}if(r.subcommand==="models"){await Yn(r.mode);return}if(r.subcommand==="agent"){if(!r.agentTarget){await zn();return}An(r.agentTarget)||(console.error(`Unknown agent '${r.agentTarget}'. Known: ${gr().join(", ")}.`),process.exit(1));let l=await wr(process.cwd(),r.agentTarget);if(l){console.log(`Viewer '${r.agentTarget}' is already running for this project:
734
+ `);let c=new Ja;c.on("reload",async()=>{try{console.log("Re-running..."),await a()}catch(l){console.error("Error:",l)}}),Lt({bulbPath:r,emitter:c})}}var Ks="0.11.5";async function Ha(){let r=zr(process.argv.slice(2));if(r.version&&(console.log(`typebulb ${Ks}`),process.exit(0)),r.help&&(qr(),process.exit(0)),r.subcommand==="logs"){await ns(r.file||void 0,{follow:r.follow,lines:r.lines});return}if(r.subcommand==="stop"){r.all?await os():await ss(r.file||void 0);return}if(r.subcommand==="skill"){await Zn(Ks);return}if(r.subcommand==="models"){await Yn(r.mode);return}if(r.subcommand==="agent"){if(!r.agentTarget){await zn();return}An(r.agentTarget)||(console.error(`Unknown agent '${r.agentTarget}'. Known: ${gr().join(", ")}.`),process.exit(1));let l=await wr(process.cwd(),r.agentTarget);if(l){console.log(`Viewer '${r.agentTarget}' is already running for this project:
735
735
  ${l.url}`),r.open&&await Pe(l.url);return}await zs(r);return}if(r.subcommand==="trust"||r.subcommand==="untrust"){await jn(r.file||void 0,r.subcommand==="trust");return}let e;if(!r.file||r.file==="."){let l=await Rn(process.cwd());l||(console.error("No .bulb.md file found in current directory"),process.exit(1)),e=l}else e=X.resolve(r.file);await Ys.access(e).then(()=>!0,()=>!1)||(gr().includes(r.file)&&(console.error(`To open the ${r.file} agent viewer, run: npx typebulb agent:${r.file}`),process.exit(1)),console.error(`File not found: ${e}`),process.exit(1)),e.endsWith(".bulb.md")||(console.error("File must have .bulb.md extension"),process.exit(1));let n=r.file&&r.file!=="."?r.file:X.relative(process.cwd(),e)||X.basename(e),s=`npx typebulb --trust ${n.includes(" ")?`"${n}"`:n}`;if(r.subcommand==="predict"){await Fn(e,s);return}let o=!r.noTrust&&le(e);o&&!r.trust&&console.log("trust: granted from memory (run `typebulb untrust` to revoke)"),r.trust=r.noTrust?!1:r.trust||o;let i;try{i=await G(e)}catch{}let a;if(r.local){i&&!(r.local.name in(i.config.dependencies??{}))&&(console.error(`--replace: '${r.local.name}' is not a dependency in this bulb's config.json; nothing to replace.`),process.exit(1)),i&&(!i.bulb.code||r.server)&&console.warn("warning: --replace has no effect in server mode (the override is client-only).");try{a=await Hr(r.local)}catch(l){console.error(l instanceof Error?l.message:String(l)),process.exit(1)}console.log(`replace: ${a.name} \u2192 ${X.relative(process.cwd(),a.dir)||"."}`)}if(r.subcommand==="check"){await Mn(e,a);return}let c=X.dirname(e);if(i&&i.bulb.server&&(!i.bulb.code||r.server)){r.trust||(console.error(`This bulb runs server-side Node code (server.ts), which --trust must authorize:
736
736
  ${s}`),process.exit(1)),await Gs(e,r.watch,r.mode,a,c);return}await hs(e,r,s,a,c)}Ha().catch(r=>{console.error("Error:",r.message),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typebulb",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "description": "Local bulb runner CLI for Typebulb",
5
5
  "license": "MIT",
6
6
  "engines": { "node": ">=18" },