ai-nexus 1.4.2 → 1.4.3

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/README.ko.md CHANGED
@@ -105,16 +105,16 @@ npx ai-nexus install --rules github.com/your-org/team-rules
105
105
  └── rules-inactive/ # 비활성 룰 (로드 안 됨)
106
106
  ```
107
107
 
108
- **AI 라우팅 사용** (권장):
108
+ **AI 라우팅 사용** (선택):
109
109
  ```bash
110
110
  export OPENAI_API_KEY=sk-xxx # 또는 ANTHROPIC_API_KEY
111
111
  export SEMANTIC_ROUTER_ENABLED=true
112
112
  ```
113
113
 
114
- GPT-4o-mini 또는 Claude Haiku가 프롬프트를 분석해 적절한 룰을 선택합니다. 비용: 월 ~$0.50.
114
+ GPT-4o-mini 또는 Claude Haiku가 프롬프트를 분석해 적절한 룰을 선택합니다. 비용: 월 ~$0.50. 명시적으로 활성화해야 동작합니다.
115
115
 
116
- **AI 없이** (폴백):
117
- 프롬프트의 키워드를 매칭해서 룰을 활성화합니다.
116
+ **AI 없이** (기본값):
117
+ 프롬프트의 키워드를 매칭해서 룰을 활성화합니다. 비용 없음, API 키 불필요.
118
118
 
119
119
  ### Cursor: 룰 변환기
120
120
 
@@ -286,6 +286,27 @@ npx ai-nexus update
286
286
 
287
287
  ---
288
288
 
289
+ ## 네트워크 & 개인정보
290
+
291
+ ai-nexus는 로컬에서 실행됩니다. 아래는 이 도구가 수행할 수 있는 모든 네트워크 요청 목록입니다:
292
+
293
+ | 시점 | 대상 | 목적 | 필수 여부 |
294
+ |------|------|------|-----------|
295
+ | 시맨틱 라우팅 (프롬프트마다) | `api.openai.com` | GPT-4o-mini를 통한 AI 룰 선택 | **옵트인 전용** — `SEMANTIC_ROUTER_ENABLED=true` + `OPENAI_API_KEY` 필요 |
296
+ | 시맨틱 라우팅 (프롬프트마다) | `api.anthropic.com` | Claude Haiku를 통한 AI 룰 선택 | **옵트인 전용** — `SEMANTIC_ROUTER_ENABLED=true` + `ANTHROPIC_API_KEY` 필요 |
297
+ | `search`, `get`, `browse` | `api.github.com` | 커뮤니티 룰 레지스트리 조회 | 해당 명령어 실행 시에만 |
298
+ | `get` | `raw.githubusercontent.com` | 룰 파일 콘텐츠 다운로드 | `get` 실행 시에만 |
299
+ | `browse` | `localhost:3847` | 마켓플레이스 UI용 로컬 전용 HTTP 서버 | `127.0.0.1`에 바인딩 — 외부 접근 불가 |
300
+ | `install --rules <url>` | Git 원격 호스트 | 팀 룰 저장소 클론 | `--rules` URL 제공 시에만 |
301
+
302
+ **텔레메트리 없음. 분석 수집 없음. 외부 데이터 전송 없음.**
303
+
304
+ - API 키는 환경 변수에서만 읽으며, 디스크에 저장하거나 로깅하지 않습니다.
305
+ - 프롬프트가 OpenAI/Anthropic으로 전송되는 것은 시맨틱 라우팅을 **명시적으로 활성화**한 경우에만 해당됩니다. 비활성화 시 키워드 기반 폴백이 완전히 오프라인으로 동작합니다.
306
+ - `browse` 서버는 `127.0.0.1`에 바인딩되어 네트워크에서 접근할 수 없습니다.
307
+
308
+ ---
309
+
289
310
  ## 룰 마켓플레이스
290
311
 
291
312
  ![browse](https://raw.githubusercontent.com/JSK9999/ai-nexus/main/docs/nexus-marketplace.png)
package/README.md CHANGED
@@ -105,16 +105,16 @@ A hook runs on every prompt, analyzing what rules you actually need:
105
105
  └── rules-inactive/ # Parked rules (not loaded)
106
106
  ```
107
107
 
108
- **With AI routing** (recommended):
108
+ **With AI routing** (optional):
109
109
  ```bash
110
110
  export OPENAI_API_KEY=sk-xxx # or ANTHROPIC_API_KEY
111
111
  export SEMANTIC_ROUTER_ENABLED=true
112
112
  ```
113
113
 
114
- GPT-4o-mini or Claude Haiku analyzes your prompt and picks the right rules. Cost: ~$0.50/month.
114
+ GPT-4o-mini or Claude Haiku analyzes your prompt and picks the right rules. Cost: ~$0.50/month. Requires explicit opt-in.
115
115
 
116
- **Without AI** (fallback):
117
- Keyword matching activates rules based on words in your prompt.
116
+ **Without AI** (default):
117
+ Keyword matching activates rules based on words in your prompt. Zero cost, no API key needed.
118
118
 
119
119
  ### Cursor: Rule Converter
120
120
 
@@ -286,6 +286,27 @@ npx ai-nexus update
286
286
 
287
287
  ---
288
288
 
289
+ ## Network & Privacy
290
+
291
+ ai-nexus runs locally. Here is a complete list of network requests the tool may make:
292
+
293
+ | When | Destination | Purpose | Required? |
294
+ |------|-------------|---------|-----------|
295
+ | Semantic routing (per prompt) | `api.openai.com` | AI-powered rule selection via GPT-4o-mini | **Opt-in only** — requires `SEMANTIC_ROUTER_ENABLED=true` + `OPENAI_API_KEY` |
296
+ | Semantic routing (per prompt) | `api.anthropic.com` | AI-powered rule selection via Claude Haiku | **Opt-in only** — requires `SEMANTIC_ROUTER_ENABLED=true` + `ANTHROPIC_API_KEY` |
297
+ | `search`, `get`, `browse` | `api.github.com` | Fetch community rule registry | Only when you run these commands |
298
+ | `get` | `raw.githubusercontent.com` | Download rule file content | Only when you run `get` |
299
+ | `browse` | `localhost:3847` | Local-only HTTP server for marketplace UI | Bound to `127.0.0.1` — not accessible from other machines |
300
+ | `install --rules <url>` | Git remote host | Clone a team rules repository | Only when you provide a `--rules` URL |
301
+
302
+ **No telemetry. No analytics. No external data collection.**
303
+
304
+ - API keys are read from environment variables only — never stored on disk or logged.
305
+ - Your prompts are sent to OpenAI/Anthropic **only** when semantic routing is explicitly enabled. Without it, keyword-based fallback runs entirely offline.
306
+ - The `browse` server binds to `127.0.0.1` and is not accessible from the network.
307
+
308
+ ---
309
+
289
310
  ## Rule Marketplace
290
311
 
291
312
  ![browse](https://raw.githubusercontent.com/JSK9999/ai-nexus/main/docs/nexus-marketplace.png)
@@ -9,7 +9,7 @@ const RULES_DIR = fs.existsSync(_projectRules)
9
9
  ? _projectRules
10
10
  : path.join(os.homedir(), '.claude/rules');
11
11
  const INACTIVE_DIR = RULES_DIR.replace(/rules$/, 'rules-inactive');
12
- const SEMANTIC_ROUTER_ENABLED = process.env.SEMANTIC_ROUTER_ENABLED !== 'false';
12
+ const SEMANTIC_ROUTER_ENABLED = process.env.SEMANTIC_ROUTER_ENABLED === 'true';
13
13
 
14
14
  // Static keyword map (fallback for files without frontmatter)
15
15
  const STATIC_KEYWORD_MAP = {
@@ -207,7 +207,7 @@ export async function browse(port = 3847) {
207
207
  process.exit(1);
208
208
  }
209
209
  });
210
- server.listen(port, () => {
210
+ server.listen(port, '127.0.0.1', () => {
211
211
  console.log(`\n ai-nexus browse: http://localhost:${port}`);
212
212
  console.log(` Ctrl+C to quit\n`);
213
213
  openBrowser(`http://localhost:${port}`);
package/dist/utils/git.js CHANGED
@@ -1,4 +1,4 @@
1
- import { execSync } from 'child_process';
1
+ import { execSync, spawnSync } from 'child_process';
2
2
  import fs from 'fs';
3
3
  export function parseGitUrl(url) {
4
4
  // Handle various formats:
@@ -34,10 +34,13 @@ export function cloneRepo(url, targetDir) {
34
34
  });
35
35
  }
36
36
  else {
37
- // Clone new repo
38
- execSync(`git clone --depth 1 ${normalizedUrl} "${targetDir}"`, {
37
+ // Clone new repo (use spawnSync to avoid command injection)
38
+ const result = spawnSync('git', ['clone', '--depth', '1', normalizedUrl, targetDir], {
39
39
  stdio: 'pipe',
40
40
  });
41
+ if (result.status !== 0) {
42
+ throw new Error(`git clone failed: ${result.stderr?.toString() || 'unknown error'}`);
43
+ }
41
44
  }
42
45
  }
43
46
  export function updateRepo(repoPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-nexus",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Unified rule manager for Claude Code, Cursor, and Codex - write once, use everywhere, save tokens",
5
5
  "main": "dist/index.js",
6
6
  "bin": {