junobuild-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +37 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +24 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +6 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/changes.d.ts +41 -0
- package/dist/schemas/changes.d.ts.map +1 -0
- package/dist/schemas/changes.js +17 -0
- package/dist/schemas/changes.js.map +1 -0
- package/dist/schemas/common.d.ts +6 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +6 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/config.d.ts +41 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +16 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/emulator.d.ts +27 -0
- package/dist/schemas/emulator.d.ts.map +1 -0
- package/dist/schemas/emulator.js +13 -0
- package/dist/schemas/emulator.js.map +1 -0
- package/dist/schemas/functions.d.ts +72 -0
- package/dist/schemas/functions.d.ts.map +1 -0
- package/dist/schemas/functions.js +27 -0
- package/dist/schemas/functions.js.map +1 -0
- package/dist/schemas/hosting.d.ts +62 -0
- package/dist/schemas/hosting.d.ts.map +1 -0
- package/dist/schemas/hosting.js +22 -0
- package/dist/schemas/hosting.js.map +1 -0
- package/dist/schemas/identity.d.ts +42 -0
- package/dist/schemas/identity.d.ts.map +1 -0
- package/dist/schemas/identity.js +16 -0
- package/dist/schemas/identity.js.map +1 -0
- package/dist/schemas/modules.d.ts +63 -0
- package/dist/schemas/modules.d.ts.map +1 -0
- package/dist/schemas/modules.js +23 -0
- package/dist/schemas/modules.js.map +1 -0
- package/dist/schemas/snapshot.d.ts +86 -0
- package/dist/schemas/snapshot.d.ts.map +1 -0
- package/dist/schemas/snapshot.js +30 -0
- package/dist/schemas/snapshot.js.map +1 -0
- package/dist/tools/changes.d.ts +3 -0
- package/dist/tools/changes.d.ts.map +1 -0
- package/dist/tools/changes.js +64 -0
- package/dist/tools/changes.js.map +1 -0
- package/dist/tools/config.d.ts +3 -0
- package/dist/tools/config.d.ts.map +1 -0
- package/dist/tools/config.js +69 -0
- package/dist/tools/config.js.map +1 -0
- package/dist/tools/emulator.d.ts +3 -0
- package/dist/tools/emulator.d.ts.map +1 -0
- package/dist/tools/emulator.js +72 -0
- package/dist/tools/emulator.js.map +1 -0
- package/dist/tools/functions.d.ts +3 -0
- package/dist/tools/functions.d.ts.map +1 -0
- package/dist/tools/functions.js +96 -0
- package/dist/tools/functions.js.map +1 -0
- package/dist/tools/hosting.d.ts +3 -0
- package/dist/tools/hosting.d.ts.map +1 -0
- package/dist/tools/hosting.js +72 -0
- package/dist/tools/hosting.js.map +1 -0
- package/dist/tools/identity.d.ts +3 -0
- package/dist/tools/identity.d.ts.map +1 -0
- package/dist/tools/identity.js +71 -0
- package/dist/tools/identity.js.map +1 -0
- package/dist/tools/modules.d.ts +3 -0
- package/dist/tools/modules.d.ts.map +1 -0
- package/dist/tools/modules.js +77 -0
- package/dist/tools/modules.js.map +1 -0
- package/dist/tools/snapshot.d.ts +3 -0
- package/dist/tools/snapshot.d.ts.map +1 -0
- package/dist/tools/snapshot.js +104 -0
- package/dist/tools/snapshot.js.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const whoamiSchema: z.ZodObject<{
|
|
3
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
4
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
mode?: string | undefined;
|
|
7
|
+
profile?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
mode?: string | undefined;
|
|
10
|
+
profile?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const versionSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
13
|
+
export declare const openSatelliteSchema: z.ZodObject<{
|
|
14
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
15
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
16
|
+
browser: z.ZodOptional<z.ZodEnum<["chrome", "firefox", "edge"]>>;
|
|
17
|
+
console: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
console: boolean;
|
|
20
|
+
mode?: string | undefined;
|
|
21
|
+
profile?: string | undefined;
|
|
22
|
+
browser?: "chrome" | "firefox" | "edge" | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
mode?: string | undefined;
|
|
25
|
+
profile?: string | undefined;
|
|
26
|
+
browser?: "chrome" | "firefox" | "edge" | undefined;
|
|
27
|
+
console?: boolean | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const runScriptSchema: z.ZodObject<{
|
|
30
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
31
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
32
|
+
src: z.ZodString;
|
|
33
|
+
}, "strict", z.ZodTypeAny, {
|
|
34
|
+
src: string;
|
|
35
|
+
mode?: string | undefined;
|
|
36
|
+
profile?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
src: string;
|
|
39
|
+
mode?: string | undefined;
|
|
40
|
+
profile?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/schemas/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;EAEd,CAAC;AAEZ,eAAO,MAAM,aAAa,iDAAwB,CAAC;AAEnD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAIrB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;EAGjB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GlobalFlagsSchema } from "./common.js";
|
|
3
|
+
export const whoamiSchema = z.object({
|
|
4
|
+
...GlobalFlagsSchema
|
|
5
|
+
}).strict();
|
|
6
|
+
export const versionSchema = z.object({}).strict();
|
|
7
|
+
export const openSatelliteSchema = z.object({
|
|
8
|
+
browser: z.enum(["chrome", "firefox", "edge"]).optional().describe("Browser to open"),
|
|
9
|
+
console: z.boolean().default(false).describe("Open satellite in the console"),
|
|
10
|
+
...GlobalFlagsSchema
|
|
11
|
+
}).strict();
|
|
12
|
+
export const runScriptSchema = z.object({
|
|
13
|
+
src: z.string().describe("Path to your JavaScript or TypeScript script"),
|
|
14
|
+
...GlobalFlagsSchema
|
|
15
|
+
}).strict();
|
|
16
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/schemas/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACrF,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC7E,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACxE,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const moduleStartSchema: z.ZodObject<{
|
|
3
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
4
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
5
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
8
|
+
mode?: string | undefined;
|
|
9
|
+
profile?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
12
|
+
mode?: string | undefined;
|
|
13
|
+
profile?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const moduleStopSchema: z.ZodObject<{
|
|
16
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
17
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
18
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
19
|
+
}, "strict", z.ZodTypeAny, {
|
|
20
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
21
|
+
mode?: string | undefined;
|
|
22
|
+
profile?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
25
|
+
mode?: string | undefined;
|
|
26
|
+
profile?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const moduleUpgradeSchema: z.ZodObject<{
|
|
29
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
30
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
31
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
32
|
+
src: z.ZodOptional<z.ZodString>;
|
|
33
|
+
clearChunks: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
noSnapshot: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
reset: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
}, "strict", z.ZodTypeAny, {
|
|
37
|
+
clearChunks: boolean;
|
|
38
|
+
noSnapshot: boolean;
|
|
39
|
+
reset: boolean;
|
|
40
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
41
|
+
mode?: string | undefined;
|
|
42
|
+
profile?: string | undefined;
|
|
43
|
+
src?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
46
|
+
mode?: string | undefined;
|
|
47
|
+
profile?: string | undefined;
|
|
48
|
+
src?: string | undefined;
|
|
49
|
+
clearChunks?: boolean | undefined;
|
|
50
|
+
noSnapshot?: boolean | undefined;
|
|
51
|
+
reset?: boolean | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const moduleStatusSchema: z.ZodObject<{
|
|
54
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
55
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
mode?: string | undefined;
|
|
58
|
+
profile?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
mode?: string | undefined;
|
|
61
|
+
profile?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/schemas/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAGnB,CAAC;AAEZ,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAGlB,CAAC;AAEZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;EAEpB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GlobalFlagsSchema } from "./common.js";
|
|
3
|
+
const targetEnum = z.enum(["satellite", "s", "mission-control", "m", "orbiter", "o"]).describe("Module type");
|
|
4
|
+
export const moduleStartSchema = z.object({
|
|
5
|
+
target: targetEnum,
|
|
6
|
+
...GlobalFlagsSchema
|
|
7
|
+
}).strict();
|
|
8
|
+
export const moduleStopSchema = z.object({
|
|
9
|
+
target: targetEnum,
|
|
10
|
+
...GlobalFlagsSchema
|
|
11
|
+
}).strict();
|
|
12
|
+
export const moduleUpgradeSchema = z.object({
|
|
13
|
+
target: targetEnum,
|
|
14
|
+
src: z.string().optional().describe("Path to a specific local gzipped WASM file to publish"),
|
|
15
|
+
clearChunks: z.boolean().default(false).describe("Clear previously uploaded WASM chunks"),
|
|
16
|
+
noSnapshot: z.boolean().default(false).describe("Skip creating a snapshot before upgrading"),
|
|
17
|
+
reset: z.boolean().default(false).describe("Reset to the initial state"),
|
|
18
|
+
...GlobalFlagsSchema
|
|
19
|
+
}).strict();
|
|
20
|
+
export const moduleStatusSchema = z.object({
|
|
21
|
+
...GlobalFlagsSchema
|
|
22
|
+
}).strict();
|
|
23
|
+
//# sourceMappingURL=modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/schemas/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAE9G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,UAAU;IAClB,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,UAAU;IAClB,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC5F,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACzF,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC5F,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACxE,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,GAAG,iBAAiB;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const snapshotCreateSchema: z.ZodObject<{
|
|
3
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
4
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
5
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
8
|
+
mode?: string | undefined;
|
|
9
|
+
profile?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
12
|
+
mode?: string | undefined;
|
|
13
|
+
profile?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const snapshotDeleteSchema: z.ZodObject<{
|
|
16
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
17
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
18
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
19
|
+
}, "strict", z.ZodTypeAny, {
|
|
20
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
21
|
+
mode?: string | undefined;
|
|
22
|
+
profile?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
25
|
+
mode?: string | undefined;
|
|
26
|
+
profile?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const snapshotListSchema: z.ZodObject<{
|
|
29
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
30
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
31
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
34
|
+
mode?: string | undefined;
|
|
35
|
+
profile?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
38
|
+
mode?: string | undefined;
|
|
39
|
+
profile?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const snapshotDownloadSchema: z.ZodObject<{
|
|
42
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
43
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
44
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
47
|
+
mode?: string | undefined;
|
|
48
|
+
profile?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
51
|
+
mode?: string | undefined;
|
|
52
|
+
profile?: string | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const snapshotUploadSchema: z.ZodObject<{
|
|
55
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
56
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
57
|
+
dir: z.ZodString;
|
|
58
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
59
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
62
|
+
dir: string;
|
|
63
|
+
mode?: string | undefined;
|
|
64
|
+
profile?: string | undefined;
|
|
65
|
+
targetId?: string | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
68
|
+
dir: string;
|
|
69
|
+
mode?: string | undefined;
|
|
70
|
+
profile?: string | undefined;
|
|
71
|
+
targetId?: string | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const snapshotRestoreSchema: z.ZodObject<{
|
|
74
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
75
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
76
|
+
target: z.ZodEnum<["satellite", "s", "mission-control", "m", "orbiter", "o"]>;
|
|
77
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
79
|
+
mode?: string | undefined;
|
|
80
|
+
profile?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
target: "satellite" | "mission-control" | "orbiter" | "s" | "m" | "o";
|
|
83
|
+
mode?: string | undefined;
|
|
84
|
+
profile?: string | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/schemas/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAGtB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAGtB,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAGpB,CAAC;AAEZ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAGxB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAKtB,CAAC;AAEZ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAGvB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GlobalFlagsSchema } from "./common.js";
|
|
3
|
+
const targetEnum = z.enum(["satellite", "s", "mission-control", "m", "orbiter", "o"]).describe("Module type to snapshot");
|
|
4
|
+
export const snapshotCreateSchema = z.object({
|
|
5
|
+
target: targetEnum,
|
|
6
|
+
...GlobalFlagsSchema
|
|
7
|
+
}).strict();
|
|
8
|
+
export const snapshotDeleteSchema = z.object({
|
|
9
|
+
target: targetEnum,
|
|
10
|
+
...GlobalFlagsSchema
|
|
11
|
+
}).strict();
|
|
12
|
+
export const snapshotListSchema = z.object({
|
|
13
|
+
target: targetEnum,
|
|
14
|
+
...GlobalFlagsSchema
|
|
15
|
+
}).strict();
|
|
16
|
+
export const snapshotDownloadSchema = z.object({
|
|
17
|
+
target: targetEnum,
|
|
18
|
+
...GlobalFlagsSchema
|
|
19
|
+
}).strict();
|
|
20
|
+
export const snapshotUploadSchema = z.object({
|
|
21
|
+
dir: z.string().describe("Path to the snapshot directory containing metadata.json and chunks"),
|
|
22
|
+
target: targetEnum,
|
|
23
|
+
targetId: z.string().optional().describe("The module ID of a specific target to upload the snapshot to"),
|
|
24
|
+
...GlobalFlagsSchema
|
|
25
|
+
}).strict();
|
|
26
|
+
export const snapshotRestoreSchema = z.object({
|
|
27
|
+
target: targetEnum,
|
|
28
|
+
...GlobalFlagsSchema
|
|
29
|
+
}).strict();
|
|
30
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/schemas/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,iBAAiB,EA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appings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmE5D"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { execCli, formatResponse } from "../cli.js";
|
|
2
|
+
import { changesListSchema, changesApplySchema, changesRejectSchema } from "../schemas/changes.js";
|
|
3
|
+
export function registerChangesTools(server) {
|
|
4
|
+
server.registerTool("juno_changes_list", {
|
|
5
|
+
title: "Juno Changes List",
|
|
6
|
+
description: "List all submitted or applied changes to your module. By default shows only submitted (pending) changes. Use --all for full history and --every to include all statuses.",
|
|
7
|
+
inputSchema: changesListSchema.shape,
|
|
8
|
+
annotations: {
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true
|
|
13
|
+
}
|
|
14
|
+
}, async (params) => {
|
|
15
|
+
const args = [];
|
|
16
|
+
if (params.all)
|
|
17
|
+
args.push("-a");
|
|
18
|
+
if (params.every)
|
|
19
|
+
args.push("-e");
|
|
20
|
+
const result = await execCli("changes", ["list", ...args]);
|
|
21
|
+
return { content: [{ type: "text", text: formatResponse(result, "Changes List") }] };
|
|
22
|
+
});
|
|
23
|
+
server.registerTool("juno_changes_apply", {
|
|
24
|
+
title: "Juno Changes Apply",
|
|
25
|
+
description: "Apply a submitted change by its ID. Optionally create a snapshot before applying and verify the change hash for integrity.",
|
|
26
|
+
inputSchema: changesApplySchema.shape,
|
|
27
|
+
annotations: {
|
|
28
|
+
readOnlyHint: false,
|
|
29
|
+
destructiveHint: false,
|
|
30
|
+
idempotentHint: false,
|
|
31
|
+
openWorldHint: true
|
|
32
|
+
}
|
|
33
|
+
}, async (params) => {
|
|
34
|
+
const args = ["-i", params.id];
|
|
35
|
+
if (params.snapshot)
|
|
36
|
+
args.push("--snapshot");
|
|
37
|
+
if (params.hash)
|
|
38
|
+
args.push("--hash", params.hash);
|
|
39
|
+
if (params.keepStaged)
|
|
40
|
+
args.push("-k");
|
|
41
|
+
const result = await execCli("changes", ["apply", ...args]);
|
|
42
|
+
return { content: [{ type: "text", text: formatResponse(result, "Changes Apply") }] };
|
|
43
|
+
});
|
|
44
|
+
server.registerTool("juno_changes_reject", {
|
|
45
|
+
title: "Juno Changes Reject",
|
|
46
|
+
description: "Reject a submitted change by its ID. This prevents the change from being applied. Optionally verify the change hash for integrity.",
|
|
47
|
+
inputSchema: changesRejectSchema.shape,
|
|
48
|
+
annotations: {
|
|
49
|
+
readOnlyHint: false,
|
|
50
|
+
destructiveHint: true,
|
|
51
|
+
idempotentHint: false,
|
|
52
|
+
openWorldHint: true
|
|
53
|
+
}
|
|
54
|
+
}, async (params) => {
|
|
55
|
+
const args = ["-i", params.id];
|
|
56
|
+
if (params.hash)
|
|
57
|
+
args.push("--hash", params.hash);
|
|
58
|
+
if (params.keepStaged)
|
|
59
|
+
args.push("-k");
|
|
60
|
+
const result = await execCli("changes", ["reject", ...args]);
|
|
61
|
+
return { content: [{ type: "text", text: formatResponse(result, "Changes Reject") }] };
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.js","sourceRoot":"","sources":["../../src/tools/changes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEnG,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,0KAA0K;QACvL,WAAW,EAAE,iBAAiB,CAAC,KAAK;QACpC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe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BAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6E3D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { exec } from "node:child_process";
|
|
2
|
+
import { execCli, formatResponse } from "../cli.js";
|
|
3
|
+
import { configInitSchema, configApplySchema, createProjectSchema } from "../schemas/config.js";
|
|
4
|
+
export function registerConfigTools(server) {
|
|
5
|
+
server.registerTool("juno_config_init", {
|
|
6
|
+
title: "Juno Config Init",
|
|
7
|
+
description: "Create a juno.config file (TypeScript, JavaScript, or JSON) at the project root. This file defines satellite IDs, source directory, and other project settings needed for deployment.",
|
|
8
|
+
inputSchema: configInitSchema.shape,
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: true,
|
|
13
|
+
openWorldHint: false
|
|
14
|
+
}
|
|
15
|
+
}, async (params) => {
|
|
16
|
+
const flags = { mode: params.mode, profile: params.profile };
|
|
17
|
+
const args = [];
|
|
18
|
+
if (params.minimal)
|
|
19
|
+
args.push("--minimal");
|
|
20
|
+
const result = await execCli("config", ["init", ...args], flags);
|
|
21
|
+
return { content: [{ type: "text", text: formatResponse(result, "Config Init") }] };
|
|
22
|
+
});
|
|
23
|
+
server.registerTool("juno_config_apply", {
|
|
24
|
+
title: "Juno Config Apply",
|
|
25
|
+
description: "Apply the current juno.config file to your satellite. This is required after modifying settings like storage headers, datastore rules, authentication config, or collection definitions.",
|
|
26
|
+
inputSchema: configApplySchema.shape,
|
|
27
|
+
annotations: {
|
|
28
|
+
readOnlyHint: false,
|
|
29
|
+
destructiveHint: false,
|
|
30
|
+
idempotentHint: false,
|
|
31
|
+
openWorldHint: true
|
|
32
|
+
}
|
|
33
|
+
}, async (params) => {
|
|
34
|
+
const flags = { mode: params.mode, profile: params.profile };
|
|
35
|
+
const args = [];
|
|
36
|
+
if (params.force)
|
|
37
|
+
args.push("--force");
|
|
38
|
+
const result = await execCli("config", ["apply", ...args], flags);
|
|
39
|
+
return { content: [{ type: "text", text: formatResponse(result, "Config Apply") }] };
|
|
40
|
+
});
|
|
41
|
+
server.registerTool("juno_create_project", {
|
|
42
|
+
title: "Juno Create Project",
|
|
43
|
+
description: "Scaffold a new Juno project using `npm create juno@latest`. Creates a project directory with a chosen frontend framework template and Juno SDK pre-configured.",
|
|
44
|
+
inputSchema: createProjectSchema.shape,
|
|
45
|
+
annotations: {
|
|
46
|
+
readOnlyHint: false,
|
|
47
|
+
destructiveHint: false,
|
|
48
|
+
idempotentHint: false,
|
|
49
|
+
openWorldHint: false
|
|
50
|
+
}
|
|
51
|
+
}, async (params) => {
|
|
52
|
+
const pm = params.packageManager;
|
|
53
|
+
const args = [params.directory];
|
|
54
|
+
if (params.template)
|
|
55
|
+
args.push("--template", params.template);
|
|
56
|
+
const result = await new Promise((resolve) => {
|
|
57
|
+
const cmd = `${pm} create juno@latest ${args.join(" ")}`;
|
|
58
|
+
exec(cmd, { timeout: 120_000 }, (error, stdout, stderr) => {
|
|
59
|
+
resolve({
|
|
60
|
+
stdout: stdout ?? "",
|
|
61
|
+
stderr: stderr ?? "",
|
|
62
|
+
exitCode: error ? 1 : 0
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
return { content: [{ type: "text", text: formatResponse(result, "Create Project") }] };
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/tools/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhG,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,YA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AQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulator.d.ts","sourceRoot":"","sources":["../../src/tools/emulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkF7D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { execCli, formatResponse } from "../cli.js";
|
|
2
|
+
import { emulatorStartSchema, emulatorStopSchema, emulatorClearSchema, emulatorWaitSchema } from "../schemas/emulator.js";
|
|
3
|
+
import { EMULATOR_START_TIMEOUT } from "../constants.js";
|
|
4
|
+
export function registerEmulatorTools(server) {
|
|
5
|
+
server.registerTool("juno_emulator_start", {
|
|
6
|
+
title: "Juno Emulator Start",
|
|
7
|
+
description: "Start the local Juno emulator for development. The emulator provides a production-like environment with full support for data, authentication, storage, and serverless functions. Optionally specify language for building functions and enable watch mode.",
|
|
8
|
+
inputSchema: emulatorStartSchema.shape,
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: false,
|
|
13
|
+
openWorldHint: false
|
|
14
|
+
}
|
|
15
|
+
}, async (params) => {
|
|
16
|
+
const args = [];
|
|
17
|
+
if (params.lang)
|
|
18
|
+
args.push("-l", params.lang);
|
|
19
|
+
if (params.cargoPath)
|
|
20
|
+
args.push("--cargo-path", params.cargoPath);
|
|
21
|
+
if (params.sourcePath)
|
|
22
|
+
args.push("--source-path", params.sourcePath);
|
|
23
|
+
if (params.watch)
|
|
24
|
+
args.push("-w");
|
|
25
|
+
const result = await execCli("emulator", ["start", ...args], undefined, EMULATOR_START_TIMEOUT);
|
|
26
|
+
return { content: [{ type: "text", text: formatResponse(result, "Emulator Start") }] };
|
|
27
|
+
});
|
|
28
|
+
server.registerTool("juno_emulator_stop", {
|
|
29
|
+
title: "Juno Emulator Stop",
|
|
30
|
+
description: "Stop the running local Juno emulator network.",
|
|
31
|
+
inputSchema: emulatorStopSchema.shape,
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: false,
|
|
34
|
+
destructiveHint: false,
|
|
35
|
+
idempotentHint: true,
|
|
36
|
+
openWorldHint: false
|
|
37
|
+
}
|
|
38
|
+
}, async () => {
|
|
39
|
+
const result = await execCli("emulator", ["stop"]);
|
|
40
|
+
return { content: [{ type: "text", text: formatResponse(result, "Emulator Stop") }] };
|
|
41
|
+
});
|
|
42
|
+
server.registerTool("juno_emulator_clear", {
|
|
43
|
+
title: "Juno Emulator Clear",
|
|
44
|
+
description: "Clear the local emulator state including its volume and container. This resets all local data to a clean state.",
|
|
45
|
+
inputSchema: emulatorClearSchema.shape,
|
|
46
|
+
annotations: {
|
|
47
|
+
readOnlyHint: false,
|
|
48
|
+
destructiveHint: true,
|
|
49
|
+
idempotentHint: false,
|
|
50
|
+
openWorldHint: false
|
|
51
|
+
}
|
|
52
|
+
}, async () => {
|
|
53
|
+
const result = await execCli("emulator", ["clear"]);
|
|
54
|
+
return { content: [{ type: "text", text: formatResponse(result, "Emulator Clear") }] };
|
|
55
|
+
});
|
|
56
|
+
server.registerTool("juno_emulator_wait", {
|
|
57
|
+
title: "Juno Emulator Wait",
|
|
58
|
+
description: "Wait until the emulator is fully ready and accepting connections. Useful after starting the emulator to ensure it's operational before running other commands.",
|
|
59
|
+
inputSchema: emulatorWaitSchema.shape,
|
|
60
|
+
annotations: {
|
|
61
|
+
readOnlyHint: true,
|
|
62
|
+
destructiveHint: false,
|
|
63
|
+
idempotentHint: true,
|
|
64
|
+
openWorldHint: false
|
|
65
|
+
}
|
|
66
|
+
}, async (params) => {
|
|
67
|
+
const args = ["--timeout", String(params.timeout)];
|
|
68
|
+
const result = await execCli("emulator", ["wait", ...args], undefined, params.timeout + 5000);
|
|
69
|
+
return { content: [{ type: "text", text: formatResponse(result, "Emulator Wait") }] };
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=emulator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/tools/emulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC1H,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,6PAA6P;QAC1Q,WAAW,EAAE,mBAAmB,CAAC,KAAK;QACtC,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,IAAI,MAAM,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,MAAM,CAAC,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC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