@adoptai/genui-components 0.1.58 → 0.1.59

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.
Files changed (40) hide show
  1. package/dist/composites/document-field-extraction/resolver.cjs +1920 -0
  2. package/dist/composites/document-field-extraction/resolver.cjs.map +1 -0
  3. package/dist/composites/document-field-extraction/resolver.js +1913 -0
  4. package/dist/composites/document-field-extraction/resolver.js.map +1 -0
  5. package/dist/composites/tabby-auth/resolver.cjs +597 -0
  6. package/dist/composites/tabby-auth/resolver.cjs.map +1 -0
  7. package/dist/composites/tabby-auth/resolver.d.ts +3 -0
  8. package/dist/composites/tabby-auth/resolver.d.ts.map +1 -0
  9. package/dist/composites/tabby-auth/resolver.js +595 -0
  10. package/dist/composites/tabby-auth/resolver.js.map +1 -0
  11. package/dist/composites/workflow-stepper/resolver.cjs +86 -18
  12. package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
  13. package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -1
  14. package/dist/composites/workflow-stepper/resolver.js +86 -18
  15. package/dist/composites/workflow-stepper/resolver.js.map +1 -1
  16. package/dist/index.cjs +492 -27
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +492 -27
  19. package/dist/index.js.map +1 -1
  20. package/dist/renderer.cjs +492 -27
  21. package/dist/renderer.cjs.map +1 -1
  22. package/dist/renderer.js +492 -27
  23. package/dist/renderer.js.map +1 -1
  24. package/dist/resolver.cjs +492 -27
  25. package/dist/resolver.cjs.map +1 -1
  26. package/dist/resolver.d.ts.map +1 -1
  27. package/dist/resolver.js +492 -27
  28. package/dist/resolver.js.map +1 -1
  29. package/dist/schemas/index.cjs +84 -3
  30. package/dist/schemas/index.cjs.map +1 -1
  31. package/dist/schemas/index.d.ts +118 -0
  32. package/dist/schemas/index.d.ts.map +1 -1
  33. package/dist/schemas/index.js +84 -3
  34. package/dist/schemas/index.js.map +1 -1
  35. package/dist/schemas/tabby-auth.d.ts +58 -0
  36. package/dist/schemas/tabby-auth.d.ts.map +1 -0
  37. package/dist/schemas/workflow-stepper.d.ts +60 -0
  38. package/dist/schemas/workflow-stepper.d.ts.map +1 -1
  39. package/dist/tool-definitions.json +102 -3
  40. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -5255,7 +5255,32 @@ var workflowStepperSchema = zod.z.object({
5255
5255
  n: zod.z.number().int().positive().optional(),
5256
5256
  title: zod.z.string(),
5257
5257
  sub: zod.z.string().optional(),
5258
- status: zod.z.enum(["done", "active", "review", "pending", "blocked", "failed"]),
5258
+ status: zod.z.enum([
5259
+ "done",
5260
+ "active",
5261
+ "running",
5262
+ "review",
5263
+ "pending",
5264
+ "blocked",
5265
+ "failed"
5266
+ ]),
5267
+ // Optional quality-gate verdict for a step run by an executor (e.g. a
5268
+ // pipeline). Surfaces a subtle trust badge; flags hint at issues a human
5269
+ // should review (the full list lives in the escalation dock).
5270
+ eval: zod.z.object({
5271
+ score: zod.z.number().min(0).max(1).nullable().optional(),
5272
+ verdict: zod.z.enum(["good", "bad"]).optional(),
5273
+ reasoning: zod.z.string().optional(),
5274
+ judge_ok: zod.z.boolean().optional(),
5275
+ data_quality_flags: zod.z.array(
5276
+ zod.z.object({
5277
+ field: zod.z.string().optional(),
5278
+ issue: zod.z.string().optional(),
5279
+ severity: zod.z.enum(["low", "medium", "high"]).optional(),
5280
+ details: zod.z.string().optional()
5281
+ })
5282
+ ).optional()
5283
+ }).optional(),
5259
5284
  assignees: zod.z.array(
5260
5285
  zod.z.object({
5261
5286
  name: zod.z.string(),
@@ -5291,7 +5316,32 @@ var workflowStepperTool = {
5291
5316
  n: { type: "number", description: "Step number; defaults to index + 1" },
5292
5317
  title: { type: "string" },
5293
5318
  sub: { type: "string", description: "Short status caption, e.g. '7 accounts \xB7 2 exceptions'" },
5294
- status: { type: "string", enum: ["done", "active", "review", "pending", "blocked", "failed"] },
5319
+ status: {
5320
+ type: "string",
5321
+ enum: ["done", "active", "running", "review", "pending", "blocked", "failed"]
5322
+ },
5323
+ eval: {
5324
+ type: "object",
5325
+ description: "Optional quality-gate verdict for an executor-run step.",
5326
+ properties: {
5327
+ score: { type: "number" },
5328
+ verdict: { type: "string", enum: ["good", "bad"] },
5329
+ reasoning: { type: "string" },
5330
+ judge_ok: { type: "boolean" },
5331
+ data_quality_flags: {
5332
+ type: "array",
5333
+ items: {
5334
+ type: "object",
5335
+ properties: {
5336
+ field: { type: "string" },
5337
+ issue: { type: "string" },
5338
+ severity: { type: "string", enum: ["low", "medium", "high"] },
5339
+ details: { type: "string" }
5340
+ }
5341
+ }
5342
+ }
5343
+ }
5344
+ },
5295
5345
  assignees: {
5296
5346
  type: "array",
5297
5347
  maxItems: 6,
@@ -5595,6 +5645,36 @@ var decisionCardTool = {
5595
5645
  required: ["type", "title", "question", "options"]
5596
5646
  }
5597
5647
  };
5648
+ var tabbyAuthSchema = zod.z.object({
5649
+ type: zod.z.literal("tabby-auth"),
5650
+ app: zod.z.string(),
5651
+ url: zod.z.string(),
5652
+ workspace: zod.z.string().optional(),
5653
+ state: zod.z.enum(["pending", "connected"]).optional(),
5654
+ ctaLabel: zod.z.string().optional(),
5655
+ steps: zod.z.array(zod.z.string()).optional(),
5656
+ description: zod.z.string().optional(),
5657
+ iconUrl: zod.z.string().optional()
5658
+ });
5659
+ var tabbyAuthTool = {
5660
+ name: "render_tabby_auth",
5661
+ description: "Render a dedicated, trustworthy sign-in card when a harness skill needs the member to authenticate with a third-party app (e.g. Sage Intacct, Airbnb, an ERP) before a `call_web_api` request can proceed. Use this for the `login_required` path instead of a raw markdown link or a connect-integration card. `app` is the human display name (drives the title context, subtitle, and CTA). `url` is the login/short-link the prominent CTA opens in a new tab. `workspace` adds a subtitle suffix ('{app} \xB7 {workspace} workspace'). `state='pending'` (default) is the first-time connect; `state='connected'` is the verify/re-auth case (session already live) with a green badge and an Open deep-link. `steps` overrides the default numbered instructions; `description` is a one-line intro. The card title ('Authentication required') and the 'Credentials not stored by Adopt' trust footer are hardcoded brand constants \u2014 never supplied here.",
5662
+ input_schema: {
5663
+ type: "object",
5664
+ properties: {
5665
+ type: { type: "string", enum: ["tabby-auth"] },
5666
+ app: { type: "string" },
5667
+ url: { type: "string" },
5668
+ workspace: { type: "string" },
5669
+ state: { type: "string", enum: ["pending", "connected"] },
5670
+ ctaLabel: { type: "string" },
5671
+ steps: { type: "array", items: { type: "string" } },
5672
+ description: { type: "string" },
5673
+ iconUrl: { type: "string" }
5674
+ },
5675
+ required: ["type", "app", "url"]
5676
+ }
5677
+ };
5598
5678
 
5599
5679
  // src/schemas/buildRenderUITool.ts
5600
5680
  function buildRenderUITool(selectedSchemas) {
@@ -5715,7 +5795,8 @@ var schemaRegistry = {
5715
5795
  "pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
5716
5796
  "workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool },
5717
5797
  "document-field-extraction": { schema: documentFieldExtractionSchema, tool: documentFieldExtractionTool },
5718
- "decision-card": { schema: decisionCardSchema, tool: decisionCardTool }
5798
+ "decision-card": { schema: decisionCardSchema, tool: decisionCardTool },
5799
+ "tabby-auth": { schema: tabbyAuthSchema, tool: tabbyAuthTool }
5719
5800
  };
5720
5801
 
5721
5802
  // src/shared/ColumnSettingsPanel.tsx
@@ -6428,17 +6509,17 @@ function SparklineTableResolver(p) {
6428
6509
  // src/composites/heatmap-table/resolver.tsx
6429
6510
  init_theme();
6430
6511
  init_ThemeContext();
6431
- function heatColor(z61) {
6432
- const clamped = Math.max(-3, Math.min(3, z61));
6512
+ function heatColor(z62) {
6513
+ const clamped = Math.max(-3, Math.min(3, z62));
6433
6514
  const abs = Math.abs(clamped);
6434
6515
  const lightness = 95 - abs * 8;
6435
6516
  const hue = clamped >= 0 ? 142 : 0;
6436
6517
  return `hsl(${hue} 60% ${lightness}%)`;
6437
6518
  }
6438
- function heatTextColor(z61) {
6439
- const abs = Math.abs(z61);
6440
- if (abs > 2) return z61 >= 0 ? "#14532d" : "#7f1d1d";
6441
- if (abs > 1) return z61 >= 0 ? "#166534" : "#991b1b";
6519
+ function heatTextColor(z62) {
6520
+ const abs = Math.abs(z62);
6521
+ if (abs > 2) return z62 >= 0 ? "#14532d" : "#7f1d1d";
6522
+ if (abs > 1) return z62 >= 0 ? "#166534" : "#991b1b";
6442
6523
  return "var(--foreground)";
6443
6524
  }
6444
6525
  var th2 = {
@@ -17502,6 +17583,8 @@ var STATUS_COLORS3 = {
17502
17583
  done: "#15803d",
17503
17584
  active: "",
17504
17585
  // filled from theme ACCENT at render time
17586
+ running: "",
17587
+ // filled from theme ACCENT at render time (executor in flight)
17505
17588
  review: "#f59e0b",
17506
17589
  pending: "#9ca3af",
17507
17590
  blocked: "#b45309",
@@ -17510,6 +17593,7 @@ var STATUS_COLORS3 = {
17510
17593
  var STATUS_LABELS = {
17511
17594
  done: "Complete",
17512
17595
  active: "In progress",
17596
+ running: "Running",
17513
17597
  review: "In review",
17514
17598
  pending: "Pending",
17515
17599
  blocked: "Blocked",
@@ -17613,6 +17697,26 @@ function IndexDot({ step, index, accent }) {
17613
17697
  if (step.status === "failed") {
17614
17698
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#dc2626", color: "white" }), children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10 }, children: "!" }) });
17615
17699
  }
17700
+ if (step.status === "running") {
17701
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: __spreadProps(__spreadValues({}, base), { position: "relative", background: `${accent}1f`, color: accent }), children: [
17702
+ /* @__PURE__ */ jsxRuntime.jsx(
17703
+ "span",
17704
+ {
17705
+ className: "wfs-anim",
17706
+ "aria-hidden": "true",
17707
+ style: {
17708
+ position: "absolute",
17709
+ inset: 0,
17710
+ borderRadius: "50%",
17711
+ border: `1.5px solid ${accent}33`,
17712
+ borderTopColor: accent,
17713
+ animation: "wfsSpin 0.8s linear infinite"
17714
+ }
17715
+ }
17716
+ ),
17717
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 9 }, children: n })
17718
+ ] });
17719
+ }
17616
17720
  if (step.status === "active") {
17617
17721
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: accent, color: "white" }), children: n });
17618
17722
  }
@@ -17621,6 +17725,44 @@ function IndexDot({ step, index, accent }) {
17621
17725
  }
17622
17726
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#f2f2f2", color: "#9ca3af" }), children: n });
17623
17727
  }
17728
+ function EvalBadge({ step }) {
17729
+ var _a2;
17730
+ const ev = step.eval;
17731
+ if (!ev || ev.judge_ok === false) return null;
17732
+ const score = typeof ev.score === "number" ? ev.score : null;
17733
+ const flags = (_a2 = ev.data_quality_flags) != null ? _a2 : [];
17734
+ const bad = ev.verdict === "bad" || score !== null && score < 0.8;
17735
+ const tip = flags.length > 0 ? flags.map((f) => {
17736
+ var _a3;
17737
+ return `${(_a3 = f.severity) != null ? _a3 : "?"}: ${f.details || f.issue || f.field || "issue"}`;
17738
+ }).join("\n") : ev.reasoning || void 0;
17739
+ const label = score !== null ? score.toFixed(2) : bad ? "flagged" : "ok";
17740
+ return /* @__PURE__ */ jsxRuntime.jsxs(
17741
+ "span",
17742
+ {
17743
+ title: tip,
17744
+ "data-testid": `workflow-stepper-eval-${step.id}`,
17745
+ style: {
17746
+ display: "inline-flex",
17747
+ alignItems: "center",
17748
+ gap: 3,
17749
+ fontSize: 9,
17750
+ fontWeight: 700,
17751
+ padding: "1px 6px",
17752
+ borderRadius: 9999,
17753
+ background: bad ? "#fff7ed" : "#dcfce7",
17754
+ color: bad ? "#b45309" : "#15803d",
17755
+ whiteSpace: "nowrap",
17756
+ flexShrink: 0
17757
+ },
17758
+ children: [
17759
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: bad ? "\u26A0" : "\u2713" }),
17760
+ label,
17761
+ flags.length > 0 ? ` \xB7 ${flags.length}` : ""
17762
+ ]
17763
+ }
17764
+ );
17765
+ }
17624
17766
  var CARD_MIN = 132;
17625
17767
  var CARD_GAP = 16;
17626
17768
  var AUTO_COMPACT_BELOW = 360;
@@ -17645,6 +17787,7 @@ var KEYFRAMES = `
17645
17787
  @keyframes wfsLampPulse{0%,100%{box-shadow:0 0 0 0 var(--wfs-accent,#6366f1)73}50%{box-shadow:0 0 0 4px transparent}}
17646
17788
  @keyframes wfsRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
17647
17789
  @keyframes wfsShimmer{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}
17790
+ @keyframes wfsSpin{to{transform:rotate(360deg)}}
17648
17791
  .wfs-rise{animation:wfsRise 0.32s cubic-bezier(0.22,1,0.36,1) both}
17649
17792
  @media (prefers-reduced-motion: reduce){
17650
17793
  .wfs-anim,.wfs-rise,.wfs-shim{animation:none !important}
@@ -17725,7 +17868,7 @@ function WorkflowStepperRenderer({
17725
17868
  const steps = (_a2 = data.steps) != null ? _a2 : [];
17726
17869
  const activeStepId = (_d = (_c = data.active_step) != null ? _c : (_b = steps.find((s) => s.status === "active")) == null ? void 0 : _b.id) != null ? _d : null;
17727
17870
  const interactive = typeof onSelectStep === "function";
17728
- const statusColor3 = (s) => s === "active" ? ACCENT2 : STATUS_COLORS3[s];
17871
+ const statusColor3 = (s) => s === "active" || s === "running" ? ACCENT2 : STATUS_COLORS3[s];
17729
17872
  const doneCount = steps.filter((s) => s.status === "done").length;
17730
17873
  const rootRef = React45__default.default.useRef(null);
17731
17874
  const containerW = useContainerWidth(rootRef);
@@ -17953,6 +18096,7 @@ function WorkflowStepperRenderer({
17953
18096
  var _a3;
17954
18097
  const isSelected = selectedStep === step.id;
17955
18098
  const isActive = step.status === "active";
18099
+ const isRunning = step.status === "running";
17956
18100
  const reached = step.status !== "pending";
17957
18101
  const clickable = interactive && reached;
17958
18102
  const color = statusColor3(step.status);
@@ -18049,36 +18193,41 @@ function WorkflowStepperRenderer({
18049
18193
  }
18050
18194
  }
18051
18195
  ),
18052
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
18053
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
18196
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 4 }, children: [
18197
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
18054
18198
  /* @__PURE__ */ jsxRuntime.jsx(IndexDot, { step, index: i, accent: ACCENT2 }),
18055
18199
  /* @__PURE__ */ jsxRuntime.jsx(
18056
18200
  "span",
18057
18201
  {
18058
- className: isActive ? "wfs-anim" : void 0,
18202
+ className: isActive || isRunning ? "wfs-anim" : void 0,
18059
18203
  style: {
18060
18204
  width: 6,
18061
18205
  height: 6,
18062
18206
  borderRadius: "50%",
18063
18207
  background: color,
18064
- animation: isActive ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
18208
+ flexShrink: 0,
18209
+ animation: isActive || isRunning ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
18065
18210
  }
18066
18211
  }
18067
18212
  )
18068
18213
  ] }),
18069
- /* @__PURE__ */ jsxRuntime.jsx(
18070
- "span",
18071
- {
18072
- style: {
18073
- fontSize: 9,
18074
- fontWeight: 600,
18075
- letterSpacing: "0.05em",
18076
- textTransform: "uppercase",
18077
- color
18078
- },
18079
- children: STATUS_LABELS[step.status]
18080
- }
18081
- )
18214
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 4, minWidth: 0 }, children: [
18215
+ /* @__PURE__ */ jsxRuntime.jsx(EvalBadge, { step }),
18216
+ /* @__PURE__ */ jsxRuntime.jsx(
18217
+ "span",
18218
+ {
18219
+ style: {
18220
+ fontSize: 9,
18221
+ fontWeight: 600,
18222
+ letterSpacing: "0.05em",
18223
+ textTransform: "uppercase",
18224
+ color,
18225
+ whiteSpace: "nowrap"
18226
+ },
18227
+ children: STATUS_LABELS[step.status]
18228
+ }
18229
+ )
18230
+ ] })
18082
18231
  ] }),
18083
18232
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 0 }, children: [
18084
18233
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -18268,12 +18417,14 @@ var BADGE_TITLE = {
18268
18417
  var BADGE_STYLE = {
18269
18418
  SC: { bg: "#dcfce7", fg: "#15803d" },
18270
18419
  CN: { bg: "#eff6ff", fg: "#0364ff" },
18420
+ // theme-ok (SECONDARY)
18271
18421
  AB: { bg: "#fff7ed", fg: "#92400e" },
18272
18422
  SW: { bg: "#fef2f2", fg: "#dc2626" }
18273
18423
  };
18274
18424
  var STATE_DOT = {
18275
18425
  ok: "#15803d",
18276
18426
  corrected: "#0364ff",
18427
+ // theme-ok (SECONDARY)
18277
18428
  missing: "#dc2626",
18278
18429
  warn: "#f59e0b"
18279
18430
  };
@@ -18636,6 +18787,7 @@ var BADGE_DOT = {
18636
18787
  missing: "#dc2626",
18637
18788
  red: "#dc2626",
18638
18789
  corrected: "#0364ff"
18790
+ // theme-ok (SECONDARY)
18639
18791
  };
18640
18792
  function FieldDetails({
18641
18793
  summary,
@@ -20265,6 +20417,317 @@ function DecisionCardResolver(p) {
20265
20417
  }
20266
20418
  ) });
20267
20419
  }
20420
+ init_ThemeContext();
20421
+ var CONNECTED_GREEN3 = "#15803d";
20422
+ var CONNECTED_GREEN_BG = "#dcfce7";
20423
+ var PENDING_AMBER = "#92400e";
20424
+ var PENDING_AMBER_BG = "#fff7ed";
20425
+ var CARD_TITLE = "Authentication required";
20426
+ var TRUST_FOOTER = "Credentials not stored by Adopt";
20427
+ var DEFAULT_STEPS = (app, ctaLabel, connected) => connected ? [
20428
+ `Click ${ctaLabel} below to open ${app} in a new tab.`,
20429
+ "Confirm you are signed in \u2014 re-authenticate if prompted.",
20430
+ "Return here \u2014 the request continues automatically."
20431
+ ] : [
20432
+ `Click ${ctaLabel} below to open the sign-in page.`,
20433
+ `Sign in with your ${app} credentials \u2014 SSO is supported.`,
20434
+ "Return here \u2014 the request resumes automatically."
20435
+ ];
20436
+ function humanizeApp(raw) {
20437
+ const v = raw.trim();
20438
+ if (!v) return v;
20439
+ const looksLikeSlug = /^[a-z0-9]+([_-][a-z0-9]+)*$/.test(v);
20440
+ if (!looksLikeSlug) return v;
20441
+ return v.split(/[_-]+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
20442
+ }
20443
+ function ShieldIcon({ color }) {
20444
+ return /* @__PURE__ */ jsxRuntime.jsxs(
20445
+ "svg",
20446
+ {
20447
+ width: "13",
20448
+ height: "13",
20449
+ viewBox: "0 0 24 24",
20450
+ fill: "none",
20451
+ stroke: color,
20452
+ strokeWidth: "2",
20453
+ strokeLinecap: "round",
20454
+ strokeLinejoin: "round",
20455
+ "aria-hidden": "true",
20456
+ style: { flexShrink: 0 },
20457
+ children: [
20458
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }),
20459
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 12 2 2 4-4" })
20460
+ ]
20461
+ }
20462
+ );
20463
+ }
20464
+ function ExternalIcon() {
20465
+ return /* @__PURE__ */ jsxRuntime.jsxs(
20466
+ "svg",
20467
+ {
20468
+ width: "13",
20469
+ height: "13",
20470
+ viewBox: "0 0 24 24",
20471
+ fill: "none",
20472
+ stroke: "currentColor",
20473
+ strokeWidth: "2",
20474
+ strokeLinecap: "round",
20475
+ strokeLinejoin: "round",
20476
+ "aria-hidden": "true",
20477
+ style: { flexShrink: 0 },
20478
+ children: [
20479
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 3h6v6" }),
20480
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 14 21 3" }),
20481
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
20482
+ ]
20483
+ }
20484
+ );
20485
+ }
20486
+ function TabbyAuthResolver(p) {
20487
+ var _a2, _b, _c;
20488
+ const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
20489
+ const [cardHovered, setCardHovered] = React45.useState(false);
20490
+ const [btnHovered, setBtnHovered] = React45.useState(false);
20491
+ const [imgFailed, setImgFailed] = React45.useState(false);
20492
+ const app = humanizeApp(p.app || "the app");
20493
+ const connected = p.state === "connected";
20494
+ const accent = connected ? CONNECTED_GREEN3 : ACCENT2;
20495
+ const ctaLabel = (_a2 = p.ctaLabel) != null ? _a2 : connected ? `Open ${app}` : `Connect ${app}`;
20496
+ const subtitle = p.workspace ? `${app} \xB7 ${p.workspace} workspace` : app;
20497
+ const steps = ((_b = p.steps) == null ? void 0 : _b.length) ? p.steps : DEFAULT_STEPS(app, ctaLabel, connected);
20498
+ const description = (_c = p.description) != null ? _c : connected ? `Your ${app} session is active. Open ${app} to continue, or re-authenticate if prompted.` : `Your ${app} account is not yet connected to this workspace. Complete sign-in once to enable automatic access.`;
20499
+ const iconSrc = p.iconUrl || brandIconUrl(app);
20500
+ const showImg = Boolean(iconSrc) && !imgFailed;
20501
+ const initial = app.charAt(0).toUpperCase();
20502
+ const badge = connected ? { label: "Connected", bg: CONNECTED_GREEN_BG, color: CONNECTED_GREEN3 } : { label: "Pending sign-in", bg: PENDING_AMBER_BG, color: PENDING_AMBER };
20503
+ const sectionPad = "13px 16px";
20504
+ return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: `${app} authentication`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "10px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
20505
+ "div",
20506
+ {
20507
+ onMouseEnter: () => setCardHovered(true),
20508
+ onMouseLeave: () => setCardHovered(false),
20509
+ style: {
20510
+ display: "flex",
20511
+ flexDirection: "row",
20512
+ alignItems: "stretch",
20513
+ borderRadius: "0.75rem",
20514
+ border: `1px solid ${cardHovered ? "#d2d2d2" : BORDER4}`,
20515
+ background: "white",
20516
+ overflow: "hidden",
20517
+ boxShadow: cardHovered ? "0 1px 3px rgba(0,0,0,0.05), 0 6px 18px rgba(0,0,0,0.06)" : "0 1px 2px rgba(0,0,0,0.03)",
20518
+ transition: "box-shadow 0.18s ease, border-color 0.18s ease"
20519
+ },
20520
+ children: [
20521
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "3px", flexShrink: 0, background: accent } }),
20522
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
20523
+ /* @__PURE__ */ jsxRuntime.jsxs(
20524
+ "div",
20525
+ {
20526
+ style: {
20527
+ display: "flex",
20528
+ alignItems: "flex-start",
20529
+ gap: "12px",
20530
+ padding: sectionPad
20531
+ },
20532
+ children: [
20533
+ /* @__PURE__ */ jsxRuntime.jsx(
20534
+ "div",
20535
+ {
20536
+ style: {
20537
+ position: "relative",
20538
+ width: "34px",
20539
+ height: "34px",
20540
+ borderRadius: "9px",
20541
+ flexShrink: 0,
20542
+ display: "flex",
20543
+ alignItems: "center",
20544
+ justifyContent: "center",
20545
+ background: showImg ? "white" : "#fff3ee",
20546
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.06)",
20547
+ overflow: "hidden"
20548
+ },
20549
+ children: showImg ? /* @__PURE__ */ jsxRuntime.jsx(
20550
+ "img",
20551
+ {
20552
+ src: iconSrc,
20553
+ alt: app,
20554
+ onError: () => setImgFailed(true),
20555
+ style: { width: "22px", height: "22px", objectFit: "contain" }
20556
+ }
20557
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
20558
+ "span",
20559
+ {
20560
+ style: {
20561
+ fontFamily: "var(--font-serif)",
20562
+ fontSize: "17px",
20563
+ fontWeight: 400,
20564
+ color: ACCENT2,
20565
+ lineHeight: 1
20566
+ },
20567
+ children: initial
20568
+ }
20569
+ )
20570
+ }
20571
+ ),
20572
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "2px" }, children: [
20573
+ /* @__PURE__ */ jsxRuntime.jsx(
20574
+ "span",
20575
+ {
20576
+ style: {
20577
+ fontFamily: "var(--font-serif)",
20578
+ fontSize: "15px",
20579
+ fontWeight: 400,
20580
+ color: "var(--foreground)",
20581
+ letterSpacing: "-0.01em",
20582
+ lineHeight: 1.2
20583
+ },
20584
+ children: CARD_TITLE
20585
+ }
20586
+ ),
20587
+ /* @__PURE__ */ jsxRuntime.jsx(
20588
+ "span",
20589
+ {
20590
+ style: {
20591
+ fontSize: "12px",
20592
+ color: MUTED2,
20593
+ whiteSpace: "nowrap",
20594
+ overflow: "hidden",
20595
+ textOverflow: "ellipsis"
20596
+ },
20597
+ children: subtitle
20598
+ }
20599
+ )
20600
+ ] }),
20601
+ /* @__PURE__ */ jsxRuntime.jsxs(
20602
+ "span",
20603
+ {
20604
+ style: {
20605
+ display: "inline-flex",
20606
+ alignItems: "center",
20607
+ gap: "5px",
20608
+ flexShrink: 0,
20609
+ fontSize: "10.5px",
20610
+ fontWeight: 600,
20611
+ padding: "3px 9px",
20612
+ borderRadius: "9999px",
20613
+ background: badge.bg,
20614
+ color: badge.color,
20615
+ whiteSpace: "nowrap"
20616
+ },
20617
+ children: [
20618
+ /* @__PURE__ */ jsxRuntime.jsx(
20619
+ "span",
20620
+ {
20621
+ style: {
20622
+ width: "6px",
20623
+ height: "6px",
20624
+ borderRadius: "9999px",
20625
+ background: badge.color
20626
+ }
20627
+ }
20628
+ ),
20629
+ badge.label
20630
+ ]
20631
+ }
20632
+ )
20633
+ ]
20634
+ }
20635
+ ),
20636
+ /* @__PURE__ */ jsxRuntime.jsxs(
20637
+ "div",
20638
+ {
20639
+ style: {
20640
+ borderTop: `1px solid ${BORDER4}`,
20641
+ padding: sectionPad,
20642
+ display: "flex",
20643
+ flexDirection: "column",
20644
+ gap: "12px"
20645
+ },
20646
+ children: [
20647
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, fontSize: "12.5px", lineHeight: 1.5, color: "var(--foreground)" }, children: description }),
20648
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { style: { margin: 0, padding: 0, listStyle: "none", display: "flex", flexDirection: "column", gap: "8px" }, children: steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { style: { display: "flex", alignItems: "flex-start", gap: "10px" }, children: [
20649
+ /* @__PURE__ */ jsxRuntime.jsx(
20650
+ "span",
20651
+ {
20652
+ style: {
20653
+ flexShrink: 0,
20654
+ width: "18px",
20655
+ height: "18px",
20656
+ borderRadius: "9999px",
20657
+ background: accent,
20658
+ color: "white",
20659
+ fontSize: "10.5px",
20660
+ fontWeight: 600,
20661
+ display: "flex",
20662
+ alignItems: "center",
20663
+ justifyContent: "center",
20664
+ marginTop: "1px"
20665
+ },
20666
+ children: i + 1
20667
+ }
20668
+ ),
20669
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12.5px", lineHeight: 1.45, color: "var(--foreground)" }, children: step })
20670
+ ] }, i)) })
20671
+ ]
20672
+ }
20673
+ ),
20674
+ /* @__PURE__ */ jsxRuntime.jsxs(
20675
+ "div",
20676
+ {
20677
+ style: {
20678
+ borderTop: `1px solid ${BORDER4}`,
20679
+ padding: sectionPad,
20680
+ background: "#fbfbfb",
20681
+ display: "flex",
20682
+ alignItems: "center",
20683
+ justifyContent: "space-between",
20684
+ gap: "12px",
20685
+ flexWrap: "wrap"
20686
+ },
20687
+ children: [
20688
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px", color: MUTED2, fontSize: "11.5px" }, children: [
20689
+ /* @__PURE__ */ jsxRuntime.jsx(ShieldIcon, { color: CONNECTED_GREEN3 }),
20690
+ TRUST_FOOTER
20691
+ ] }),
20692
+ /* @__PURE__ */ jsxRuntime.jsxs(
20693
+ "a",
20694
+ {
20695
+ href: p.url,
20696
+ target: "_blank",
20697
+ rel: "noopener noreferrer",
20698
+ onMouseEnter: () => setBtnHovered(true),
20699
+ onMouseLeave: () => setBtnHovered(false),
20700
+ style: {
20701
+ display: "inline-flex",
20702
+ alignItems: "center",
20703
+ gap: "7px",
20704
+ flexShrink: 0,
20705
+ borderRadius: "8px",
20706
+ padding: "8px 15px",
20707
+ fontSize: "12.5px",
20708
+ fontWeight: 600,
20709
+ textDecoration: "none",
20710
+ whiteSpace: "nowrap",
20711
+ cursor: "pointer",
20712
+ color: "white",
20713
+ border: "1px solid transparent",
20714
+ background: btnHovered ? connected ? "#126a33" : ACCENT_SOFT2 : accent,
20715
+ transition: "background 0.15s ease"
20716
+ },
20717
+ children: [
20718
+ /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, {}),
20719
+ ctaLabel
20720
+ ]
20721
+ }
20722
+ )
20723
+ ]
20724
+ }
20725
+ )
20726
+ ] })
20727
+ ]
20728
+ }
20729
+ ) }) });
20730
+ }
20268
20731
  function resolveUI(rawPayload) {
20269
20732
  const payload = coercePayload(rawPayload);
20270
20733
  switch (payload.type) {
@@ -20386,6 +20849,8 @@ function resolveUI(rawPayload) {
20386
20849
  return /* @__PURE__ */ jsxRuntime.jsx(DocumentFieldExtractionResolver, __spreadValues({}, payload));
20387
20850
  case "decision-card":
20388
20851
  return /* @__PURE__ */ jsxRuntime.jsx(DecisionCardResolver, __spreadValues({}, payload));
20852
+ case "tabby-auth":
20853
+ return /* @__PURE__ */ jsxRuntime.jsx(TabbyAuthResolver, __spreadValues({}, payload));
20389
20854
  default: {
20390
20855
  return /* @__PURE__ */ jsxRuntime.jsx(
20391
20856
  "div",