@ekanos/harness 0.23.0 → 0.24.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.
Files changed (67) hide show
  1. package/README.md +5 -4
  2. package/dist/internal/components/approvals-tray.js +5 -5
  3. package/dist/internal/components/ask-assistant-bridge.js +6 -6
  4. package/dist/internal/components/connect-panel.js +16 -9
  5. package/dist/internal/components/connection-chip.js +2 -2
  6. package/dist/internal/components/dashboard-grid.js +1 -1
  7. package/dist/internal/components/dev-toolbar.js +5 -5
  8. package/dist/internal/components/docs-link.js +3 -3
  9. package/dist/internal/components/events-panel.js +11 -11
  10. package/dist/internal/components/health-panel.js +3 -10
  11. package/dist/internal/components/integration-badge.js +3 -3
  12. package/dist/internal/components/local-oauth-panel.js +14 -14
  13. package/dist/internal/components/operation-runner-panel.d.ts +3 -1
  14. package/dist/internal/components/operation-runner-panel.js +22 -44
  15. package/dist/internal/components/provenance-banner.js +3 -3
  16. package/dist/internal/components/run-log.js +13 -13
  17. package/dist/internal/components/runtime-strip.js +4 -4
  18. package/dist/internal/components/schema-form.js +8 -8
  19. package/dist/internal/components/scrollable-nav.d.ts +1 -1
  20. package/dist/internal/components/scrollable-nav.js +1 -1
  21. package/dist/internal/components/surface-nav.js +26 -26
  22. package/dist/internal/components/viewport-frame.js +1 -1
  23. package/dist/internal/components/widget-boundary.js +3 -3
  24. package/dist/internal/components/widget-surface.d.ts +5 -0
  25. package/dist/internal/components/widget-surface.js +12 -3
  26. package/dist/internal/components/workflow-runner.js +6 -6
  27. package/dist/internal/lib/console-context.js +2 -1
  28. package/dist/internal/lib/console-types.d.ts +4 -3
  29. package/dist/internal/lib/experience-runtime.d.ts +9 -1
  30. package/dist/internal/lib/experience-runtime.js +35 -7
  31. package/dist/internal/lib/run-log-view.js +5 -3
  32. package/dist/internal/routes/activation-page.js +17 -17
  33. package/dist/internal/routes/console-home-page.js +1 -1
  34. package/dist/internal/routes/experience-connect-page.js +12 -12
  35. package/dist/internal/routes/experience-layout-page.js +6 -6
  36. package/dist/internal/routes/experience-page-host.js +4 -4
  37. package/dist/internal/routes/experience-review-queue-page.js +7 -7
  38. package/dist/internal/routes/experience-runs-page.js +2 -2
  39. package/dist/internal/routes/experience-summary-page.js +4 -4
  40. package/dist/internal/routes/experience-widget-page.js +6 -3
  41. package/dist/internal/routes/experience-widgets-page.js +2 -2
  42. package/dist/internal/routes/experience-workflow-page.js +3 -3
  43. package/dist/internal/routes/experience-workflows-page.js +6 -6
  44. package/dist/internal/routes/integration-layout.js +1 -1
  45. package/dist/internal/routes/integrations-layout.js +2 -2
  46. package/dist/internal/routes/integrations-list-page.js +8 -8
  47. package/dist/internal/routes/integrations-operations-page.js +5 -5
  48. package/dist/internal/routes/integrations-overview-page.js +4 -4
  49. package/dist/internal/routes/integrations-runs-page.js +1 -1
  50. package/dist/internal/routes/integrations-scope.js +2 -2
  51. package/dist/internal/routes/repo-home-page.js +19 -19
  52. package/dist/internal/routes/repo-layout.js +4 -4
  53. package/dist/internal/routes/repo-package-layouts.js +2 -2
  54. package/dist/internal/routes/root-layout.js +1 -1
  55. package/dist/internal/routes/single-widget-page.js +5 -2
  56. package/dist/internal/routes/tile-page.js +8 -8
  57. package/dist/internal/routes/triggers-page.js +31 -31
  58. package/dist/internal/routes/widgets-page.js +1 -1
  59. package/dist/internal/server/ekanos-api-router.js +2 -2
  60. package/dist/internal/server/integration-resolver.d.ts +6 -0
  61. package/dist/internal/server/integration-resolver.js +5 -1
  62. package/dist/internal/server/local-secrets.d.ts +6 -5
  63. package/dist/internal/server/operation-runner.d.ts +7 -5
  64. package/dist/internal/server/operation-runner.js +23 -2
  65. package/dist/internal/surfaces.js +4 -4
  66. package/dist/registry.d.ts +9 -2
  67. package/package.json +6 -6
@@ -83,7 +83,7 @@ function ResultPane({
83
83
  }
84
84
  ),
85
85
  record?.mode ? /* @__PURE__ */ jsx(RunModeBadge, { mode: record.mode }) : null,
86
- record ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-fine", children: [
86
+ record ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
87
87
  record.durationMs,
88
88
  " ms \xB7 in ",
89
89
  record.inputBytes,
@@ -95,7 +95,7 @@ function ResultPane({
95
95
  /* @__PURE__ */ jsxs(
96
96
  "span",
97
97
  {
98
- className: "text-muted-foreground text-fine",
98
+ className: "text-muted-foreground text-xs",
99
99
  "data-test": "run-record-id",
100
100
  children: [
101
101
  "run ",
@@ -117,7 +117,7 @@ function ResultPane({
117
117
  ] }) : /* @__PURE__ */ jsx(
118
118
  "pre",
119
119
  {
120
- className: "bg-muted text-fine max-h-96 overflow-auto rounded-md p-3",
120
+ className: "bg-muted max-h-96 overflow-auto rounded-md p-3 text-xs",
121
121
  "data-test": "run-output",
122
122
  children: JSON.stringify(response.output, null, 2)
123
123
  }
@@ -156,7 +156,6 @@ function OperationRunnerPanel({
156
156
  });
157
157
  const patch = (next) => setState((current) => ({ ...current, ...next }));
158
158
  const response = state.response;
159
- const awaiting = run.isPending && operation.effect === "write";
160
159
  const clientIssues = state.attempted ? validateValue(operation.input, state.value) : [];
161
160
  const serverIssues = response?.status === "refused" ? response.issues ?? [] : [];
162
161
  const issues = serverIssues.length > 0 ? serverIssues : clientIssues;
@@ -170,7 +169,8 @@ function OperationRunnerPanel({
170
169
  args: state.value,
171
170
  mode: state.mode,
172
171
  ...state.mode === "fixtures" ? { variant: state.variant } : {},
173
- channel: "http",
172
+ // A write runs as a person's click, as it does from a widget.
173
+ channel: operation.effect === "write" ? "interactive" : "http",
174
174
  origin: "console"
175
175
  },
176
176
  {
@@ -183,29 +183,22 @@ function OperationRunnerPanel({
183
183
  return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-6", "data-test": "operation-runner", children: [
184
184
  /* @__PURE__ */ jsxs("header", { className: "flex flex-col gap-2", children: [
185
185
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
186
- /* @__PURE__ */ jsx("h2", { className: "heading-subhead-lg font-normal", children: /* @__PURE__ */ jsx("code", { children: operationKey(operation) }) }),
186
+ /* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: /* @__PURE__ */ jsx("code", { children: operationKey(operation) }) }),
187
187
  /* @__PURE__ */ jsx(StatusBadge, { tone: operation.effect === "write" ? "warning" : "info", children: operation.effect })
188
188
  ] }),
189
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: operation.description }),
190
- usedBy.length > 0 ? /* @__PURE__ */ jsxs("p", { className: "text-fine", "data-test": "used-by", children: [
189
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: operation.description }),
190
+ usedBy.length > 0 ? /* @__PURE__ */ jsxs("p", { className: "text-xs", "data-test": "used-by", children: [
191
191
  "Used by:",
192
192
  " ",
193
193
  usedBy.map((use) => `${use.title} (${use.kind})`).join(", ")
194
194
  ] }) : null,
195
- operation.opaque.input || operation.opaque.output ? /* @__PURE__ */ jsxs(
196
- "p",
197
- {
198
- className: "text-muted-foreground text-fine",
199
- "data-test": "opaque-note",
200
- children: [
201
- "Opaque ",
202
- operation.opaque.input ? "input" : "",
203
- operation.opaque.input && operation.opaque.output ? " and " : "",
204
- operation.opaque.output ? "output" : "",
205
- operation.opaqueReason ? `: ${operation.opaqueReason}` : ""
206
- ]
207
- }
208
- ) : null
195
+ operation.opaque.input || operation.opaque.output ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-xs", "data-test": "opaque-note", children: [
196
+ "Opaque ",
197
+ operation.opaque.input ? "input" : "",
198
+ operation.opaque.input && operation.opaque.output ? " and " : "",
199
+ operation.opaque.output ? "output" : "",
200
+ operation.opaqueReason ? `: ${operation.opaqueReason}` : ""
201
+ ] }) : null
209
202
  ] }),
210
203
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
211
204
  /* @__PURE__ */ jsx(
@@ -227,7 +220,7 @@ function OperationRunnerPanel({
227
220
  onChange: (variant) => patch({ variant })
228
221
  }
229
222
  ) : null,
230
- /* @__PURE__ */ jsxs("label", { className: "text-label flex items-center gap-2", children: [
223
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
231
224
  /* @__PURE__ */ jsx(
232
225
  Switch,
233
226
  {
@@ -246,19 +239,12 @@ function OperationRunnerPanel({
246
239
  integration.runtime?.facts.forced ? /* @__PURE__ */ jsx(
247
240
  "p",
248
241
  {
249
- className: "text-muted-foreground text-fine",
242
+ className: "text-muted-foreground text-xs",
250
243
  "data-test": "fixtures-pinned",
251
244
  children: "Fixtures \xB7 pinned. Saved for this repo; unpin it from the integrations strip to read live again."
252
245
  }
253
246
  ) : null,
254
- integration.runModes.includes("live") ? null : /* @__PURE__ */ jsx(
255
- "p",
256
- {
257
- className: "text-muted-foreground text-fine",
258
- "data-test": "fixtures-only",
259
- children: integration.fixturesOnlyReason ?? "This integration is fixtures-only: it answers from the contract example and scenario fixtures."
260
- }
261
- ),
247
+ integration.runModes.includes("live") ? null : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", "data-test": "fixtures-only", children: integration.fixturesOnlyReason ?? "This integration is fixtures-only: it answers from the contract example and scenario fixtures." }),
262
248
  state.raw ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", "data-test": "raw-editor", children: [
263
249
  /* @__PURE__ */ jsx(
264
250
  Textarea,
@@ -277,11 +263,11 @@ function OperationRunnerPanel({
277
263
  }
278
264
  }
279
265
  ),
280
- state.rawError ? /* @__PURE__ */ jsx("p", { role: "alert", className: "text-destructive-strong text-fine", children: state.rawError }) : null,
266
+ state.rawError ? /* @__PURE__ */ jsx("p", { role: "alert", className: "text-destructive text-xs", children: state.rawError }) : null,
281
267
  issues.map((issue) => /* @__PURE__ */ jsxs(
282
268
  "p",
283
269
  {
284
- className: "text-destructive-strong text-fine",
270
+ className: "text-destructive text-xs",
285
271
  children: [
286
272
  /* @__PURE__ */ jsx("code", { children: issue.path || "(root)" }),
287
273
  " ",
@@ -306,20 +292,12 @@ function OperationRunnerPanel({
306
292
  onClick: execute,
307
293
  disabled: run.isPending || state.rawError !== null,
308
294
  "data-test": "run-operation",
309
- children: run.isPending ? "Running\u2026" : operation.effect === "write" ? "Run (needs approval)" : "Run"
295
+ children: run.isPending ? "Running\u2026" : "Run"
310
296
  }
311
297
  ) }),
312
298
  state.runError ? /* @__PURE__ */ jsx(Alert, { variant: "destructive", "data-test": "run-error", children: /* @__PURE__ */ jsx(AlertDescription, { children: state.runError }) }) : null,
313
- awaiting ? /* @__PURE__ */ jsxs(Alert, { variant: "warning", "data-test": "inline-approval", children: [
314
- /* @__PURE__ */ jsx(AlertTitle, { children: "Awaiting approval" }),
315
- /* @__PURE__ */ jsx(AlertDescription, { children: /* @__PURE__ */ jsxs("p", { children: [
316
- "This is a write. Approve ",
317
- /* @__PURE__ */ jsx("code", { children: operationKey(operation) }),
318
- " in the approvals tray above to run it."
319
- ] }) })
320
- ] }) : null,
321
299
  response ? /* @__PURE__ */ jsx(ResultPane, { response, operation }) : null,
322
- response === null && operation.outputExample !== void 0 ? /* @__PURE__ */ jsxs("details", { className: "text-fine", "data-test": "example-output", children: [
300
+ response === null && operation.outputExample !== void 0 ? /* @__PURE__ */ jsxs("details", { className: "text-xs", "data-test": "example-output", children: [
323
301
  /* @__PURE__ */ jsx("summary", { className: "text-muted-foreground cursor-pointer", children: "Contract example output" }),
324
302
  /* @__PURE__ */ jsx("pre", { className: "bg-muted mt-2 max-h-60 overflow-auto rounded-md p-3", children: JSON.stringify(operation.outputExample, null, 2) })
325
303
  ] }) : null
@@ -38,11 +38,11 @@ function BannerBody({
38
38
  return /* @__PURE__ */ jsxs(
39
39
  "p",
40
40
  {
41
- className: "text-muted-foreground text-fine flex items-center gap-2 border-b px-6 py-2",
41
+ className: "text-muted-foreground flex items-center gap-2 border-b px-6 py-2 text-xs",
42
42
  "data-test": "provenance-banner",
43
43
  "data-state": "published",
44
44
  children: [
45
- /* @__PURE__ */ jsx(Icon, { name: "fa-solid fa-cloud", className: "h-3 w-3" }),
45
+ /* @__PURE__ */ jsx(Icon, { name: "fa-cloud", className: "h-3 w-3" }),
46
46
  publishedSummary(integrations)
47
47
  ]
48
48
  }
@@ -56,7 +56,7 @@ function BannerBody({
56
56
  "data-test": "provenance-banner",
57
57
  "data-state": "unpublishable",
58
58
  children: [
59
- /* @__PURE__ */ jsx(Icon, { name: "fa-solid fa-triangle-exclamation", className: "h-4 w-4" }),
59
+ /* @__PURE__ */ jsx(Icon, { name: "fa-triangle-exclamation", className: "h-4 w-4" }),
60
60
  /* @__PURE__ */ jsxs(AlertTitle, { children: [
61
61
  locals.length,
62
62
  " local override",
@@ -43,7 +43,7 @@ function RunFilters({
43
43
  }) {
44
44
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-4", "data-test": "run-log-filters", children: [
45
45
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
46
- /* @__PURE__ */ jsx(Label, { className: "text-muted-foreground text-fine", children: "Outcome" }),
46
+ /* @__PURE__ */ jsx(Label, { className: "text-muted-foreground text-xs", children: "Outcome" }),
47
47
  /* @__PURE__ */ jsxs(
48
48
  Select,
49
49
  {
@@ -63,7 +63,7 @@ function RunFilters({
63
63
  )
64
64
  ] }),
65
65
  integrations.length > 1 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
66
- /* @__PURE__ */ jsx(Label, { className: "text-muted-foreground text-fine", children: "Integration" }),
66
+ /* @__PURE__ */ jsx(Label, { className: "text-muted-foreground text-xs", children: "Integration" }),
67
67
  /* @__PURE__ */ jsxs(
68
68
  Select,
69
69
  {
@@ -94,7 +94,7 @@ function RunLogTable({
94
94
  const filtered = filterRuns(scoped, view.filter);
95
95
  const { shown, remaining } = pageRuns(filtered, view.limit);
96
96
  if (scoped.length === 0) {
97
- return /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", "data-test": "run-log-empty", children: "No operations have run yet." });
97
+ return /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", "data-test": "run-log-empty", children: "No operations have run yet." });
98
98
  }
99
99
  return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
100
100
  /* @__PURE__ */ jsx(
@@ -108,7 +108,7 @@ function RunLogTable({
108
108
  shown.length === 0 ? /* @__PURE__ */ jsx(
109
109
  "p",
110
110
  {
111
- className: "text-muted-foreground text-meta",
111
+ className: "text-muted-foreground text-sm",
112
112
  "data-test": "run-log-no-match",
113
113
  children: "No runs match these filters."
114
114
  }
@@ -131,16 +131,16 @@ function RunLogTable({
131
131
  "data-run-id": run.id,
132
132
  "data-outcome": runOutcome(run),
133
133
  children: [
134
- /* @__PURE__ */ jsx(TableCell, { className: "text-fine whitespace-nowrap", children: new Date(run.ts).toLocaleTimeString() }),
134
+ /* @__PURE__ */ jsx(TableCell, { className: "text-xs whitespace-nowrap", children: new Date(run.ts).toLocaleTimeString() }),
135
135
  /* @__PURE__ */ jsxs(TableCell, { children: [
136
- /* @__PURE__ */ jsxs("code", { className: "text-fine", children: [
136
+ /* @__PURE__ */ jsxs("code", { className: "text-xs", children: [
137
137
  run.integration,
138
138
  "@",
139
139
  run.version,
140
140
  "/",
141
141
  run.opKey
142
142
  ] }),
143
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-fine block", children: [
143
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground block text-xs", children: [
144
144
  "integration ",
145
145
  run.integration,
146
146
  " \xB7",
@@ -148,9 +148,9 @@ function RunLogTable({
148
148
  run.effect ?? "unknown"
149
149
  ] })
150
150
  ] }),
151
- /* @__PURE__ */ jsx(TableCell, { className: "text-fine uppercase", children: run.provenance ?? "n/a" }),
152
- /* @__PURE__ */ jsx(TableCell, { className: "text-fine", children: run.mode ?? "n/a" }),
153
- /* @__PURE__ */ jsxs(TableCell, { className: "text-fine", children: [
151
+ /* @__PURE__ */ jsx(TableCell, { className: "text-xs uppercase", children: run.provenance ?? "n/a" }),
152
+ /* @__PURE__ */ jsx(TableCell, { className: "text-xs", children: run.mode ?? "n/a" }),
153
+ /* @__PURE__ */ jsxs(TableCell, { className: "text-xs", children: [
154
154
  run.channel,
155
155
  run.origin ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block", children: run.origin }) : null
156
156
  ] }),
@@ -169,13 +169,13 @@ function RunLogTable({
169
169
  explanation ? /* @__PURE__ */ jsx(
170
170
  "span",
171
171
  {
172
- className: "text-muted-foreground text-fine mt-1 block max-w-64 whitespace-normal",
172
+ className: "text-muted-foreground mt-1 block max-w-64 text-xs whitespace-normal",
173
173
  "data-test": "run-reason",
174
174
  children: explanation
175
175
  }
176
176
  ) : null
177
177
  ] }),
178
- /* @__PURE__ */ jsx(TableCell, { className: "text-fine text-right", children: run.durationMs })
178
+ /* @__PURE__ */ jsx(TableCell, { className: "text-right text-xs", children: run.durationMs })
179
179
  ]
180
180
  },
181
181
  run.id
@@ -197,7 +197,7 @@ function RunLogTable({
197
197
  children: "Show more"
198
198
  }
199
199
  ),
200
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-fine", children: [
200
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
201
201
  "Showing ",
202
202
  shown.length,
203
203
  " of ",
@@ -58,7 +58,7 @@ function RuntimeStrip() {
58
58
  "data-mode": runtime.mode,
59
59
  "data-reason": runtime.reason,
60
60
  children: [
61
- /* @__PURE__ */ jsx("code", { className: "text-label w-28 shrink-0 truncate", children: integration.integration }),
61
+ /* @__PURE__ */ jsx("code", { className: "w-28 shrink-0 truncate text-sm font-medium", children: integration.integration }),
62
62
  /* @__PURE__ */ jsx("span", { className: "flex min-w-48 flex-1 flex-wrap items-center gap-x-3 gap-y-1", children: /* @__PURE__ */ jsx(ConnectionChip, { facts, variant: "answer" }) }),
63
63
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
64
64
  connectable && facts.state === "not_connected" ? /* @__PURE__ */ jsx(
@@ -134,8 +134,8 @@ function RuntimeStrip() {
134
134
  className: "group rounded-md border px-4 py-2",
135
135
  "data-test": "runtime-strip-collapsed",
136
136
  children: [
137
- /* @__PURE__ */ jsxs("summary", { className: "text-meta flex cursor-pointer list-none items-center gap-3", children: [
138
- /* @__PURE__ */ jsx("span", { className: "text-label", children: "Integrations" }),
137
+ /* @__PURE__ */ jsxs("summary", { className: "flex cursor-pointer list-none items-center gap-3 text-sm", children: [
138
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Integrations" }),
139
139
  /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
140
140
  "All ",
141
141
  rows.length,
@@ -148,7 +148,7 @@ function RuntimeStrip() {
148
148
  );
149
149
  }
150
150
  return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2 rounded-md border px-4 py-3", children: [
151
- /* @__PURE__ */ jsx("h2", { className: "text-label", children: "Integrations" }),
151
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-medium", children: "Integrations" }),
152
152
  list
153
153
  ] });
154
154
  }
@@ -15,7 +15,7 @@ import {
15
15
  objectProperties,
16
16
  parseJsonText
17
17
  } from "../lib/schema-form-model.js";
18
- const NATIVE_SELECT = "border-input bg-background text-foreground text-body-sm shadow-control h-control w-full rounded-md border px-3 focus-visible:border-ring focus-visible:outline-ring aria-invalid:border-destructive focus-visible:outline-2";
18
+ const NATIVE_SELECT = "border-input bg-background text-foreground text-sm h-control w-full rounded-md border px-3 focus-visible:border-ring focus-visible:outline-ring aria-invalid:border-destructive focus-visible:outline-2";
19
19
  function fieldId(path) {
20
20
  return `sf-${path === "" ? "root" : path.replaceAll("/", "-").slice(1)}`;
21
21
  }
@@ -32,20 +32,20 @@ function FieldShell({
32
32
  }) {
33
33
  const help = describe(schema);
34
34
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", "data-test": `field-${fieldId(path)}`, children: [
35
- path === "" ? null : /* @__PURE__ */ jsxs(Label, { htmlFor: fieldId(path), className: "text-label", children: [
35
+ path === "" ? null : /* @__PURE__ */ jsxs(Label, { htmlFor: fieldId(path), className: "text-sm font-medium", children: [
36
36
  label,
37
- required ? /* @__PURE__ */ jsxs("span", { className: "text-destructive-strong", "aria-hidden": true, children: [
37
+ required ? /* @__PURE__ */ jsxs("span", { className: "text-destructive", "aria-hidden": true, children: [
38
38
  " ",
39
39
  "*"
40
40
  ] }) : null
41
41
  ] }),
42
42
  children,
43
- help ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-fine", children: help }) : null,
43
+ help ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: help }) : null,
44
44
  error ? /* @__PURE__ */ jsx(
45
45
  "p",
46
46
  {
47
47
  role: "alert",
48
- className: "text-destructive-strong text-fine",
48
+ className: "text-destructive text-xs",
49
49
  "data-test": `error-${fieldId(path)}`,
50
50
  children: error
51
51
  }
@@ -76,7 +76,7 @@ function JsonField({
76
76
  schema,
77
77
  error: shown,
78
78
  children: [
79
- note ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-fine", children: note }) : null,
79
+ note ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: note }) : null,
80
80
  /* @__PURE__ */ jsx(
81
81
  Textarea,
82
82
  {
@@ -132,7 +132,7 @@ function Field({
132
132
  schema,
133
133
  error,
134
134
  children: [
135
- nullable ? /* @__PURE__ */ jsxs("label", { className: "text-muted-foreground text-fine flex items-center gap-2", children: [
135
+ nullable ? /* @__PURE__ */ jsxs("label", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [
136
136
  /* @__PURE__ */ jsx(
137
137
  "input",
138
138
  {
@@ -346,7 +346,7 @@ function SchemaForm({
346
346
  return /* @__PURE__ */ jsx(
347
347
  "p",
348
348
  {
349
- className: "text-muted-foreground text-meta",
349
+ className: "text-muted-foreground text-sm",
350
350
  "data-test": "schema-form-empty",
351
351
  children: "This operation takes no input."
352
352
  }
@@ -9,4 +9,4 @@ export declare function ScrollableNav({ label, className, children, }: {
9
9
  children: ReactNode;
10
10
  }): import("react").JSX.Element;
11
11
  /** Focus ring shared by every tab and toolbar link, so keyboard users see where they are. */
12
- export declare const FOCUS_RING = "focus-visible:ring-ring outline-none focus-visible:ring-3";
12
+ export declare const FOCUS_RING = "focus-visible:ring-ring/50 outline-none focus-visible:ring-3";
@@ -61,7 +61,7 @@ function ScrollableNav({
61
61
  }
62
62
  );
63
63
  }
64
- const FOCUS_RING = "focus-visible:ring-ring outline-none focus-visible:ring-3";
64
+ const FOCUS_RING = "focus-visible:ring-ring/50 outline-none focus-visible:ring-3";
65
65
  export {
66
66
  FOCUS_RING,
67
67
  ScrollableNav
@@ -23,7 +23,7 @@ function PreviewNav({
23
23
  return /* @__PURE__ */ jsx(
24
24
  "p",
25
25
  {
26
- className: "text-muted-foreground text-meta py-6",
26
+ className: "text-muted-foreground py-6 text-sm",
27
27
  "data-test": "preview-empty",
28
28
  children: "This integration registers no widgets, tile, activation form or event surfaces to preview."
29
29
  }
@@ -42,7 +42,7 @@ function PreviewNav({
42
42
  className: cn(
43
43
  "flex items-center gap-2 rounded-md px-3 py-2 whitespace-nowrap transition-colors",
44
44
  FOCUS_RING,
45
- active ? "bg-accent text-accent-foreground text-label" : "text-muted-foreground hover:bg-accent/50 text-meta"
45
+ active ? "bg-accent text-accent-foreground text-sm font-medium" : "text-muted-foreground hover:bg-accent/50 text-sm"
46
46
  ),
47
47
  children: [
48
48
  /* @__PURE__ */ jsx(Icon, { name: surface.icon, className: "h-5 w-5" }),
@@ -66,7 +66,7 @@ function PreviewNav({
66
66
  ) : null
67
67
  ] }),
68
68
  activeSurface?.segment === "widgets" && integration.widgets.length > 1 ? /* @__PURE__ */ jsxs(ScrollableNav, { label: "Focus one widget", children: [
69
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-fine px-3 py-2 whitespace-nowrap", children: "Focus one widget:" }),
69
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground px-3 py-2 text-xs whitespace-nowrap", children: "Focus one widget:" }),
70
70
  integration.widgets.map((widget) => {
71
71
  const href = previewHref(integration.slug, `widgets/${widget.id}`);
72
72
  const active = pathname === href;
@@ -77,7 +77,7 @@ function PreviewNav({
77
77
  className: cn(
78
78
  "rounded-md px-3 py-2 whitespace-nowrap transition-colors",
79
79
  FOCUS_RING,
80
- active ? "bg-accent text-accent-foreground text-label" : "text-muted-foreground hover:bg-accent/50 text-meta"
80
+ active ? "bg-accent text-accent-foreground text-sm font-medium" : "text-muted-foreground hover:bg-accent/50 text-sm"
81
81
  ),
82
82
  children: widget.title
83
83
  },
@@ -90,35 +90,35 @@ function PreviewNav({
90
90
  function integrationTabs(slug) {
91
91
  const base = `/integrations/${slug}`;
92
92
  return [
93
- { href: base, label: "Overview", icon: "fa-solid fa-circle-info" },
93
+ { href: base, label: "Overview", icon: "fa-circle-info" },
94
94
  {
95
95
  href: `${base}/connect`,
96
96
  label: "Connect",
97
- icon: "fa-solid fa-key",
97
+ icon: "fa-key",
98
98
  prefix: true
99
99
  },
100
100
  {
101
101
  href: `${base}/operations`,
102
102
  label: "Operations",
103
- icon: "fa-solid fa-list",
103
+ icon: "fa-list",
104
104
  prefix: true
105
105
  },
106
106
  {
107
107
  href: `${base}/events`,
108
108
  label: "Events",
109
- icon: "fa-solid fa-bolt",
109
+ icon: "fa-bolt",
110
110
  prefix: true
111
111
  },
112
112
  {
113
113
  href: `${base}/health`,
114
114
  label: "Health",
115
- icon: "fa-solid fa-heart-pulse",
115
+ icon: "fa-heart-pulse",
116
116
  prefix: true
117
117
  },
118
118
  {
119
119
  href: `${base}/runs`,
120
120
  label: "Run log",
121
- icon: "fa-solid fa-clock-rotate-left",
121
+ icon: "fa-clock-rotate-left",
122
122
  prefix: true
123
123
  }
124
124
  ];
@@ -127,49 +127,49 @@ function previewTab(slug) {
127
127
  return {
128
128
  href: previewHref(slug),
129
129
  label: "Preview",
130
- icon: "fa-solid fa-table-cells-large",
130
+ icon: "fa-table-cells-large",
131
131
  prefix: true,
132
132
  testId: "preview-tab"
133
133
  };
134
134
  }
135
135
  function experienceTabs(base = "/experience", repo = false) {
136
136
  return [
137
- { href: base, label: "Summary", icon: "fa-solid fa-table-list" },
137
+ { href: base, label: "Summary", icon: "fa-table-list" },
138
138
  {
139
139
  href: `${base}/widgets`,
140
140
  label: "Widgets",
141
- icon: "fa-solid fa-table-cells-large",
141
+ icon: "fa-table-cells-large",
142
142
  prefix: true
143
143
  },
144
144
  {
145
145
  href: `${base}/layout`,
146
146
  label: "Layout",
147
- icon: "fa-solid fa-table-columns",
147
+ icon: "fa-table-columns",
148
148
  prefix: true
149
149
  },
150
150
  {
151
151
  href: `${base}/workflows`,
152
152
  label: "Workflows",
153
- icon: "fa-solid fa-diagram-project",
153
+ icon: "fa-diagram-project",
154
154
  prefix: true
155
155
  },
156
156
  {
157
157
  href: `${base}/review-queue`,
158
158
  label: "Review queue",
159
- icon: "fa-solid fa-inbox",
159
+ icon: "fa-inbox",
160
160
  prefix: true
161
161
  },
162
162
  {
163
163
  href: `${base}/runs`,
164
164
  label: "Run log",
165
- icon: "fa-solid fa-clock-rotate-left",
165
+ icon: "fa-clock-rotate-left",
166
166
  prefix: true
167
167
  },
168
168
  ...repo ? [
169
169
  {
170
170
  href: `${base}/connect`,
171
171
  label: "Connect",
172
- icon: "fa-solid fa-plug",
172
+ icon: "fa-plug",
173
173
  prefix: true
174
174
  }
175
175
  ] : []
@@ -189,7 +189,7 @@ function TabLink({ tab, pathname }) {
189
189
  className: cn(
190
190
  "flex items-center gap-2 rounded-md px-3 py-2 whitespace-nowrap transition-colors",
191
191
  FOCUS_RING,
192
- tabActive(pathname, tab) ? "bg-accent text-accent-foreground text-label" : "text-muted-foreground hover:bg-accent/50 text-meta"
192
+ tabActive(pathname, tab) ? "bg-accent text-accent-foreground text-sm font-medium" : "text-muted-foreground hover:bg-accent/50 text-sm"
193
193
  ),
194
194
  children: [
195
195
  /* @__PURE__ */ jsx(Icon, { name: tab.icon, className: "h-4 w-4" }),
@@ -213,7 +213,7 @@ function IntegrationTab({
213
213
  className: cn(
214
214
  "flex items-center gap-2 rounded-md px-3 py-2 whitespace-nowrap transition-colors",
215
215
  FOCUS_RING,
216
- active ? "bg-accent text-accent-foreground text-label" : "text-muted-foreground hover:bg-accent/50 text-meta"
216
+ active ? "bg-accent text-accent-foreground text-sm font-medium" : "text-muted-foreground hover:bg-accent/50 text-sm"
217
217
  ),
218
218
  children: [
219
219
  integration.integration,
@@ -239,20 +239,20 @@ function ConsoleNav({
239
239
  Link,
240
240
  {
241
241
  href: links.repoHome,
242
- className: "text-muted-foreground hover:text-foreground text-meta w-fit",
242
+ className: "text-muted-foreground hover:text-foreground w-fit text-sm",
243
243
  "data-test": "back-to-repo",
244
244
  children: [
245
- /* @__PURE__ */ jsx(Icon, { name: "fa-solid fa-arrow-left", className: "mr-2 h-4 w-4" }),
245
+ /* @__PURE__ */ jsx(Icon, { name: "fa-arrow-left", className: "mr-2 h-4 w-4" }),
246
246
  "This repo"
247
247
  ]
248
248
  }
249
249
  ) : null,
250
250
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-3", children: [
251
- /* @__PURE__ */ jsx("h1", { className: "heading-headline", children: project.name }),
251
+ /* @__PURE__ */ jsx("h1", { className: "font-heading text-2xl font-semibold tracking-tight", children: project.name }),
252
252
  /* @__PURE__ */ jsx(
253
253
  "code",
254
254
  {
255
- className: "text-muted-foreground text-fine",
255
+ className: "text-muted-foreground text-xs",
256
256
  "data-test": "project-kind",
257
257
  children: project.kind
258
258
  }
@@ -261,7 +261,7 @@ function ConsoleNav({
261
261
  Link,
262
262
  {
263
263
  href: project.kind === "experience" ? `${links.experience}/workflows` : "#approvals",
264
- className: "bg-warning text-warning-foreground text-label ml-auto rounded-full px-3 py-1",
264
+ className: "bg-warning text-warning-foreground ml-auto rounded-full px-3 py-1 text-sm font-medium",
265
265
  "data-test": "pending-approvals",
266
266
  children: [
267
267
  pendingApprovals,
@@ -278,7 +278,7 @@ function ConsoleNav({
278
278
  (tab) => /* @__PURE__ */ jsx(TabLink, { tab, pathname }, tab.href)
279
279
  ) }),
280
280
  /* @__PURE__ */ jsxs(ScrollableNav, { label: "Integration consoles", className: "items-center", children: [
281
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-fine px-1 whitespace-nowrap", children: "Integrations:" }),
281
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground px-1 text-xs whitespace-nowrap", children: "Integrations:" }),
282
282
  project.integrations.map((integration) => /* @__PURE__ */ jsx(
283
283
  IntegrationTab,
284
284
  {
@@ -6,7 +6,7 @@ function ViewportFrame({ children }) {
6
6
  const { width, label } = VIEWPORTS[state.viewport];
7
7
  if (width === null) return /* @__PURE__ */ jsx(Fragment, { children });
8
8
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
9
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-fine", children: [
9
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
10
10
  label,
11
11
  " \xB7 ",
12
12
  width,
@@ -27,16 +27,16 @@ class WidgetBoundary extends Component {
27
27
  /* @__PURE__ */ jsx(
28
28
  Icon,
29
29
  {
30
- name: "fa-solid fa-triangle-exclamation",
30
+ name: "fa-triangle-exclamation",
31
31
  className: "text-destructive h-5 w-5"
32
32
  }
33
33
  ),
34
- /* @__PURE__ */ jsxs("p", { className: "text-label", children: [
34
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-medium", children: [
35
35
  this.props.widgetId,
36
36
  " threw during render"
37
37
  ] })
38
38
  ] }),
39
- /* @__PURE__ */ jsx("pre", { className: "bg-muted text-destructive text-fine overflow-x-auto rounded-md p-3 whitespace-pre-wrap", children: error.message })
39
+ /* @__PURE__ */ jsx("pre", { className: "bg-muted text-destructive overflow-x-auto rounded-md p-3 text-xs whitespace-pre-wrap", children: error.message })
40
40
  ] });
41
41
  }
42
42
  }
@@ -1,5 +1,10 @@
1
1
  import type { WidgetConfig } from '@ekanos/sdk';
2
2
  import { HARNESS_ACCOUNT_ID, HARNESS_SOURCE_ID, type HarnessWidget } from '../../registry.js';
3
+ /**
4
+ * A single-widget page keeps what the widget declares; a widget that declares
5
+ * no size at all gets `full`, so the focused view has room to work in.
6
+ */
7
+ export declare function withFocusedDefault(widget: HarnessWidget): HarnessWidget;
3
8
  /**
4
9
  * Adapts the harness registry's widget entries into the `WidgetConfig` shape
5
10
  * the real dashboard grid consumes.
@@ -8,14 +8,22 @@ import {
8
8
  import { useToolbar } from "../lib/toolbar-context.js";
9
9
  import { DashboardGrid } from "./dashboard-grid.js";
10
10
  import { ViewportFrame } from "./viewport-frame.js";
11
+ function withFocusedDefault(widget) {
12
+ return widget.size || widget.layouts || widget.width ? widget : { ...widget, width: "full" };
13
+ }
14
+ const WIDTH_COLUMNS = { compact: 3, half: 6, full: 12 };
11
15
  function toWidgetConfig(widget, productSlug, unhealthy) {
12
16
  return {
13
17
  id: widget.id,
14
18
  name: widget.title,
15
19
  component: widget.component,
16
- // `w > 6` is what the grid reads as full-width.
17
20
  widgetState: "active",
18
- layouts: { lg: { x: 0, y: 0, w: widget.width === "full" ? 12 : 6, h: 4 } },
21
+ // Same precedence as the host: `size`, then `layouts.lg.w`, then `width`.
22
+ // The grid reads `w > 6` as full and `w <= 3` as compact.
23
+ ...widget.size ? { size: widget.size } : {},
24
+ layouts: widget.layouts ?? {
25
+ lg: { x: 0, y: 0, w: WIDTH_COLUMNS[widget.width ?? "half"], h: 4 }
26
+ },
19
27
  // Passed through ONLY when the registry entry declared them, so the
20
28
  // default lives in exactly one place: `dashboard-grid.tsx`, which is a copy
21
29
  // of the host's own grid and applies the host's own `?? false`.
@@ -74,5 +82,6 @@ export {
74
82
  HARNESS_ACCOUNT_ID,
75
83
  HARNESS_SOURCE_ID,
76
84
  WidgetSurface,
77
- toWidgetConfig
85
+ toWidgetConfig,
86
+ withFocusedDefault
78
87
  };