@getmikk/intent-engine 2.0.0 → 2.0.11

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 ADDED
@@ -0,0 +1,55 @@
1
+ # @getmikk/intent-engine
2
+
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 1217e39: chore: synchronize all packages to v2.0.1 and finalize release infrastructure.
8
+ - Updated dependencies [1217e39]
9
+ - @getmikk/core@2.0.4
10
+
11
+ ## 2.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - 06a410b: chore: synchronize monorepo to v2.0.1 and finalize release infrastructure.
16
+ - Updated dependencies [06a410b]
17
+ - @getmikk/core@2.0.3
18
+
19
+ ## 2.0.2
20
+
21
+ ### Patch Changes
22
+
23
+ - 5dfe317: test
24
+ - 9118944: test
25
+ - 36bbb2f: test
26
+ - fe8ac06: chore: synchronize all packages to v2.0.1 and finalize release infrastructure.
27
+ - b00faed: test
28
+ - Updated dependencies [5dfe317]
29
+ - Updated dependencies [9118944]
30
+ - Updated dependencies [36bbb2f]
31
+ - Updated dependencies [fe8ac06]
32
+ - Updated dependencies [b00faed]
33
+ - @getmikk/core@2.0.2
34
+
35
+ ## 2.0.1
36
+
37
+ ### Patch Changes
38
+
39
+ - bd5c050: 2.0.1
40
+ - 0ccbf45: 2.0.1
41
+ - Updated dependencies [bd5c050]
42
+ - Updated dependencies [ff1444f]
43
+ - Updated dependencies [0ccbf45]
44
+ - @getmikk/core@2.0.1
45
+
46
+ ## 3.0.0
47
+
48
+ ### Major Changes
49
+
50
+ - 568a3d5: 2.0.0
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [568a3d5]
55
+ - @getmikk/core@3.0.0
package/package.json CHANGED
@@ -1,33 +1,38 @@
1
1
  {
2
- "name": "@getmikk/intent-engine",
3
- "version": "2.0.0",
4
- "license": "Apache-2.0",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/Ansh-dhanani/mikk"
8
- },
9
- "type": "module",
10
- "main": "./dist/index.js",
11
- "types": "./dist/index.d.ts",
12
- "exports": {
13
- ".": {
14
- "import": "./dist/index.js",
15
- "types": "./dist/index.d.ts"
16
- }
17
- },
18
- "scripts": {
19
- "build": "tsc",
20
- "test": "bun test",
21
- "dev": "tsc --watch"
22
- },
23
- "dependencies": {
24
- "@getmikk/core": "^2.0.0",
25
- "zod": "^3.22.0",
26
- "@xenova/transformers": "^2.17.2"
27
- },
28
- "devDependencies": {
29
- "@types/bun": "^1.3.10",
30
- "@types/node": "^22.0.0",
31
- "typescript": "^5.7.0"
2
+ "name": "@getmikk/intent-engine",
3
+ "version": "2.0.11",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/Ansh-dhanani/mikk"
12
+ },
13
+ "type": "module",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.js",
20
+ "types": "./dist/index.d.ts"
32
21
  }
22
+ },
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "test": "bun test",
26
+ "dev": "tsc --watch",
27
+ "lint": "bunx eslint --config ../../eslint.config.mjs ."
28
+ },
29
+ "dependencies": {
30
+ "@getmikk/core": "^2.0.11",
31
+ "zod": "^3.22.0"
32
+ },
33
+ "devDependencies": {
34
+ "typescript": "^5.7.0",
35
+ "@types/node": "^22.0.0",
36
+ "eslint": "^9.39.2"
37
+ }
33
38
  }
@@ -1,7 +1,16 @@
1
- import { describe, test, expect } from 'bun:test'
1
+ import { describe, test, expect, mock } from 'bun:test'
2
2
  import { IntentInterpreter } from '../src/interpreter'
3
3
  import { ConflictDetector } from '../src/conflict-detector'
4
4
  import { PreflightPipeline } from '../src/preflight'
5
+
6
+ // Mock @xenova/transformers to prevent native library crashes in CI
7
+ mock.module('@xenova/transformers', () => ({
8
+ pipeline: async () => {
9
+ return async (inputs: string[]) => {
10
+ return inputs.map(() => ({ data: new Float32Array(384).fill(0.1) }))
11
+ }
12
+ }
13
+ }))
5
14
  import type { MikkContract, MikkLock } from '@getmikk/core'
6
15
 
7
16
  const mockContract: MikkContract = {
@@ -1,10 +1,32 @@
1
- import { describe, test, expect, beforeAll } from 'bun:test'
1
+ import { describe, test, expect, beforeAll, mock } from 'bun:test'
2
2
  import { SemanticSearcher } from '../src/semantic-searcher'
3
3
  import type { MikkLock } from '@getmikk/core'
4
4
  import * as path from 'node:path'
5
5
  import * as os from 'node:os'
6
6
  import * as fs from 'node:fs/promises'
7
7
 
8
+ // Mock @xenova/transformers to prevent network downloads and native crashes in CI
9
+ mock.module('@xenova/transformers', () => ({
10
+ pipeline: async () => {
11
+ // Precise keyword mapping to ensure ranking tests pass deterministically
12
+ return async (inputs: string[]) => {
13
+ return inputs.map(input => {
14
+ const vec = new Float32Array(384).fill(0)
15
+ const low = input.toLowerCase()
16
+ // Use distinct indices for distinct concepts
17
+ if (low.includes('jwt') || low.includes('token') || low.includes('authenticate')) vec[0] = 1.0
18
+ if (low.includes('email') || low.includes('welcome')) vec[1] = 1.0
19
+ if (low.includes('save') || low.includes('database') || low.includes('persist')) vec[2] = 1.0
20
+ if (low.includes('login') || low.includes('http')) vec[3] = 1.0
21
+
22
+ // Ensure the vector is non-zero to avoid indexing issues
23
+ if (vec[0] === 0 && vec[1] === 0 && vec[2] === 0 && vec[3] === 0) vec[10] = 1.0
24
+ return { data: vec }
25
+ })
26
+ }
27
+ }
28
+ }))
29
+
8
30
  // ── Minimal mock lock ─────────────────────────────────────────────────────────
9
31
  const mockLock: MikkLock = {
10
32
  version: '1.0.0',