@fusionkit/cli 0.1.3 → 0.1.4

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 (34) hide show
  1. package/dist/commands/fusion.js +17 -2
  2. package/dist/commands/plane.js +10 -2
  3. package/dist/fusion-config.d.ts +1 -0
  4. package/dist/fusion-config.js +5 -0
  5. package/dist/fusion-quickstart.d.ts +33 -34
  6. package/dist/fusion-quickstart.js +324 -278
  7. package/dist/shared/portless.d.ts +97 -0
  8. package/dist/shared/portless.js +253 -0
  9. package/dist/test/portless.test.d.ts +1 -0
  10. package/dist/test/portless.test.js +65 -0
  11. package/package.json +12 -9
  12. package/scope/.next/BUILD_ID +1 -1
  13. package/scope/.next/app-build-manifest.json +8 -8
  14. package/scope/.next/app-path-routes-manifest.json +3 -3
  15. package/scope/.next/build-manifest.json +2 -2
  16. package/scope/.next/prerender-manifest.json +9 -9
  17. package/scope/.next/required-server-files.json +4 -0
  18. package/scope/.next/server/app/_not-found.html +1 -1
  19. package/scope/.next/server/app/_not-found.rsc +1 -1
  20. package/scope/.next/server/app/environments.html +1 -1
  21. package/scope/.next/server/app/environments.rsc +1 -1
  22. package/scope/.next/server/app/index.html +1 -1
  23. package/scope/.next/server/app/index.rsc +1 -1
  24. package/scope/.next/server/app/models.html +1 -1
  25. package/scope/.next/server/app/models.rsc +1 -1
  26. package/scope/.next/server/app-paths-manifest.json +3 -3
  27. package/scope/.next/server/functions-config-manifest.json +3 -3
  28. package/scope/.next/server/pages/404.html +1 -1
  29. package/scope/.next/server/pages/500.html +1 -1
  30. package/scope/.next/server/server-reference-manifest.json +1 -1
  31. package/scope/package.json +3 -1
  32. package/scope/server.js +1 -1
  33. /package/scope/.next/static/{8b1kwXDxrKvteRVkOC_Z2 → 5tnFLuvnSbNZNtqRgoot8}/_buildManifest.js +0 -0
  34. /package/scope/.next/static/{8b1kwXDxrKvteRVkOC_Z2 → 5tnFLuvnSbNZNtqRgoot8}/_ssgManifest.js +0 -0
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Programmatic portless integration for the fusion stack.
3
+ *
4
+ * Every dev server and CLI-spawned service the launcher starts is registered
5
+ * with portless as a stable, named `.localhost` route, so humans and external
6
+ * coding agents get clean HTTPS URLs instead of raw ports, and a service can be
7
+ * discovered + reused across runs (a singleton) via the shared route table.
8
+ *
9
+ * Routes are managed entirely against the `portless` *library* (its exported
10
+ * `RouteStore` writes the same file-locked `routes.json` the running proxy reads
11
+ * live) — we never shell out to the `portless` binary. The privileged TLS proxy
12
+ * daemon + CA trust are a one-time user setup (`portless service install` +
13
+ * `portless trust`); here we only detect that it is running and register routes.
14
+ *
15
+ * `portless` requires Node >= 24 and is declared an optional dependency, so on
16
+ * older Node (or when the package/proxy is absent) the session degrades to
17
+ * plain loopback URLs with no discovery — identical code paths, just unproxied.
18
+ */
19
+ /** Resolve the portless state directory (honoring `PORTLESS_STATE_DIR`). */
20
+ export declare function stateDir(): string;
21
+ /** Path to the portless CA, for `NODE_EXTRA_CA_CERTS` / `SSL_CERT_FILE`. */
22
+ export declare function caCertPath(): string;
23
+ /** The TLD portless serves routes under (default `.localhost`). */
24
+ export declare function tld(): string;
25
+ /** A running portless proxy, as detected from on-disk state + a live probe. */
26
+ export type DetectedProxy = {
27
+ port: number;
28
+ tls: boolean;
29
+ };
30
+ /**
31
+ * Detect a running portless proxy: read `<stateDir>/proxy.port`, confirm the
32
+ * owning pid is alive, and probe the port for the `X-Portless` header (a plain
33
+ * HTTP probe works even against a TLS proxy, which 302-redirects to https and
34
+ * still stamps the header). Returns `undefined` when no proxy is reachable.
35
+ */
36
+ export declare function detectProxy(): Promise<DetectedProxy | undefined>;
37
+ /** A service the launcher started, addressable through portless. */
38
+ export type SpawnedService = {
39
+ port: number;
40
+ /** Owning pid for the route (defaults to this process). */
41
+ pid?: number;
42
+ close: () => Promise<void> | void;
43
+ };
44
+ export type DiscoverOrSpawnInput = {
45
+ /** Short service name; the `.fusion` project suffix + TLD are added here. */
46
+ name: string;
47
+ /** Expected identity token of a reusable instance (model set, config hash, ...). */
48
+ identity: string;
49
+ /** Probe a candidate instance on its loopback URL; return its identity token. */
50
+ healthCheck: (loopbackUrl: string) => Promise<string | undefined>;
51
+ /** Start a fresh instance when none can be reused. */
52
+ spawn: () => Promise<SpawnedService>;
53
+ };
54
+ export type DiscoverOrSpawnResult = {
55
+ /** The URL callers should surface/inject (portless name, or loopback). */
56
+ url: string;
57
+ /** The loopback URL for in-process CLI fetches (avoids the CA-at-startup hazard). */
58
+ loopbackUrl: string;
59
+ port: number;
60
+ /** True when this run spawned the instance (and therefore owns teardown). */
61
+ owned: boolean;
62
+ /** Tear down only an owned instance; reused instances are left running. */
63
+ close: () => Promise<void> | void;
64
+ };
65
+ /**
66
+ * A live portless session threaded through the launcher. When `enabled` is
67
+ * false (portless off, package absent, or no proxy detected) every method
68
+ * degrades to plain loopback behavior with no proxy registration or discovery.
69
+ */
70
+ export type PortlessSession = {
71
+ enabled: boolean;
72
+ /** Portless CA path when active, else undefined. */
73
+ caCertPath: string | undefined;
74
+ /** Register `127.0.0.1:<port>` under `<name>.<project>.localhost`; returns the URL. */
75
+ register(name: string, appPort: number): string;
76
+ /** Remove a route this process owns. */
77
+ unregister(name: string): void;
78
+ /** Reuse a compatible running instance, or spawn + register a new one. */
79
+ discoverOrSpawn(input: DiscoverOrSpawnInput): Promise<DiscoverOrSpawnResult>;
80
+ };
81
+ export type CreateSessionInput = {
82
+ /** Whether portless is requested (CLI flag / config / PORTLESS env). */
83
+ enabled: boolean;
84
+ log?: (line: string) => void;
85
+ };
86
+ /**
87
+ * Create a portless session. Returns a disabled (loopback) session when
88
+ * portless is off, the library is unavailable (Node < 24 / not installed), or
89
+ * no proxy is running; otherwise an active session backed by `RouteStore`.
90
+ */
91
+ export declare function createPortlessSession(input: CreateSessionInput): Promise<PortlessSession>;
92
+ /**
93
+ * Reap fusion singleton services: terminate the owning pid of every registered
94
+ * `*.fusion.<tld>` / `scope.<tld>` route and drop the route. Returns the number
95
+ * of services stopped. A no-op when portless is unavailable.
96
+ */
97
+ export declare function reapFusionServices(log?: (line: string) => void): Promise<number>;
@@ -0,0 +1,253 @@
1
+ /**
2
+ * Programmatic portless integration for the fusion stack.
3
+ *
4
+ * Every dev server and CLI-spawned service the launcher starts is registered
5
+ * with portless as a stable, named `.localhost` route, so humans and external
6
+ * coding agents get clean HTTPS URLs instead of raw ports, and a service can be
7
+ * discovered + reused across runs (a singleton) via the shared route table.
8
+ *
9
+ * Routes are managed entirely against the `portless` *library* (its exported
10
+ * `RouteStore` writes the same file-locked `routes.json` the running proxy reads
11
+ * live) — we never shell out to the `portless` binary. The privileged TLS proxy
12
+ * daemon + CA trust are a one-time user setup (`portless service install` +
13
+ * `portless trust`); here we only detect that it is running and register routes.
14
+ *
15
+ * `portless` requires Node >= 24 and is declared an optional dependency, so on
16
+ * older Node (or when the package/proxy is absent) the session degrades to
17
+ * plain loopback URLs with no discovery — identical code paths, just unproxied.
18
+ */
19
+ import { existsSync, readFileSync } from "node:fs";
20
+ import { homedir } from "node:os";
21
+ import { join } from "node:path";
22
+ /** The npm scope-less project prefix for fusion service hostnames. */
23
+ const PROJECT = "fusion";
24
+ /** Resolve the portless state directory (honoring `PORTLESS_STATE_DIR`). */
25
+ export function stateDir() {
26
+ return process.env.PORTLESS_STATE_DIR ?? join(homedir(), ".portless");
27
+ }
28
+ /** Path to the portless CA, for `NODE_EXTRA_CA_CERTS` / `SSL_CERT_FILE`. */
29
+ export function caCertPath() {
30
+ return join(stateDir(), "ca.pem");
31
+ }
32
+ /** The TLD portless serves routes under (default `.localhost`). */
33
+ export function tld() {
34
+ return process.env.PORTLESS_TLD ?? "localhost";
35
+ }
36
+ /**
37
+ * Detect a running portless proxy: read `<stateDir>/proxy.port`, confirm the
38
+ * owning pid is alive, and probe the port for the `X-Portless` header (a plain
39
+ * HTTP probe works even against a TLS proxy, which 302-redirects to https and
40
+ * still stamps the header). Returns `undefined` when no proxy is reachable.
41
+ */
42
+ export async function detectProxy() {
43
+ const dir = stateDir();
44
+ const portFile = join(dir, "proxy.port");
45
+ if (!existsSync(portFile))
46
+ return undefined;
47
+ const port = Number.parseInt(readFileSync(portFile, "utf8").trim(), 10);
48
+ if (!Number.isInteger(port) || port <= 0)
49
+ return undefined;
50
+ const pidFile = join(dir, "proxy.pid");
51
+ if (existsSync(pidFile)) {
52
+ const pid = Number.parseInt(readFileSync(pidFile, "utf8").trim(), 10);
53
+ if (Number.isInteger(pid) && pid > 0 && !isAlive(pid))
54
+ return undefined;
55
+ }
56
+ // Prefer the proxy's recorded TLS mode; fall back to inferring it from the
57
+ // redirect a plain-HTTP probe gets (a TLS proxy 302s to https).
58
+ const tlsFile = join(dir, "proxy.tls");
59
+ const tlsFromFile = existsSync(tlsFile)
60
+ ? ["1", "true"].includes(readFileSync(tlsFile, "utf8").trim().toLowerCase())
61
+ : undefined;
62
+ try {
63
+ const response = await fetch(`http://127.0.0.1:${port}/`, {
64
+ redirect: "manual",
65
+ signal: AbortSignal.timeout(1500)
66
+ });
67
+ if (response.headers.get("x-portless") === null)
68
+ return undefined;
69
+ const location = response.headers.get("location");
70
+ const tls = tlsFromFile ?? (port === 443 || (location !== null && location.startsWith("https://")));
71
+ return { port, tls };
72
+ }
73
+ catch {
74
+ return undefined;
75
+ }
76
+ }
77
+ function isAlive(pid) {
78
+ try {
79
+ process.kill(pid, 0);
80
+ return true;
81
+ }
82
+ catch (error) {
83
+ // EPERM means the process exists but is owned by another user (e.g. the
84
+ // portless proxy installed as a root LaunchDaemon) — still alive. Only
85
+ // ESRCH ("no such process") means it is actually gone.
86
+ return error?.code === "EPERM";
87
+ }
88
+ }
89
+ async function loadPortless() {
90
+ // Variable specifier + dynamic import: `portless` is an optional dependency
91
+ // (Node >= 24 only), so this must not be a static import — it would break the
92
+ // build/install on Node 22. Documented exception to the no-inline-imports rule.
93
+ const specifier = "portless";
94
+ try {
95
+ return (await import(specifier));
96
+ }
97
+ catch {
98
+ return undefined;
99
+ }
100
+ }
101
+ /** Names that stay bare (`<name>.localhost`) instead of being namespaced under the project. */
102
+ const BARE_NAMES = new Set(["scope"]);
103
+ /** Map a short service name to its portless hostname. */
104
+ function hostnameFor(portless, name) {
105
+ // `scope` stays bare (`scope.localhost`); everything else is namespaced under
106
+ // the project (`gateway.fusion.localhost`). A name already containing a dot or
107
+ // equal to the project is treated as an explicit subdomain path.
108
+ const full = name === PROJECT || name.includes(".") || BARE_NAMES.has(name) ? name : `${name}.${PROJECT}`;
109
+ return portless.parseHostname(full, tld());
110
+ }
111
+ const loopback = (port) => `http://127.0.0.1:${port}`;
112
+ /** Build a disabled session: pure loopback, no proxy, no discovery. */
113
+ function disabledSession() {
114
+ return {
115
+ enabled: false,
116
+ caCertPath: undefined,
117
+ register: (_name, appPort) => loopback(appPort),
118
+ unregister: () => { },
119
+ discoverOrSpawn: async (input) => {
120
+ const service = await input.spawn();
121
+ const url = loopback(service.port);
122
+ return { url, loopbackUrl: url, port: service.port, owned: true, close: service.close };
123
+ }
124
+ };
125
+ }
126
+ /**
127
+ * Create a portless session. Returns a disabled (loopback) session when
128
+ * portless is off, the library is unavailable (Node < 24 / not installed), or
129
+ * no proxy is running; otherwise an active session backed by `RouteStore`.
130
+ */
131
+ export async function createPortlessSession(input) {
132
+ if (!input.enabled)
133
+ return disabledSession();
134
+ const portless = await loadPortless();
135
+ if (portless === undefined) {
136
+ input.log?.("fusion: portless not installed (needs Node >= 24); using loopback URLs");
137
+ return disabledSession();
138
+ }
139
+ const proxy = await detectProxy();
140
+ if (proxy === undefined) {
141
+ // Portless is installed but its proxy isn't running: degrade to loopback
142
+ // (never block a run) and point the user at the one-time setup for stable
143
+ // HTTPS names.
144
+ input.log?.("fusion: portless proxy not running; using loopback URLs " +
145
+ "(run `portless service install` + `portless trust` for stable https://*.localhost names)");
146
+ return disabledSession();
147
+ }
148
+ const store = new portless.RouteStore(stateDir(), {
149
+ onWarning: (message) => input.log?.(`fusion: portless: ${message}`)
150
+ });
151
+ const urlFor = (hostname) => portless.formatUrl(hostname, proxy.port, proxy.tls);
152
+ const register = (name, appPort) => {
153
+ try {
154
+ const hostname = hostnameFor(portless, name);
155
+ store.addRoute(hostname, appPort, process.pid, true);
156
+ return urlFor(hostname);
157
+ }
158
+ catch (error) {
159
+ // Never let a routing hiccup break a run; fall back to the raw port.
160
+ input.log?.(`fusion: portless register(${name}) failed: ${errorText(error)}`);
161
+ return loopback(appPort);
162
+ }
163
+ };
164
+ const unregister = (name) => {
165
+ try {
166
+ store.removeRoute(hostnameFor(portless, name), process.pid);
167
+ }
168
+ catch {
169
+ // best-effort
170
+ }
171
+ };
172
+ const discoverOrSpawn = async (req) => {
173
+ const hostname = hostnameFor(portless, req.name);
174
+ // Discover: is a compatible instance already registered and alive?
175
+ try {
176
+ const existing = store.loadRoutes().find((route) => route.hostname === hostname);
177
+ if (existing !== undefined) {
178
+ const candidate = loopback(existing.port);
179
+ const identity = await req.healthCheck(candidate);
180
+ if (identity === req.identity) {
181
+ return {
182
+ url: urlFor(hostname),
183
+ loopbackUrl: candidate,
184
+ port: existing.port,
185
+ owned: false,
186
+ close: () => { }
187
+ };
188
+ }
189
+ }
190
+ }
191
+ catch (error) {
192
+ input.log?.(`fusion: portless discover(${req.name}) failed: ${errorText(error)}`);
193
+ }
194
+ // Spawn + register a fresh instance, owned by the service pid so the proxy's
195
+ // liveness filter keeps the route across runs and only drops it when the
196
+ // service itself exits.
197
+ const service = await req.spawn();
198
+ let url = loopback(service.port);
199
+ try {
200
+ store.addRoute(hostname, service.port, service.pid ?? process.pid, true);
201
+ url = urlFor(hostname);
202
+ }
203
+ catch (error) {
204
+ input.log?.(`fusion: portless register(${req.name}) failed: ${errorText(error)}`);
205
+ }
206
+ return {
207
+ url,
208
+ loopbackUrl: loopback(service.port),
209
+ port: service.port,
210
+ owned: true,
211
+ close: service.close
212
+ };
213
+ };
214
+ return { enabled: true, caCertPath: caCertPath(), register, unregister, discoverOrSpawn };
215
+ }
216
+ function errorText(error) {
217
+ return error instanceof Error ? error.message : String(error);
218
+ }
219
+ /**
220
+ * Reap fusion singleton services: terminate the owning pid of every registered
221
+ * `*.fusion.<tld>` / `scope.<tld>` route and drop the route. Returns the number
222
+ * of services stopped. A no-op when portless is unavailable.
223
+ */
224
+ export async function reapFusionServices(log) {
225
+ const portless = await loadPortless();
226
+ if (portless === undefined)
227
+ return 0;
228
+ const store = new portless.RouteStore(stateDir(), {
229
+ onWarning: (message) => log?.(`fusion: portless: ${message}`)
230
+ });
231
+ const suffix = `.${PROJECT}.${tld()}`;
232
+ const scopeHost = portless.parseHostname("scope", tld());
233
+ let stopped = 0;
234
+ for (const route of store.loadRoutes()) {
235
+ if (!route.hostname.endsWith(suffix) && route.hostname !== scopeHost)
236
+ continue;
237
+ try {
238
+ process.kill(route.pid, "SIGTERM");
239
+ stopped += 1;
240
+ log?.(`fusion: stopped ${route.hostname} (pid ${route.pid})`);
241
+ }
242
+ catch {
243
+ // process already gone; still drop the stale route below
244
+ }
245
+ try {
246
+ store.removeRoute(route.hostname);
247
+ }
248
+ catch {
249
+ // best-effort
250
+ }
251
+ }
252
+ return stopped;
253
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
1
+ import assert from "node:assert/strict";
2
+ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+ import { after, test } from "node:test";
6
+ import { caCertPath, createPortlessSession, detectProxy, stateDir } from "../shared/portless.js";
7
+ const tmpRoots = [];
8
+ function freshStateDir() {
9
+ const dir = mkdtempSync(join(tmpdir(), "portless-state-"));
10
+ tmpRoots.push(dir);
11
+ process.env.PORTLESS_STATE_DIR = dir;
12
+ return dir;
13
+ }
14
+ after(() => {
15
+ delete process.env.PORTLESS_STATE_DIR;
16
+ for (const dir of tmpRoots)
17
+ rmSync(dir, { recursive: true, force: true });
18
+ });
19
+ test("stateDir + caCertPath honor PORTLESS_STATE_DIR", () => {
20
+ const dir = freshStateDir();
21
+ assert.equal(stateDir(), dir);
22
+ assert.equal(caCertPath(), join(dir, "ca.pem"));
23
+ });
24
+ test("detectProxy returns undefined when no proxy.port file exists", async () => {
25
+ freshStateDir();
26
+ assert.equal(await detectProxy(), undefined);
27
+ });
28
+ test("detectProxy returns undefined for a dead proxy pid", async () => {
29
+ const dir = freshStateDir();
30
+ writeFileSync(join(dir, "proxy.port"), "443");
31
+ // pid 1 is alive but won't answer a portless probe; a clearly-dead pid keeps
32
+ // this deterministic without binding a port.
33
+ writeFileSync(join(dir, "proxy.pid"), "999999999");
34
+ assert.equal(await detectProxy(), undefined);
35
+ });
36
+ test("a disabled session uses loopback URLs and never registers", async () => {
37
+ const session = await createPortlessSession({ enabled: false });
38
+ assert.equal(session.enabled, false);
39
+ assert.equal(session.caCertPath, undefined);
40
+ assert.equal(session.register("scope", 4317), "http://127.0.0.1:4317");
41
+ assert.equal(session.register("gateway", 5123), "http://127.0.0.1:5123");
42
+ session.unregister("scope"); // no throw
43
+ let spawned = 0;
44
+ const result = await session.discoverOrSpawn({
45
+ name: "router",
46
+ identity: "gpt,sonnet",
47
+ healthCheck: async () => "gpt,sonnet",
48
+ spawn: async () => {
49
+ spawned += 1;
50
+ return { port: 6001, close: () => { } };
51
+ }
52
+ });
53
+ assert.equal(spawned, 1, "a disabled session always spawns (no discovery)");
54
+ assert.equal(result.owned, true);
55
+ assert.equal(result.url, "http://127.0.0.1:6001");
56
+ assert.equal(result.loopbackUrl, "http://127.0.0.1:6001");
57
+ });
58
+ test("enabled session with no reachable proxy degrades to loopback", async () => {
59
+ freshStateDir(); // empty: no proxy.port
60
+ const session = await createPortlessSession({ enabled: true });
61
+ // Whether or not portless is installed, an unreachable proxy degrades to
62
+ // loopback (never a hard failure) so a fresh install always runs.
63
+ assert.equal(session.enabled, false, "no proxy detected -> disabled");
64
+ assert.equal(session.register("scope", 4317), "http://127.0.0.1:4317");
65
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusionkit/cli",
3
3
  "private": false,
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/velum-labs/handoffkit.git",
@@ -34,14 +34,17 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "commander": "14.0.3",
37
- "@fusionkit/handoff": "0.1.3",
38
- "@fusionkit/model-gateway": "0.1.3",
39
- "@fusionkit/plane": "0.1.3",
40
- "@fusionkit/ensemble": "0.1.3",
41
- "@fusionkit/protocol": "0.1.3",
42
- "@fusionkit/runner": "0.1.3",
43
- "@fusionkit/workspace": "0.1.3",
44
- "@fusionkit/sdk": "0.1.3"
37
+ "@fusionkit/ensemble": "0.1.4",
38
+ "@fusionkit/handoff": "0.1.4",
39
+ "@fusionkit/model-gateway": "0.1.4",
40
+ "@fusionkit/plane": "0.1.4",
41
+ "@fusionkit/protocol": "0.1.4",
42
+ "@fusionkit/runner": "0.1.4",
43
+ "@fusionkit/workspace": "0.1.4",
44
+ "@fusionkit/sdk": "0.1.4"
45
+ },
46
+ "optionalDependencies": {
47
+ "portless": "0.14.0"
45
48
  },
46
49
  "devDependencies": {
47
50
  "@fusionkit/testkit": "0.1.0"
@@ -1 +1 @@
1
- 8b1kwXDxrKvteRVkOC_Z2
1
+ 5tnFLuvnSbNZNtqRgoot8
@@ -24,12 +24,12 @@
24
24
  "static/chunks/main-app-2a6b1f94de31f96f.js",
25
25
  "static/chunks/app/api/environments/route-95e822afbebe548b.js"
26
26
  ],
27
- "/api/replay/route": [
27
+ "/api/models/route": [
28
28
  "static/chunks/webpack-4501ec292abda191.js",
29
29
  "static/chunks/4bd1b696-409494caf8c83275.js",
30
30
  "static/chunks/255-69a4a78fac9becef.js",
31
31
  "static/chunks/main-app-2a6b1f94de31f96f.js",
32
- "static/chunks/app/api/replay/route-95e822afbebe548b.js"
32
+ "static/chunks/app/api/models/route-95e822afbebe548b.js"
33
33
  ],
34
34
  "/api/ingest/route": [
35
35
  "static/chunks/webpack-4501ec292abda191.js",
@@ -38,26 +38,26 @@
38
38
  "static/chunks/main-app-2a6b1f94de31f96f.js",
39
39
  "static/chunks/app/api/ingest/route-95e822afbebe548b.js"
40
40
  ],
41
- "/api/models/route": [
41
+ "/api/replay/route": [
42
42
  "static/chunks/webpack-4501ec292abda191.js",
43
43
  "static/chunks/4bd1b696-409494caf8c83275.js",
44
44
  "static/chunks/255-69a4a78fac9becef.js",
45
45
  "static/chunks/main-app-2a6b1f94de31f96f.js",
46
- "static/chunks/app/api/models/route-95e822afbebe548b.js"
46
+ "static/chunks/app/api/replay/route-95e822afbebe548b.js"
47
47
  ],
48
- "/api/sessions/[traceId]/route": [
48
+ "/api/sessions/route": [
49
49
  "static/chunks/webpack-4501ec292abda191.js",
50
50
  "static/chunks/4bd1b696-409494caf8c83275.js",
51
51
  "static/chunks/255-69a4a78fac9becef.js",
52
52
  "static/chunks/main-app-2a6b1f94de31f96f.js",
53
- "static/chunks/app/api/sessions/[traceId]/route-95e822afbebe548b.js"
53
+ "static/chunks/app/api/sessions/route-95e822afbebe548b.js"
54
54
  ],
55
- "/api/sessions/route": [
55
+ "/api/sessions/[traceId]/route": [
56
56
  "static/chunks/webpack-4501ec292abda191.js",
57
57
  "static/chunks/4bd1b696-409494caf8c83275.js",
58
58
  "static/chunks/255-69a4a78fac9becef.js",
59
59
  "static/chunks/main-app-2a6b1f94de31f96f.js",
60
- "static/chunks/app/api/sessions/route-95e822afbebe548b.js"
60
+ "static/chunks/app/api/sessions/[traceId]/route-95e822afbebe548b.js"
61
61
  ],
62
62
  "/api/stream/route": [
63
63
  "static/chunks/webpack-4501ec292abda191.js",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "/_not-found/page": "/_not-found",
3
3
  "/api/environments/route": "/api/environments",
4
- "/api/replay/route": "/api/replay",
5
- "/api/ingest/route": "/api/ingest",
6
4
  "/api/models/route": "/api/models",
7
- "/api/sessions/[traceId]/route": "/api/sessions/[traceId]",
5
+ "/api/ingest/route": "/api/ingest",
6
+ "/api/replay/route": "/api/replay",
8
7
  "/api/sessions/route": "/api/sessions",
8
+ "/api/sessions/[traceId]/route": "/api/sessions/[traceId]",
9
9
  "/api/stream/route": "/api/stream",
10
10
  "/environments/page": "/environments",
11
11
  "/models/page": "/models",
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/8b1kwXDxrKvteRVkOC_Z2/_buildManifest.js",
9
- "static/8b1kwXDxrKvteRVkOC_Z2/_ssgManifest.js"
8
+ "static/5tnFLuvnSbNZNtqRgoot8/_buildManifest.js",
9
+ "static/5tnFLuvnSbNZNtqRgoot8/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [
12
12
  "static/chunks/webpack-4501ec292abda191.js",
@@ -25,7 +25,7 @@
25
25
  "x-next-revalidate-tag-token"
26
26
  ]
27
27
  },
28
- "/models": {
28
+ "/": {
29
29
  "experimentalBypassFor": [
30
30
  {
31
31
  "type": "header",
@@ -38,8 +38,8 @@
38
38
  }
39
39
  ],
40
40
  "initialRevalidateSeconds": false,
41
- "srcRoute": "/models",
42
- "dataRoute": "/models.rsc",
41
+ "srcRoute": "/",
42
+ "dataRoute": "/index.rsc",
43
43
  "allowHeader": [
44
44
  "host",
45
45
  "x-matched-path",
@@ -74,7 +74,7 @@
74
74
  "x-next-revalidate-tag-token"
75
75
  ]
76
76
  },
77
- "/": {
77
+ "/models": {
78
78
  "experimentalBypassFor": [
79
79
  {
80
80
  "type": "header",
@@ -87,8 +87,8 @@
87
87
  }
88
88
  ],
89
89
  "initialRevalidateSeconds": false,
90
- "srcRoute": "/",
91
- "dataRoute": "/index.rsc",
90
+ "srcRoute": "/models",
91
+ "dataRoute": "/models.rsc",
92
92
  "allowHeader": [
93
93
  "host",
94
94
  "x-matched-path",
@@ -102,8 +102,8 @@
102
102
  "dynamicRoutes": {},
103
103
  "notFoundRoutes": [],
104
104
  "preview": {
105
- "previewModeId": "4429f6fec1a743ae2a5bbc70707bd2cb",
106
- "previewModeSigningKey": "1777fb6085a20c5ed66bed173ea1028b3120ef33794dbb7f44422962674e82b0",
107
- "previewModeEncryptionKey": "7244087c88dcfbd6d115748aa972db9cd69f537df6f5fa050b9143575f948d67"
105
+ "previewModeId": "effae3e9acd85706afc099ae8638302b",
106
+ "previewModeSigningKey": "c391010c73d6e7db27b3e132573063849eef3972f19ce0282cdbf15ddf64efdd",
107
+ "previewModeEncryptionKey": "66d3bfe283a3f90c8c2031d2f3ecf302014e63a3a211c0cdaceaedbbecd3c9db"
108
108
  }
109
109
  }
@@ -101,6 +101,10 @@
101
101
  }
102
102
  },
103
103
  "outputFileTracingRoot": "/home/runner/work/handoffkit/handoffkit/apps/scope",
104
+ "allowedDevOrigins": [
105
+ "scope.localhost",
106
+ "*.scope.localhost"
107
+ ],
104
108
  "experimental": {
105
109
  "useSkewCookie": false,
106
110
  "cacheLife": {