@mycadet/cli 0.13.0-dev.202610290231.835a903 → 0.13.0-dev.202610291822.708cf19
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/avatar-manifest/package.json +1 -1
- package/node_modules/@mycadet/environments/package.json +1 -1
- package/node_modules/@mycadet/environments/src/test-path-guard.ts +1 -1
- 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/test-path-guard.ts +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/shared/package.json +1 -1
- package/node_modules/@mycadet/local-mode/package.json +1 -1
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.ts +31 -0
- package/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/shared/package.json +1 -1
- package/package.json +2 -1
- package/src/__tests__/app-command.test.ts +3 -3
- package/src/__tests__/{nginx-ingress.test.ts → nginx.test.ts} +73 -136
- package/src/__tests__/retire-local.test.ts +3 -3
- package/src/__tests__/tunnel-startup-summary.test.ts +5 -5
- package/src/__tests__/tunnel.test.ts +7 -7
- package/src/__tests__/wake.test.ts +3 -3
- package/src/commands/app.ts +1 -1
- package/src/commands/hatch.ts +10 -0
- package/src/commands/ps.ts +4 -4
- package/src/commands/retire.ts +1 -1
- package/src/commands/sleep.ts +0 -13
- package/src/commands/tunnel.ts +1 -1
- package/src/lib/constants.ts +1 -0
- package/src/lib/local.ts +0 -4
- package/src/lib/remotes/baseten/Dockerfile +68 -0
- package/src/lib/remotes/baseten/api.test.ts +243 -0
- package/src/lib/remotes/baseten/api.ts +227 -0
- package/src/lib/remotes/baseten/baseten-cli.ts +33 -0
- package/src/lib/remotes/baseten/context.test.ts +77 -0
- package/src/lib/remotes/baseten/context.ts +108 -0
- package/src/lib/remotes/baseten/entrypoint.sh +22 -0
- package/src/lib/remotes/baseten/index.ts +91 -0
- package/src/lib/retire-local.ts +1 -1
- package/src/lib/{nginx-ingress.ts → servers/nginx.ts} +128 -183
- package/src/lib/statefulset.ts +0 -1
- package/src/lib/tunnel.ts +3 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* destructively write live state. The tmpdir redirection normally comes from
|
|
9
9
|
* each package's bunfig.toml test preload, but bun only loads bunfig from
|
|
10
10
|
* the cwd, so `bun test` run from any other directory skips the preload and
|
|
11
|
-
* inherits the ambient env
|
|
11
|
+
* inherits the ambient env. The containment
|
|
12
12
|
* assertion therefore lives in production code, where it fires no matter how
|
|
13
13
|
* the test process was launched.
|
|
14
14
|
*
|
package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/test-path-guard.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* destructively write live state. The tmpdir redirection normally comes from
|
|
9
9
|
* each package's bunfig.toml test preload, but bun only loads bunfig from
|
|
10
10
|
* the cwd, so `bun test` run from any other directory skips the preload and
|
|
11
|
-
* inherits the ambient env
|
|
11
|
+
* inherits the ambient env. The containment
|
|
12
12
|
* assertion therefore lives in production code, where it fires no matter how
|
|
13
13
|
* the test process was launched.
|
|
14
14
|
*
|
|
@@ -64,6 +64,37 @@ export const SENSITIVE_KEYS = [
|
|
|
64
64
|
"guardianBootstrapSecret",
|
|
65
65
|
] as const;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* The runtime config a shell injects (`window.__CADET_CONFIG__`). This schema
|
|
69
|
+
* is the single shape: hosts stamp it, served bundles parse the window
|
|
70
|
+
* through it instead of re-declaring per-file object types.
|
|
71
|
+
*
|
|
72
|
+
* The URL fields are distinct origins in the topology, not synonyms:
|
|
73
|
+
* `cloudUrl` is the cloud API base and `hubUrl` the cloud hub SPA the
|
|
74
|
+
* pairing/settings pages link back to. The cloud login base is
|
|
75
|
+
* deliberately absent: the loopback handoff reads it from the build's
|
|
76
|
+
* environment seed (see startLoopbackAuth), keeping this config to the
|
|
77
|
+
* origins a served bundle can't infer.
|
|
78
|
+
*/
|
|
79
|
+
export const InjectedConfigSchema = z.object({
|
|
80
|
+
/** Nothing injected (SSR) or an unparseable config means the local cadet. */
|
|
81
|
+
remote: RemoteSchema.catch("local"),
|
|
82
|
+
/** Cloud API base (auth endpoints + assistant API). */
|
|
83
|
+
cloudUrl: z.string().optional(),
|
|
84
|
+
/** Device id stamped by the Electron host (device management). */
|
|
85
|
+
deviceId: z.string().optional(),
|
|
86
|
+
/** Version of the shell bundle serving this page (stamped by the host). */
|
|
87
|
+
version: z.string().optional(),
|
|
88
|
+
/** Serving assistant's id, stamped by every host that fronts one assistant. */
|
|
89
|
+
assistantId: z.string().optional(),
|
|
90
|
+
/** Serving assistant's display name, stamped by every host that fronts one assistant. */
|
|
91
|
+
assistantName: z.string().optional(),
|
|
92
|
+
/** Cloud web SPA base for this build's environment (remote-web ingress configs only). */
|
|
93
|
+
hubUrl: z.string().optional(),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export type InjectedConfig = z.infer<typeof InjectedConfigSchema>;
|
|
97
|
+
|
|
67
98
|
/**
|
|
68
99
|
* Strip every `SENSITIVE_KEYS` field from a parsed lockfile, in place: from
|
|
69
100
|
* each assistant entry and from that entry's `resources`. The one redaction
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mycadet/cli",
|
|
3
|
-
"version": "0.13.0-dev.
|
|
3
|
+
"version": "0.13.0-dev.202610291822.708cf19",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/vargasjr-dev/mycadet-temp.git"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@mycadet/shared": "file:../packages/shared",
|
|
43
43
|
"chalk": "5.6.2",
|
|
44
44
|
"ink": "6.8.0",
|
|
45
|
+
"jszip": "3.10.1",
|
|
45
46
|
"nanoid": "5.1.7",
|
|
46
47
|
"qrcode-terminal": "0.12.0",
|
|
47
48
|
"react": "19.2.6",
|
|
@@ -18,7 +18,7 @@ import { join } from "node:path";
|
|
|
18
18
|
// ---------------------------------------------------------------------------
|
|
19
19
|
|
|
20
20
|
import * as tunnelLib from "../lib/tunnel.js";
|
|
21
|
-
import * as nginxIngress from "../lib/nginx
|
|
21
|
+
import * as nginxIngress from "../lib/servers/nginx.js";
|
|
22
22
|
|
|
23
23
|
const ensureNginxForEdgeMock = mock(tunnelLib.ensureNginxForEdge);
|
|
24
24
|
const ensureAppServerMock = mock(nginxIngress.ensureAppServer);
|
|
@@ -30,7 +30,7 @@ mock.module("../lib/tunnel.js", () => ({
|
|
|
30
30
|
...tunnelLib,
|
|
31
31
|
ensureNginxForEdge: ensureNginxForEdgeMock,
|
|
32
32
|
}));
|
|
33
|
-
mock.module("../lib/nginx
|
|
33
|
+
mock.module("../lib/servers/nginx.js", () => ({
|
|
34
34
|
...nginxIngress,
|
|
35
35
|
ensureAppServer: ensureAppServerMock,
|
|
36
36
|
isIngressRunning: isIngressRunningMock,
|
|
@@ -40,7 +40,7 @@ mock.module("../lib/nginx-ingress.js", () => ({
|
|
|
40
40
|
|
|
41
41
|
afterAll(() => {
|
|
42
42
|
mock.module("../lib/tunnel.js", () => tunnelLib);
|
|
43
|
-
mock.module("../lib/nginx
|
|
43
|
+
mock.module("../lib/servers/nginx.js", () => nginxIngress);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
import { app } from "../commands/app.js";
|