@getmikk/intent-engine 2.0.12 → 2.0.14

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": "@getmikk/intent-engine",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -216,4 +216,11 @@ describe('PreflightPipeline', () => {
216
216
  )
217
217
  expect(suggestion).toBeDefined()
218
218
  })
219
+
220
+ test('pipeline approval flag is consistent with conflict severity', async () => {
221
+ const pipeline = new PreflightPipeline(mockContract, mockLock)
222
+ const result = await pipeline.run('move verifyToken to api module')
223
+ const hasErrors = result.conflicts.conflicts.some(c => c.severity === 'error')
224
+ expect(result.approved).toBe(!hasErrors)
225
+ })
219
226
  })
@@ -137,6 +137,12 @@ describe('SemanticSearcher', () => {
137
137
  }
138
138
  })
139
139
 
140
+ test('result IDs are unique in a single query response', async () => {
141
+ const results = await searcher.search('token', mockLock, 4)
142
+ const ids = results.map(r => r.id)
143
+ expect(new Set(ids).size).toBe(ids.length)
144
+ })
145
+
140
146
  test('topK limits the number of results', async () => {
141
147
  const results = await searcher.search('function', mockLock, 2)
142
148
  expect(results.length).toBeLessThanOrEqual(2)
@@ -3,3 +3,7 @@ import { expect, test } from "bun:test";
3
3
  test("smoke test - intent-engine", () => {
4
4
  expect(true).toBe(true);
5
5
  });
6
+
7
+ test("intent-engine test runtime is Bun", () => {
8
+ expect(typeof process.versions.bun).toBe("string");
9
+ });