@kl-c/matrixos 0.1.0 → 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.
package/bin/matrixos.js CHANGED
@@ -5,7 +5,7 @@
5
5
  import { spawnSync } from "node:child_process";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import { createRequire } from "node:module";
8
- import { basename } from "node:path";
8
+ import { basename, join } from "node:path";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import {
11
11
  getPlatformPackageCandidates,
@@ -173,6 +173,42 @@ function main() {
173
173
  .filter((entry) => entry !== null);
174
174
 
175
175
  if (resolvedBinaries.length === 0) {
176
+ // MaTrixOS runs without a separately-published platform binary:
177
+ // fall back to the bundled CLI in this wrapper package (bun, then node).
178
+ const wrapperRoot = getWrapperPackageRoot();
179
+ const localCli = join(wrapperRoot, "dist", "cli", "index.js");
180
+ const localNodeCli = join(wrapperRoot, "dist", "cli-node", "index.js");
181
+
182
+ if (existsSync(localCli)) {
183
+ const fallbackEnv = {
184
+ ...process.env,
185
+ OMO_INVOCATION_NAME: invocationName,
186
+ OMO_WRAPPER_PACKAGE_ROOT: wrapperRoot,
187
+ };
188
+ const bunBinary = process.env.BUN_BINARY || "bun";
189
+ const bunResult = spawnSync(bunBinary, [localCli, ...process.argv.slice(2)], {
190
+ stdio: "inherit",
191
+ env: fallbackEnv,
192
+ });
193
+ if (!bunResult.error) {
194
+ if (bunResult.signal) process.exit(getSignalExitCode(bunResult.signal));
195
+ process.exit(bunResult.status ?? 1);
196
+ }
197
+ if (existsSync(localNodeCli)) {
198
+ const nodeResult = spawnSync(process.execPath, [localNodeCli, ...process.argv.slice(2)], {
199
+ stdio: "inherit",
200
+ env: fallbackEnv,
201
+ });
202
+ if (!nodeResult.error) {
203
+ if (nodeResult.signal) process.exit(getSignalExitCode(nodeResult.signal));
204
+ process.exit(nodeResult.status ?? 1);
205
+ }
206
+ }
207
+ console.error(`\noh-my-opencode: No runtime available to launch the bundled CLI.`);
208
+ console.error(` Install bun (https://bun.sh) or node, then retry.\n`);
209
+ process.exit(2);
210
+ }
211
+
176
212
  console.error(`\noh-my-opencode: Platform binary not installed.`);
177
213
  console.error(`\nYour platform: ${platform}-${arch}${libcFamily === "musl" ? "-musl" : ""}`);
178
214
  console.error(`Expected packages (in order): ${packageCandidates.join(", ")}`);
package/dist/cli/index.js CHANGED
@@ -2145,7 +2145,7 @@ var package_default;
2145
2145
  var init_package = __esm(() => {
2146
2146
  package_default = {
2147
2147
  name: "@kl-c/matrixos",
2148
- version: "0.1.0",
2148
+ version: "0.1.1",
2149
2149
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
2150
2150
  main: "./dist/index.js",
2151
2151
  types: "dist/index.d.ts",
@@ -2145,7 +2145,7 @@ var package_default;
2145
2145
  var init_package = __esm(() => {
2146
2146
  package_default = {
2147
2147
  name: "@kl-c/matrixos",
2148
- version: "0.1.0",
2148
+ version: "0.1.1",
2149
2149
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
2150
2150
  main: "./dist/index.js",
2151
2151
  types: "dist/index.d.ts",
package/dist/index.js CHANGED
@@ -367926,7 +367926,7 @@ function getCachedVersion(options = {}) {
367926
367926
  // package.json
367927
367927
  var package_default = {
367928
367928
  name: "@kl-c/matrixos",
367929
- version: "0.1.0",
367929
+ version: "0.1.1",
367930
367930
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
367931
367931
  main: "./dist/index.js",
367932
367932
  types: "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kl-c/matrixos",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MaTrixOS — Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",