@soederpop/luca 0.0.23 → 0.0.26
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/AGENTS.md +1 -1
- package/CLAUDE.md +6 -1
- package/assistants/codingAssistant/hooks.ts +0 -1
- package/assistants/lucaExpert/CORE.md +37 -0
- package/assistants/lucaExpert/hooks.ts +9 -0
- package/assistants/lucaExpert/tools.ts +177 -0
- package/commands/build-bootstrap.ts +41 -1
- package/docs/TABLE-OF-CONTENTS.md +0 -1
- package/docs/apis/clients/rest.md +5 -5
- package/docs/apis/features/agi/assistant.md +1 -1
- package/docs/apis/features/agi/conversation-history.md +6 -7
- package/docs/apis/features/agi/conversation.md +1 -1
- package/docs/apis/features/agi/semantic-search.md +1 -1
- package/docs/bootstrap/CLAUDE.md +1 -1
- package/docs/bootstrap/SKILL.md +7 -3
- package/docs/bootstrap/templates/luca-cli.ts +5 -0
- package/docs/mcp/readme.md +1 -1
- package/docs/tutorials/00-bootstrap.md +18 -0
- package/package.json +2 -2
- package/scripts/stamp-build.sh +12 -0
- package/scripts/test-docs-reader.ts +10 -0
- package/src/agi/container.server.ts +8 -5
- package/src/agi/features/assistant.ts +210 -55
- package/src/agi/features/assistants-manager.ts +138 -66
- package/src/agi/features/conversation.ts +46 -14
- package/src/agi/features/docs-reader.ts +166 -0
- package/src/agi/features/openapi.ts +1 -1
- package/src/agi/features/skills-library.ts +257 -313
- package/src/bootstrap/generated.ts +8163 -6
- package/src/cli/build-info.ts +4 -0
- package/src/cli/cli.ts +2 -1
- package/src/command.ts +75 -0
- package/src/commands/bootstrap.ts +16 -1
- package/src/commands/describe.ts +29 -1089
- package/src/commands/eval.ts +6 -1
- package/src/commands/sandbox-mcp.ts +17 -7
- package/src/container-describer.ts +1098 -0
- package/src/container.ts +11 -0
- package/src/helper.ts +56 -2
- package/src/introspection/generated.agi.ts +1684 -799
- package/src/introspection/generated.node.ts +964 -572
- package/src/introspection/generated.web.ts +9 -1
- package/src/node/container.ts +1 -1
- package/src/node/features/content-db.ts +268 -13
- package/src/node/features/fs.ts +18 -0
- package/src/node/features/git.ts +90 -0
- package/src/node/features/grep.ts +1 -1
- package/src/node/features/proc.ts +1 -0
- package/src/node/features/tts.ts +1 -1
- package/src/node/features/vm.ts +48 -0
- package/src/scaffolds/generated.ts +2 -2
- package/src/server.ts +40 -0
- package/src/servers/express.ts +2 -0
- package/src/servers/mcp.ts +1 -0
- package/src/servers/socket.ts +2 -0
- package/assistants/architect/CORE.md +0 -3
- package/assistants/architect/hooks.ts +0 -3
- package/assistants/architect/tools.ts +0 -10
- package/docs/apis/features/agi/skills-library.md +0 -234
- package/docs/reports/assistant-bugs.md +0 -38
- package/docs/reports/attach-pattern-usage.md +0 -18
- package/docs/reports/code-audit-results.md +0 -391
- package/docs/reports/console-hmr-design.md +0 -170
- package/docs/reports/helper-semantic-search.md +0 -72
- package/docs/reports/introspection-audit-tasks.md +0 -378
- package/docs/reports/luca-mcp-improvements.md +0 -128
- package/test-integration/skills-library.test.ts +0 -157
package/src/commands/eval.ts
CHANGED
|
@@ -24,7 +24,12 @@ export default async function evalCommand(options: z.infer<typeof argsSchema>, c
|
|
|
24
24
|
|
|
25
25
|
const args = container.argv._ as string[]
|
|
26
26
|
// args[0] is "eval", the rest is the code snippet
|
|
27
|
-
|
|
27
|
+
let code = args.slice(1).join(' ')
|
|
28
|
+
|
|
29
|
+
// Read from stdin if no inline code was provided
|
|
30
|
+
if (!code.trim()) {
|
|
31
|
+
code = await Bun.stdin.text()
|
|
32
|
+
}
|
|
28
33
|
|
|
29
34
|
if (!code.trim()) {
|
|
30
35
|
console.error('Usage: luca eval "<code>" [--json]')
|
|
@@ -42,11 +42,7 @@ export default async function mcpSandbox(options: z.infer<typeof argsSchema>, co
|
|
|
42
42
|
const vmFeature = container.feature('vm')
|
|
43
43
|
const sandboxContext = vmFeature.createContext({
|
|
44
44
|
container,
|
|
45
|
-
console
|
|
46
|
-
log: (...args: any[]) => args.map(a => typeof a === 'object' ? JSON.stringify(a, null, 2) : String(a)).join(' '),
|
|
47
|
-
error: (...args: any[]) => args.map(a => typeof a === 'object' ? JSON.stringify(a, null, 2) : String(a)).join(' '),
|
|
48
|
-
warn: (...args: any[]) => args.map(a => typeof a === 'object' ? JSON.stringify(a, null, 2) : String(a)).join(' '),
|
|
49
|
-
},
|
|
45
|
+
console,
|
|
50
46
|
setTimeout,
|
|
51
47
|
setInterval,
|
|
52
48
|
clearTimeout,
|
|
@@ -154,8 +150,20 @@ export default async function mcpSandbox(options: z.infer<typeof argsSchema>, co
|
|
|
154
150
|
}),
|
|
155
151
|
handler: async (args) => {
|
|
156
152
|
try {
|
|
157
|
-
const result = await vmFeature.
|
|
153
|
+
const { result, console: calls } = await vmFeature.runCaptured(args.code, sandboxContext)
|
|
154
|
+
|
|
155
|
+
const content: Array<{ type: 'text', text: string }> = []
|
|
158
156
|
|
|
157
|
+
// Include captured console output if any
|
|
158
|
+
if (calls.length > 0) {
|
|
159
|
+
const consoleLines = calls.map(c => {
|
|
160
|
+
const prefix = c.method === 'log' ? '' : `[${c.method}] `
|
|
161
|
+
return prefix + c.args.map(a => typeof a === 'object' ? JSON.stringify(a, null, 2) : String(a)).join(' ')
|
|
162
|
+
})
|
|
163
|
+
content.push({ type: 'text' as const, text: consoleLines.join('\n') })
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Include the result
|
|
159
167
|
let text: string
|
|
160
168
|
if (result === undefined) {
|
|
161
169
|
text = 'undefined'
|
|
@@ -173,7 +181,9 @@ export default async function mcpSandbox(options: z.infer<typeof argsSchema>, co
|
|
|
173
181
|
text = String(result)
|
|
174
182
|
}
|
|
175
183
|
|
|
176
|
-
|
|
184
|
+
content.push({ type: 'text' as const, text })
|
|
185
|
+
|
|
186
|
+
return { content }
|
|
177
187
|
} catch (error: any) {
|
|
178
188
|
return {
|
|
179
189
|
content: [{ type: 'text' as const, text: `Error: ${error.message}\n\n${error.stack || ''}` }],
|