@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.
Files changed (67) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +6 -1
  3. package/assistants/codingAssistant/hooks.ts +0 -1
  4. package/assistants/lucaExpert/CORE.md +37 -0
  5. package/assistants/lucaExpert/hooks.ts +9 -0
  6. package/assistants/lucaExpert/tools.ts +177 -0
  7. package/commands/build-bootstrap.ts +41 -1
  8. package/docs/TABLE-OF-CONTENTS.md +0 -1
  9. package/docs/apis/clients/rest.md +5 -5
  10. package/docs/apis/features/agi/assistant.md +1 -1
  11. package/docs/apis/features/agi/conversation-history.md +6 -7
  12. package/docs/apis/features/agi/conversation.md +1 -1
  13. package/docs/apis/features/agi/semantic-search.md +1 -1
  14. package/docs/bootstrap/CLAUDE.md +1 -1
  15. package/docs/bootstrap/SKILL.md +7 -3
  16. package/docs/bootstrap/templates/luca-cli.ts +5 -0
  17. package/docs/mcp/readme.md +1 -1
  18. package/docs/tutorials/00-bootstrap.md +18 -0
  19. package/package.json +2 -2
  20. package/scripts/stamp-build.sh +12 -0
  21. package/scripts/test-docs-reader.ts +10 -0
  22. package/src/agi/container.server.ts +8 -5
  23. package/src/agi/features/assistant.ts +210 -55
  24. package/src/agi/features/assistants-manager.ts +138 -66
  25. package/src/agi/features/conversation.ts +46 -14
  26. package/src/agi/features/docs-reader.ts +166 -0
  27. package/src/agi/features/openapi.ts +1 -1
  28. package/src/agi/features/skills-library.ts +257 -313
  29. package/src/bootstrap/generated.ts +8163 -6
  30. package/src/cli/build-info.ts +4 -0
  31. package/src/cli/cli.ts +2 -1
  32. package/src/command.ts +75 -0
  33. package/src/commands/bootstrap.ts +16 -1
  34. package/src/commands/describe.ts +29 -1089
  35. package/src/commands/eval.ts +6 -1
  36. package/src/commands/sandbox-mcp.ts +17 -7
  37. package/src/container-describer.ts +1098 -0
  38. package/src/container.ts +11 -0
  39. package/src/helper.ts +56 -2
  40. package/src/introspection/generated.agi.ts +1684 -799
  41. package/src/introspection/generated.node.ts +964 -572
  42. package/src/introspection/generated.web.ts +9 -1
  43. package/src/node/container.ts +1 -1
  44. package/src/node/features/content-db.ts +268 -13
  45. package/src/node/features/fs.ts +18 -0
  46. package/src/node/features/git.ts +90 -0
  47. package/src/node/features/grep.ts +1 -1
  48. package/src/node/features/proc.ts +1 -0
  49. package/src/node/features/tts.ts +1 -1
  50. package/src/node/features/vm.ts +48 -0
  51. package/src/scaffolds/generated.ts +2 -2
  52. package/src/server.ts +40 -0
  53. package/src/servers/express.ts +2 -0
  54. package/src/servers/mcp.ts +1 -0
  55. package/src/servers/socket.ts +2 -0
  56. package/assistants/architect/CORE.md +0 -3
  57. package/assistants/architect/hooks.ts +0 -3
  58. package/assistants/architect/tools.ts +0 -10
  59. package/docs/apis/features/agi/skills-library.md +0 -234
  60. package/docs/reports/assistant-bugs.md +0 -38
  61. package/docs/reports/attach-pattern-usage.md +0 -18
  62. package/docs/reports/code-audit-results.md +0 -391
  63. package/docs/reports/console-hmr-design.md +0 -170
  64. package/docs/reports/helper-semantic-search.md +0 -72
  65. package/docs/reports/introspection-audit-tasks.md +0 -378
  66. package/docs/reports/luca-mcp-improvements.md +0 -128
  67. package/test-integration/skills-library.test.ts +0 -157
@@ -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
- const code = args.slice(1).join(' ')
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.run(args.code, sandboxContext)
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
- return { content: [{ type: 'text' as const, text }] }
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 || ''}` }],