ai-nexus 1.3.19 → 1.3.21
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 +1 -1
- package/README.md +1 -1
- package/dist/commands/update.js +26 -5
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -46,7 +46,7 @@ AI 코딩 도구마다 룰 형식이 다릅니다 — `.claude/rules/*.md`, `.cu
|
|
|
46
46
|
|
|
47
47
|
| | 강점 | 상세 |
|
|
48
48
|
|---|---|---|
|
|
49
|
-
| **필요한 룰만 로드** |
|
|
49
|
+
| **필요한 룰만 로드** | 수백 개 룰 중 프롬프트당 2-3개만 선택 | 시맨틱 라우터가 프롬프트를 분석해 관련 룰만 골라 로드합니다. 불필요한 토큰 낭비 제거 → AI 응답 품질 향상 + 비용 절감. |
|
|
50
50
|
| **한 번 작성, 어디서든 배포** | 하나의 룰 파일 → 세 가지 도구 | `.md` 룰 하나만 작성하면 Cursor용 `.mdc`, Codex용 `AGENTS.md`로 자동 변환됩니다. 복붙 불필요. |
|
|
51
51
|
| **AI 기반 룰 선택** | GPT-4o-mini 또는 Claude Haiku가 룰 선택 | 매 프롬프트마다 훅이 실행되어 필요한 룰만 로딩합니다. 월 ~$0.50. AI 없이도 키워드 매칭으로 무료 동작. |
|
|
52
52
|
| **팀 전체 일관성** | Git 기반 룰 공유 | 모든 팀원이 같은 저장소에서 설치. `npx ai-nexus update` 한 번으로 전팀 동기화. |
|
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Only relevant rules loaded per prompt.
|
|
|
46
46
|
|
|
47
47
|
| | Benefit | Detail |
|
|
48
48
|
|---|---|---|
|
|
49
|
-
| **Only relevant rules loaded** |
|
|
49
|
+
| **Only relevant rules loaded** | Hundreds of rules installed, only 2-3 loaded per prompt | Semantic Router analyzes your prompt and picks just the rules you need. No unnecessary context = better AI responses + less token waste. |
|
|
50
50
|
| **Write once, deploy everywhere** | One rule file → three tools | Write a single `.md` rule. ai-nexus auto-converts to `.mdc` for Cursor and `AGENTS.md` for Codex. No more copy-pasting. |
|
|
51
51
|
| **AI-powered rule selection** | GPT-4o-mini or Claude Haiku picks rules for you | A hook runs on every prompt, loading only what you need. Costs ~$0.50/month. Falls back to keyword matching with zero cost. |
|
|
52
52
|
| **Team-wide consistency** | Git-based rule sharing | Everyone installs from the same repo. `npx ai-nexus update` keeps the whole team in sync. |
|
package/dist/commands/update.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import os from 'os';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
4
5
|
import chalk from 'chalk';
|
|
5
6
|
import inquirer from 'inquirer';
|
|
6
7
|
import { detectInstall, scanDir, compareConfigs, ensureDir, computeFileHashes, aggregateToAgentsMd } from '../utils/files.js';
|
|
7
8
|
import crypto from 'crypto';
|
|
8
9
|
import { updateRepo } from '../utils/git.js';
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '../..');
|
|
9
12
|
export async function update(options = {}) {
|
|
10
13
|
const install = detectInstall();
|
|
11
14
|
if (!install) {
|
|
@@ -51,11 +54,29 @@ export async function update(options = {}) {
|
|
|
51
54
|
: process.cwd();
|
|
52
55
|
const claudeDir = path.join(targetDir, '.claude');
|
|
53
56
|
if (meta.mode === 'symlink') {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
// Sync new builtin files to ~/.ai-nexus/config/
|
|
58
|
+
const builtinConfigDir = path.join(PACKAGE_ROOT, 'config');
|
|
59
|
+
const categories = ['rules', 'commands', 'skills', 'agents', 'contexts', 'hooks'];
|
|
60
|
+
let addedCount = 0;
|
|
61
|
+
for (const category of categories) {
|
|
62
|
+
const srcDir = path.join(builtinConfigDir, category);
|
|
63
|
+
if (!fs.existsSync(srcDir))
|
|
64
|
+
continue;
|
|
65
|
+
const destDir = path.join(configDir, category);
|
|
66
|
+
ensureDir(destDir);
|
|
67
|
+
const srcFiles = scanDir(srcDir);
|
|
68
|
+
for (const [rel, content] of Object.entries(srcFiles)) {
|
|
69
|
+
const dest = path.join(destDir, rel);
|
|
70
|
+
if (!fs.existsSync(dest)) {
|
|
71
|
+
ensureDir(path.dirname(dest));
|
|
72
|
+
fs.writeFileSync(dest, content);
|
|
73
|
+
addedCount++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (addedCount > 0) {
|
|
78
|
+
console.log(chalk.green(` + ${addedCount} new files added`));
|
|
79
|
+
hasChanges = true;
|
|
59
80
|
}
|
|
60
81
|
}
|
|
61
82
|
if (meta.mode === 'copy') {
|