@corca-org/ceal-host 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 ADDED
@@ -0,0 +1,5 @@
1
+ # @corca-org/ceal-host
2
+
3
+ The Ceal Host lifecycle client for Linux and macOS arm64. Install it with `npm install -g @corca-org/ceal-host`, then activate the adjacent signed bundle with `ceal-host install`.
4
+
5
+ Use `npm update -g @corca-org/ceal-host && ceal-host update` to update, and `ceal-host uninstall && npm uninstall -g @corca-org/ceal-host` to remove it.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import { launch } from "./launch.js"; await launch({ meta: "ceal-host", product: "ceal-host", supported: ["linux-x64", "linux-arm64", "darwin-arm64"], binaryName: "ceal-host" });
package/bin/launch.js ADDED
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Meta-package bin/launch.js files are replaced with this module during
3
+ * assembly. The tracked bridge points here for source-tree development; the
4
+ * published copy is self-contained and never imports ../../shared/launch.js.
5
+ */
6
+ import process from "node:process";
7
+ import { createRequire } from "node:module";
8
+ import { dirname, join } from "node:path";
9
+ import { constants as osConstants } from "node:os";
10
+ import { spawn } from "node:child_process";
11
+
12
+ const require = createRequire(import.meta.url);
13
+
14
+ export function launch(input) {
15
+ const platform = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
16
+ if (!input.supported.includes(platform)) return refuse(input.product, `unsupported platform ${platform}; supported platforms: ${input.supported.join(", ")}.`);
17
+ let packageRoot;
18
+ try {
19
+ packageRoot = dirname(require.resolve(`@corca-org/${input.meta}-${platform}/package.json`));
20
+ } catch {
21
+ return refuse(input.product, `platform package @corca-org/${input.meta}-${platform} is unavailable for ${platform}; supported platforms: ${input.supported.join(", ")}.`);
22
+ }
23
+ const executableName = process.platform === "win32" ? `${input.binaryName}.exe` : input.binaryName;
24
+ const launcherPath = process.env.CEAL_LAUNCHER_PATH ?? process.argv[1] ?? null;
25
+ const child = spawn(join(packageRoot, "bin", executableName), process.argv.slice(2), {
26
+ stdio: "inherit",
27
+ windowsHide: process.platform === "win32" ? false : undefined,
28
+ env: { ...process.env, ...(launcherPath === null ? {} : { CEAL_LAUNCHER_PATH: launcherPath }) },
29
+ });
30
+ child.once("error", (error) => {
31
+ process.stderr.write(`${input.product}: could not start the platform binary: ${error.message}\n`);
32
+ process.exit(1);
33
+ });
34
+ child.once("exit", (code, signal) => {
35
+ if (signal !== null && process.platform !== "win32") {
36
+ process.kill(process.pid, signal);
37
+ process.exit(128 + (osConstants.signals[signal] ?? 1));
38
+ }
39
+ process.exit(code ?? 1);
40
+ });
41
+ }
42
+
43
+ function refuse(product, message) {
44
+ process.stderr.write(`${product}: ${message}\n`);
45
+ process.exit(1);
46
+ }
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@corca-org/ceal-host",
3
+ "version": "1.0.0",
4
+ "description": "The Ceal Host lifecycle client",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=22.19.0"
9
+ },
10
+ "bin": {
11
+ "ceal-host": "bin/ceal-host.js"
12
+ },
13
+ "optionalDependencies": {
14
+ "@corca-org/ceal-host-linux-x64": "1.0.0",
15
+ "@corca-org/ceal-host-linux-arm64": "1.0.0",
16
+ "@corca-org/ceal-host-darwin-arm64": "1.0.0"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public",
20
+ "provenance": true
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/corca-ai/ceal.git"
25
+ },
26
+ "files": [
27
+ "bin",
28
+ "bin/launch.js",
29
+ "README.md"
30
+ ]
31
+ }