delimit-cli 3.14.6 → 3.14.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.
- package/bin/delimit-setup.js +22 -20
- package/package.json +1 -1
package/bin/delimit-setup.js
CHANGED
|
@@ -28,6 +28,8 @@ const bold = (s) => `\x1b[1m${s}\x1b[0m`;
|
|
|
28
28
|
|
|
29
29
|
function log(msg) { console.log(msg); }
|
|
30
30
|
function step(n, msg) { log(`\n${blue(`[${n}]`)} ${msg}`); }
|
|
31
|
+
function pause(ms = 150) { return new Promise(r => setTimeout(r, ms)); }
|
|
32
|
+
async function logp(msg, ms = 180) { console.log(msg); await pause(ms); }
|
|
31
33
|
|
|
32
34
|
function findGitDir(startDir) {
|
|
33
35
|
let dir = startDir;
|
|
@@ -89,7 +91,7 @@ async function main() {
|
|
|
89
91
|
const match = ver.match(/(\d+)\.(\d+)/);
|
|
90
92
|
if (match && (parseInt(match[1]) >= 3 && parseInt(match[2]) >= 9)) {
|
|
91
93
|
python = cmd;
|
|
92
|
-
|
|
94
|
+
await logp(` ${green('✓')} ${ver}`);
|
|
93
95
|
break;
|
|
94
96
|
}
|
|
95
97
|
} catch {}
|
|
@@ -104,7 +106,7 @@ async function main() {
|
|
|
104
106
|
try {
|
|
105
107
|
execSync('claude --version 2>/dev/null', { encoding: 'utf-8' });
|
|
106
108
|
hasClaude = true;
|
|
107
|
-
|
|
109
|
+
await logp(` ${green('✓')} Claude Code detected`);
|
|
108
110
|
} catch {
|
|
109
111
|
log(` ${yellow('!')} Claude Code not detected — MCP config will still be created`);
|
|
110
112
|
}
|
|
@@ -151,13 +153,13 @@ async function main() {
|
|
|
151
153
|
const gatewaySource = path.join(__dirname, '..', 'gateway');
|
|
152
154
|
if (fs.existsSync(gatewaySource)) {
|
|
153
155
|
copyDir(gatewaySource, path.join(DELIMIT_HOME, 'server'));
|
|
154
|
-
|
|
156
|
+
await logp(` ${green('✓')} Core engine installed`);
|
|
155
157
|
} else {
|
|
156
158
|
// Fallback: try to clone from GitHub
|
|
157
159
|
log(` ${dim(' Downloading from GitHub...')}`);
|
|
158
160
|
try {
|
|
159
161
|
execSync(`git clone --depth 1 https://github.com/delimit-ai/delimit-gateway.git "${path.join(DELIMIT_HOME, 'server')}" 2>/dev/null`, { stdio: 'pipe' });
|
|
160
|
-
|
|
162
|
+
await logp(` ${green('✓')} Core engine cloned`);
|
|
161
163
|
} catch {
|
|
162
164
|
log(` ${yellow('!')} Could not download. Clone manually: git clone https://github.com/delimit-ai/delimit-gateway.git ~/.delimit/server`);
|
|
163
165
|
}
|
|
@@ -184,7 +186,7 @@ async function main() {
|
|
|
184
186
|
execSync(`curl -sL "${proUrl}" -o "${proTarball}" --fail`, { stdio: 'pipe', timeout: 30000 });
|
|
185
187
|
execSync(`tar -xzf "${proTarball}" -C "${proDir}"`, { stdio: 'pipe' });
|
|
186
188
|
fs.unlinkSync(proTarball);
|
|
187
|
-
|
|
189
|
+
await logp(` ${green('✓')} Pro modules installed (${artifact})`);
|
|
188
190
|
} catch {
|
|
189
191
|
log(` ${dim(' Pro modules not available for ${artifact} — free tools work fine')}`);
|
|
190
192
|
}
|
|
@@ -206,12 +208,12 @@ async function main() {
|
|
|
206
208
|
execSync(`"${venvPy}" -m pip install --quiet fastmcp==3.1.0 pyyaml==6.0.3 pydantic==2.12.5 packaging==26.0 2>/dev/null`, { stdio: 'pipe' });
|
|
207
209
|
}
|
|
208
210
|
python = venvPy; // Use venv python for MCP config
|
|
209
|
-
|
|
211
|
+
await logp(` ${green('✓')} Python dependencies installed (isolated venv)`);
|
|
210
212
|
} catch {
|
|
211
213
|
log(` ${yellow('!')} venv install failed — trying global pip`);
|
|
212
214
|
try {
|
|
213
215
|
execSync(`${python} -m pip install --quiet fastmcp==3.1.0 pyyaml==6.0.3 pydantic==2.12.5 packaging==26.0 2>/dev/null`, { stdio: 'pipe' });
|
|
214
|
-
|
|
216
|
+
await logp(` ${green('✓')} Python dependencies installed (global)`);
|
|
215
217
|
} catch {
|
|
216
218
|
log(` ${yellow('!')} pip install failed — run manually: pip install fastmcp pyyaml pydantic packaging`);
|
|
217
219
|
}
|
|
@@ -233,7 +235,7 @@ async function main() {
|
|
|
233
235
|
const actualServer = fs.existsSync(serverPath) ? serverPath : serverPathAlt;
|
|
234
236
|
|
|
235
237
|
if (mcpConfig.mcpServers.delimit) {
|
|
236
|
-
|
|
238
|
+
await logp(` ${green('✓')} Delimit MCP already configured`);
|
|
237
239
|
} else {
|
|
238
240
|
mcpConfig.mcpServers.delimit = {
|
|
239
241
|
type: 'stdio',
|
|
@@ -246,7 +248,7 @@ async function main() {
|
|
|
246
248
|
description: 'Delimit — AI agent guardrails'
|
|
247
249
|
};
|
|
248
250
|
fs.writeFileSync(MCP_CONFIG, JSON.stringify(mcpConfig, null, 2));
|
|
249
|
-
|
|
251
|
+
await logp(` ${green('✓')} Added delimit to ${MCP_CONFIG}`);
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
// Step 3b: Configure Codex MCP (if installed)
|
|
@@ -255,13 +257,13 @@ async function main() {
|
|
|
255
257
|
try {
|
|
256
258
|
let toml = fs.readFileSync(CODEX_CONFIG, 'utf-8');
|
|
257
259
|
if (toml.includes('[mcp_servers.delimit]')) {
|
|
258
|
-
|
|
260
|
+
await logp(` ${green('✓')} Delimit already in Codex config`);
|
|
259
261
|
} else {
|
|
260
262
|
const serverDir = path.join(DELIMIT_HOME, 'server');
|
|
261
263
|
const codexEntry = `\n[mcp_servers.delimit]\ncommand = "${python}"\nargs = ["${actualServer}"]\ncwd = "${serverDir}"\n\n[mcp_servers.delimit.env]\nPYTHONPATH = "${serverDir}:${path.join(serverDir, 'ai')}"\n`;
|
|
262
264
|
toml += codexEntry;
|
|
263
265
|
fs.writeFileSync(CODEX_CONFIG, toml);
|
|
264
|
-
|
|
266
|
+
await logp(` ${green('✓')} Added delimit to Codex (${CODEX_CONFIG})`);
|
|
265
267
|
}
|
|
266
268
|
} catch (e) {
|
|
267
269
|
log(` ${yellow('!')} Could not configure Codex: ${e.message}`);
|
|
@@ -278,7 +280,7 @@ async function main() {
|
|
|
278
280
|
}
|
|
279
281
|
if (!cursorConfig.mcpServers) cursorConfig.mcpServers = {};
|
|
280
282
|
if (cursorConfig.mcpServers.delimit) {
|
|
281
|
-
|
|
283
|
+
await logp(` ${green('✓')} Delimit already in Cursor config`);
|
|
282
284
|
} else {
|
|
283
285
|
cursorConfig.mcpServers.delimit = {
|
|
284
286
|
command: python,
|
|
@@ -287,7 +289,7 @@ async function main() {
|
|
|
287
289
|
env: { PYTHONPATH: path.join(DELIMIT_HOME, 'server') }
|
|
288
290
|
};
|
|
289
291
|
fs.writeFileSync(CURSOR_CONFIG, JSON.stringify(cursorConfig, null, 2));
|
|
290
|
-
|
|
292
|
+
await logp(` ${green('✓')} Added delimit to Cursor (${CURSOR_CONFIG})`);
|
|
291
293
|
}
|
|
292
294
|
} catch (e) {
|
|
293
295
|
log(` ${yellow('!')} Could not configure Cursor: ${e.message}`);
|
|
@@ -305,7 +307,7 @@ async function main() {
|
|
|
305
307
|
}
|
|
306
308
|
if (!geminiConfig.mcpServers) geminiConfig.mcpServers = {};
|
|
307
309
|
if (geminiConfig.mcpServers.delimit) {
|
|
308
|
-
|
|
310
|
+
await logp(` ${green('✓')} Delimit already in Gemini CLI config`);
|
|
309
311
|
} else {
|
|
310
312
|
geminiConfig.mcpServers.delimit = {
|
|
311
313
|
command: python,
|
|
@@ -314,7 +316,7 @@ async function main() {
|
|
|
314
316
|
env: { PYTHONPATH: path.join(DELIMIT_HOME, 'server') }
|
|
315
317
|
};
|
|
316
318
|
fs.writeFileSync(GEMINI_CONFIG, JSON.stringify(geminiConfig, null, 2));
|
|
317
|
-
|
|
319
|
+
await logp(` ${green('✓')} Added delimit to Gemini CLI (${GEMINI_CONFIG})`);
|
|
318
320
|
}
|
|
319
321
|
// Add governance instructions
|
|
320
322
|
if (!geminiConfig.customInstructions || !geminiConfig.customInstructions.includes('delimit_ledger_context')) {
|
|
@@ -430,7 +432,7 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
430
432
|
installed++;
|
|
431
433
|
}
|
|
432
434
|
}
|
|
433
|
-
|
|
435
|
+
await logp(` ${green('✓')} ${installed} agents installed (${Object.keys(agents).length - installed} already existed)`);
|
|
434
436
|
|
|
435
437
|
// Step 4b: Install Git hooks if inside a git repository
|
|
436
438
|
const gitDir = findGitDir(process.cwd());
|
|
@@ -458,7 +460,7 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
458
460
|
}
|
|
459
461
|
}
|
|
460
462
|
if (hooksInstalled > 0) {
|
|
461
|
-
|
|
463
|
+
await logp(` ${green('✓')} ${hooksInstalled} Git hooks installed to ${gitHooksDir}`);
|
|
462
464
|
} else {
|
|
463
465
|
log(` ${dim(' Git hooks already present (non-Delimit hooks preserved)')}`);
|
|
464
466
|
}
|
|
@@ -473,11 +475,11 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
473
475
|
const claudeMd = path.join(os.homedir(), 'CLAUDE.md');
|
|
474
476
|
const claudeResult = upsertDelimitSection(claudeMd);
|
|
475
477
|
if (claudeResult.action === 'created') {
|
|
476
|
-
|
|
478
|
+
await logp(` ${green('✓')} Created ${claudeMd} with governance triggers`);
|
|
477
479
|
} else if (claudeResult.action === 'updated') {
|
|
478
|
-
|
|
480
|
+
await logp(` ${green('✓')} Updated Delimit section in ${claudeMd} (version changed)`);
|
|
479
481
|
} else if (claudeResult.action === 'appended') {
|
|
480
|
-
|
|
482
|
+
await logp(` ${green('✓')} Appended Delimit section to ${claudeMd} (user content preserved)`);
|
|
481
483
|
} else {
|
|
482
484
|
log(` ${dim(' CLAUDE.md already up to date')}`);
|
|
483
485
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "3.14.
|
|
4
|
+
"version": "3.14.7",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|