typebulb 0.15.2 → 0.15.3
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/agents/claude/client.js +83 -81
- package/dist/agents/claude/styles.css +5 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -589,13 +589,14 @@ a.server-port:hover { text-decoration: underline; }
|
|
|
589
589
|
.md :first-child { margin-top: 0; }
|
|
590
590
|
.md :last-child { margin-bottom: 0; }
|
|
591
591
|
.md p { margin: .5rem 0; }
|
|
592
|
-
/* Thematic break — also the divider between merged consecutive user sends (see
|
|
593
|
-
|
|
592
|
+
/* Thematic break — also the divider between merged consecutive user sends (see applyUser): faint
|
|
593
|
+
so the bubble still reads as one turn, but legible in both themes. Mixed off --fg (text contrast)
|
|
594
|
+
rather than --border + opacity: --border is itself dim in dark mode, so dimming it again left the
|
|
595
|
+
line invisible there — and the faintness is a property of the line's color, not the element. */
|
|
594
596
|
.md hr {
|
|
595
597
|
border: none;
|
|
596
|
-
border-top: 1px solid var(--
|
|
598
|
+
border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
|
|
597
599
|
margin: .55rem 0;
|
|
598
|
-
opacity: .5;
|
|
599
600
|
}
|
|
600
601
|
.md pre {
|
|
601
602
|
background: var(--veil);
|
package/dist/index.js
CHANGED
|
@@ -1136,6 +1136,6 @@ ${Uw}
|
|
|
1136
1136
|
Shutting down...`),p.close(),y?.(),t(),await Or(process.pid),process.exit(0)};process.on("SIGINT",E),process.on("SIGTERM",E)}import*as Yd from"path";import{EventEmitter as Kv}from"events";async function Hd(r,e,t,n,s){let i=de(t),o=!1,a=async()=>{let{bulb:c,config:l}=await ne(r);o||(Le(i,r,c.server),o=!0),await kr(c.server,s,n,l.dependencies)};if(console.log(`Running ${Yd.basename(r)}...`),await a(),e){console.log(`Watching for changes...
|
|
1137
1137
|
`);let c=new Kv;c.on("reload",async()=>{try{console.log("Re-running..."),await a()}catch(l){console.error("Error:",l)}}),Es({bulbPath:r,emitter:c})}}import{Console as Wv}from"node:console";fe();Er();async function Gd(r,e,t,n,s){Qv();try{let p=L(r),m=(await $()).find(h=>L(h.file)===p);m&&ls(m.pid,ue(m.pid).offset)}catch{}let i=de(t),{bulb:o,config:a}=await ne(r);o.server||Is("This bulb has no **server.ts** block; nothing to call."),Le(i,r,o.server);let c;try{c=await kr(o.server,s,n,a.dependencies)}catch(p){Is(p instanceof Error?p.message:String(p))}let l=Ss(c,e.fn);if(!l){let p=[...Object.keys(c).filter(m=>typeof c[m]=="function"),...Object.keys(ca)];Is(`Function '${e.fn}' not found. Available: ${p.length?p.join(", "):"(none)"}.`)}let f=await Vv(e),u;try{u=await l(...f)}catch(p){Is(p instanceof Error?p.stack??p.message:String(p))}let d=Gv(u);d!==void 0&&await Xv(d+`
|
|
1138
1138
|
`),process.exit(0)}async function Vv(r){if(r.hasArgsFlag){let e=r.argsJson??"";return e==="-"&&(e=await Zv()),Hv(e)}return Yv(r.positional)}function Yv(r){return r.map(e=>{try{return JSON.parse(e)}catch{return e}})}function Hv(r){let e;try{e=JSON.parse(r)}catch(t){throw new Error(`--args must be a JSON array: ${t instanceof Error?t.message:String(t)}`)}if(!Array.isArray(e))throw new Error(`--args must be a JSON array, got ${e===null?"null":typeof e}`);return e}function Gv(r){if(r!==void 0)return JSON.stringify(r,zv,2)}function zv(r,e){return typeof e=="bigint"?e.toString():e}function Is(r){process.stderr.write(r+`
|
|
1139
|
-
`),process.exit(1)}function Qv(){let r=new Wv(process.stderr,process.stderr);console.log=r.log.bind(r),console.info=r.info.bind(r),console.debug=r.debug.bind(r),console.dir=r.dir.bind(r)}function Xv(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function Zv(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var ka="0.15.
|
|
1139
|
+
`),process.exit(1)}function Qv(){let r=new Wv(process.stderr,process.stderr);console.log=r.log.bind(r),console.info=r.info.bind(r),console.debug=r.debug.bind(r),console.dir=r.dir.bind(r)}function Xv(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function Zv(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var ka="0.15.3";function zd(r,e){r||(console.error(`This bulb runs server-side Node code (server.ts), which --trust must authorize:
|
|
1140
1140
|
${e}`),process.exit(1))}async function eS(){let r=Ia(process.argv.slice(2));if(r.version&&(console.log(`typebulb ${ka}`),process.exit(0)),r.help&&(_a(),process.exit(0)),r.subcommand==="logs"){await Qf(r.file||void 0,{follow:r.follow,clear:r.clear,run:r.run,lines:r.lines});return}if(r.subcommand==="wait"){await Xf(r.file||void 0,{match:r.match,timeoutSec:r.timeoutSec??1800});return}if(r.subcommand==="stop"){r.stopScope?await ed(r.stopScope):await Zf(r.file||void 0);return}if(r.subcommand==="send"){await rd(r.file,r.sendMessage);return}if(r.subcommand==="skill"){await Hf(ka);return}if(r.subcommand==="models"){await Vf(r.mode);return}if(r.subcommand==="agent"){if(!r.agentTarget){await Uf(ka);return}yf(r.agentTarget)||(console.error(`Unknown agent '${r.agentTarget}'. Known: ${Ar().join(", ")}.`),process.exit(1));let l=await Xo(process.cwd(),r.agentTarget);if(l){console.log(`Mirror '${r.agentTarget}' is already running for this project:
|
|
1141
1141
|
${l.url}`),r.open&&await wt(l.url);return}await Vd(r);return}if(r.subcommand==="trust"||r.subcommand==="untrust"){await Pf(r.file||void 0,r.subcommand==="trust");return}let e;if(!r.file||r.file==="."){let l=await pf(process.cwd());l||(console.error("No .bulb.md file found in current directory"),process.exit(1)),e=l}else e=we.resolve(r.file);await Qd.access(e).then(()=>!0,()=>!1)||(Ar().includes(r.file)&&(console.error(`To open the ${r.file} agent mirror, 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:we.relative(process.cwd(),e)||we.basename(e),s=`npx typebulb --trust ${n.includes(" ")?`"${n}"`:n}`;if(r.subcommand==="predict"){await Af(e,s);return}let i=!r.noTrust&&Ke(e);i&&!r.trust&&console.log("trust: granted from memory (run `typebulb untrust` to revoke)"),r.trust=r.noTrust?!1:r.trust||i;let o;try{o=await ne(e)}catch{}let a;if(r.local){o&&!(r.local.name in(o.config.dependencies??{}))&&(console.error(`--replace: '${r.local.name}' is not a dependency in this bulb's config.json; nothing to replace.`),process.exit(1)),o&&r.subcommand!=="call"&&(!o.bulb.code||r.server)&&console.warn("warning: --replace has no effect in server mode (the override is client-only).");try{a=await Ca(r.local)}catch(l){console.error(l instanceof Error?l.message:String(l)),process.exit(1)}console.log(`replace: ${a.name} \u2192 ${we.relative(process.cwd(),a.dir)||"."}`)}if(r.subcommand==="check"){await Tf(e,a);return}let c=we.dirname(e);if(r.subcommand==="call"){zd(r.trust,s),await Gd(e,{fn:r.fn,positional:r.callArgs,argsJson:r.argsJson,hasArgsFlag:r.hasArgsFlag},r.mode,a,c);return}if(o&&o.bulb.server&&(!o.bulb.code||r.server)){zd(r.trust,s),await Hd(e,r.watch,r.mode,a,c);return}await fd(e,r,s,a,c)}eS().catch(r=>{console.error("Error:",r.message),process.exit(1)});
|
package/package.json
CHANGED