@soederpop/luca 0.0.6 → 0.0.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/CLAUDE.md +10 -1
- package/bun.lock +1 -1
- package/commands/build-bootstrap.ts +78 -0
- package/commands/build-scaffolds.ts +24 -2
- package/commands/try-all-challenges.ts +543 -0
- package/commands/try-challenge.ts +100 -0
- package/docs/README.md +52 -80
- package/docs/TABLE-OF-CONTENTS.md +82 -51
- package/docs/apis/clients/elevenlabs.md +232 -8
- package/docs/apis/clients/graph.md +59 -8
- package/docs/apis/clients/openai.md +362 -2
- package/docs/apis/clients/rest.md +122 -2
- package/docs/apis/clients/websocket.md +71 -17
- package/docs/apis/features/agi/assistant.md +9 -3
- package/docs/apis/features/agi/assistants-manager.md +2 -2
- package/docs/apis/features/agi/claude-code.md +153 -14
- package/docs/apis/features/agi/conversation-history.md +15 -3
- package/docs/apis/features/agi/conversation.md +133 -20
- package/docs/apis/features/agi/openai-codex.md +90 -12
- package/docs/apis/features/agi/skills-library.md +23 -5
- package/docs/apis/features/node/container-link.md +59 -0
- package/docs/apis/features/node/content-db.md +1 -1
- package/docs/apis/features/node/disk-cache.md +1 -1
- package/docs/apis/features/node/dns.md +1 -0
- package/docs/apis/features/node/docker.md +2 -1
- package/docs/apis/features/node/esbuild.md +4 -3
- package/docs/apis/features/node/file-manager.md +13 -4
- package/docs/apis/features/node/fs.md +726 -171
- package/docs/apis/features/node/git.md +1 -0
- package/docs/apis/features/node/google-auth.md +23 -4
- package/docs/apis/features/node/google-calendar.md +14 -2
- package/docs/apis/features/node/google-docs.md +15 -2
- package/docs/apis/features/node/google-drive.md +21 -3
- package/docs/apis/features/node/google-sheets.md +14 -2
- package/docs/apis/features/node/grep.md +2 -0
- package/docs/apis/features/node/helpers.md +29 -0
- package/docs/apis/features/node/ink.md +2 -2
- package/docs/apis/features/node/networking.md +39 -4
- package/docs/apis/features/node/os.md +28 -0
- package/docs/apis/features/node/postgres.md +26 -4
- package/docs/apis/features/node/proc.md +37 -28
- package/docs/apis/features/node/process-manager.md +33 -5
- package/docs/apis/features/node/repl.md +1 -1
- package/docs/apis/features/node/runpod.md +1 -0
- package/docs/apis/features/node/secure-shell.md +7 -0
- package/docs/apis/features/node/semantic-search.md +12 -5
- package/docs/apis/features/node/sqlite.md +26 -4
- package/docs/apis/features/node/telegram.md +30 -5
- package/docs/apis/features/node/tts.md +17 -2
- package/docs/apis/features/node/ui.md +1 -1
- package/docs/apis/features/node/vault.md +4 -9
- package/docs/apis/features/node/vm.md +3 -12
- package/docs/apis/features/node/window-manager.md +128 -20
- package/docs/apis/features/web/asset-loader.md +13 -1
- package/docs/apis/features/web/container-link.md +59 -0
- package/docs/apis/features/web/esbuild.md +4 -3
- package/docs/apis/features/web/helpers.md +29 -0
- package/docs/apis/features/web/network.md +16 -2
- package/docs/apis/features/web/speech.md +16 -2
- package/docs/apis/features/web/vault.md +4 -9
- package/docs/apis/features/web/vm.md +3 -12
- package/docs/apis/features/web/voice.md +18 -1
- package/docs/apis/servers/express.md +18 -2
- package/docs/apis/servers/mcp.md +29 -4
- package/docs/apis/servers/websocket.md +34 -6
- package/docs/bootstrap/CLAUDE.md +100 -0
- package/docs/bootstrap/SKILL.md +222 -0
- package/docs/bootstrap/templates/about-command.ts +41 -0
- package/docs/bootstrap/templates/docs-models.ts +22 -0
- package/docs/bootstrap/templates/docs-readme.md +43 -0
- package/docs/bootstrap/templates/example-feature.ts +53 -0
- package/docs/bootstrap/templates/health-endpoint.ts +15 -0
- package/docs/bootstrap/templates/luca-cli.ts +25 -0
- package/docs/challenges/caching-proxy.md +16 -0
- package/docs/challenges/content-db-round-trip.md +14 -0
- package/docs/challenges/custom-command.md +9 -0
- package/docs/challenges/file-watcher-pipeline.md +11 -0
- package/docs/challenges/grep-audit-report.md +15 -0
- package/docs/challenges/multi-feature-dashboard.md +14 -0
- package/docs/challenges/process-orchestrator.md +17 -0
- package/docs/challenges/rest-api-server-with-client.md +12 -0
- package/docs/challenges/script-runner-with-vm.md +11 -0
- package/docs/challenges/simple-rest-api.md +15 -0
- package/docs/challenges/websocket-serve-and-client.md +11 -0
- package/docs/challenges/yaml-config-system.md +14 -0
- package/docs/command-system-overhaul.md +94 -0
- package/docs/examples/assistant/CORE.md +18 -0
- package/docs/examples/assistant/hooks.ts +3 -0
- package/docs/examples/assistant/tools.ts +10 -0
- package/docs/examples/window-manager-layouts.md +180 -0
- package/docs/in-memory-fs.md +4 -0
- package/docs/models.ts +13 -10
- package/docs/philosophy.md +4 -3
- package/docs/reports/console-hmr-design.md +170 -0
- package/docs/reports/helper-semantic-search.md +72 -0
- package/docs/scaffolds/client.md +29 -20
- package/docs/scaffolds/command.md +64 -50
- package/docs/scaffolds/endpoint.md +31 -36
- package/docs/scaffolds/feature.md +28 -18
- package/docs/scaffolds/selector.md +91 -0
- package/docs/scaffolds/server.md +18 -9
- package/docs/selectors.md +115 -0
- package/docs/sessions/custom-command/attempt-log-2.md +195 -0
- package/docs/sessions/file-watcher-pipeline/attempt-log-1.md +728 -0
- package/docs/sessions/file-watcher-pipeline/attempt-log-2.md +555 -0
- package/docs/sessions/grep-audit-report/attempt-log-1.md +289 -0
- package/docs/sessions/multi-feature-dashboard/attempt-log-2.md +679 -0
- package/docs/sessions/rest-api-server-with-client/attempt-log-1.md +1 -0
- package/docs/sessions/rest-api-server-with-client/attempt-log-3.md +920 -0
- package/docs/sessions/simple-rest-api/attempt-log-1.md +593 -0
- package/docs/sessions/websocket-serve-and-client/attempt-log-2.md +995 -0
- package/docs/tutorials/00-bootstrap.md +148 -0
- package/docs/tutorials/07-endpoints.md +7 -7
- package/docs/tutorials/08-commands.md +153 -72
- package/luca.cli.ts +3 -0
- package/package.json +6 -5
- package/public/index.html +1430 -0
- package/scripts/examples/using-ollama.ts +2 -1
- package/scripts/update-introspection-data.ts +2 -2
- package/src/agi/endpoints/experts.ts +1 -1
- package/src/agi/features/assistant.ts +7 -0
- package/src/agi/features/assistants-manager.ts +5 -5
- package/src/agi/features/claude-code.ts +263 -3
- package/src/agi/features/conversation-history.ts +7 -1
- package/src/agi/features/conversation.ts +26 -3
- package/src/agi/features/openai-codex.ts +26 -2
- package/src/agi/features/openapi.ts +6 -1
- package/src/agi/features/skills-library.ts +9 -1
- package/src/bootstrap/generated.ts +540 -0
- package/src/cli/cli.ts +64 -21
- package/src/client.ts +23 -357
- package/src/clients/civitai/index.ts +1 -1
- package/src/clients/client-template.ts +1 -1
- package/src/clients/comfyui/index.ts +13 -2
- package/src/clients/elevenlabs/index.ts +2 -1
- package/src/clients/graph.ts +87 -0
- package/src/clients/openai/index.ts +10 -1
- package/src/clients/rest.ts +207 -0
- package/src/clients/websocket.ts +176 -0
- package/src/command.ts +281 -34
- package/src/commands/bootstrap.ts +181 -0
- package/src/commands/chat.ts +5 -4
- package/src/commands/describe.ts +225 -2
- package/src/commands/help.ts +35 -9
- package/src/commands/index.ts +3 -0
- package/src/commands/introspect.ts +92 -2
- package/src/commands/prompt.ts +5 -6
- package/src/commands/run.ts +33 -10
- package/src/commands/save-api-docs.ts +49 -0
- package/src/commands/scaffold.ts +169 -23
- package/src/commands/select.ts +94 -0
- package/src/commands/serve.ts +10 -1
- package/src/container.ts +15 -0
- package/src/endpoint.ts +19 -0
- package/src/graft.ts +181 -0
- package/src/introspection/generated.agi.ts +12458 -8968
- package/src/introspection/generated.node.ts +10573 -7145
- package/src/introspection/generated.web.ts +1 -1
- package/src/introspection/index.ts +26 -0
- package/src/node/container.ts +6 -7
- package/src/node/features/content-db.ts +49 -2
- package/src/node/features/disk-cache.ts +16 -9
- package/src/node/features/dns.ts +16 -3
- package/src/node/features/docker.ts +16 -4
- package/src/node/features/esbuild.ts +20 -0
- package/src/node/features/file-manager.ts +184 -29
- package/src/node/features/fs.ts +704 -248
- package/src/node/features/git.ts +21 -8
- package/src/node/features/grep.ts +23 -3
- package/src/node/features/helpers.ts +372 -43
- package/src/node/features/networking.ts +39 -4
- package/src/node/features/opener.ts +28 -15
- package/src/node/features/os.ts +76 -0
- package/src/node/features/port-exposer.ts +11 -1
- package/src/node/features/postgres.ts +17 -1
- package/src/node/features/proc.ts +4 -1
- package/src/node/features/python.ts +63 -14
- package/src/node/features/repl.ts +11 -7
- package/src/node/features/runpod.ts +16 -3
- package/src/node/features/secure-shell.ts +27 -2
- package/src/node/features/semantic-search.ts +12 -1
- package/src/node/features/ui.ts +5 -69
- package/src/node/features/vm.ts +17 -0
- package/src/node/features/window-manager.ts +68 -20
- package/src/node.ts +5 -0
- package/src/scaffolds/generated.ts +492 -290
- package/src/scaffolds/template.ts +9 -0
- package/src/schemas/base.ts +46 -5
- package/src/selector.ts +282 -0
- package/src/server.ts +11 -0
- package/src/servers/express.ts +27 -12
- package/src/servers/socket.ts +45 -11
- package/src/web/clients/socket.ts +4 -1
- package/src/web/container.ts +2 -1
- package/src/web/features/network.ts +7 -1
- package/src/web/features/voice-recognition.ts +16 -1
- package/test/clients-servers.test.ts +2 -1
- package/test/command.test.ts +267 -0
- package/test-integration/assistants-manager.test.ts +10 -20
- package/tmp/.cache/luca-disk-cache/content-v2/sha512/1b/b5/c75b28794f00f94c4d609a98978e9420e9b7146d204a7fbf5b0b30477292581705d207c0100dabaac27eef540aaaece3374af75104a93219d4ec8bfb44e7 +1 -0
- package/tmp/.cache/luca-disk-cache/content-v2/sha512/da/df/1d90ce4e042abeb035a197832c6d6893420a747a056be773eb00e4f745a037d505c8db13dde7d36b36b6b893addbb7df0f5fe9f0c13e665f20056447318b +1 -0
- package/tmp/.cache/luca-disk-cache/content-v2/sha512/ed/04/e1d0c2a58c2db29b3921ca2affb3ea4febe831c53b38ebc21019fb799823aba6ed5b4611873d2cd25d422d49955b852a9c326da0d678899bc1c2c2960901 +1 -0
- package/tmp/.cache/luca-disk-cache/index-v5/00/13/572aa4c9a94f99eda999695d050cdd0ca7fe2d23a50af03234d4c8ce0791 +2 -0
- package/tmp/.cache/luca-disk-cache/index-v5/75/a9/cb61dc0f0589e8ec10a9aca27b834bc73884c479941042d22a2b22324cd3 +2 -0
- package/tmp/.cache/luca-disk-cache/index-v5/9f/0f/8b1f915ee64cfff7667dd96acd7a5ac0a96aa91a346e19cefd45909a9c9c +2 -0
- package/docs/apis/features/node/launcher-app-command-listener.md +0 -145
- package/docs/examples/launcher-app-command-listener.md +0 -120
- package/docs/tasks/web-container-helper-discovery.md +0 -71
- package/docs/todos.md +0 -1
- package/scripts/test-command-listener.ts +0 -123
- package/src/node/features/launcher-app-command-listener.ts +0 -389
package/src/node/features/git.ts
CHANGED
|
@@ -51,6 +51,19 @@ export class Git extends Feature {
|
|
|
51
51
|
static { Feature.register(this, 'git') }
|
|
52
52
|
override state: State<GitState> = new State()
|
|
53
53
|
|
|
54
|
+
private _resolvedGitPath: string | null = null
|
|
55
|
+
|
|
56
|
+
/** Resolve the git binary path via `which`, caching the result. */
|
|
57
|
+
get gitPath(): string {
|
|
58
|
+
if (this._resolvedGitPath) return this._resolvedGitPath
|
|
59
|
+
try {
|
|
60
|
+
this._resolvedGitPath = this.container.feature('proc').exec('which git').trim()
|
|
61
|
+
} catch {
|
|
62
|
+
this._resolvedGitPath = 'git'
|
|
63
|
+
}
|
|
64
|
+
return this._resolvedGitPath
|
|
65
|
+
}
|
|
66
|
+
|
|
54
67
|
/**
|
|
55
68
|
* Lists files in the Git repository using git ls-files command.
|
|
56
69
|
*
|
|
@@ -121,7 +134,7 @@ export class Git extends Feature {
|
|
|
121
134
|
}
|
|
122
135
|
|
|
123
136
|
|
|
124
|
-
return this.container.feature('proc').exec(
|
|
137
|
+
return this.container.feature('proc').exec(`${this.gitPath} ls-files ${baseDir} ${flags.join(' ')}`, {
|
|
125
138
|
cwd: this.repoRoot,
|
|
126
139
|
maxBuffer: 1024 * 1024 * 100,
|
|
127
140
|
}).trim().split("\n")
|
|
@@ -142,7 +155,7 @@ export class Git extends Feature {
|
|
|
142
155
|
*/
|
|
143
156
|
get branch() {
|
|
144
157
|
if(!this.isRepo) { return null }
|
|
145
|
-
return this.container.feature('proc').exec(
|
|
158
|
+
return this.container.feature('proc').exec(`${this.gitPath} branch`).split("\n").filter(line => line.startsWith('*')).map(line => line.replace('*', '').trim()).pop()
|
|
146
159
|
}
|
|
147
160
|
|
|
148
161
|
/**
|
|
@@ -160,7 +173,7 @@ export class Git extends Feature {
|
|
|
160
173
|
*/
|
|
161
174
|
get sha() {
|
|
162
175
|
if(!this.isRepo) { return null }
|
|
163
|
-
return this.container.feature('proc').exec(
|
|
176
|
+
return this.container.feature('proc').exec(`${this.gitPath} rev-parse HEAD`, { cwd: this.repoRoot })
|
|
164
177
|
}
|
|
165
178
|
|
|
166
179
|
/**
|
|
@@ -254,7 +267,7 @@ export class Git extends Feature {
|
|
|
254
267
|
const fieldSep = '---FIELD---'
|
|
255
268
|
|
|
256
269
|
const output = this.container.feature('proc').exec(
|
|
257
|
-
|
|
270
|
+
`${this.gitPath} log -n ${numberOfChanges} --pretty=format:"%s${fieldSep}%b${fieldSep}%an${separator}"`,
|
|
258
271
|
{ cwd: this.repoRoot }
|
|
259
272
|
)
|
|
260
273
|
|
|
@@ -300,7 +313,7 @@ export class Git extends Feature {
|
|
|
300
313
|
const fieldSep = '---FIELD---'
|
|
301
314
|
|
|
302
315
|
const output = proc.exec(
|
|
303
|
-
|
|
316
|
+
`${this.gitPath} log --pretty=format:"%H${fieldSep}%s${separator}" -- ${resolved.map(p => `"${p}"`).join(' ')}`,
|
|
304
317
|
{ cwd: root }
|
|
305
318
|
)
|
|
306
319
|
|
|
@@ -345,7 +358,7 @@ export class Git extends Feature {
|
|
|
345
358
|
const resolved = isAbsolute(file) ? file : resolve(this.container.cwd, file)
|
|
346
359
|
|
|
347
360
|
return proc.exec(
|
|
348
|
-
|
|
361
|
+
`${this.gitPath} diff ${from} ${compareTo} -- "${resolved}"`,
|
|
349
362
|
{ cwd: root }
|
|
350
363
|
).trim()
|
|
351
364
|
}
|
|
@@ -443,7 +456,7 @@ export class Git extends Feature {
|
|
|
443
456
|
const fieldSep = '---FIELD---'
|
|
444
457
|
|
|
445
458
|
const output = proc.exec(
|
|
446
|
-
|
|
459
|
+
`${this.gitPath} log --pretty=format:"%H${fieldSep}%s${fieldSep}%b${separator}" -- ${resolved.map(p => `"${p}"`).join(' ')}`,
|
|
447
460
|
{ cwd: root }
|
|
448
461
|
)
|
|
449
462
|
|
|
@@ -470,7 +483,7 @@ export class Git extends Feature {
|
|
|
470
483
|
|
|
471
484
|
return commits.map(commit => {
|
|
472
485
|
const changedFiles = proc.exec(
|
|
473
|
-
|
|
486
|
+
`${this.gitPath} diff-tree --no-commit-id --name-only -r ${commit.sha}`,
|
|
474
487
|
{ cwd: root }
|
|
475
488
|
).trim().split('\n').filter(Boolean)
|
|
476
489
|
|
|
@@ -80,12 +80,14 @@ export class Grep extends Feature {
|
|
|
80
80
|
static { Feature.register(this, 'grep') }
|
|
81
81
|
|
|
82
82
|
private _hasRipgrep: boolean | null = null
|
|
83
|
+
private _rgPath: string | null = null
|
|
84
|
+
private _grepPath: string | null = null
|
|
83
85
|
|
|
84
86
|
/** Whether ripgrep (rg) is available on this system */
|
|
85
87
|
get hasRipgrep(): boolean {
|
|
86
88
|
if (this._hasRipgrep !== null) return this._hasRipgrep
|
|
87
89
|
try {
|
|
88
|
-
this.container.feature('proc').exec('which rg')
|
|
90
|
+
this._rgPath = this.container.feature('proc').exec('which rg').trim()
|
|
89
91
|
this._hasRipgrep = true
|
|
90
92
|
} catch {
|
|
91
93
|
this._hasRipgrep = false
|
|
@@ -93,6 +95,24 @@ export class Grep extends Feature {
|
|
|
93
95
|
return this._hasRipgrep
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
/** Resolved path to the rg binary */
|
|
99
|
+
get rgPath(): string {
|
|
100
|
+
if (this._rgPath) return this._rgPath
|
|
101
|
+
this.hasRipgrep // triggers resolution
|
|
102
|
+
return this._rgPath || 'rg'
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Resolved path to the grep binary */
|
|
106
|
+
get grepPath(): string {
|
|
107
|
+
if (this._grepPath) return this._grepPath
|
|
108
|
+
try {
|
|
109
|
+
this._grepPath = this.container.feature('proc').exec('which grep').trim()
|
|
110
|
+
} catch {
|
|
111
|
+
this._grepPath = 'grep'
|
|
112
|
+
}
|
|
113
|
+
return this._grepPath
|
|
114
|
+
}
|
|
115
|
+
|
|
96
116
|
/**
|
|
97
117
|
* Search for a pattern in files and return structured results.
|
|
98
118
|
*
|
|
@@ -302,7 +322,7 @@ export class Grep extends Feature {
|
|
|
302
322
|
flags.push(...rawFlags)
|
|
303
323
|
|
|
304
324
|
const searchPath = path || '.'
|
|
305
|
-
return
|
|
325
|
+
return `${this.rgPath} ${flags.join(' ')} -e ${shellQuote(pattern)} ${shellQuote(searchPath)}`
|
|
306
326
|
} else {
|
|
307
327
|
// fallback to grep — use -E for extended regex (supports ?, +, |, (), {})
|
|
308
328
|
flags.push('-r', '-n', '-E')
|
|
@@ -334,7 +354,7 @@ export class Grep extends Feature {
|
|
|
334
354
|
flags.push(...rawFlags)
|
|
335
355
|
|
|
336
356
|
const searchPath = path || '.'
|
|
337
|
-
return
|
|
357
|
+
return `${this.grepPath} ${flags.join(' ')} -e ${shellQuote(pattern)} ${shellQuote(searchPath)}`
|
|
338
358
|
}
|
|
339
359
|
}
|
|
340
360
|
|