stratagents 0.0.0-stage → 0.1.1

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.
Files changed (3) hide show
  1. package/bin/strata.js +35 -0
  2. package/package.json +19 -4
  3. package/README.md +0 -3
package/bin/strata.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ // Strata's npm launcher (PLAN 5.3). npm installs only the platform package that matches this
3
+ // machine (its `os` and `cpu` fields); this file finds its binary, checks it against the
4
+ // SHA-256 written into this file at release time, and runs it with the same arguments.
5
+ "use strict";
6
+ const { spawnSync } = require("node:child_process");
7
+ const crypto = require("node:crypto");
8
+ const fs = require("node:fs");
9
+
10
+ const NAME = "stratagents";
11
+ const SHA256 = {"darwin-arm64":"f9199ee5b061f60f91998a77d692f1b3d1c2a0b02bb549b4cf8e38e152521f30","linux-x64":"193d2e537326198890ef794a42a8aaddb2f0a9c75ea122fc742dcc4d0b6806ea","linux-arm64":"ab157b3ba243611028039684050d7fc1cbc0490664430cee2d4ffc8c9598f6ed"};
12
+ const platform = `${process.platform}-${process.arch}`;
13
+
14
+ let bin;
15
+ try {
16
+ bin = require.resolve(`${NAME}-${platform}/bin/strata`);
17
+ } catch {
18
+ console.error(
19
+ `strata: no build for ${platform} (builds: ${Object.keys(SHA256).join(", ")}). ` +
20
+ `If yours is listed, reinstall without --no-optional / --omit=optional.`,
21
+ );
22
+ process.exit(1);
23
+ }
24
+ const sum = crypto.createHash("sha256").update(fs.readFileSync(bin)).digest("hex");
25
+ if (sum !== SHA256[platform]) {
26
+ console.error(`strata: ${bin} does not match the checksum this release shipped with; reinstall it.`);
27
+ process.exit(1);
28
+ }
29
+ const run = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
30
+ if (run.error) {
31
+ console.error(`strata: cannot run ${bin}: ${run.error.message}`);
32
+ process.exit(1);
33
+ }
34
+ if (run.signal) process.kill(process.pid, run.signal);
35
+ process.exit(run.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "stratagents",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Shared type checker, dependency seeding and dev-server routing for parallel coding agents",
5
+ "repository": "https://github.com/C01-Dev/strata",
6
+ "license": "MIT OR Apache-2.0",
7
+ "bin": {
8
+ "strata": "bin/strata.js"
9
+ },
10
+ "files": [
11
+ "bin/strata.js"
12
+ ],
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "optionalDependencies": {
17
+ "stratagents-darwin-arm64": "0.1.1",
18
+ "stratagents-linux-x64": "0.1.1",
19
+ "stratagents-linux-arm64": "0.1.1"
20
+ }
21
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.