typebulb 0.34.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/format/config.d.ts +16 -0
- package/dist/format/config.d.ts.map +1 -1
- package/dist/format/config.js +49 -0
- package/dist/format/config.js.map +1 -1
- package/dist/index.js +929 -929
- package/dist/render.js +29 -29
- package/dist/servers.js +102 -102
- 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/format/config.d.ts
CHANGED
|
@@ -19,6 +19,22 @@ export declare const HOSTED_ASSETS_ORIGIN = "https://assets.typebulb.com";
|
|
|
19
19
|
/** The hosted-assets base derived from a bulb's identity (TB-Assets-Push.md Invariant 2:
|
|
20
20
|
* derived, never stored). An identity-less bulb has no remote base — it can't push either. */
|
|
21
21
|
export declare const hostedAssetsBase: (userSlug: string, slug: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Content type for a served file, from its extension. `.wasm` must be `application/wasm`
|
|
24
|
+
* for `WebAssembly.instantiateStreaming`; `.svg` must be `image/svg+xml` or an `<img>`
|
|
25
|
+
* won't render it (no sniffing for SVG). Unknown extensions are `application/octet-stream`
|
|
26
|
+
* — browsers download those, never render. Shared by the CLI's static routes (which serve
|
|
27
|
+
* real `.js`: the mirror's bundled client, `--replace` dirs) and the API worker's asset PUT
|
|
28
|
+
* — which derives the stored type from this table, never the upload header, and refuses
|
|
29
|
+
* document/script extensions before consulting it, so the `.js`/`.css` rows are unreachable
|
|
30
|
+
* on the hosted-asset path (TB-Assets-Push.md Invariant 9).
|
|
31
|
+
*/
|
|
32
|
+
export declare function contentTypeFor(filePath: string): string;
|
|
33
|
+
/** The offending extension when a path names browser code/markup — refused as an asset
|
|
34
|
+
* everywhere (the hosted PUT and the local `/assets/` route alike): a bulb's code and
|
|
35
|
+
* markup live in the bulb; assets are media and data (TB-Assets-Push.md Invariant 9).
|
|
36
|
+
* `undefined` for everything else — media, data, and unknown extensions all serve. */
|
|
37
|
+
export declare function forbiddenAssetExt(relpath: string): string | undefined;
|
|
22
38
|
/** Strip inline markdown (links, emphasis, code, headings) for plain-text contexts like meta descriptions. */
|
|
23
39
|
export declare function stripMarkdown(text: string): string;
|
|
24
40
|
/** Plain-text description from a `config.json` string: markdown stripped, single line, ≤200 chars.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../format/src/config.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,EAAE,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAOtD;AAED,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,gCAAgC,CAAA;AAEjE;+FAC+F;AAC/F,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,WAC2B,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../format/src/config.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,EAAE,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAOtD;AAED,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,gCAAgC,CAAA;AAEjE;+FAC+F;AAC/F,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,WAC2B,CAAA;AAK1F;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2BvD;AAID;;;uFAGuF;AACvF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGrE;AAID,8GAA8G;AAC9G,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED;0EAC0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMrE"}
|
package/dist/format/config.js
CHANGED
|
@@ -15,6 +15,55 @@ export const HOSTED_ASSETS_ORIGIN = 'https://assets.typebulb.com';
|
|
|
15
15
|
/** The hosted-assets base derived from a bulb's identity (TB-Assets-Push.md Invariant 2:
|
|
16
16
|
* derived, never stored). An identity-less bulb has no remote base — it can't push either. */
|
|
17
17
|
export const hostedAssetsBase = (userSlug, slug) => `${HOSTED_ASSETS_ORIGIN}/u/${encodeURIComponent(userSlug)}/${encodeURIComponent(slug)}/`;
|
|
18
|
+
/** Lowercased final extension (`sub/née.PNG` → `.png`); undefined when there is none. */
|
|
19
|
+
const extOf = (p) => /\.[^./\\]+$/.exec(p)?.[0]?.toLowerCase();
|
|
20
|
+
/**
|
|
21
|
+
* Content type for a served file, from its extension. `.wasm` must be `application/wasm`
|
|
22
|
+
* for `WebAssembly.instantiateStreaming`; `.svg` must be `image/svg+xml` or an `<img>`
|
|
23
|
+
* won't render it (no sniffing for SVG). Unknown extensions are `application/octet-stream`
|
|
24
|
+
* — browsers download those, never render. Shared by the CLI's static routes (which serve
|
|
25
|
+
* real `.js`: the mirror's bundled client, `--replace` dirs) and the API worker's asset PUT
|
|
26
|
+
* — which derives the stored type from this table, never the upload header, and refuses
|
|
27
|
+
* document/script extensions before consulting it, so the `.js`/`.css` rows are unreachable
|
|
28
|
+
* on the hosted-asset path (TB-Assets-Push.md Invariant 9).
|
|
29
|
+
*/
|
|
30
|
+
export function contentTypeFor(filePath) {
|
|
31
|
+
switch (extOf(filePath)) {
|
|
32
|
+
case '.js':
|
|
33
|
+
case '.mjs': return 'text/javascript';
|
|
34
|
+
case '.wasm': return 'application/wasm';
|
|
35
|
+
case '.json':
|
|
36
|
+
case '.map': return 'application/json';
|
|
37
|
+
case '.svg': return 'image/svg+xml';
|
|
38
|
+
case '.png': return 'image/png';
|
|
39
|
+
case '.jpg':
|
|
40
|
+
case '.jpeg': return 'image/jpeg';
|
|
41
|
+
case '.gif': return 'image/gif';
|
|
42
|
+
case '.webp': return 'image/webp';
|
|
43
|
+
case '.avif': return 'image/avif';
|
|
44
|
+
case '.ico': return 'image/x-icon';
|
|
45
|
+
case '.mp3': return 'audio/mpeg';
|
|
46
|
+
case '.wav': return 'audio/wav';
|
|
47
|
+
case '.ogg': return 'audio/ogg';
|
|
48
|
+
case '.m4a': return 'audio/mp4';
|
|
49
|
+
case '.mp4': return 'video/mp4';
|
|
50
|
+
case '.webm': return 'video/webm';
|
|
51
|
+
case '.woff2': return 'font/woff2';
|
|
52
|
+
case '.ttf': return 'font/ttf';
|
|
53
|
+
case '.css': return 'text/css';
|
|
54
|
+
case '.txt': return 'text/plain; charset=utf-8';
|
|
55
|
+
default: return 'application/octet-stream';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const FORBIDDEN_ASSET_EXTENSIONS = new Set(['.html', '.htm', '.xhtml', '.js', '.mjs', '.cjs', '.ts', '.tsx', '.css']);
|
|
59
|
+
/** The offending extension when a path names browser code/markup — refused as an asset
|
|
60
|
+
* everywhere (the hosted PUT and the local `/assets/` route alike): a bulb's code and
|
|
61
|
+
* markup live in the bulb; assets are media and data (TB-Assets-Push.md Invariant 9).
|
|
62
|
+
* `undefined` for everything else — media, data, and unknown extensions all serve. */
|
|
63
|
+
export function forbiddenAssetExt(relpath) {
|
|
64
|
+
const ext = extOf(relpath);
|
|
65
|
+
return ext !== undefined && FORBIDDEN_ASSET_EXTENSIONS.has(ext) ? ext : undefined;
|
|
66
|
+
}
|
|
18
67
|
const DEFAULT_DESCRIPTION = 'A Typebulb bulb.';
|
|
19
68
|
/** Strip inline markdown (links, emphasis, code, headings) for plain-text contexts like meta descriptions. */
|
|
20
69
|
export function stripMarkdown(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../format/src/config.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAe/F,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,CAAA;IAC7B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC;AAED,wFAAwF;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAEjE;+FAC+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,IAAY,EAAE,EAAE,CACjE,GAAG,oBAAoB,MAAM,kBAAkB,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAA;AAE1F,MAAM,mBAAmB,GAA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