typebulb 0.35.0 → 0.36.0
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 +1 -1
- package/dist/agents/claude/client.js +149 -149
- package/dist/agents/claude/styles.css +2 -0
- package/dist/agents/pi/client.js +150 -150
- package/dist/agents/pi/matchu-patchu.ts +1 -1
- package/dist/agents/pi/styles.css +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2280,7 +2280,7 @@ var Patcher = class {
|
|
|
2280
2280
|
|
|
2281
2281
|
// cli/agents/pi/server/piPatcherExtension.ts
|
|
2282
2282
|
var DESCRIPTION = true ? "Apply unified diffs to files \u2014 tolerant of form, strict about intent. Repairs sloppy AI-generated diffs (mangled headers, whitespace drift, missing prefixes; line numbers can be wrong or absent \u2014 hunks anchor by fuzzy-matched context lines) and applies all hunks atomically when the intent is unambiguous; fails with a precise, typed error when it isn't. Use for multi-hunk edits in one step, or when exact string-replacement editing fails on whitespace or invisible characters." : "Apply unified diffs to files.";
|
|
2283
|
-
var BUILD_TAG = true ? "matchu-patchu-pi 0.3.1, built 2026-07-20
|
|
2283
|
+
var BUILD_TAG = true ? "matchu-patchu-pi 0.3.1, built 2026-07-20 12:59:06" : "matchu-patchu-pi dev";
|
|
2284
2284
|
var errorBlocks = (errors) => {
|
|
2285
2285
|
const parts = [`Patch failed with ${errors.length} error(s):`];
|
|
2286
2286
|
for (const e of errors) parts.push("", e.toString());
|
|
@@ -834,6 +834,8 @@ a.server-port:hover { text-decoration: underline; }
|
|
|
834
834
|
/* A running row's --dir batch scope (bulbsPill.ts): a muted mono token after the name — the
|
|
835
835
|
register of the sample-link/user slug, mono because it names a folder. */
|
|
836
836
|
.bulb-dir { color: var(--muted); font-size: .76rem; font-family: ui-monospace, monospace; flex: none; }
|
|
837
|
+
/* A remote pull's visible failure (bulbsPill.ts pullErrors) — the bulb-dir register, error-tinted. */
|
|
838
|
+
.pull-error { color: var(--err); font-size: .76rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
837
839
|
/* The remote fold (bulbsPill.ts groupRow / fold-row): the header and the remote rows within share
|
|
838
840
|
one veil step over the menu's panel bg (the picker-peek shade) as ONE contiguous band — each
|
|
839
841
|
row's ::before bridges the grid row-gap up to the row above, junction corners square off, and
|
package/dist/index.js
CHANGED
|
@@ -1995,5 +1995,5 @@ ${eO}
|
|
|
1995
1995
|
`);let c=0,l=Promise.resolve();Pt({target:r,onChange:()=>{let f=++c;l=l.then(async()=>{if(f===c)try{console.log("Re-running..."),await a()}catch(u){console.error("Error:",u)}})}})}}St();bt();import{Console as iO}from"node:console";Le();async function eb(r,e,t,n,s){uO();try{let p=_r(await Q(),r)[0];p&&(Gi(p.pid,$e(p.pid).offset),console.error(`note: 'call' boots a fresh server.ts instance; the running server (${p.url}) is not contacted \u2014 state shared with it must live on disk.`))}catch{}let i=ye(t),{bulb:o,config:a}=await Te(r);o.server||cs("This bulb has no **server.ts** block; nothing to call."),vt(i,r,o.server);let c;try{c=await Fn(o.server,r,n,a.dependencies,s)}catch(p){cs(p instanceof Error?p.message:String(p))}let l=qo(c,e.fn);if(!l){let p=[...Object.keys(c).filter(b=>typeof c[b]=="function"),...Object.keys(Fo)];cs(`Function '${e.fn}' not found. Available: ${p.length?p.join(", "):"(none)"}.`)}let f=await oO(e);if(Uo(l)){try{for await(let p of l(...f))await Zy(JSON.stringify(p,tb)+`
|
|
1996
1996
|
`)}catch(p){cs(p instanceof Error?p.stack??p.message:String(p))}return Qy(0)}let u;try{u=await l(...f)}catch(p){cs(p instanceof Error?p.stack??p.message:String(p))}let d=lO(u);d!==void 0&&await Zy(d+`
|
|
1997
1997
|
`),Qy(0)}function Qy(r){process.exitCode=r,setTimeout(()=>process.exit(r),2e3).unref?.()}async function oO(r){if(r.hasArgsFlag){let e=r.argsJson??"";return e==="-"&&(e=await dO()),cO(e)}return aO(r.positional)}function aO(r){return r.map(e=>{try{return JSON.parse(e)}catch{return e}})}function cO(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 lO(r){if(r!==void 0)return JSON.stringify(r,tb,2)}function tb(r,e){return typeof e=="bigint"?e.toString():e}function cs(r){process.stderr.write(r+`
|
|
1998
|
-
`),process.exit(1)}function uO(){let r=new iO(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 Zy(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function dO(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var Cu="0.
|
|
1998
|
+
`),process.exit(1)}function uO(){let r=new iO(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 Zy(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function dO(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var Cu="0.36.0";function rb(r,e){r||(console.error(`This bulb runs server-side Node code (server.ts), which --trust must authorize:
|
|
1999
1999
|
${e}`),process.exit(1))}async function fO(){let r=Hu(process.argv.slice(2));if(r.version&&(console.log(`typebulb ${Cu}`),process.exit(0)),r.help&&(Wu(),process.exit(0)),ky(),r.subcommand==="logs"){await Iy(r.file||void 0,{follow:r.follow,clear:r.clear,run:r.run,lines:r.lines});return}if(r.subcommand==="wait"){await $y(r.file||void 0,{match:r.match,timeoutSec:r.timeoutSec});return}if(r.subcommand==="stop"){r.stopScope?await My(r.stopScope):await Ly(r.file||void 0);return}if(r.subcommand==="send"){await By(r.file,r.sendMessage,r.sendWaitMs??0);return}if(r.subcommand==="skill"){await Cy(Cu);return}if(r.subcommand==="models"){await Oy(r.mode);return}if(r.subcommand==="pull"){await Th(r.file||void 0,{force:r.force,mode:r.mode});return}if(r.subcommand==="push"){await Ch(r.file||void 0,{force:r.force,mode:r.mode});return}if(r.subcommand==="agent"){await(r.agentTarget?Gy(r):Py(Cu));return}if(r.subcommand==="trust"||r.subcommand==="untrust"){await xy(r.file||void 0,r.subcommand==="trust");return}let e;if(!r.file||r.file==="."){let c=await Vm(process.cwd());c||(console.error("No .bulb.md file found in current directory"),process.exit(1)),e=c}else e=er.resolve(r.file);await nb.access(e).then(()=>!0,()=>!1)||(Dr().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:er.relative(process.cwd(),e)||er.basename(e),s=`npx typebulb --trust ${n.includes(" ")?`"${n}"`:n}`;if(r.subcommand==="predict"){await Sy(e,s);return}let i=!r.noTrust&&Ht(e);i&&!r.trust&&console.error("trust: granted from memory (run `typebulb untrust` to revoke)"),r.trust=r.noTrust?!1:r.trust||i;let o;try{o=await Te(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 Uu(r.local)}catch(c){console.error(c instanceof Error?c.message:String(c)),process.exit(1)}console.error(`replace: ${a.name} \u2192 ${er.relative(process.cwd(),a.dir)||"."}`)}if(r.subcommand==="check"){await vy(e,a);return}if(r.subcommand==="call"){rb(r.trust,s),await eb(e,{fn:r.fn,positional:r.callArgs,argsJson:r.argsJson,hasArgsFlag:r.hasArgsFlag},r.mode,a,r.dir);return}if(o&&o.bulb.server&&(pi(o.bulb)||r.server)){rb(r.trust,s),await Xy(e,r.watch,r.mode,a,r.dir);return}await Hy(e,r,s,a)}fO().catch(r=>{console.error("Error:",r.message),process.exit(1)});
|
package/package.json
CHANGED