@ekanos/harness 0.23.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/internal/components/approvals-tray.js +5 -5
- package/dist/internal/components/ask-assistant-bridge.js +6 -6
- package/dist/internal/components/connect-panel.js +16 -9
- package/dist/internal/components/connection-chip.js +2 -2
- package/dist/internal/components/dashboard-grid.js +1 -1
- package/dist/internal/components/dev-toolbar.js +5 -5
- package/dist/internal/components/docs-link.js +3 -3
- package/dist/internal/components/events-panel.js +11 -11
- package/dist/internal/components/health-panel.js +3 -10
- package/dist/internal/components/integration-badge.js +4 -4
- package/dist/internal/components/local-oauth-panel.js +14 -14
- package/dist/internal/components/operation-runner-panel.d.ts +3 -1
- package/dist/internal/components/operation-runner-panel.js +22 -44
- package/dist/internal/components/provenance-banner.js +3 -3
- package/dist/internal/components/run-log.js +13 -13
- package/dist/internal/components/runtime-strip.js +4 -4
- package/dist/internal/components/schema-form.js +9 -9
- package/dist/internal/components/scrollable-nav.d.ts +1 -1
- package/dist/internal/components/scrollable-nav.js +1 -1
- package/dist/internal/components/surface-nav.js +26 -26
- package/dist/internal/components/viewport-frame.js +1 -1
- package/dist/internal/components/widget-boundary.js +3 -3
- package/dist/internal/components/widget-surface.d.ts +5 -0
- package/dist/internal/components/widget-surface.js +12 -3
- package/dist/internal/components/workflow-runner.js +6 -6
- package/dist/internal/lib/console-context.js +2 -1
- package/dist/internal/lib/console-types.d.ts +4 -3
- package/dist/internal/lib/experience-runtime.d.ts +9 -1
- package/dist/internal/lib/experience-runtime.js +35 -7
- package/dist/internal/lib/run-log-view.js +5 -3
- package/dist/internal/routes/activation-page.js +17 -17
- package/dist/internal/routes/console-home-page.js +1 -1
- package/dist/internal/routes/experience-connect-page.js +12 -12
- package/dist/internal/routes/experience-layout-page.js +6 -6
- package/dist/internal/routes/experience-page-host.js +4 -4
- package/dist/internal/routes/experience-review-queue-page.js +7 -7
- package/dist/internal/routes/experience-runs-page.js +2 -2
- package/dist/internal/routes/experience-summary-page.js +4 -4
- package/dist/internal/routes/experience-widget-page.js +6 -3
- package/dist/internal/routes/experience-widgets-page.js +2 -2
- package/dist/internal/routes/experience-workflow-page.js +3 -3
- package/dist/internal/routes/experience-workflows-page.js +6 -6
- package/dist/internal/routes/integration-layout.js +1 -1
- package/dist/internal/routes/integrations-layout.js +2 -2
- package/dist/internal/routes/integrations-list-page.js +8 -8
- package/dist/internal/routes/integrations-operations-page.js +5 -5
- package/dist/internal/routes/integrations-overview-page.js +4 -4
- package/dist/internal/routes/integrations-runs-page.js +1 -1
- package/dist/internal/routes/integrations-scope.js +2 -2
- package/dist/internal/routes/repo-home-page.js +19 -19
- package/dist/internal/routes/repo-layout.js +4 -4
- package/dist/internal/routes/repo-package-layouts.js +2 -2
- package/dist/internal/routes/root-layout.js +1 -1
- package/dist/internal/routes/single-widget-page.js +5 -2
- package/dist/internal/routes/tile-page.js +8 -8
- package/dist/internal/routes/triggers-page.js +31 -31
- package/dist/internal/routes/widgets-page.js +1 -1
- package/dist/internal/server/ekanos-api-router.js +2 -2
- package/dist/internal/server/integration-resolver.d.ts +6 -0
- package/dist/internal/server/integration-resolver.js +5 -1
- package/dist/internal/server/local-secrets.d.ts +6 -5
- package/dist/internal/server/operation-runner.d.ts +7 -5
- package/dist/internal/server/operation-runner.js +23 -2
- package/dist/internal/surfaces.js +4 -4
- package/dist/registry.d.ts +9 -2
- package/dist/styles.css +7 -167
- package/package.json +8 -8
|
@@ -40,26 +40,26 @@ function OutcomePanel({ outcome }) {
|
|
|
40
40
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", "data-test": "trigger-outcome", children: [
|
|
41
41
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42
42
|
/* @__PURE__ */ jsx(Badge, { variant: outcome.ok ? "default" : "destructive", children: outcome.summary }),
|
|
43
|
-
outcome.detail ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-
|
|
43
|
+
outcome.detail ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-sm", children: outcome.detail }) : null
|
|
44
44
|
] }),
|
|
45
45
|
outcome.agentEvents ? /* @__PURE__ */ jsx(RaisedAgentEvents, { events: outcome.agentEvents }) : null,
|
|
46
46
|
outcome.logs.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
47
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-
|
|
48
|
-
/* @__PURE__ */ jsx("pre", { className: "bg-muted
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: "Handler logs" }),
|
|
48
|
+
/* @__PURE__ */ jsx("pre", { className: "bg-muted max-h-48 overflow-auto rounded-md p-3 text-xs", children: outcome.logs.map((log) => `[${log.level}] ${log.message}`).join("\n") })
|
|
49
49
|
] }) : null,
|
|
50
50
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: ["account", "user"].map((scope) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
51
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-
|
|
51
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
52
52
|
scope === "account" ? "Account" : "User",
|
|
53
53
|
" storage after this run",
|
|
54
54
|
Object.keys(outcome.storage[scope]).length === 0 ? "(empty)" : ""
|
|
55
55
|
] }),
|
|
56
|
-
/* @__PURE__ */ jsx("pre", { className: "bg-muted
|
|
56
|
+
/* @__PURE__ */ jsx("pre", { className: "bg-muted max-h-64 overflow-auto rounded-md p-3 text-xs", children: JSON.stringify(outcome.storage[scope], null, 2) })
|
|
57
57
|
] }, scope)) })
|
|
58
58
|
] });
|
|
59
59
|
}
|
|
60
60
|
function RaisedAgentEvents({ events }) {
|
|
61
61
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", "data-test": "raised-agent-events", children: [
|
|
62
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-
|
|
62
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
63
63
|
"Agent events raised (",
|
|
64
64
|
events.length,
|
|
65
65
|
") \u2014 the host records these and starts every agent whose trigger matches"
|
|
@@ -70,22 +70,22 @@ function RaisedAgentEvents({ events }) {
|
|
|
70
70
|
className: "flex flex-col gap-1 rounded-md border p-3",
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
73
|
-
/* @__PURE__ */ jsx("code", { className: "text-
|
|
73
|
+
/* @__PURE__ */ jsx("code", { className: "text-sm", children: event.id }),
|
|
74
74
|
/* @__PURE__ */ jsx(Badge, { variant: event.problem ? "destructive" : "secondary", children: event.problem ? "dropped" : "would be recorded" }),
|
|
75
|
-
event.dedupeKey ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-
|
|
75
|
+
event.dedupeKey ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
76
76
|
"dedupe ",
|
|
77
77
|
/* @__PURE__ */ jsx("code", { children: event.dedupeKey })
|
|
78
78
|
] }) : null
|
|
79
79
|
] }),
|
|
80
|
-
event.problem ? /* @__PURE__ */ jsx("p", { className: "text-destructive text-
|
|
81
|
-
event.conversation ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
80
|
+
event.problem ? /* @__PURE__ */ jsx("p", { className: "text-destructive text-xs", children: event.problem }) : null,
|
|
81
|
+
event.conversation ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-xs", children: [
|
|
82
82
|
"A run it starts answers in ",
|
|
83
83
|
/* @__PURE__ */ jsx("code", { children: event.conversation.key })
|
|
84
84
|
] }) : null,
|
|
85
85
|
event.routes?.map((route) => /* @__PURE__ */ jsxs(
|
|
86
86
|
"p",
|
|
87
87
|
{
|
|
88
|
-
className: route.problem ? "text-destructive text-
|
|
88
|
+
className: route.problem ? "text-destructive text-xs" : "text-muted-foreground text-xs",
|
|
89
89
|
"data-test": `raised-agent-event-route-${route.key}`,
|
|
90
90
|
children: [
|
|
91
91
|
route.value === null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -105,7 +105,7 @@ function RaisedAgentEvents({ events }) {
|
|
|
105
105
|
},
|
|
106
106
|
route.key
|
|
107
107
|
)),
|
|
108
|
-
/* @__PURE__ */ jsx("pre", { className: "bg-muted
|
|
108
|
+
/* @__PURE__ */ jsx("pre", { className: "bg-muted max-h-40 overflow-auto rounded-md p-2 text-xs", children: JSON.stringify(event.payload, null, 2) })
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
111
|
`${event.id}:${event.dedupeKey}:${index}`
|
|
@@ -126,7 +126,7 @@ function AgentEventsCard({
|
|
|
126
126
|
"data-test": "agent-events",
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
129
|
-
/* @__PURE__ */ jsx("h3", { className: "text-
|
|
129
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: "Agent events" }),
|
|
130
130
|
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: "agents" }),
|
|
131
131
|
channel ? /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
|
|
132
132
|
"replies with ",
|
|
@@ -134,12 +134,12 @@ function AgentEventsCard({
|
|
|
134
134
|
] }) : /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "no channel \u2014 runs answer in Ekanos" }),
|
|
135
135
|
definition.sourceConnection ? /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Source connection" }) : null
|
|
136
136
|
] }),
|
|
137
|
-
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
137
|
+
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
138
138
|
"A team picks one of these as an agent trigger and fills in its filter. Your webhooks raise them through ",
|
|
139
139
|
/* @__PURE__ */ jsx("code", { children: "WebhookResult.events" }),
|
|
140
140
|
"; deliver a webhook above to see what it raises."
|
|
141
141
|
] }),
|
|
142
|
-
definition.routing ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
142
|
+
definition.routing ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
143
143
|
"On a Source connection, events are routed to a team by",
|
|
144
144
|
" ",
|
|
145
145
|
definition.routing.keys.map((key, index) => /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -164,15 +164,15 @@ function AgentEventsCard({
|
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
166
166
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: event.label }),
|
|
167
|
-
/* @__PURE__ */ jsx("code", { className: "text-muted-foreground text-
|
|
167
|
+
/* @__PURE__ */ jsx("code", { className: "text-muted-foreground text-xs", children: event.id }),
|
|
168
168
|
event.conversation ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "answers in place" }) : null,
|
|
169
169
|
Object.keys(event.routeKeys ?? {}).map((key) => /* @__PURE__ */ jsxs(Badge, { variant: "outline", children: [
|
|
170
170
|
"routes by ",
|
|
171
171
|
/* @__PURE__ */ jsx("code", { children: key })
|
|
172
172
|
] }, key))
|
|
173
173
|
] }),
|
|
174
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
175
|
-
event.filter?.fields.length ? /* @__PURE__ */ jsx("ul", { className: "text-muted-foreground
|
|
174
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: event.description }),
|
|
175
|
+
event.filter?.fields.length ? /* @__PURE__ */ jsx("ul", { className: "text-muted-foreground list-disc pl-5 text-xs", children: event.filter.fields.map((field) => /* @__PURE__ */ jsxs("li", { children: [
|
|
176
176
|
/* @__PURE__ */ jsx("code", { children: field.key }),
|
|
177
177
|
" \u2014 ",
|
|
178
178
|
field.label,
|
|
@@ -180,7 +180,7 @@ function AgentEventsCard({
|
|
|
180
180
|
field.type,
|
|
181
181
|
field.required ? ", required" : "",
|
|
182
182
|
")"
|
|
183
|
-
] }, field.key)) }) : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
183
|
+
] }, field.key)) }) : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "No filter: every event of this kind starts the agent." })
|
|
184
184
|
]
|
|
185
185
|
},
|
|
186
186
|
event.id
|
|
@@ -223,7 +223,7 @@ function WebhookCard({
|
|
|
223
223
|
"data-test": `webhook-${webhook.id}`,
|
|
224
224
|
children: [
|
|
225
225
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
226
|
-
/* @__PURE__ */ jsx("h3", { className: "text-
|
|
226
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: /* @__PURE__ */ jsx("code", { children: webhook.id }) }),
|
|
227
227
|
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: "webhook" }),
|
|
228
228
|
webhook.signature === "none" ? /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "unsigned" }) : /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
|
|
229
229
|
"signed: ",
|
|
@@ -234,10 +234,10 @@ function WebhookCard({
|
|
|
234
234
|
] }),
|
|
235
235
|
webhook.signature !== "none" && webhook.signature.scheme ? /* @__PURE__ */ jsx(Badge, { variant: "outline", "data-test": `webhook-${webhook.id}-scheme`, children: describeSignatureScheme(webhook.signature.scheme) }) : null
|
|
236
236
|
] }),
|
|
237
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
238
|
-
webhook.signature !== "none" ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
237
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: webhook.description }),
|
|
238
|
+
webhook.signature !== "none" ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Signature verification is the transport's job \u2014 the harness skips it (and says so in the handler logs); the host ingress will enforce it before your handler ever runs." }) : null,
|
|
239
239
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
240
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-
|
|
240
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
241
241
|
"Payload (validated against ",
|
|
242
242
|
/* @__PURE__ */ jsx("code", { children: "payloadSchema" }),
|
|
243
243
|
" before the handler runs)"
|
|
@@ -248,7 +248,7 @@ function WebhookCard({
|
|
|
248
248
|
value: state.payload,
|
|
249
249
|
onChange: (event) => setState((s) => ({ ...s, payload: event.target.value })),
|
|
250
250
|
rows: 10,
|
|
251
|
-
className: "
|
|
251
|
+
className: "font-mono text-xs",
|
|
252
252
|
"data-test": `webhook-payload-${webhook.id}`
|
|
253
253
|
}
|
|
254
254
|
)
|
|
@@ -285,12 +285,12 @@ function ScheduleCard({
|
|
|
285
285
|
"data-test": `schedule-${schedule.id}`,
|
|
286
286
|
children: [
|
|
287
287
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
288
|
-
/* @__PURE__ */ jsx("h3", { className: "text-
|
|
288
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: /* @__PURE__ */ jsx("code", { children: schedule.id }) }),
|
|
289
289
|
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: "schedule" }),
|
|
290
290
|
/* @__PURE__ */ jsx(Badge, { variant: "secondary", children: /* @__PURE__ */ jsx("code", { children: schedule.cron }) })
|
|
291
291
|
] }),
|
|
292
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
293
|
-
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
292
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: schedule.description }),
|
|
293
|
+
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-xs", children: [
|
|
294
294
|
"The host scheduler fires this cron with",
|
|
295
295
|
" ",
|
|
296
296
|
/* @__PURE__ */ jsx("code", { children: "trigger: 'schedule'" }),
|
|
@@ -338,10 +338,10 @@ function OAuthCard({
|
|
|
338
338
|
"data-test": "oauth-declaration",
|
|
339
339
|
children: [
|
|
340
340
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
341
|
-
/* @__PURE__ */ jsx("h3", { className: "text-
|
|
341
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: "OAuth declaration" }),
|
|
342
342
|
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: "oauth" })
|
|
343
343
|
] }),
|
|
344
|
-
/* @__PURE__ */ jsxs("dl", { className: "
|
|
344
|
+
/* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-[auto_1fr]", children: [
|
|
345
345
|
rows.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "contents", children: [
|
|
346
346
|
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: label }),
|
|
347
347
|
/* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { className: "break-all", children: value }) })
|
|
@@ -448,14 +448,14 @@ function TriggersPage() {
|
|
|
448
448
|
] })
|
|
449
449
|
] })
|
|
450
450
|
] }),
|
|
451
|
-
!definition ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
451
|
+
!definition ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
452
452
|
"This harness entry does not link its ",
|
|
453
453
|
/* @__PURE__ */ jsx("code", { children: "defineIntegration()" }),
|
|
454
454
|
" ",
|
|
455
455
|
"output. Add ",
|
|
456
456
|
/* @__PURE__ */ jsx("code", { children: "definition: integration" }),
|
|
457
457
|
" to the entry in your harness config to light this surface up."
|
|
458
|
-
] }) : !declaresAnything ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-
|
|
458
|
+
] }) : !declaresAnything ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
459
459
|
/* @__PURE__ */ jsx("code", { children: definition.slug }),
|
|
460
460
|
" declares no webhooks, schedules, or OAuth \u2014 which is a perfectly good answer for an integration that only reads. The ",
|
|
461
461
|
/* @__PURE__ */ jsx("code", { children: "@ekanos/sdk" }),
|
|
@@ -6,7 +6,7 @@ import { useHarnessIntegration } from "../registry-context.js";
|
|
|
6
6
|
function WidgetsPage() {
|
|
7
7
|
const integration = useHarnessIntegration();
|
|
8
8
|
if (!integration) notFound();
|
|
9
|
-
return /* @__PURE__ */ jsx("div", { className: "min-w-0", "data-test": "widgets", children: integration.widgets.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: "min-w-0", "data-test": "widgets", children: integration.widgets.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "This integration registers no widgets." }) : /* @__PURE__ */ jsx(
|
|
10
10
|
WidgetSurface,
|
|
11
11
|
{
|
|
12
12
|
widgets: integration.widgets,
|
|
@@ -66,7 +66,7 @@ const RunBodySchema = z.preprocess(
|
|
|
66
66
|
integration: z.string().min(1),
|
|
67
67
|
op: z.string().min(1),
|
|
68
68
|
input: z.unknown().optional(),
|
|
69
|
-
channel: z.enum(["http", "rsc", "workflow"]),
|
|
69
|
+
channel: z.enum(["http", "rsc", "workflow", "interactive"]),
|
|
70
70
|
mode: z.enum(["fixtures", "live"]).optional(),
|
|
71
71
|
scenario: z.enum(["default", "empty", "error"]).optional(),
|
|
72
72
|
origin: z.string().max(200).optional()
|
|
@@ -115,7 +115,7 @@ function toIntegrationView(integration, runtime) {
|
|
|
115
115
|
function createEkanosApiRouter(partial = {}) {
|
|
116
116
|
const env = partial.env ?? process.env;
|
|
117
117
|
const root = partial.projectRoot ? { ok: true, root: partial.projectRoot } : resolveProjectRoot({ env, cwd: partial.cwd ?? process.cwd() });
|
|
118
|
-
const httpWrites = partial.httpWrites ?? (env.EKANOS_HARNESS_HTTP_WRITES === "
|
|
118
|
+
const httpWrites = partial.httpWrites ?? (env.EKANOS_HARNESS_HTTP_WRITES === "approval" ? "approval" : "refuse");
|
|
119
119
|
const approvals = createApprovalsTray({
|
|
120
120
|
...partial.now ? { now: partial.now } : {}
|
|
121
121
|
});
|
|
@@ -27,6 +27,12 @@ import { type EnsureResult } from './registry-cache.js';
|
|
|
27
27
|
* Nothing here throws for a per-integration problem — problems come back as
|
|
28
28
|
* `errors` so the harness can start, print them, and refuse only that integration.
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* The mode a slot runs in when nothing overrides it: the first declared mode
|
|
32
|
+
* the host serves (`team`, `invoker`), in declared order, as the host does.
|
|
33
|
+
* A slot that declares only `user` (lent) keeps it and is refused at run time.
|
|
34
|
+
*/
|
|
35
|
+
export declare function defaultBindingMode(modes: readonly BindingMode[]): BindingMode;
|
|
30
36
|
export interface ResolvedIntegration {
|
|
31
37
|
integration: string;
|
|
32
38
|
version: string;
|
|
@@ -30,6 +30,9 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
ensurePublishedIntegration
|
|
32
32
|
} from "./registry-cache.js";
|
|
33
|
+
function defaultBindingMode(modes) {
|
|
34
|
+
return modes.find((mode) => mode === "team" || mode === "invoker") ?? modes[0] ?? "team";
|
|
35
|
+
}
|
|
33
36
|
function repoOf(projectRoot, notices) {
|
|
34
37
|
const root = findRepoRoot(projectRoot);
|
|
35
38
|
if (!root) return null;
|
|
@@ -148,7 +151,7 @@ async function resolveIntegrations(options) {
|
|
|
148
151
|
const snapshotDir = path.resolve(options.projectRoot, manifest.contractsDir);
|
|
149
152
|
for (const entry of manifest.integrations) {
|
|
150
153
|
const override = overrideByIntegration.get(entry.name);
|
|
151
|
-
const bindingMode = overridesInfo.bindingMode[entry.name] ?? entry.modes
|
|
154
|
+
const bindingMode = overridesInfo.bindingMode[entry.name] ?? defaultBindingMode(entry.modes);
|
|
152
155
|
const repoPackage = override ? null : sameRepoPackage(repo, options.projectRoot, entry.name);
|
|
153
156
|
try {
|
|
154
157
|
const resolved = override ? await resolveLocal(
|
|
@@ -608,6 +611,7 @@ function formatProvenanceLines(resolution) {
|
|
|
608
611
|
}
|
|
609
612
|
export {
|
|
610
613
|
compatLine,
|
|
614
|
+
defaultBindingMode,
|
|
611
615
|
formatProvenanceLines,
|
|
612
616
|
repoOf,
|
|
613
617
|
resolveIntegrations,
|
|
@@ -28,11 +28,12 @@ export declare const LOCAL_SECRETS_RELATIVE_PATH: string;
|
|
|
28
28
|
/**
|
|
29
29
|
* The block key holding what the activation form submitted in live mode.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* Every STRING field of the submitted `activationData` becomes
|
|
32
|
+
* `ctx.secrets.get('<field name>')` for that account, under the exact field
|
|
33
|
+
* name (non-strings do not). On the host the fields `activation.fields` marks
|
|
34
|
+
* `secret: true` are vaulted and the rest stay readable through the same call;
|
|
35
|
+
* the harness has no connection record to keep them out of, so it keeps them
|
|
36
|
+
* all here. They are not declared secret names (the admin tier). They are persisted here verbatim as the account tier,
|
|
36
37
|
* beside (never among) the admin-tier names the operator fills in.
|
|
37
38
|
*/
|
|
38
39
|
export declare const ACTIVATION_BLOCK_KEY = "activationData";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ContractOperation, type OperationKind } from '@ekanos/integration-schema';
|
|
2
2
|
import type { ExecutionChannel, FixtureScenario, InternalWriteGate, OperationResult, RunMode, RunOperationRequest, RunRecord } from '../../api-types.js';
|
|
3
3
|
import type { ApprovalsTray } from './approvals.js';
|
|
4
4
|
import type { ResolvedIntegration } from './integration-resolver.js';
|
|
@@ -23,10 +23,12 @@ import { type ExecutorLimits } from './semantics.js';
|
|
|
23
23
|
* 8 output validates, FAIL-CLOSED + cap output_invalid / output_too_large
|
|
24
24
|
* 9 a run-log row, always
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* Channels, as in the host: a widget or page write arrives on `interactive`
|
|
27
|
+
* (a person's click) and runs directly, with the `confirmed: true` rule; a
|
|
28
|
+
* workflow write runs only behind its approval gate (the approvals tray); an
|
|
29
|
+
* `http` or `rsc` write is refused. `channels.httpWrites` defaults to
|
|
30
|
+
* `'refuse'`; `'approval'` is an opt-in for testing that holds an `http` write
|
|
31
|
+
* in the tray, which the host never does.
|
|
30
32
|
*/
|
|
31
33
|
export type HttpWritePolicy = 'refuse' | 'approval';
|
|
32
34
|
export interface FixtureSource {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isConfirmed,
|
|
3
|
+
requiresConfirmation
|
|
4
|
+
} from "@ekanos/integration-schema";
|
|
1
5
|
import * as fs from "node:fs";
|
|
2
6
|
import * as path from "node:path";
|
|
3
7
|
import { redactSensitive } from "../lib/redact.js";
|
|
@@ -8,6 +12,16 @@ import {
|
|
|
8
12
|
validateInput,
|
|
9
13
|
validateOutput
|
|
10
14
|
} from "./semantics.js";
|
|
15
|
+
function servesBindingMode(integration, channel) {
|
|
16
|
+
switch (integration.bindingMode) {
|
|
17
|
+
case "team":
|
|
18
|
+
return true;
|
|
19
|
+
case "invoker":
|
|
20
|
+
return channel !== "workflow" || integration.modes.includes("team");
|
|
21
|
+
case "user":
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
11
25
|
const OP_KEY = /^(tool|action)\/([a-z][a-z0-9_-]*)$/;
|
|
12
26
|
class DeadlineError extends Error {
|
|
13
27
|
constructor() {
|
|
@@ -112,10 +126,17 @@ async function runOperation(request, deps) {
|
|
|
112
126
|
operation = integration.contract.operations.find((candidate) => candidate.id === id) ?? null;
|
|
113
127
|
if (!operation) return refuse("operation_not_in_contract");
|
|
114
128
|
mode = request.mode ?? await deps.defaultModeFor?.(integration, operation.effect) ?? integration.defaultMode;
|
|
115
|
-
if (!integration.modes.includes(integration.bindingMode) || !integration.runModes.includes(mode)) {
|
|
129
|
+
if (!integration.modes.includes(integration.bindingMode) || !integration.runModes.includes(mode) || !servesBindingMode(integration, request.channel)) {
|
|
116
130
|
return refuse("mode_not_permitted");
|
|
117
131
|
}
|
|
118
|
-
if (
|
|
132
|
+
if (request.channel === "interactive") {
|
|
133
|
+
if (operation.effect !== "write") {
|
|
134
|
+
return refuse("operation_not_in_contract");
|
|
135
|
+
}
|
|
136
|
+
if (requiresConfirmation(operation) && !isConfirmed(request.input)) {
|
|
137
|
+
return refuse("confirmation_required");
|
|
138
|
+
}
|
|
139
|
+
} else if (operation.effect === "write" && !request.gate) {
|
|
119
140
|
const gated = request.channel === "workflow" || deps.channels.httpWrites === "approval";
|
|
120
141
|
if (!gated) return refuse("write_refused_on_channel");
|
|
121
142
|
const pending = deps.approvals.request(
|
|
@@ -3,25 +3,25 @@ const HARNESS_SURFACES = [
|
|
|
3
3
|
segment: "widgets",
|
|
4
4
|
label: "Widgets",
|
|
5
5
|
shortLabel: "Widgets",
|
|
6
|
-
icon: "fa-
|
|
6
|
+
icon: "fa-table-cells-large"
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
segment: "tile",
|
|
10
10
|
label: "Marketplace tile",
|
|
11
11
|
shortLabel: "Tile",
|
|
12
|
-
icon: "fa-
|
|
12
|
+
icon: "fa-store"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
segment: "activation",
|
|
16
16
|
label: "Activation",
|
|
17
17
|
shortLabel: "Activation",
|
|
18
|
-
icon: "fa-
|
|
18
|
+
icon: "fa-plug"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
segment: "triggers",
|
|
22
22
|
label: "Triggers",
|
|
23
23
|
shortLabel: "Triggers",
|
|
24
|
-
icon: "fa-
|
|
24
|
+
icon: "fa-bolt"
|
|
25
25
|
}
|
|
26
26
|
];
|
|
27
27
|
export {
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { WidgetLayouts } from '@ekanos/integration-schema';
|
|
2
3
|
import type { ActivationFormProps, IntegrationComponentProps, IntegrationConnection, IntegrationFetch, IntegrationRouting, MarketplaceTileProps, StorageSchemas } from '@ekanos/sdk';
|
|
3
4
|
import type { IntegrationDefinition } from '@ekanos/sdk/integration';
|
|
4
5
|
import type { MockFetchHandler } from '@ekanos/sdk/testing';
|
|
@@ -75,9 +76,15 @@ export interface HarnessWidget {
|
|
|
75
76
|
component: ComponentType<IntegrationComponentProps>;
|
|
76
77
|
/**
|
|
77
78
|
* Column span in the dashboard grid. `full` gets its own row; runs of
|
|
78
|
-
* `half` widgets are balanced across two columns
|
|
79
|
+
* `half` widgets are balanced across two columns; `compact` is a figure
|
|
80
|
+
* tile. Defaults to `half`. Precedence: `size`, then `layouts.lg.w`, then
|
|
81
|
+
* `width`.
|
|
79
82
|
*/
|
|
80
|
-
width?: 'half' | 'full';
|
|
83
|
+
width?: 'compact' | 'half' | 'full';
|
|
84
|
+
/** Same as an integration widget's `size`; wins over `layouts` and `width`. */
|
|
85
|
+
size?: 'compact' | 'half' | 'full';
|
|
86
|
+
/** Same as an integration widget's `layouts`; the grid reads `lg.w` and `lg.maxHeight`. */
|
|
87
|
+
layouts?: WidgetLayouts;
|
|
81
88
|
isCollapsible?: boolean;
|
|
82
89
|
isPinnable?: boolean;
|
|
83
90
|
/** Renders the "Ask about this" AI footer bar. */
|
package/dist/styles.css
CHANGED
|
@@ -60,174 +60,14 @@
|
|
|
60
60
|
--font-heading: var(--font-heading-fallback), var(--font-sans);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/* ── Font Awesome Free
|
|
63
|
+
/* ── Font Awesome Free ─────────────────────────────────────────────────────────
|
|
64
64
|
*
|
|
65
|
-
* The harness loads Font Awesome FREE (
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* `:where()` carries zero specificity, so every real `.fa-<name>{--fa:…}` rule
|
|
72
|
-
* in the vendor CSS still wins. Only genuinely-absent glyphs fall through to
|
|
73
|
-
* the question mark, which reads as "this glyph isn't in the free font" rather
|
|
74
|
-
* than as a broken layout. */
|
|
75
|
-
:where(.fa-solid, .fa-regular, .fa-light, .fa-duotone, .fa-thin, .fa) {
|
|
76
|
-
--fa: '\f059'; /* fa-circle-question */
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* ── Font Awesome Free: hand `::before` back to the icon font ─────────────────
|
|
80
|
-
*
|
|
81
|
-
* `@ekanos/ui/theme.css` imports that package's `base.css`, which paints a
|
|
82
|
-
* placeholder for a host that loads NO icon font at all:
|
|
83
|
-
*
|
|
84
|
-
* :where(i[class*='fa-'])::before {
|
|
85
|
-
* content: var(--ekanos-icon-fallback, '\25a1');
|
|
86
|
-
* font-family: ui-sans-serif, system-ui, sans-serif;
|
|
87
|
-
* font-weight: 400;
|
|
88
|
-
* opacity: 0.55;
|
|
89
|
-
* }
|
|
90
|
-
*
|
|
91
|
-
* Its comment reasons that `:where()` at (0,0,1) loses to Font Awesome's own
|
|
92
|
-
* `:is(…)::before` at (0,1,1), so the rule "contributes nothing" the instant a
|
|
93
|
-
* Font Awesome stylesheet is present. That holds for `content` — the ONLY
|
|
94
|
-
* property FA declares on the pseudo-element (`content: var(--fa)/""`). It does
|
|
95
|
-
* NOT hold for `font-family`, `font-weight` or `opacity`: FA declares the family
|
|
96
|
-
* and weight on the ELEMENT (`.fa-solid { font-family: var(--_fa-family);
|
|
97
|
-
* font-weight: var(--fa-style, 900) }`), never on `::before`. So those three
|
|
98
|
-
* declarations have no competitor at pseudo-element level and win regardless of
|
|
99
|
-
* specificity or cascade layer — a declared value always beats an inherited one.
|
|
100
|
-
*
|
|
101
|
-
* Net effect with FA Free loaded: `content` is the CORRECT codepoint (verified
|
|
102
|
-
* in-browser: U+F043 for `fa-droplet`) but it is painted in `system-ui` at
|
|
103
|
-
* weight 400, and no system font carries a Private Use Area glyph there — so
|
|
104
|
-
* every icon rendered as the browser's missing-glyph hex box (a rectangle of
|
|
105
|
-
* tiny hex digits, which reads as a striped/barcode box) at 55% opacity.
|
|
106
|
-
*
|
|
107
|
-
* Handing the pseudo-element back to `inherit` restores FA's own family and
|
|
108
|
-
* weight off the `<i>`, which is correct for solid, regular AND brands without
|
|
109
|
-
* naming a family here. `:is()` at (0,1,0) beats the `:where()` it undoes, and
|
|
110
|
-
* being unlayered it also outranks the `layer(base)` base.css is imported into.
|
|
111
|
-
*
|
|
112
|
-
* This lives here, not in `@ekanos/ui`, because the placeholder is correct for
|
|
113
|
-
* the case it was written for — a host with no icon font. It is only wrong for a
|
|
114
|
-
* host that HAS one, which is this app. */
|
|
115
|
-
:is(
|
|
116
|
-
.fa,
|
|
117
|
-
.fas,
|
|
118
|
-
.far,
|
|
119
|
-
.fab,
|
|
120
|
-
.fa-solid,
|
|
121
|
-
.fa-regular,
|
|
122
|
-
.fa-brands,
|
|
123
|
-
.fa-classic,
|
|
124
|
-
.fa-light,
|
|
125
|
-
.fa-thin,
|
|
126
|
-
.fa-duotone,
|
|
127
|
-
.fa-sharp
|
|
128
|
-
)::before {
|
|
129
|
-
font-family: inherit;
|
|
130
|
-
font-weight: inherit;
|
|
131
|
-
opacity: 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* The Pro-only FAMILY classes get no `font-family` from the Free stylesheet at
|
|
135
|
-
* all, so an `<i class="fa-light fa-spinner">` falls back to the body font and
|
|
136
|
-
* renders tofu even when `--fa` holds a codepoint Free ships.
|
|
137
|
-
* `IconStyleOverrideProvider value="solid"` in `RootLayout` rewrites these
|
|
138
|
-
* for everything under it, but it cannot reach an icon rendered outside that
|
|
139
|
-
* subtree — and `@ekanos/ui`'s own `Spinner` hardcodes `fa-light fa-spinner`. Pin
|
|
140
|
-
* them to the one weight Free actually ships so they degrade to the solid face
|
|
141
|
-
* instead of vanishing. Family is spelled out because `--_fa-family` is set by
|
|
142
|
-
* the very FA rule that does not match these classes. */
|
|
143
|
-
i:is(.fa-light, .fa-thin, .fa-duotone, .fa-sharp) {
|
|
144
|
-
font-family: 'Font Awesome 7 Free';
|
|
145
|
-
font-weight: 900;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* ── Pro glyph names → their nearest Free equivalent ──────────────────────────
|
|
149
|
-
*
|
|
150
|
-
* The `--fa: '\f059'` rule above is the LAST resort: it keeps an unknown glyph
|
|
151
|
-
* legible as a question mark instead of collapsing the layout. But a wall of
|
|
152
|
-
* question marks is its own kind of broken-looking, and several of the Pro
|
|
153
|
-
* names our example integrations use have an obvious Free counterpart that
|
|
154
|
-
* carries the same meaning.
|
|
155
|
-
*
|
|
156
|
-
* Aliasing those by codepoint here is strictly better than the question mark
|
|
157
|
-
* and strictly honest about what it is: an APPROXIMATION for the Free build.
|
|
158
|
-
* `fa-cloud` is not `fa-clouds` and `fa-sun` is not `fa-sun-bright` — in
|
|
159
|
-
* production, where Ekanos loads Font Awesome Pro, the real Pro rule is (0,1,0)
|
|
160
|
-
* and lives in an unlayered vendor sheet, so it wins over the `i.fa-*` selectors
|
|
161
|
-
* below and the authored Pro glyph renders exactly as designed. Nothing here
|
|
162
|
-
* changes what a correctly licensed host shows.
|
|
163
|
-
*
|
|
164
|
-
* Keep this list to names our own bundled examples actually reference, or a
|
|
165
|
-
* real Pro-only name a partner build hit and reported (the block below it) —
|
|
166
|
-
* it is a courtesy for demo/partner surfaces, not a general-purpose
|
|
167
|
-
* Pro→Free shim covering every Pro glyph. `src/_impl/__tests__/
|
|
168
|
-
* fa-free-icon-names.test.tsx` in `@ekanos/ui` asserts every name here is
|
|
169
|
-
* genuinely Free-missing and every codepoint names a real Free glyph. */
|
|
170
|
-
i.fa-sun-bright {
|
|
171
|
-
--fa: '\f185'; /* fa-sun */
|
|
172
|
-
}
|
|
173
|
-
i.fa-moon-stars {
|
|
174
|
-
--fa: '\f186'; /* fa-moon */
|
|
175
|
-
}
|
|
176
|
-
i.fa-cloud-fog {
|
|
177
|
-
--fa: '\f75f'; /* fa-smog */
|
|
178
|
-
}
|
|
179
|
-
i.fa-cloud-drizzle {
|
|
180
|
-
--fa: '\f73d'; /* fa-cloud-rain */
|
|
181
|
-
}
|
|
182
|
-
i.fa-cloud-showers {
|
|
183
|
-
--fa: '\f740'; /* fa-cloud-showers-heavy */
|
|
184
|
-
}
|
|
185
|
-
i.fa-clouds {
|
|
186
|
-
--fa: '\f0c2'; /* fa-cloud */
|
|
187
|
-
}
|
|
188
|
-
i.fa-clouds-sun {
|
|
189
|
-
--fa: '\f6c4'; /* fa-cloud-sun */
|
|
190
|
-
}
|
|
191
|
-
i.fa-clouds-moon {
|
|
192
|
-
--fa: '\f6c3'; /* fa-cloud-moon */
|
|
193
|
-
}
|
|
194
|
-
i.fa-cloud-question {
|
|
195
|
-
--fa: '\f059'; /* fa-circle-question */
|
|
196
|
-
}
|
|
197
|
-
i.fa-sparkles {
|
|
198
|
-
--fa: '\e2ca'; /* fa-wand-magic-sparkles */
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Reported by a partner build (2026-09-08): all seven are real Font Awesome
|
|
202
|
-
* PRO names (verified against the host's Font Awesome Pro subset) that Free does not
|
|
203
|
-
* ship, so every one of them was rendering the bare circle-question fallback
|
|
204
|
-
* with no indication why. `fa-circle-question` itself was also reported, but
|
|
205
|
-
* it is NOT Free-missing — Free ships it natively at the same codepoint
|
|
206
|
-
* (`\f059`) the fallback rule above uses, so a probe that treats "content
|
|
207
|
-
* resolved to \f059" as "broken" cannot tell a genuine circle-question icon
|
|
208
|
-
* apart from the fallback. That is a probe-methodology caveat, not a shim
|
|
209
|
-
* this file can fix. */
|
|
210
|
-
i.fa-cloud-snow {
|
|
211
|
-
--fa: '\f2dc'; /* fa-snowflake */
|
|
212
|
-
}
|
|
213
|
-
i.fa-cloud-hail {
|
|
214
|
-
--fa: '\f73b'; /* fa-cloud-meatball */
|
|
215
|
-
}
|
|
216
|
-
i.fa-cloud-hail-mixed {
|
|
217
|
-
--fa: '\f73b'; /* fa-cloud-meatball */
|
|
218
|
-
}
|
|
219
|
-
i.fa-fog {
|
|
220
|
-
--fa: '\f75f'; /* fa-smog */
|
|
221
|
-
}
|
|
222
|
-
i.fa-sun-cloud {
|
|
223
|
-
--fa: '\f6c4'; /* fa-cloud-sun */
|
|
224
|
-
}
|
|
225
|
-
i.fa-moon-cloud {
|
|
226
|
-
--fa: '\f6c3'; /* fa-cloud-moon */
|
|
227
|
-
}
|
|
228
|
-
i.fa-cloud-bolt-sun {
|
|
229
|
-
--fa: '\f76c'; /* fa-cloud-bolt */
|
|
230
|
-
}
|
|
65
|
+
* The harness loads Font Awesome FREE (the host's Pro webfonts are
|
|
66
|
+
* commercially licensed and cannot ship in a partner's scaffold).
|
|
67
|
+
* `@ekanos/ui`'s `Icon` draws each glyph as an <svg> from Free's own name
|
|
68
|
+
* table, so a Pro-only name draws `fa-circle-question` and a few known ones
|
|
69
|
+
* draw their nearest Free glyph (`@ekanos/ui` `_impl/fa-free-codepoints.ts`).
|
|
70
|
+
* Nothing here needs to patch the icon font. */
|
|
231
71
|
|
|
232
72
|
@layer base {
|
|
233
73
|
body {
|