@thaloz/t3 0.0.47 → 0.1.5

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 CHANGED
@@ -1,19 +1,7 @@
1
- # Thaloz Code CLI
1
+ # @thaloz/t3
2
2
 
3
- Connect a worker to your Thaloz account:
3
+ Install with `npm install -g @thaloz/t3`, then run `thz`.
4
4
 
5
- ```sh
6
- npx @thaloz/t3@latest connect
7
- ```
5
+ New releases support `thz service install` with verified runtime downloads from https://updates.thalozlabs.com/releases/download.
8
6
 
9
- Follow the browser sign-in and accept background-service setup to keep the worker online.
10
- For a permanent command:
11
-
12
- ```sh
13
- npm install -g @thaloz/t3@latest
14
- thz connect
15
- ```
16
-
17
- Use `@thaloz/t3@nightly` for QA builds. Node and npm are required for
18
- installation; the worker runtime is bundled. Supported platforms are Apple Silicon
19
- macOS, Linux x64, and Windows x64. This package uses Thaloz Connect.
7
+ The immutable 0.0.54 recovery package supports foreground use, but refuses managed installation and all `service`, `connect`, `update`, hidden service and legacy managed entrypoints. Connect onboarding and updates can install or reconcile a service too. Its original executable defaults to upstream downloads after the service manager discards the npm wrapper's environment. Use a newer Thaloz release for managed workers and Connect setup. Existing 0.0.54 services require a persistent Thaloz origin in their service configuration; see the repository's release backfill and recovery procedure.
package/bin/t3.js ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ const thalozPackage = require("../package.json");
4
+ if (thalozPackage.version === "0.0.54" && (false || process.argv.slice(2).some((arg) => ["service", "connect", "update", "__service-launcher", "__service-preflight"].includes(arg)))) {
5
+ process.stderr.write("thz: managed installation of the immutable 0.0.54 recovery package is disabled: its service would lose the Thaloz download origin. Install a newer Thaloz release for managed services.\n");
6
+ process.exit(1);
7
+ }
8
+ process.env.T3CODE_RELEASE_BASE_URL ||= "https://updates.thalozlabs.com/releases/download";
9
+ const { spawnSync } = require("node:child_process");
10
+ const { constants } = require("node:os");
11
+ const { dirname, join } = require("node:path");
12
+
13
+ const SUPPORTED = ["darwin-arm64", "linux-x64", "win32-x64"];
14
+ const key = process.platform + "-" + process.arch;
15
+
16
+ let packageDir;
17
+ try {
18
+ packageDir = dirname(require.resolve("@thaloz/t3-" + key + "/package.json"));
19
+ } catch {
20
+ process.stderr.write(
21
+ [
22
+ "t3: no T3 Code CLI build is available for this platform (" + key + ").",
23
+ "Supported platforms: " + SUPPORTED.join(", ") + ".",
24
+ "If yours is listed, reinstall @thaloz/t3 so npm fetches its optional dependency.",
25
+ "The desktop app and release archives are at https://updates.thalozlabs.com/releases/download",
26
+ "",
27
+ ].join("\n"),
28
+ );
29
+ process.exit(1);
30
+ }
31
+
32
+ const executable = join(packageDir, process.platform === "win32" ? "t3.exe" : "t3");
33
+ const result = spawnSync(executable, process.argv.slice(2), { stdio: "inherit" });
34
+ if (result.error) {
35
+ process.stderr.write("t3: failed to start " + executable + ": " + result.error.message + "\n");
36
+ process.exit(1);
37
+ }
38
+ // A child killed by a signal has no status; report it the way a shell would.
39
+ process.exit(result.status ?? 128 + (constants.signals[result.signal] || 1));
package/dist/bin.mjs CHANGED
@@ -1,3 +1,10 @@
1
+ import { createRequire as thalozCreateRequire } from "node:module";
2
+ const thalozPackage = thalozCreateRequire(import.meta.url)("../package.json");
3
+ if (thalozPackage.version === "0.0.54" && (true || process.argv.slice(2).some((arg) => ["service", "connect", "update", "__service-launcher", "__service-preflight"].includes(arg)))) {
4
+ process.stderr.write("thz: managed installation of the immutable 0.0.54 recovery package is disabled: its service would lose the Thaloz download origin. Install a newer Thaloz release for managed services.\n");
5
+ process.exit(1);
6
+ }
7
+ process.env.T3CODE_RELEASE_BASE_URL ||= "https://updates.thalozlabs.com/releases/download";
1
8
  import { spawn } from "node:child_process";
2
9
  import { constants } from "node:os";
3
10
  import { dirname, join } from "node:path";
@@ -11,7 +18,7 @@ const child = spawn(executable, process.argv.slice(2), {
11
18
  });
12
19
  const fail = (error) => {
13
20
  if (!error) return;
14
- process.stderr.write("thz: " + error.message + "\n");
21
+ process.stderr.write("t3: " + error.message + "\n");
15
22
  child.kill("SIGTERM");
16
23
  process.exitCode = 1;
17
24
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@thaloz/t3",
3
- "version": "0.0.47",
4
- "description": "Thaloz Code CLI. Installs the self-contained executable for this platform.",
3
+ "version": "0.1.5",
4
+ "description": "T3 Code CLI. Installs the self-contained executable for this platform.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -9,19 +9,15 @@
9
9
  "directory": "apps/server"
10
10
  },
11
11
  "bin": {
12
- "thz": "./bin/thz.js"
12
+ "thz": "./bin/t3.js"
13
13
  },
14
14
  "files": [
15
15
  "bin",
16
16
  "dist"
17
17
  ],
18
18
  "optionalDependencies": {
19
- "@thaloz/t3-darwin-arm64": "0.0.47",
20
- "@thaloz/t3-linux-x64": "0.0.47",
21
- "@thaloz/t3-win32-x64": "0.0.47"
22
- },
23
- "publishConfig": {
24
- "access": "public",
25
- "registry": "https://registry.npmjs.org/"
19
+ "@thaloz/t3-darwin-arm64": "0.1.5",
20
+ "@thaloz/t3-linux-x64": "0.1.5",
21
+ "@thaloz/t3-win32-x64": "0.1.5"
26
22
  }
27
23
  }
package/bin/thz.js DELETED
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- const { spawnSync } = require("node:child_process");
4
- const { constants } = require("node:os");
5
- const { dirname, join } = require("node:path");
6
- const supported = ["darwin-arm64","linux-x64","win32-x64"];
7
- const key = process.platform + "-" + process.arch;
8
- let packageDir;
9
- try {
10
- packageDir = dirname(require.resolve("@thaloz/t3-" + key + "/package.json"));
11
- } catch {
12
- process.stderr.write("thz: no Thaloz CLI build is installed for " + key + ".\nSupported platforms: " + supported.join(", ") + ".\nReinstall @thaloz/t3 to restore its optional dependency.\n");
13
- process.exit(1);
14
- }
15
- const executable = join(packageDir, process.platform === "win32" ? "t3.exe" : "t3");
16
- const result = spawnSync(executable, process.argv.slice(2), { stdio: "inherit" });
17
- if (result.error) {
18
- process.stderr.write("thz: " + result.error.message + "\n");
19
- process.exit(1);
20
- }
21
- process.exit(result.status ?? 128 + (constants.signals[result.signal] || 1));