@kal-elsam/kairo-runtime 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kal-elsam/kairo-runtime",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Kairo Runtime — local agent operating system for Codex, Cursor, Claude, Gemini, Copilot, Engram, and Graphify.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/Kal-elSam/harness#readme",
@@ -184,7 +184,7 @@ require_cmd npm
184
184
  NODE_VERSION="$(node --version 2>/dev/null || true)"
185
185
  NPM_VERSION="$(npm --version 2>/dev/null || true)"
186
186
  GLOBAL_SPEC="$(resolve_global_spec)"
187
- GLOBAL_INSTALL_CMD="npm install -g ${GLOBAL_SPEC}"
187
+ GLOBAL_INSTALL_CMD="npm install -g --force ${GLOBAL_SPEC}"
188
188
  SETUP_CMD="${PREFERRED_CLI} setup ${SETUP_MODE}${SETUP_EXTRA:+ ${SETUP_EXTRA}}"
189
189
 
190
190
  printf '%s\n' \
@@ -224,7 +224,7 @@ fi
224
224
 
225
225
  printf '%s\n' "Installing global CLI..." ""
226
226
  # shellcheck disable=SC2086
227
- npm install -g ${GLOBAL_SPEC}
227
+ npm install -g --force ${GLOBAL_SPEC}
228
228
 
229
229
  KAIRO_BIN="$(resolve_kairo_bin || true)"
230
230
  if [ -z "$KAIRO_BIN" ]; then
@@ -2,6 +2,31 @@ import { fileURLToPath } from "node:url";
2
2
  import path from "node:path";
3
3
 
4
4
  const DEFAULT_REPO = "Kal-elSam/harness";
5
+ const LEGACY_HARNESS_MINOR_CUTOFF = 29;
6
+
7
+ function parseSemver(version) {
8
+ const match = /^(\d+)\.(\d+)\.(\d+)(?:-.+)?$/.exec(version);
9
+
10
+ if (!match) {
11
+ return null;
12
+ }
13
+
14
+ return {
15
+ major: Number(match[1]),
16
+ minor: Number(match[2]),
17
+ patch: Number(match[3])
18
+ };
19
+ }
20
+
21
+ export function usesLegacyHarnessTag(version) {
22
+ const semver = parseSemver(version);
23
+
24
+ if (!semver) {
25
+ return false;
26
+ }
27
+
28
+ return semver.major === 0 && semver.minor >= LEGACY_HARNESS_MINOR_CUTOFF;
29
+ }
5
30
 
6
31
  export function resolveInstallScriptRef({ version, tag = null }) {
7
32
  if (version === "latest") {
@@ -12,7 +37,11 @@ export function resolveInstallScriptRef({ version, tag = null }) {
12
37
  return tag;
13
38
  }
14
39
 
15
- return `v${version}`;
40
+ if (usesLegacyHarnessTag(version)) {
41
+ return `v${version}`;
42
+ }
43
+
44
+ return `kairo-runtime-v${version}`;
16
45
  }
17
46
 
18
47
  export function resolveInstallScriptUrl({