@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.js CHANGED
@@ -5227,7 +5227,32 @@ var workflowStepperSchema = z.object({
5227
5227
  n: z.number().int().positive().optional(),
5228
5228
  title: z.string(),
5229
5229
  sub: z.string().optional(),
5230
- status: z.enum(["done", "active", "review", "pending", "blocked", "failed"]),
5230
+ status: z.enum([
5231
+ "done",
5232
+ "active",
5233
+ "running",
5234
+ "review",
5235
+ "pending",
5236
+ "blocked",
5237
+ "failed"
5238
+ ]),
5239
+ // Optional quality-gate verdict for a step run by an executor (e.g. a
5240
+ // pipeline). Surfaces a subtle trust badge; flags hint at issues a human
5241
+ // should review (the full list lives in the escalation dock).
5242
+ eval: z.object({
5243
+ score: z.number().min(0).max(1).nullable().optional(),
5244
+ verdict: z.enum(["good", "bad"]).optional(),
5245
+ reasoning: z.string().optional(),
5246
+ judge_ok: z.boolean().optional(),
5247
+ data_quality_flags: z.array(
5248
+ z.object({
5249
+ field: z.string().optional(),
5250
+ issue: z.string().optional(),
5251
+ severity: z.enum(["low", "medium", "high"]).optional(),
5252
+ details: z.string().optional()
5253
+ })
5254
+ ).optional()
5255
+ }).optional(),
5231
5256
  assignees: z.array(
5232
5257
  z.object({
5233
5258
  name: z.string(),
@@ -5263,7 +5288,32 @@ var workflowStepperTool = {
5263
5288
  n: { type: "number", description: "Step number; defaults to index + 1" },
5264
5289
  title: { type: "string" },
5265
5290
  sub: { type: "string", description: "Short status caption, e.g. '7 accounts \xB7 2 exceptions'" },
5266
- status: { type: "string", enum: ["done", "active", "review", "pending", "blocked", "failed"] },
5291
+ status: {
5292
+ type: "string",
5293
+ enum: ["done", "active", "running", "review", "pending", "blocked", "failed"]
5294
+ },
5295
+ eval: {
5296
+ type: "object",
5297
+ description: "Optional quality-gate verdict for an executor-run step.",
5298
+ properties: {
5299
+ score: { type: "number" },
5300
+ verdict: { type: "string", enum: ["good", "bad"] },
5301
+ reasoning: { type: "string" },
5302
+ judge_ok: { type: "boolean" },
5303
+ data_quality_flags: {
5304
+ type: "array",
5305
+ items: {
5306
+ type: "object",
5307
+ properties: {
5308
+ field: { type: "string" },
5309
+ issue: { type: "string" },
5310
+ severity: { type: "string", enum: ["low", "medium", "high"] },
5311
+ details: { type: "string" }
5312
+ }
5313
+ }
5314
+ }
5315
+ }
5316
+ },
5267
5317
  assignees: {
5268
5318
  type: "array",
5269
5319
  maxItems: 6,
@@ -5567,6 +5617,36 @@ var decisionCardTool = {
5567
5617
  required: ["type", "title", "question", "options"]
5568
5618
  }
5569
5619
  };
5620
+ var tabbyAuthSchema = z.object({
5621
+ type: z.literal("tabby-auth"),
5622
+ app: z.string(),
5623
+ url: z.string(),
5624
+ workspace: z.string().optional(),
5625
+ state: z.enum(["pending", "connected"]).optional(),
5626
+ ctaLabel: z.string().optional(),
5627
+ steps: z.array(z.string()).optional(),
5628
+ description: z.string().optional(),
5629
+ iconUrl: z.string().optional()
5630
+ });
5631
+ var tabbyAuthTool = {
5632
+ name: "render_tabby_auth",
5633
+ 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.",
5634
+ input_schema: {
5635
+ type: "object",
5636
+ properties: {
5637
+ type: { type: "string", enum: ["tabby-auth"] },
5638
+ app: { type: "string" },
5639
+ url: { type: "string" },
5640
+ workspace: { type: "string" },
5641
+ state: { type: "string", enum: ["pending", "connected"] },
5642
+ ctaLabel: { type: "string" },
5643
+ steps: { type: "array", items: { type: "string" } },
5644
+ description: { type: "string" },
5645
+ iconUrl: { type: "string" }
5646
+ },
5647
+ required: ["type", "app", "url"]
5648
+ }
5649
+ };
5570
5650
 
5571
5651
  // src/schemas/buildRenderUITool.ts
5572
5652
  function buildRenderUITool(selectedSchemas) {
@@ -5687,7 +5767,8 @@ var schemaRegistry = {
5687
5767
  "pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
5688
5768
  "workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool },
5689
5769
  "document-field-extraction": { schema: documentFieldExtractionSchema, tool: documentFieldExtractionTool },
5690
- "decision-card": { schema: decisionCardSchema, tool: decisionCardTool }
5770
+ "decision-card": { schema: decisionCardSchema, tool: decisionCardTool },
5771
+ "tabby-auth": { schema: tabbyAuthSchema, tool: tabbyAuthTool }
5691
5772
  };
5692
5773
 
5693
5774
  // src/shared/ColumnSettingsPanel.tsx
@@ -6400,17 +6481,17 @@ function SparklineTableResolver(p) {
6400
6481
  // src/composites/heatmap-table/resolver.tsx
6401
6482
  init_theme();
6402
6483
  init_ThemeContext();
6403
- function heatColor(z61) {
6404
- const clamped = Math.max(-3, Math.min(3, z61));
6484
+ function heatColor(z62) {
6485
+ const clamped = Math.max(-3, Math.min(3, z62));
6405
6486
  const abs = Math.abs(clamped);
6406
6487
  const lightness = 95 - abs * 8;
6407
6488
  const hue = clamped >= 0 ? 142 : 0;
6408
6489
  return `hsl(${hue} 60% ${lightness}%)`;
6409
6490
  }
6410
- function heatTextColor(z61) {
6411
- const abs = Math.abs(z61);
6412
- if (abs > 2) return z61 >= 0 ? "#14532d" : "#7f1d1d";
6413
- if (abs > 1) return z61 >= 0 ? "#166534" : "#991b1b";
6491
+ function heatTextColor(z62) {
6492
+ const abs = Math.abs(z62);
6493
+ if (abs > 2) return z62 >= 0 ? "#14532d" : "#7f1d1d";
6494
+ if (abs > 1) return z62 >= 0 ? "#166534" : "#991b1b";
6414
6495
  return "var(--foreground)";
6415
6496
  }
6416
6497
  var th2 = {
@@ -17474,6 +17555,8 @@ var STATUS_COLORS3 = {
17474
17555
  done: "#15803d",
17475
17556
  active: "",
17476
17557
  // filled from theme ACCENT at render time
17558
+ running: "",
17559
+ // filled from theme ACCENT at render time (executor in flight)
17477
17560
  review: "#f59e0b",
17478
17561
  pending: "#9ca3af",
17479
17562
  blocked: "#b45309",
@@ -17482,6 +17565,7 @@ var STATUS_COLORS3 = {
17482
17565
  var STATUS_LABELS = {
17483
17566
  done: "Complete",
17484
17567
  active: "In progress",
17568
+ running: "Running",
17485
17569
  review: "In review",
17486
17570
  pending: "Pending",
17487
17571
  blocked: "Blocked",
@@ -17585,6 +17669,26 @@ function IndexDot({ step, index, accent }) {
17585
17669
  if (step.status === "failed") {
17586
17670
  return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#dc2626", color: "white" }), children: /* @__PURE__ */ jsx("span", { style: { fontSize: 10 }, children: "!" }) });
17587
17671
  }
17672
+ if (step.status === "running") {
17673
+ return /* @__PURE__ */ jsxs("div", { style: __spreadProps(__spreadValues({}, base), { position: "relative", background: `${accent}1f`, color: accent }), children: [
17674
+ /* @__PURE__ */ jsx(
17675
+ "span",
17676
+ {
17677
+ className: "wfs-anim",
17678
+ "aria-hidden": "true",
17679
+ style: {
17680
+ position: "absolute",
17681
+ inset: 0,
17682
+ borderRadius: "50%",
17683
+ border: `1.5px solid ${accent}33`,
17684
+ borderTopColor: accent,
17685
+ animation: "wfsSpin 0.8s linear infinite"
17686
+ }
17687
+ }
17688
+ ),
17689
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 9 }, children: n })
17690
+ ] });
17691
+ }
17588
17692
  if (step.status === "active") {
17589
17693
  return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: accent, color: "white" }), children: n });
17590
17694
  }
@@ -17593,6 +17697,44 @@ function IndexDot({ step, index, accent }) {
17593
17697
  }
17594
17698
  return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#f2f2f2", color: "#9ca3af" }), children: n });
17595
17699
  }
17700
+ function EvalBadge({ step }) {
17701
+ var _a2;
17702
+ const ev = step.eval;
17703
+ if (!ev || ev.judge_ok === false) return null;
17704
+ const score = typeof ev.score === "number" ? ev.score : null;
17705
+ const flags = (_a2 = ev.data_quality_flags) != null ? _a2 : [];
17706
+ const bad = ev.verdict === "bad" || score !== null && score < 0.8;
17707
+ const tip = flags.length > 0 ? flags.map((f) => {
17708
+ var _a3;
17709
+ return `${(_a3 = f.severity) != null ? _a3 : "?"}: ${f.details || f.issue || f.field || "issue"}`;
17710
+ }).join("\n") : ev.reasoning || void 0;
17711
+ const label = score !== null ? score.toFixed(2) : bad ? "flagged" : "ok";
17712
+ return /* @__PURE__ */ jsxs(
17713
+ "span",
17714
+ {
17715
+ title: tip,
17716
+ "data-testid": `workflow-stepper-eval-${step.id}`,
17717
+ style: {
17718
+ display: "inline-flex",
17719
+ alignItems: "center",
17720
+ gap: 3,
17721
+ fontSize: 9,
17722
+ fontWeight: 700,
17723
+ padding: "1px 6px",
17724
+ borderRadius: 9999,
17725
+ background: bad ? "#fff7ed" : "#dcfce7",
17726
+ color: bad ? "#b45309" : "#15803d",
17727
+ whiteSpace: "nowrap",
17728
+ flexShrink: 0
17729
+ },
17730
+ children: [
17731
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: bad ? "\u26A0" : "\u2713" }),
17732
+ label,
17733
+ flags.length > 0 ? ` \xB7 ${flags.length}` : ""
17734
+ ]
17735
+ }
17736
+ );
17737
+ }
17596
17738
  var CARD_MIN = 132;
17597
17739
  var CARD_GAP = 16;
17598
17740
  var AUTO_COMPACT_BELOW = 360;
@@ -17617,6 +17759,7 @@ var KEYFRAMES = `
17617
17759
  @keyframes wfsLampPulse{0%,100%{box-shadow:0 0 0 0 var(--wfs-accent,#6366f1)73}50%{box-shadow:0 0 0 4px transparent}}
17618
17760
  @keyframes wfsRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
17619
17761
  @keyframes wfsShimmer{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}
17762
+ @keyframes wfsSpin{to{transform:rotate(360deg)}}
17620
17763
  .wfs-rise{animation:wfsRise 0.32s cubic-bezier(0.22,1,0.36,1) both}
17621
17764
  @media (prefers-reduced-motion: reduce){
17622
17765
  .wfs-anim,.wfs-rise,.wfs-shim{animation:none !important}
@@ -17697,7 +17840,7 @@ function WorkflowStepperRenderer({
17697
17840
  const steps = (_a2 = data.steps) != null ? _a2 : [];
17698
17841
  const activeStepId = (_d = (_c = data.active_step) != null ? _c : (_b = steps.find((s) => s.status === "active")) == null ? void 0 : _b.id) != null ? _d : null;
17699
17842
  const interactive = typeof onSelectStep === "function";
17700
- const statusColor3 = (s) => s === "active" ? ACCENT2 : STATUS_COLORS3[s];
17843
+ const statusColor3 = (s) => s === "active" || s === "running" ? ACCENT2 : STATUS_COLORS3[s];
17701
17844
  const doneCount = steps.filter((s) => s.status === "done").length;
17702
17845
  const rootRef = React45.useRef(null);
17703
17846
  const containerW = useContainerWidth(rootRef);
@@ -17925,6 +18068,7 @@ function WorkflowStepperRenderer({
17925
18068
  var _a3;
17926
18069
  const isSelected = selectedStep === step.id;
17927
18070
  const isActive = step.status === "active";
18071
+ const isRunning = step.status === "running";
17928
18072
  const reached = step.status !== "pending";
17929
18073
  const clickable = interactive && reached;
17930
18074
  const color = statusColor3(step.status);
@@ -18021,36 +18165,41 @@ function WorkflowStepperRenderer({
18021
18165
  }
18022
18166
  }
18023
18167
  ),
18024
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
18025
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
18168
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 4 }, children: [
18169
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
18026
18170
  /* @__PURE__ */ jsx(IndexDot, { step, index: i, accent: ACCENT2 }),
18027
18171
  /* @__PURE__ */ jsx(
18028
18172
  "span",
18029
18173
  {
18030
- className: isActive ? "wfs-anim" : void 0,
18174
+ className: isActive || isRunning ? "wfs-anim" : void 0,
18031
18175
  style: {
18032
18176
  width: 6,
18033
18177
  height: 6,
18034
18178
  borderRadius: "50%",
18035
18179
  background: color,
18036
- animation: isActive ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
18180
+ flexShrink: 0,
18181
+ animation: isActive || isRunning ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
18037
18182
  }
18038
18183
  }
18039
18184
  )
18040
18185
  ] }),
18041
- /* @__PURE__ */ jsx(
18042
- "span",
18043
- {
18044
- style: {
18045
- fontSize: 9,
18046
- fontWeight: 600,
18047
- letterSpacing: "0.05em",
18048
- textTransform: "uppercase",
18049
- color
18050
- },
18051
- children: STATUS_LABELS[step.status]
18052
- }
18053
- )
18186
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 4, minWidth: 0 }, children: [
18187
+ /* @__PURE__ */ jsx(EvalBadge, { step }),
18188
+ /* @__PURE__ */ jsx(
18189
+ "span",
18190
+ {
18191
+ style: {
18192
+ fontSize: 9,
18193
+ fontWeight: 600,
18194
+ letterSpacing: "0.05em",
18195
+ textTransform: "uppercase",
18196
+ color,
18197
+ whiteSpace: "nowrap"
18198
+ },
18199
+ children: STATUS_LABELS[step.status]
18200
+ }
18201
+ )
18202
+ ] })
18054
18203
  ] }),
18055
18204
  /* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
18056
18205
  /* @__PURE__ */ jsx(
@@ -18240,12 +18389,14 @@ var BADGE_TITLE = {
18240
18389
  var BADGE_STYLE = {
18241
18390
  SC: { bg: "#dcfce7", fg: "#15803d" },
18242
18391
  CN: { bg: "#eff6ff", fg: "#0364ff" },
18392
+ // theme-ok (SECONDARY)
18243
18393
  AB: { bg: "#fff7ed", fg: "#92400e" },
18244
18394
  SW: { bg: "#fef2f2", fg: "#dc2626" }
18245
18395
  };
18246
18396
  var STATE_DOT = {
18247
18397
  ok: "#15803d",
18248
18398
  corrected: "#0364ff",
18399
+ // theme-ok (SECONDARY)
18249
18400
  missing: "#dc2626",
18250
18401
  warn: "#f59e0b"
18251
18402
  };
@@ -18608,6 +18759,7 @@ var BADGE_DOT = {
18608
18759
  missing: "#dc2626",
18609
18760
  red: "#dc2626",
18610
18761
  corrected: "#0364ff"
18762
+ // theme-ok (SECONDARY)
18611
18763
  };
18612
18764
  function FieldDetails({
18613
18765
  summary,
@@ -20237,6 +20389,317 @@ function DecisionCardResolver(p) {
20237
20389
  }
20238
20390
  ) });
20239
20391
  }
20392
+ init_ThemeContext();
20393
+ var CONNECTED_GREEN3 = "#15803d";
20394
+ var CONNECTED_GREEN_BG = "#dcfce7";
20395
+ var PENDING_AMBER = "#92400e";
20396
+ var PENDING_AMBER_BG = "#fff7ed";
20397
+ var CARD_TITLE = "Authentication required";
20398
+ var TRUST_FOOTER = "Credentials not stored by Adopt";
20399
+ var DEFAULT_STEPS = (app, ctaLabel, connected) => connected ? [
20400
+ `Click ${ctaLabel} below to open ${app} in a new tab.`,
20401
+ "Confirm you are signed in \u2014 re-authenticate if prompted.",
20402
+ "Return here \u2014 the request continues automatically."
20403
+ ] : [
20404
+ `Click ${ctaLabel} below to open the sign-in page.`,
20405
+ `Sign in with your ${app} credentials \u2014 SSO is supported.`,
20406
+ "Return here \u2014 the request resumes automatically."
20407
+ ];
20408
+ function humanizeApp(raw) {
20409
+ const v = raw.trim();
20410
+ if (!v) return v;
20411
+ const looksLikeSlug = /^[a-z0-9]+([_-][a-z0-9]+)*$/.test(v);
20412
+ if (!looksLikeSlug) return v;
20413
+ return v.split(/[_-]+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
20414
+ }
20415
+ function ShieldIcon({ color }) {
20416
+ return /* @__PURE__ */ jsxs(
20417
+ "svg",
20418
+ {
20419
+ width: "13",
20420
+ height: "13",
20421
+ viewBox: "0 0 24 24",
20422
+ fill: "none",
20423
+ stroke: color,
20424
+ strokeWidth: "2",
20425
+ strokeLinecap: "round",
20426
+ strokeLinejoin: "round",
20427
+ "aria-hidden": "true",
20428
+ style: { flexShrink: 0 },
20429
+ children: [
20430
+ /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }),
20431
+ /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
20432
+ ]
20433
+ }
20434
+ );
20435
+ }
20436
+ function ExternalIcon() {
20437
+ return /* @__PURE__ */ jsxs(
20438
+ "svg",
20439
+ {
20440
+ width: "13",
20441
+ height: "13",
20442
+ viewBox: "0 0 24 24",
20443
+ fill: "none",
20444
+ stroke: "currentColor",
20445
+ strokeWidth: "2",
20446
+ strokeLinecap: "round",
20447
+ strokeLinejoin: "round",
20448
+ "aria-hidden": "true",
20449
+ style: { flexShrink: 0 },
20450
+ children: [
20451
+ /* @__PURE__ */ jsx("path", { d: "M15 3h6v6" }),
20452
+ /* @__PURE__ */ jsx("path", { d: "M10 14 21 3" }),
20453
+ /* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
20454
+ ]
20455
+ }
20456
+ );
20457
+ }
20458
+ function TabbyAuthResolver(p) {
20459
+ var _a2, _b, _c;
20460
+ const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
20461
+ const [cardHovered, setCardHovered] = useState(false);
20462
+ const [btnHovered, setBtnHovered] = useState(false);
20463
+ const [imgFailed, setImgFailed] = useState(false);
20464
+ const app = humanizeApp(p.app || "the app");
20465
+ const connected = p.state === "connected";
20466
+ const accent = connected ? CONNECTED_GREEN3 : ACCENT2;
20467
+ const ctaLabel = (_a2 = p.ctaLabel) != null ? _a2 : connected ? `Open ${app}` : `Connect ${app}`;
20468
+ const subtitle = p.workspace ? `${app} \xB7 ${p.workspace} workspace` : app;
20469
+ const steps = ((_b = p.steps) == null ? void 0 : _b.length) ? p.steps : DEFAULT_STEPS(app, ctaLabel, connected);
20470
+ 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.`;
20471
+ const iconSrc = p.iconUrl || brandIconUrl(app);
20472
+ const showImg = Boolean(iconSrc) && !imgFailed;
20473
+ const initial = app.charAt(0).toUpperCase();
20474
+ const badge = connected ? { label: "Connected", bg: CONNECTED_GREEN_BG, color: CONNECTED_GREEN3 } : { label: "Pending sign-in", bg: PENDING_AMBER_BG, color: PENDING_AMBER };
20475
+ const sectionPad = "13px 16px";
20476
+ return /* @__PURE__ */ jsx(ComponentActions, { filename: `${app} authentication`, children: /* @__PURE__ */ jsx("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "10px" }, children: /* @__PURE__ */ jsxs(
20477
+ "div",
20478
+ {
20479
+ onMouseEnter: () => setCardHovered(true),
20480
+ onMouseLeave: () => setCardHovered(false),
20481
+ style: {
20482
+ display: "flex",
20483
+ flexDirection: "row",
20484
+ alignItems: "stretch",
20485
+ borderRadius: "0.75rem",
20486
+ border: `1px solid ${cardHovered ? "#d2d2d2" : BORDER4}`,
20487
+ background: "white",
20488
+ overflow: "hidden",
20489
+ 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)",
20490
+ transition: "box-shadow 0.18s ease, border-color 0.18s ease"
20491
+ },
20492
+ children: [
20493
+ /* @__PURE__ */ jsx("div", { style: { width: "3px", flexShrink: 0, background: accent } }),
20494
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
20495
+ /* @__PURE__ */ jsxs(
20496
+ "div",
20497
+ {
20498
+ style: {
20499
+ display: "flex",
20500
+ alignItems: "flex-start",
20501
+ gap: "12px",
20502
+ padding: sectionPad
20503
+ },
20504
+ children: [
20505
+ /* @__PURE__ */ jsx(
20506
+ "div",
20507
+ {
20508
+ style: {
20509
+ position: "relative",
20510
+ width: "34px",
20511
+ height: "34px",
20512
+ borderRadius: "9px",
20513
+ flexShrink: 0,
20514
+ display: "flex",
20515
+ alignItems: "center",
20516
+ justifyContent: "center",
20517
+ background: showImg ? "white" : "#fff3ee",
20518
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.06)",
20519
+ overflow: "hidden"
20520
+ },
20521
+ children: showImg ? /* @__PURE__ */ jsx(
20522
+ "img",
20523
+ {
20524
+ src: iconSrc,
20525
+ alt: app,
20526
+ onError: () => setImgFailed(true),
20527
+ style: { width: "22px", height: "22px", objectFit: "contain" }
20528
+ }
20529
+ ) : /* @__PURE__ */ jsx(
20530
+ "span",
20531
+ {
20532
+ style: {
20533
+ fontFamily: "var(--font-serif)",
20534
+ fontSize: "17px",
20535
+ fontWeight: 400,
20536
+ color: ACCENT2,
20537
+ lineHeight: 1
20538
+ },
20539
+ children: initial
20540
+ }
20541
+ )
20542
+ }
20543
+ ),
20544
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "2px" }, children: [
20545
+ /* @__PURE__ */ jsx(
20546
+ "span",
20547
+ {
20548
+ style: {
20549
+ fontFamily: "var(--font-serif)",
20550
+ fontSize: "15px",
20551
+ fontWeight: 400,
20552
+ color: "var(--foreground)",
20553
+ letterSpacing: "-0.01em",
20554
+ lineHeight: 1.2
20555
+ },
20556
+ children: CARD_TITLE
20557
+ }
20558
+ ),
20559
+ /* @__PURE__ */ jsx(
20560
+ "span",
20561
+ {
20562
+ style: {
20563
+ fontSize: "12px",
20564
+ color: MUTED2,
20565
+ whiteSpace: "nowrap",
20566
+ overflow: "hidden",
20567
+ textOverflow: "ellipsis"
20568
+ },
20569
+ children: subtitle
20570
+ }
20571
+ )
20572
+ ] }),
20573
+ /* @__PURE__ */ jsxs(
20574
+ "span",
20575
+ {
20576
+ style: {
20577
+ display: "inline-flex",
20578
+ alignItems: "center",
20579
+ gap: "5px",
20580
+ flexShrink: 0,
20581
+ fontSize: "10.5px",
20582
+ fontWeight: 600,
20583
+ padding: "3px 9px",
20584
+ borderRadius: "9999px",
20585
+ background: badge.bg,
20586
+ color: badge.color,
20587
+ whiteSpace: "nowrap"
20588
+ },
20589
+ children: [
20590
+ /* @__PURE__ */ jsx(
20591
+ "span",
20592
+ {
20593
+ style: {
20594
+ width: "6px",
20595
+ height: "6px",
20596
+ borderRadius: "9999px",
20597
+ background: badge.color
20598
+ }
20599
+ }
20600
+ ),
20601
+ badge.label
20602
+ ]
20603
+ }
20604
+ )
20605
+ ]
20606
+ }
20607
+ ),
20608
+ /* @__PURE__ */ jsxs(
20609
+ "div",
20610
+ {
20611
+ style: {
20612
+ borderTop: `1px solid ${BORDER4}`,
20613
+ padding: sectionPad,
20614
+ display: "flex",
20615
+ flexDirection: "column",
20616
+ gap: "12px"
20617
+ },
20618
+ children: [
20619
+ description && /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: "12.5px", lineHeight: 1.5, color: "var(--foreground)" }, children: description }),
20620
+ /* @__PURE__ */ jsx("ol", { style: { margin: 0, padding: 0, listStyle: "none", display: "flex", flexDirection: "column", gap: "8px" }, children: steps.map((step, i) => /* @__PURE__ */ jsxs("li", { style: { display: "flex", alignItems: "flex-start", gap: "10px" }, children: [
20621
+ /* @__PURE__ */ jsx(
20622
+ "span",
20623
+ {
20624
+ style: {
20625
+ flexShrink: 0,
20626
+ width: "18px",
20627
+ height: "18px",
20628
+ borderRadius: "9999px",
20629
+ background: accent,
20630
+ color: "white",
20631
+ fontSize: "10.5px",
20632
+ fontWeight: 600,
20633
+ display: "flex",
20634
+ alignItems: "center",
20635
+ justifyContent: "center",
20636
+ marginTop: "1px"
20637
+ },
20638
+ children: i + 1
20639
+ }
20640
+ ),
20641
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "12.5px", lineHeight: 1.45, color: "var(--foreground)" }, children: step })
20642
+ ] }, i)) })
20643
+ ]
20644
+ }
20645
+ ),
20646
+ /* @__PURE__ */ jsxs(
20647
+ "div",
20648
+ {
20649
+ style: {
20650
+ borderTop: `1px solid ${BORDER4}`,
20651
+ padding: sectionPad,
20652
+ background: "#fbfbfb",
20653
+ display: "flex",
20654
+ alignItems: "center",
20655
+ justifyContent: "space-between",
20656
+ gap: "12px",
20657
+ flexWrap: "wrap"
20658
+ },
20659
+ children: [
20660
+ /* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px", color: MUTED2, fontSize: "11.5px" }, children: [
20661
+ /* @__PURE__ */ jsx(ShieldIcon, { color: CONNECTED_GREEN3 }),
20662
+ TRUST_FOOTER
20663
+ ] }),
20664
+ /* @__PURE__ */ jsxs(
20665
+ "a",
20666
+ {
20667
+ href: p.url,
20668
+ target: "_blank",
20669
+ rel: "noopener noreferrer",
20670
+ onMouseEnter: () => setBtnHovered(true),
20671
+ onMouseLeave: () => setBtnHovered(false),
20672
+ style: {
20673
+ display: "inline-flex",
20674
+ alignItems: "center",
20675
+ gap: "7px",
20676
+ flexShrink: 0,
20677
+ borderRadius: "8px",
20678
+ padding: "8px 15px",
20679
+ fontSize: "12.5px",
20680
+ fontWeight: 600,
20681
+ textDecoration: "none",
20682
+ whiteSpace: "nowrap",
20683
+ cursor: "pointer",
20684
+ color: "white",
20685
+ border: "1px solid transparent",
20686
+ background: btnHovered ? connected ? "#126a33" : ACCENT_SOFT2 : accent,
20687
+ transition: "background 0.15s ease"
20688
+ },
20689
+ children: [
20690
+ /* @__PURE__ */ jsx(ExternalIcon, {}),
20691
+ ctaLabel
20692
+ ]
20693
+ }
20694
+ )
20695
+ ]
20696
+ }
20697
+ )
20698
+ ] })
20699
+ ]
20700
+ }
20701
+ ) }) });
20702
+ }
20240
20703
  function resolveUI(rawPayload) {
20241
20704
  const payload = coercePayload(rawPayload);
20242
20705
  switch (payload.type) {
@@ -20358,6 +20821,8 @@ function resolveUI(rawPayload) {
20358
20821
  return /* @__PURE__ */ jsx(DocumentFieldExtractionResolver, __spreadValues({}, payload));
20359
20822
  case "decision-card":
20360
20823
  return /* @__PURE__ */ jsx(DecisionCardResolver, __spreadValues({}, payload));
20824
+ case "tabby-auth":
20825
+ return /* @__PURE__ */ jsx(TabbyAuthResolver, __spreadValues({}, payload));
20361
20826
  default: {
20362
20827
  return /* @__PURE__ */ jsx(
20363
20828
  "div",