@burdenoff/fe-libs 2026.725.3 → 2026.725.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/progress.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAA2B,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEpG,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAE3E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,CAM5E;AAmCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAkB/E;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAU7E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,OAAO,EAAE,MAAM,GACd;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAuBpC;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAyBrD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,mBAAmB,EAAE,EAClC,QAAQ,EAAE,mBAAmB,EAAE,GAC9B,mBAAmB,EAAE,CAavB;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,sBAAsB,EAAE,CAyB7F"}
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/progress.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAA2B,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEpG,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAE3E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,CAM5E;AA8CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAkB/E;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAU7E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,OAAO,EAAE,MAAM,GACd;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAuBpC;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAyBrD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,mBAAmB,EAAE,EAClC,QAAQ,EAAE,mBAAmB,EAAE,GAC9B,mBAAmB,EAAE,CAavB;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,sBAAsB,EAAE,CAyB7F"}
@@ -8,37 +8,43 @@ function t(e) {
8
8
  function n(e) {
9
9
  return e.replace(/[\\[\]]/g, "\\$&").replace(/[\r\n]+/g, " ").trim();
10
10
  }
11
- function r(e, t) {
11
+ var r = /^(?:png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)$/i;
12
+ function i(e, t) {
12
13
  let n = e.trim();
13
- return /^https?:\/\//i.test(n) ? n.replace(/[()\s<>]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`) : t && /^data:image\/[a-z0-9.+-]+;base64,[a-z0-9+/=]*$/i.test(n) ? n : null;
14
+ if (/^https?:\/\//i.test(n)) return n.replace(/[()\s<>]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`);
15
+ if (t) {
16
+ let e = /^data:image\/([a-z0-9.+-]+);base64,[a-z0-9+/=]*$/i.exec(n);
17
+ if (e && r.test(e[1])) return n;
18
+ }
19
+ return null;
14
20
  }
15
- function i(e) {
21
+ function a(e) {
16
22
  let t = [];
17
- for (let i of e ?? []) {
18
- let e = i.type === "image";
19
- if (!e && i.type !== "file") continue;
20
- let a = i.url ?? (i.data && i.mimeType ? `data:${i.mimeType};base64,${i.data}` : void 0);
23
+ for (let r of e ?? []) {
24
+ let e = r.type === "image";
25
+ if (!e && r.type !== "file") continue;
26
+ let a = r.url ?? (r.data && r.mimeType ? `data:${r.mimeType};base64,${r.data}` : void 0);
21
27
  if (!a) continue;
22
- let o = r(a, e);
28
+ let o = i(a, e);
23
29
  if (!o) continue;
24
- let s = n(i.filename ?? (e ? "image" : "file")) || "file";
30
+ let s = n(r.filename ?? (e ? "image" : "file")) || "file";
25
31
  t.push(e ? `![${s}](${o})` : `[${s}](${o})`);
26
32
  }
27
33
  return t;
28
34
  }
29
- function a(e) {
35
+ function o(e) {
30
36
  return (e ?? []).filter((e) => e.type === "tool" && e.tool).map((e) => {
31
37
  let t = e.state?.status ?? "running", n = e.tool ?? "tool";
32
38
  return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
33
39
  });
34
40
  }
35
- function o(n, r) {
36
- let o = n.filter((t) => t.info?.role === "assistant" && e(t) >= r).sort((t, n) => e(t) - e(n));
37
- if (o.length === 0) return {
41
+ function s(n, r) {
42
+ let i = n.filter((t) => t.info?.role === "assistant" && e(t) >= r).sort((t, n) => e(t) - e(n));
43
+ if (i.length === 0) return {
38
44
  content: "Thinking…",
39
45
  done: !1
40
46
  };
41
- let s = o[o.length - 1], c = t(s.parts), l = i(s.parts), u = a(s.parts);
47
+ let s = i[i.length - 1], c = t(s.parts), l = a(s.parts), u = o(s.parts);
42
48
  return {
43
49
  content: [
44
50
  c,
@@ -48,10 +54,10 @@ function o(n, r) {
48
54
  done: !!s.info?.time?.completed && (!!c || l.length > 0 || u.length > 0)
49
55
  };
50
56
  }
51
- function s(e) {
57
+ function c(e) {
52
58
  return e.replace(/(Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/(X-Workspace-Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+\.[A-Za-z0-9._-]+\b/g, "[REDACTED_JWT]").replace(/\bsk-ant-[A-Za-z0-9-]+\b/g, "[REDACTED_API_KEY]");
53
59
  }
54
- function c(e) {
60
+ function l(e) {
55
61
  let t = e instanceof Error ? e.message.toLowerCase() : String(e).toLowerCase();
56
62
  return t.includes("rate limit exceeded") || t.includes("unauthorized") || t.includes("k8s api error 401") ? !1 : [
57
63
  "sandbox not found",
@@ -69,7 +75,7 @@ function c(e) {
69
75
  "proxy error: 503"
70
76
  ].some((e) => t.includes(e));
71
77
  }
72
- function l(t, n) {
78
+ function u(t, n) {
73
79
  let r = /* @__PURE__ */ new Map();
74
80
  for (let e of t) {
75
81
  let t = e.info?.id;
@@ -81,14 +87,14 @@ function l(t, n) {
81
87
  }
82
88
  return Array.from(r.values()).sort((t, n) => e(t) - e(n));
83
89
  }
84
- function u(n) {
90
+ function d(n) {
85
91
  let r = [];
86
- for (let a of n) {
87
- let n = a.info?.role;
92
+ for (let i of n) {
93
+ let n = i.info?.role;
88
94
  if (n !== "user" && n !== "assistant") continue;
89
- let o = a.parts, s = t(o), c = [s, ...i(o)].filter(Boolean).join("\n\n");
95
+ let o = i.parts, s = t(o), c = [s, ...a(o)].filter(Boolean).join("\n\n");
90
96
  c && (n === "user" && (s.startsWith("[Context file:") || s.startsWith("User's current context:")) || r.push({
91
- id: a.info?.id ?? `${n}-${e(a)}`,
97
+ id: i.info?.id ?? `${n}-${e(i)}`,
92
98
  role: n,
93
99
  content: c
94
100
  }));
@@ -96,4 +102,4 @@ function u(n) {
96
102
  return r;
97
103
  }
98
104
  //#endregion
99
- export { o as buildProgress, i as getAssistantMedia, c as isRecoverable, u as mapSessionToHistory, l as mergeMessagesById, s as sanitize };
105
+ export { s as buildProgress, a as getAssistantMedia, l as isRecoverable, d as mapSessionToHistory, u as mergeMessagesById, c as sanitize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.725.3",
3
+ "version": "2026.725.4",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {