@singbox-iac/cli 0.1.5 → 0.1.7

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 (79) hide show
  1. package/README-en.md +22 -2
  2. package/README.md +22 -2
  3. package/dist/cli/command-helpers.js +1 -1
  4. package/dist/cli/command-helpers.js.map +1 -1
  5. package/dist/cli/commands/apply.js +21 -9
  6. package/dist/cli/commands/apply.js.map +1 -1
  7. package/dist/cli/commands/author.d.ts +28 -0
  8. package/dist/cli/commands/author.js +119 -121
  9. package/dist/cli/commands/author.js.map +1 -1
  10. package/dist/cli/commands/build.js +7 -34
  11. package/dist/cli/commands/build.js.map +1 -1
  12. package/dist/cli/commands/go.d.ts +2 -0
  13. package/dist/cli/commands/go.js +38 -0
  14. package/dist/cli/commands/go.js.map +1 -0
  15. package/dist/cli/commands/history.d.ts +2 -0
  16. package/dist/cli/commands/history.js +21 -0
  17. package/dist/cli/commands/history.js.map +1 -0
  18. package/dist/cli/commands/rollback.d.ts +2 -0
  19. package/dist/cli/commands/rollback.js +38 -0
  20. package/dist/cli/commands/rollback.js.map +1 -0
  21. package/dist/cli/commands/update.js +16 -2
  22. package/dist/cli/commands/update.js.map +1 -1
  23. package/dist/cli/commands/use.d.ts +2 -0
  24. package/dist/cli/commands/use.js +45 -0
  25. package/dist/cli/commands/use.js.map +1 -0
  26. package/dist/cli/commands/verify.js +72 -20
  27. package/dist/cli/commands/verify.js.map +1 -1
  28. package/dist/cli/index.js +45 -2
  29. package/dist/cli/index.js.map +1 -1
  30. package/dist/domain/dns-plan.d.ts +27 -0
  31. package/dist/domain/dns-plan.js +2 -0
  32. package/dist/domain/dns-plan.js.map +1 -0
  33. package/dist/domain/intent.d.ts +61 -0
  34. package/dist/domain/intent.js +2 -0
  35. package/dist/domain/intent.js.map +1 -0
  36. package/dist/domain/transaction.d.ts +12 -0
  37. package/dist/domain/transaction.js +2 -0
  38. package/dist/domain/transaction.js.map +1 -0
  39. package/dist/domain/verification-plan.d.ts +34 -0
  40. package/dist/domain/verification-plan.js +2 -0
  41. package/dist/domain/verification-plan.js.map +1 -0
  42. package/dist/modules/authoring/index.d.ts +2 -0
  43. package/dist/modules/authoring/index.js +32 -17
  44. package/dist/modules/authoring/index.js.map +1 -1
  45. package/dist/modules/build/index.d.ts +3 -0
  46. package/dist/modules/build/index.js +8 -1
  47. package/dist/modules/build/index.js.map +1 -1
  48. package/dist/modules/compiler/index.d.ts +2 -2
  49. package/dist/modules/compiler/index.js +45 -60
  50. package/dist/modules/compiler/index.js.map +1 -1
  51. package/dist/modules/dns-plan/index.d.ts +10 -0
  52. package/dist/modules/dns-plan/index.js +104 -0
  53. package/dist/modules/dns-plan/index.js.map +1 -0
  54. package/dist/modules/fetcher/index.d.ts +1 -0
  55. package/dist/modules/fetcher/index.js +66 -19
  56. package/dist/modules/fetcher/index.js.map +1 -1
  57. package/dist/modules/intent/index.d.ts +7 -0
  58. package/dist/modules/intent/index.js +101 -0
  59. package/dist/modules/intent/index.js.map +1 -0
  60. package/dist/modules/manager/index.d.ts +1 -0
  61. package/dist/modules/manager/index.js +15 -0
  62. package/dist/modules/manager/index.js.map +1 -1
  63. package/dist/modules/natural-language/index.js +2 -1
  64. package/dist/modules/natural-language/index.js.map +1 -1
  65. package/dist/modules/transactions/index.d.ts +20 -0
  66. package/dist/modules/transactions/index.js +150 -0
  67. package/dist/modules/transactions/index.js.map +1 -0
  68. package/dist/modules/update/index.d.ts +2 -0
  69. package/dist/modules/update/index.js +25 -6
  70. package/dist/modules/update/index.js.map +1 -1
  71. package/dist/modules/verification/index.d.ts +57 -0
  72. package/dist/modules/verification/index.js +326 -23
  73. package/dist/modules/verification/index.js.map +1 -1
  74. package/dist/modules/verification-plan/index.d.ts +9 -0
  75. package/dist/modules/verification-plan/index.js +117 -0
  76. package/dist/modules/verification-plan/index.js.map +1 -0
  77. package/docs/runtime-on-macos.md +21 -5
  78. package/examples/builder.config.yaml +7 -26
  79. package/package.json +1 -1
@@ -19,12 +19,19 @@ The target runtime is a headless macOS deployment:
19
19
  ## Current CLI Flow
20
20
 
21
21
  ```bash
22
- singbox-iac quickstart --subscription-url '<url>' --prompt '<一句话策略>'
23
- singbox-iac init
24
- singbox-iac doctor
22
+ singbox-iac go '<url>' '<一句话策略>'
23
+ singbox-iac use '<新的需求描述>'
24
+ singbox-iac update
25
+ ```
26
+
27
+ Advanced commands remain available for debugging or fine-grained control:
28
+
29
+ ```bash
30
+ singbox-iac quickstart
31
+ singbox-iac setup
32
+ singbox-iac author
25
33
  singbox-iac build
26
34
  singbox-iac verify
27
- singbox-iac update
28
35
  singbox-iac schedule install
29
36
  ```
30
37
 
@@ -47,9 +54,18 @@ The tool must never overwrite the live config with an unchecked file.
47
54
  For npm-installed users, the preferred onboarding path is now:
48
55
 
49
56
  ```bash
50
- singbox-iac quickstart --subscription-url '<url>' --prompt '<一句话策略>'
57
+ singbox-iac go '<url>' '<一句话策略>'
51
58
  ```
52
59
 
53
60
  That flow avoids manually chaining `init`, local ruleset downloads, route verification, and the first publish.
54
61
 
62
+ After onboarding, the preferred day-to-day commands are:
63
+
64
+ ```bash
65
+ singbox-iac use '<新的需求描述>'
66
+ singbox-iac update
67
+ ```
68
+
69
+ `update` now reloads `sing-box` automatically when the configured runtime target is already running.
70
+
55
71
  If the prompt includes process-aware intent such as `Proxifier`, `进程级`, `Antigravity`, or `Cursor`, the onboarding flow should also generate `~/.config/singbox-iac/proxifier/` helper files so the user can set up process-level routing without manually reverse-engineering app process names.
@@ -79,6 +79,7 @@ groups:
79
79
  - "JP"
80
80
  - "HK"
81
81
  defaultTarget: "US"
82
+ defaultNodePattern: "OnlyAI"
82
83
  aiOut:
83
84
  type: "selector"
84
85
  includes:
@@ -115,34 +116,14 @@ rules:
115
116
 
116
117
  verification:
117
118
  scenarios:
118
- - id: "antigravity-auth"
119
- name: "Antigravity auth via proxifier stays on the dedicated US path"
120
- url: "https://accounts.google.com/favicon.ico"
119
+ - id: "proxifier-google-favicon"
120
+ name: "Proxifier Google traffic stays on the dedicated US path"
121
+ url: "https://www.google.com/favicon.ico"
121
122
  inbound: "in-proxifier"
122
123
  expectedOutbound: "Process-Proxy"
123
- - id: "antigravity-oauth"
124
- name: "Antigravity OAuth metadata via proxifier stays on the dedicated US path"
125
- url: "https://oauth2.googleapis.com/.well-known/openid-configuration"
126
- inbound: "in-proxifier"
127
- expectedOutbound: "Process-Proxy"
128
- - id: "antigravity-docs"
129
- name: "Antigravity docs via proxifier stay on the dedicated US path"
130
- url: "https://antigravity.google/docs"
131
- inbound: "in-proxifier"
132
- expectedOutbound: "Process-Proxy"
133
- - id: "antigravity-rules-docs"
134
- name: "Antigravity rules docs via proxifier stay on the dedicated US path"
135
- url: "https://antigravity.google/docs/rules"
136
- inbound: "in-proxifier"
137
- expectedOutbound: "Process-Proxy"
138
- - id: "antigravity-mcp-docs"
139
- name: "Antigravity MCP docs via proxifier stay on the dedicated US path"
140
- url: "https://antigravity.google/docs/mcp"
141
- inbound: "in-proxifier"
142
- expectedOutbound: "Process-Proxy"
143
- - id: "antigravity-google-apis"
144
- name: "Antigravity Google API discovery traffic via proxifier stays on the dedicated US path"
145
- url: "https://www.googleapis.com/discovery/v1/apis"
124
+ - id: "proxifier-google-204"
125
+ name: "Proxifier Google connectivity uses the dedicated US path"
126
+ url: "https://www.gstatic.com/generate_204"
146
127
  inbound: "in-proxifier"
147
128
  expectedOutbound: "Process-Proxy"
148
129
  - id: "stitch-us"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singbox-iac/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Policy-first subscription compiler for sing-box on macOS.",
5
5
  "repository": {
6
6
  "type": "git",