delimit-cli 3.11.5 → 3.11.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.
@@ -1277,6 +1277,14 @@ program
1277
1277
  console.log(chalk.dim('Tier: pro'));
1278
1278
  });
1279
1279
 
1280
+ // Version subcommand alias (users type 'delimit version' not 'delimit -V')
1281
+ program
1282
+ .command('version')
1283
+ .description('Show version')
1284
+ .action(() => {
1285
+ console.log(require('../package.json').version);
1286
+ });
1287
+
1280
1288
  // Hide legacy/internal commands from --help
1281
1289
  ['install', 'mode', 'status', 'policy', 'auth', 'audit',
1282
1290
  'explain-decision', 'uninstall', 'proxy', 'hook'].forEach(name => {
@@ -29,6 +29,24 @@ const bold = (s) => `\x1b[1m${s}\x1b[0m`;
29
29
  function log(msg) { console.log(msg); }
30
30
  function step(n, msg) { log(`\n${blue(`[${n}]`)} ${msg}`); }
31
31
 
32
+ function findGitDir(startDir) {
33
+ let dir = startDir;
34
+ while (dir !== path.dirname(dir)) {
35
+ const gitPath = path.join(dir, '.git');
36
+ if (fs.existsSync(gitPath)) {
37
+ // Handle both regular .git dirs and worktree .git files
38
+ const stat = fs.statSync(gitPath);
39
+ if (stat.isDirectory()) return gitPath;
40
+ // .git file (worktree) — read the gitdir path
41
+ const content = fs.readFileSync(gitPath, 'utf-8').trim();
42
+ const match = content.match(/^gitdir:\s*(.+)$/);
43
+ if (match) return match[1];
44
+ }
45
+ dir = path.dirname(dir);
46
+ }
47
+ return null;
48
+ }
49
+
32
50
  async function main() {
33
51
  log('');
34
52
  log(blue(' ____ ________ ______ _____________'));
@@ -338,6 +356,41 @@ Run full governance compliance checks. Verify security, policy compliance, evide
338
356
  }
339
357
  log(` ${green('✓')} ${installed} agents installed (${Object.keys(agents).length - installed} already existed)`);
340
358
 
359
+ // Step 4b: Install Git hooks if inside a git repository
360
+ const gitDir = findGitDir(process.cwd());
361
+ if (gitDir) {
362
+ const gitHooksDir = path.join(gitDir, 'hooks');
363
+ const srcHooksDir = path.join(__dirname, '..', 'hooks', 'git');
364
+ if (fs.existsSync(srcHooksDir)) {
365
+ fs.mkdirSync(gitHooksDir, { recursive: true });
366
+ let hooksInstalled = 0;
367
+ for (const hookFile of ['pre-commit', 'pre-push', 'commit-msg']) {
368
+ const src = path.join(srcHooksDir, hookFile);
369
+ const dest = path.join(gitHooksDir, hookFile);
370
+ if (fs.existsSync(src)) {
371
+ // Only install if hook doesn't already exist or is a delimit hook
372
+ let shouldInstall = !fs.existsSync(dest);
373
+ if (!shouldInstall) {
374
+ const existing = fs.readFileSync(dest, 'utf-8');
375
+ shouldInstall = existing.includes('Delimit') || existing.includes('delimit');
376
+ }
377
+ if (shouldInstall) {
378
+ fs.copyFileSync(src, dest);
379
+ fs.chmodSync(dest, '755');
380
+ hooksInstalled++;
381
+ }
382
+ }
383
+ }
384
+ if (hooksInstalled > 0) {
385
+ log(` ${green('✓')} ${hooksInstalled} Git hooks installed to ${gitHooksDir}`);
386
+ } else {
387
+ log(` ${dim(' Git hooks already present (non-Delimit hooks preserved)')}`);
388
+ }
389
+ }
390
+ } else {
391
+ log(` ${dim(' Not inside a git repo — git hooks will be installed on next delimit setup inside a repo')}`);
392
+ }
393
+
341
394
  // Step 5: Create/update CLAUDE.md and platform instruction files
342
395
  step(5, 'Setting up AI instruction files...');
343
396
 
@@ -504,8 +557,21 @@ echo "[Delimit] ${toolName} not found" >&2; exit 127
504
557
  }
505
558
  log('');
506
559
 
507
- // Step 7: Done
508
- step(7, 'Done!');
560
+ // Step 7: Local dashboard API server
561
+ step(7, 'Local dashboard API...');
562
+
563
+ const localServerPath = path.join(DELIMIT_HOME, 'server', 'ai', 'local_server.py');
564
+ if (fs.existsSync(localServerPath)) {
565
+ log(` ${green('✓')} Local API server available on port 7823`);
566
+ log(` ${dim(' Start it: python3 ' + localServerPath)}`);
567
+ log(` ${dim(' Dashboard connects to localhost:7823 automatically')}`);
568
+ } else {
569
+ log(` ${dim(' Local API server not found — dashboard will use cloud sync')}`);
570
+ }
571
+ log('');
572
+
573
+ // Step 8: Done
574
+ step(8, 'Done!');
509
575
  log('');
510
576
  log(` ${green('Delimit is installed.')} Your AI now has persistent memory and governance.`);
511
577
  log('');
@@ -545,11 +611,28 @@ function getDelimitSection() {
545
611
  One workspace for every AI coding assistant.
546
612
 
547
613
  ## On every session start:
548
- 1. Call \`delimit_gov_health\` to show governance status
549
- 2. Call \`delimit_ledger_context\` to check for open tasks
614
+ 1. Call \`delimit_ledger_context\` to check for open tasks
615
+ 2. Call \`delimit_gov_health\` to check governance status
550
616
  3. If returning user, summarize what's pending
551
617
  4. If new project, call \`delimit_scan\` to discover what Delimit can do
552
618
 
619
+ ## After editing code:
620
+ - After editing UI/CSS: call \`delimit_design_validate_responsive\`
621
+ - After editing API specs: call \`delimit_lint\`
622
+ - After editing tests: call \`delimit_test_smoke\`
623
+
624
+ ## Before deploying:
625
+ 1. Call \`delimit_security_audit\`
626
+ 2. Call \`delimit_test_smoke\`
627
+ 3. Call \`delimit_deploy_plan\`
628
+
629
+ ## Before committing:
630
+ - Call \`delimit_repo_diagnose\` to check for common issues
631
+
632
+ ## When starting a new project:
633
+ - Call \`delimit_scan\` to discover what Delimit can do
634
+ - Call \`delimit_init\` to set up governance
635
+
553
636
  ## Try these:
554
637
  - "scan this project" -- discover what Delimit can do here
555
638
  - "lint my API spec" -- catch breaking changes in your OpenAPI spec
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "delimit-cli",
3
3
  "mcpName": "io.github.delimit-ai/delimit",
4
- "version": "3.11.5",
4
+ "version": "3.11.7",
5
5
  "description": "One workspace for every AI coding assistant. Tasks, memory, and governance carry between Claude Code, Codex, and Gemini CLI.",
6
6
  "main": "index.js",
7
7
  "files": [
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "url": "https://github.com/delimit-ai/delimit",
8
8
  "source": "github"
9
9
  },
10
- "version": "3.11.5",
10
+ "version": "3.11.7",
11
11
  "websiteUrl": "https://delimit.ai",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "delimit-cli",
16
- "version": "3.11.5",
16
+ "version": "3.11.7",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  }