@mycadet/cli 0.13.0-dev.202611041208.2540870 → 0.13.0-dev.202611121243.82bf60e
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/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/__tests__/remote-web-pairing.test.ts +17 -14
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts +7 -3
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +7 -64
- package/node_modules/@mycadet/assistant-api/responses/activation.ts +1 -1
- package/node_modules/@mycadet/assistant-api/responses/conversation-message.ts +1 -1
- package/node_modules/@mycadet/avatar-manifest/package.json +1 -1
- package/node_modules/@mycadet/environments/package.json +1 -1
- package/node_modules/@mycadet/environments/src/index.ts +0 -1
- package/node_modules/@mycadet/environments/src/seeds.ts +0 -5
- package/node_modules/@mycadet/ipc-server-utils/package.json +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/package.json +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/package.json +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/index.ts +0 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/seeds.ts +0 -5
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/ipc-server-utils/package.json +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/__tests__/remote-web-pairing.test.ts +17 -14
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/ingress.ts +7 -3
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +7 -64
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/imports-first.mjs +51 -0
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/imports-first.test.mjs +95 -0
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/no-empty-imports.mjs +71 -0
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/no-empty-imports.test.mjs +71 -0
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/package.json +4 -2
- package/node_modules/@mycadet/local-mode/package.json +2 -2
- package/node_modules/@mycadet/local-mode/scripts/run-tests.ts +3 -0
- package/{src/__tests__/teleport-backup.test.ts → node_modules/@mycadet/local-mode/src/__tests__/cloud-backup.test.ts} +20 -23
- package/node_modules/@mycadet/local-mode/src/__tests__/cloud-releases.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/__tests__/hatch-local-overlay.test.ts +144 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/health-check.test.ts +132 -2
- package/node_modules/@mycadet/local-mode/src/__tests__/local-exec-invocation.test.ts +111 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-backup.test.ts +97 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-doctor.test.ts +231 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-hatch.test.ts +17 -1
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-migrations.test.ts +170 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-pair.test.ts +16 -2
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-profile.test.ts +67 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-proxy.test.ts +280 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-resolution.test.ts +27 -14
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-restart.test.ts +203 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-restore.test.ts +271 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-retire.test.ts +66 -7
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-routes.test.ts +44 -38
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-sleep.test.ts +103 -8
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-teleport.test.ts +377 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/operations-wake.test.ts +87 -10
- package/node_modules/@mycadet/local-mode/src/__tests__/pair.test.ts +6 -6
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-baseten-api.test.ts +332 -7
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-baseten-exec.test.ts +279 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-baseten-hatch-volume.test.ts +13 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-docker-sleep.test.ts +83 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-docker-statefulset.test.ts +0 -1
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-docker-wake.test.ts +26 -36
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-common-gateway-cli.test.ts +1 -3
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-common-readiness.test.ts +34 -13
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-common-runtime.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-instance.test.ts +55 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-retire.test.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-upgrade.test.ts +29 -35
- package/node_modules/@mycadet/local-mode/src/__tests__/remotes-local-wake.test.ts +25 -198
- package/node_modules/@mycadet/local-mode/src/__tests__/root-backup-docker.test.ts +3 -2
- package/node_modules/@mycadet/local-mode/src/__tests__/root-backup.test.ts +5 -1
- package/node_modules/@mycadet/local-mode/src/__tests__/teleport-init.test.ts +151 -0
- package/node_modules/@mycadet/local-mode/src/__tests__/upgrade-replay-env.test.ts +2 -4
- package/node_modules/@mycadet/local-mode/src/__tests__/upgrade-root-recovery.test.ts +6 -3
- package/node_modules/@mycadet/local-mode/src/cloud-registration.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/daemon-readiness.ts +251 -58
- package/node_modules/@mycadet/local-mode/src/devices.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/guardian-token.ts +31 -3
- package/node_modules/@mycadet/local-mode/src/index.ts +83 -309
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.ts +21 -58
- package/node_modules/@mycadet/local-mode/src/lockfile.ts +19 -0
- package/node_modules/@mycadet/local-mode/src/operations/backup.ts +42 -0
- package/node_modules/@mycadet/local-mode/src/operations/cloud-proxy.ts +46 -0
- package/node_modules/@mycadet/local-mode/src/operations/doctor.ts +202 -0
- package/node_modules/@mycadet/local-mode/src/operations/exec.ts +139 -0
- package/node_modules/@mycadet/local-mode/src/operations/hatch.ts +12 -0
- package/node_modules/@mycadet/local-mode/src/operations/migrations.ts +62 -0
- package/node_modules/@mycadet/local-mode/src/operations/profile.ts +82 -0
- package/node_modules/@mycadet/local-mode/src/operations/resolve.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/operations/restart.ts +106 -0
- package/node_modules/@mycadet/local-mode/src/operations/restore.ts +111 -0
- package/node_modules/@mycadet/local-mode/src/operations/retire.ts +6 -2
- package/node_modules/@mycadet/local-mode/src/operations/routes.ts +235 -15
- package/node_modules/@mycadet/local-mode/src/operations/sleep.ts +16 -5
- package/node_modules/@mycadet/local-mode/src/operations/teleport.ts +162 -0
- package/node_modules/@mycadet/local-mode/src/operations/upgrade.ts +4 -5
- package/node_modules/@mycadet/local-mode/src/operations/wake.ts +7 -2
- package/node_modules/@mycadet/local-mode/src/pair.ts +1 -7
- package/node_modules/@mycadet/local-mode/src/process.ts +1 -9
- package/{src/lib/remotes/apple-container.ts → node_modules/@mycadet/local-mode/src/remotes/apple-container/exec.ts} +3 -5
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/Dockerfile +5 -3
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/api.ts +233 -13
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/baseten-cli.ts +8 -14
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/entrypoint.sh +20 -5
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/exec.ts +217 -0
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/hatch.ts +69 -9
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/lifecycle.ts +186 -0
- package/node_modules/@mycadet/local-mode/src/remotes/baseten/zip.ts +1 -11
- package/{src/lib/teleport-backup.ts → node_modules/@mycadet/local-mode/src/remotes/cloud/backup.ts} +46 -19
- package/node_modules/@mycadet/local-mode/src/remotes/cloud/exec.ts +520 -0
- package/node_modules/@mycadet/local-mode/src/remotes/cloud/migrations.ts +371 -0
- package/node_modules/@mycadet/local-mode/src/remotes/cloud/restore.ts +399 -0
- package/node_modules/@mycadet/local-mode/src/remotes/cloud/retire.ts +12 -14
- package/{src/lib → node_modules/@mycadet/local-mode/src/remotes/cloud}/terminal-client.ts +2 -5
- package/node_modules/@mycadet/local-mode/src/remotes/cloud/upgrade.ts +27 -27
- package/node_modules/@mycadet/local-mode/src/remotes/docker/backup.ts +18 -0
- package/node_modules/@mycadet/local-mode/src/remotes/docker/exec.ts +33 -0
- package/node_modules/@mycadet/local-mode/src/remotes/docker/hatch.ts +11 -28
- package/node_modules/@mycadet/local-mode/src/remotes/docker/pair.ts +33 -32
- package/node_modules/@mycadet/local-mode/src/remotes/docker/restore.ts +24 -0
- package/node_modules/@mycadet/local-mode/src/remotes/docker/sleep.ts +17 -2
- package/node_modules/@mycadet/local-mode/src/remotes/docker/statefulset.ts +1 -40
- package/node_modules/@mycadet/local-mode/src/remotes/docker/teleport.ts +128 -0
- package/node_modules/@mycadet/local-mode/src/remotes/docker/upgrade.ts +28 -55
- package/node_modules/@mycadet/local-mode/src/remotes/docker/wake.ts +206 -8
- package/node_modules/@mycadet/local-mode/src/remotes/docker/watch.ts +16 -7
- package/node_modules/@mycadet/local-mode/src/remotes/local/backup.ts +17 -0
- package/node_modules/@mycadet/local-mode/src/remotes/local/common.ts +126 -429
- package/node_modules/@mycadet/local-mode/src/remotes/local/exec.ts +130 -0
- package/node_modules/@mycadet/local-mode/src/remotes/local/hatch.ts +4 -7
- package/node_modules/@mycadet/local-mode/src/remotes/local/instance.ts +10 -20
- package/node_modules/@mycadet/local-mode/src/remotes/local/pair.ts +36 -28
- package/node_modules/@mycadet/local-mode/src/remotes/local/restore.ts +125 -0
- package/node_modules/@mycadet/local-mode/src/remotes/local/sleep.ts +19 -3
- package/node_modules/@mycadet/local-mode/src/remotes/local/teleport.ts +43 -0
- package/node_modules/@mycadet/local-mode/src/remotes/local/upgrade.ts +10 -12
- package/node_modules/@mycadet/local-mode/src/remotes/local/wake.ts +36 -203
- package/node_modules/@mycadet/local-mode/src/root-backup.ts +17 -5
- package/node_modules/@mycadet/local-mode/src/served-config.test.ts +41 -1
- package/node_modules/@mycadet/local-mode/src/served-config.ts +18 -5
- package/node_modules/@mycadet/local-mode/src/upgrade-lifecycle.ts +10 -61
- package/node_modules/@mycadet/local-mode/src/version-compat.ts +0 -3
- package/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/service-contracts/src/__tests__/remote-web-pairing.test.ts +17 -14
- package/node_modules/@mycadet/service-contracts/src/ingress.ts +7 -3
- package/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +7 -64
- package/node_modules/@mycadet/shared/eslint/imports-first.mjs +51 -0
- package/node_modules/@mycadet/shared/eslint/imports-first.test.mjs +95 -0
- package/node_modules/@mycadet/shared/eslint/no-empty-imports.mjs +71 -0
- package/node_modules/@mycadet/shared/eslint/no-empty-imports.test.mjs +71 -0
- package/node_modules/@mycadet/shared/package.json +4 -2
- package/package.json +1 -2
- package/src/__tests__/app-command.test.ts +0 -1
- package/src/__tests__/assistant-client-refresh.test.ts +5 -2
- package/src/__tests__/backup.test.ts +19 -59
- package/src/__tests__/client-tui-refresh.test.ts +1 -2
- package/src/__tests__/connect-import.test.ts +3 -4
- package/src/__tests__/debug.test.ts +1 -2
- package/src/__tests__/devices.test.ts +3 -3
- package/src/__tests__/guardian-token.test.ts +2 -11
- package/src/__tests__/pair.test.ts +25 -20
- package/src/__tests__/ps-cloud-status.test.ts +1 -1
- package/src/__tests__/restart-command.test.ts +165 -0
- package/src/__tests__/restore.test.ts +15 -136
- package/src/__tests__/root-restore-command.test.ts +47 -88
- package/src/__tests__/servers/bun.test.ts +272 -673
- package/src/__tests__/setup.test.ts +1 -2
- package/src/__tests__/sleep.test.ts +3 -113
- package/src/__tests__/teleport.test.ts +30 -29
- package/src/__tests__/tui-midsession-refresh.test.ts +1 -2
- package/src/__tests__/web-dist.test.ts +57 -173
- package/src/commands/app.ts +37 -1
- package/src/commands/backup.ts +7 -23
- package/src/commands/client.ts +8 -10
- package/src/commands/connect/import.ts +1 -1
- package/src/commands/debug.ts +3 -3
- package/src/commands/devices.ts +2 -2
- package/src/commands/exec.ts +18 -159
- package/src/commands/login.ts +2 -4
- package/src/commands/logs.ts +1 -1
- package/src/commands/pair.ts +19 -11
- package/src/commands/ps.ts +8 -23
- package/src/commands/restart.ts +51 -17
- package/src/commands/restore.ts +74 -462
- package/src/commands/setup.ts +2 -5
- package/src/commands/sleep.ts +3 -50
- package/src/commands/teleport.ts +15 -65
- package/src/commands/terminal.ts +7 -9
- package/src/commands/uninstall.ts +33 -9
- package/src/components/DefaultMainScreen.tsx +2 -6
- package/src/index.ts +1 -2
- package/src/lib/__tests__/cloud-client-signed-url.test.ts +2 -3
- package/src/lib/__tests__/{step-runner.test.ts → exec.test.ts} +2 -1
- package/src/lib/__tests__/terminal-session.test.ts +1 -1
- package/src/lib/__tests__/web-dist.test.ts +47 -58
- package/src/lib/assistant-client.ts +3 -18
- package/src/lib/cli-error.ts +1 -1
- package/src/lib/cloud-client.ts +5 -368
- package/src/lib/constants.ts +8 -8
- package/src/lib/guardian-token.ts +2 -27
- package/src/lib/live-voice/connection.ts +3 -26
- package/src/lib/pair.test.ts +0 -6
- package/src/lib/pair.ts +3 -7
- package/src/lib/remotes/cloud.ts +1 -1
- package/src/lib/runtime-url.ts +2 -2
- package/src/lib/servers/bun.ts +82 -117
- package/src/lib/servers/common.ts +90 -288
- package/src/lib/sync-cloud-assistants.ts +2 -2
- package/src/lib/terminal-session.ts +7 -518
- package/src/lib/tunnels/gateway-notify.ts +1 -1
- package/src/lib/web-dist.ts +56 -117
- package/node_modules/@mycadet/local-mode/src/__tests__/daemon-readiness-version.test.ts +0 -29
- package/node_modules/@mycadet/local-mode/src/__tests__/gateway-proxy.test.ts +0 -430
- package/node_modules/@mycadet/local-mode/src/__tests__/package-boundary.test.ts +0 -131
- package/node_modules/@mycadet/local-mode/src/cloud-values.ts +0 -8
- package/node_modules/@mycadet/local-mode/src/gateway-bearer.test.ts +0 -165
- package/node_modules/@mycadet/local-mode/src/gateway-bearer.ts +0 -134
- package/node_modules/@mycadet/local-mode/src/gateway-proxy.ts +0 -361
- package/node_modules/@mycadet/local-mode/src/health-check.ts +0 -154
- package/node_modules/@mycadet/local-mode/src/remotes/docker/recreate.ts +0 -98
- package/src/__tests__/host-teleport-docker.test.ts +0 -412
- package/src/__tests__/host-teleport.test.ts +0 -426
- package/src/__tests__/version.test.ts +0 -62
- package/src/lib/cloud-values.ts +0 -3
- package/src/lib/environments/__tests__/resolve.test.ts +0 -238
- package/src/lib/environments/resolve.ts +0 -123
- package/src/lib/host-teleport.ts +0 -298
- package/src/lib/remotes/docker.ts +0 -257
- package/src/lib/remotes/local.ts +0 -22
- package/src/lib/step-runner.ts +0 -171
|
@@ -48,7 +48,7 @@ describe("parseRemoteWebPairingParams", () => {
|
|
|
48
48
|
describe("parsePairingAddress", () => {
|
|
49
49
|
test("splits a pairing link into its base and device code", () => {
|
|
50
50
|
const link = buildRemoteWebPairingUrl({
|
|
51
|
-
verificationUri: "https://assistant.example.com/
|
|
51
|
+
verificationUri: "https://assistant.example.com/account/pair",
|
|
52
52
|
deviceCode: "device-1",
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@ describe("parsePairingAddress", () => {
|
|
|
62
62
|
test("accepts the device code in the query string", () => {
|
|
63
63
|
expect(
|
|
64
64
|
parsePairingAddress(
|
|
65
|
-
"https://assistant.example.com/
|
|
65
|
+
"https://assistant.example.com/account/pair?deviceCode=device-2",
|
|
66
66
|
),
|
|
67
67
|
).toEqual({
|
|
68
68
|
ok: true,
|
|
@@ -71,25 +71,28 @@ describe("parsePairingAddress", () => {
|
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
test("
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
test("splits an app-shell pairing link (the pair page lives at /account/pair)", () => {
|
|
75
|
+
const link = buildRemoteWebPairingUrl({
|
|
76
|
+
verificationUri: "https://assistant.example.com/account/pair",
|
|
77
|
+
deviceCode: "device-4",
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(parsePairingAddress(link)).toEqual({
|
|
80
81
|
ok: true,
|
|
81
|
-
publicBaseUrl: "https://
|
|
82
|
-
deviceCode: "device-
|
|
82
|
+
publicBaseUrl: "https://assistant.example.com",
|
|
83
|
+
deviceCode: "device-4",
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
86
|
|
|
86
|
-
test("
|
|
87
|
+
test("preserves a path prefix on an app-shell pairing link", () => {
|
|
87
88
|
expect(
|
|
88
|
-
parsePairingAddress(
|
|
89
|
+
parsePairingAddress(
|
|
90
|
+
"https://host.example.com/assistant-123/account/pair#device_code=device-5",
|
|
91
|
+
),
|
|
89
92
|
).toEqual({
|
|
90
93
|
ok: true,
|
|
91
|
-
publicBaseUrl: "https://
|
|
92
|
-
deviceCode:
|
|
94
|
+
publicBaseUrl: "https://host.example.com/assistant-123",
|
|
95
|
+
deviceCode: "device-5",
|
|
93
96
|
});
|
|
94
97
|
});
|
|
95
98
|
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
* deployment naming convention (`cloud.mycadet.ai` → `tunnel.mycadet.ai`,
|
|
4
4
|
* `{env}-cloud.mycadet.ai` → `{env}-tunnel.mycadet.ai`). Returns null for
|
|
5
5
|
* hosts outside that convention (localhost, custom domains). Shared by the
|
|
6
|
-
* gateway speech relay
|
|
7
|
-
*
|
|
6
|
+
* gateway speech relay (which passes the request's own host) and the web
|
|
7
|
+
* live-voice client (which defaults to the page's origin) so the two ends
|
|
8
|
+
* of the cloud-speech transport can't drift.
|
|
8
9
|
*/
|
|
9
|
-
export function tunnelHostForCloudHost(
|
|
10
|
+
export function tunnelHostForCloudHost(
|
|
11
|
+
host: string = (globalThis as { location?: { hostname?: string } }).location
|
|
12
|
+
?.hostname ?? "",
|
|
13
|
+
): string | null {
|
|
10
14
|
if (host === "cloud.mycadet.ai") {
|
|
11
15
|
return "tunnel.mycadet.ai";
|
|
12
16
|
}
|
|
@@ -78,60 +78,6 @@ export interface RemoteWebPairingVerificationResponse {
|
|
|
78
78
|
expiresAt: string;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* One pending challenge as shown on a host approval surface.
|
|
83
|
-
*
|
|
84
|
-
* The requesting device already sees the plaintext `userCode` in its own
|
|
85
|
-
* challenge response ({@link RemoteWebPairingChallengeResponse.userCode});
|
|
86
|
-
* the loopback-gated list route is the only host-side re-exposure. Displaying
|
|
87
|
-
* it there is what lets the approver match the code against the requesting
|
|
88
|
-
* device's screen: the device-flow anti-phishing binding.
|
|
89
|
-
*/
|
|
90
|
-
export interface RemoteWebPairingRequestSummary {
|
|
91
|
-
/** Opaque server-side id used to approve or deny this request. */
|
|
92
|
-
requestId: string;
|
|
93
|
-
/** The human-readable code the requesting device is displaying (e.g. "ABCD-EFGH"). */
|
|
94
|
-
userCode: string;
|
|
95
|
-
/** Public base URL the challenge was minted for. */
|
|
96
|
-
publicBaseUrl: string;
|
|
97
|
-
/** ISO-8601 instant the challenge was minted. */
|
|
98
|
-
requestedAt: string;
|
|
99
|
-
/** ISO-8601 instant the challenge expires. */
|
|
100
|
-
expiresAt: string;
|
|
101
|
-
/**
|
|
102
|
-
* Client IP of the mint request: the loopback/host address when minted
|
|
103
|
-
* locally, or the edge-observed client address when the mint arrived
|
|
104
|
-
* through the nginx app server (which stamps it via `proxy_set_header`,
|
|
105
|
-
* so a remote client cannot smuggle a value).
|
|
106
|
-
*/
|
|
107
|
-
requesterIp: string;
|
|
108
|
-
/** User-Agent header of the mint request, or null when absent. */
|
|
109
|
-
requesterUserAgent: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* Whether the mint arrived through the public app server rather than the
|
|
112
|
-
* host itself.
|
|
113
|
-
*/
|
|
114
|
-
viaEdgeProxy: boolean;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** `GET /v1/remote-web/pairing-requests` success response body (200). */
|
|
118
|
-
export interface RemoteWebPairingRequestListResponse {
|
|
119
|
-
requests: RemoteWebPairingRequestSummary[];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Request body for the pairing-request approve and deny routes. The approve
|
|
124
|
-
* route's success body reuses {@link RemoteWebPairingVerificationResponse}.
|
|
125
|
-
*/
|
|
126
|
-
export interface RemoteWebPairingRequestActionRequest {
|
|
127
|
-
requestId: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/** `POST /v1/remote-web/pairing-requests/deny` success response body (200). */
|
|
131
|
-
export interface RemoteWebPairingRequestDenyResponse {
|
|
132
|
-
status: "denied";
|
|
133
|
-
}
|
|
134
|
-
|
|
135
81
|
/**
|
|
136
82
|
* Platforms a device-bound pairing exchange may declare for itself. The value
|
|
137
83
|
* is what the host's `Paired devices` list renders for the new pairing.
|
|
@@ -535,18 +481,18 @@ export function isPrivateNetworkPublicUrl(url: string): boolean {
|
|
|
535
481
|
|
|
536
482
|
/**
|
|
537
483
|
* Normalize an address to the public base a scanning device opens:
|
|
538
|
-
* query/hash stripped, the `
|
|
539
|
-
* removed so a pasted pair-page URL collapses to its base, and
|
|
540
|
-
* slashes trimmed. Throws if the value is not a parseable URL.
|
|
484
|
+
* query/hash stripped, the pair page's `account` path segment (and everything
|
|
485
|
+
* after it) removed so a pasted pair-page URL collapses to its base, and
|
|
486
|
+
* trailing slashes trimmed. Throws if the value is not a parseable URL.
|
|
541
487
|
*/
|
|
542
488
|
export function normalizePairingBaseUrl(value: string): string {
|
|
543
489
|
const url = new URL(value);
|
|
544
490
|
url.search = "";
|
|
545
491
|
url.hash = "";
|
|
546
492
|
const parts = url.pathname.split("/").filter(Boolean);
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
parts.splice(
|
|
493
|
+
const cutIndex = parts.indexOf("account");
|
|
494
|
+
if (cutIndex >= 0) {
|
|
495
|
+
parts.splice(cutIndex);
|
|
550
496
|
}
|
|
551
497
|
url.pathname = parts.length ? `/${parts.join("/")}` : "/";
|
|
552
498
|
return url.toString().replace(/\/+$/, "");
|
|
@@ -689,10 +635,7 @@ export function parsePairingAddress(raw: string): ParsePairingAddressResult {
|
|
|
689
635
|
}
|
|
690
636
|
|
|
691
637
|
/**
|
|
692
|
-
* What a pairing attempt failed on, for callers picking recovery copy
|
|
693
|
-
* pairing surface reports one of these: the host-side sessions in
|
|
694
|
-
* `@mycadet/local-mode`, the Electron bridge, the desktop connect dialog, and
|
|
695
|
-
* the `cadet connect import` CLI.
|
|
638
|
+
* What a pairing attempt failed on, for callers picking recovery copy
|
|
696
639
|
*/
|
|
697
640
|
export type PairingFailureReason =
|
|
698
641
|
/** The pasted address is not a usable assistant address. */
|
|
@@ -33,7 +33,7 @@ export const ACTIVATION_ID_PATTERN = /^[a-z0-9-]{1,64}$/;
|
|
|
33
33
|
*/
|
|
34
34
|
export const ACTIVATION_CONVERSATION_ID_MAX_LENGTH = 128;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const ActivationIdSchema = z
|
|
37
37
|
.string()
|
|
38
38
|
.regex(ACTIVATION_ID_PATTERN)
|
|
39
39
|
.describe("Opaque lowercase-kebab identifier, 1-64 characters");
|
|
@@ -324,7 +324,7 @@ export type ConversationSubagentNotification = z.infer<
|
|
|
324
324
|
// ---------------------------------------------------------------------------
|
|
325
325
|
|
|
326
326
|
/** Daemon-injected ACP-run lifecycle notification attached to a history row. */
|
|
327
|
-
|
|
327
|
+
const ConversationAcpNotificationSchema = z.object({
|
|
328
328
|
acpSessionId: z.string(),
|
|
329
329
|
agent: z.string().optional(),
|
|
330
330
|
});
|
|
@@ -70,8 +70,6 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
70
70
|
},
|
|
71
71
|
test: {
|
|
72
72
|
name: "test",
|
|
73
|
-
// Non-functional URL — used only by unit tests for URL resolution, never
|
|
74
|
-
// hit in production.
|
|
75
73
|
cloudUrl: "https://test-cloud.mycadet.ai",
|
|
76
74
|
webUrl: "https://dev.mycadet.ai",
|
|
77
75
|
portsOverride: portBlock(19000),
|
|
@@ -86,9 +84,6 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
86
84
|
name: "local",
|
|
87
85
|
cloudUrl: "http://localhost:8000",
|
|
88
86
|
webUrl: "http://localhost:3000",
|
|
89
|
-
// assistantCloudUrl: "http://host.docker.internal:8000",
|
|
90
|
-
// ^ uncomment this once dockerized hatch path is live.
|
|
91
|
-
// The assistant runs in a different network namespace than the host.
|
|
92
87
|
portsOverride: portBlock(20000),
|
|
93
88
|
},
|
|
94
89
|
};
|
|
@@ -70,8 +70,6 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
70
70
|
},
|
|
71
71
|
test: {
|
|
72
72
|
name: "test",
|
|
73
|
-
// Non-functional URL — used only by unit tests for URL resolution, never
|
|
74
|
-
// hit in production.
|
|
75
73
|
cloudUrl: "https://test-cloud.mycadet.ai",
|
|
76
74
|
webUrl: "https://dev.mycadet.ai",
|
|
77
75
|
portsOverride: portBlock(19000),
|
|
@@ -86,9 +84,6 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
86
84
|
name: "local",
|
|
87
85
|
cloudUrl: "http://localhost:8000",
|
|
88
86
|
webUrl: "http://localhost:3000",
|
|
89
|
-
// assistantCloudUrl: "http://host.docker.internal:8000",
|
|
90
|
-
// ^ uncomment this once dockerized hatch path is live.
|
|
91
|
-
// The assistant runs in a different network namespace than the host.
|
|
92
87
|
portsOverride: portBlock(20000),
|
|
93
88
|
},
|
|
94
89
|
};
|
|
@@ -48,7 +48,7 @@ describe("parseRemoteWebPairingParams", () => {
|
|
|
48
48
|
describe("parsePairingAddress", () => {
|
|
49
49
|
test("splits a pairing link into its base and device code", () => {
|
|
50
50
|
const link = buildRemoteWebPairingUrl({
|
|
51
|
-
verificationUri: "https://assistant.example.com/
|
|
51
|
+
verificationUri: "https://assistant.example.com/account/pair",
|
|
52
52
|
deviceCode: "device-1",
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@ describe("parsePairingAddress", () => {
|
|
|
62
62
|
test("accepts the device code in the query string", () => {
|
|
63
63
|
expect(
|
|
64
64
|
parsePairingAddress(
|
|
65
|
-
"https://assistant.example.com/
|
|
65
|
+
"https://assistant.example.com/account/pair?deviceCode=device-2",
|
|
66
66
|
),
|
|
67
67
|
).toEqual({
|
|
68
68
|
ok: true,
|
|
@@ -71,25 +71,28 @@ describe("parsePairingAddress", () => {
|
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
test("
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
test("splits an app-shell pairing link (the pair page lives at /account/pair)", () => {
|
|
75
|
+
const link = buildRemoteWebPairingUrl({
|
|
76
|
+
verificationUri: "https://assistant.example.com/account/pair",
|
|
77
|
+
deviceCode: "device-4",
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(parsePairingAddress(link)).toEqual({
|
|
80
81
|
ok: true,
|
|
81
|
-
publicBaseUrl: "https://
|
|
82
|
-
deviceCode: "device-
|
|
82
|
+
publicBaseUrl: "https://assistant.example.com",
|
|
83
|
+
deviceCode: "device-4",
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
86
|
|
|
86
|
-
test("
|
|
87
|
+
test("preserves a path prefix on an app-shell pairing link", () => {
|
|
87
88
|
expect(
|
|
88
|
-
parsePairingAddress(
|
|
89
|
+
parsePairingAddress(
|
|
90
|
+
"https://host.example.com/assistant-123/account/pair#device_code=device-5",
|
|
91
|
+
),
|
|
89
92
|
).toEqual({
|
|
90
93
|
ok: true,
|
|
91
|
-
publicBaseUrl: "https://
|
|
92
|
-
deviceCode:
|
|
94
|
+
publicBaseUrl: "https://host.example.com/assistant-123",
|
|
95
|
+
deviceCode: "device-5",
|
|
93
96
|
});
|
|
94
97
|
});
|
|
95
98
|
|
package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/ingress.ts
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
* deployment naming convention (`cloud.mycadet.ai` → `tunnel.mycadet.ai`,
|
|
4
4
|
* `{env}-cloud.mycadet.ai` → `{env}-tunnel.mycadet.ai`). Returns null for
|
|
5
5
|
* hosts outside that convention (localhost, custom domains). Shared by the
|
|
6
|
-
* gateway speech relay
|
|
7
|
-
*
|
|
6
|
+
* gateway speech relay (which passes the request's own host) and the web
|
|
7
|
+
* live-voice client (which defaults to the page's origin) so the two ends
|
|
8
|
+
* of the cloud-speech transport can't drift.
|
|
8
9
|
*/
|
|
9
|
-
export function tunnelHostForCloudHost(
|
|
10
|
+
export function tunnelHostForCloudHost(
|
|
11
|
+
host: string = (globalThis as { location?: { hostname?: string } }).location
|
|
12
|
+
?.hostname ?? "",
|
|
13
|
+
): string | null {
|
|
10
14
|
if (host === "cloud.mycadet.ai") {
|
|
11
15
|
return "tunnel.mycadet.ai";
|
|
12
16
|
}
|
|
@@ -78,60 +78,6 @@ export interface RemoteWebPairingVerificationResponse {
|
|
|
78
78
|
expiresAt: string;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* One pending challenge as shown on a host approval surface.
|
|
83
|
-
*
|
|
84
|
-
* The requesting device already sees the plaintext `userCode` in its own
|
|
85
|
-
* challenge response ({@link RemoteWebPairingChallengeResponse.userCode});
|
|
86
|
-
* the loopback-gated list route is the only host-side re-exposure. Displaying
|
|
87
|
-
* it there is what lets the approver match the code against the requesting
|
|
88
|
-
* device's screen: the device-flow anti-phishing binding.
|
|
89
|
-
*/
|
|
90
|
-
export interface RemoteWebPairingRequestSummary {
|
|
91
|
-
/** Opaque server-side id used to approve or deny this request. */
|
|
92
|
-
requestId: string;
|
|
93
|
-
/** The human-readable code the requesting device is displaying (e.g. "ABCD-EFGH"). */
|
|
94
|
-
userCode: string;
|
|
95
|
-
/** Public base URL the challenge was minted for. */
|
|
96
|
-
publicBaseUrl: string;
|
|
97
|
-
/** ISO-8601 instant the challenge was minted. */
|
|
98
|
-
requestedAt: string;
|
|
99
|
-
/** ISO-8601 instant the challenge expires. */
|
|
100
|
-
expiresAt: string;
|
|
101
|
-
/**
|
|
102
|
-
* Client IP of the mint request: the loopback/host address when minted
|
|
103
|
-
* locally, or the edge-observed client address when the mint arrived
|
|
104
|
-
* through the nginx app server (which stamps it via `proxy_set_header`,
|
|
105
|
-
* so a remote client cannot smuggle a value).
|
|
106
|
-
*/
|
|
107
|
-
requesterIp: string;
|
|
108
|
-
/** User-Agent header of the mint request, or null when absent. */
|
|
109
|
-
requesterUserAgent: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* Whether the mint arrived through the public app server rather than the
|
|
112
|
-
* host itself.
|
|
113
|
-
*/
|
|
114
|
-
viaEdgeProxy: boolean;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** `GET /v1/remote-web/pairing-requests` success response body (200). */
|
|
118
|
-
export interface RemoteWebPairingRequestListResponse {
|
|
119
|
-
requests: RemoteWebPairingRequestSummary[];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Request body for the pairing-request approve and deny routes. The approve
|
|
124
|
-
* route's success body reuses {@link RemoteWebPairingVerificationResponse}.
|
|
125
|
-
*/
|
|
126
|
-
export interface RemoteWebPairingRequestActionRequest {
|
|
127
|
-
requestId: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/** `POST /v1/remote-web/pairing-requests/deny` success response body (200). */
|
|
131
|
-
export interface RemoteWebPairingRequestDenyResponse {
|
|
132
|
-
status: "denied";
|
|
133
|
-
}
|
|
134
|
-
|
|
135
81
|
/**
|
|
136
82
|
* Platforms a device-bound pairing exchange may declare for itself. The value
|
|
137
83
|
* is what the host's `Paired devices` list renders for the new pairing.
|
|
@@ -535,18 +481,18 @@ export function isPrivateNetworkPublicUrl(url: string): boolean {
|
|
|
535
481
|
|
|
536
482
|
/**
|
|
537
483
|
* Normalize an address to the public base a scanning device opens:
|
|
538
|
-
* query/hash stripped, the `
|
|
539
|
-
* removed so a pasted pair-page URL collapses to its base, and
|
|
540
|
-
* slashes trimmed. Throws if the value is not a parseable URL.
|
|
484
|
+
* query/hash stripped, the pair page's `account` path segment (and everything
|
|
485
|
+
* after it) removed so a pasted pair-page URL collapses to its base, and
|
|
486
|
+
* trailing slashes trimmed. Throws if the value is not a parseable URL.
|
|
541
487
|
*/
|
|
542
488
|
export function normalizePairingBaseUrl(value: string): string {
|
|
543
489
|
const url = new URL(value);
|
|
544
490
|
url.search = "";
|
|
545
491
|
url.hash = "";
|
|
546
492
|
const parts = url.pathname.split("/").filter(Boolean);
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
parts.splice(
|
|
493
|
+
const cutIndex = parts.indexOf("account");
|
|
494
|
+
if (cutIndex >= 0) {
|
|
495
|
+
parts.splice(cutIndex);
|
|
550
496
|
}
|
|
551
497
|
url.pathname = parts.length ? `/${parts.join("/")}` : "/";
|
|
552
498
|
return url.toString().replace(/\/+$/, "");
|
|
@@ -689,10 +635,7 @@ export function parsePairingAddress(raw: string): ParsePairingAddressResult {
|
|
|
689
635
|
}
|
|
690
636
|
|
|
691
637
|
/**
|
|
692
|
-
* What a pairing attempt failed on, for callers picking recovery copy
|
|
693
|
-
* pairing surface reports one of these: the host-side sessions in
|
|
694
|
-
* `@mycadet/local-mode`, the Electron bridge, the desktop connect dialog, and
|
|
695
|
-
* the `cadet connect import` CLI.
|
|
638
|
+
* What a pairing attempt failed on, for callers picking recovery copy
|
|
696
639
|
*/
|
|
697
640
|
export type PairingFailureReason =
|
|
698
641
|
/** The pasted address is not a usable assistant address. */
|
package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/imports-first.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/** `imports-first` — imports must sit at the top of the file, before any other statement. */
|
|
3
|
+
|
|
4
|
+
/** The rule object exported for `eslint.config` `plugins` registries. */
|
|
5
|
+
export const importsFirst = {
|
|
6
|
+
meta: {
|
|
7
|
+
type: "suggestion",
|
|
8
|
+
fixable: "code",
|
|
9
|
+
docs: {
|
|
10
|
+
description: "imports must be hoisted to the top of the file",
|
|
11
|
+
},
|
|
12
|
+
schema: [],
|
|
13
|
+
messages: {
|
|
14
|
+
hoist: "Import must be at the top of the file, before other statements.",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
create(context) {
|
|
18
|
+
let seenStatement = false;
|
|
19
|
+
let firstNonImport = undefined;
|
|
20
|
+
return {
|
|
21
|
+
Program(program) {
|
|
22
|
+
for (const statement of program.body) {
|
|
23
|
+
if (statement.type === "ImportDeclaration") {
|
|
24
|
+
if (seenStatement) {
|
|
25
|
+
context.report({
|
|
26
|
+
node: statement,
|
|
27
|
+
messageId: "hoist",
|
|
28
|
+
fix(fixer) {
|
|
29
|
+
if (!firstNonImport) return null;
|
|
30
|
+
const sourceText = context.sourceCode.text;
|
|
31
|
+
const hoisted = sourceText.slice(
|
|
32
|
+
statement.range[0],
|
|
33
|
+
statement.range[1],
|
|
34
|
+
);
|
|
35
|
+
if (!hoisted) return null;
|
|
36
|
+
return [
|
|
37
|
+
fixer.insertTextBefore(firstNonImport, `${hoisted}\n`),
|
|
38
|
+
fixer.remove(statement),
|
|
39
|
+
];
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
} else if (!seenStatement) {
|
|
44
|
+
seenStatement = true;
|
|
45
|
+
firstNonImport = statement;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
package/node_modules/@mycadet/local-mode/node_modules/@mycadet/shared/eslint/imports-first.test.mjs
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for the imports-first ESLint rule.
|
|
3
|
+
*
|
|
4
|
+
* Run with: `bun test packages/shared/eslint/imports-first.test.mjs`
|
|
5
|
+
*
|
|
6
|
+
* Like no-re-exports' suite: a passing run prints "Ran 0 tests" (a bun
|
|
7
|
+
* `.mjs` reporting artifact) — the cases still execute and a wrong
|
|
8
|
+
* expectation still throws with a non-zero exit.
|
|
9
|
+
*/
|
|
10
|
+
import { RuleTester } from "eslint";
|
|
11
|
+
import tseslint from "typescript-eslint";
|
|
12
|
+
|
|
13
|
+
import { importsFirst } from "./imports-first.mjs";
|
|
14
|
+
|
|
15
|
+
const ruleTester = new RuleTester({
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parser: tseslint.parser,
|
|
18
|
+
ecmaVersion: "latest",
|
|
19
|
+
sourceType: "module",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
ruleTester.run("imports-first", importsFirst, {
|
|
24
|
+
valid: [
|
|
25
|
+
{
|
|
26
|
+
name: "imports at the top, then statements",
|
|
27
|
+
code: [
|
|
28
|
+
'import { helper } from "./helper.js";',
|
|
29
|
+
'import type { Shape } from "./shape.js";',
|
|
30
|
+
"",
|
|
31
|
+
"export const x: Shape = helper();",
|
|
32
|
+
].join("\n"),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "comments between imports are not statements",
|
|
36
|
+
code: [
|
|
37
|
+
'import { helper } from "./helper.js";',
|
|
38
|
+
"",
|
|
39
|
+
"// A section comment.",
|
|
40
|
+
"// Another line of it.",
|
|
41
|
+
'import { other } from "./other.js";',
|
|
42
|
+
"",
|
|
43
|
+
"export const y = other();",
|
|
44
|
+
].join("\n"),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "a module with only imports",
|
|
48
|
+
code: ['import { helper } from "./helper.js";'].join("\n"),
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
invalid: [
|
|
52
|
+
{
|
|
53
|
+
name: "an import after a statement is flagged",
|
|
54
|
+
code: [
|
|
55
|
+
'import { helper } from "./helper.js";',
|
|
56
|
+
"",
|
|
57
|
+
"export const x = helper();",
|
|
58
|
+
"",
|
|
59
|
+
'import { other } from "./other.js";',
|
|
60
|
+
"",
|
|
61
|
+
"export const y = other();",
|
|
62
|
+
].join("\n"),
|
|
63
|
+
errors: [{ messageId: "hoist" }],
|
|
64
|
+
output: [
|
|
65
|
+
'import { helper } from "./helper.js";',
|
|
66
|
+
"",
|
|
67
|
+
'import { other } from "./other.js";',
|
|
68
|
+
"export const x = helper();",
|
|
69
|
+
"",
|
|
70
|
+
"",
|
|
71
|
+
"",
|
|
72
|
+
"export const y = other();",
|
|
73
|
+
].join("\n"),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "each late import is flagged once",
|
|
77
|
+
code: [
|
|
78
|
+
"export const x = 1;",
|
|
79
|
+
'import { helper } from "./helper.js";',
|
|
80
|
+
'import { other } from "./other.js";',
|
|
81
|
+
"",
|
|
82
|
+
"export const y = helper() + other();",
|
|
83
|
+
].join("\n"),
|
|
84
|
+
errors: [{ messageId: "hoist" }, { messageId: "hoist" }],
|
|
85
|
+
output: [
|
|
86
|
+
'import { helper } from "./helper.js";',
|
|
87
|
+
"export const x = 1;",
|
|
88
|
+
"",
|
|
89
|
+
'import { other } from "./other.js";',
|
|
90
|
+
"",
|
|
91
|
+
"export const y = helper() + other();",
|
|
92
|
+
].join("\n"),
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
});
|