@ekanos/harness 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-types.d.ts +490 -0
- package/dist/api-types.js +6 -0
- package/dist/api.d.ts +33 -0
- package/dist/api.js +36 -1
- package/dist/app.js +6 -1
- package/dist/internal/components/approvals-tray.d.ts +17 -0
- package/dist/internal/components/approvals-tray.js +116 -0
- package/dist/internal/components/ask-assistant-bridge.js +1 -1
- package/dist/internal/components/connect-controls.d.ts +12 -0
- package/dist/internal/components/connect-controls.js +69 -0
- package/dist/internal/components/connect-dialog.d.ts +19 -0
- package/dist/internal/components/connect-dialog.js +61 -0
- package/dist/internal/components/connect-panel.d.ts +25 -0
- package/dist/internal/components/connect-panel.js +292 -0
- package/dist/internal/components/connection-chip.d.ts +14 -0
- package/dist/internal/components/connection-chip.js +75 -0
- package/dist/internal/components/dashboard-grid.js +38 -24
- package/dist/internal/components/dev-toolbar.js +176 -103
- package/dist/internal/components/events-panel.d.ts +10 -0
- package/dist/internal/components/events-panel.js +111 -0
- package/dist/internal/components/health-panel.d.ts +4 -0
- package/dist/internal/components/health-panel.js +56 -0
- package/dist/internal/components/integration-badge.d.ts +29 -0
- package/dist/internal/components/integration-badge.js +105 -0
- package/dist/internal/components/local-oauth-panel.js +21 -1
- package/dist/internal/components/operation-runner-panel.d.ts +12 -0
- package/dist/internal/components/operation-runner-panel.js +331 -0
- package/dist/internal/components/provenance-banner.d.ts +12 -0
- package/dist/internal/components/provenance-banner.js +107 -0
- package/dist/internal/components/repo-connection.d.ts +10 -0
- package/dist/internal/components/repo-connection.js +32 -0
- package/dist/internal/components/run-log.d.ts +9 -0
- package/dist/internal/components/run-log.js +228 -0
- package/dist/internal/components/runtime-strip.d.ts +12 -0
- package/dist/internal/components/runtime-strip.js +158 -0
- package/dist/internal/components/schema-form.d.ts +13 -0
- package/dist/internal/components/schema-form.js +382 -0
- package/dist/internal/components/scrollable-nav.d.ts +12 -0
- package/dist/internal/components/scrollable-nav.js +68 -0
- package/dist/internal/components/surface-nav.d.ts +31 -1
- package/dist/internal/components/surface-nav.js +244 -31
- package/dist/internal/components/workflow-runner.d.ts +14 -0
- package/dist/internal/components/workflow-runner.js +104 -0
- package/dist/internal/lib/bundled-secrets.d.ts +9 -0
- package/dist/internal/lib/bundled-secrets.js +24 -0
- package/dist/internal/lib/chrome-slot.d.ts +2 -0
- package/dist/internal/lib/chrome-slot.js +25 -0
- package/dist/internal/lib/connection-facts.d.ts +44 -0
- package/dist/internal/lib/connection-facts.js +116 -0
- package/dist/internal/lib/console-client.d.ts +55 -0
- package/dist/internal/lib/console-client.js +295 -0
- package/dist/internal/lib/console-context.d.ts +56 -0
- package/dist/internal/lib/console-context.js +67 -0
- package/dist/internal/lib/console-hooks.d.ts +33 -0
- package/dist/internal/lib/console-hooks.js +118 -0
- package/dist/internal/lib/console-types.d.ts +279 -0
- package/dist/internal/lib/console-types.js +0 -0
- package/dist/internal/lib/experience-runtime.d.ts +8 -0
- package/dist/internal/lib/experience-runtime.js +22 -0
- package/dist/internal/lib/preview-sections.d.ts +13 -0
- package/dist/internal/lib/preview-sections.js +32 -0
- package/dist/internal/lib/repo-context.d.ts +20 -0
- package/dist/internal/lib/repo-context.js +64 -0
- package/dist/internal/lib/run-log-view.d.ts +24 -0
- package/dist/internal/lib/run-log-view.js +57 -0
- package/dist/internal/lib/schema-form-model.d.ts +34 -0
- package/dist/internal/lib/schema-form-model.js +272 -0
- package/dist/internal/lib/toolbar-context.d.ts +9 -1
- package/dist/internal/lib/toolbar-context.js +13 -3
- package/dist/internal/lib/toolbar-visibility.d.ts +16 -0
- package/dist/internal/lib/toolbar-visibility.js +31 -0
- package/dist/internal/registry-context.d.ts +2 -0
- package/dist/internal/registry-context.js +11 -9
- package/dist/internal/routes/activation-page.js +44 -20
- package/dist/internal/routes/console-home-page.d.ts +5 -0
- package/dist/internal/routes/console-home-page.js +18 -0
- package/dist/internal/routes/experience-connect-page.d.ts +6 -0
- package/dist/internal/routes/experience-connect-page.js +127 -0
- package/dist/internal/routes/experience-layout-page.d.ts +8 -0
- package/dist/internal/routes/experience-layout-page.js +126 -0
- package/dist/internal/routes/experience-page-host.d.ts +7 -0
- package/dist/internal/routes/experience-page-host.js +79 -0
- package/dist/internal/routes/experience-review-queue-page.d.ts +2 -0
- package/dist/internal/routes/experience-review-queue-page.js +60 -0
- package/dist/internal/routes/experience-runs-page.d.ts +1 -0
- package/dist/internal/routes/experience-runs-page.js +13 -0
- package/dist/internal/routes/experience-summary-page.d.ts +1 -0
- package/dist/internal/routes/experience-summary-page.js +101 -0
- package/dist/internal/routes/experience-widget-page.d.ts +1 -0
- package/dist/internal/routes/experience-widget-page.js +26 -0
- package/dist/internal/routes/experience-widgets-page.d.ts +6 -0
- package/dist/internal/routes/experience-widgets-page.js +22 -0
- package/dist/internal/routes/experience-workflow-page.d.ts +1 -0
- package/dist/internal/routes/experience-workflow-page.js +24 -0
- package/dist/internal/routes/experience-workflows-page.d.ts +1 -0
- package/dist/internal/routes/experience-workflows-page.js +44 -0
- package/dist/internal/routes/index-page.d.ts +10 -9
- package/dist/internal/routes/index-page.js +3 -68
- package/dist/internal/routes/integration-layout.d.ts +12 -1
- package/dist/internal/routes/integration-layout.js +20 -6
- package/dist/internal/routes/integrations-connect-page.d.ts +1 -0
- package/dist/internal/routes/integrations-connect-page.js +19 -0
- package/dist/internal/routes/integrations-events-page.d.ts +1 -0
- package/dist/internal/routes/integrations-events-page.js +10 -0
- package/dist/internal/routes/integrations-health-page.d.ts +1 -0
- package/dist/internal/routes/integrations-health-page.js +10 -0
- package/dist/internal/routes/integrations-layout.d.ts +17 -0
- package/dist/internal/routes/integrations-layout.js +106 -0
- package/dist/internal/routes/integrations-list-page.d.ts +2 -0
- package/dist/internal/routes/integrations-list-page.js +94 -0
- package/dist/internal/routes/integrations-operation-page.d.ts +1 -0
- package/dist/internal/routes/integrations-operation-page.js +29 -0
- package/dist/internal/routes/integrations-operations-page.d.ts +1 -0
- package/dist/internal/routes/integrations-operations-page.js +61 -0
- package/dist/internal/routes/integrations-overview-page.d.ts +1 -0
- package/dist/internal/routes/integrations-overview-page.js +90 -0
- package/dist/internal/routes/integrations-runs-page.d.ts +1 -0
- package/dist/internal/routes/integrations-runs-page.js +14 -0
- package/dist/internal/routes/integrations-scope.d.ts +12 -0
- package/dist/internal/routes/integrations-scope.js +39 -0
- package/dist/internal/routes/legacy-preview-redirect.d.ts +6 -0
- package/dist/internal/routes/legacy-preview-redirect.js +12 -0
- package/dist/internal/routes/preview-index-page.d.ts +2 -0
- package/dist/internal/routes/preview-index-page.js +14 -0
- package/dist/internal/routes/repo-connections-page.d.ts +6 -0
- package/dist/internal/routes/repo-connections-page.js +8 -0
- package/dist/internal/routes/repo-home-page.d.ts +2 -0
- package/dist/internal/routes/repo-home-page.js +320 -0
- package/dist/internal/routes/repo-layout.d.ts +7 -0
- package/dist/internal/routes/repo-layout.js +76 -0
- package/dist/internal/routes/repo-package-layouts.d.ts +20 -0
- package/dist/internal/routes/repo-package-layouts.js +104 -0
- package/dist/internal/routes/root-layout.d.ts +3 -1
- package/dist/internal/routes/root-layout.js +13 -3
- package/dist/internal/routes/single-widget-page.js +5 -12
- package/dist/internal/routes/tile-page.js +20 -41
- package/dist/internal/routes/triggers-page.js +55 -62
- package/dist/internal/routes/widgets-page.js +1 -1
- package/dist/internal/server/api-router.js +46 -4
- package/dist/internal/server/approvals.d.ts +44 -0
- package/dist/internal/server/approvals.js +76 -0
- package/dist/internal/server/contract-sources.d.ts +28 -0
- package/dist/internal/server/contract-sources.js +83 -0
- package/dist/internal/server/definition-loader.d.ts +22 -0
- package/dist/internal/server/definition-loader.js +125 -0
- package/dist/internal/server/ekanos-api-router.d.ts +34 -0
- package/dist/internal/server/ekanos-api-router.js +835 -0
- package/dist/internal/server/experience-loader.d.ts +57 -0
- package/dist/internal/server/experience-loader.js +146 -0
- package/dist/internal/server/integration-lookup.d.ts +29 -0
- package/dist/internal/server/integration-lookup.js +33 -0
- package/dist/internal/server/integration-resolver.d.ts +121 -0
- package/dist/internal/server/integration-resolver.js +605 -0
- package/dist/internal/server/live-invoker.d.ts +11 -0
- package/dist/internal/server/live-invoker.js +106 -0
- package/dist/internal/server/local-secrets.d.ts +82 -1
- package/dist/internal/server/local-secrets.js +112 -1
- package/dist/internal/server/local-state.d.ts +12 -0
- package/dist/internal/server/local-state.js +45 -0
- package/dist/internal/server/oauth-persistence.d.ts +19 -0
- package/dist/internal/server/oauth-persistence.js +76 -0
- package/dist/internal/server/operation-runner.d.ts +95 -0
- package/dist/internal/server/operation-runner.js +231 -0
- package/dist/internal/server/project-manifest.d.ts +71 -0
- package/dist/internal/server/project-manifest.js +215 -0
- package/dist/internal/server/registry-cache.d.ts +68 -0
- package/dist/internal/server/registry-cache.js +328 -0
- package/dist/internal/server/repo-api-router.d.ts +33 -0
- package/dist/internal/server/repo-api-router.js +391 -0
- package/dist/internal/server/run-log.d.ts +22 -0
- package/dist/internal/server/run-log.js +32 -0
- package/dist/internal/server/semantics.d.ts +28 -0
- package/dist/internal/server/semantics.js +67 -0
- package/dist/internal/server/session-catalog.d.ts +67 -0
- package/dist/internal/server/session-catalog.js +18 -0
- package/dist/internal/server/workflow-runner.d.ts +36 -0
- package/dist/internal/server/workflow-runner.js +183 -0
- package/dist/registry.d.ts +7 -0
- package/dist/resolver.d.ts +145 -0
- package/dist/resolver.js +211 -0
- package/dist/routes.d.ts +66 -2
- package/dist/routes.js +61 -3
- package/dist/runtime.d.ts +46 -0
- package/dist/runtime.js +60 -0
- package/package.json +23 -9
- package/dist/internal/routes/integration-index-page.d.ts +0 -13
- package/dist/internal/routes/integration-index-page.js +0 -17
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Card } from "@ekanos/ui/card";
|
|
5
|
+
import { useConsoleLinks } from "../lib/console-context.js";
|
|
6
|
+
import { useExperience } from "../lib/console-hooks.js";
|
|
7
|
+
function ExperienceWorkflowsPage() {
|
|
8
|
+
const experience = useExperience();
|
|
9
|
+
const links = useConsoleLinks();
|
|
10
|
+
if (!experience.data && experience.isPending) {
|
|
11
|
+
return /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: "Loading\u2026" });
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", "data-test": "experience-workflows", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h2", { className: "heading-subhead-lg font-normal", children: "Workflow templates" }),
|
|
15
|
+
(experience.data?.workflows ?? []).length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: "This experience declares no workflow templates." }) : /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-3", children: (experience.data?.workflows ?? []).map((template) => /* @__PURE__ */ jsxs(
|
|
16
|
+
Card,
|
|
17
|
+
{
|
|
18
|
+
layout: "bleed",
|
|
19
|
+
render: /* @__PURE__ */ jsx("li", {}),
|
|
20
|
+
className: "flex flex-col gap-1 p-5",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Link,
|
|
24
|
+
{
|
|
25
|
+
href: `${links.experience}/workflows/${template.id}`,
|
|
26
|
+
className: "text-label hover:underline",
|
|
27
|
+
children: template.title
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
template.description ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-fine", children: template.description }) : null,
|
|
31
|
+
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-fine", children: [
|
|
32
|
+
template.steps.length,
|
|
33
|
+
" step",
|
|
34
|
+
template.steps.length === 1 ? "" : "s"
|
|
35
|
+
] })
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
template.id
|
|
39
|
+
)) })
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
ExperienceWorkflowsPage
|
|
44
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { HarnessIntegration } from '../../registry.js';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
3
|
+
* The shell's `/` page. An integration project lands on the Integration
|
|
4
|
+
* console (`/integrations`), which forwards to its own integration; the old
|
|
5
|
+
* widget gallery stays reachable from the console's "Widgets, tile &
|
|
6
|
+
* activation" tab while integrations still ship widgets.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* module; the provider below it is for the routes that do.
|
|
8
|
+
* Still a server component (a server `redirect`), and it keeps the
|
|
9
|
+
* `integrations` prop so shells generated before the console existed, which
|
|
10
|
+
* pass the registry, keep working.
|
|
10
11
|
*/
|
|
11
|
-
export declare function IndexPage(
|
|
12
|
-
integrations
|
|
13
|
-
}):
|
|
12
|
+
export declare function IndexPage(_props: {
|
|
13
|
+
integrations?: HarnessIntegration[];
|
|
14
|
+
}): never;
|
|
@@ -1,71 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { Icon } from "@ekanos/ui/icon";
|
|
5
|
-
import { HARNESS_SURFACES } from "../surfaces.js";
|
|
6
|
-
function IndexPage({
|
|
7
|
-
integrations
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ jsxs("main", { className: "mx-auto flex w-full max-w-5xl flex-col gap-6 px-6 py-10", children: [
|
|
10
|
-
/* @__PURE__ */ jsxs("header", { className: "flex flex-col gap-2", children: [
|
|
11
|
-
/* @__PURE__ */ jsx("h1", { className: "heading-headline-lg font-normal", children: "Integration harness" }),
|
|
12
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: "Every registered integration, rendered in real Ekanos chrome from fixtures. No Supabase, no auth, no network." })
|
|
13
|
-
] }),
|
|
14
|
-
integrations.length === 0 ? /* @__PURE__ */ jsxs(
|
|
15
|
-
Card,
|
|
16
|
-
{
|
|
17
|
-
layout: "bleed",
|
|
18
|
-
className: "flex flex-col items-center gap-3 p-6 text-center",
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ jsx(
|
|
21
|
-
Icon,
|
|
22
|
-
{
|
|
23
|
-
name: "fa-solid fa-box-open",
|
|
24
|
-
className: "text-muted-foreground h-6 w-6"
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ jsx("p", { className: "text-body-sm", children: "No integrations registered. Add one to your harness config at the project root." })
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
) : /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-5", "data-test": "integration-list", children: integrations.map((integration) => /* @__PURE__ */ jsxs(
|
|
31
|
-
Card,
|
|
32
|
-
{
|
|
33
|
-
layout: "bleed",
|
|
34
|
-
render: /* @__PURE__ */ jsx("li", {}),
|
|
35
|
-
className: "flex flex-col gap-5 p-6",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
38
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-3", children: [
|
|
39
|
-
/* @__PURE__ */ jsx("h2", { className: "heading-subhead-lg font-normal", children: integration.name }),
|
|
40
|
-
/* @__PURE__ */ jsx("code", { className: "text-muted-foreground text-fine", children: integration.slug })
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: integration.description })
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: HARNESS_SURFACES.map((surface) => /* @__PURE__ */ jsx(
|
|
45
|
-
Link,
|
|
46
|
-
{
|
|
47
|
-
href: `/${integration.slug}/${surface.segment}`,
|
|
48
|
-
className: "bg-accent/50 hover:bg-accent text-body-sm rounded-md px-3 py-2 transition-colors",
|
|
49
|
-
children: surface.shortLabel
|
|
50
|
-
},
|
|
51
|
-
surface.segment
|
|
52
|
-
)) }),
|
|
53
|
-
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-fine", children: [
|
|
54
|
-
integration.widgets.length,
|
|
55
|
-
" widget",
|
|
56
|
-
integration.widgets.length === 1 ? "" : "s",
|
|
57
|
-
" \xB7",
|
|
58
|
-
" ",
|
|
59
|
-
integration.tile ? "tile" : "no tile",
|
|
60
|
-
" \xB7",
|
|
61
|
-
" ",
|
|
62
|
-
integration.activationForm ? "activation form" : "no activation form"
|
|
63
|
-
] })
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
integration.slug
|
|
67
|
-
)) })
|
|
68
|
-
] });
|
|
1
|
+
import { redirect } from "next/navigation";
|
|
2
|
+
function IndexPage(_props) {
|
|
3
|
+
redirect("/integrations");
|
|
69
4
|
}
|
|
70
5
|
export {
|
|
71
6
|
IndexPage
|
|
@@ -4,6 +4,17 @@ import { type ReactNode } from 'react';
|
|
|
4
4
|
* cannot cross the server/client boundary as props. Every surface below reads
|
|
5
5
|
* the injected registry out of context instead.
|
|
6
6
|
*/
|
|
7
|
-
export declare function IntegrationLayout({ children }: {
|
|
7
|
+
export declare function IntegrationLayout({ children, withNav, }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Draw the Preview sub-section nav above the surface. */
|
|
10
|
+
withNav?: boolean;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* `/integrations/<slug>/preview/…`: the integration's widgets, marketplace
|
|
14
|
+
* tile, activation form and triggers, inside the console's own chrome. The
|
|
15
|
+
* surfaces keep their own `main` and padding, which the console frame already
|
|
16
|
+
* supplies, so they are flattened here.
|
|
17
|
+
*/
|
|
18
|
+
export declare function PreviewLayout({ children }: {
|
|
8
19
|
children: ReactNode;
|
|
9
20
|
}): import("react").JSX.Element;
|
|
@@ -11,11 +11,14 @@ import {
|
|
|
11
11
|
seedsForMode
|
|
12
12
|
} from "../../registry.js";
|
|
13
13
|
import { HarnessProviders } from "../components/harness-providers.js";
|
|
14
|
-
import {
|
|
14
|
+
import { PreviewNav } from "../components/surface-nav.js";
|
|
15
15
|
import { compileFixtures, needsSelfOrigin } from "../lib/http-fixtures.js";
|
|
16
16
|
import { useToolbar } from "../lib/toolbar-context.js";
|
|
17
17
|
import { useHarnessIntegration } from "../registry-context.js";
|
|
18
|
-
function IntegrationLayout({
|
|
18
|
+
function IntegrationLayout({
|
|
19
|
+
children,
|
|
20
|
+
withNav = false
|
|
21
|
+
}) {
|
|
19
22
|
const { state } = useToolbar();
|
|
20
23
|
const integration = useHarnessIntegration();
|
|
21
24
|
const egressMismatch = useMemo(
|
|
@@ -47,8 +50,8 @@ function IntegrationLayout({ children }) {
|
|
|
47
50
|
);
|
|
48
51
|
}, [integration, state.variant, egress]);
|
|
49
52
|
if (!integration) notFound();
|
|
50
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
53
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-6", children: [
|
|
54
|
+
withNav ? /* @__PURE__ */ jsx(PreviewNav, { integration }) : null,
|
|
52
55
|
egressMismatch ? /* @__PURE__ */ jsx(EgressMismatchNotice, { mismatch: egressMismatch }) : null,
|
|
53
56
|
/* @__PURE__ */ jsx(
|
|
54
57
|
HarnessProviders,
|
|
@@ -66,8 +69,18 @@ function IntegrationLayout({ children }) {
|
|
|
66
69
|
)
|
|
67
70
|
] });
|
|
68
71
|
}
|
|
72
|
+
function PreviewLayout({ children }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(IntegrationLayout, { withNav: true, children: /* @__PURE__ */ jsx(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: "min-w-0 [&_main]:mx-0 [&_main]:max-w-none [&_main]:px-0 [&_main]:py-0",
|
|
77
|
+
"data-test": "preview",
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
81
|
+
}
|
|
69
82
|
function EgressMismatchNotice({ mismatch }) {
|
|
70
|
-
return /* @__PURE__ */ jsx("div", {
|
|
83
|
+
return /* @__PURE__ */ jsx("div", { "data-test": "egress-mismatch", children: /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
71
84
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Live mode is disabled: `live.egress` declares origins your integration does not" }),
|
|
72
85
|
/* @__PURE__ */ jsxs(AlertDescription, { children: [
|
|
73
86
|
/* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -85,5 +98,6 @@ function EgressMismatchNotice({ mismatch }) {
|
|
|
85
98
|
] }) });
|
|
86
99
|
}
|
|
87
100
|
export {
|
|
88
|
-
IntegrationLayout
|
|
101
|
+
IntegrationLayout,
|
|
102
|
+
PreviewLayout
|
|
89
103
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationConnectPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ConnectPanel } from "../components/connect-panel.js";
|
|
4
|
+
import { useOptionalHarnessRegistry } from "../registry-context.js";
|
|
5
|
+
import { IntegrationScope } from "./integrations-scope.js";
|
|
6
|
+
function IntegrationConnectPage() {
|
|
7
|
+
const registry = useOptionalHarnessRegistry();
|
|
8
|
+
return /* @__PURE__ */ jsx(IntegrationScope, { title: "Connect", children: ({ integration, contract }) => /* @__PURE__ */ jsx(
|
|
9
|
+
ConnectPanel,
|
|
10
|
+
{
|
|
11
|
+
integration,
|
|
12
|
+
oauth: contract.connection.auth === "oauth2" && integration.provenance.kind === "local",
|
|
13
|
+
activationForm: registry.find((entry) => entry.slug === integration.integration)?.activationForm
|
|
14
|
+
}
|
|
15
|
+
) });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
IntegrationConnectPage
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationEventsPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { EventsPanel } from "../components/events-panel.js";
|
|
4
|
+
import { IntegrationScope } from "./integrations-scope.js";
|
|
5
|
+
function IntegrationEventsPage() {
|
|
6
|
+
return /* @__PURE__ */ jsx(IntegrationScope, { title: "Events", children: ({ integration, contract }) => /* @__PURE__ */ jsx(EventsPanel, { integration, events: contract.events }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
IntegrationEventsPage
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationHealthPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { HealthPanel } from "../components/health-panel.js";
|
|
4
|
+
import { IntegrationScope } from "./integrations-scope.js";
|
|
5
|
+
function IntegrationHealthPage() {
|
|
6
|
+
return /* @__PURE__ */ jsx(IntegrationScope, { title: "Health", children: ({ integration }) => /* @__PURE__ */ jsx(HealthPanel, { integration }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
IntegrationHealthPage
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ConsoleClient } from '../lib/console-client.js';
|
|
3
|
+
import { type ConsoleLinks, type ExperienceSurfaces } from '../lib/console-context.js';
|
|
4
|
+
/**
|
|
5
|
+
* The layout for both `/integrations/*` and `/experience/*`: it mounts the
|
|
6
|
+
* console client, the provenance banner, the mode-aware nav and the approvals
|
|
7
|
+
* tray. `client` and `experience` are for the shell (and tests) to inject.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ConsoleLayout({ children, client, experience, links, apiBase, }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
client?: ConsoleClient;
|
|
12
|
+
/** The API prefix a repo shell serves this package under. */
|
|
13
|
+
apiBase?: string;
|
|
14
|
+
experience?: ExperienceSurfaces;
|
|
15
|
+
/** A repo shell points the experience tabs at `/experiences/<name>`. */
|
|
16
|
+
links?: ConsoleLinks;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Alert, AlertDescription } from "@ekanos/ui/alert";
|
|
4
|
+
import { cn } from "@ekanos/ui/utils";
|
|
5
|
+
import { ApprovalsTray } from "../components/approvals-tray.js";
|
|
6
|
+
import {
|
|
7
|
+
ProvenanceBanner,
|
|
8
|
+
localIntegrations
|
|
9
|
+
} from "../components/provenance-banner.js";
|
|
10
|
+
import { RuntimeStrip } from "../components/runtime-strip.js";
|
|
11
|
+
import { ConsoleNav } from "../components/surface-nav.js";
|
|
12
|
+
import {
|
|
13
|
+
ConsoleProviders
|
|
14
|
+
} from "../lib/console-context.js";
|
|
15
|
+
import { useApprovals, useProject } from "../lib/console-hooks.js";
|
|
16
|
+
import { useOptionalHarnessRegistry } from "../registry-context.js";
|
|
17
|
+
function ConsoleFrame({ children }) {
|
|
18
|
+
const project = useProject();
|
|
19
|
+
const approvals = useApprovals();
|
|
20
|
+
const registry = useOptionalHarnessRegistry();
|
|
21
|
+
if (project.isError) {
|
|
22
|
+
return /* @__PURE__ */ jsx("main", { className: "mx-auto max-w-3xl px-6 py-10", id: "main-content", children: /* @__PURE__ */ jsx(Alert, { variant: "destructive", "data-test": "project-error", children: /* @__PURE__ */ jsxs(AlertDescription, { children: [
|
|
23
|
+
"Could not reach the harness server: ",
|
|
24
|
+
project.error.message
|
|
25
|
+
] }) }) });
|
|
26
|
+
}
|
|
27
|
+
if (!project.data) {
|
|
28
|
+
return /* @__PURE__ */ jsx("main", { className: "text-muted-foreground text-meta px-6 py-10", children: "Loading project\u2026" });
|
|
29
|
+
}
|
|
30
|
+
const own = project.data.integrations[0];
|
|
31
|
+
const registered = own ? registry.find((integration) => integration.slug === own.integration) : void 0;
|
|
32
|
+
const legacySurfaces = project.data.legacySurfaces ?? (project.data.kind === "integration" && Boolean(
|
|
33
|
+
registered && (registered.widgets.length > 0 || registered.tile || registered.activationForm)
|
|
34
|
+
));
|
|
35
|
+
const unpublishable = localIntegrations(project.data.integrations).length > 0;
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: cn(
|
|
40
|
+
"flex min-h-screen flex-col",
|
|
41
|
+
unpublishable && "border-warning border-t-4"
|
|
42
|
+
),
|
|
43
|
+
"data-test": "console-frame",
|
|
44
|
+
"data-unpublishable": unpublishable,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(ProvenanceBanner, { integrations: project.data.integrations }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
ConsoleNav,
|
|
49
|
+
{
|
|
50
|
+
project: { ...project.data, legacySurfaces },
|
|
51
|
+
pendingApprovals: approvals.data?.length ?? 0
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
"main",
|
|
56
|
+
{
|
|
57
|
+
id: "main-content",
|
|
58
|
+
tabIndex: -1,
|
|
59
|
+
className: "mx-auto flex w-full max-w-5xl min-w-0 flex-col gap-6 px-4 py-8 outline-none sm:px-6",
|
|
60
|
+
children: [
|
|
61
|
+
project.data.errors && project.data.errors.length > 0 ? /* @__PURE__ */ jsx(Alert, { variant: "destructive", "data-test": "integration-errors", children: /* @__PURE__ */ jsx(AlertDescription, { children: /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1", children: project.data.errors.map((error) => /* @__PURE__ */ jsxs("li", { children: [
|
|
62
|
+
"Integration ",
|
|
63
|
+
/* @__PURE__ */ jsx("code", { children: error.integration }),
|
|
64
|
+
" is not served:",
|
|
65
|
+
" ",
|
|
66
|
+
error.message
|
|
67
|
+
] }, error.integration)) }) }) }) : null,
|
|
68
|
+
project.data.notices && project.data.notices.length > 0 ? /* @__PURE__ */ jsx(
|
|
69
|
+
"ul",
|
|
70
|
+
{
|
|
71
|
+
className: "text-muted-foreground text-fine flex flex-col gap-1",
|
|
72
|
+
"data-test": "integration-notices",
|
|
73
|
+
children: project.data.notices.map((notice) => /* @__PURE__ */ jsx("li", { children: notice }, notice))
|
|
74
|
+
}
|
|
75
|
+
) : null,
|
|
76
|
+
project.data.kind === "experience" ? /* @__PURE__ */ jsx(RuntimeStrip, {}) : null,
|
|
77
|
+
/* @__PURE__ */ jsx("div", { id: "approvals", children: /* @__PURE__ */ jsx(ApprovalsTray, {}) }),
|
|
78
|
+
children
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function ConsoleLayout({
|
|
87
|
+
children,
|
|
88
|
+
client,
|
|
89
|
+
experience,
|
|
90
|
+
links,
|
|
91
|
+
apiBase
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
ConsoleProviders,
|
|
95
|
+
{
|
|
96
|
+
...client ? { client } : {},
|
|
97
|
+
...links ? { links } : {},
|
|
98
|
+
...apiBase ? { apiBase } : {},
|
|
99
|
+
...experience ? { experience } : {},
|
|
100
|
+
children: /* @__PURE__ */ jsx(ConsoleFrame, { children })
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
ConsoleLayout
|
|
106
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { redirect } from "next/navigation";
|
|
5
|
+
import { Card } from "@ekanos/ui/card";
|
|
6
|
+
import { ProvenanceBadge, RunModeBadge } from "../components/integration-badge.js";
|
|
7
|
+
import { useProject } from "../lib/console-hooks.js";
|
|
8
|
+
import { previewHref } from "../lib/preview-sections.js";
|
|
9
|
+
import { useOptionalHarnessRegistry } from "../registry-context.js";
|
|
10
|
+
function IntegrationsListPage() {
|
|
11
|
+
const project = useProject();
|
|
12
|
+
const registry = useOptionalHarnessRegistry();
|
|
13
|
+
if (!project.data) {
|
|
14
|
+
return /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-meta", children: "Loading\u2026" });
|
|
15
|
+
}
|
|
16
|
+
const own = project.data.integrations[0];
|
|
17
|
+
if (project.data.kind === "integration" && own) {
|
|
18
|
+
redirect(`/integrations/${own.integration}`);
|
|
19
|
+
}
|
|
20
|
+
const known = new Set(
|
|
21
|
+
project.data.integrations.map((integration) => integration.integration)
|
|
22
|
+
);
|
|
23
|
+
const registered = project.data.kind === "integration" ? registry.filter((integration) => !known.has(integration.slug)) : [];
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", "data-test": "integrations-list", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("h2", { className: "heading-subhead-lg font-normal", children: "Integrations" }),
|
|
26
|
+
registered.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-3", "data-test": "registered-integrations", children: registered.map((integration) => /* @__PURE__ */ jsxs(
|
|
27
|
+
Card,
|
|
28
|
+
{
|
|
29
|
+
layout: "bleed",
|
|
30
|
+
render: /* @__PURE__ */ jsx("li", {}),
|
|
31
|
+
className: "flex flex-col gap-1 p-5",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Link,
|
|
35
|
+
{
|
|
36
|
+
href: previewHref(integration.slug),
|
|
37
|
+
className: "text-label hover:underline",
|
|
38
|
+
children: integration.name
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx("code", { className: "text-muted-foreground text-fine", children: integration.slug }),
|
|
42
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-fine", children: integration.description })
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
integration.slug
|
|
46
|
+
)) }) : null,
|
|
47
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-3", children: project.data.integrations.map((integration) => /* @__PURE__ */ jsxs(
|
|
48
|
+
Card,
|
|
49
|
+
{
|
|
50
|
+
layout: "bleed",
|
|
51
|
+
render: /* @__PURE__ */ jsx("li", {}),
|
|
52
|
+
className: "flex flex-col gap-2 p-5",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
Link,
|
|
57
|
+
{
|
|
58
|
+
href: `/integrations/${integration.integration}`,
|
|
59
|
+
className: "text-label hover:underline",
|
|
60
|
+
children: integration.integration
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ jsxs("code", { className: "text-muted-foreground text-fine", children: [
|
|
64
|
+
integration.integration,
|
|
65
|
+
"@",
|
|
66
|
+
integration.version
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
ProvenanceBadge,
|
|
70
|
+
{
|
|
71
|
+
provenance: integration.provenance,
|
|
72
|
+
own: integration.own === true
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
integration.runModes.map((mode) => /* @__PURE__ */ jsx(RunModeBadge, { mode }, mode))
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-fine", children: [
|
|
78
|
+
"integration ",
|
|
79
|
+
/* @__PURE__ */ jsx("code", { children: integration.integration }),
|
|
80
|
+
" \xB7",
|
|
81
|
+
" ",
|
|
82
|
+
integration.operations.length,
|
|
83
|
+
" operation",
|
|
84
|
+
integration.operations.length === 1 ? "" : "s"
|
|
85
|
+
] })
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
integration.integration
|
|
89
|
+
)) })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
IntegrationsListPage
|
|
94
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationOperationPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { notFound, useParams } from "next/navigation";
|
|
4
|
+
import {
|
|
5
|
+
OperationRunnerPanel,
|
|
6
|
+
operationKey
|
|
7
|
+
} from "../components/operation-runner-panel.js";
|
|
8
|
+
import { IntegrationScope } from "./integrations-scope.js";
|
|
9
|
+
function IntegrationOperationPage() {
|
|
10
|
+
const { kind, name } = useParams();
|
|
11
|
+
return /* @__PURE__ */ jsx(IntegrationScope, { title: "Run an operation", children: ({ integration, contract }) => {
|
|
12
|
+
const operation = contract.operations.find(
|
|
13
|
+
(entry) => entry.kind === kind && entry.name === name
|
|
14
|
+
);
|
|
15
|
+
if (!operation) notFound();
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
OperationRunnerPanel,
|
|
18
|
+
{
|
|
19
|
+
integration,
|
|
20
|
+
operation,
|
|
21
|
+
usedBy: contract.usedBy[operationKey(operation)] ?? []
|
|
22
|
+
},
|
|
23
|
+
operation.id
|
|
24
|
+
);
|
|
25
|
+
} });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
IntegrationOperationPage
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationOperationsPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Badge } from "@ekanos/ui/badge";
|
|
5
|
+
import { StatusBadge } from "@ekanos/ui/status-badge";
|
|
6
|
+
import {
|
|
7
|
+
Table,
|
|
8
|
+
TableBody,
|
|
9
|
+
TableCell,
|
|
10
|
+
TableHead,
|
|
11
|
+
TableHeader,
|
|
12
|
+
TableRow
|
|
13
|
+
} from "@ekanos/ui/table";
|
|
14
|
+
import { operationKey } from "../components/operation-runner-panel.js";
|
|
15
|
+
import { IntegrationScope } from "./integrations-scope.js";
|
|
16
|
+
function IntegrationOperationsPage() {
|
|
17
|
+
return /* @__PURE__ */ jsx(IntegrationScope, { title: "Operations", children: ({ integration, contract }) => /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", "data-test": "operations-table", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Operation" }),
|
|
20
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Sensitivity" }),
|
|
21
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Since" }),
|
|
22
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Used by" })
|
|
23
|
+
] }) }),
|
|
24
|
+
/* @__PURE__ */ jsx(TableBody, { children: contract.operations.map((operation) => {
|
|
25
|
+
const key = operationKey(operation);
|
|
26
|
+
const usedBy = contract.usedBy[key] ?? [];
|
|
27
|
+
const allowed = integration.operations.includes(key);
|
|
28
|
+
return /* @__PURE__ */ jsxs(TableRow, { "data-test": "operation-row", children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(TableCell, { className: "min-w-56 whitespace-normal", children: [
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Link,
|
|
33
|
+
{
|
|
34
|
+
href: `/integrations/${integration.integration}/operations/${operation.kind}/${operation.name}`,
|
|
35
|
+
className: "break-all hover:underline",
|
|
36
|
+
children: /* @__PURE__ */ jsx("code", { className: "text-label", children: key })
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
StatusBadge,
|
|
41
|
+
{
|
|
42
|
+
tone: operation.effect === "write" ? "warning" : "info",
|
|
43
|
+
"data-test": "operation-effect",
|
|
44
|
+
children: operation.effect === "write" ? "Write" : "Read"
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-fine block break-words whitespace-normal", children: operation.description }),
|
|
49
|
+
operation.opaque.input || operation.opaque.output ? /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "mt-1", children: "opaque" }) : null,
|
|
50
|
+
allowed ? null : /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "mt-1 ml-1", children: "not in this experience's uses" })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-fine", children: operation.sensitivity }),
|
|
53
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-fine", children: operation.since ?? "n/a" }),
|
|
54
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-fine", children: usedBy.length === 0 ? "n/a" : usedBy.map((use) => use.title).join(", ") })
|
|
55
|
+
] }, operation.id);
|
|
56
|
+
}) })
|
|
57
|
+
] }) }) });
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
IntegrationOperationsPage
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IntegrationOverviewPage(): import("react").JSX.Element;
|