@planu/cli 5.1.1 → 5.2.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cli/commands/doctor.d.ts +22 -0
  3. package/dist/cli/commands/doctor.js +176 -2
  4. package/dist/engine/autopilot/bootstrap.js +27 -0
  5. package/dist/engine/core-bridge.d.ts +28 -0
  6. package/dist/engine/core-bridge.js +67 -0
  7. package/dist/engine/drift-monitor.js +16 -18
  8. package/dist/engine/living-spec/hash-tracker.js +26 -28
  9. package/dist/engine/planu-core.darwin-arm64.node.manifest.json +7 -7
  10. package/dist/engine/planu-core.darwin-arm64.node.sbom.json +4 -4
  11. package/dist/engine/planu-core.darwin-x64.node.manifest.json +7 -7
  12. package/dist/engine/planu-core.darwin-x64.node.sbom.json +4 -4
  13. package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +7 -7
  14. package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +4 -4
  15. package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +7 -7
  16. package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +4 -4
  17. package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +7 -7
  18. package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +4 -4
  19. package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +7 -7
  20. package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +4 -4
  21. package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +7 -7
  22. package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +4 -4
  23. package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +7 -7
  24. package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +4 -4
  25. package/dist/engine/spec-language/english-only.d.ts +14 -0
  26. package/dist/engine/spec-language/english-only.js +58 -0
  27. package/dist/engine/spec-migrator/criteria-scanner.js +11 -13
  28. package/dist/engine/spec-migrator/drift-detector.js +10 -12
  29. package/dist/engine/vector-store/tfidf.d.ts +13 -9
  30. package/dist/engine/vector-store/tfidf.js +26 -0
  31. package/dist/engine/worker-config-loader.d.ts +1 -1
  32. package/dist/engine/worker-config-loader.js +1 -11
  33. package/dist/engine/workers/schema.d.ts +0 -8
  34. package/dist/engine/workers/schema.js +0 -1
  35. package/dist/i18n/index.d.ts +18 -0
  36. package/dist/i18n/index.js +40 -1
  37. package/dist/storage/global-store.d.ts +9 -0
  38. package/dist/storage/global-store.js +23 -0
  39. package/dist/storage/semantic-index-store.d.ts +23 -0
  40. package/dist/storage/semantic-index-store.js +105 -0
  41. package/dist/storage/status-store/self-healing.js +15 -17
  42. package/dist/tools/challenge-spec/scenarios-utils.js +5 -1
  43. package/dist/tools/create-spec.js +60 -15
  44. package/dist/tools/init-project/handler.js +78 -25
  45. package/dist/tools/learn.js +10 -8
  46. package/dist/tools/registry/auth.js +1 -11
  47. package/dist/tools/semantic-search-handler.js +5 -6
  48. package/dist/tools/status-handler.js +19 -6
  49. package/dist/tools/validation-loop-handler.js +16 -15
  50. package/dist/types/spec-language-translation.d.ts +18 -0
  51. package/dist/types/spec-language-translation.js +5 -0
  52. package/dist/types/spec-registry.d.ts +0 -2
  53. package/dist/types/status.d.ts +2 -0
  54. package/dist/types/vector-store.d.ts +18 -0
  55. package/dist/types/workers.d.ts +0 -3
  56. package/package.json +9 -9
  57. package/planu-native.json +8 -29
  58. package/planu-plugin.json +1 -1
  59. package/dist/engine/security/cve-refresher.d.ts +0 -12
  60. package/dist/engine/security/cve-refresher.js +0 -128
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "339ab4dad5834869aebc0130b8c63e0863d665daf0a98d8e795f08ea51bab51c"
14
+ "content": "931a0f6bc94744521f33e6ac46fb7293fe49b14d225d76446e27dd7117f12ad9"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-aarch64-unknown-linux-gnu",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-aarch64-unknown-linux-gnu",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "arm64",
18
18
  "libc": "glibc",
19
- "artifactSha256": "2542d4e3bae8c5a133b12ba13d8a0c993a538f348ecf706233485f3a306bca90",
19
+ "artifactSha256": "9cb0106828b7045ee7c4c4f70fbbcaabc67f09f1a3466a034b171c4e326cce4c",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-arm64-gnu.node.sbom.json",
23
- "sha256": "25f989810c53995c30a21a50c704a34474c27256db590ae51cac100ce35fcd26"
23
+ "sha256": "2204168dd49b9d8b05854175868efb7a38a00af37081451c273b8c5a4d34dc99"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "93RLQe2yAbcJh8j2gfJbQBv/BTTWX0DeGUJHLP6HbfOd6s0xtpWrjO0E7egpfso6uO34ZLD6aQ/M0kTtbBfMCg=="
36
+ "value": "sW/k0JsHybFw0odijKvzrpwNrYV9u58gCSE+IUdh6AAd810hXnmnmnnH4YugGOVhW8nLQyRhdEuimwwv5yn7Aw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "2542d4e3bae8c5a133b12ba13d8a0c993a538f348ecf706233485f3a306bca90"
14
+ "content": "9cb0106828b7045ee7c4c4f70fbbcaabc67f09f1a3466a034b171c4e326cce4c"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-aarch64-unknown-linux-musl",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-aarch64-unknown-linux-musl",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "arm64",
18
18
  "libc": "musl",
19
- "artifactSha256": "27daadea51d3517b399d38b202581d8305a9d8c5e70ce9610cabd7c17c0829e0",
19
+ "artifactSha256": "264f16f835f526770fc5cda53eb3eba3f5fa37c656a0e7759dd485d3500d1586",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-arm64-musl.node.sbom.json",
23
- "sha256": "8e530dc7631981619d307b862f92c5080d30c660a2f33161a58046c5231ea283"
23
+ "sha256": "67a2fcee3e745158d476fba6893d43b89861386e2e66c30af6a6db56e05909d5"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "n5TSEXesZev/RV5YkPBgs7tAan7bHgicPP6qBiQBcdb2bxsv29MnR379peX7Y3yzzC7SXPeReY/qTqmqAvhYBg=="
36
+ "value": "/cAY9D72vw0NV5qgc9/xcy1dn9N+FSY39fzTGKsdz9ZJziYoROvuhjeb927Mm1oELvCQKBi198AVypNdzyUFDA=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "27daadea51d3517b399d38b202581d8305a9d8c5e70ce9610cabd7c17c0829e0"
14
+ "content": "264f16f835f526770fc5cda53eb3eba3f5fa37c656a0e7759dd485d3500d1586"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-x86_64-unknown-linux-gnu",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-x86_64-unknown-linux-gnu",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "x64",
18
18
  "libc": "glibc",
19
- "artifactSha256": "ea63379c34998117ea301e635aa3654859b6ad91a0b905833b3bc11374cf84c9",
19
+ "artifactSha256": "828e4ca1e0aac93c5a3ae1c4f8a306cc7eb306e765ea459cb323359075fe19ec",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-x64-gnu.node.sbom.json",
23
- "sha256": "656e983e468fdc2428180bd064ba8cb93db5cf895cf87a44a056552e280f3641"
23
+ "sha256": "035c63d02524a08605052a620bdd97d27b07e08db791cd495a39274d74848013"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "OWDWv7CxpzTCEf/CRLzLJeQKwtRiL/0SU3UfIs7gJ+oi+c6r9LllBSgrIi58woPLny0lZAa1jYHDNT6NqUJMAg=="
36
+ "value": "l1u8RhJUsZO4qDxupk9ePmsfzp1AoQ78Qjujkk6HuJ3/3SyFAYSoLVK8L3QnM2kOIzga7fgkHfnk9iz4ebMWDw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "ea63379c34998117ea301e635aa3654859b6ad91a0b905833b3bc11374cf84c9"
14
+ "content": "828e4ca1e0aac93c5a3ae1c4f8a306cc7eb306e765ea459cb323359075fe19ec"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-x86_64-unknown-linux-musl",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-x86_64-unknown-linux-musl",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "x64",
18
18
  "libc": "musl",
19
- "artifactSha256": "f987d5d169ccd0326adcfbb03f78f87896f1e15dfd6db5484d0c7129d5ef0ce9",
19
+ "artifactSha256": "ecca8121c6a5d0163641a2f612736adb2dfa19d2d576f189b827c802426d1c6d",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-x64-musl.node.sbom.json",
23
- "sha256": "0ac824e4122bfd76300ca92e059687bbab4c2bd9c1fc95feaf69de7f90b3e129"
23
+ "sha256": "fafb2001aba46875a02bf13be9ed6931dc79d2a3f47659914c4a8c8637f6cf49"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "rqKJhE/atBoQnOkGJFjjk5mkYyw00+XTkNJH2vpnTA09fTPQ3K19wrRxVULioQYYkRNB/6W3JSCGZcRv4EeJCQ=="
36
+ "value": "yy7pcnf8jJzWrYp8gYHwG+Gbncuzx8PKYDAmsqdeXPSFCDuwDlkK8os3Arr0fJZp+uVWH4oFbYY4xuhf4/VsAw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "f987d5d169ccd0326adcfbb03f78f87896f1e15dfd6db5484d0c7129d5ef0ce9"
14
+ "content": "ecca8121c6a5d0163641a2f612736adb2dfa19d2d576f189b827c802426d1c6d"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-aarch64-pc-windows-msvc",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-aarch64-pc-windows-msvc",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "win32",
17
17
  "arch": "arm64",
18
18
  "libc": null,
19
- "artifactSha256": "44db6066ed29aedfdc6e4f2a940ec75a5bb38b47963cd83024f465293bfedc98",
19
+ "artifactSha256": "1e69721c524c6f6a970d4644c5483529bc6ec17f8174f4f418a5b9191a3a99ef",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.win32-arm64-msvc.node.sbom.json",
23
- "sha256": "5e6b815fce1aa7af3eb8ece295e1f0e6a0bac84615811c461cd54bf12e5a30f7"
23
+ "sha256": "bb526f914a2f60f431c01c953fe8cd0f02068f7faa5feb7d53289b4beb76e311"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "YneMkC+5A2C6ux44tKvBSk9t48xGIc383BY62DpJ6SIdBMwdFZlScMLFAOIXI4vd77ZrHFVI90QCeIHgbspJBQ=="
36
+ "value": "C/mDKI2Cq6Z/aMPgGQx5kESd4Ow363fsf/qzdtv/rLuAGMKeMy8ukvLyV7yYMB7BGrlNaGU4o1l5pD349v0UDw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "44db6066ed29aedfdc6e4f2a940ec75a5bb38b47963cd83024f465293bfedc98"
14
+ "content": "1e69721c524c6f6a970d4644c5483529bc6ec17f8174f4f418a5b9191a3a99ef"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.1.1",
4
- "engineVersion": "5.1.1",
5
- "buildId": "1-5.1.1-x86_64-pc-windows-msvc",
3
+ "cliVersion": "5.2.0",
4
+ "engineVersion": "5.2.0",
5
+ "buildId": "1-5.2.0-x86_64-pc-windows-msvc",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "win32",
17
17
  "arch": "x64",
18
18
  "libc": null,
19
- "artifactSha256": "301863177ab4858bbbcd6f1d5ac86af8f98c424512a54c28b5343c01c1bd377b",
19
+ "artifactSha256": "bb7d31e5232b18f0ec9e03196cffdc57e48ac6993b6df064ff85b60c37804b93",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.win32-x64-msvc.node.sbom.json",
23
- "sha256": "e8005e98ac68f02b8c8617c6dff112dd868f7cc6b5b8d9b9b67513bf58d1d201"
23
+ "sha256": "5c12145fab572d9432e20fda2e9d16ef0615db05c7c1b8c75448791f5442172b"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "5046eff43d23641fe60bd1c01e8c34277172db16",
27
+ "sourceCommit": "121065e63e9fd2c067367e286ecba619ecc3f18a",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "6tB0t8ghclHvFBbyGKGHG4QZ8TQ+xmAVm01BBbzC9MzVT/Cmy2Cf/KArHCK6Dsmur08z//zSNCLakiXShjRsDQ=="
36
+ "value": "M7Szjm7IuOAy5X01ppGd4i2s7JZ3elesGf0vQcdpvAzIohLkXn5htr3w4F8kmAKy4GhB5YK/P7sjwXpc8SSTAg=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.1.1",
7
+ "bom-ref": "pkg:cargo/planu-core@5.2.0",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.1.1",
10
+ "version": "5.2.0",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "301863177ab4858bbbcd6f1d5ac86af8f98c424512a54c28b5343c01c1bd377b"
14
+ "content": "bb7d31e5232b18f0ec9e03196cffdc57e48ac6993b6df064ff85b60c37804b93"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.1.1",
1109
+ "ref": "pkg:cargo/planu-core@5.2.0",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,4 +1,5 @@
1
1
  import type { EnglishOnlyArtifactKind, EnglishOnlyValidationResult } from '../../types/spec-language.js';
2
+ import type { EnglishOnlyGateResolution } from '../../types/spec-language-translation.js';
2
3
  /**
3
4
  * Validate that a Planu-owned persisted artifact is authored in English.
4
5
  *
@@ -12,5 +13,18 @@ export declare function validateEnglishOnlyArtifactText(text: string, kind?: Eng
12
13
  * Backward-compatible spec-specific entrypoint used by create_spec/update_status gates.
13
14
  */
14
15
  export declare function validateEnglishOnlySpecText(text: string): EnglishOnlyValidationResult;
16
+ /** clarificationAnswers key carrying the LLM-provided English translation of the spec title. */
17
+ export declare const TRANSLATED_TITLE_ANSWER_KEY = "Title-EN";
18
+ /** clarificationAnswers key carrying the LLM-provided English translation of the description. */
19
+ export declare const TRANSLATED_DESCRIPTION_ANSWER_KEY = "Desc-EN";
20
+ /**
21
+ * SPEC-1342: Resolve the English-only gate for create_spec's title/description.
22
+ *
23
+ * Instead of hard-rejecting non-English input, this offers one clarification round:
24
+ * the calling LLM is asked (via the existing clarificationAnswers mechanism) to supply
25
+ * the English translation inline. Only rejects if that translation is missing or itself
26
+ * still non-English after the round.
27
+ */
28
+ export declare function resolveEnglishOnlySpecGate(title: string, description: string, clarificationAnswers?: Record<string, string>): EnglishOnlyGateResolution;
15
29
  export declare function assertEnglishOnlyArtifactText(text: string, kind: EnglishOnlyArtifactKind): void;
16
30
  //# sourceMappingURL=english-only.d.ts.map
@@ -119,6 +119,64 @@ export function validateEnglishOnlyArtifactText(text, kind = 'spec') {
119
119
  export function validateEnglishOnlySpecText(text) {
120
120
  return validateEnglishOnlyArtifactText(text, 'spec');
121
121
  }
122
+ /** clarificationAnswers key carrying the LLM-provided English translation of the spec title. */
123
+ export const TRANSLATED_TITLE_ANSWER_KEY = 'Title-EN';
124
+ /** clarificationAnswers key carrying the LLM-provided English translation of the description. */
125
+ export const TRANSLATED_DESCRIPTION_ANSWER_KEY = 'Desc-EN';
126
+ /**
127
+ * SPEC-1342: Resolve the English-only gate for create_spec's title/description.
128
+ *
129
+ * Instead of hard-rejecting non-English input, this offers one clarification round:
130
+ * the calling LLM is asked (via the existing clarificationAnswers mechanism) to supply
131
+ * the English translation inline. Only rejects if that translation is missing or itself
132
+ * still non-English after the round.
133
+ */
134
+ export function resolveEnglishOnlySpecGate(title, description, clarificationAnswers) {
135
+ const validation = validateEnglishOnlySpecText(`${title}\n\n${description}`);
136
+ if (validation.ok) {
137
+ return { action: 'ok' };
138
+ }
139
+ const originalLanguage = validation.detectedLanguage === 'pt' ? 'pt' : 'es';
140
+ const titleAnswer = clarificationAnswers?.[TRANSLATED_TITLE_ANSWER_KEY]?.trim();
141
+ const descriptionAnswer = clarificationAnswers?.[TRANSLATED_DESCRIPTION_ANSWER_KEY]?.trim();
142
+ if (!titleAnswer || !descriptionAnswer) {
143
+ return {
144
+ action: 'ask',
145
+ originalLanguage,
146
+ questions: buildTranslationRequestQuestions(title),
147
+ };
148
+ }
149
+ const translatedValidation = validateEnglishOnlySpecText(`${titleAnswer}\n\n${descriptionAnswer}`);
150
+ if (!translatedValidation.ok) {
151
+ return { action: 'reject', originalLanguage, reason: validation.reason };
152
+ }
153
+ return {
154
+ action: 'translated',
155
+ originalLanguage,
156
+ englishTitle: titleAnswer,
157
+ englishDescription: descriptionAnswer,
158
+ };
159
+ }
160
+ function buildTranslationRequestQuestions(title) {
161
+ return [
162
+ {
163
+ question: `The spec title "${title}" is not in English. What is the English translation of the title?`,
164
+ header: TRANSLATED_TITLE_ANSWER_KEY,
165
+ options: [
166
+ { label: 'Provide translation', description: 'Type the English translation as free text.' },
167
+ ],
168
+ multiSelect: false,
169
+ },
170
+ {
171
+ question: 'What is the English translation of the spec description?',
172
+ header: TRANSLATED_DESCRIPTION_ANSWER_KEY,
173
+ options: [
174
+ { label: 'Provide translation', description: 'Type the English translation as free text.' },
175
+ ],
176
+ multiSelect: false,
177
+ },
178
+ ];
179
+ }
122
180
  export function assertEnglishOnlyArtifactText(text, kind) {
123
181
  const validation = validateEnglishOnlyArtifactText(text, kind);
124
182
  if (!validation.ok) {
@@ -2,7 +2,7 @@
2
2
  import { readFile, readdir, stat } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
4
  import { checkCriteriaQuality } from '../criteria-quality-checker.js';
5
- import { isNativeActive, fastScanSpecs } from '../core-bridge.js';
5
+ import { fastScanSpecsAsync } from '../core-bridge.js';
6
6
  const SPEC_DIR_RE = /^SPEC-\d+/;
7
7
  /** Extract YAML frontmatter content (between first and second ---). */
8
8
  function extractFrontmatterAndBody(content) {
@@ -43,18 +43,16 @@ function extractField(frontmatter, field) {
43
43
  * Returns an array of ambiguous criteria with context for LLM rewriting.
44
44
  */
45
45
  export async function scanForAmbiguousCriteria(projectPath) {
46
- if (isNativeActive()) {
47
- const briefs = fastScanSpecs(projectPath);
48
- if (briefs) {
49
- return briefs.flatMap((b) => b.ambiguousCriteria.map((a) => ({
50
- specId: a.specId,
51
- specTitle: a.specTitle,
52
- specContext: '', // Native scanner doesn't return full body context yet
53
- criterionText: a.criterionText,
54
- score: a.score,
55
- reason: a.reason,
56
- })));
57
- }
46
+ const { value: briefs } = await fastScanSpecsAsync(projectPath);
47
+ if (briefs) {
48
+ return briefs.flatMap((b) => b.ambiguousCriteria.map((a) => ({
49
+ specId: a.specId,
50
+ specTitle: a.specTitle,
51
+ specContext: '', // Native scanner doesn't return full body context yet
52
+ criterionText: a.criterionText,
53
+ score: a.score,
54
+ reason: a.reason,
55
+ })));
58
56
  }
59
57
  const ambiguous = [];
60
58
  const specsDir = join(projectPath, 'planu/specs');
@@ -2,7 +2,7 @@
2
2
  import { readdir, stat, access, readFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
4
  import { isOldFormat } from './lean-migration.js';
5
- import { isNativeActive, fastScanSpecs } from '../core-bridge.js';
5
+ import { fastScanSpecsAsync } from '../core-bridge.js';
6
6
  import { isCanonicalPlanuRootDir, isCanonicalPlanuRootFile, isCanonicalSpecFile, } from './planu-canonical-policy.js';
7
7
  async function scanPlanuRoot(projectPath) {
8
8
  const rootFiles = [];
@@ -82,22 +82,20 @@ export async function detectDrift(projectPath) {
82
82
  const specsDir = join(projectPath, 'planu', 'specs');
83
83
  const unifiedSpecs = [];
84
84
  const leanSpecs = [];
85
- if (isNativeActive()) {
86
- const briefs = fastScanSpecs(projectPath);
87
- if (briefs) {
88
- for (const b of briefs) {
89
- if (b.needsUnified) {
90
- unifiedSpecs.push(b.id);
91
- }
92
- if (b.needsLean) {
93
- leanSpecs.push(b.id);
94
- }
85
+ const { value: briefs } = await fastScanSpecsAsync(projectPath);
86
+ if (briefs) {
87
+ for (const b of briefs) {
88
+ if (b.needsUnified) {
89
+ unifiedSpecs.push(b.id);
90
+ }
91
+ if (b.needsLean) {
92
+ leanSpecs.push(b.id);
95
93
  }
96
94
  }
97
95
  }
98
96
  const rootFiles = await scanPlanuRoot(projectPath);
99
97
  const specDirEntries = await readdir(specsDir).catch(() => []);
100
- if (isNativeActive()) {
98
+ if (briefs) {
101
99
  for (const entry of specDirEntries) {
102
100
  const specPath = join(specsDir, entry);
103
101
  try {
@@ -1,4 +1,6 @@
1
- import type { TFIDFConfig } from '../../types/index.js';
1
+ import type { TFIDFConfig, TFIDFExportedState } from '../../types/index.js';
2
+ /** Bumped when the exported state shape changes; persisted stores rebuild on mismatch. */
3
+ export declare const TFIDF_SCHEMA_VERSION = 1;
2
4
  /** Tokenize text: split on whitespace/punctuation, split camelCase, lowercase, remove stop words. */
3
5
  export declare function tokenize(text: string, stopWords?: Set<string>): string[];
4
6
  /** TF-IDF engine: stateful, maintains vocabulary (IDF) across documents. */
@@ -22,14 +24,16 @@ export declare class TFIDFEngine {
22
24
  /** Get document count in corpus. */
23
25
  getDocumentCount(): number;
24
26
  /** Export state for serialization. */
25
- exportState(): {
26
- docFreq: [string, number][];
27
- docCount: number;
28
- };
27
+ exportState(): TFIDFExportedState;
29
28
  /** Import state from serialized form. */
30
- importState(state: {
31
- docFreq: [string, number][];
32
- docCount: number;
33
- }): void;
29
+ importState(state: TFIDFExportedState): void;
30
+ /**
31
+ * Remove a document's contribution to the corpus (SPEC-1345: incremental
32
+ * updates). `tokens` must be the unique token set the document contributed
33
+ * when it was added via `addDocument` — callers persisting the index keep
34
+ * this alongside the content hash so a changed document can be decremented
35
+ * before its new version is added back in.
36
+ */
37
+ removeDocument(tokens: string[]): void;
34
38
  }
35
39
  //# sourceMappingURL=tfidf.d.ts.map