@mstar-harness/cli 1.8.1 → 1.8.2

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.
@@ -2343,11 +2343,6 @@ var require_commander = __commonJS((exports) => {
2343
2343
  exports.InvalidOptionArgumentError = InvalidArgumentError;
2344
2344
  });
2345
2345
 
2346
- // src/index.ts
2347
- import fs8 from "fs";
2348
- import path10 from "path";
2349
- import { fileURLToPath } from "url";
2350
-
2351
2346
  // ../../node_modules/@inquirer/core/dist/lib/key.js
2352
2347
  var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
2353
2348
  var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
@@ -4031,6 +4026,7 @@ import path4 from "node:path";
4031
4026
  // src/utils.ts
4032
4027
  import fs from "node:fs";
4033
4028
  import path2 from "node:path";
4029
+ import { fileURLToPath } from "node:url";
4034
4030
  function ensureObject(value) {
4035
4031
  if (value && typeof value === "object" && !Array.isArray(value))
4036
4032
  return value;
@@ -4061,6 +4057,15 @@ function resolveProjectRoot() {
4061
4057
  return path2.resolve(candidate);
4062
4058
  return process.cwd();
4063
4059
  }
4060
+ function readHarnessVersion() {
4061
+ const packageJsonPath = path2.resolve(path2.dirname(fileURLToPath(import.meta.url)), "../package.json");
4062
+ try {
4063
+ const parsed = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
4064
+ return parsed.version || "0.0.0";
4065
+ } catch {
4066
+ return "0.0.0";
4067
+ }
4068
+ }
4064
4069
 
4065
4070
  // src/adapters/shared-install.ts
4066
4071
  import fs2 from "node:fs";
@@ -4894,7 +4899,6 @@ var MARKETPLACE_ID = "mstar-local";
4894
4899
  var MARKETPLACE_NAME2 = "mstar-local";
4895
4900
  var MARKETPLACE_DESCRIPTION = "Morning Star harness marketplace (GitHub source).";
4896
4901
  var PLUGIN_DESCRIPTION = "Multi-agent code harness framework with unified skills for OpenCode, Cursor, Codex, Kimi Code, and ZCode.";
4897
- var PLUGIN_VERSION = "1.6.0";
4898
4902
  var PLUGIN_CATEGORY2 = "Productivity";
4899
4903
  var GITHUB_REPO = "btspoony/mstar-harness";
4900
4904
  var GITHUB_REF = "main";
@@ -4914,7 +4918,7 @@ function marketplacePluginEntry() {
4914
4918
  name: PLUGIN_NAME,
4915
4919
  source: { ...GITHUB_SOURCE },
4916
4920
  description: PLUGIN_DESCRIPTION,
4917
- version: PLUGIN_VERSION,
4921
+ version: readHarnessVersion(),
4918
4922
  category: PLUGIN_CATEGORY2
4919
4923
  };
4920
4924
  }
@@ -4981,8 +4985,9 @@ function validateMarketplaceJson() {
4981
4985
  if (source.repo !== expected.source.repo) {
4982
4986
  errors2.push(`ZCode marketplace plugin source.repo must be ${expected.source.repo}.`);
4983
4987
  }
4984
- if (entry.version !== PLUGIN_VERSION) {
4985
- errors2.push(`ZCode marketplace plugin version must be ${PLUGIN_VERSION}.`);
4988
+ const expectedVersion = readHarnessVersion();
4989
+ if (entry.version !== expectedVersion) {
4990
+ errors2.push(`ZCode marketplace plugin version must be ${expectedVersion}.`);
4986
4991
  }
4987
4992
  return errors2;
4988
4993
  }
@@ -5109,6 +5114,7 @@ var SUPPORTED_TARGETS = ["opencode", "cursor", "codex", "zcode", "omp"];
5109
5114
  // src/utils.ts
5110
5115
  import fs7 from "node:fs";
5111
5116
  import path9 from "node:path";
5117
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
5112
5118
  function parseCsv(raw) {
5113
5119
  if (!raw)
5114
5120
  return;
@@ -5133,17 +5139,18 @@ function writeJson2(filePath, value) {
5133
5139
  fs7.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}
5134
5140
  `, "utf8");
5135
5141
  }
5136
-
5137
- // src/index.ts
5138
- var packageJsonPath = path10.resolve(path10.dirname(fileURLToPath(import.meta.url)), "../package.json");
5139
- var packageVersion = (() => {
5142
+ function readHarnessVersion2() {
5143
+ const packageJsonPath = path9.resolve(path9.dirname(fileURLToPath2(import.meta.url)), "../package.json");
5140
5144
  try {
5141
- const parsed = JSON.parse(fs8.readFileSync(packageJsonPath, "utf8"));
5145
+ const parsed = JSON.parse(fs7.readFileSync(packageJsonPath, "utf8"));
5142
5146
  return parsed.version || "0.0.0";
5143
5147
  } catch {
5144
5148
  return "0.0.0";
5145
5149
  }
5146
- })();
5150
+ }
5151
+
5152
+ // src/index.ts
5153
+ var packageVersion = readHarnessVersion2();
5147
5154
  var program2 = new Command;
5148
5155
  function logStep(message) {
5149
5156
  console.log(import_picocolors.default.cyan(message));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/cli",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Morning Star harness installer CLI (OpenCode, Cursor, Codex, ZCode, omp).",
5
5
  "license": "MIT",
6
6
  "repository": {