kiro-spec-engine 1.45.2 → 1.45.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/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.45.4] - 2026-02-13
11
+
12
+ ### Fixed
13
+ - **Version upgrade path fallback**: `checkCompatibility()` and `calculateUpgradePath()` now use semver-based logic for versions not in the legacy compatibility matrix, fixing `Unknown source version: 1.45.2` error when running `kse upgrade`
14
+
15
+ ## [1.45.3] - 2026-02-13
16
+
17
+ ### Fixed
18
+ - **Self-dependency removed**: Removed erroneous `kiro-spec-engine` self-dependency from `package.json` that caused npm to install stale old versions inside the package, resulting in `error: unknown command 'orchestrate'` and other missing commands in target projects
19
+
10
20
  ## [1.45.2] - 2026-02-13
11
21
 
12
22
  ### Fixed
@@ -175,11 +175,40 @@ class VersionManager {
175
175
  };
176
176
  }
177
177
 
178
- // Check compatibility matrix
178
+ // Check compatibility matrix first
179
179
  const fromInfo = COMPATIBILITY_MATRIX[fromVersion];
180
180
 
181
- if (!fromInfo) {
182
- // Unknown version - assume incompatible
181
+ if (fromInfo) {
182
+ const isCompatible = fromInfo.compatible.includes(toVersion);
183
+ return {
184
+ compatible: isCompatible,
185
+ breaking: !isCompatible || fromInfo.breaking,
186
+ migration: !isCompatible ? 'required' : 'none'
187
+ };
188
+ }
189
+
190
+ // Fallback: semver-based compatibility for versions not in matrix
191
+ try {
192
+ const fromMajor = semver.major(fromVersion);
193
+ const toMajor = semver.major(toVersion);
194
+
195
+ if (fromMajor === toMajor) {
196
+ // Same major version — compatible, non-breaking
197
+ return {
198
+ compatible: true,
199
+ breaking: false,
200
+ migration: 'none'
201
+ };
202
+ }
203
+
204
+ // Different major version — breaking change
205
+ return {
206
+ compatible: false,
207
+ breaking: true,
208
+ migration: 'required'
209
+ };
210
+ } catch (error) {
211
+ // Invalid semver — assume incompatible
183
212
  return {
184
213
  compatible: false,
185
214
  breaking: true,
@@ -187,14 +216,6 @@ class VersionManager {
187
216
  message: `Unknown source version: ${fromVersion}`
188
217
  };
189
218
  }
190
-
191
- const isCompatible = fromInfo.compatible.includes(toVersion);
192
-
193
- return {
194
- compatible: isCompatible,
195
- breaking: !isCompatible || fromInfo.breaking,
196
- migration: !isCompatible ? 'required' : 'none'
197
- };
198
219
  }
199
220
 
200
221
  /**
@@ -224,20 +245,39 @@ class VersionManager {
224
245
  const fromIndex = allVersions.indexOf(fromVersion);
225
246
  const toIndex = allVersions.indexOf(toVersion);
226
247
 
227
- if (fromIndex === -1) {
228
- throw new Error(`Unknown source version: ${fromVersion}`);
229
- }
230
-
231
- if (toIndex === -1) {
232
- throw new Error(`Unknown target version: ${toVersion}`);
248
+ // If both versions are in the matrix, use the matrix path
249
+ if (fromIndex !== -1 && toIndex !== -1) {
250
+ if (fromIndex > toIndex) {
251
+ throw new Error('Cannot downgrade versions');
252
+ }
253
+ return allVersions.slice(fromIndex, toIndex + 1);
233
254
  }
234
255
 
235
- if (fromIndex > toIndex) {
236
- throw new Error('Cannot downgrade versions');
256
+ // Fallback: semver-based direct upgrade for versions not in matrix
257
+ try {
258
+ const from = semver.valid(fromVersion);
259
+ const to = semver.valid(toVersion);
260
+
261
+ if (!from) {
262
+ throw new Error(`Unknown source version: ${fromVersion}`);
263
+ }
264
+ if (!to) {
265
+ throw new Error(`Unknown target version: ${toVersion}`);
266
+ }
267
+
268
+ if (semver.gt(fromVersion, toVersion)) {
269
+ throw new Error('Cannot downgrade versions');
270
+ }
271
+
272
+ // Direct upgrade path
273
+ return [fromVersion, toVersion];
274
+ } catch (error) {
275
+ // Re-throw our own errors
276
+ if (error.message.includes('Unknown') || error.message.includes('downgrade')) {
277
+ throw error;
278
+ }
279
+ throw new Error(`Unknown source version: ${fromVersion}`);
237
280
  }
238
-
239
- // Return all versions from source to target (inclusive)
240
- return allVersions.slice(fromIndex, toIndex + 1);
241
281
  }
242
282
 
243
283
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiro-spec-engine",
3
- "version": "1.45.2",
3
+ "version": "1.45.4",
4
4
  "description": "kiro-spec-engine (kse) - A CLI tool and npm package for spec-driven development with AI coding assistants. NOT the Kiro IDE desktop application.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -74,7 +74,6 @@
74
74
  "fs-extra": "^10.0.0",
75
75
  "inquirer": "^8.2.0",
76
76
  "js-yaml": "^4.1.1",
77
- "kiro-spec-engine": "^1.7.0",
78
77
  "minimatch": "^10.1.1",
79
78
  "path": "^0.12.7",
80
79
  "semver": "^7.5.4",