@singbox-iac/cli 0.1.6 → 0.1.8

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 (82) hide show
  1. package/README-en.md +24 -1
  2. package/README.md +24 -1
  3. package/dist/cli/commands/apply.js +21 -9
  4. package/dist/cli/commands/apply.js.map +1 -1
  5. package/dist/cli/commands/author.d.ts +3 -0
  6. package/dist/cli/commands/author.js +25 -3
  7. package/dist/cli/commands/author.js.map +1 -1
  8. package/dist/cli/commands/history.d.ts +2 -0
  9. package/dist/cli/commands/history.js +21 -0
  10. package/dist/cli/commands/history.js.map +1 -0
  11. package/dist/cli/commands/proxifier.js +60 -5
  12. package/dist/cli/commands/proxifier.js.map +1 -1
  13. package/dist/cli/commands/rollback.d.ts +2 -0
  14. package/dist/cli/commands/rollback.js +38 -0
  15. package/dist/cli/commands/rollback.js.map +1 -0
  16. package/dist/cli/commands/setup.js +24 -4
  17. package/dist/cli/commands/setup.js.map +1 -1
  18. package/dist/cli/commands/update.js +8 -0
  19. package/dist/cli/commands/update.js.map +1 -1
  20. package/dist/cli/commands/use.js +7 -0
  21. package/dist/cli/commands/use.js.map +1 -1
  22. package/dist/cli/commands/verify.js +72 -20
  23. package/dist/cli/commands/verify.js.map +1 -1
  24. package/dist/cli/index.js +6 -0
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/domain/dns-plan.d.ts +27 -0
  27. package/dist/domain/dns-plan.js +2 -0
  28. package/dist/domain/dns-plan.js.map +1 -0
  29. package/dist/domain/intent.d.ts +61 -0
  30. package/dist/domain/intent.js +2 -0
  31. package/dist/domain/intent.js.map +1 -0
  32. package/dist/domain/runtime-mode.d.ts +8 -0
  33. package/dist/domain/runtime-mode.js +2 -0
  34. package/dist/domain/runtime-mode.js.map +1 -0
  35. package/dist/domain/transaction.d.ts +12 -0
  36. package/dist/domain/transaction.js +2 -0
  37. package/dist/domain/transaction.js.map +1 -0
  38. package/dist/domain/verification-plan.d.ts +34 -0
  39. package/dist/domain/verification-plan.js +2 -0
  40. package/dist/domain/verification-plan.js.map +1 -0
  41. package/dist/modules/authoring/index.d.ts +4 -0
  42. package/dist/modules/authoring/index.js +50 -21
  43. package/dist/modules/authoring/index.js.map +1 -1
  44. package/dist/modules/build/index.d.ts +3 -0
  45. package/dist/modules/build/index.js +8 -1
  46. package/dist/modules/build/index.js.map +1 -1
  47. package/dist/modules/compiler/index.d.ts +2 -2
  48. package/dist/modules/compiler/index.js +38 -53
  49. package/dist/modules/compiler/index.js.map +1 -1
  50. package/dist/modules/dns-plan/index.d.ts +10 -0
  51. package/dist/modules/dns-plan/index.js +104 -0
  52. package/dist/modules/dns-plan/index.js.map +1 -0
  53. package/dist/modules/intent/index.d.ts +7 -0
  54. package/dist/modules/intent/index.js +101 -0
  55. package/dist/modules/intent/index.js.map +1 -0
  56. package/dist/modules/natural-language/index.d.ts +5 -0
  57. package/dist/modules/natural-language/index.js +52 -9
  58. package/dist/modules/natural-language/index.js.map +1 -1
  59. package/dist/modules/preview/index.d.ts +4 -0
  60. package/dist/modules/preview/index.js +3 -0
  61. package/dist/modules/preview/index.js.map +1 -1
  62. package/dist/modules/proxifier/index.d.ts +15 -4
  63. package/dist/modules/proxifier/index.js +146 -40
  64. package/dist/modules/proxifier/index.js.map +1 -1
  65. package/dist/modules/runtime-mode/index.d.ts +18 -0
  66. package/dist/modules/runtime-mode/index.js +72 -0
  67. package/dist/modules/runtime-mode/index.js.map +1 -0
  68. package/dist/modules/transactions/index.d.ts +20 -0
  69. package/dist/modules/transactions/index.js +150 -0
  70. package/dist/modules/transactions/index.js.map +1 -0
  71. package/dist/modules/update/index.d.ts +1 -0
  72. package/dist/modules/update/index.js +22 -6
  73. package/dist/modules/update/index.js.map +1 -1
  74. package/dist/modules/verification/index.d.ts +42 -0
  75. package/dist/modules/verification/index.js +274 -0
  76. package/dist/modules/verification/index.js.map +1 -1
  77. package/dist/modules/verification-plan/index.d.ts +9 -0
  78. package/dist/modules/verification-plan/index.js +117 -0
  79. package/dist/modules/verification-plan/index.js.map +1 -0
  80. package/docs/natural-language-authoring.md +36 -0
  81. package/docs/proxifier-onboarding.md +14 -0
  82. package/package.json +2 -1
@@ -178,12 +178,48 @@ and writes a new staging config.
178
178
 
179
179
  With `--preview`, the command does not write anything. Instead it prints:
180
180
 
181
+ - Intent IR diff
181
182
  - rules diff
182
183
  - builder config diff
183
184
  - staging config diff
184
185
 
185
186
  This is the safest way to inspect what a prompt or local AI CLI would change before touching your local files.
186
187
 
188
+ ## Audit-Friendly Flags
189
+
190
+ Use these flags when you want stronger control over one-sentence authoring:
191
+
192
+ - `--strict`
193
+ Reject vague language instead of guessing. This is recommended for production changes.
194
+ - `--diff`
195
+ Print the `IntentIR` diff, rules diff, builder config diff, and staging config diff without writing files.
196
+ - `--emit-intent-ir`
197
+ Print the generated `IntentIR` JSON and exit without touching local files.
198
+
199
+ Examples:
200
+
201
+ ```bash
202
+ ./node_modules/.bin/tsx src/cli/index.ts use \
203
+ 'GitHub 这类开发类都走香港,Gemini 走新加坡' \
204
+ --strict --diff
205
+ ```
206
+
207
+ ```bash
208
+ ./node_modules/.bin/tsx src/cli/index.ts author \
209
+ --config ./builder.config.local.yaml \
210
+ --prompt 'OpenRouter 走香港' \
211
+ --emit-intent-ir
212
+ ```
213
+
214
+ In strict mode, the command rejects prompts like:
215
+
216
+ - `快一点`
217
+ - `大部分`
218
+ - `差不多`
219
+ - `AI 都走好一点的节点`
220
+
221
+ Those phrases are too vague to compile into a stable routing policy.
222
+
187
223
  ## Exec Provider
188
224
 
189
225
  The `exec` provider is the escape hatch for developer machines that already have local AI tooling.
@@ -18,6 +18,8 @@ Typical files:
18
18
  - `bundles/antigravity.txt`
19
19
  - `bundles/cursor.txt`
20
20
  - `bundles/developer-ai-cli.txt`
21
+ - `bundle-specs/antigravity.yaml`
22
+ - `bundle-specs/cursor.yaml`
21
23
  - `all-processes.txt`
22
24
 
23
25
  ## Fast Path
@@ -44,6 +46,18 @@ To see the supported bundle presets:
44
46
  singbox-iac proxifier bundles
45
47
  ```
46
48
 
49
+ To inspect one declarative bundle:
50
+
51
+ ```bash
52
+ singbox-iac proxifier bundles show antigravity
53
+ ```
54
+
55
+ To render one bundle spec as YAML:
56
+
57
+ ```bash
58
+ singbox-iac proxifier bundles render antigravity
59
+ ```
60
+
47
61
  ## Endpoint
48
62
 
49
63
  By default the process-aware listener is:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singbox-iac/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Policy-first subscription compiler for sing-box on macOS.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,6 +46,7 @@
46
46
  "prepack": "npm run build",
47
47
  "release:check": "node ./scripts/release-check.mjs",
48
48
  "release:dry-run": "node ./scripts/release-dry-run.mjs",
49
+ "fixtures:regenerate": "tsx tests/regression/generate-fixtures.ts",
49
50
  "test": "vitest run",
50
51
  "test:watch": "vitest",
51
52
  "lint": "biome check .",