lumina-code-agent 1.1.0 → 1.2.0

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/dist/index.js CHANGED
@@ -27,7 +27,8 @@ async function ensureConfig() {
27
27
  return defaults;
28
28
  }
29
29
  const program = new Command();
30
- program.name('lumina').description('Lumina Code — AI coding agent').version('1.0.0');
30
+ program.name('lumina').description('Lumina Code — AI coding agent').version('1.1.0');
31
+ // Main command: lumina code
31
32
  program.command('code')
32
33
  .description('Start Lumina Code agent')
33
34
  .argument('[prompt]', 'What you want to build')
@@ -48,7 +49,9 @@ program.command('code')
48
49
  const React = await import('react');
49
50
  render(React.createElement(TUIApp, { prompt, config, effort, autoApprove: opts.yes || false, cwd: opts.cwd }));
50
51
  });
51
- program.command('config').description('Show configuration').action(async () => {
52
+ // Config commands: lumina config, lumina config set <key> <value>
53
+ const configCmd = program.command('config').description('Manage configuration');
54
+ configCmd.action(async () => {
52
55
  const config = await ensureConfig();
53
56
  console.log('\n Lumina Code Configuration\n');
54
57
  console.log(' Config:', CONFIG_FILE);
@@ -58,7 +61,9 @@ program.command('config').description('Show configuration').action(async () => {
58
61
  console.log(' lumina config set openrouter-key <key>');
59
62
  console.log(' lumina config set default-effort <quick|normal|beast>\n');
60
63
  });
61
- program.command('config set <key> <value>').description('Set config value').action(async (key, value) => {
64
+ configCmd.command('set <key> <value>')
65
+ .description('Set a config value')
66
+ .action(async (key, value) => {
62
67
  const config = await ensureConfig();
63
68
  config[key] = value;
64
69
  writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
@@ -14,7 +14,7 @@
14
14
  */
15
15
  import { execSync, spawn } from 'child_process';
16
16
  import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync, readdirSync, unlinkSync, renameSync, copyFileSync } from 'fs';
17
- import { join, dirname, resolve } from 'path';
17
+ import { join, dirname, resolve, relative } from 'path';
18
18
  // ── Shell Detection ─────────────────────────────────────────────────
19
19
  export function getShell() {
20
20
  if (process.platform === 'win32')
@@ -96,12 +96,33 @@ export function listDir(path) {
96
96
  });
97
97
  }
98
98
  export function searchFiles(pattern, cwd) {
99
- try {
100
- return require('glob').sync(pattern, { cwd, nodir: true, ignore: ['node_modules/**', '.git/**', 'dist/**', 'build/**'] });
101
- }
102
- catch {
103
- return [];
104
- }
99
+ // Simple glob-like search using fs
100
+ const results = [];
101
+ const searchDir = (dir, depth) => {
102
+ if (depth > 5)
103
+ return;
104
+ try {
105
+ const entries = readdirSync(dir, { withFileTypes: true });
106
+ for (const entry of entries) {
107
+ if (entry.name.startsWith('.') || entry.name === 'node_modules' || entry.name === 'dist')
108
+ continue;
109
+ const fullPath = join(dir, entry.name);
110
+ if (entry.isDirectory()) {
111
+ searchDir(fullPath, depth + 1);
112
+ }
113
+ else {
114
+ // Simple pattern matching
115
+ const regex = new RegExp(pattern.replace(/\*/g, '.*').replace(/\?/g, '.'), 'i');
116
+ if (regex.test(entry.name)) {
117
+ results.push(relative(cwd, fullPath));
118
+ }
119
+ }
120
+ }
121
+ }
122
+ catch { /* ignore */ }
123
+ };
124
+ searchDir(cwd, 0);
125
+ return results;
105
126
  }
106
127
  export function grep(pattern, path, context = 2) {
107
128
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumina-code-agent",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Lumina Code - AI coding agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,10 +10,16 @@
10
10
  "engines": { "node": ">=18.0.0" },
11
11
  "scripts": { "build": "tsc --noEmit false", "prepublishOnly": "npm run build" },
12
12
  "dependencies": {
13
- "commander": "^12.1.0", "ink": "^5.1.0", "react": "^18.3.1",
14
- "chalk": "^5.3.0", "cross-spawn": "^7.0.3", "glob": "^11.0.0", "node-fetch": "^3.3.2"
13
+ "commander": "^12.1.0",
14
+ "ink": "^5.1.0",
15
+ "react": "^18.3.1",
16
+ "chalk": "^5.3.0",
17
+ "cross-spawn": "^7.0.3",
18
+ "node-fetch": "^3.3.2"
15
19
  },
16
20
  "devDependencies": {
17
- "@types/node": "^22.10.0", "@types/cross-spawn": "^6.0.6", "typescript": "^5.7.2"
21
+ "@types/node": "^22.10.0",
22
+ "@types/cross-spawn": "^6.0.6",
23
+ "typescript": "^5.7.2"
18
24
  }
19
25
  }