typebulb 0.29.3 → 0.30.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.
|
@@ -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-17
|
|
2283
|
+
var BUILD_TAG = true ? "matchu-patchu-pi 0.3.1, built 2026-07-17 21:12:30" : "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());
|
|
@@ -201,7 +201,8 @@ body {
|
|
|
201
201
|
/* ONE geometry contract for both menus — sizing policy, padding, stacking. Stating it twice is
|
|
202
202
|
how every sibling discrepancy of June '26 happened (row pitch, gaps, fixed-vs-grow). max-height,
|
|
203
203
|
not height: a menu hugs its content and caps at the 12 rows above — a fixed height left a
|
|
204
|
-
1-bulb project with a row floating atop a 400px void. Per-menu rules keep only width
|
|
204
|
+
1-bulb project with a row floating atop a 400px void. Per-menu rules keep only width and
|
|
205
|
+
alignment (.pop-center / .pop-start below). */
|
|
205
206
|
max-height: var(--menu-h);
|
|
206
207
|
overflow: hidden;
|
|
207
208
|
padding: .35rem;
|
|
@@ -217,6 +218,14 @@ body {
|
|
|
217
218
|
border-radius: 10px;
|
|
218
219
|
box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
|
|
219
220
|
}
|
|
221
|
+
/* Popover alignment — which edge of the pill the menu aligns to (floating-UI's start/center/end
|
|
222
|
+
vocabulary; "end", right edges flush and growing left, is the unnamed default above). Tagged on
|
|
223
|
+
the pill's WRAP, not each popover root: a menu with several drilled-in views (the model pill's
|
|
224
|
+
list/info/diag/key modes) aligns once, and a future mode can't forget. The cluster's left-side
|
|
225
|
+
pills (diff, model) center — end-anchored, their menus run out of room growing left. No viewport
|
|
226
|
+
clamping: desktop-only; revisit if a narrow window ever clips one. */
|
|
227
|
+
.pop-center > :is(.picker, .servers-pop) { right: auto; left: 50%; transform: translateX(-50%); }
|
|
228
|
+
.pop-start > :is(.picker, .servers-pop) { right: auto; left: 0; }
|
|
220
229
|
|
|
221
230
|
/* ---- Shimmer — the one "working" cue. One gradient, one keyframes, composed via class, never
|
|
222
231
|
re-pasted (paste-drift is how each new shimmer kept landing at its own speed). `.shimmer` sweeps
|
|
@@ -985,16 +994,30 @@ a.server-port:hover { text-decoration: underline; }
|
|
|
985
994
|
.gitdiff-counts { flex: none; display: inline-flex; gap: .35rem; font-size: .72rem; font-variant-numeric: tabular-nums; }
|
|
986
995
|
.gitdiff-counts .count-add { color: var(--diff-add); }
|
|
987
996
|
.gitdiff-counts .count-del { color: var(--err); }
|
|
997
|
+
/* The pill's viewing form: the doc's identity in place of the icon+count — status letter, path,
|
|
998
|
+
±counts, × (the doc itself is chrome-free). Width capped so a deep path can't crowd the cluster;
|
|
999
|
+
rtl clip keeps the path's tail — the filename — visible, full path in the title. */
|
|
1000
|
+
.pill.glyph.gitdiff-pill.viewing { max-width: min(30rem, 45vw); gap: .45rem; padding: 0 .35rem 0 .5rem; }
|
|
1001
|
+
/* Same text seating as the word pills (.pill's text-box note): .pill.glyph opts out of the trim
|
|
1002
|
+
(right for pure glyphs, low for letters), and the viewing form keeps flex for the path's
|
|
1003
|
+
ellipsis — so the trim rides each text item instead of the button. Flex items are block
|
|
1004
|
+
containers, so text-box applies; the × icon stays untrimmed (symmetric, flex-exact). */
|
|
1005
|
+
.gitdiff-pill.viewing :is(.gitdiff-status, .gitdiff-doc-path, .gitdiff-counts span) { text-box: trim-both cap alphabetic; }
|
|
1006
|
+
.gitdiff-doc-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; font-size: var(--pill-font); color: var(--accent); }
|
|
1007
|
+
.gitdiff-doc-path:hover { text-decoration: underline; }
|
|
1008
|
+
.gitdiff-close { flex: none; display: inline-flex; padding: 0 .15rem; color: var(--muted); }
|
|
1009
|
+
.gitdiff-close .icon { width: 10px; height: 10px; }
|
|
1010
|
+
.gitdiff-close:hover { color: var(--accent); }
|
|
1011
|
+
/* Doc open ⇒ the transcript-scoped pills hide: prose toggle, model switcher, session picker all act
|
|
1012
|
+
on the conversation, which isn't on screen (the token pill stays — its shimmer says the live diff
|
|
1013
|
+
may still grow). display only, never unmount — the model pill's superSelect must keep its mount. */
|
|
1014
|
+
.statusbar-actions.doc-open :is(.prose-pill, .model-wrap, .sid-wrap) { display: none; }
|
|
988
1015
|
|
|
989
1016
|
/* The diff doc — takes the transcript's slot in .chat (same flex geometry as .messages). Full-bleed
|
|
990
1017
|
like a code surface (no --content-max column: diff lines want the width); the body is the scroll
|
|
991
1018
|
surface, its bottom padding clearing the overlaid statusbar like .messages' does. The ± markers and
|
|
992
1019
|
red/green bands are the shared .udiff-* rules the tool cards use. */
|
|
993
1020
|
.diff-doc { flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }
|
|
994
|
-
.diff-doc-head { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.75rem .4rem; font-size: .8rem; border-bottom: 1px solid var(--border); }
|
|
995
|
-
.diff-doc-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); cursor: pointer; }
|
|
996
|
-
.diff-doc-path:hover { text-decoration: underline; }
|
|
997
|
-
.diff-doc-head .bulb-log-back { margin-left: auto; }
|
|
998
1021
|
.diff-doc-body {
|
|
999
1022
|
flex: 1; min-height: 0; overflow: auto;
|
|
1000
1023
|
scrollbar-gutter: stable both-edges;
|
|
@@ -1012,8 +1035,8 @@ a.server-port:hover { text-decoration: underline; }
|
|
|
1012
1035
|
gutter ± glyphs and at file scale by the ruler. Scoped: the tool-card hunks keep 24%, where the
|
|
1013
1036
|
unhighlighted band is the only signal. Del a touch stronger than add — red-leaning tokens
|
|
1014
1037
|
camouflage against red tint more than anything does against green. */
|
|
1015
|
-
.diff-doc-body .udiff-add { background: color-mix(in srgb, var(--diff-add)
|
|
1016
|
-
.diff-doc-body .udiff-del { background: color-mix(in srgb, var(--err)
|
|
1038
|
+
.diff-doc-body .udiff-add { background: color-mix(in srgb, var(--diff-add) 15%, transparent); }
|
|
1039
|
+
.diff-doc-body .udiff-del { background: color-mix(in srgb, var(--err) 18%, transparent); }
|
|
1017
1040
|
/* The overview ruler — VS Code's scrollbar change-marks, owned since the native scrollbar can't be
|
|
1018
1041
|
painted: a thin track beside the scrollbar (17px clears Windows Chromium's classic bar — plain px
|
|
1019
1042
|
on a desktop-only surface, the menus' own stance), red/green marks at each change run's fractional
|
package/dist/index.js
CHANGED
|
@@ -1923,5 +1923,5 @@ ${dP}
|
|
|
1923
1923
|
`);let c=0,l=Promise.resolve();Yt({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)}})}})}}mt();import{Console as yP}from"node:console";Re();async function yy(r,e,t,n,s){kP();try{let p=Sr(await Y(),r)[0];p&&(Ii(p.pid,Ce(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=ge(t),{bulb:o,config:a}=await xe(r);o.server||Vn("This bulb has no **server.ts** block; nothing to call."),pt(i,r,o.server);let c;try{c=await _n(o.server,r,n,a.dependencies,s)}catch(p){Vn(p instanceof Error?p.message:String(p))}let l=Ao(c,e.fn);if(!l){let p=[...Object.keys(c).filter(y=>typeof c[y]=="function"),...Object.keys(Eo)];Vn(`Function '${e.fn}' not found. Available: ${p.length?p.join(", "):"(none)"}.`)}let f=await bP(e);if(To(l)){try{for await(let p of l(...f))await gy(JSON.stringify(p,by)+`
|
|
1924
1924
|
`)}catch(p){Vn(p instanceof Error?p.stack??p.message:String(p))}return hy(0)}let u;try{u=await l(...f)}catch(p){Vn(p instanceof Error?p.stack??p.message:String(p))}let d=SP(u);d!==void 0&&await gy(d+`
|
|
1925
1925
|
`),hy(0)}function hy(r){process.exitCode=r,setTimeout(()=>process.exit(r),2e3).unref?.()}async function bP(r){if(r.hasArgsFlag){let e=r.argsJson??"";return e==="-"&&(e=await xP()),vP(e)}return wP(r.positional)}function wP(r){return r.map(e=>{try{return JSON.parse(e)}catch{return e}})}function vP(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 SP(r){if(r!==void 0)return JSON.stringify(r,by,2)}function by(r,e){return typeof e=="bigint"?e.toString():e}function Vn(r){process.stderr.write(r+`
|
|
1926
|
-
`),process.exit(1)}function kP(){let r=new yP(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 gy(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function xP(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var eu="0.
|
|
1926
|
+
`),process.exit(1)}function kP(){let r=new yP(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 gy(r){return new Promise((e,t)=>{process.stdout.write(r,n=>n?t(n):e())})}async function xP(){let r=[];for await(let e of process.stdin)r.push(e);return Buffer.concat(r).toString("utf-8")}var eu="0.30.0";function wy(r,e){r||(console.error(`This bulb runs server-side Node code (server.ts), which --trust must authorize:
|
|
1927
1927
|
${e}`),process.exit(1))}async function EP(){let r=gu(process.argv.slice(2));if(r.version&&(console.log(`typebulb ${eu}`),process.exit(0)),r.help&&(yu(),process.exit(0)),Dg(),r.subcommand==="logs"){await Yg(r.file||void 0,{follow:r.follow,clear:r.clear,run:r.run,lines:r.lines});return}if(r.subcommand==="wait"){await Vg(r.file||void 0,{match:r.match,timeoutSec:r.timeoutSec});return}if(r.subcommand==="stop"){r.stopScope?await zg(r.stopScope):await Gg(r.file||void 0);return}if(r.subcommand==="send"){await Xg(r.file,r.sendMessage,r.sendWaitMs??0);return}if(r.subcommand==="skill"){await Kg(eu);return}if(r.subcommand==="models"){await Ug(r.mode);return}if(r.subcommand==="pull"){await qm(r.file||void 0,{force:r.force,mode:r.mode});return}if(r.subcommand==="push"){await Km(r.file||void 0,{force:r.force,mode:r.mode});return}if(r.subcommand==="agent"){await(r.agentTarget?dy(r):qg(eu));return}if(r.subcommand==="trust"||r.subcommand==="untrust"){await Mg(r.file||void 0,r.subcommand==="trust");return}let e;if(!r.file||r.file==="."){let c=await lm(process.cwd());c||(console.error("No .bulb.md file found in current directory"),process.exit(1)),e=c}else e=Vt.resolve(r.file);await vy.access(e).then(()=>!0,()=>!1)||(Rr().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:Vt.relative(process.cwd(),e)||Vt.basename(e),s=`npx typebulb --trust ${n.includes(" ")?`"${n}"`:n}`;if(r.subcommand==="predict"){await Lg(e,s);return}let i=!r.noTrust&&Bt(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 xe(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 pu(r.local)}catch(c){console.error(c instanceof Error?c.message:String(c)),process.exit(1)}console.error(`replace: ${a.name} \u2192 ${Vt.relative(process.cwd(),a.dir)||"."}`)}if(r.subcommand==="check"){await $g(e,a);return}if(r.subcommand==="call"){wy(r.trust,s),await yy(e,{fn:r.fn,positional:r.callArgs,argsJson:r.argsJson,hasArgsFlag:r.hasArgsFlag},r.mode,a,r.dir);return}if(o&&o.bulb.server&&(Qs(o.bulb)||r.server)){wy(r.trust,s),await my(e,r.watch,r.mode,a,r.dir);return}await cy(e,r,s,a)}EP().catch(r=>{console.error("Error:",r.message),process.exit(1)});
|
package/package.json
CHANGED