@westonkd/sprint 0.1.3 → 0.3.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/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as l, jsxs as C, Fragment as Le } from "react/jsx-runtime";
2
- import { useContext as ne, createContext as $e, Fragment as Se, isValidElement as Rt, useRef as m, useEffect as _, useState as J, useCallback as B, useLayoutEffect as Lt, useId as le, useMemo as ee, Children as Ye } from "react";
3
- import { flushSync as $t } from "react-dom";
4
- const Q = "data-sprint", oe = "data-sprint-part", pe = "data-sprint-", ce = "data-sprint-tool", Je = "data-sprint-owner", Qe = "data-sprint-agent", Ot = "data-sprint-view", Dt = "data-sprint-view-copy", Et = "data-sprint-theme", Oe = "data-sprint-region", Mt = [
1
+ import { jsx as s, jsxs as A, Fragment as Re } from "react/jsx-runtime";
2
+ import { useContext as ne, createContext as Oe, Fragment as Se, isValidElement as Et, useRef as m, useEffect as j, useState as Y, useCallback as B, useLayoutEffect as Mt, useId as le, useMemo as ee, Children as Je } from "react";
3
+ import { flushSync as It } from "react-dom";
4
+ const Q = "data-sprint", ae = "data-sprint-part", pe = "data-sprint-", ce = "data-sprint-tool", Qe = "data-sprint-owner", Ze = "data-sprint-agent", qt = "data-sprint-view", Ut = "data-sprint-view-copy", Wt = "data-sprint-theme", $e = "data-sprint-region", Bt = [
5
5
  "part",
6
6
  "tool",
7
7
  "owner",
@@ -12,204 +12,204 @@ const Q = "data-sprint", oe = "data-sprint-part", pe = "data-sprint-", ce = "dat
12
12
  "region",
13
13
  "ornament"
14
14
  ];
15
- function Ze(e, t = {}) {
15
+ function et(e, t = {}) {
16
16
  const n = {
17
17
  [Q]: e
18
18
  };
19
- t.part && (n[oe] = t.part);
20
- for (const [o, a] of Object.entries(t.state ?? {}))
21
- a == null || a === !1 || (n[`${pe}${o}`] = a === !0 ? "" : String(a));
19
+ t.part && (n[ae] = t.part);
20
+ for (const [a, o] of Object.entries(t.state ?? {}))
21
+ o == null || o === !1 || (n[`${pe}${a}`] = o === !0 ? "" : String(o));
22
22
  return n;
23
23
  }
24
- function ao(e, t) {
24
+ function ya(e, t) {
25
25
  const n = `[${Q}="${e}"]`;
26
- return t ? `${n} [${oe}="${t}"]` : n;
26
+ return t ? `${n} [${ae}="${t}"]` : n;
27
27
  }
28
28
  const xe = `
29
29
  … truncated`;
30
- function Ne(e, t) {
30
+ function Pe(e, t) {
31
31
  if (e.length <= t) return e;
32
32
  if (t <= xe.length) return e.slice(0, t);
33
- const n = t - xe.length, o = e.slice(0, n), a = o.lastIndexOf(`
33
+ const n = t - xe.length, a = e.slice(0, n), o = a.lastIndexOf(`
34
34
  `);
35
- return `${a > n / 2 ? o.slice(0, a) : o.trimEnd()}${xe}`;
35
+ return `${o > n / 2 ? a.slice(0, o) : a.trimEnd()}${xe}`;
36
36
  }
37
- function et(e, t) {
37
+ function tt(e, t) {
38
38
  if (t <= 0) return [e];
39
39
  const n = e.split(`
40
- `), o = [];
41
- let a = "";
42
- for (const r of n) {
43
- const s = a === "" ? r : `${a}
44
- ${r}`;
45
- if (s.length <= t) {
46
- a = s;
40
+ `), a = [];
41
+ let o = "";
42
+ for (const i of n) {
43
+ const l = o === "" ? i : `${o}
44
+ ${i}`;
45
+ if (l.length <= t) {
46
+ o = l;
47
47
  continue;
48
48
  }
49
- if (a !== "" && o.push(a), a = r.length <= t ? r : "", r.length > t)
50
- for (let i = 0; i < r.length; i += t)
51
- o.push(r.slice(i, i + t));
49
+ if (o !== "" && a.push(o), o = i.length <= t ? i : "", i.length > t)
50
+ for (let r = 0; r < i.length; r += t)
51
+ a.push(i.slice(r, r + t));
52
52
  }
53
- return a !== "" && o.push(a), o.length === 0 ? [""] : o;
53
+ return o !== "" && a.push(o), a.length === 0 ? [""] : a;
54
54
  }
55
- const te = 1500, qe = 500, Ue = 150;
56
- function tt() {
55
+ const te = 1500, Ie = 500, qe = 150;
56
+ function nt() {
57
57
  return typeof document > "u" ? null : document.modelContext ?? null;
58
58
  }
59
- function ro() {
60
- return tt() !== null;
59
+ function ka() {
60
+ return nt() !== null;
61
61
  }
62
- function qt(e) {
63
- if (e.description.length > qe)
62
+ function _t(e) {
63
+ if (e.description.length > Ie)
64
64
  throw new Error(
65
- `Tool "${e.name}" description is ${e.description.length} characters; the platform limit is ${qe}.`
65
+ `Tool "${e.name}" description is ${e.description.length} characters; the platform limit is ${Ie}.`
66
66
  );
67
67
  for (const [t, n] of Object.entries(e.inputSchema.properties)) {
68
- const o = n.description ?? "";
69
- if (o.length > Ue)
68
+ const a = n.description ?? "";
69
+ if (a.length > qe)
70
70
  throw new Error(
71
- `Tool "${e.name}" parameter "${t}" description is ${o.length} characters; the platform limit is ${Ue}.`
71
+ `Tool "${e.name}" parameter "${t}" description is ${a.length} characters; the platform limit is ${qe}.`
72
72
  );
73
73
  }
74
74
  }
75
- function Ut(e, t) {
75
+ function jt(e, t) {
76
76
  for (const n of e.required ?? [])
77
77
  if (t[n] === void 0) {
78
- const o = Object.keys(e.properties).join(", ");
79
- return `Missing required parameter "${n}". Expected parameters: ${o || "none"}.`;
78
+ const a = Object.keys(e.properties).join(", ");
79
+ return `Missing required parameter "${n}". Expected parameters: ${a || "none"}.`;
80
80
  }
81
- for (const [n, o] of Object.entries(t)) {
82
- if (o === void 0) continue;
83
- const a = e.properties[n];
84
- if (a === void 0) {
81
+ for (const [n, a] of Object.entries(t)) {
82
+ if (a === void 0) continue;
83
+ const o = e.properties[n];
84
+ if (o === void 0) {
85
85
  const d = Object.keys(e.properties).join(", ");
86
86
  return `Unknown parameter "${n}". Expected parameters: ${d || "none"}.`;
87
87
  }
88
- const r = typeof o, s = a.type === "number" || a.type === "integer";
89
- if (!(a.type === "string" && r === "string" || s && r === "number" || a.type === "boolean" && r === "boolean"))
90
- return `Parameter "${n}" must be a ${a.type}, received ${r}.`;
91
- if (a.enum !== void 0 && !a.enum.includes(String(o)))
92
- return `Parameter "${n}" must be one of: ${a.enum.join(", ")}.`;
88
+ const i = typeof a, l = o.type === "number" || o.type === "integer";
89
+ if (!(o.type === "string" && i === "string" || l && i === "number" || o.type === "boolean" && i === "boolean"))
90
+ return `Parameter "${n}" must be a ${o.type}, received ${i}.`;
91
+ if (o.enum !== void 0 && !o.enum.includes(String(a)))
92
+ return `Parameter "${n}" must be one of: ${o.enum.join(", ")}.`;
93
93
  }
94
94
  return null;
95
95
  }
96
- function It(e) {
97
- return { ...e, execute: async (n, o) => {
98
- const a = Ut(e.inputSchema, n ?? {});
99
- if (a !== null) return a;
96
+ function Vt(e) {
97
+ return { ...e, execute: async (n, a) => {
98
+ const o = jt(e.inputSchema, n ?? {});
99
+ if (o !== null) return o;
100
100
  try {
101
- const r = await e.execute(n ?? {}, o);
102
- return r === null ? null : Ne(r, te);
103
- } catch (r) {
104
- const s = r instanceof Error ? r.message : String(r);
105
- return Ne(`Tool "${e.name}" failed: ${s}`, te);
101
+ const i = await e.execute(n ?? {}, a);
102
+ return i === null ? null : Pe(i, te);
103
+ } catch (i) {
104
+ const l = i instanceof Error ? i.message : String(i);
105
+ return Pe(`Tool "${e.name}" failed: ${l}`, te);
106
106
  }
107
107
  } };
108
108
  }
109
- function Wt(e, t) {
110
- qt(e);
111
- const n = tt();
109
+ function Ft(e, t) {
110
+ _t(e);
111
+ const n = nt();
112
112
  if (n === null || t.aborted) return !1;
113
- const o = n.registerTool(It(e), { signal: t });
114
- return o instanceof Promise && o.catch((a) => {
115
- console.warn(`Sprint could not register tool "${e.name}"`, a);
113
+ const a = n.registerTool(Vt(e), { signal: t });
114
+ return a instanceof Promise && a.catch((o) => {
115
+ console.warn(`Sprint could not register tool "${e.name}"`, o);
116
116
  }), !0;
117
117
  }
118
- const Bt = "<scope>-<verb>-<label-slug>", ge = /* @__PURE__ */ new Map();
119
- function q(e) {
118
+ const Ht = "<scope>-<verb>-<label-slug>", ge = /* @__PURE__ */ new Map();
119
+ function I(e) {
120
120
  const t = ge.get(e.name);
121
121
  return t !== void 0 && t !== e && console.warn(
122
122
  `Agent metadata for "${e.name}" was replaced. Two components sharing a name will collapse into one manifest entry.`
123
123
  ), ge.set(e.name, e), e;
124
124
  }
125
- function jt(e) {
125
+ function Gt(e) {
126
126
  return ge.get(e);
127
127
  }
128
- function _t() {
128
+ function Kt() {
129
129
  return [...ge.values()].sort((e, t) => e.name.localeCompare(t.name));
130
130
  }
131
- function io(e) {
131
+ function Ta(e) {
132
132
  return {
133
133
  library: "sprint",
134
134
  version: e,
135
135
  conventions: {
136
136
  componentAttribute: Q,
137
- partAttribute: oe,
137
+ partAttribute: ae,
138
138
  stateAttributePrefix: pe,
139
139
  toolAttribute: ce,
140
- ownerAttribute: Je,
141
- regionAttribute: Oe,
140
+ ownerAttribute: Qe,
141
+ regionAttribute: $e,
142
142
  agentViewFormat: "markdown",
143
- toolNaming: Bt,
143
+ toolNaming: Ht,
144
144
  toolOutputLimit: te
145
145
  },
146
- components: _t()
146
+ components: Kt()
147
147
  };
148
148
  }
149
- function Vt(e) {
149
+ function zt(e) {
150
150
  return e.label === void 0 && e.parts.length === 0 && e.children.length === 0;
151
151
  }
152
- function nt(e) {
152
+ function at(e) {
153
153
  let t = 0;
154
154
  for (const n of e)
155
- t += 1 + nt(n.children);
155
+ t += 1 + at(n.children);
156
156
  return t;
157
157
  }
158
158
  function ot(e) {
159
159
  const t = Object.keys(e).sort();
160
- return t.length === 0 ? "" : ` [${t.map((o) => {
161
- const a = e[o];
162
- return a === !0 ? o : `${o}=${a}`;
160
+ return t.length === 0 ? "" : ` [${t.map((a) => {
161
+ const o = e[a];
162
+ return o === !0 ? a : `${a}=${o}`;
163
163
  }).join(", ")}]`;
164
164
  }
165
- function at(e) {
165
+ function it(e) {
166
166
  return e === void 0 ? "" : ` "${e}"`;
167
167
  }
168
168
  function rt(e) {
169
169
  return e === void 0 ? "" : ` → tool \`${e}\``;
170
170
  }
171
- function Ft(e, t) {
172
- return `${t}- part \`${e.part}\`${at(e.label)}${ot(
171
+ function Xt(e, t) {
172
+ return `${t}- part \`${e.part}\`${it(e.label)}${ot(
173
173
  e.state
174
174
  )}${rt(e.tool)}`;
175
175
  }
176
- function Ht(e) {
177
- const t = Vt(e) ? " (empty)" : "", n = e.owner === void 0 ? "" : ` (owned by \`${e.owner}\`)`;
178
- return `- **${e.component}**${at(e.label)}${ot(
176
+ function Yt(e) {
177
+ const t = zt(e) ? " (empty)" : "", n = e.owner === void 0 ? "" : ` (owned by \`${e.owner}\`)`;
178
+ return `- **${e.component}**${it(e.label)}${ot(
179
179
  e.state
180
180
  )}${rt(e.tool)}${n}${t}`;
181
181
  }
182
- function it(e, t, n) {
183
- const o = [`${t}${Ht(e)}`], a = `${t} `;
182
+ function st(e, t, n) {
183
+ const a = [`${t}${Yt(e)}`], o = `${t} `;
184
184
  if (n.includeSummary && e.summary !== void 0)
185
- for (const r of e.summary.split(`
185
+ for (const i of e.summary.split(`
186
186
  `))
187
- o.push(`${a}${r}`);
188
- for (const r of e.parts)
189
- o.push(Ft(r, a));
190
- for (const r of e.children)
191
- o.push(...it(r, a, n));
192
- return e.truncated && o.push(`${a}- … nested components omitted, depth limit reached`), o;
187
+ a.push(`${o}${i}`);
188
+ for (const i of e.parts)
189
+ a.push(Xt(i, o));
190
+ for (const i of e.children)
191
+ a.push(...st(i, o, n));
192
+ return e.truncated && a.push(`${o}- … nested components omitted, depth limit reached`), a;
193
193
  }
194
- function Gt(e, t = {}) {
195
- const n = Array.isArray(e) ? e : [e], o = {
194
+ function Jt(e, t = {}) {
195
+ const n = Array.isArray(e) ? e : [e], a = {
196
196
  includeSummary: t.includeSummary ?? !0
197
197
  };
198
- return n.length === 0 ? "No Sprint components found." : n.flatMap((a) => it(a, "", o)).join(`
198
+ return n.length === 0 ? "No Sprint components found." : n.flatMap((o) => st(o, "", a)).join(`
199
199
  `);
200
200
  }
201
- const st = (e) => Gt(e), de = $e({
201
+ const lt = (e) => Jt(e), de = Oe({
202
202
  view: "human",
203
203
  setView: () => {
204
204
  },
205
205
  controls: "always",
206
- format: st,
206
+ format: lt,
207
207
  owned: !1
208
- }), Kt = de.Provider;
209
- function U() {
208
+ }), Qt = de.Provider;
209
+ function q() {
210
210
  return ne(de).view;
211
211
  }
212
- function zt() {
212
+ function Zt() {
213
213
  return ne(de);
214
214
  }
215
215
  function G() {
@@ -218,14 +218,14 @@ function G() {
218
218
  function H() {
219
219
  return ne(de).format;
220
220
  }
221
- const lt = $e(0), fe = lt.Provider;
221
+ const ct = Oe(0), fe = ct.Provider;
222
222
  function be() {
223
- return ne(lt);
223
+ return ne(ct);
224
224
  }
225
- function $(e) {
225
+ function R(e) {
226
226
  const t = {};
227
- for (const [n, o] of Object.entries(e.state ?? {}))
228
- o === !1 || o === null || o === void 0 || (t[n] = o);
227
+ for (const [n, a] of Object.entries(e.state ?? {}))
228
+ a === !1 || a === null || a === void 0 || (t[n] = a);
229
229
  return {
230
230
  component: e.component,
231
231
  state: t,
@@ -239,7 +239,7 @@ function $(e) {
239
239
  };
240
240
  }
241
241
  function M(e) {
242
- return Ze(e.component, {
242
+ return et(e.component, {
243
243
  state: {
244
244
  ...e.state,
245
245
  tool: e.tool,
@@ -248,19 +248,19 @@ function M(e) {
248
248
  }
249
249
  });
250
250
  }
251
- function ct(e) {
252
- const t = { [Qe]: e.component };
251
+ function dt(e) {
252
+ const t = { [Ze]: e.component };
253
253
  return e.tool !== void 0 && (t[ce] = e.tool), t;
254
254
  }
255
- function Xt(e, t) {
255
+ function en(e, t) {
256
256
  const n = {
257
- [Qe]: e,
258
- [oe]: t.part
257
+ [Ze]: e,
258
+ [ae]: t.part
259
259
  };
260
260
  return t.tool !== void 0 && (n[ce] = t.tool), n;
261
261
  }
262
262
  function L(e) {
263
- const { [Q]: t, ...n } = Ze("", {
263
+ const { [Q]: t, ...n } = et("", {
264
264
  part: e.part,
265
265
  state: { ...e.state, tool: e.tool }
266
266
  });
@@ -270,31 +270,31 @@ function ve(e, t) {
270
270
  return t([e]).split(`
271
271
  `);
272
272
  }
273
- function I(e) {
274
- const { node: t, children: n } = e, o = be(), a = H(), r = " ".repeat(o), s = ve(t, a).map((i) => `${r}${i}`);
275
- return /* @__PURE__ */ C(fe, { value: o + 1, children: [
276
- `${s.join(`
273
+ function U(e) {
274
+ const { node: t, children: n } = e, a = be(), o = H(), i = " ".repeat(a), l = ve(t, o).map((r) => `${i}${r}`);
275
+ return /* @__PURE__ */ A(fe, { value: a + 1, children: [
276
+ `${l.join(`
277
277
  `)}
278
278
  `,
279
279
  n
280
280
  ] });
281
281
  }
282
282
  function we(e) {
283
- const { node: t, onActivate: n, isActionable: o, children: a } = e, r = be(), s = H(), i = " ".repeat(r), d = ve(t, s), c = d.length - t.parts.length, p = d.slice(0, c).map((u) => `${i}${u}`);
284
- return /* @__PURE__ */ C(fe, { value: r + 1, children: [
283
+ const { node: t, onActivate: n, isActionable: a, children: o } = e, i = be(), l = H(), r = " ".repeat(i), d = ve(t, l), c = d.length - t.parts.length, p = d.slice(0, c).map((u) => `${r}${u}`);
284
+ return /* @__PURE__ */ A(fe, { value: i + 1, children: [
285
285
  `${p.join(`
286
286
  `)}
287
287
  `,
288
288
  t.parts.map((u, g) => {
289
- const h = d[c + g] ?? "", y = h.trimStart(), f = `${i}${h.slice(0, h.length - y.length)}`, b = `${u.part}-${u.label ?? g}`;
290
- return o !== void 0 && !o(u, g) ? /* @__PURE__ */ l(Se, { children: `${f}${y}
291
- ` }, b) : /* @__PURE__ */ C(Se, { children: [
289
+ const h = d[c + g] ?? "", y = h.trimStart(), f = `${r}${h.slice(0, h.length - y.length)}`, b = `${u.part}-${u.label ?? g}`;
290
+ return a !== void 0 && !a(u, g) ? /* @__PURE__ */ s(Se, { children: `${f}${y}
291
+ ` }, b) : /* @__PURE__ */ A(Se, { children: [
292
292
  f,
293
- /* @__PURE__ */ l(
293
+ /* @__PURE__ */ s(
294
294
  "button",
295
295
  {
296
296
  type: "button",
297
- ...Xt(t.component, u),
297
+ ...en(t.component, u),
298
298
  onClick: () => n(u, g),
299
299
  children: y
300
300
  }
@@ -303,31 +303,31 @@ function we(e) {
303
303
  `
304
304
  ] }, b);
305
305
  }),
306
- a
306
+ o
307
307
  ] });
308
308
  }
309
- function dt(e) {
310
- const { node: t, value: n, onValueChange: o, multiline: a = !1, masked: r = !1, ref: s } = e, i = be(), d = H(), c = " ".repeat(i), p = ve(t, d).map((h) => `${c}${h}`), u = ct(t), g = a ? /* @__PURE__ */ l(
309
+ function ut(e) {
310
+ const { node: t, value: n, onValueChange: a, multiline: o = !1, masked: i = !1, ref: l } = e, r = be(), d = H(), c = " ".repeat(r), p = ve(t, d).map((h) => `${c}${h}`), u = dt(t), g = o ? /* @__PURE__ */ s(
311
311
  "textarea",
312
312
  {
313
313
  ...u,
314
314
  "aria-label": t.label,
315
315
  value: n,
316
- onChange: (h) => o(h.currentTarget.value),
317
- ref: s
316
+ onChange: (h) => a(h.currentTarget.value),
317
+ ref: l
318
318
  }
319
- ) : /* @__PURE__ */ l(
319
+ ) : /* @__PURE__ */ s(
320
320
  "input",
321
321
  {
322
322
  ...u,
323
323
  "aria-label": t.label,
324
- type: r ? "password" : "text",
324
+ type: i ? "password" : "text",
325
325
  value: n,
326
- onChange: (h) => o(h.currentTarget.value),
327
- ref: s
326
+ onChange: (h) => a(h.currentTarget.value),
327
+ ref: l
328
328
  }
329
329
  );
330
- return /* @__PURE__ */ C(fe, { value: i + 1, children: [
330
+ return /* @__PURE__ */ A(fe, { value: r + 1, children: [
331
331
  `${p.join(`
332
332
  `)}
333
333
  `,
@@ -338,25 +338,25 @@ function dt(e) {
338
338
  ] });
339
339
  }
340
340
  function ue(e) {
341
- const { node: t, as: n = "button", href: o, children: a, ref: r, ...s } = e, i = be(), d = H(), c = " ".repeat(i), [p = "", ...u] = ve(t, d), g = u.map((f) => `${c}${f}`), h = ct(t), y = n === "a" ? /* @__PURE__ */ l(
341
+ const { node: t, as: n = "button", href: a, children: o, ref: i, ...l } = e, r = be(), d = H(), c = " ".repeat(r), [p = "", ...u] = ve(t, d), g = u.map((f) => `${c}${f}`), h = dt(t), y = n === "a" ? /* @__PURE__ */ s(
342
342
  "a",
343
343
  {
344
- ...s,
344
+ ...l,
345
345
  ...h,
346
- href: o ?? "#",
347
- ref: r,
346
+ href: a ?? "#",
347
+ ref: i,
348
348
  children: p
349
349
  }
350
- ) : /* @__PURE__ */ l(
350
+ ) : /* @__PURE__ */ s(
351
351
  "button",
352
352
  {
353
- ...s,
353
+ ...l,
354
354
  ...h,
355
- ref: r,
355
+ ref: i,
356
356
  children: p
357
357
  }
358
358
  );
359
- return /* @__PURE__ */ C(fe, { value: i + 1, children: [
359
+ return /* @__PURE__ */ A(fe, { value: r + 1, children: [
360
360
  c,
361
361
  y,
362
362
  g.length === 0 ? `
@@ -364,105 +364,105 @@ function ue(e) {
364
364
  ${g.join(`
365
365
  `)}
366
366
  `,
367
- a
367
+ o
368
368
  ] });
369
369
  }
370
- function Yt(e) {
370
+ function tn(e) {
371
371
  return e.part === "cell" && typeof e.state.column == "string" && typeof e.state.row == "string";
372
372
  }
373
373
  function Ae(e) {
374
374
  return e.replace(/\|/g, "\\|").replace(/\s*\n\s*/g, " ");
375
375
  }
376
- function Ie(e, t) {
376
+ function Ue(e, t) {
377
377
  return JSON.stringify([e, t]);
378
378
  }
379
- function ut(e) {
380
- if (e.parts.length === 0 || !e.parts.every(Yt)) return e;
381
- const t = [], n = [], o = /* @__PURE__ */ new Map();
382
- for (const r of e.parts) {
383
- const s = String(r.state.column), i = String(r.state.row);
384
- t.includes(s) || t.push(s), n.includes(i) || n.push(i), o.set(Ie(i, s), r.label ?? "");
379
+ function ht(e) {
380
+ if (e.parts.length === 0 || !e.parts.every(tn)) return e;
381
+ const t = [], n = [], a = /* @__PURE__ */ new Map();
382
+ for (const i of e.parts) {
383
+ const l = String(i.state.column), r = String(i.state.row);
384
+ t.includes(l) || t.push(l), n.includes(r) || n.push(r), a.set(Ue(r, l), i.label ?? "");
385
385
  }
386
- const a = [
386
+ const o = [
387
387
  `| row | ${t.map(Ae).join(" | ")} |`,
388
388
  `| --- | ${t.map(() => "---").join(" | ")} |`,
389
389
  ...n.map(
390
- (r) => `| ${Ae(r)} | ${t.map((s) => Ae(o.get(Ie(r, s)) ?? "")).join(" | ")} |`
390
+ (i) => `| ${Ae(i)} | ${t.map((l) => Ae(a.get(Ue(i, l)) ?? "")).join(" | ")} |`
391
391
  )
392
392
  ].join(`
393
393
  `);
394
- return { ...e, parts: [], summary: a };
394
+ return { ...e, parts: [], summary: o };
395
395
  }
396
396
  function he(e) {
397
397
  return e.replace(/\s+/g, " ").trim();
398
398
  }
399
- function Pe(e, t) {
399
+ function Ne(e, t) {
400
400
  if (e == null || typeof e == "boolean") return;
401
401
  if (typeof e == "string" || typeof e == "number") {
402
402
  t.push(String(e));
403
403
  return;
404
404
  }
405
405
  if (Array.isArray(e)) {
406
- for (const o of e) Pe(o, t);
406
+ for (const a of e) Ne(a, t);
407
407
  return;
408
408
  }
409
- if (!Rt(e)) return;
409
+ if (!Et(e)) return;
410
410
  const n = e.props;
411
411
  if (!(n["aria-hidden"] === !0 || n["aria-hidden"] === "true")) {
412
412
  if (typeof n["aria-label"] == "string") {
413
413
  t.push(n["aria-label"]);
414
414
  return;
415
415
  }
416
- Pe(n.children, t);
416
+ Ne(n.children, t);
417
417
  }
418
418
  }
419
419
  function F(e) {
420
420
  const t = [];
421
- Pe(e, t);
421
+ Ne(e, t);
422
422
  const n = he(t.join(""));
423
423
  return n === "" ? void 0 : n;
424
424
  }
425
- function Jt(e) {
425
+ function nn(e) {
426
426
  return e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden");
427
427
  }
428
- function ht(e, t, n) {
428
+ function pt(e, t, n) {
429
429
  if (e.nodeType === Node.TEXT_NODE) {
430
430
  t.push(e.nodeValue ?? "");
431
431
  return;
432
432
  }
433
433
  if (e.nodeType !== Node.ELEMENT_NODE) return;
434
- const o = e;
435
- if (Jt(o) || n > 0 && o.hasAttribute(Q)) return;
436
- const a = o.getAttribute("aria-label");
437
- if (n > 0 && a !== null) {
438
- t.push(a);
434
+ const a = e;
435
+ if (nn(a) || n > 0 && a.hasAttribute(Q)) return;
436
+ const o = a.getAttribute("aria-label");
437
+ if (n > 0 && o !== null) {
438
+ t.push(o);
439
439
  return;
440
440
  }
441
- for (const r of Array.from(o.childNodes))
442
- ht(r, t, n + 1);
441
+ for (const i of Array.from(a.childNodes))
442
+ pt(i, t, n + 1);
443
443
  }
444
444
  function ye(e) {
445
445
  const t = e.getAttribute("aria-label");
446
446
  if (t !== null) {
447
- const r = he(t);
448
- return r === "" ? void 0 : r;
447
+ const i = he(t);
448
+ return i === "" ? void 0 : i;
449
449
  }
450
450
  const n = e.getAttribute("aria-labelledby");
451
451
  if (n !== null) {
452
- const r = e.ownerDocument, s = n.split(/\s+/).filter((i) => i !== "").map((i) => r.getElementById(i)).filter((i) => i !== null).map((i) => ye(i) ?? "").filter((i) => i !== "");
453
- if (s.length > 0) return he(s.join(" "));
452
+ const i = e.ownerDocument, l = n.split(/\s+/).filter((r) => r !== "").map((r) => i.getElementById(r)).filter((r) => r !== null).map((r) => ye(r) ?? "").filter((r) => r !== "");
453
+ if (l.length > 0) return he(l.join(" "));
454
454
  }
455
- const o = [];
456
- ht(e, o, 0);
457
- const a = he(o.join(""));
458
- return a === "" ? void 0 : a;
455
+ const a = [];
456
+ pt(e, a, 0);
457
+ const o = he(a.join(""));
458
+ return o === "" ? void 0 : o;
459
459
  }
460
- const Qt = new Set(Mt), Zt = /* @__PURE__ */ new Map([
460
+ const an = new Set(Bt), on = /* @__PURE__ */ new Map([
461
461
  ["disabled", "disabled"],
462
462
  ["open", "open"],
463
463
  ["readonly", "readonly"],
464
464
  ["required", "required"]
465
- ]), en = /* @__PURE__ */ new Map([
465
+ ]), rn = /* @__PURE__ */ new Map([
466
466
  ["aria-disabled", "disabled"],
467
467
  ["aria-busy", "loading"],
468
468
  ["aria-expanded", "expanded"],
@@ -471,93 +471,93 @@ const Qt = new Set(Mt), Zt = /* @__PURE__ */ new Map([
471
471
  ["aria-pressed", "pressed"],
472
472
  ["aria-invalid", "invalid"]
473
473
  ]);
474
- function pt(e) {
474
+ function gt(e) {
475
475
  const t = {};
476
- for (const [n, o] of en) {
477
- const a = e.getAttribute(n);
478
- a === null || a === "false" || (t[o] = a === "true" || a === "" ? !0 : a);
476
+ for (const [n, a] of rn) {
477
+ const o = e.getAttribute(n);
478
+ o === null || o === "false" || (t[a] = o === "true" || o === "" ? !0 : o);
479
479
  }
480
- for (const [n, o] of Zt)
481
- e.hasAttribute(n) && (t[o] = !0);
480
+ for (const [n, a] of on)
481
+ e.hasAttribute(n) && (t[a] = !0);
482
482
  for (const n of Array.from(e.attributes)) {
483
483
  if (!n.name.startsWith(pe)) continue;
484
- const o = n.name.slice(pe.length);
485
- o === "" || Qt.has(o) || (t[o] = n.value === "" ? !0 : n.value);
484
+ const a = n.name.slice(pe.length);
485
+ a === "" || an.has(a) || (t[a] = n.value === "" ? !0 : n.value);
486
486
  }
487
487
  return t;
488
488
  }
489
- function tn(e) {
490
- const t = [], n = [], o = (a) => {
491
- for (const r of Array.from(a.children)) {
492
- if (r.hasAttribute(Q)) {
493
- n.push(r);
489
+ function sn(e) {
490
+ const t = [], n = [], a = (o) => {
491
+ for (const i of Array.from(o.children)) {
492
+ if (i.hasAttribute(Q)) {
493
+ n.push(i);
494
494
  continue;
495
495
  }
496
- r.hasAttribute(oe) && t.push(r), o(r);
496
+ i.hasAttribute(ae) && t.push(i), a(i);
497
497
  }
498
498
  };
499
- return o(e), { parts: t, children: n };
499
+ return a(e), { parts: t, children: n };
500
500
  }
501
- function nn(e) {
502
- const t = e.getAttribute(oe) ?? "", n = ye(e), o = e.getAttribute(ce);
501
+ function ln(e) {
502
+ const t = e.getAttribute(ae) ?? "", n = ye(e), a = e.getAttribute(ce);
503
503
  return {
504
504
  part: t,
505
- state: pt(e),
505
+ state: gt(e),
506
506
  ...n === void 0 ? {} : { label: n },
507
- ...o === null || o === "" ? {} : { tool: o }
507
+ ...a === null || a === "" ? {} : { tool: a }
508
508
  };
509
509
  }
510
510
  function De(e, t = {}) {
511
511
  const n = e.getAttribute(Q);
512
512
  if (n === null) return null;
513
- const o = t.maxDepth ?? 8, a = t.lookupMeta ?? jt, { parts: r, children: s } = tn(e), i = ye(e), d = a(n)?.summary, c = e.getAttribute(ce), p = e.getAttribute(Je), u = o <= 0 && s.length > 0;
514
- return ut({
513
+ const a = t.maxDepth ?? 8, o = t.lookupMeta ?? Gt, { parts: i, children: l } = sn(e), r = ye(e), d = o(n)?.summary, c = e.getAttribute(ce), p = e.getAttribute(Qe), u = a <= 0 && l.length > 0;
514
+ return ht({
515
515
  component: n,
516
- state: pt(e),
517
- parts: r.map(nn),
518
- children: u ? [] : s.map(
519
- (g) => De(g, { ...t, maxDepth: o - 1 })
516
+ state: gt(e),
517
+ parts: i.map(ln),
518
+ children: u ? [] : l.map(
519
+ (g) => De(g, { ...t, maxDepth: a - 1 })
520
520
  ).filter((g) => g !== null),
521
521
  ...d === void 0 ? {} : { summary: d },
522
- ...i === void 0 ? {} : { label: i },
522
+ ...r === void 0 ? {} : { label: r },
523
523
  ...c === null || c === "" ? {} : { tool: c },
524
524
  ...p === null || p === "" ? {} : { owner: p },
525
- ...e.hasAttribute(Oe) ? { region: !0 } : {},
525
+ ...e.hasAttribute($e) ? { region: !0 } : {},
526
526
  ...u ? { truncated: !0 } : {}
527
527
  });
528
528
  }
529
- function gt(e) {
530
- const t = [], n = (o) => {
531
- for (const a of Array.from(o.children)) {
532
- if (a.hasAttribute(Q)) {
533
- t.push(a);
529
+ function mt(e) {
530
+ const t = [], n = (a) => {
531
+ for (const o of Array.from(a.children)) {
532
+ if (o.hasAttribute(Q)) {
533
+ t.push(o);
534
534
  continue;
535
535
  }
536
- n(a);
536
+ n(o);
537
537
  }
538
538
  };
539
539
  return n(e), t;
540
540
  }
541
- function on(e) {
542
- const t = e.filter((r) => r.owner !== void 0);
541
+ function cn(e) {
542
+ const t = e.filter((i) => i.owner !== void 0);
543
543
  if (t.length === 0) return e;
544
- const n = /* @__PURE__ */ new Map(), o = (r) => {
545
- r.tool && n.set(r.tool, r);
546
- for (const s of r.parts)
547
- s.tool && n.set(s.tool, r);
548
- for (const s of r.children) o(s);
544
+ const n = /* @__PURE__ */ new Map(), a = (i) => {
545
+ i.tool && n.set(i.tool, i);
546
+ for (const l of i.parts)
547
+ l.tool && n.set(l.tool, i);
548
+ for (const l of i.children) a(l);
549
549
  };
550
- for (const r of e) o(r);
551
- const a = /* @__PURE__ */ new Set();
552
- for (const r of t) {
553
- const s = r.owner === void 0 ? void 0 : n.get(r.owner);
554
- s === void 0 || s === r || (s.children.push(r), a.add(r));
550
+ for (const i of e) a(i);
551
+ const o = /* @__PURE__ */ new Set();
552
+ for (const i of t) {
553
+ const l = i.owner === void 0 ? void 0 : n.get(i.owner);
554
+ l === void 0 || l === i || (l.children.push(i), o.add(i));
555
555
  }
556
- return e.filter((r) => !a.has(r));
556
+ return e.filter((i) => !o.has(i));
557
557
  }
558
- function an(e, t = {}) {
559
- const n = gt(e).map((o) => De(o, t)).filter((o) => o !== null);
560
- return on(n);
558
+ function dn(e, t = {}) {
559
+ const n = mt(e).map((a) => De(a, t)).filter((a) => a !== null);
560
+ return cn(n);
561
561
  }
562
562
  function K() {
563
563
  return new Promise((e) => {
@@ -575,75 +575,75 @@ function Z(e) {
575
575
  return e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
576
576
  }
577
577
  function We(e, t, n) {
578
- const o = Z(n);
579
- if (o === "") return null;
580
- const a = [Z(t), o].filter((c) => c !== "").join("-"), r = e.map(Z).filter((c) => c !== "");
581
- for (; r.length > 0 && [...r, a].join("-").length > Ce; )
582
- r.shift();
583
- const s = [...r, a].join("-");
584
- if (s.length <= Ce) return s;
585
- const i = s.slice(0, Ce), d = i.lastIndexOf("-");
586
- return d > 0 ? i.slice(0, d) : i;
578
+ const a = Z(n);
579
+ if (a === "") return null;
580
+ const o = [Z(t), a].filter((c) => c !== "").join("-"), i = e.map(Z).filter((c) => c !== "");
581
+ for (; i.length > 0 && [...i, o].join("-").length > Ce; )
582
+ i.shift();
583
+ const l = [...i, o].join("-");
584
+ if (l.length <= Ce) return l;
585
+ const r = l.slice(0, Ce), d = r.lastIndexOf("-");
586
+ return d > 0 ? r.slice(0, d) : r;
587
587
  }
588
588
  const se = /* @__PURE__ */ new Map();
589
- function rn(e) {
589
+ function un(e) {
590
590
  const t = se.get(e);
591
591
  if (t !== void 0) return t;
592
592
  const n = { holders: /* @__PURE__ */ new Set(), listeners: /* @__PURE__ */ new Map() };
593
593
  return se.set(e, n), n;
594
594
  }
595
- function sn(e, t, n) {
596
- const o = rn(e);
597
- o.holders.add(t), o.listeners.set(t, n);
598
- for (const [a, r] of o.listeners)
599
- a !== t && r();
595
+ function hn(e, t, n) {
596
+ const a = un(e);
597
+ a.holders.add(t), a.listeners.set(t, n);
598
+ for (const [o, i] of a.listeners)
599
+ o !== t && i();
600
600
  return () => {
601
- if (o.holders.delete(t), o.listeners.delete(t), o.holders.size === 0) {
601
+ if (a.holders.delete(t), a.listeners.delete(t), a.holders.size === 0) {
602
602
  se.delete(e);
603
603
  return;
604
604
  }
605
- for (const a of o.listeners.values()) a();
605
+ for (const o of a.listeners.values()) o();
606
606
  };
607
607
  }
608
608
  function Be(e, t) {
609
609
  const n = se.get(e);
610
610
  return n === void 0 ? !1 : n.holders.size === 1 && n.holders.has(t);
611
611
  }
612
- function ln(e) {
612
+ function pn(e) {
613
613
  return se.get(e)?.holders.size ?? 0;
614
614
  }
615
- const mt = $e({ path: [] }), me = mt.Provider;
615
+ const ft = Oe({ path: [] }), me = ft.Provider;
616
616
  function ke() {
617
- return ne(mt).path;
617
+ return ne(ft).path;
618
618
  }
619
619
  function V(e) {
620
- const { spec: t, label: n, nameOverride: o, inputSchema: a, enabled: r = !0, execute: s } = e, i = ke(), d = `${t.verb}|${a === void 0 ? "" : JSON.stringify(a)}`, c = m({ key: d, value: a ?? t.inputSchema });
621
- c.current.key !== d && (c.current = { key: d, value: a ?? t.inputSchema });
620
+ const { spec: t, label: n, nameOverride: a, inputSchema: o, enabled: i = !0, execute: l } = e, r = ke(), d = `${t.verb}|${o === void 0 ? "" : JSON.stringify(o)}`, c = m({ key: d, value: o ?? t.inputSchema });
621
+ c.current.key !== d && (c.current = { key: d, value: o ?? t.inputSchema });
622
622
  const p = c.current.value, u = m(null);
623
623
  u.current === null && (u.current = /* @__PURE__ */ Symbol("sprint-tool"));
624
- const g = m(s);
625
- _(() => {
626
- g.current = s;
624
+ const g = m(l);
625
+ j(() => {
626
+ g.current = l;
627
627
  });
628
- const h = o === void 0 ? n === void 0 ? null : We(i, t.verb, n) : We(i, t.verb, o), [y, f] = J(!1);
629
- return _(() => {
628
+ const h = a === void 0 ? n === void 0 ? null : We(r, t.verb, n) : We(r, t.verb, a), [y, f] = Y(!1);
629
+ return j(() => {
630
630
  const b = u.current;
631
- if (h === null || !r || b === null) {
631
+ if (h === null || !i || b === null) {
632
632
  f(!1);
633
633
  return;
634
634
  }
635
- const w = sn(h, b, () => {
635
+ const w = hn(h, b, () => {
636
636
  f(Be(h, b));
637
637
  });
638
- return ln(h) > 1 && console.warn(
638
+ return pn(h) > 1 && console.warn(
639
639
  `Sprint tool name "${h}" is claimed by more than one component. None of them will register a tool. Set agentName on all but one, or label them distinctly.`
640
640
  ), f(Be(h, b)), () => {
641
641
  w(), f(!1);
642
642
  };
643
- }, [h, r]), _(() => {
643
+ }, [h, i]), j(() => {
644
644
  if (!y || h === null) return;
645
645
  const b = new AbortController();
646
- return Wt(
646
+ return Ft(
647
647
  {
648
648
  name: h,
649
649
  description: t.description,
@@ -661,9 +661,9 @@ function V(e) {
661
661
  }, [y, h, t, p]), y && h !== null ? h : void 0;
662
662
  }
663
663
  function z(e) {
664
- $t(e);
664
+ It(e);
665
665
  }
666
- const ft = {
666
+ const bt = {
667
667
  verb: "dismiss",
668
668
  description: "Dismiss this alert, exactly as a person clicking its dismiss control would. The page decides what dismissal means, usually removing the message. Returns the alert's state after the dismissal, or says the alert left the page.",
669
669
  inputSchema: { type: "object", properties: {} },
@@ -671,7 +671,7 @@ const ft = {
671
671
  untrustedContent: !0,
672
672
  registeredWhen: "The alert is mounted, has an onDismiss handler, and label or agentName provides a stable name.",
673
673
  unregisteredWhen: "The alert unmounts or loses its onDismiss handler."
674
- }, je = q({
674
+ }, _e = I({
675
675
  name: "Alert",
676
676
  category: "feedback",
677
677
  summary: "A status message for the outcome of something that already happened: a notice, a warning, or a failure.",
@@ -720,7 +720,7 @@ const ft = {
720
720
  }
721
721
  },
722
722
  tools: {
723
- dismiss: ft
723
+ dismiss: bt
724
724
  },
725
725
  agentView: {
726
726
  example: '- **Alert** "Check your inbox" [dismissible, tone=info]'
@@ -747,24 +747,24 @@ const ft = {
747
747
  notes: "Danger and warning render role=alert and announce assertively; info and neutral render role=status. The dismiss control is a labelled button. Render the alert when the condition occurs rather than toggling its visibility, or the announcement is lost."
748
748
  }
749
749
  });
750
- function so(e) {
750
+ function xa(e) {
751
751
  const {
752
752
  tone: t = "info",
753
753
  label: n,
754
- onDismiss: o,
755
- agentName: a,
756
- agentTool: r = !0,
757
- children: s,
758
- ...i
759
- } = e, d = U(), c = G(), p = H(), u = m(null), g = m(o);
760
- g.current = o;
754
+ onDismiss: a,
755
+ agentName: o,
756
+ agentTool: i = !0,
757
+ children: l,
758
+ ...r
759
+ } = e, d = q(), c = G(), p = H(), u = m(null), g = m(a);
760
+ g.current = a;
761
761
  const h = m(p);
762
762
  h.current = p;
763
- const y = m($({ component: je.name })), f = m(!0);
764
- _(() => (f.current = !0, () => {
763
+ const y = m(R({ component: _e.name })), f = m(!0);
764
+ j(() => (f.current = !0, () => {
765
765
  f.current = !1;
766
766
  }), []);
767
- const b = o !== void 0, w = B(async () => {
767
+ const b = a !== void 0, w = B(async () => {
768
768
  const S = u.current;
769
769
  if (S !== null)
770
770
  S.click();
@@ -776,44 +776,44 @@ function so(e) {
776
776
  return await K(), f.current ? `Dismissed. The alert is now:
777
777
  ${h.current([y.current])}` : "Dismissed. The alert is gone from the page.";
778
778
  }, []), T = V({
779
- spec: ft,
780
- label: a ?? n,
781
- enabled: r && b,
779
+ spec: bt,
780
+ label: o ?? n,
781
+ enabled: i && b,
782
782
  execute: w
783
- }), A = F(s), R = [];
784
- A !== void 0 && R.push({ part: "message", label: A, state: {} }), b && R.push({
783
+ }), C = F(l), O = [];
784
+ C !== void 0 && O.push({ part: "message", label: C, state: {} }), b && O.push({
785
785
  part: "dismiss",
786
786
  label: "Dismiss",
787
787
  state: {},
788
788
  ...T === void 0 ? {} : { tool: T }
789
789
  });
790
- const O = $({
791
- component: je.name,
790
+ const $ = R({
791
+ component: _e.name,
792
792
  label: n,
793
793
  state: { tone: t, dismissible: b },
794
- parts: R
794
+ parts: O
795
795
  });
796
- if (y.current = O, d === "agent")
797
- return !b || c === "never" ? /* @__PURE__ */ l(I, { node: O }) : /* @__PURE__ */ l(
796
+ if (y.current = $, d === "agent")
797
+ return !b || c === "never" ? /* @__PURE__ */ s(U, { node: $ }) : /* @__PURE__ */ s(
798
798
  we,
799
799
  {
800
- node: O,
800
+ node: $,
801
801
  isActionable: (S) => S.part === "dismiss",
802
- onActivate: () => o?.()
802
+ onActivate: () => a?.()
803
803
  }
804
804
  );
805
805
  const E = t === "danger" || t === "warning" ? "alert" : "status";
806
- return /* @__PURE__ */ C(
806
+ return /* @__PURE__ */ A(
807
807
  "div",
808
808
  {
809
- ...i,
810
- ...M(O),
809
+ ...r,
810
+ ...M($),
811
811
  role: E,
812
812
  ...n === void 0 ? {} : { "aria-label": n },
813
813
  children: [
814
- n === void 0 ? null : /* @__PURE__ */ l("strong", { ...L({ part: "title", state: {} }), children: n }),
815
- /* @__PURE__ */ l("div", { ...L({ part: "message", state: {} }), children: s }),
816
- b ? /* @__PURE__ */ l(
814
+ n === void 0 ? null : /* @__PURE__ */ s("strong", { ...L({ part: "title", state: {} }), children: n }),
815
+ /* @__PURE__ */ s("div", { ...L({ part: "message", state: {} }), children: l }),
816
+ b ? /* @__PURE__ */ s(
817
817
  "button",
818
818
  {
819
819
  ...L({
@@ -824,7 +824,7 @@ ${h.current([y.current])}` : "Dismissed. The alert is gone from the page.";
824
824
  type: "button",
825
825
  "aria-label": "Dismiss",
826
826
  ref: u,
827
- onClick: () => o?.(),
827
+ onClick: () => a?.(),
828
828
  children: "×"
829
829
  }
830
830
  ) : null
@@ -832,7 +832,7 @@ ${h.current([y.current])}` : "Dismissed. The alert is gone from the page.";
832
832
  }
833
833
  );
834
834
  }
835
- const bt = {
835
+ const vt = {
836
836
  verb: "press",
837
837
  description: "Press this button, exactly as a person clicking it would. Returns the button's state after the press, so a follow-up read is usually unnecessary. Any work the press starts is not waited for; if the button enters a loading state the result says so.",
838
838
  inputSchema: { type: "object", properties: {} },
@@ -840,7 +840,7 @@ const bt = {
840
840
  untrustedContent: !0,
841
841
  registeredWhen: "The button is mounted, enabled, not loading, has a resolvable label, and no other component claims the same tool name.",
842
842
  unregisteredWhen: "The button unmounts, becomes disabled, or starts loading."
843
- }, _e = q({
843
+ }, je = I({
844
844
  name: "Button",
845
845
  category: "action",
846
846
  summary: "A single action a person or an agent can trigger. Registers one press tool named from its own label.",
@@ -908,7 +908,7 @@ const bt = {
908
908
  }
909
909
  },
910
910
  tools: {
911
- press: bt
911
+ press: vt
912
912
  },
913
913
  agentView: {
914
914
  example: '- **Button** "Prepare launch" [tone=action] → tool `press-prepare-launch`'
@@ -945,88 +945,88 @@ const bt = {
945
945
  notes: "Loading sets aria-busy and disables the control. Focus is an offset keyline, never a rounded ring."
946
946
  }
947
947
  });
948
- function cn() {
948
+ function gn() {
949
949
  return new MouseEvent("click", { bubbles: !0, cancelable: !0 });
950
950
  }
951
- function dn(e) {
951
+ function mn(e) {
952
952
  const {
953
953
  tone: t = "neutral",
954
954
  block: n = !1,
955
- loading: o = !1,
956
- agentName: a,
957
- agentTool: r = !0,
958
- disabled: s = !1,
959
- type: i = "button",
955
+ loading: a = !1,
956
+ agentName: o,
957
+ agentTool: i = !0,
958
+ disabled: l = !1,
959
+ type: r = "button",
960
960
  children: d,
961
961
  ref: c,
962
962
  onClick: p,
963
963
  ...u
964
- } = e, g = U(), h = G(), y = H(), f = m(null), b = B(
965
- (N) => {
966
- f.current = N, typeof c == "function" ? c(N) : c != null && (c.current = N);
964
+ } = e, g = q(), h = G(), y = H(), f = m(null), b = B(
965
+ (P) => {
966
+ f.current = P, typeof c == "function" ? c(P) : c != null && (c.current = P);
967
967
  },
968
968
  [c]
969
- ), w = a ?? (typeof d == "string" ? d : void 0), [T, A] = J(void 0);
970
- Lt(() => {
969
+ ), w = o ?? (typeof d == "string" ? d : void 0), [T, C] = Y(void 0);
970
+ Mt(() => {
971
971
  if (w !== void 0) return;
972
- const N = f.current;
973
- N !== null && A(ye(N));
972
+ const P = f.current;
973
+ P !== null && C(ye(P));
974
974
  });
975
- const R = s || o, O = w ?? T, E = m(p);
975
+ const O = l || a, $ = w ?? T, E = m(p);
976
976
  E.current = p;
977
- const S = m($({ component: _e.name })), v = m(y);
977
+ const S = m(R({ component: je.name })), v = m(y);
978
978
  v.current = y;
979
979
  const k = m(!0);
980
- _(() => (k.current = !0, () => {
980
+ j(() => (k.current = !0, () => {
981
981
  k.current = !1;
982
982
  }), []);
983
983
  const x = B(async () => {
984
- const N = f.current;
985
- if (N !== null)
986
- N.click();
984
+ const P = f.current;
985
+ if (P !== null)
986
+ P.click();
987
987
  else {
988
- const j = E.current;
989
- if (j === void 0)
988
+ const _ = E.current;
989
+ if (_ === void 0)
990
990
  return "This button renders no control in the current view and has no click handler.";
991
- z(() => j(cn()));
991
+ z(() => _(gn()));
992
992
  }
993
993
  return await K(), k.current ? `Pressed. The button is now:
994
994
  ${v.current([S.current])}` : "The press removed this button from the page.";
995
995
  }, []), D = V({
996
- spec: bt,
997
- label: O,
998
- enabled: r && !R,
996
+ spec: vt,
997
+ label: $,
998
+ enabled: i && !O,
999
999
  execute: x
1000
- }), P = $({
1001
- component: _e.name,
1002
- label: O,
1000
+ }), N = R({
1001
+ component: je.name,
1002
+ label: $,
1003
1003
  tool: D,
1004
- state: { tone: t, block: n, loading: o, disabled: R }
1004
+ state: { tone: t, block: n, loading: a, disabled: O }
1005
1005
  });
1006
- return S.current = P, g === "agent" ? R || h === "never" ? /* @__PURE__ */ l(I, { node: P }) : /* @__PURE__ */ l(
1006
+ return S.current = N, g === "agent" ? O || h === "never" ? /* @__PURE__ */ s(U, { node: N }) : /* @__PURE__ */ s(
1007
1007
  ue,
1008
1008
  {
1009
- node: P,
1010
- type: i,
1009
+ node: N,
1010
+ type: r,
1011
1011
  ref: b,
1012
1012
  onClick: p,
1013
- "aria-busy": o || void 0
1013
+ "aria-busy": a || void 0
1014
1014
  }
1015
- ) : /* @__PURE__ */ l(
1015
+ ) : /* @__PURE__ */ s(
1016
1016
  "button",
1017
1017
  {
1018
1018
  ...u,
1019
- ...M(P),
1020
- type: i,
1019
+ ...M(N),
1020
+ type: r,
1021
1021
  ref: b,
1022
1022
  onClick: p,
1023
- disabled: R,
1024
- "aria-busy": o || void 0,
1023
+ disabled: O,
1024
+ "aria-busy": a || void 0,
1025
1025
  children: d
1026
1026
  }
1027
1027
  );
1028
1028
  }
1029
- const vt = {
1029
+ const wt = {
1030
1030
  verb: "open",
1031
1031
  description: "Open this card, exactly as a person clicking it would. What opening does is the card's own business: it may reveal detail in place, select this item, or start a flow. Returns the card's state after the click.",
1032
1032
  inputSchema: { type: "object", properties: {} },
@@ -1034,7 +1034,7 @@ const vt = {
1034
1034
  untrustedContent: !0,
1035
1035
  registeredWhen: "The card acts rather than navigates, is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
1036
1036
  unregisteredWhen: "The card unmounts, becomes disabled, or turns into a link by taking an href."
1037
- }, Ve = q({
1037
+ }, Ve = I({
1038
1038
  name: "Card",
1039
1039
  category: "navigation",
1040
1040
  summary: "One entry in a catalogue: a title, a line or two of body, and the whole block clickable. Give it an href and it is a link; give it onClick and it is an action that registers an open tool.",
@@ -1084,7 +1084,7 @@ const vt = {
1084
1084
  }
1085
1085
  },
1086
1086
  tools: {
1087
- open: vt
1087
+ open: wt
1088
1088
  },
1089
1089
  agentView: {
1090
1090
  example: '- **Card** "Button" [href=#/Button]\n - part `title` "Button"\n - part `body` "A single action a person or an agent can trigger."'
@@ -1109,88 +1109,88 @@ const vt = {
1109
1109
  notes: "The whole block is one control: a link when it has an href, a button when it acts. The title names it, and the body is read as its content rather than as part of the name."
1110
1110
  }
1111
1111
  });
1112
- function lo(e) {
1112
+ function Aa(e) {
1113
1113
  const {
1114
1114
  label: t,
1115
1115
  children: n,
1116
- href: o,
1117
- onClick: a,
1118
- disabled: r = !1,
1119
- agentTool: s,
1120
- agentName: i,
1116
+ href: a,
1117
+ onClick: o,
1118
+ disabled: i = !1,
1119
+ agentTool: l,
1120
+ agentName: r,
1121
1121
  ref: d,
1122
1122
  ...c
1123
- } = e, p = U(), u = G(), g = H(), h = o !== void 0, y = !h && r, f = m(null), b = B(
1123
+ } = e, p = q(), u = G(), g = H(), h = a !== void 0, y = !h && i, f = m(null), b = B(
1124
1124
  (x) => {
1125
1125
  f.current = x, typeof d == "function" ? d(x) : d != null && (d.current = x);
1126
1126
  },
1127
1127
  [d]
1128
1128
  ), w = m(g);
1129
1129
  w.current = g;
1130
- const T = m($({ component: Ve.name })), A = m(!0);
1131
- _(() => (A.current = !0, () => {
1132
- A.current = !1;
1130
+ const T = m(R({ component: Ve.name })), C = m(!0);
1131
+ j(() => (C.current = !0, () => {
1132
+ C.current = !1;
1133
1133
  }), []);
1134
- const R = B(async () => {
1134
+ const O = B(async () => {
1135
1135
  const x = f.current;
1136
- return x === null ? "This card renders no control in the current view." : (x.click(), await K(), A.current ? `Opened. The card is now:
1136
+ return x === null ? "This card renders no control in the current view." : (x.click(), await K(), C.current ? `Opened. The card is now:
1137
1137
  ${w.current([T.current])}` : "Opening removed this card from the page.");
1138
- }, []), O = V({
1139
- spec: vt,
1140
- label: i ?? t,
1141
- enabled: (s ?? !h) && !y,
1142
- execute: R
1138
+ }, []), $ = V({
1139
+ spec: wt,
1140
+ label: r ?? t,
1141
+ enabled: (l ?? !h) && !y,
1142
+ execute: O
1143
1143
  }), E = F(n), S = [
1144
1144
  { part: "title", label: t, state: {} },
1145
1145
  ...E === void 0 ? [] : [{ part: "body", label: E, state: {} }]
1146
- ], v = $({
1146
+ ], v = R({
1147
1147
  component: Ve.name,
1148
1148
  label: t,
1149
- tool: O,
1150
- state: { href: o, disabled: y },
1149
+ tool: $,
1150
+ state: { href: a, disabled: y },
1151
1151
  parts: S
1152
1152
  });
1153
1153
  if (T.current = v, p === "agent")
1154
- return y || u === "never" ? /* @__PURE__ */ l(I, { node: v }) : /* @__PURE__ */ l(
1154
+ return y || u === "never" ? /* @__PURE__ */ s(U, { node: v }) : /* @__PURE__ */ s(
1155
1155
  ue,
1156
1156
  {
1157
1157
  node: v,
1158
1158
  as: h ? "a" : "button",
1159
- href: o,
1159
+ href: a,
1160
1160
  ref: b,
1161
- onClick: a
1161
+ onClick: o
1162
1162
  }
1163
1163
  );
1164
- const k = /* @__PURE__ */ C(Le, { children: [
1165
- /* @__PURE__ */ l("span", { ...L({ part: "title", state: {} }), children: t }),
1166
- n === void 0 ? null : /* @__PURE__ */ l("span", { ...L({ part: "body", state: {} }), children: n })
1164
+ const k = /* @__PURE__ */ A(Re, { children: [
1165
+ /* @__PURE__ */ s("span", { ...L({ part: "title", state: {} }), children: t }),
1166
+ n === void 0 ? null : /* @__PURE__ */ s("span", { ...L({ part: "body", state: {} }), children: n })
1167
1167
  ] });
1168
- return h ? /* @__PURE__ */ l(
1168
+ return h ? /* @__PURE__ */ s(
1169
1169
  "a",
1170
1170
  {
1171
1171
  ...c,
1172
1172
  ...M(v),
1173
- href: o,
1173
+ href: a,
1174
1174
  "aria-label": t,
1175
- onClick: a,
1175
+ onClick: o,
1176
1176
  ref: b,
1177
1177
  children: k
1178
1178
  }
1179
- ) : /* @__PURE__ */ l(
1179
+ ) : /* @__PURE__ */ s(
1180
1180
  "button",
1181
1181
  {
1182
1182
  ...c,
1183
1183
  ...M(v),
1184
1184
  type: "button",
1185
1185
  "aria-label": t,
1186
- disabled: r,
1187
- onClick: a,
1186
+ disabled: i,
1187
+ onClick: o,
1188
1188
  ref: b,
1189
1189
  children: k
1190
1190
  }
1191
1191
  );
1192
1192
  }
1193
- const wt = {
1193
+ const yt = {
1194
1194
  verb: "set",
1195
1195
  description: "Check or uncheck this box by stating the end state, exactly as a person clicking it would. Setting the state it already has succeeds and changes nothing, so the call is safe to retry. Returns the box's state after the call, so a follow-up read is unnecessary.",
1196
1196
  inputSchema: {
@@ -1207,7 +1207,7 @@ const wt = {
1207
1207
  untrustedContent: !0,
1208
1208
  registeredWhen: "The box is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
1209
1209
  unregisteredWhen: "The box unmounts or becomes disabled."
1210
- }, Fe = q({
1210
+ }, Fe = I({
1211
1211
  name: "Checkbox",
1212
1212
  category: "input",
1213
1213
  summary: "A single on/off choice recorded as form data. It registers one set tool that takes the end state rather than toggling.",
@@ -1281,7 +1281,7 @@ const wt = {
1281
1281
  }
1282
1282
  },
1283
1283
  tools: {
1284
- set: wt
1284
+ set: yt
1285
1285
  },
1286
1286
  agentView: {
1287
1287
  example: '- **Checkbox** "Accept the terms" [required] → tool `set-accept-the-terms`\n - part `error` "Required before launch"'
@@ -1325,75 +1325,75 @@ const wt = {
1325
1325
  notes: "A native checkbox input wrapped by its label, visually replaced by a keylined square. Focus draws an offset keyline around the square; errors set aria-invalid and link with aria-describedby."
1326
1326
  }
1327
1327
  });
1328
- function un(e, t) {
1328
+ function fn(e, t) {
1329
1329
  return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
1330
1330
  }
1331
- function co(e) {
1331
+ function Ca(e) {
1332
1332
  const {
1333
1333
  label: t,
1334
1334
  checked: n,
1335
- onChange: o,
1336
- hint: a,
1337
- error: r,
1338
- name: s,
1339
- disabled: i = !1,
1335
+ onChange: a,
1336
+ hint: o,
1337
+ error: i,
1338
+ name: l,
1339
+ disabled: r = !1,
1340
1340
  required: d = !1,
1341
1341
  agentName: c,
1342
1342
  agentTool: p = !0,
1343
1343
  ...u
1344
- } = e, g = U(), h = G(), y = H(), f = le(), b = m(null), w = m(o);
1345
- w.current = o;
1344
+ } = e, g = q(), h = G(), y = H(), f = le(), b = m(null), w = m(a);
1345
+ w.current = a;
1346
1346
  const T = m(n);
1347
1347
  T.current = n;
1348
- const A = m(y);
1349
- A.current = y;
1350
- const R = m($({ component: Fe.name })), O = m(!0);
1351
- _(() => (O.current = !0, () => {
1352
- O.current = !1;
1348
+ const C = m(y);
1349
+ C.current = y;
1350
+ const O = m(R({ component: Fe.name })), $ = m(!0);
1351
+ j(() => ($.current = !0, () => {
1352
+ $.current = !1;
1353
1353
  }), []);
1354
1354
  const E = B(async (x) => {
1355
1355
  const D = x.checked;
1356
1356
  if (typeof D != "boolean")
1357
1357
  return 'Pass "checked" as true or false; it states the end state.';
1358
- const P = D === T.current;
1359
- if (!P) {
1360
- const j = b.current;
1361
- j !== null ? j.click() : z(() => w.current(D));
1358
+ const N = D === T.current;
1359
+ if (!N) {
1360
+ const _ = b.current;
1361
+ _ !== null ? _.click() : z(() => w.current(D));
1362
1362
  }
1363
- return await K(), O.current ? `${P ? `Already ${D ? "checked" : "unchecked"}` : D ? "Checked" : "Unchecked"}. The checkbox is now:
1364
- ${A.current([R.current])}` : "The change removed this checkbox from the page.";
1363
+ return await K(), $.current ? `${N ? `Already ${D ? "checked" : "unchecked"}` : D ? "Checked" : "Unchecked"}. The checkbox is now:
1364
+ ${C.current([O.current])}` : "The change removed this checkbox from the page.";
1365
1365
  }, []), S = V({
1366
- spec: wt,
1366
+ spec: yt,
1367
1367
  label: c ?? t,
1368
- enabled: p && !i,
1368
+ enabled: p && !r,
1369
1369
  execute: E
1370
- }), v = $({
1370
+ }), v = R({
1371
1371
  component: Fe.name,
1372
1372
  label: t,
1373
1373
  tool: S,
1374
1374
  state: {
1375
1375
  checked: n,
1376
- disabled: i,
1376
+ disabled: r,
1377
1377
  required: d,
1378
- invalid: r !== void 0
1378
+ invalid: i !== void 0
1379
1379
  },
1380
- parts: un(r, a)
1380
+ parts: fn(i, o)
1381
1381
  });
1382
- if (R.current = v, g === "agent")
1383
- return i || h === "never" ? /* @__PURE__ */ l(I, { node: v }) : /* @__PURE__ */ l(
1382
+ if (O.current = v, g === "agent")
1383
+ return r || h === "never" ? /* @__PURE__ */ s(U, { node: v }) : /* @__PURE__ */ s(
1384
1384
  ue,
1385
1385
  {
1386
1386
  node: v,
1387
1387
  ref: (x) => {
1388
1388
  b.current = x;
1389
1389
  },
1390
- onClick: () => o(!n)
1390
+ onClick: () => a(!n)
1391
1391
  }
1392
1392
  );
1393
- const k = r !== void 0 ? `${f}-error` : a !== void 0 ? `${f}-hint` : void 0;
1394
- return /* @__PURE__ */ C("div", { ...u, ...M(v), children: [
1395
- /* @__PURE__ */ C("label", { htmlFor: f, children: [
1396
- /* @__PURE__ */ l(
1393
+ const k = i !== void 0 ? `${f}-error` : o !== void 0 ? `${f}-hint` : void 0;
1394
+ return /* @__PURE__ */ A("div", { ...u, ...M(v), children: [
1395
+ /* @__PURE__ */ A("label", { htmlFor: f, children: [
1396
+ /* @__PURE__ */ s(
1397
1397
  "input",
1398
1398
  {
1399
1399
  id: f,
@@ -1403,15 +1403,15 @@ ${A.current([R.current])}` : "The change removed this checkbox from the page.";
1403
1403
  },
1404
1404
  type: "checkbox",
1405
1405
  checked: n,
1406
- name: s,
1407
- disabled: i,
1406
+ name: l,
1407
+ disabled: r,
1408
1408
  required: d,
1409
- "aria-invalid": r !== void 0 || void 0,
1409
+ "aria-invalid": i !== void 0 || void 0,
1410
1410
  "aria-describedby": k,
1411
- onChange: (x) => o(x.currentTarget.checked)
1411
+ onChange: (x) => a(x.currentTarget.checked)
1412
1412
  }
1413
1413
  ),
1414
- /* @__PURE__ */ l(
1414
+ /* @__PURE__ */ s(
1415
1415
  "span",
1416
1416
  {
1417
1417
  ...L({ part: "box", state: {} }),
@@ -1420,10 +1420,10 @@ ${A.current([R.current])}` : "The change removed this checkbox from the page.";
1420
1420
  ),
1421
1421
  t
1422
1422
  ] }),
1423
- r !== void 0 ? /* @__PURE__ */ l("p", { id: k, ...L({ part: "error", state: {} }), children: r }) : a !== void 0 ? /* @__PURE__ */ l("p", { id: k, ...L({ part: "hint", state: {} }), children: a }) : null
1423
+ i !== void 0 ? /* @__PURE__ */ s("p", { id: k, ...L({ part: "error", state: {} }), children: i }) : o !== void 0 ? /* @__PURE__ */ s("p", { id: k, ...L({ part: "hint", state: {} }), children: o }) : null
1424
1424
  ] });
1425
1425
  }
1426
- const hn = /(\/\/[^\n]*)|("[^"]*"|'[^']*'|`[^`]*`)|(<\/?[A-Za-z][\w.-]*)|([\w-]+(?==))|(\b(?:const|let|var|function|return|import|export|from|await|async|new|true|false|null|undefined)\b)|(\b\d+(?:\.\d+)?\b)|([<>/{}()[\];=,.]+)/g, pn = [
1426
+ const bn = /(\/\/[^\n]*)|("[^"]*"|'[^']*'|`[^`]*`)|(<\/?[A-Za-z][\w.-]*)|([\w-]+(?==))|(\b(?:const|let|var|function|return|import|export|from|await|async|new|true|false|null|undefined)\b)|(\b\d+(?:\.\d+)?\b)|([<>/{}()[\];=,.]+)/g, vn = [
1427
1427
  "comment",
1428
1428
  "string",
1429
1429
  "tag",
@@ -1432,19 +1432,19 @@ const hn = /(\/\/[^\n]*)|("[^"]*"|'[^']*'|`[^`]*`)|(<\/?[A-Za-z][\w.-]*)|([\w-]+
1432
1432
  "number",
1433
1433
  "punct"
1434
1434
  ];
1435
- function gn(e) {
1435
+ function wn(e) {
1436
1436
  const t = [];
1437
1437
  let n = 0;
1438
- for (const o of e.matchAll(hn)) {
1439
- const a = o.index;
1440
- if (a === void 0) continue;
1441
- a > n && t.push({ kind: "plain", text: e.slice(n, a) });
1442
- const r = pn.find((s, i) => o[i + 1] !== void 0) ?? "plain";
1443
- t.push({ kind: r, text: o[0] }), n = a + o[0].length;
1438
+ for (const a of e.matchAll(bn)) {
1439
+ const o = a.index;
1440
+ if (o === void 0) continue;
1441
+ o > n && t.push({ kind: "plain", text: e.slice(n, o) });
1442
+ const i = vn.find((l, r) => a[r + 1] !== void 0) ?? "plain";
1443
+ t.push({ kind: i, text: a[0] }), n = o + a[0].length;
1444
1444
  }
1445
1445
  return n < e.length && t.push({ kind: "plain", text: e.slice(n) }), t;
1446
1446
  }
1447
- const mn = q({
1447
+ const yn = I({
1448
1448
  name: "CodeBlock",
1449
1449
  category: "display",
1450
1450
  summary: "A snippet of code with a caption band and a copy control. In agent view the snippet is carried verbatim as the code part, so an agent reads the source instead of the highlighting.",
@@ -1514,29 +1514,29 @@ const mn = q({
1514
1514
  a11y: {
1515
1515
  notes: "The frame is a figure named by its caption. The copy control is a real button and reports back in its own label once the snippet is on the clipboard; the label swap is a polite live region, so a screen reader hears the confirmation too."
1516
1516
  }
1517
- }), fn = 1200;
1518
- function uo(e) {
1519
- const { code: t, caption: n, language: o = "tsx", copyLabel: a = "Copy", ...r } = e, s = U(), [i, d] = J(!1);
1520
- _(() => {
1521
- if (!i) return;
1522
- const h = setTimeout(() => d(!1), fn);
1517
+ }), kn = 1200;
1518
+ function Sa(e) {
1519
+ const { code: t, caption: n, language: a = "tsx", copyLabel: o = "Copy", ...i } = e, l = q(), [r, d] = Y(!1);
1520
+ j(() => {
1521
+ if (!r) return;
1522
+ const h = setTimeout(() => d(!1), kn);
1523
1523
  return () => clearTimeout(h);
1524
- }, [i]);
1525
- const c = n ?? o, p = i ? "Copied" : a, u = $({
1526
- component: mn.name,
1524
+ }, [r]);
1525
+ const c = n ?? a, p = r ? "Copied" : o, u = R({
1526
+ component: yn.name,
1527
1527
  label: c,
1528
1528
  state: {
1529
- language: o,
1529
+ language: a,
1530
1530
  lines: String(t.split(`
1531
1531
  `).length),
1532
- copied: i
1532
+ copied: r
1533
1533
  },
1534
1534
  parts: [
1535
1535
  { part: "copy", label: p, state: {} },
1536
1536
  { part: "code", label: t, state: {} }
1537
1537
  ]
1538
1538
  });
1539
- if (s === "agent") return /* @__PURE__ */ l(I, { node: u });
1539
+ if (l === "agent") return /* @__PURE__ */ s(U, { node: u });
1540
1540
  const g = () => {
1541
1541
  const h = navigator.clipboard;
1542
1542
  h !== void 0 && h.writeText(t).then(
@@ -1544,10 +1544,10 @@ function uo(e) {
1544
1544
  () => d(!1)
1545
1545
  );
1546
1546
  };
1547
- return /* @__PURE__ */ C("figure", { ...r, ...M(u), "aria-label": c, children: [
1548
- /* @__PURE__ */ C("header", { children: [
1549
- /* @__PURE__ */ l("span", { children: c }),
1550
- /* @__PURE__ */ l(
1547
+ return /* @__PURE__ */ A("figure", { ...i, ...M(u), "aria-label": c, children: [
1548
+ /* @__PURE__ */ A("header", { children: [
1549
+ /* @__PURE__ */ s("span", { children: c }),
1550
+ /* @__PURE__ */ s(
1551
1551
  "button",
1552
1552
  {
1553
1553
  type: "button",
@@ -1558,7 +1558,7 @@ function uo(e) {
1558
1558
  }
1559
1559
  )
1560
1560
  ] }),
1561
- /* @__PURE__ */ l("pre", { ...L({ part: "code", state: {} }), children: /* @__PURE__ */ l("code", { children: gn(t).map((h, y) => /* @__PURE__ */ l(
1561
+ /* @__PURE__ */ s("pre", { ...L({ part: "code", state: {} }), children: /* @__PURE__ */ s("code", { children: wn(t).map((h, y) => /* @__PURE__ */ s(
1562
1562
  "span",
1563
1563
  {
1564
1564
  "data-sprint-token": h.kind === "plain" ? void 0 : h.kind,
@@ -1568,7 +1568,7 @@ function uo(e) {
1568
1568
  )) }) })
1569
1569
  ] });
1570
1570
  }
1571
- const bn = q({
1571
+ const Tn = I({
1572
1572
  name: "DescriptionList",
1573
1573
  category: "display",
1574
1574
  summary: "Labelled term–description pairs for the details of one thing: metadata, settings, profile fields.",
@@ -1628,26 +1628,26 @@ const bn = q({
1628
1628
  notes: "Renders a native dl with an aria-label. Terms are dt elements and descriptions dd, so structure survives without styling."
1629
1629
  }
1630
1630
  });
1631
- function vn(e) {
1631
+ function xn(e) {
1632
1632
  const t = F(e.term), n = F(e.description);
1633
1633
  if (!(t === void 0 && n === void 0))
1634
1634
  return `${t ?? ""}: ${n ?? ""}`;
1635
1635
  }
1636
- function ho(e) {
1637
- const { label: t, items: n, emptyLabel: o = "Empty", ...a } = e, r = U(), s = n.length === 0, i = n.map((c, p) => {
1638
- const u = vn(c);
1636
+ function Pa(e) {
1637
+ const { label: t, items: n, emptyLabel: a = "Empty", ...o } = e, i = q(), l = n.length === 0, r = n.map((c, p) => {
1638
+ const u = xn(c);
1639
1639
  return {
1640
1640
  part: "item",
1641
1641
  state: { index: String(p + 1) },
1642
1642
  ...u === void 0 ? {} : { label: u }
1643
1643
  };
1644
- }), d = $({
1645
- component: bn.name,
1644
+ }), d = R({
1645
+ component: Tn.name,
1646
1646
  label: t,
1647
- state: { items: String(n.length), empty: s },
1648
- parts: i
1647
+ state: { items: String(n.length), empty: l },
1648
+ parts: r
1649
1649
  });
1650
- return r === "agent" ? /* @__PURE__ */ l(I, { node: d }) : /* @__PURE__ */ l("dl", { ...a, ...M(d), "aria-label": t, children: s ? /* @__PURE__ */ l("div", { children: o }) : n.map((c, p) => /* @__PURE__ */ C(
1650
+ return i === "agent" ? /* @__PURE__ */ s(U, { node: d }) : /* @__PURE__ */ s("dl", { ...o, ...M(d), "aria-label": t, children: l ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("span", { children: a }) }) : n.map((c, p) => /* @__PURE__ */ A(
1651
1651
  "div",
1652
1652
  {
1653
1653
  ...L({
@@ -1655,14 +1655,14 @@ function ho(e) {
1655
1655
  state: { index: String(p + 1) }
1656
1656
  }),
1657
1657
  children: [
1658
- /* @__PURE__ */ l("dt", { children: c.term }),
1659
- /* @__PURE__ */ l("dd", { children: c.description })
1658
+ /* @__PURE__ */ s("dt", { children: c.term }),
1659
+ /* @__PURE__ */ s("dd", { children: c.description })
1660
1660
  ]
1661
1661
  },
1662
1662
  `${p}-${String(F(c.term))}`
1663
1663
  )) });
1664
1664
  }
1665
- const yt = {
1665
+ const kt = {
1666
1666
  verb: "close",
1667
1667
  description: "Close this dialog without taking its action, exactly as pressing its close control or Escape would. Anything entered inside the dialog may be discarded by the page. To take the dialog's action instead, use the tools its contents register while it is open.",
1668
1668
  inputSchema: { type: "object", properties: {} },
@@ -1670,7 +1670,7 @@ const yt = {
1670
1670
  untrustedContent: !0,
1671
1671
  registeredWhen: "The dialog is open. A closed dialog renders nothing and has no tools.",
1672
1672
  unregisteredWhen: "The dialog closes or unmounts."
1673
- }, wn = q({
1673
+ }, An = I({
1674
1674
  name: "Dialog",
1675
1675
  category: "overlay",
1676
1676
  summary: "A modal that interrupts the page for one decision: confirm a destructive action, complete a short step, acknowledge something before continuing.",
@@ -1724,7 +1724,7 @@ const yt = {
1724
1724
  }
1725
1725
  },
1726
1726
  tools: {
1727
- close: yt
1727
+ close: kt
1728
1728
  },
1729
1729
  agentView: {
1730
1730
  example: '- **Dialog** "Revoke key" [open] with part `close` → tool `close-revoke-key`'
@@ -1759,20 +1759,20 @@ const yt = {
1759
1759
  notes: "A native dialog element shown with showModal, so focus containment, inerting the page behind, and Escape come from the browser. The title names the dialog via aria-label."
1760
1760
  }
1761
1761
  });
1762
- function po(e) {
1762
+ function Na(e) {
1763
1763
  const {
1764
1764
  label: t,
1765
1765
  open: n,
1766
- onClose: o,
1767
- headingLevel: a,
1768
- owner: r,
1769
- agentName: s,
1770
- agentTool: i = !0,
1766
+ onClose: a,
1767
+ headingLevel: o,
1768
+ owner: i,
1769
+ agentName: l,
1770
+ agentTool: r = !0,
1771
1771
  children: d,
1772
1772
  ref: c,
1773
1773
  ...p
1774
- } = e, u = U(), g = G(), h = ke(), y = m(null), f = m(null), b = m(o);
1775
- b.current = o;
1774
+ } = e, u = q(), g = G(), h = ke(), y = m(null), f = m(null), b = m(a);
1775
+ b.current = a;
1776
1776
  const w = m(n);
1777
1777
  w.current = n;
1778
1778
  const T = B(
@@ -1781,7 +1781,7 @@ function po(e) {
1781
1781
  },
1782
1782
  [c]
1783
1783
  );
1784
- _(() => {
1784
+ j(() => {
1785
1785
  if (!n) return;
1786
1786
  const v = y.current;
1787
1787
  if (v !== null)
@@ -1789,23 +1789,23 @@ function po(e) {
1789
1789
  v.open && (typeof v.close == "function" ? v.close() : v.open = !1);
1790
1790
  };
1791
1791
  }, [n]);
1792
- const A = B(async () => {
1792
+ const C = B(async () => {
1793
1793
  const v = f.current;
1794
1794
  return v !== null ? v.click() : z(() => b.current()), await K(), w.current ? "The page kept the dialog open." : "Closed. The dialog is gone from the page.";
1795
- }, []), R = V({
1796
- spec: yt,
1797
- label: s ?? t,
1798
- enabled: i && n,
1799
- execute: A
1800
- }), O = ee(
1795
+ }, []), O = V({
1796
+ spec: kt,
1797
+ label: l ?? t,
1798
+ enabled: r && n,
1799
+ execute: C
1800
+ }), $ = ee(
1801
1801
  () => ({ path: [...h, t] }),
1802
1802
  [h, t]
1803
1803
  );
1804
1804
  if (!n) return null;
1805
- const E = $({
1806
- component: wn.name,
1805
+ const E = R({
1806
+ component: An.name,
1807
1807
  label: t,
1808
- owner: r,
1808
+ owner: i,
1809
1809
  region: !0,
1810
1810
  state: { open: !0 },
1811
1811
  parts: [
@@ -1813,22 +1813,22 @@ function po(e) {
1813
1813
  part: "close",
1814
1814
  label: "Close",
1815
1815
  state: {},
1816
- ...R === void 0 ? {} : { tool: R }
1816
+ ...O === void 0 ? {} : { tool: O }
1817
1817
  }
1818
1818
  ]
1819
1819
  });
1820
1820
  if (u === "agent")
1821
- return /* @__PURE__ */ l(
1821
+ return /* @__PURE__ */ s(
1822
1822
  we,
1823
1823
  {
1824
1824
  node: E,
1825
1825
  isActionable: () => g !== "never",
1826
- onActivate: () => o(),
1827
- children: /* @__PURE__ */ l(me, { value: O, children: d })
1826
+ onActivate: () => a(),
1827
+ children: /* @__PURE__ */ s(me, { value: $, children: d })
1828
1828
  }
1829
1829
  );
1830
- const S = a === void 0 ? "span" : `h${a}`;
1831
- return /* @__PURE__ */ C(
1830
+ const S = o === void 0 ? "span" : `h${o}`;
1831
+ return /* @__PURE__ */ A(
1832
1832
  "dialog",
1833
1833
  {
1834
1834
  ...p,
@@ -1836,33 +1836,33 @@ function po(e) {
1836
1836
  "aria-label": t,
1837
1837
  ref: T,
1838
1838
  onCancel: (v) => {
1839
- v.preventDefault(), o();
1839
+ v.preventDefault(), a();
1840
1840
  },
1841
1841
  children: [
1842
- /* @__PURE__ */ C("header", { children: [
1843
- /* @__PURE__ */ l(S, { children: t }),
1844
- /* @__PURE__ */ l(
1842
+ /* @__PURE__ */ A("header", { children: [
1843
+ /* @__PURE__ */ s(S, { children: t }),
1844
+ /* @__PURE__ */ s(
1845
1845
  "button",
1846
1846
  {
1847
1847
  ...L({
1848
1848
  part: "close",
1849
1849
  state: {},
1850
- ...R === void 0 ? {} : { tool: R }
1850
+ ...O === void 0 ? {} : { tool: O }
1851
1851
  }),
1852
1852
  type: "button",
1853
1853
  "aria-label": "Close",
1854
1854
  ref: f,
1855
- onClick: () => o(),
1855
+ onClick: () => a(),
1856
1856
  children: "×"
1857
1857
  }
1858
1858
  )
1859
1859
  ] }),
1860
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(me, { value: O, children: d }) })
1860
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(me, { value: $, children: d }) })
1861
1861
  ]
1862
1862
  }
1863
1863
  );
1864
1864
  }
1865
- const yn = q({
1865
+ const Cn = I({
1866
1866
  name: "Heading",
1867
1867
  category: "typography",
1868
1868
  summary: "A section title, rendered as a real h element at the level you pick so it joins the document outline.",
@@ -1904,17 +1904,151 @@ const yn = q({
1904
1904
  }
1905
1905
  ]
1906
1906
  });
1907
- function go(e) {
1908
- const { level: t = 2, children: n, ...o } = e, a = U(), r = $({
1909
- component: yn.name,
1907
+ function La(e) {
1908
+ const { level: t = 2, children: n, ...a } = e, o = q(), i = R({
1909
+ component: Cn.name,
1910
1910
  label: F(n),
1911
1911
  state: { level: String(t) }
1912
1912
  });
1913
- if (a === "agent") return /* @__PURE__ */ l(I, { node: r });
1914
- const s = `h${t}`;
1915
- return /* @__PURE__ */ l(s, { ...o, ...M(r), children: n });
1913
+ if (o === "agent") return /* @__PURE__ */ s(U, { node: i });
1914
+ const l = `h${t}`;
1915
+ return /* @__PURE__ */ s(l, { ...a, ...M(i), children: n });
1916
1916
  }
1917
- const kt = {
1917
+ const Sn = I({
1918
+ name: "Image",
1919
+ category: "display",
1920
+ summary: "A framed picture in a slot that holds its shape. It is the one component whose content an agent cannot read, so alt is not decoration: it is the whole of what the agent gets, and the source URL is published beside it for an agent that can fetch pixels of its own.",
1921
+ whenToUse: 'Use it for any picture that carries meaning: a screenshot, a diagram, a photograph, a logo in running content. Describe it in alt as if to someone on the phone. Pass alt="" only for a picture that adds nothing, which then disappears from the agent view entirely.',
1922
+ whenNotToUse: "Do not use it for a decorative texture; that is the ornament vocabulary, which costs no request and no description. Do not use it for an icon whose meaning is already in adjacent text.",
1923
+ status: "experimental",
1924
+ props: {
1925
+ src: {
1926
+ kind: "string",
1927
+ description: "Where the pixels are. Published as data-sprint-src so an agent that can see can fetch the file itself.",
1928
+ required: !0
1929
+ },
1930
+ alt: {
1931
+ kind: "string",
1932
+ description: 'What the picture shows, in a sentence. This is the entire agent rendering of the image, so write it for a reader who will never see it. Empty means "this picture carries no meaning", and the component then renders nothing in agent view.',
1933
+ required: !0
1934
+ },
1935
+ caption: {
1936
+ kind: "string",
1937
+ description: "A visible line under the frame, for a credit, a date, or a figure number. It is read as well as seen, so it does not repeat alt."
1938
+ },
1939
+ ratio: {
1940
+ kind: "enum",
1941
+ description: "The shape the slot holds while the picture loads and if it fails. auto lets the file decide its own height once it arrives.",
1942
+ values: ["1:1", "4:3", "3:2", "16:9", "auto"],
1943
+ default: "auto"
1944
+ },
1945
+ fit: {
1946
+ kind: "enum",
1947
+ description: "How the picture fills a slot of a fixed ratio. cover crops it, contain letterboxes it. Ignored when ratio is auto.",
1948
+ values: ["cover", "contain"],
1949
+ default: "cover"
1950
+ }
1951
+ },
1952
+ state: {
1953
+ src: {
1954
+ description: "The image source, so an agent can fetch the file without the DOM.",
1955
+ attribute: "data-sprint-src"
1956
+ },
1957
+ status: {
1958
+ description: "Whether the pixels have arrived. Present only in the human rendering, because in agent view nothing is fetched and any value would be a guess.",
1959
+ attribute: "data-sprint-status",
1960
+ values: ["loading", "ready", "error"]
1961
+ },
1962
+ ratio: {
1963
+ description: "The shape the slot holds.",
1964
+ attribute: "data-sprint-ratio",
1965
+ values: ["1:1", "4:3", "3:2", "16:9", "auto"]
1966
+ },
1967
+ fit: {
1968
+ description: "Whether a fixed-ratio slot crops the picture or letterboxes it.",
1969
+ attribute: "data-sprint-fit",
1970
+ values: ["cover", "contain"]
1971
+ },
1972
+ decorative: {
1973
+ description: "Present when the image was declared meaningless with an empty alt and no caption. It renders nothing at all in agent view.",
1974
+ attribute: "data-sprint-decorative"
1975
+ }
1976
+ },
1977
+ agentView: {
1978
+ example: '- **Image** "Launch pad 39B under floodlights, gantry retracted" [fit=cover, ratio=16:9, src=media/pad-39b.svg]\n - part `caption` "Pad 39B, T-minus 4h"'
1979
+ },
1980
+ examples: [
1981
+ {
1982
+ title: "A described picture",
1983
+ description: "The alt text is the agent rendering. It registers no WebMCP tool: there is nothing to do to a picture, and the source URL is already on the element.",
1984
+ code: `<Image
1985
+ src="media/pad-39b.svg"
1986
+ alt="Launch pad 39B under floodlights, gantry retracted"
1987
+ ratio="16:9"
1988
+ />`
1989
+ },
1990
+ {
1991
+ title: "A captioned figure",
1992
+ description: "The caption is read as well as seen, and arrives as its own part, so it can say what alt should not repeat.",
1993
+ code: `<Image
1994
+ src="media/telemetry.svg"
1995
+ alt="Line chart of chamber pressure holding flat for nine minutes, then dropping"
1996
+ caption="Static fire 04, chamber pressure"
1997
+ ratio="3:2"
1998
+ fit="contain"
1999
+ />`
2000
+ },
2001
+ {
2002
+ title: "A picture that means nothing",
2003
+ description: "An empty alt is a claim, not an omission: it says this picture carries no meaning. The component then renders nothing in agent view, the way Stack does.",
2004
+ code: '<Image src="media/grain.svg" alt="" ratio="1:1" />'
2005
+ }
2006
+ ],
2007
+ a11y: {
2008
+ notes: "The frame is a figure named by its alt text, and the picture inside carries the same alt natively, so a fallback still reads when the file fails. A caption is a figcaption. While the picture is loading or after it has failed, the slot keeps its border and states its condition rather than collapsing; that band is aria-hidden, because on failure it shows the alt text a screen reader has already been given."
2009
+ },
2010
+ relatedComponents: ["Card", "Panel"]
2011
+ });
2012
+ function Ra(e) {
2013
+ const { src: t, alt: n, caption: a, ratio: o = "auto", fit: i = "cover", ...l } = e, r = q(), [d, c] = Y("loading"), p = n === "" && a === void 0, u = a === void 0 ? [] : [{ part: "caption", label: a, state: {} }], g = R({
2014
+ component: Sn.name,
2015
+ label: n === "" ? void 0 : n,
2016
+ state: {
2017
+ src: t,
2018
+ ratio: o,
2019
+ fit: i,
2020
+ decorative: p,
2021
+ status: r === "agent" ? void 0 : d
2022
+ },
2023
+ parts: u
2024
+ });
2025
+ if (r === "agent") return p ? null : /* @__PURE__ */ s(U, { node: g });
2026
+ const h = d === "error" ? n === "" ? "Image unavailable" : n : "Loading";
2027
+ return /* @__PURE__ */ A(
2028
+ "figure",
2029
+ {
2030
+ ...l,
2031
+ ...M(g),
2032
+ "aria-label": n === "" ? void 0 : n,
2033
+ children: [
2034
+ /* @__PURE__ */ A("div", { children: [
2035
+ /* @__PURE__ */ s(
2036
+ "img",
2037
+ {
2038
+ src: t,
2039
+ alt: n,
2040
+ onLoad: () => c("ready"),
2041
+ onError: () => c("error")
2042
+ }
2043
+ ),
2044
+ d === "ready" ? null : /* @__PURE__ */ s("span", { "aria-hidden": "true", children: /* @__PURE__ */ s("span", { children: h }) })
2045
+ ] }),
2046
+ a === void 0 ? null : /* @__PURE__ */ s("figcaption", { ...L({ part: "caption", state: {} }), children: a })
2047
+ ]
2048
+ }
2049
+ );
2050
+ }
2051
+ const Tt = {
1918
2052
  verb: "open",
1919
2053
  description: "Follow this link and load its destination, exactly as a person clicking it would. The current page is replaced, so anything unsaved on it is lost and any tool registered by this page stops existing.",
1920
2054
  inputSchema: { type: "object", properties: {} },
@@ -1922,7 +2056,7 @@ const kt = {
1922
2056
  untrustedContent: !0,
1923
2057
  registeredWhen: "The link opts in with agentTool, is mounted, has a resolvable label, and no other component claims the same tool name. Links register nothing by default.",
1924
2058
  unregisteredWhen: "The link unmounts or opts back out."
1925
- }, kn = q({
2059
+ }, Pn = I({
1926
2060
  name: "Link",
1927
2061
  category: "navigation",
1928
2062
  summary: "A navigation link. It publishes its destination as state, so an agent reading the page in text learns the URL rather than having to click to find out, and it renders a real anchor in both views.",
@@ -1975,7 +2109,7 @@ const kt = {
1975
2109
  }
1976
2110
  },
1977
2111
  tools: {
1978
- open: kt
2112
+ open: Tt
1979
2113
  },
1980
2114
  agentView: {
1981
2115
  example: '- **Link** "Button" [active, href=#/Button]'
@@ -2003,37 +2137,37 @@ const kt = {
2003
2137
  notes: "active sets aria-current=page. External links open in a new context with rel=noreferrer noopener, and carry their outward mark as a pseudo-element with empty alternative text so it never reaches the accessible name or the tool name. Inside Text a link is underlined all the time, so colour is never the only thing distinguishing it from the prose around it."
2004
2138
  }
2005
2139
  });
2006
- function mo(e) {
2140
+ function Oa(e) {
2007
2141
  const {
2008
2142
  href: t,
2009
2143
  active: n = !1,
2010
- external: o = !1,
2011
- agentTool: a = !1,
2012
- agentName: r,
2013
- children: s,
2014
- ref: i,
2144
+ external: a = !1,
2145
+ agentTool: o = !1,
2146
+ agentName: i,
2147
+ children: l,
2148
+ ref: r,
2015
2149
  onClick: d,
2016
2150
  ...c
2017
- } = e, p = U(), u = G(), g = m(null), h = B(
2018
- (A) => {
2019
- g.current = A, typeof i == "function" ? i(A) : i != null && (i.current = A);
2020
- },
2021
- [i]
2022
- ), y = r ?? F(s), f = B(() => {
2023
- const A = g.current;
2024
- return A === null ? "This link renders no element in the current view. Navigate to its href instead." : (A.click(), `Following ${A.getAttribute("href") ?? t}.`);
2151
+ } = e, p = q(), u = G(), g = m(null), h = B(
2152
+ (C) => {
2153
+ g.current = C, typeof r == "function" ? r(C) : r != null && (r.current = C);
2154
+ },
2155
+ [r]
2156
+ ), y = i ?? F(l), f = B(() => {
2157
+ const C = g.current;
2158
+ return C === null ? "This link renders no element in the current view. Navigate to its href instead." : (C.click(), `Following ${C.getAttribute("href") ?? t}.`);
2025
2159
  }, [t]), b = V({
2026
- spec: kt,
2160
+ spec: Tt,
2027
2161
  label: y,
2028
- enabled: a,
2162
+ enabled: o,
2029
2163
  execute: f
2030
- }), w = $({
2031
- component: kn.name,
2032
- label: F(s),
2164
+ }), w = R({
2165
+ component: Pn.name,
2166
+ label: F(l),
2033
2167
  tool: b,
2034
- state: { href: t, active: n, external: o }
2035
- }), T = o ? { target: "_blank", rel: "noreferrer noopener" } : { target: void 0, rel: void 0 };
2036
- return p === "agent" ? u === "never" ? /* @__PURE__ */ l(I, { node: w }) : /* @__PURE__ */ l(
2168
+ state: { href: t, active: n, external: a }
2169
+ }), T = a ? { target: "_blank", rel: "noreferrer noopener" } : { target: void 0, rel: void 0 };
2170
+ return p === "agent" ? u === "never" ? /* @__PURE__ */ s(U, { node: w }) : /* @__PURE__ */ s(
2037
2171
  ue,
2038
2172
  {
2039
2173
  node: w,
@@ -2044,7 +2178,7 @@ function mo(e) {
2044
2178
  target: T.target,
2045
2179
  rel: T.rel
2046
2180
  }
2047
- ) : /* @__PURE__ */ l(
2181
+ ) : /* @__PURE__ */ s(
2048
2182
  "a",
2049
2183
  {
2050
2184
  ...c,
@@ -2055,11 +2189,11 @@ function mo(e) {
2055
2189
  "aria-current": n ? "page" : void 0,
2056
2190
  target: T.target,
2057
2191
  rel: T.rel,
2058
- children: s
2192
+ children: l
2059
2193
  }
2060
2194
  );
2061
2195
  }
2062
- const Tn = q({
2196
+ const Nn = I({
2063
2197
  name: "List",
2064
2198
  category: "display",
2065
2199
  summary: "A bulleted or numbered list built from an array of items. Each item is an addressable part carrying its position, so an agent can cite item three without counting lines.",
@@ -2136,42 +2270,42 @@ const Tn = q({
2136
2270
  notes: "A real ul or ol named by its label, with an explicit list role because the custom markers require list-style none and Safari would otherwise drop the list semantics. The item count is announced, and the markers are drawn as pseudo-elements."
2137
2271
  }
2138
2272
  });
2139
- function fo(e) {
2140
- const { label: t, items: n, ordered: o = !1, emptyLabel: a = "Empty", ...r } = e, s = U(), i = n.length === 0, d = n.map((u, g) => {
2273
+ function $a(e) {
2274
+ const { label: t, items: n, ordered: a = !1, emptyLabel: o = "Empty", ...i } = e, l = q(), r = n.length === 0, d = n.map((u, g) => {
2141
2275
  const h = F(u);
2142
2276
  return {
2143
2277
  part: "item",
2144
2278
  state: { index: String(g + 1) },
2145
2279
  ...h === void 0 ? {} : { label: h }
2146
2280
  };
2147
- }), c = $({
2148
- component: Tn.name,
2281
+ }), c = R({
2282
+ component: Nn.name,
2149
2283
  label: t,
2150
- state: { items: String(n.length), ordered: o, empty: i },
2284
+ state: { items: String(n.length), ordered: a, empty: r },
2151
2285
  parts: d
2152
2286
  });
2153
- return s === "agent" ? /* @__PURE__ */ l(I, { node: c }) : /* @__PURE__ */ l(
2154
- o ? "ol" : "ul",
2287
+ return l === "agent" ? /* @__PURE__ */ s(U, { node: c }) : /* @__PURE__ */ s(
2288
+ a ? "ol" : "ul",
2155
2289
  {
2156
- ...r,
2290
+ ...i,
2157
2291
  ...M(c),
2158
2292
  role: "list",
2159
2293
  "aria-label": t,
2160
- children: i ? /* @__PURE__ */ l("li", { children: a }) : n.map((u, g) => /* @__PURE__ */ l(
2294
+ children: r ? /* @__PURE__ */ s("li", { children: o }) : n.map((u, g) => /* @__PURE__ */ s(
2161
2295
  "li",
2162
2296
  {
2163
2297
  ...L({
2164
2298
  part: "item",
2165
2299
  state: { index: String(g + 1) }
2166
2300
  }),
2167
- children: /* @__PURE__ */ l("span", { children: u })
2301
+ children: /* @__PURE__ */ s("span", { children: u })
2168
2302
  },
2169
2303
  `${g}-${String(F(u))}`
2170
2304
  ))
2171
2305
  }
2172
2306
  );
2173
2307
  }
2174
- const xn = q({
2308
+ const Ln = I({
2175
2309
  name: "MetaLine",
2176
2310
  category: "display",
2177
2311
  summary: "A slash-separated manifest line of term–detail pairs: serials, build strings, issue dates. It is chrome, not content, and in the agent view it reads as the same single line of text a person sees.",
@@ -2222,26 +2356,26 @@ const xn = q({
2222
2356
  notes: "The separators are real text, so the accessible name is the same line the agent view carries. Nothing in the line is interactive."
2223
2357
  }
2224
2358
  });
2225
- function bo(e) {
2226
- const { entries: t, ...n } = e, o = U();
2359
+ function Da(e) {
2360
+ const { entries: t, ...n } = e, a = q();
2227
2361
  if (t.length === 0) return null;
2228
- const a = t.map((s) => `${s.term}: ${s.detail}`).join(" / "), r = $({
2229
- component: xn.name,
2230
- label: a,
2362
+ const o = t.map((l) => `${l.term}: ${l.detail}`).join(" / "), i = R({
2363
+ component: Ln.name,
2364
+ label: o,
2231
2365
  state: { entries: String(t.length) }
2232
2366
  });
2233
- return o === "agent" ? /* @__PURE__ */ l(I, { node: r }) : /* @__PURE__ */ l("p", { ...n, ...M(r), children: t.map((s, i) => /* @__PURE__ */ C(Se, { children: [
2234
- i > 0 ? " / " : null,
2235
- /* @__PURE__ */ C("span", { children: [
2236
- /* @__PURE__ */ C("span", { children: [
2237
- s.term,
2367
+ return a === "agent" ? /* @__PURE__ */ s(U, { node: i }) : /* @__PURE__ */ s("p", { ...n, ...M(i), children: t.map((l, r) => /* @__PURE__ */ A(Se, { children: [
2368
+ r > 0 ? " / " : null,
2369
+ /* @__PURE__ */ A("span", { children: [
2370
+ /* @__PURE__ */ A("span", { children: [
2371
+ l.term,
2238
2372
  ": "
2239
2373
  ] }),
2240
- /* @__PURE__ */ l("span", { children: s.detail })
2374
+ /* @__PURE__ */ s("span", { children: l.detail })
2241
2375
  ] })
2242
- ] }, `${s.term}-${i}`)) });
2376
+ ] }, `${l.term}-${r}`)) });
2243
2377
  }
2244
- const An = q({
2378
+ const Rn = I({
2245
2379
  name: "Nav",
2246
2380
  category: "navigation",
2247
2381
  summary: "A labelled navigation landmark: the region that holds a page's links to elsewhere.",
@@ -2292,11 +2426,11 @@ const An = q({
2292
2426
  }
2293
2427
  ]
2294
2428
  });
2295
- function vo(e) {
2296
- const { label: t, children: n, ...o } = e, a = U(), r = $({ component: An.name, label: t, region: !0 });
2297
- return a === "agent" ? /* @__PURE__ */ l(I, { node: r, children: n }) : /* @__PURE__ */ l("nav", { ...o, ...M(r), "aria-label": t, children: n });
2429
+ function Ea(e) {
2430
+ const { label: t, children: n, ...a } = e, o = q(), i = R({ component: Rn.name, label: t, region: !0 });
2431
+ return o === "agent" ? /* @__PURE__ */ s(U, { node: i, children: n }) : /* @__PURE__ */ s("nav", { ...a, ...M(i), "aria-label": t, children: n });
2298
2432
  }
2299
- const Cn = q({
2433
+ const On = I({
2300
2434
  name: "NavGroup",
2301
2435
  category: "navigation",
2302
2436
  summary: "A labelled cluster of links inside a Nav. The label names the group for screen readers and agents alike.",
@@ -2337,17 +2471,17 @@ const Cn = q({
2337
2471
  }
2338
2472
  ]
2339
2473
  });
2340
- function wo(e) {
2341
- const { label: t, children: n, ...o } = e, a = U(), r = $({ component: Cn.name, label: t });
2342
- return a === "agent" ? /* @__PURE__ */ l(I, { node: r, children: n }) : (
2474
+ function Ma(e) {
2475
+ const { label: t, children: n, ...a } = e, o = q(), i = R({ component: On.name, label: t });
2476
+ return o === "agent" ? /* @__PURE__ */ s(U, { node: i, children: n }) : (
2343
2477
  // biome-ignore lint/a11y/useSemanticElements: the suggested fieldset groups form controls; this groups links, and group is the ARIA role for exactly that
2344
- /* @__PURE__ */ C("div", { ...o, ...M(r), role: "group", "aria-label": t, children: [
2345
- /* @__PURE__ */ l("span", { children: t }),
2478
+ /* @__PURE__ */ A("div", { ...a, ...M(i), role: "group", "aria-label": t, children: [
2479
+ /* @__PURE__ */ s("span", { children: t }),
2346
2480
  n
2347
2481
  ] })
2348
2482
  );
2349
2483
  }
2350
- const Sn = q({
2484
+ const $n = I({
2351
2485
  name: "PageHeader",
2352
2486
  category: "layout",
2353
2487
  summary: "The top of a page: its h1 title, the Tag chips that classify it, an optional page-level control, and a lede underneath.",
@@ -2400,31 +2534,31 @@ const Sn = q({
2400
2534
  }
2401
2535
  ]
2402
2536
  });
2403
- function yo(e) {
2404
- const { label: t, tags: n, actions: o, children: a, ...r } = e, s = U(), i = $({
2405
- component: Sn.name,
2537
+ function Ia(e) {
2538
+ const { label: t, tags: n, actions: a, children: o, ...i } = e, l = q(), r = R({
2539
+ component: $n.name,
2406
2540
  label: t,
2407
2541
  region: !0
2408
2542
  });
2409
- if (s === "agent")
2410
- return /* @__PURE__ */ C(I, { node: i, children: [
2543
+ if (l === "agent")
2544
+ return /* @__PURE__ */ A(U, { node: r, children: [
2411
2545
  n,
2412
- o,
2413
- a
2546
+ a,
2547
+ o
2414
2548
  ] });
2415
- const d = Ye.toArray(a).length > 0;
2416
- return /* @__PURE__ */ C("header", { ...r, ...M(i), children: [
2417
- /* @__PURE__ */ C("div", { children: [
2418
- /* @__PURE__ */ C("div", { children: [
2419
- /* @__PURE__ */ l("h1", { children: t }),
2420
- n === void 0 ? null : /* @__PURE__ */ l("span", { children: n })
2549
+ const d = Je.toArray(o).length > 0;
2550
+ return /* @__PURE__ */ A("header", { ...i, ...M(r), children: [
2551
+ /* @__PURE__ */ A("div", { children: [
2552
+ /* @__PURE__ */ A("div", { children: [
2553
+ /* @__PURE__ */ s("h1", { children: t }),
2554
+ n === void 0 ? null : /* @__PURE__ */ s("span", { children: n })
2421
2555
  ] }),
2422
- o === void 0 ? null : /* @__PURE__ */ l("span", { children: o })
2556
+ a === void 0 ? null : /* @__PURE__ */ s("span", { children: a })
2423
2557
  ] }),
2424
- d ? /* @__PURE__ */ l("div", { children: a }) : null
2558
+ d ? /* @__PURE__ */ s("div", { children: o }) : null
2425
2559
  ] });
2426
2560
  }
2427
- const Nn = q({
2561
+ const Dn = I({
2428
2562
  name: "Panel",
2429
2563
  category: "layout",
2430
2564
  summary: "A labelled region with a header band and an optional slot for the controls that act on it. Everything on a Sprint page lives inside one.",
@@ -2521,36 +2655,36 @@ const Nn = q({
2521
2655
  }
2522
2656
  ]
2523
2657
  });
2524
- function ko(e) {
2658
+ function qa(e) {
2525
2659
  const {
2526
2660
  label: t,
2527
2661
  headingLevel: n,
2528
- actions: o,
2529
- flush: a = !1,
2530
- emptyLabel: r = "Empty",
2531
- children: s,
2532
- ...i
2533
- } = e, d = U(), c = Ye.toArray(s).length === 0, p = $({
2534
- component: Nn.name,
2662
+ actions: a,
2663
+ flush: o = !1,
2664
+ emptyLabel: i = "Empty",
2665
+ children: l,
2666
+ ...r
2667
+ } = e, d = q(), c = Je.toArray(l).length === 0, p = R({
2668
+ component: Dn.name,
2535
2669
  label: t,
2536
2670
  region: !0,
2537
- state: { flush: a, empty: c }
2671
+ state: { flush: o, empty: c }
2538
2672
  });
2539
2673
  if (d === "agent")
2540
- return /* @__PURE__ */ C(I, { node: p, children: [
2541
- o,
2542
- s
2674
+ return /* @__PURE__ */ A(U, { node: p, children: [
2675
+ a,
2676
+ l
2543
2677
  ] });
2544
2678
  const u = n === void 0 ? "span" : `h${n}`;
2545
- return /* @__PURE__ */ C("section", { ...i, ...M(p), "aria-label": t, children: [
2546
- /* @__PURE__ */ C("header", { children: [
2547
- /* @__PURE__ */ l(u, { children: t }),
2548
- o === void 0 ? null : /* @__PURE__ */ l("span", { children: o })
2679
+ return /* @__PURE__ */ A("section", { ...r, ...M(p), "aria-label": t, children: [
2680
+ /* @__PURE__ */ A("header", { children: [
2681
+ /* @__PURE__ */ s(u, { children: t }),
2682
+ a === void 0 ? null : /* @__PURE__ */ s("span", { children: a })
2549
2683
  ] }),
2550
- /* @__PURE__ */ l("div", { children: c ? /* @__PURE__ */ l("span", { children: r }) : s })
2684
+ /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s("span", { children: i }) : l })
2551
2685
  ] });
2552
2686
  }
2553
- const Pn = q({
2687
+ const En = I({
2554
2688
  name: "SecretField",
2555
2689
  category: "display",
2556
2690
  summary: "A sensitive value shown once or on demand: an API key, a recovery code, a signing secret. Masked by default with reveal and copy controls, and the value never reaches any agent surface.",
@@ -2609,12 +2743,12 @@ const Pn = q({
2609
2743
  a11y: {
2610
2744
  notes: "The reveal control is a toggle button with aria-pressed; the masked value is announced as a hidden secret rather than as bullet characters. Copy announces its success by swapping its label to Copied."
2611
2745
  }
2612
- }), Rn = "••••••••••••", Ln = 1200;
2613
- function To(e) {
2614
- const { label: t, value: n, hint: o, defaultRevealed: a = !1, ...r } = e, s = U(), [i, d] = J(a), [c, p] = J(!1);
2615
- _(() => {
2746
+ }), Mn = "••••••••••••", In = 1200;
2747
+ function Ua(e) {
2748
+ const { label: t, value: n, hint: a, defaultRevealed: o = !1, ...i } = e, l = q(), [r, d] = Y(o), [c, p] = Y(!1);
2749
+ j(() => {
2616
2750
  if (!c) return;
2617
- const f = setTimeout(() => p(!1), Ln);
2751
+ const f = setTimeout(() => p(!1), In);
2618
2752
  return () => clearTimeout(f);
2619
2753
  }, [c]);
2620
2754
  const u = () => {
@@ -2623,34 +2757,34 @@ function To(e) {
2623
2757
  () => p(!0),
2624
2758
  () => p(!1)
2625
2759
  );
2626
- }, g = n !== "", h = o === void 0 ? [] : [{ part: "hint", label: o, state: {} }], y = $({
2627
- component: Pn.name,
2760
+ }, g = n !== "", h = a === void 0 ? [] : [{ part: "hint", label: a, state: {} }], y = R({
2761
+ component: En.name,
2628
2762
  label: t,
2629
- state: { filled: g, revealed: i },
2763
+ state: { filled: g, revealed: r },
2630
2764
  parts: h
2631
2765
  });
2632
- return s === "agent" ? /* @__PURE__ */ l(I, { node: y }) : /* @__PURE__ */ C("div", { ...r, ...M(y), children: [
2633
- /* @__PURE__ */ l("span", { ...L({ part: "label", state: {} }), children: t }),
2634
- /* @__PURE__ */ C("div", { ...L({ part: "control", state: {} }), children: [
2635
- /* @__PURE__ */ l(
2766
+ return l === "agent" ? /* @__PURE__ */ s(U, { node: y }) : /* @__PURE__ */ A("div", { ...i, ...M(y), children: [
2767
+ /* @__PURE__ */ s("span", { ...L({ part: "label", state: {} }), children: t }),
2768
+ /* @__PURE__ */ A("div", { ...L({ part: "control", state: {} }), children: [
2769
+ /* @__PURE__ */ s(
2636
2770
  "output",
2637
2771
  {
2638
2772
  ...L({ part: "value", state: {} }),
2639
- "aria-label": i ? void 0 : "Hidden secret",
2640
- children: i ? n : Rn
2773
+ "aria-label": r ? void 0 : "Hidden secret",
2774
+ children: r ? n : Mn
2641
2775
  }
2642
2776
  ),
2643
- /* @__PURE__ */ l(
2777
+ /* @__PURE__ */ s(
2644
2778
  "button",
2645
2779
  {
2646
2780
  ...L({ part: "reveal", state: {} }),
2647
2781
  type: "button",
2648
- "aria-pressed": i,
2782
+ "aria-pressed": r,
2649
2783
  onClick: () => d((f) => !f),
2650
- children: i ? "Hide" : "Reveal"
2784
+ children: r ? "Hide" : "Reveal"
2651
2785
  }
2652
2786
  ),
2653
- /* @__PURE__ */ l(
2787
+ /* @__PURE__ */ s(
2654
2788
  "button",
2655
2789
  {
2656
2790
  ...L({
@@ -2663,10 +2797,10 @@ function To(e) {
2663
2797
  }
2664
2798
  )
2665
2799
  ] }),
2666
- o === void 0 ? null : /* @__PURE__ */ l("p", { ...L({ part: "hint", state: {} }), children: o })
2800
+ a === void 0 ? null : /* @__PURE__ */ s("p", { ...L({ part: "hint", state: {} }), children: a })
2667
2801
  ] });
2668
2802
  }
2669
- const re = {
2803
+ const ie = {
2670
2804
  verb: "select",
2671
2805
  description: "Select one of this control's options by its visible label, exactly as a person clicking it would. Only one option is selected at a time, so this replaces the current one. Returns the control's state after the change, so a follow-up read is unnecessary.",
2672
2806
  inputSchema: {
@@ -2683,7 +2817,7 @@ const re = {
2683
2817
  untrustedContent: !0,
2684
2818
  registeredWhen: "The control is mounted, enabled, has a resolvable label, and no other component claims the same tool name. The registered schema enumerates the current option labels.",
2685
2819
  unregisteredWhen: "The control unmounts or becomes disabled."
2686
- }, He = q({
2820
+ }, He = I({
2687
2821
  name: "SegmentedControl",
2688
2822
  category: "input",
2689
2823
  summary: "A short row of mutually exclusive options, all visible at once: a radio group that registers a single select tool whose schema enumerates the options currently on screen.",
@@ -2737,7 +2871,7 @@ const re = {
2737
2871
  }
2738
2872
  },
2739
2873
  tools: {
2740
- select: re
2874
+ select: ie
2741
2875
  },
2742
2876
  agentView: {
2743
2877
  example: '- **SegmentedControl** "Page view" [value=human] → tool `select-page-view`\n - part `option` "human" [checked]\n - part `option` "agent"'
@@ -2782,34 +2916,34 @@ const re = {
2782
2916
  notes: "Roving tabindex: only the selected option is in the tab order. Selection follows focus, which is the expected behaviour for a radio group."
2783
2917
  }
2784
2918
  });
2785
- function $n(e) {
2786
- const t = re.inputSchema.properties.option;
2919
+ function qn(e) {
2920
+ const t = ie.inputSchema.properties.option;
2787
2921
  return {
2788
- ...re.inputSchema,
2922
+ ...ie.inputSchema,
2789
2923
  properties: {
2790
- ...re.inputSchema.properties,
2924
+ ...ie.inputSchema.properties,
2791
2925
  ...t === void 0 ? {} : { option: { ...t, enum: e.map((n) => n.label) } }
2792
2926
  }
2793
2927
  };
2794
2928
  }
2795
- function xo(e) {
2929
+ function Wa(e) {
2796
2930
  const {
2797
2931
  label: t,
2798
2932
  options: n,
2799
- value: o,
2800
- onChange: a,
2801
- disabled: r = !1,
2802
- agentName: s,
2803
- agentTool: i = !0,
2933
+ value: a,
2934
+ onChange: o,
2935
+ disabled: i = !1,
2936
+ agentName: l,
2937
+ agentTool: r = !0,
2804
2938
  ...d
2805
- } = e, c = U(), p = G(), u = H(), g = m(/* @__PURE__ */ new Map()), h = m(a);
2806
- h.current = a;
2939
+ } = e, c = q(), p = G(), u = H(), g = m(/* @__PURE__ */ new Map()), h = m(o);
2940
+ h.current = o;
2807
2941
  const y = m(n);
2808
2942
  y.current = n;
2809
2943
  const f = m(u);
2810
2944
  f.current = u;
2811
- const b = m($({ component: He.name })), w = m(!0);
2812
- _(() => (w.current = !0, () => {
2945
+ const b = m(R({ component: He.name })), w = m(!0);
2946
+ j(() => (w.current = !0, () => {
2813
2947
  w.current = !1;
2814
2948
  }), []);
2815
2949
  const T = B((k) => {
@@ -2819,40 +2953,40 @@ function xo(e) {
2819
2953
  return;
2820
2954
  }
2821
2955
  z(() => h.current(k));
2822
- }, []), A = B(
2956
+ }, []), C = B(
2823
2957
  async (k) => {
2824
- const x = typeof k.option == "string" ? k.option : "", D = y.current, P = D.find((N) => N.label === x);
2825
- return P === void 0 ? `No option named "${x}". This control offers: ${D.map((N) => `"${N.label}"`).join(", ")}.` : (T(P.value), await K(), w.current ? `Selected. The control is now:
2958
+ const x = typeof k.option == "string" ? k.option : "", D = y.current, N = D.find((P) => P.label === x);
2959
+ return N === void 0 ? `No option named "${x}". This control offers: ${D.map((P) => `"${P.label}"`).join(", ")}.` : (T(N.value), await K(), w.current ? `Selected. The control is now:
2826
2960
  ${f.current([b.current])}` : "The selection removed this control from the page.");
2827
2961
  },
2828
2962
  [T]
2829
- ), R = ee(() => $n(n), [n]), O = V({
2830
- spec: re,
2831
- label: s ?? t,
2832
- inputSchema: R,
2833
- enabled: i && !r,
2834
- execute: A
2963
+ ), O = ee(() => qn(n), [n]), $ = V({
2964
+ spec: ie,
2965
+ label: l ?? t,
2966
+ inputSchema: O,
2967
+ enabled: r && !i,
2968
+ execute: C
2835
2969
  }), E = n.map((k) => ({
2836
2970
  part: "option",
2837
2971
  label: k.label,
2838
2972
  state: {
2839
- ...k.value === o ? { checked: !0 } : {},
2840
- ...r ? { disabled: !0 } : {}
2973
+ ...k.value === a ? { checked: !0 } : {},
2974
+ ...i ? { disabled: !0 } : {}
2841
2975
  }
2842
- })), S = $({
2976
+ })), S = R({
2843
2977
  component: He.name,
2844
2978
  label: t,
2845
- tool: O,
2846
- state: { value: o, disabled: r },
2979
+ tool: $,
2980
+ state: { value: a, disabled: i },
2847
2981
  parts: E
2848
2982
  });
2849
2983
  b.current = S;
2850
2984
  const v = (k) => {
2851
- if (!["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "Home", "End"].includes(k.key) || r) return;
2852
- const D = n.findIndex((Y) => Y.value === o), P = k.key === "ArrowRight" || k.key === "ArrowDown" ? 1 : -1, N = k.key === "Home" ? 0 : k.key === "End" ? n.length - 1 : (D + P + n.length) % n.length, j = n[N];
2853
- j !== void 0 && (k.preventDefault(), g.current.get(j.value)?.focus(), T(j.value));
2985
+ if (!["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "Home", "End"].includes(k.key) || i) return;
2986
+ const D = n.findIndex((J) => J.value === a), N = k.key === "ArrowRight" || k.key === "ArrowDown" ? 1 : -1, P = k.key === "Home" ? 0 : k.key === "End" ? n.length - 1 : (D + N + n.length) % n.length, _ = n[P];
2987
+ _ !== void 0 && (k.preventDefault(), g.current.get(_.value)?.focus(), T(_.value));
2854
2988
  };
2855
- return c === "agent" ? r || p === "never" ? /* @__PURE__ */ l(I, { node: S }) : /* @__PURE__ */ l(
2989
+ return c === "agent" ? i || p === "never" ? /* @__PURE__ */ s(U, { node: S }) : /* @__PURE__ */ s(
2856
2990
  we,
2857
2991
  {
2858
2992
  node: S,
@@ -2861,7 +2995,7 @@ ${f.current([b.current])}` : "The selection removed this control from the page."
2861
2995
  D !== void 0 && T(D.value);
2862
2996
  }
2863
2997
  }
2864
- ) : /* @__PURE__ */ l(
2998
+ ) : /* @__PURE__ */ s(
2865
2999
  "div",
2866
3000
  {
2867
3001
  ...d,
@@ -2870,20 +3004,20 @@ ${f.current([b.current])}` : "The selection removed this control from the page."
2870
3004
  "aria-label": t,
2871
3005
  onKeyDown: v,
2872
3006
  children: n.map((k, x) => {
2873
- const D = k.value === o, P = n.some((N) => N.value === o) ? D : x === 0;
2874
- return /* @__PURE__ */ l(
3007
+ const D = k.value === a, N = n.some((P) => P.value === a) ? D : x === 0;
3008
+ return /* @__PURE__ */ s(
2875
3009
  "button",
2876
3010
  {
2877
3011
  type: "button",
2878
3012
  role: "radio",
2879
3013
  "aria-checked": D,
2880
- tabIndex: P ? 0 : -1,
2881
- disabled: r,
2882
- ref: (N) => {
2883
- N === null ? g.current.delete(k.value) : g.current.set(k.value, N);
3014
+ tabIndex: N ? 0 : -1,
3015
+ disabled: i,
3016
+ ref: (P) => {
3017
+ P === null ? g.current.delete(k.value) : g.current.set(k.value, P);
2884
3018
  },
2885
3019
  ...L(E[x] ?? { part: "option", state: {} }),
2886
- onClick: () => a(k.value),
3020
+ onClick: () => o(k.value),
2887
3021
  children: k.label
2888
3022
  },
2889
3023
  k.value
@@ -2892,7 +3026,7 @@ ${f.current([b.current])}` : "The selection removed this control from the page."
2892
3026
  }
2893
3027
  );
2894
3028
  }
2895
- const ie = {
3029
+ const re = {
2896
3030
  verb: "select",
2897
3031
  description: "Choose one of this dropdown's options by its visible label, exactly as a person opening it and clicking one would. Only one option is chosen at a time, so this replaces the current choice. Returns the dropdown's state after the change, so a follow-up read is unnecessary.",
2898
3032
  inputSchema: {
@@ -2909,7 +3043,7 @@ const ie = {
2909
3043
  untrustedContent: !0,
2910
3044
  registeredWhen: "The dropdown is mounted, enabled, has a resolvable label, and no other component claims the same tool name. The registered schema enumerates the current option labels.",
2911
3045
  unregisteredWhen: "The dropdown unmounts or becomes disabled."
2912
- }, Ge = q({
3046
+ }, Ge = I({
2913
3047
  name: "Select",
2914
3048
  category: "input",
2915
3049
  summary: "A dropdown of mutually exclusive options behind a native select, carrying its own label, hint, and error. It registers a single select tool whose schema enumerates the option labels currently on offer.",
@@ -2996,7 +3130,7 @@ const ie = {
2996
3130
  }
2997
3131
  },
2998
3132
  tools: {
2999
- select: ie
3133
+ select: re
3000
3134
  },
3001
3135
  agentView: {
3002
3136
  example: '- **Select** "Region" [value=eu-1] → tool `select-region`\n - part `option` "North Atlantic"\n - part `option` "Northern Europe" [checked]\n - part `option` "East Asia"'
@@ -3057,111 +3191,111 @@ const ie = {
3057
3191
  notes: "A native select element, so the platform owns the listbox interaction. The label is associated via htmlFor; errors set aria-invalid and link with aria-describedby."
3058
3192
  }
3059
3193
  });
3060
- function Tt(e, t) {
3061
- const n = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, o = Object.getOwnPropertyDescriptor(n, "value")?.set;
3062
- o !== void 0 && (o.call(e, t), e.dispatchEvent(new Event("input", { bubbles: !0 })));
3194
+ function xt(e, t) {
3195
+ const n = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(n, "value")?.set;
3196
+ a !== void 0 && (a.call(e, t), e.dispatchEvent(new Event("input", { bubbles: !0 })));
3063
3197
  }
3064
- function On(e, t) {
3198
+ function Un(e, t) {
3065
3199
  const n = Object.getOwnPropertyDescriptor(
3066
3200
  HTMLSelectElement.prototype,
3067
3201
  "value"
3068
3202
  )?.set;
3069
3203
  n !== void 0 && (n.call(e, t), e.dispatchEvent(new Event("change", { bubbles: !0 })));
3070
3204
  }
3071
- function Dn(e) {
3072
- const t = ie.inputSchema.properties.option;
3205
+ function Wn(e) {
3206
+ const t = re.inputSchema.properties.option;
3073
3207
  return {
3074
- ...ie.inputSchema,
3208
+ ...re.inputSchema,
3075
3209
  properties: {
3076
- ...ie.inputSchema.properties,
3210
+ ...re.inputSchema.properties,
3077
3211
  ...t === void 0 ? {} : { option: { ...t, enum: e.map((n) => n.label) } }
3078
3212
  }
3079
3213
  };
3080
3214
  }
3081
- function En(e, t) {
3215
+ function Bn(e, t) {
3082
3216
  return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
3083
3217
  }
3084
- function Ao(e) {
3218
+ function Ba(e) {
3085
3219
  const {
3086
3220
  label: t,
3087
3221
  options: n,
3088
- value: o,
3089
- onChange: a,
3090
- placeholder: r,
3091
- hint: s,
3092
- error: i,
3222
+ value: a,
3223
+ onChange: o,
3224
+ placeholder: i,
3225
+ hint: l,
3226
+ error: r,
3093
3227
  name: d,
3094
3228
  disabled: c = !1,
3095
3229
  required: p = !1,
3096
3230
  agentName: u,
3097
3231
  agentTool: g = !0,
3098
3232
  ...h
3099
- } = e, y = U(), f = G(), b = H(), w = le(), T = m(null), A = m(a);
3100
- A.current = a;
3101
- const R = m(n);
3102
- R.current = n;
3103
- const O = m(b);
3104
- O.current = b;
3105
- const E = m($({ component: Ge.name })), S = m(!0);
3106
- _(() => (S.current = !0, () => {
3233
+ } = e, y = q(), f = G(), b = H(), w = le(), T = m(null), C = m(o);
3234
+ C.current = o;
3235
+ const O = m(n);
3236
+ O.current = n;
3237
+ const $ = m(b);
3238
+ $.current = b;
3239
+ const E = m(R({ component: Ge.name })), S = m(!0);
3240
+ j(() => (S.current = !0, () => {
3107
3241
  S.current = !1;
3108
3242
  }), []);
3109
3243
  const v = B((W) => {
3110
3244
  const X = T.current;
3111
3245
  if (X !== null) {
3112
- On(X, W);
3246
+ Un(X, W);
3113
3247
  return;
3114
3248
  }
3115
- z(() => A.current(W));
3249
+ z(() => C.current(W));
3116
3250
  }, []), k = B(
3117
3251
  async (W) => {
3118
- const X = typeof W.option == "string" ? W.option : "", ae = R.current, Me = ae.find((Te) => Te.label === X);
3119
- return Me === void 0 ? `No option named "${X}". This dropdown offers: ${ae.map((Te) => `"${Te.label}"`).join(", ")}.` : (v(Me.value), await K(), S.current ? `Selected. The dropdown is now:
3120
- ${O.current([E.current])}` : "The selection removed this dropdown from the page.");
3252
+ const X = typeof W.option == "string" ? W.option : "", oe = O.current, Me = oe.find((Te) => Te.label === X);
3253
+ return Me === void 0 ? `No option named "${X}". This dropdown offers: ${oe.map((Te) => `"${Te.label}"`).join(", ")}.` : (v(Me.value), await K(), S.current ? `Selected. The dropdown is now:
3254
+ ${$.current([E.current])}` : "The selection removed this dropdown from the page.");
3121
3255
  },
3122
3256
  [v]
3123
- ), x = ee(() => Dn(n), [n]), D = V({
3124
- spec: ie,
3257
+ ), x = ee(() => Wn(n), [n]), D = V({
3258
+ spec: re,
3125
3259
  label: u ?? t,
3126
3260
  inputSchema: x,
3127
3261
  enabled: g && !c,
3128
3262
  execute: k
3129
- }), P = n.find((W) => W.value === o), N = n.map((W) => ({
3263
+ }), N = n.find((W) => W.value === a), P = n.map((W) => ({
3130
3264
  part: "option",
3131
3265
  label: W.label,
3132
3266
  state: {
3133
- ...W.value === o ? { checked: !0 } : {},
3267
+ ...W.value === a ? { checked: !0 } : {},
3134
3268
  ...c ? { disabled: !0 } : {}
3135
3269
  }
3136
- })), j = $({
3270
+ })), _ = R({
3137
3271
  component: Ge.name,
3138
3272
  label: t,
3139
3273
  tool: D,
3140
3274
  state: {
3141
- ...P === void 0 ? {} : { value: o },
3142
- empty: P === void 0,
3275
+ ...N === void 0 ? {} : { value: a },
3276
+ empty: N === void 0,
3143
3277
  disabled: c,
3144
3278
  required: p,
3145
- invalid: i !== void 0
3279
+ invalid: r !== void 0
3146
3280
  },
3147
- parts: [...N, ...En(i, s)]
3281
+ parts: [...P, ...Bn(r, l)]
3148
3282
  });
3149
- if (E.current = j, y === "agent")
3150
- return c || f === "never" ? /* @__PURE__ */ l(I, { node: j }) : /* @__PURE__ */ l(
3283
+ if (E.current = _, y === "agent")
3284
+ return c || f === "never" ? /* @__PURE__ */ s(U, { node: _ }) : /* @__PURE__ */ s(
3151
3285
  we,
3152
3286
  {
3153
- node: j,
3287
+ node: _,
3154
3288
  isActionable: (W) => W.part === "option",
3155
3289
  onActivate: (W, X) => {
3156
- const ae = n[X];
3157
- ae !== void 0 && v(ae.value);
3290
+ const oe = n[X];
3291
+ oe !== void 0 && v(oe.value);
3158
3292
  }
3159
3293
  }
3160
3294
  );
3161
- const Y = i !== void 0 ? `${w}-error` : s !== void 0 ? `${w}-hint` : void 0;
3162
- return /* @__PURE__ */ C("div", { ...h, ...M(j), children: [
3163
- /* @__PURE__ */ l("label", { htmlFor: w, children: t }),
3164
- /* @__PURE__ */ l("span", { ...L({ part: "control", state: {} }), children: /* @__PURE__ */ C(
3295
+ const J = r !== void 0 ? `${w}-error` : l !== void 0 ? `${w}-hint` : void 0;
3296
+ return /* @__PURE__ */ A("div", { ...h, ...M(_), children: [
3297
+ /* @__PURE__ */ s("label", { htmlFor: w, children: t }),
3298
+ /* @__PURE__ */ s("span", { ...L({ part: "control", state: {} }), children: /* @__PURE__ */ A(
3165
3299
  "select",
3166
3300
  {
3167
3301
  id: w,
@@ -3169,21 +3303,21 @@ ${O.current([E.current])}` : "The selection removed this dropdown from the page.
3169
3303
  ref: (W) => {
3170
3304
  T.current = W;
3171
3305
  },
3172
- value: P === void 0 ? "" : o,
3306
+ value: N === void 0 ? "" : a,
3173
3307
  name: d,
3174
3308
  disabled: c,
3175
3309
  required: p,
3176
- "aria-invalid": i !== void 0 || void 0,
3177
- "aria-describedby": Y,
3178
- onChange: (W) => a(W.currentTarget.value),
3310
+ "aria-invalid": r !== void 0 || void 0,
3311
+ "aria-describedby": J,
3312
+ onChange: (W) => o(W.currentTarget.value),
3179
3313
  children: [
3180
- P === void 0 ? /* @__PURE__ */ l("option", { value: "", disabled: !0, children: r ?? "Choose" }) : null,
3181
- n.map((W, X) => /* @__PURE__ */ l(
3314
+ N === void 0 ? /* @__PURE__ */ s("option", { value: "", disabled: !0, children: i ?? "Choose" }) : null,
3315
+ n.map((W, X) => /* @__PURE__ */ s(
3182
3316
  "option",
3183
3317
  {
3184
3318
  value: W.value,
3185
3319
  ...L(
3186
- N[X] ?? { part: "option", state: {} }
3320
+ P[X] ?? { part: "option", state: {} }
3187
3321
  ),
3188
3322
  children: W.label
3189
3323
  },
@@ -3192,10 +3326,10 @@ ${O.current([E.current])}` : "The selection removed this dropdown from the page.
3192
3326
  ]
3193
3327
  }
3194
3328
  ) }),
3195
- i !== void 0 ? /* @__PURE__ */ l("p", { id: Y, ...L({ part: "error", state: {} }), children: i }) : s !== void 0 ? /* @__PURE__ */ l("p", { id: Y, ...L({ part: "hint", state: {} }), children: s }) : null
3329
+ r !== void 0 ? /* @__PURE__ */ s("p", { id: J, ...L({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: J, ...L({ part: "hint", state: {} }), children: l }) : null
3196
3330
  ] });
3197
3331
  }
3198
- const Mn = q({
3332
+ const _n = I({
3199
3333
  name: "Shell",
3200
3334
  category: "layout",
3201
3335
  summary: "The page-level frame: a sidebar and a main content region, with the landmark wiring done once. On a phone the sidebar becomes a drawer behind a menu button.",
@@ -3267,50 +3401,50 @@ const Mn = q({
3267
3401
  }
3268
3402
  ]
3269
3403
  });
3270
- function Co(e) {
3404
+ function _a(e) {
3271
3405
  const {
3272
3406
  side: t,
3273
3407
  bar: n,
3274
- sideLabel: o = "Sidebar",
3275
- skipLabel: a = "Skip to content",
3276
- menuLabel: r = "Menu",
3277
- closeLabel: s = "Close",
3278
- children: i,
3408
+ sideLabel: a = "Sidebar",
3409
+ skipLabel: o = "Skip to content",
3410
+ menuLabel: i = "Menu",
3411
+ closeLabel: l = "Close",
3412
+ children: r,
3279
3413
  ...d
3280
- } = e, c = U(), [p, u] = J(!1), g = le(), h = m(null), y = B((b) => {
3414
+ } = e, c = q(), [p, u] = Y(!1), g = le(), h = m(null), y = B((b) => {
3281
3415
  const w = b.target;
3282
3416
  w instanceof Element && w.closest("a") !== null && u(!1);
3283
- }, []), f = $({
3284
- component: Mn.name,
3417
+ }, []), f = R({
3418
+ component: _n.name,
3285
3419
  region: !0,
3286
3420
  state: { open: p }
3287
3421
  });
3288
- return c === "agent" ? /* @__PURE__ */ C(Le, { children: [
3422
+ return c === "agent" ? /* @__PURE__ */ A(Re, { children: [
3289
3423
  n,
3290
3424
  t,
3291
- i
3292
- ] }) : /* @__PURE__ */ C("div", { ...d, ...M(f), children: [
3293
- /* @__PURE__ */ l("button", { type: "button", onClick: () => h.current?.focus(), children: a }),
3294
- /* @__PURE__ */ C("aside", { "aria-label": o, children: [
3295
- /* @__PURE__ */ C("div", { children: [
3425
+ r
3426
+ ] }) : /* @__PURE__ */ A("div", { ...d, ...M(f), children: [
3427
+ /* @__PURE__ */ s("button", { type: "button", onClick: () => h.current?.focus(), children: o }),
3428
+ /* @__PURE__ */ A("aside", { "aria-label": a, children: [
3429
+ /* @__PURE__ */ A("div", { children: [
3296
3430
  n,
3297
- /* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(
3298
- dn,
3431
+ /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(
3432
+ mn,
3299
3433
  {
3300
3434
  agentTool: !1,
3301
3435
  "aria-expanded": p,
3302
3436
  "aria-controls": g,
3303
3437
  onClick: () => u(!p),
3304
- children: p ? s : r
3438
+ children: p ? l : i
3305
3439
  }
3306
3440
  ) })
3307
3441
  ] }),
3308
- /* @__PURE__ */ l("div", { id: g, onClick: y, children: t })
3442
+ /* @__PURE__ */ s("div", { id: g, onClick: y, children: t })
3309
3443
  ] }),
3310
- /* @__PURE__ */ l("main", { ref: h, tabIndex: -1, children: i })
3444
+ /* @__PURE__ */ s("main", { ref: h, tabIndex: -1, children: r })
3311
3445
  ] });
3312
3446
  }
3313
- const qn = q({
3447
+ const jn = I({
3314
3448
  name: "Stack",
3315
3449
  category: "layout",
3316
3450
  summary: "The one-dimensional layout primitive: a row, a column, or an auto-filling grid, with spacing drawn from the space scale. It renders a plain box and nothing else.",
@@ -3417,27 +3551,27 @@ const qn = q({
3417
3551
  }
3418
3552
  ]
3419
3553
  });
3420
- function So(e) {
3554
+ function ja(e) {
3421
3555
  const {
3422
3556
  direction: t = "column",
3423
3557
  gap: n = "normal",
3424
- align: o,
3425
- justify: a,
3426
- wrap: r = !1,
3427
- collapse: s = !1,
3428
- min: i,
3558
+ align: a,
3559
+ justify: o,
3560
+ wrap: i = !1,
3561
+ collapse: l = !1,
3562
+ min: r,
3429
3563
  children: d,
3430
3564
  style: c,
3431
3565
  ...p
3432
- } = e, u = U(), g = $({
3433
- component: qn.name,
3434
- state: { direction: t, gap: n, align: o, justify: a, wrap: r, collapse: s }
3566
+ } = e, u = q(), g = R({
3567
+ component: jn.name,
3568
+ state: { direction: t, gap: n, align: a, justify: o, wrap: i, collapse: l }
3435
3569
  });
3436
- if (u === "agent") return /* @__PURE__ */ l(Le, { children: d });
3437
- const h = i === void 0 ? c : { ...c, "--sprint-stack-min": i };
3438
- return /* @__PURE__ */ l("div", { ...p, ...M(g), style: h, children: d });
3570
+ if (u === "agent") return /* @__PURE__ */ s(Re, { children: d });
3571
+ const h = r === void 0 ? c : { ...c, "--sprint-stack-min": r };
3572
+ return /* @__PURE__ */ s("div", { ...p, ...M(g), style: h, children: d });
3439
3573
  }
3440
- const xt = {
3574
+ const At = {
3441
3575
  verb: "set",
3442
3576
  description: "Switch this setting on or off by stating the end state, exactly as a person clicking it would. The change takes effect immediately. Setting the state it already has succeeds and changes nothing, so the call is safe to retry. Returns the switch's state after the call.",
3443
3577
  inputSchema: {
@@ -3454,7 +3588,7 @@ const xt = {
3454
3588
  untrustedContent: !0,
3455
3589
  registeredWhen: "The switch is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
3456
3590
  unregisteredWhen: "The switch unmounts or becomes disabled."
3457
- }, Ke = q({
3591
+ }, Ke = I({
3458
3592
  name: "Switch",
3459
3593
  category: "input",
3460
3594
  summary: "An on/off setting that takes effect the moment it changes. It registers one set tool that takes the end state rather than toggling.",
@@ -3503,7 +3637,7 @@ const xt = {
3503
3637
  }
3504
3638
  },
3505
3639
  tools: {
3506
- set: xt
3640
+ set: At
3507
3641
  },
3508
3642
  agentView: {
3509
3643
  example: '- **Switch** "Live telemetry" [on] → tool `set-live-telemetry`'
@@ -3526,32 +3660,32 @@ const xt = {
3526
3660
  notes: "A button with role switch and aria-checked, so the label and state read together. The thumb moves by a single-axis stepped translation and respects prefers-reduced-motion."
3527
3661
  }
3528
3662
  });
3529
- function No(e) {
3663
+ function Va(e) {
3530
3664
  const {
3531
3665
  label: t,
3532
3666
  on: n,
3533
- onChange: o,
3534
- disabled: a = !1,
3535
- agentName: r,
3536
- agentTool: s = !0,
3537
- ref: i,
3667
+ onChange: a,
3668
+ disabled: o = !1,
3669
+ agentName: i,
3670
+ agentTool: l = !0,
3671
+ ref: r,
3538
3672
  ...d
3539
- } = e, c = U(), p = G(), u = H(), g = m(null), h = B(
3673
+ } = e, c = q(), p = G(), u = H(), g = m(null), h = B(
3540
3674
  (E) => {
3541
- g.current = E, typeof i == "function" ? i(E) : i != null && (i.current = E);
3675
+ g.current = E, typeof r == "function" ? r(E) : r != null && (r.current = E);
3542
3676
  },
3543
- [i]
3544
- ), y = m(o);
3545
- y.current = o;
3677
+ [r]
3678
+ ), y = m(a);
3679
+ y.current = a;
3546
3680
  const f = m(n);
3547
3681
  f.current = n;
3548
3682
  const b = m(u);
3549
3683
  b.current = u;
3550
- const w = m($({ component: Ke.name })), T = m(!0);
3551
- _(() => (T.current = !0, () => {
3684
+ const w = m(R({ component: Ke.name })), T = m(!0);
3685
+ j(() => (T.current = !0, () => {
3552
3686
  T.current = !1;
3553
3687
  }), []);
3554
- const A = B(async (E) => {
3688
+ const C = B(async (E) => {
3555
3689
  const S = E.on;
3556
3690
  if (typeof S != "boolean")
3557
3691
  return 'Pass "on" as true or false; it states the end state.';
@@ -3562,35 +3696,35 @@ function No(e) {
3562
3696
  }
3563
3697
  return await K(), T.current ? `${v ? `Already ${S ? "on" : "off"}` : `Switched ${S ? "on" : "off"}`}. The switch is now:
3564
3698
  ${b.current([w.current])}` : "The change removed this switch from the page.";
3565
- }, []), R = V({
3566
- spec: xt,
3567
- label: r ?? t,
3568
- enabled: s && !a,
3569
- execute: A
3570
- }), O = $({
3699
+ }, []), O = V({
3700
+ spec: At,
3701
+ label: i ?? t,
3702
+ enabled: l && !o,
3703
+ execute: C
3704
+ }), $ = R({
3571
3705
  component: Ke.name,
3572
3706
  label: t,
3573
- tool: R,
3574
- state: { on: n, disabled: a }
3707
+ tool: O,
3708
+ state: { on: n, disabled: o }
3575
3709
  });
3576
- return w.current = O, c === "agent" ? a || p === "never" ? /* @__PURE__ */ l(I, { node: O }) : /* @__PURE__ */ l(ue, { node: O, ref: h, onClick: () => o(!n) }) : /* @__PURE__ */ C(
3710
+ return w.current = $, c === "agent" ? o || p === "never" ? /* @__PURE__ */ s(U, { node: $ }) : /* @__PURE__ */ s(ue, { node: $, ref: h, onClick: () => a(!n) }) : /* @__PURE__ */ A(
3577
3711
  "button",
3578
3712
  {
3579
3713
  ...d,
3580
- ...M(O),
3714
+ ...M($),
3581
3715
  type: "button",
3582
3716
  role: "switch",
3583
3717
  "aria-checked": n,
3584
- disabled: a,
3718
+ disabled: o,
3585
3719
  ref: h,
3586
- onClick: () => o(!n),
3720
+ onClick: () => a(!n),
3587
3721
  children: [
3588
- /* @__PURE__ */ l(
3722
+ /* @__PURE__ */ s(
3589
3723
  "span",
3590
3724
  {
3591
3725
  ...L({ part: "track", state: {} }),
3592
3726
  "aria-hidden": "true",
3593
- children: /* @__PURE__ */ l("span", { ...L({ part: "thumb", state: {} }) })
3727
+ children: /* @__PURE__ */ s("span", { ...L({ part: "thumb", state: {} }) })
3594
3728
  }
3595
3729
  ),
3596
3730
  t
@@ -3598,7 +3732,7 @@ ${b.current([w.current])}` : "The change removed this switch from the page.";
3598
3732
  }
3599
3733
  );
3600
3734
  }
3601
- const Un = q({
3735
+ const Vn = I({
3602
3736
  name: "Table",
3603
3737
  category: "display",
3604
3738
  summary: "A data grid built from columns and rows rather than from markup. In the agent stream it reads as a compact Markdown table; in the DOM each cell is addressable as a part carrying its column and row. On a narrow screen every row restacks into a labelled block instead of scrolling sideways.",
@@ -3689,41 +3823,41 @@ const Un = q({
3689
3823
  notes: "Column headers keep scope=col in every layout. On narrow screens each cell repeats its column header visually, marked aria-hidden so the real header association is not announced twice."
3690
3824
  }
3691
3825
  });
3692
- function Re(e, t) {
3826
+ function Le(e, t) {
3693
3827
  return e.id ?? String(t + 1);
3694
3828
  }
3695
- function At(e, t) {
3829
+ function Ct(e, t) {
3696
3830
  return {
3697
3831
  column: e.key,
3698
3832
  row: t,
3699
3833
  ...e.align === void 0 ? {} : { align: e.align }
3700
3834
  };
3701
3835
  }
3702
- function In(e, t) {
3836
+ function Fn(e, t) {
3703
3837
  return t.flatMap(
3704
- (n, o) => e.map((a) => {
3705
- const r = F(n.cells[a.key]);
3838
+ (n, a) => e.map((o) => {
3839
+ const i = F(n.cells[o.key]);
3706
3840
  return {
3707
3841
  part: "cell",
3708
- state: At(a, Re(n, o)),
3709
- ...r === void 0 ? {} : { label: r }
3842
+ state: Ct(o, Le(n, a)),
3843
+ ...i === void 0 ? {} : { label: i }
3710
3844
  };
3711
3845
  })
3712
3846
  );
3713
3847
  }
3714
- function Po(e) {
3715
- const { label: t, columns: n, rows: o, emptyLabel: a = "No rows", ...r } = e, s = U(), i = o.length === 0, d = $({
3716
- component: Un.name,
3848
+ function Fa(e) {
3849
+ const { label: t, columns: n, rows: a, emptyLabel: o = "No rows", ...i } = e, l = q(), r = a.length === 0, d = R({
3850
+ component: Vn.name,
3717
3851
  label: t,
3718
3852
  state: {
3719
3853
  columns: String(n.length),
3720
- rows: String(o.length),
3721
- empty: i
3854
+ rows: String(a.length),
3855
+ empty: r
3722
3856
  },
3723
- parts: In(n, o)
3857
+ parts: Fn(n, a)
3724
3858
  });
3725
- return s === "agent" ? /* @__PURE__ */ l(I, { node: ut(d) }) : /* @__PURE__ */ C("table", { ...r, ...M(d), role: "table", "aria-label": t, children: [
3726
- /* @__PURE__ */ l("thead", { role: "rowgroup", children: /* @__PURE__ */ l("tr", { role: "row", children: n.map((c) => /* @__PURE__ */ l(
3859
+ return l === "agent" ? /* @__PURE__ */ s(U, { node: ht(d) }) : /* @__PURE__ */ A("table", { ...i, ...M(d), role: "table", "aria-label": t, children: [
3860
+ /* @__PURE__ */ s("thead", { role: "rowgroup", children: /* @__PURE__ */ s("tr", { role: "row", children: n.map((c) => /* @__PURE__ */ s(
3727
3861
  "th",
3728
3862
  {
3729
3863
  role: "columnheader",
@@ -3734,24 +3868,24 @@ function Po(e) {
3734
3868
  },
3735
3869
  c.key
3736
3870
  )) }) }),
3737
- /* @__PURE__ */ l("tbody", { role: "rowgroup", children: i ? /* @__PURE__ */ l("tr", { role: "row", children: /* @__PURE__ */ l("td", { role: "cell", colSpan: n.length, children: a }) }) : o.map((c, p) => /* @__PURE__ */ l("tr", { role: "row", children: n.map((u) => /* @__PURE__ */ C(
3871
+ /* @__PURE__ */ s("tbody", { role: "rowgroup", children: r ? /* @__PURE__ */ s("tr", { role: "row", children: /* @__PURE__ */ s("td", { role: "cell", colSpan: n.length, children: /* @__PURE__ */ s("span", { children: o }) }) }) : a.map((c, p) => /* @__PURE__ */ s("tr", { role: "row", children: n.map((u) => /* @__PURE__ */ A(
3738
3872
  "td",
3739
3873
  {
3740
3874
  role: "cell",
3741
3875
  ...L({
3742
3876
  part: "cell",
3743
- state: At(u, Re(c, p))
3877
+ state: Ct(u, Le(c, p))
3744
3878
  }),
3745
3879
  children: [
3746
- /* @__PURE__ */ l("span", { "aria-hidden": "true", children: u.header }),
3747
- /* @__PURE__ */ l("div", { children: c.cells[u.key] })
3880
+ /* @__PURE__ */ s("span", { "aria-hidden": "true", children: u.header }),
3881
+ /* @__PURE__ */ s("div", { children: c.cells[u.key] })
3748
3882
  ]
3749
3883
  },
3750
3884
  u.key
3751
- )) }, Re(c, p))) })
3885
+ )) }, Le(c, p))) })
3752
3886
  ] });
3753
3887
  }
3754
- const Wn = q({
3888
+ const Hn = I({
3755
3889
  name: "Tag",
3756
3890
  category: "display",
3757
3891
  summary: "A small chip that classifies the thing next to it: a status, a category, a count, a build string.",
@@ -3808,15 +3942,15 @@ const Wn = q({
3808
3942
  }
3809
3943
  ]
3810
3944
  });
3811
- function Ro(e) {
3812
- const { tone: t = "neutral", filled: n = !1, children: o, ...a } = e, r = U(), s = $({
3813
- component: Wn.name,
3814
- label: F(o),
3945
+ function Ha(e) {
3946
+ const { tone: t = "neutral", filled: n = !1, children: a, ...o } = e, i = q(), l = R({
3947
+ component: Hn.name,
3948
+ label: F(a),
3815
3949
  state: { tone: t, filled: n }
3816
3950
  });
3817
- return r === "agent" ? /* @__PURE__ */ l(I, { node: s }) : /* @__PURE__ */ l("span", { ...a, ...M(s), children: o });
3951
+ return i === "agent" ? /* @__PURE__ */ s(U, { node: l }) : /* @__PURE__ */ s("span", { ...o, ...M(l), children: a });
3818
3952
  }
3819
- const Bn = q({
3953
+ const Gn = I({
3820
3954
  name: "Text",
3821
3955
  category: "typography",
3822
3956
  summary: "A run of prose, sized and toned from the semantic scale. In agent view it renders as its own text content, so an agent reads the words rather than inferring them from styling.",
@@ -3882,15 +4016,15 @@ const Bn = q({
3882
4016
  }
3883
4017
  ]
3884
4018
  });
3885
- function Lo(e) {
3886
- const { tone: t = "default", size: n = "normal", as: o = "p", children: a, ...r } = e, s = U(), i = $({
3887
- component: Bn.name,
3888
- label: F(a),
4019
+ function Ga(e) {
4020
+ const { tone: t = "default", size: n = "normal", as: a = "p", children: o, ...i } = e, l = q(), r = R({
4021
+ component: Gn.name,
4022
+ label: F(o),
3889
4023
  state: { tone: t, size: n }
3890
4024
  });
3891
- return s === "agent" ? /* @__PURE__ */ l(I, { node: i }) : /* @__PURE__ */ l(o, { ...r, ...M(i), children: a });
4025
+ return l === "agent" ? /* @__PURE__ */ s(U, { node: r }) : /* @__PURE__ */ s(a, { ...i, ...M(r), children: o });
3892
4026
  }
3893
- const Ct = {
4027
+ const St = {
3894
4028
  verb: "fill",
3895
4029
  description: "Replace this text area's content with the value provided, exactly as a person typing it would. The value is the full text it ends up containing, line breaks included; pass an empty string to clear it. Returns the area's state after the change, so a follow-up read is unnecessary.",
3896
4030
  inputSchema: {
@@ -3907,7 +4041,7 @@ const Ct = {
3907
4041
  untrustedContent: !0,
3908
4042
  registeredWhen: "The area is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
3909
4043
  unregisteredWhen: "The area unmounts or becomes disabled."
3910
- }, ze = q({
4044
+ }, ze = I({
3911
4045
  name: "Textarea",
3912
4046
  category: "input",
3913
4047
  summary: "A multi-line text area carrying its own label, hint, and error. Fully controlled, and it registers one fill tool that replaces the whole content with an explicit value, line breaks included.",
@@ -3994,7 +4128,7 @@ const Ct = {
3994
4128
  }
3995
4129
  },
3996
4130
  tools: {
3997
- fill: Ct
4131
+ fill: St
3998
4132
  },
3999
4133
  agentView: {
4000
4134
  example: '- **Textarea** "Mission notes" [empty] → tool `fill-mission-notes`\n - part `hint` "What the relief crew needs to know"'
@@ -4029,45 +4163,45 @@ const Ct = {
4029
4163
  notes: "The label element is associated via htmlFor. An error sets aria-invalid and is linked with aria-describedby, as is the hint."
4030
4164
  }
4031
4165
  });
4032
- function jn(e, t) {
4166
+ function Kn(e, t) {
4033
4167
  return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
4034
4168
  }
4035
- function $o(e) {
4169
+ function Ka(e) {
4036
4170
  const {
4037
4171
  label: t,
4038
4172
  value: n,
4039
- onChange: o,
4040
- rows: a = 4,
4041
- placeholder: r,
4042
- hint: s,
4043
- error: i,
4173
+ onChange: a,
4174
+ rows: o = 4,
4175
+ placeholder: i,
4176
+ hint: l,
4177
+ error: r,
4044
4178
  name: d,
4045
4179
  disabled: c = !1,
4046
4180
  required: p = !1,
4047
4181
  agentName: u,
4048
4182
  agentTool: g = !0,
4049
4183
  ...h
4050
- } = e, y = U(), f = G(), b = H(), w = le(), T = m(null), A = m(o);
4051
- A.current = o;
4052
- const R = m(b);
4053
- R.current = b;
4054
- const O = m($({ component: ze.name })), E = m(!0);
4055
- _(() => (E.current = !0, () => {
4184
+ } = e, y = q(), f = G(), b = H(), w = le(), T = m(null), C = m(a);
4185
+ C.current = a;
4186
+ const O = m(b);
4187
+ O.current = b;
4188
+ const $ = m(R({ component: ze.name })), E = m(!0);
4189
+ j(() => (E.current = !0, () => {
4056
4190
  E.current = !1;
4057
4191
  }), []);
4058
4192
  const S = B(async (D) => {
4059
- const P = D.value;
4060
- if (typeof P != "string")
4193
+ const N = D.value;
4194
+ if (typeof N != "string")
4061
4195
  return 'Pass "value" as a string holding the full text the area should contain.';
4062
- const N = T.current;
4063
- return N !== null ? Tt(N, P) : z(() => A.current(P)), await K(), E.current ? `Filled. The area is now:
4064
- ${R.current([O.current])}` : "The change removed this area from the page.";
4196
+ const P = T.current;
4197
+ return P !== null ? xt(P, N) : z(() => C.current(N)), await K(), E.current ? `Filled. The area is now:
4198
+ ${O.current([$.current])}` : "The change removed this area from the page.";
4065
4199
  }, []), v = V({
4066
- spec: Ct,
4200
+ spec: St,
4067
4201
  label: u ?? t,
4068
4202
  enabled: g && !c,
4069
4203
  execute: S
4070
- }), k = $({
4204
+ }), k = R({
4071
4205
  component: ze.name,
4072
4206
  label: t,
4073
4207
  tool: v,
@@ -4076,27 +4210,27 @@ ${R.current([O.current])}` : "The change removed this area from the page.";
4076
4210
  empty: n === "",
4077
4211
  disabled: c,
4078
4212
  required: p,
4079
- invalid: i !== void 0
4213
+ invalid: r !== void 0
4080
4214
  },
4081
- parts: jn(i, s)
4215
+ parts: Kn(r, l)
4082
4216
  });
4083
- if (O.current = k, y === "agent")
4084
- return c || f === "never" ? /* @__PURE__ */ l(I, { node: k }) : /* @__PURE__ */ l(
4085
- dt,
4217
+ if ($.current = k, y === "agent")
4218
+ return c || f === "never" ? /* @__PURE__ */ s(U, { node: k }) : /* @__PURE__ */ s(
4219
+ ut,
4086
4220
  {
4087
4221
  node: k,
4088
4222
  value: n,
4089
4223
  multiline: !0,
4090
- onValueChange: o,
4224
+ onValueChange: a,
4091
4225
  ref: (D) => {
4092
4226
  T.current = D;
4093
4227
  }
4094
4228
  }
4095
4229
  );
4096
- const x = i !== void 0 ? `${w}-error` : s !== void 0 ? `${w}-hint` : void 0;
4097
- return /* @__PURE__ */ C("div", { ...h, ...M(k), children: [
4098
- /* @__PURE__ */ l("label", { htmlFor: w, children: t }),
4099
- /* @__PURE__ */ l(
4230
+ const x = r !== void 0 ? `${w}-error` : l !== void 0 ? `${w}-hint` : void 0;
4231
+ return /* @__PURE__ */ A("div", { ...h, ...M(k), children: [
4232
+ /* @__PURE__ */ s("label", { htmlFor: w, children: t }),
4233
+ /* @__PURE__ */ s(
4100
4234
  "textarea",
4101
4235
  {
4102
4236
  id: w,
@@ -4104,21 +4238,21 @@ ${R.current([O.current])}` : "The change removed this area from the page.";
4104
4238
  ref: (D) => {
4105
4239
  T.current = D;
4106
4240
  },
4107
- rows: a,
4241
+ rows: o,
4108
4242
  value: n,
4109
- placeholder: r,
4243
+ placeholder: i,
4110
4244
  name: d,
4111
4245
  disabled: c,
4112
4246
  required: p,
4113
- "aria-invalid": i !== void 0 || void 0,
4247
+ "aria-invalid": r !== void 0 || void 0,
4114
4248
  "aria-describedby": x,
4115
- onChange: (D) => o(D.currentTarget.value)
4249
+ onChange: (D) => a(D.currentTarget.value)
4116
4250
  }
4117
4251
  ),
4118
- i !== void 0 ? /* @__PURE__ */ l("p", { id: x, ...L({ part: "error", state: {} }), children: i }) : s !== void 0 ? /* @__PURE__ */ l("p", { id: x, ...L({ part: "hint", state: {} }), children: s }) : null
4252
+ r !== void 0 ? /* @__PURE__ */ s("p", { id: x, ...L({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: x, ...L({ part: "hint", state: {} }), children: l }) : null
4119
4253
  ] });
4120
4254
  }
4121
- const St = {
4255
+ const Pt = {
4122
4256
  verb: "fill",
4123
4257
  description: "Replace this field's text with the value provided, exactly as a person typing it would. The value is the full text the field ends up containing; pass an empty string to clear it. Returns the field's state after the change, so a follow-up read is unnecessary.",
4124
4258
  inputSchema: {
@@ -4135,7 +4269,7 @@ const St = {
4135
4269
  untrustedContent: !0,
4136
4270
  registeredWhen: "The field is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
4137
4271
  unregisteredWhen: "The field unmounts or becomes disabled."
4138
- }, Xe = q({
4272
+ }, Xe = I({
4139
4273
  name: "TextInput",
4140
4274
  category: "input",
4141
4275
  summary: "A single-line text field carrying its own label, hint, and error. Fully controlled, and it registers one fill tool that replaces the field's text with an explicit value.",
@@ -4231,7 +4365,7 @@ const St = {
4231
4365
  }
4232
4366
  },
4233
4367
  tools: {
4234
- fill: St
4368
+ fill: Pt
4235
4369
  },
4236
4370
  agentView: {
4237
4371
  example: '- **TextInput** "Callsign" [empty, required] → tool `fill-callsign`\n - part `hint` "Uppercase, three to eight letters"'
@@ -4277,18 +4411,18 @@ const St = {
4277
4411
  notes: "The label element is associated via htmlFor. An error sets aria-invalid and is linked with aria-describedby, as is the hint. Focus is an offset keyline, never a rounded ring."
4278
4412
  }
4279
4413
  });
4280
- function _n(e, t) {
4414
+ function zn(e, t) {
4281
4415
  return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
4282
4416
  }
4283
- function Oo(e) {
4417
+ function za(e) {
4284
4418
  const {
4285
4419
  label: t,
4286
4420
  value: n,
4287
- onChange: o,
4288
- type: a = "text",
4289
- placeholder: r,
4290
- hint: s,
4291
- error: i,
4421
+ onChange: a,
4422
+ type: o = "text",
4423
+ placeholder: i,
4424
+ hint: l,
4425
+ error: r,
4292
4426
  name: d,
4293
4427
  autoComplete: c,
4294
4428
  disabled: p = !1,
@@ -4296,27 +4430,27 @@ function Oo(e) {
4296
4430
  agentName: g,
4297
4431
  agentTool: h = !0,
4298
4432
  ...y
4299
- } = e, f = U(), b = G(), w = H(), T = le(), A = m(null), R = m(o);
4300
- R.current = o;
4301
- const O = m(w);
4302
- O.current = w;
4303
- const E = m($({ component: Xe.name })), S = m(!0);
4304
- _(() => (S.current = !0, () => {
4433
+ } = e, f = q(), b = G(), w = H(), T = le(), C = m(null), O = m(a);
4434
+ O.current = a;
4435
+ const $ = m(w);
4436
+ $.current = w;
4437
+ const E = m(R({ component: Xe.name })), S = m(!0);
4438
+ j(() => (S.current = !0, () => {
4305
4439
  S.current = !1;
4306
4440
  }), []);
4307
- const v = a === "password", k = B(async (N) => {
4308
- const j = N.value;
4309
- if (typeof j != "string")
4441
+ const v = o === "password", k = B(async (P) => {
4442
+ const _ = P.value;
4443
+ if (typeof _ != "string")
4310
4444
  return 'Pass "value" as a string holding the full text the field should contain.';
4311
- const Y = A.current;
4312
- return Y !== null ? Tt(Y, j) : z(() => R.current(j)), await K(), S.current ? `Filled. The field is now:
4313
- ${O.current([E.current])}` : "The change removed this field from the page.";
4445
+ const J = C.current;
4446
+ return J !== null ? xt(J, _) : z(() => O.current(_)), await K(), S.current ? `Filled. The field is now:
4447
+ ${$.current([E.current])}` : "The change removed this field from the page.";
4314
4448
  }, []), x = V({
4315
- spec: St,
4449
+ spec: Pt,
4316
4450
  label: g ?? t,
4317
4451
  enabled: h && !p,
4318
4452
  execute: k
4319
- }), D = $({
4453
+ }), D = R({
4320
4454
  component: Xe.name,
4321
4455
  label: t,
4322
4456
  tool: x,
@@ -4325,79 +4459,79 @@ ${O.current([E.current])}` : "The change removed this field from the page.";
4325
4459
  empty: n === "",
4326
4460
  disabled: p,
4327
4461
  required: u,
4328
- invalid: i !== void 0
4462
+ invalid: r !== void 0
4329
4463
  },
4330
- parts: _n(i, s)
4464
+ parts: zn(r, l)
4331
4465
  });
4332
4466
  if (E.current = D, f === "agent")
4333
- return p || b === "never" ? /* @__PURE__ */ l(I, { node: D }) : /* @__PURE__ */ l(
4334
- dt,
4467
+ return p || b === "never" ? /* @__PURE__ */ s(U, { node: D }) : /* @__PURE__ */ s(
4468
+ ut,
4335
4469
  {
4336
4470
  node: D,
4337
4471
  value: n,
4338
4472
  masked: v,
4339
- onValueChange: o,
4340
- ref: (N) => {
4341
- A.current = N;
4473
+ onValueChange: a,
4474
+ ref: (P) => {
4475
+ C.current = P;
4342
4476
  }
4343
4477
  }
4344
4478
  );
4345
- const P = i !== void 0 ? `${T}-error` : s !== void 0 ? `${T}-hint` : void 0;
4346
- return /* @__PURE__ */ C("div", { ...y, ...M(D), children: [
4347
- /* @__PURE__ */ l("label", { htmlFor: T, children: t }),
4348
- /* @__PURE__ */ l(
4479
+ const N = r !== void 0 ? `${T}-error` : l !== void 0 ? `${T}-hint` : void 0;
4480
+ return /* @__PURE__ */ A("div", { ...y, ...M(D), children: [
4481
+ /* @__PURE__ */ s("label", { htmlFor: T, children: t }),
4482
+ /* @__PURE__ */ s(
4349
4483
  "input",
4350
4484
  {
4351
4485
  id: T,
4352
4486
  ...L({ part: "input", state: {} }),
4353
- ref: (N) => {
4354
- A.current = N;
4487
+ ref: (P) => {
4488
+ C.current = P;
4355
4489
  },
4356
- type: a,
4490
+ type: o,
4357
4491
  value: n,
4358
- placeholder: r,
4492
+ placeholder: i,
4359
4493
  name: d,
4360
4494
  autoComplete: c,
4361
4495
  disabled: p,
4362
4496
  required: u,
4363
- "aria-invalid": i !== void 0 || void 0,
4364
- "aria-describedby": P,
4365
- onChange: (N) => o(N.currentTarget.value)
4497
+ "aria-invalid": r !== void 0 || void 0,
4498
+ "aria-describedby": N,
4499
+ onChange: (P) => a(P.currentTarget.value)
4366
4500
  }
4367
4501
  ),
4368
- i !== void 0 ? /* @__PURE__ */ l("p", { id: P, ...L({ part: "error", state: {} }), children: i }) : s !== void 0 ? /* @__PURE__ */ l("p", { id: P, ...L({ part: "hint", state: {} }), children: s }) : null
4502
+ r !== void 0 ? /* @__PURE__ */ s("p", { id: N, ...L({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: N, ...L({ part: "hint", state: {} }), children: l }) : null
4369
4503
  ] });
4370
4504
  }
4371
4505
  const Ee = 40;
4372
- function Vn(e) {
4506
+ function Xn(e) {
4373
4507
  const t = e.label === void 0 ? "" : Z(e.label), n = t === "" ? Z(e.component) : `${Z(e.component)}-${t}`;
4374
4508
  return n === "" ? "region" : n;
4375
4509
  }
4376
- function Fn(e) {
4510
+ function Yn(e) {
4377
4511
  const t = /* @__PURE__ */ new Map();
4378
4512
  return e.map((n) => {
4379
- const o = Vn(n), a = t.get(o) ?? 0;
4380
- return t.set(o, a + 1), { key: a === 0 ? o : `${o}-${a + 1}`, node: n };
4513
+ const a = Xn(n), o = t.get(a) ?? 0;
4514
+ return t.set(a, o + 1), { key: o === 0 ? a : `${a}-${o + 1}`, node: n };
4381
4515
  });
4382
4516
  }
4383
4517
  function Nt() {
4384
4518
  if (typeof document > "u") return [];
4385
- const e = document.body, t = new Set(gt(e)), n = Array.from(e.querySelectorAll(`[${Oe}]`)).filter(
4386
- (o) => !t.has(o)
4519
+ const e = document.body, t = new Set(mt(e)), n = Array.from(e.querySelectorAll(`[${$e}]`)).filter(
4520
+ (a) => !t.has(a)
4387
4521
  );
4388
- return Fn([
4389
- ...an(e),
4390
- ...n.map((o) => De(o)).filter((o) => o !== null)
4522
+ return Yn([
4523
+ ...dn(e),
4524
+ ...n.map((a) => De(a)).filter((a) => a !== null)
4391
4525
  ]);
4392
4526
  }
4393
- const Hn = {
4527
+ const Jn = {
4394
4528
  verb: "list",
4395
4529
  description: "List the Sprint component regions on this page, with a one-line state summary for each. Call this first to discover region keys, then call read-region to read one in full. Regions nest: a page-level region contains the labelled panels listed after it, so read the smallest region that covers what you need.",
4396
4530
  inputSchema: { type: "object", properties: {} },
4397
4531
  readOnly: !0,
4398
4532
  untrustedContent: !0,
4399
4533
  registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
4400
- }, Gn = {
4534
+ }, Qn = {
4401
4535
  verb: "read",
4402
4536
  description: "Read one region of the page as Markdown, including every component in it, its current state, and the tools that drive it. Long regions are paginated; the response ends with the page number and total.",
4403
4537
  inputSchema: {
@@ -4419,27 +4553,27 @@ const Hn = {
4419
4553
  untrustedContent: !0,
4420
4554
  registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
4421
4555
  };
4422
- function Kn(e) {
4556
+ function Zn(e) {
4423
4557
  const t = Nt();
4424
4558
  if (t.length === 0) return "This page has no Sprint components.";
4425
- const n = t.map(({ key: o, node: a }) => {
4426
- const r = nt(a.children), s = e([{ ...a, children: [], parts: [] }]).split(`
4427
- `)[0]?.replace(/^-\s*/, ""), i = r === 0 ? "" : ` (${r} nested)`;
4428
- return `- \`${o}\` — ${s ?? a.component}${i}`;
4559
+ const n = t.map(({ key: a, node: o }) => {
4560
+ const i = at(o.children), l = e([{ ...o, children: [], parts: [] }]).split(`
4561
+ `)[0]?.replace(/^-\s*/, ""), r = i === 0 ? "" : ` (${i} nested)`;
4562
+ return `- \`${a}\` — ${l ?? o.component}${r}`;
4429
4563
  });
4430
4564
  return [`${t.length} region(s):`, ...n].join(`
4431
4565
  `);
4432
4566
  }
4433
- function zn(e, t, n) {
4434
- const o = Nt(), a = o.map((d) => d.key), r = o.find((d) => d.key === t);
4435
- if (r === void 0)
4436
- return `No region named "${String(t)}". Available regions: ${a.join(", ") || "none"}.`;
4437
- const s = et(e([r.node]), te - Ee), i = typeof n == "number" ? n : 1;
4438
- return i < 1 || i > s.length ? `Region "${r.key}" has ${s.length} page(s); page ${i} does not exist.` : `${s[i - 1] ?? ""}
4567
+ function ea(e, t, n) {
4568
+ const a = Nt(), o = a.map((d) => d.key), i = a.find((d) => d.key === t);
4569
+ if (i === void 0)
4570
+ return `No region named "${String(t)}". Available regions: ${o.join(", ") || "none"}.`;
4571
+ const l = tt(e([i.node]), te - Ee), r = typeof n == "number" ? n : 1;
4572
+ return r < 1 || r > l.length ? `Region "${i.key}" has ${l.length} page(s); page ${r} does not exist.` : `${l[r - 1] ?? ""}
4439
4573
 
4440
- (page ${i} of ${s.length})`;
4574
+ (page ${r} of ${l.length})`;
4441
4575
  }
4442
- const Xn = {
4576
+ const ta = {
4443
4577
  verb: "set",
4444
4578
  description: 'Switch how this page renders. In "agent" view every Sprint component renders as plain Markdown text with no HTML elements, so the page can be read directly. In "human" view it renders normally. Tools keep working in both.',
4445
4579
  inputSchema: {
@@ -4457,241 +4591,286 @@ const Xn = {
4457
4591
  untrustedContent: !0,
4458
4592
  registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
4459
4593
  };
4460
- function Pt() {
4594
+ function Lt() {
4461
4595
  return typeof document > "u" ? "" : (document.body.textContent ?? "").replace(/\n{3,}/g, `
4462
4596
 
4463
4597
  `).trim();
4464
4598
  }
4465
- function Yn(e) {
4466
- const { enabled: t, format: n, view: o, setView: a } = e;
4599
+ function na(e) {
4600
+ const { enabled: t, format: n, view: a, setView: o } = e;
4467
4601
  V({
4468
- spec: Hn,
4602
+ spec: Jn,
4469
4603
  label: "page regions",
4470
4604
  enabled: t,
4471
- execute: () => o === "agent" ? 'This page is in agent view and renders as one text document. Call read-region with region "page", or read the page text directly.' : Kn(n)
4605
+ execute: () => a === "agent" ? 'This page is in agent view and renders as one text document. Call read-region with region "page", or read the page text directly.' : Zn(n)
4472
4606
  }), V({
4473
- spec: Gn,
4607
+ spec: Qn,
4474
4608
  label: "region",
4475
4609
  enabled: t,
4476
- execute: (r) => o === "agent" ? Jn(r.region, r.page) : zn(n, r.region, r.page)
4610
+ execute: (i) => a === "agent" ? aa(i.region, i.page) : ea(n, i.region, i.page)
4477
4611
  }), V({
4478
- spec: Xn,
4612
+ spec: ta,
4479
4613
  label: "page view",
4480
4614
  enabled: t,
4481
- execute: async (r) => {
4482
- const s = r.view === "agent" ? "agent" : "human";
4483
- return z(() => a(s)), await K(), s === "agent" ? `Page is now in agent view:
4615
+ execute: async (i) => {
4616
+ const l = i.view === "agent" ? "agent" : "human";
4617
+ return z(() => o(l)), await K(), l === "agent" ? `Page is now in agent view:
4484
4618
 
4485
- ${Ne(Pt(), te - Ee)}` : "Page is now in human view.";
4619
+ ${Pe(Lt(), te - Ee)}` : "Page is now in human view.";
4486
4620
  }
4487
4621
  });
4488
4622
  }
4489
- function Jn(e, t) {
4623
+ function aa(e, t) {
4490
4624
  if (e !== "page")
4491
4625
  return `No region named "${String(e)}". In agent view the whole page is one region, named "page".`;
4492
- const n = et(Pt(), te - Ee), o = typeof t == "number" ? t : 1;
4493
- return o < 1 || o > n.length ? `Region "page" has ${n.length} page(s); page ${o} does not exist.` : `${n[o - 1] ?? ""}
4626
+ const n = tt(Lt(), te - Ee), a = typeof t == "number" ? t : 1;
4627
+ return a < 1 || a > n.length ? `Region "page" has ${n.length} page(s); page ${a} does not exist.` : `${n[a - 1] ?? ""}
4494
4628
 
4495
- (page ${o} of ${n.length})`;
4629
+ (page ${a} of ${n.length})`;
4496
4630
  }
4497
- const Qn = 1200;
4498
- function Do(e) {
4631
+ const Rt = "--sprint-gloss-x", Ot = "--sprint-gloss-fade", $t = "--sprint-cast-shift", oa = 22, ia = 78, ra = 28, sa = 0.25, Ye = (e, t, n) => Math.min(n, Math.max(t, e));
4632
+ function la() {
4633
+ return typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
4634
+ }
4635
+ const ca = /* @__PURE__ */ new Set([
4636
+ "Button",
4637
+ "Card",
4638
+ "Tag",
4639
+ "SegmentedControl",
4640
+ "Switch",
4641
+ "Shell"
4642
+ ]), da = /* @__PURE__ */ new Set(["option", "thumb"]);
4643
+ function ua(e, t) {
4644
+ const n = e.closest("[data-sprint-part]");
4645
+ if (n === null || !t.contains(n)) return null;
4646
+ const a = n.dataset.sprintPart;
4647
+ return a !== void 0 && da.has(a) ? n : null;
4648
+ }
4649
+ function Dt(e) {
4650
+ if (!(e instanceof Element)) return null;
4651
+ const t = e.closest("[data-sprint]");
4652
+ if (t === null) return null;
4653
+ const n = t.dataset.sprint;
4654
+ return n === void 0 || !ca.has(n) ? null : ua(e, t) ?? t;
4655
+ }
4656
+ function ha(e) {
4657
+ if (e.pointerType === "touch" || la()) return;
4658
+ const t = Dt(e.target);
4659
+ if (t === null) return;
4660
+ const n = t.getBoundingClientRect();
4661
+ if (n.width === 0 || n.height === 0) return;
4662
+ const a = Ye((e.clientX - n.left) / n.width * 100, oa, ia), o = (a - 50) / ra;
4663
+ t.style.setProperty(Rt, `${a.toFixed(1)}%`), t.style.setProperty(
4664
+ Ot,
4665
+ Ye(1 - Math.abs(o), sa, 1).toFixed(3)
4666
+ ), t.style.setProperty($t, `${(o * -10).toFixed(1)}px`);
4667
+ }
4668
+ function pa(e) {
4669
+ const t = Dt(e.target);
4670
+ t !== null && (t.style.removeProperty(Rt), t.style.removeProperty(Ot), t.style.removeProperty($t), t.style.length === 0 && t.removeAttribute("style"));
4671
+ }
4672
+ const ga = 1200;
4673
+ function Xa(e) {
4499
4674
  const {
4500
4675
  children: t,
4501
4676
  label: n,
4502
- format: o,
4503
- pageTools: a = !0,
4504
- view: r,
4505
- defaultView: s,
4506
- onViewChange: i,
4677
+ format: a,
4678
+ pageTools: o = !0,
4679
+ view: i,
4680
+ defaultView: l,
4681
+ onViewChange: r,
4507
4682
  agentControls: d,
4508
4683
  theme: c
4509
- } = e, p = ke(), u = zt(), g = !u.owned, [h, y] = J(s ?? "human"), f = r !== void 0, b = f || g || s !== void 0, w = f ? r : b ? h : u.view, T = B(
4510
- (P) => {
4684
+ } = e, p = ke(), u = Zt(), g = !u.owned, [h, y] = Y(l ?? "human"), f = i !== void 0, b = f || g || l !== void 0, w = f ? i : b ? h : u.view, T = B(
4685
+ (N) => {
4511
4686
  if (!b) {
4512
- u.setView(P);
4687
+ u.setView(N);
4513
4688
  return;
4514
4689
  }
4515
- f || y(P), i?.(P);
4690
+ f || y(N), r?.(N);
4516
4691
  },
4517
- [b, f, u, i]
4518
- ), A = d ?? u.controls, R = o ?? u.format ?? st, O = ee(
4519
- () => ({ view: w, setView: T, controls: A, format: R, owned: b }),
4520
- [w, T, A, R, b]
4692
+ [b, f, u, r]
4693
+ ), C = d ?? u.controls, O = a ?? u.format ?? lt, $ = ee(
4694
+ () => ({ view: w, setView: T, controls: C, format: O, owned: b }),
4695
+ [w, T, C, O, b]
4521
4696
  ), E = ee(
4522
4697
  () => ({ path: n === void 0 ? p : [...p, n] }),
4523
4698
  [p, n]
4524
4699
  );
4525
- Yn({
4526
- enabled: g && a,
4527
- format: R,
4700
+ na({
4701
+ enabled: g && o,
4702
+ format: O,
4528
4703
  view: w,
4529
4704
  setView: T
4530
4705
  });
4531
- const S = m(null), [v, k] = J(!1);
4532
- _(() => {
4706
+ const S = m(null), [v, k] = Y(!1);
4707
+ j(() => {
4533
4708
  if (!v) return;
4534
- const P = setTimeout(() => k(!1), Qn);
4535
- return () => clearTimeout(P);
4709
+ const N = setTimeout(() => k(!1), ga);
4710
+ return () => clearTimeout(N);
4536
4711
  }, [v]);
4537
4712
  const x = () => {
4538
- const P = navigator.clipboard;
4539
- if (P === void 0) return;
4540
- const N = (S.current?.textContent ?? "").replace(/\n{3,}/g, `
4713
+ const N = navigator.clipboard;
4714
+ if (N === void 0) return;
4715
+ const P = (S.current?.textContent ?? "").replace(/\n{3,}/g, `
4541
4716
 
4542
4717
  `).trim();
4543
- P.writeText(N).then(
4718
+ N.writeText(P).then(
4544
4719
  () => k(!0),
4545
4720
  () => k(!1)
4546
4721
  );
4547
4722
  };
4548
- return /* @__PURE__ */ l(Kt, { value: O, children: /* @__PURE__ */ C(me, { value: E, children: [
4549
- b && w === "agent" && A !== "never" ? /* @__PURE__ */ l(
4723
+ return /* @__PURE__ */ s(Qt, { value: $, children: /* @__PURE__ */ A(me, { value: E, children: [
4724
+ b && w === "agent" && C !== "never" ? /* @__PURE__ */ s(
4550
4725
  "button",
4551
4726
  {
4552
4727
  type: "button",
4553
4728
  "aria-label": v ? "Copied" : "Copy agent view",
4554
- [Dt]: "",
4729
+ [Ut]: "",
4555
4730
  ...v ? { "data-sprint-copied": "" } : {},
4556
4731
  onClick: x
4557
4732
  }
4558
4733
  ) : null,
4559
- /* @__PURE__ */ l(
4734
+ /* @__PURE__ */ s(
4560
4735
  "div",
4561
4736
  {
4562
4737
  ref: S,
4563
- [Ot]: w,
4564
- ...c === void 0 ? {} : { [Et]: c },
4738
+ onPointerMove: w === "agent" ? void 0 : ha,
4739
+ onPointerOut: w === "agent" ? void 0 : pa,
4740
+ [qt]: w,
4741
+ ...c === void 0 ? {} : { [Wt]: c },
4565
4742
  children: t
4566
4743
  }
4567
4744
  )
4568
4745
  ] }) });
4569
4746
  }
4570
- function Eo(e) {
4571
- const { children: t, label: n } = e, o = ke(), a = ee(() => ({ path: [...o, n] }), [o, n]);
4572
- return /* @__PURE__ */ l(me, { value: a, children: t });
4747
+ function Ya(e) {
4748
+ const { children: t, label: n } = e, a = ke(), o = ee(() => ({ path: [...a, n] }), [a, n]);
4749
+ return /* @__PURE__ */ s(me, { value: o, children: t });
4573
4750
  }
4574
- const Zn = "0.1.3", eo = {
4575
- version: Zn
4576
- }, Mo = eo.version;
4751
+ const ma = "0.3.0", fa = {
4752
+ version: ma
4753
+ }, Ja = fa.version;
4577
4754
  export {
4578
- Qe as AGENT_ATTRIBUTE,
4755
+ Ze as AGENT_ATTRIBUTE,
4579
4756
  ue as AgentControl,
4580
4757
  we as AgentControlGroup,
4581
- I as AgentLine,
4582
- Eo as AgentRegion,
4758
+ U as AgentLine,
4759
+ Ya as AgentRegion,
4583
4760
  me as AgentScopeProvider,
4584
- so as Alert,
4585
- dn as Button,
4586
- yt as CLOSE_DIALOG_TOOL,
4761
+ xa as Alert,
4762
+ mn as Button,
4763
+ kt as CLOSE_DIALOG_TOOL,
4587
4764
  Q as COMPONENT_ATTRIBUTE,
4588
- lo as Card,
4589
- co as Checkbox,
4590
- uo as CodeBlock,
4591
- ft as DISMISS_ALERT_TOOL,
4592
- ho as DescriptionList,
4593
- po as Dialog,
4594
- Ct as FILL_TEXTAREA_TOOL,
4595
- St as FILL_TOOL,
4596
- go as Heading,
4597
- mo as Link,
4598
- fo as List,
4599
- bo as MetaLine,
4600
- vo as Nav,
4601
- wo as NavGroup,
4602
- vt as OPEN_CARD_TOOL,
4603
- kt as OPEN_LINK_TOOL,
4604
- Je as OWNER_ATTRIBUTE,
4605
- Ue as PARAM_DESCRIPTION_LIMIT,
4606
- oe as PART_ATTRIBUTE,
4607
- bt as PRESS_TOOL,
4608
- yo as PageHeader,
4609
- ko as Panel,
4610
- Oe as REGION_ATTRIBUTE,
4611
- Mt as RESERVED_STATE_KEYS,
4612
- ie as SELECT_OPTION_TOOL,
4613
- re as SELECT_TOOL,
4614
- wt as SET_CHECKBOX_TOOL,
4615
- xt as SET_SWITCH_TOOL,
4765
+ Aa as Card,
4766
+ Ca as Checkbox,
4767
+ Sa as CodeBlock,
4768
+ bt as DISMISS_ALERT_TOOL,
4769
+ Pa as DescriptionList,
4770
+ Na as Dialog,
4771
+ St as FILL_TEXTAREA_TOOL,
4772
+ Pt as FILL_TOOL,
4773
+ La as Heading,
4774
+ Ra as Image,
4775
+ Oa as Link,
4776
+ $a as List,
4777
+ Da as MetaLine,
4778
+ Ea as Nav,
4779
+ Ma as NavGroup,
4780
+ wt as OPEN_CARD_TOOL,
4781
+ Tt as OPEN_LINK_TOOL,
4782
+ Qe as OWNER_ATTRIBUTE,
4783
+ qe as PARAM_DESCRIPTION_LIMIT,
4784
+ ae as PART_ATTRIBUTE,
4785
+ vt as PRESS_TOOL,
4786
+ Ia as PageHeader,
4787
+ qa as Panel,
4788
+ $e as REGION_ATTRIBUTE,
4789
+ Bt as RESERVED_STATE_KEYS,
4790
+ re as SELECT_OPTION_TOOL,
4791
+ ie as SELECT_TOOL,
4792
+ yt as SET_CHECKBOX_TOOL,
4793
+ At as SET_SWITCH_TOOL,
4616
4794
  pe as STATE_ATTRIBUTE_PREFIX,
4617
- To as SecretField,
4618
- xo as SegmentedControl,
4619
- Ao as Select,
4620
- Co as Shell,
4621
- Do as SprintProvider,
4622
- So as Stack,
4623
- No as Switch,
4624
- Et as THEME_ATTRIBUTE,
4795
+ Ua as SecretField,
4796
+ Wa as SegmentedControl,
4797
+ Ba as Select,
4798
+ _a as Shell,
4799
+ Xa as SprintProvider,
4800
+ ja as Stack,
4801
+ Va as Switch,
4802
+ Wt as THEME_ATTRIBUTE,
4625
4803
  ce as TOOL_ATTRIBUTE,
4626
- qe as TOOL_DESCRIPTION_LIMIT,
4627
- Bt as TOOL_NAMING_CONVENTION,
4804
+ Ie as TOOL_DESCRIPTION_LIMIT,
4805
+ Ht as TOOL_NAMING_CONVENTION,
4628
4806
  te as TOOL_OUTPUT_LIMIT,
4629
- Po as Table,
4630
- Ro as Tag,
4631
- Lo as Text,
4632
- Oo as TextInput,
4633
- $o as Textarea,
4634
- Ot as VIEW_ATTRIBUTE,
4635
- Dt as VIEW_COPY_ATTRIBUTE,
4807
+ Fa as Table,
4808
+ Ha as Tag,
4809
+ Ga as Text,
4810
+ za as TextInput,
4811
+ Ka as Textarea,
4812
+ qt as VIEW_ATTRIBUTE,
4813
+ Ut as VIEW_COPY_ATTRIBUTE,
4636
4814
  ye as accessibleText,
4637
4815
  K as afterCommit,
4638
- Ze as agentAttributes,
4816
+ et as agentAttributes,
4639
4817
  M as agentAttributesFor,
4640
4818
  L as agentPartAttributesFor,
4641
- Xt as agentPartControlAttributes,
4642
- ao as agentSelector,
4643
- je as alertMeta,
4644
- io as buildAgentManifest,
4645
- $ as buildAgentNode,
4646
- _e as buttonMeta,
4819
+ en as agentPartControlAttributes,
4820
+ ya as agentSelector,
4821
+ _e as alertMeta,
4822
+ Ta as buildAgentManifest,
4823
+ R as buildAgentNode,
4824
+ je as buttonMeta,
4647
4825
  Ve as cardMeta,
4648
4826
  Fe as checkboxMeta,
4649
- Ne as clamp,
4650
- mn as codeBlockMeta,
4651
- st as defaultAgentFormat,
4652
- q as defineAgentMeta,
4653
- bn as descriptionListMeta,
4654
- wn as dialogMeta,
4655
- jt as getAgentMeta,
4656
- tt as getModelContext,
4657
- yn as headingMeta,
4658
- ro as isModelContextAvailable,
4659
- kn as linkMeta,
4660
- _t as listAgentMeta,
4661
- Tn as listMeta,
4662
- xn as metaLineMeta,
4663
- Cn as navGroupMeta,
4664
- An as navMeta,
4665
- Ht as nodeLine,
4666
- Sn as pageHeaderMeta,
4667
- et as paginate,
4668
- Nn as panelMeta,
4827
+ Pe as clamp,
4828
+ yn as codeBlockMeta,
4829
+ lt as defaultAgentFormat,
4830
+ I as defineAgentMeta,
4831
+ Tn as descriptionListMeta,
4832
+ An as dialogMeta,
4833
+ Gt as getAgentMeta,
4834
+ nt as getModelContext,
4835
+ Cn as headingMeta,
4836
+ Sn as imageMeta,
4837
+ ka as isModelContextAvailable,
4838
+ Pn as linkMeta,
4839
+ Kt as listAgentMeta,
4840
+ Nn as listMeta,
4841
+ Ln as metaLineMeta,
4842
+ On as navGroupMeta,
4843
+ Rn as navMeta,
4844
+ Yt as nodeLine,
4845
+ $n as pageHeaderMeta,
4846
+ tt as paginate,
4847
+ Dn as panelMeta,
4669
4848
  F as reactText,
4670
- Wt as registerTool,
4671
- Pn as secretFieldMeta,
4849
+ Ft as registerTool,
4850
+ En as secretFieldMeta,
4672
4851
  He as segmentedControlMeta,
4673
4852
  Ge as selectMeta,
4674
4853
  De as serializeElement,
4675
- an as serializeWithin,
4676
- Mn as shellMeta,
4854
+ dn as serializeWithin,
4855
+ _n as shellMeta,
4677
4856
  Z as slug,
4678
- qn as stackMeta,
4857
+ jn as stackMeta,
4679
4858
  Ke as switchMeta,
4680
- Un as tableMeta,
4681
- Wn as tagMeta,
4859
+ Vn as tableMeta,
4860
+ Hn as tagMeta,
4682
4861
  Xe as textInputMeta,
4683
- Bn as textMeta,
4862
+ Gn as textMeta,
4684
4863
  ze as textareaMeta,
4685
- Gt as toMarkdown,
4686
- gn as tokenize,
4864
+ Jt as toMarkdown,
4865
+ wn as tokenize,
4687
4866
  We as toolName,
4688
4867
  G as useAgentControls,
4689
4868
  H as useAgentFormat,
4690
4869
  ke as useAgentScope,
4691
4870
  V as useAgentTool,
4692
- U as useSprintView,
4693
- zt as useSprintViewControl,
4694
- Ut as validateInputs,
4695
- Mo as version
4871
+ q as useSprintView,
4872
+ Zt as useSprintViewControl,
4873
+ jt as validateInputs,
4874
+ Ja as version
4696
4875
  };
4697
4876
  //# sourceMappingURL=index.js.map