@mostra/cli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/index.js +1 -1
- package/dist/reference/diagnostics.json +3 -3
- package/dist/reference/errors/MOSTRA_PLATFORM_UNSUPPORTED.md +3 -3
- package/dist/{run-BpVu5uQ8.js → run-3QZacDLc.js} +8 -12
- package/dist/run-3QZacDLc.js.map +1 -0
- package/dist/run-C5xFv-9Z.js +2 -0
- package/package.json +4 -4
- package/src/commands/admin.ts +1 -1
- package/src/platform.ts +6 -14
- package/src/run.ts +1 -1
- package/dist/run-BpVu5uQ8.js.map +0 -1
- package/dist/run-CC8PNXLU.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostra/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The mostra command: author, verify, publish, share and wait on agent artifacts, as a thin client of the Mostra host protocol.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "The Mostra Authors",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"provenance": true
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@mostra/protocol": "0.
|
|
38
|
-
"@mostra/sdk": "0.
|
|
37
|
+
"@mostra/protocol": "0.6.0",
|
|
38
|
+
"@mostra/sdk": "0.6.0",
|
|
39
39
|
"zod": "4.6.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@mostra/runtime": "0.
|
|
42
|
+
"@mostra/runtime": "0.6.0",
|
|
43
43
|
"@mostra/tools": "0.0.0",
|
|
44
44
|
"@types/node": "24.19.1",
|
|
45
45
|
"tsdown": "0.23.0",
|
package/src/commands/admin.ts
CHANGED
|
@@ -460,7 +460,7 @@ export const doctorCommand: CommandDef = defineCommand({
|
|
|
460
460
|
async run(context) {
|
|
461
461
|
const checks: DoctorCheck[] = [];
|
|
462
462
|
const node = Number(process.versions.node.split(".")[0]);
|
|
463
|
-
const unsupported = checkPlatform(process.platform, process.arch
|
|
463
|
+
const unsupported = checkPlatform(process.platform, process.arch);
|
|
464
464
|
checks.push(
|
|
465
465
|
unsupported === undefined
|
|
466
466
|
? {
|
package/src/platform.ts
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The CLI's platform gate (D35, D146, RT-07), the runtime's rule (`home/platform.ts` in
|
|
3
|
-
* `@mostra/runtime`) repeated where the CLI must decide before it reaches any runtime: macOS
|
|
4
|
-
* Linux
|
|
5
|
-
* `MOSTRA_DEV_WINDOWS=1`, which only Mostra's CI sets until WP-W3; everything else fails closed.
|
|
3
|
+
* `@mostra/runtime`) repeated where the CLI must decide before it reaches any runtime: macOS,
|
|
4
|
+
* Linux and Windows on x64 and arm64; everything else fails closed.
|
|
6
5
|
*/
|
|
7
6
|
import { createDiagnostic, type Diagnostic } from "@mostra/protocol";
|
|
8
|
-
import type { Environment } from "./home.ts";
|
|
9
7
|
|
|
10
8
|
/** `MOSTRA_PLATFORM_UNSUPPORTED` for a platform Mostra doesn't run on, else `undefined`. */
|
|
11
|
-
export function checkPlatform(
|
|
12
|
-
platform
|
|
13
|
-
arch
|
|
14
|
-
env: Environment,
|
|
15
|
-
): Diagnostic | undefined {
|
|
16
|
-
if (arch === "x64" || arch === "arm64") {
|
|
17
|
-
if (platform === "darwin" || platform === "linux") return undefined;
|
|
18
|
-
if (platform === "win32" && env["MOSTRA_DEV_WINDOWS"] === "1") return undefined;
|
|
19
|
-
}
|
|
9
|
+
export function checkPlatform(platform: string, arch: string): Diagnostic | undefined {
|
|
10
|
+
const supported = platform === "darwin" || platform === "linux" || platform === "win32";
|
|
11
|
+
if (supported && (arch === "x64" || arch === "arm64")) return undefined;
|
|
20
12
|
const name = platform === "win32" ? `Windows (${platform}-${arch})` : `${platform}-${arch}`;
|
|
21
13
|
return createDiagnostic("MOSTRA_PLATFORM_UNSUPPORTED", {
|
|
22
|
-
message: `Mostra doesn't run on ${name}; it supports macOS and
|
|
14
|
+
message: `Mostra doesn't run on ${name}; it supports macOS, Linux and Windows on x64 and arm64.`,
|
|
23
15
|
});
|
|
24
16
|
}
|
package/src/run.ts
CHANGED
|
@@ -143,7 +143,7 @@ export async function run(io: RunnerIo): Promise<number> {
|
|
|
143
143
|
|
|
144
144
|
// Every entry point fails closed on an unsupported platform before touching the home (D35).
|
|
145
145
|
const platform = io.platform ?? process.platform;
|
|
146
|
-
const unsupported = checkPlatform(platform, io.arch ?? process.arch
|
|
146
|
+
const unsupported = checkPlatform(platform, io.arch ?? process.arch);
|
|
147
147
|
if (unsupported) return fail(unsupported);
|
|
148
148
|
|
|
149
149
|
let parsed: ReturnType<typeof parseCommandLine>;
|