@soederpop/luca 0.0.2 → 0.0.4
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 +98 -0
- package/CLAUDE.md +27 -0
- package/SPEC.md +304 -0
- package/bun.lock +110 -265
- package/docs/CLI.md +1 -1
- package/docs/apis/features/node/content-db.md +16 -0
- package/docs/apis/features/node/fs.md +24 -0
- package/docs/apis/features/node/ipc-socket.md +0 -1
- package/docs/apis/features/node/package-finder.md +1 -11
- package/docs/apis/features/node/proc.md +0 -41
- package/docs/apis/features/node/ui.md +0 -2
- package/package.json +12 -8
- package/src/agi/container.server.ts +16 -3
- package/src/agi/features/assistant.ts +3 -7
- package/src/agi/features/assistants-manager.ts +3 -7
- package/src/agi/features/claude-code.ts +3 -7
- package/src/agi/features/conversation-history.ts +3 -7
- package/src/agi/features/conversation.ts +4 -8
- package/src/agi/features/openai-codex.ts +3 -7
- package/src/agi/features/openapi.ts +4 -2
- package/src/agi/features/skills-library.ts +4 -8
- package/src/cli/cli.ts +22 -0
- package/src/client.ts +69 -26
- package/src/clients/civitai/index.ts +3 -7
- package/src/clients/comfyui/index.ts +5 -9
- package/src/clients/elevenlabs/index.ts +39 -19
- package/src/clients/openai/index.ts +3 -7
- package/src/clients/supabase/index.ts +4 -13
- package/src/commands/console.ts +0 -3
- package/src/commands/eval.ts +1 -1
- package/src/commands/index.ts +1 -0
- package/src/commands/introspect.ts +128 -0
- package/src/commands/prompt.ts +1 -4
- package/src/commands/run.ts +6 -13
- package/src/commands/sandbox-mcp.ts +1 -13
- package/src/feature.ts +45 -2
- package/src/introspection/generated.agi.ts +175 -101
- package/src/introspection/generated.node.ts +175 -101
- package/src/introspection/generated.web.ts +113 -29
- package/src/introspection/index.ts +1 -1
- package/src/introspection/scan.ts +3 -1
- package/src/node/features/container-link.ts +3 -2
- package/src/node/features/content-db.ts +10 -2
- package/src/node/features/disk-cache.ts +3 -4
- package/src/node/features/dns.ts +3 -2
- package/src/node/features/docker.ts +3 -2
- package/src/node/features/downloader.ts +3 -16
- package/src/node/features/esbuild.ts +3 -12
- package/src/node/features/file-manager.ts +3 -2
- package/src/node/features/fs.ts +12 -3
- package/src/node/features/git.ts +3 -2
- package/src/node/features/google-auth.ts +3 -2
- package/src/node/features/google-calendar.ts +3 -2
- package/src/node/features/google-docs.ts +3 -2
- package/src/node/features/google-drive.ts +3 -2
- package/src/node/features/google-sheets.ts +3 -2
- package/src/node/features/grep.ts +3 -2
- package/src/node/features/helpers.ts +13 -2
- package/src/node/features/ink.ts +3 -3
- package/src/node/features/ipc-socket.ts +3 -3
- package/src/node/features/json-tree.ts +3 -21
- package/src/node/features/launcher-app-command-listener.ts +3 -2
- package/src/node/features/networking.ts +3 -2
- package/src/node/features/nlp.ts +3 -2
- package/src/node/features/opener.ts +8 -7
- package/src/node/features/os.ts +3 -2
- package/src/node/features/package-finder.ts +3 -2
- package/src/node/features/port-exposer.ts +3 -4
- package/src/node/features/postgres.ts +3 -3
- package/src/node/features/proc.ts +37 -64
- package/src/node/features/process-manager.ts +3 -2
- package/src/node/features/python.ts +3 -3
- package/src/node/features/repl.ts +3 -2
- package/src/node/features/runpod.ts +3 -3
- package/src/node/features/secure-shell.ts +3 -2
- package/src/node/features/semantic-search.ts +4 -6
- package/src/node/features/sqlite.ts +3 -3
- package/src/node/features/telegram.ts +3 -2
- package/src/node/features/tts.ts +3 -2
- package/src/node/features/ui.ts +3 -3
- package/src/node/features/vault.ts +3 -14
- package/src/node/features/vm.ts +41 -3
- package/src/node/features/window-manager.ts +165 -22
- package/src/node/features/yaml-tree.ts +3 -4
- package/src/node/features/yaml.ts +3 -2
- package/src/registry.ts +1 -1
- package/src/scaffolds/generated.ts +1 -1
- package/src/server.ts +43 -0
- package/src/servers/express.ts +24 -8
- package/src/servers/mcp.ts +2 -6
- package/src/servers/socket.ts +22 -7
- package/src/web/clients/socket.ts +3 -5
- package/src/web/features/asset-loader.ts +20 -12
- package/src/web/features/container-link.ts +3 -6
- package/src/web/features/esbuild.ts +21 -7
- package/src/web/features/helpers.ts +4 -2
- package/src/web/features/network.ts +24 -7
- package/src/web/features/speech.ts +24 -7
- package/src/web/features/vault.ts +21 -3
- package/src/web/features/vm.ts +20 -13
- package/src/web/features/voice-recognition.ts +26 -9
- package/commands/update-introspection.ts +0 -67
- package/docs/ideas/class-registration-refactor-possibilities.md +0 -197
- package/docs/ideas/container-use-api.md +0 -9
- package/docs/ideas/easy-auth-for-express-servers-and-luca-serve.md +0 -0
- package/docs/ideas/feature-stacks.md +0 -22
- package/docs/ideas/luca-cli-self-sufficiency-demo.md +0 -23
- package/docs/ideas/mcp-design.md +0 -9
- package/docs/ideas/web-container-debugging-feature.md +0 -13
- package/scripts/animations/chrome-glitch.ts +0 -55
- package/scripts/animations/index.ts +0 -16
- package/scripts/animations/neon-pulse.ts +0 -64
- package/scripts/animations/types.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-12T02:48:58.240Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.googleDocs', {
|
|
7
7
|
"id": "features.googleDocs",
|
|
@@ -820,7 +820,7 @@ setBuildTimeData('features.esbuild', {
|
|
|
820
820
|
"className": "ESBuild",
|
|
821
821
|
"methods": {
|
|
822
822
|
"transformSync": {
|
|
823
|
-
"description": "Transform code synchronously",
|
|
823
|
+
"description": "/** Transform code synchronously",
|
|
824
824
|
"parameters": {
|
|
825
825
|
"code": {
|
|
826
826
|
"type": "string",
|
|
@@ -1948,65 +1948,45 @@ setBuildTimeData('features.proc', {
|
|
|
1948
1948
|
],
|
|
1949
1949
|
"returns": "void"
|
|
1950
1950
|
},
|
|
1951
|
-
"
|
|
1952
|
-
"description": "
|
|
1951
|
+
"exec": {
|
|
1952
|
+
"description": "Execute a command synchronously and return its output. Runs a shell command and waits for it to complete before returning. Useful for simple commands where you need the result immediately.",
|
|
1953
1953
|
"parameters": {
|
|
1954
|
-
"
|
|
1954
|
+
"command": {
|
|
1955
1955
|
"type": "string",
|
|
1956
|
-
"description": "
|
|
1956
|
+
"description": "The command to execute"
|
|
1957
1957
|
},
|
|
1958
1958
|
"options": {
|
|
1959
|
-
"type": "
|
|
1960
|
-
"description": "Options"
|
|
1961
|
-
"properties": {
|
|
1962
|
-
"cwd": {
|
|
1963
|
-
"type": "any",
|
|
1964
|
-
"description": "Working directory"
|
|
1965
|
-
},
|
|
1966
|
-
"maxLines": {
|
|
1967
|
-
"type": "any",
|
|
1968
|
-
"description": "Max stderr lines to keep"
|
|
1969
|
-
},
|
|
1970
|
-
"env": {
|
|
1971
|
-
"type": "any",
|
|
1972
|
-
"description": "Extra environment variables"
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1959
|
+
"type": "any",
|
|
1960
|
+
"description": "Options for command execution (cwd, encoding, etc.)"
|
|
1975
1961
|
}
|
|
1976
1962
|
},
|
|
1977
1963
|
"required": [
|
|
1978
|
-
"
|
|
1964
|
+
"command"
|
|
1979
1965
|
],
|
|
1980
|
-
"returns": "
|
|
1966
|
+
"returns": "string",
|
|
1981
1967
|
"examples": [
|
|
1982
1968
|
{
|
|
1983
1969
|
"language": "ts",
|
|
1984
|
-
"code": "const
|
|
1970
|
+
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
1985
1971
|
}
|
|
1986
1972
|
]
|
|
1987
1973
|
},
|
|
1988
|
-
"
|
|
1989
|
-
"description": "
|
|
1974
|
+
"execSync": {
|
|
1975
|
+
"description": "",
|
|
1990
1976
|
"parameters": {
|
|
1991
1977
|
"command": {
|
|
1992
1978
|
"type": "string",
|
|
1993
|
-
"description": "
|
|
1979
|
+
"description": "Parameter command"
|
|
1994
1980
|
},
|
|
1995
1981
|
"options": {
|
|
1996
1982
|
"type": "any",
|
|
1997
|
-
"description": "
|
|
1983
|
+
"description": "Parameter options"
|
|
1998
1984
|
}
|
|
1999
1985
|
},
|
|
2000
1986
|
"required": [
|
|
2001
1987
|
"command"
|
|
2002
1988
|
],
|
|
2003
|
-
"returns": "string"
|
|
2004
|
-
"examples": [
|
|
2005
|
-
{
|
|
2006
|
-
"language": "ts",
|
|
2007
|
-
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
2008
|
-
}
|
|
2009
|
-
]
|
|
1989
|
+
"returns": "string"
|
|
2010
1990
|
},
|
|
2011
1991
|
"establishLock": {
|
|
2012
1992
|
"description": "Establishes a PID-file lock to prevent duplicate process instances. Writes the current process PID to the given file path. If the file already exists and the PID inside it refers to a running process, the current process exits immediately. Stale PID files (where the process is no longer running) are automatically cleaned up. Cleanup handlers are registered on SIGTERM, SIGINT, and process exit to remove the PID file when the process shuts down.",
|
|
@@ -2305,28 +2285,35 @@ setBuildTimeData('features.vm', {
|
|
|
2305
2285
|
}
|
|
2306
2286
|
]
|
|
2307
2287
|
},
|
|
2288
|
+
"wrapTopLevelAwait": {
|
|
2289
|
+
"description": "Wrap code containing top-level `await` in an async IIFE, injecting `return` before the last expression so the value is not lost. If the code does not contain `await`, or is already wrapped in an async function/arrow, it is returned unchanged.",
|
|
2290
|
+
"parameters": {
|
|
2291
|
+
"code": {
|
|
2292
|
+
"type": "string",
|
|
2293
|
+
"description": "Parameter code"
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
"required": [
|
|
2297
|
+
"code"
|
|
2298
|
+
],
|
|
2299
|
+
"returns": "string"
|
|
2300
|
+
},
|
|
2308
2301
|
"run": {
|
|
2309
|
-
"description": "
|
|
2302
|
+
"description": "",
|
|
2310
2303
|
"parameters": {
|
|
2311
2304
|
"code": {
|
|
2312
2305
|
"type": "string",
|
|
2313
|
-
"description": "
|
|
2306
|
+
"description": "Parameter code"
|
|
2314
2307
|
},
|
|
2315
2308
|
"ctx": {
|
|
2316
2309
|
"type": "any",
|
|
2317
|
-
"description": "
|
|
2310
|
+
"description": "Parameter ctx"
|
|
2318
2311
|
}
|
|
2319
2312
|
},
|
|
2320
2313
|
"required": [
|
|
2321
2314
|
"code"
|
|
2322
2315
|
],
|
|
2323
|
-
"returns": "Promise<T>"
|
|
2324
|
-
"examples": [
|
|
2325
|
-
{
|
|
2326
|
-
"language": "ts",
|
|
2327
|
-
"code": "// Simple calculation\nconst result = vm.run('2 + 3 * 4')\nconsole.log(result) // 14\n\n// Using context variables\nconst greeting = vm.run('`Hello ${name}!`', { name: 'Alice' })\nconsole.log(greeting) // 'Hello Alice!'\n\n// Array operations\nconst sum = vm.run('numbers.reduce((a, b) => a + b, 0)', { \n numbers: [1, 2, 3, 4, 5] \n})\nconsole.log(sum) // 15\n\n// Error handling\nconst error = vm.run('invalidFunction()')\nif (error instanceof Error) {\n console.log('Execution failed:', error.message)\n}"
|
|
2328
|
-
}
|
|
2329
|
-
]
|
|
2316
|
+
"returns": "Promise<T>"
|
|
2330
2317
|
},
|
|
2331
2318
|
"runSync": {
|
|
2332
2319
|
"description": "Execute JavaScript code synchronously in a controlled environment.",
|
|
@@ -5308,6 +5295,19 @@ setBuildTimeData('features.fs', {
|
|
|
5308
5295
|
}
|
|
5309
5296
|
]
|
|
5310
5297
|
},
|
|
5298
|
+
"mkdirp": {
|
|
5299
|
+
"description": "",
|
|
5300
|
+
"parameters": {
|
|
5301
|
+
"folder": {
|
|
5302
|
+
"type": "string",
|
|
5303
|
+
"description": "Parameter folder"
|
|
5304
|
+
}
|
|
5305
|
+
},
|
|
5306
|
+
"required": [
|
|
5307
|
+
"folder"
|
|
5308
|
+
],
|
|
5309
|
+
"returns": "void"
|
|
5310
|
+
},
|
|
5311
5311
|
"ensureFile": {
|
|
5312
5312
|
"description": "Synchronously ensures a file exists with the specified content, creating directories as needed.",
|
|
5313
5313
|
"parameters": {
|
|
@@ -5403,6 +5403,19 @@ setBuildTimeData('features.fs', {
|
|
|
5403
5403
|
}
|
|
5404
5404
|
]
|
|
5405
5405
|
},
|
|
5406
|
+
"existsSync": {
|
|
5407
|
+
"description": "",
|
|
5408
|
+
"parameters": {
|
|
5409
|
+
"path": {
|
|
5410
|
+
"type": "string",
|
|
5411
|
+
"description": "Parameter path"
|
|
5412
|
+
}
|
|
5413
|
+
},
|
|
5414
|
+
"required": [
|
|
5415
|
+
"path"
|
|
5416
|
+
],
|
|
5417
|
+
"returns": "boolean"
|
|
5418
|
+
},
|
|
5406
5419
|
"rm": {
|
|
5407
5420
|
"description": "Asynchronously removes a file.",
|
|
5408
5421
|
"parameters": {
|
|
@@ -8484,6 +8497,12 @@ setBuildTimeData('features.contentDb', {
|
|
|
8484
8497
|
}
|
|
8485
8498
|
]
|
|
8486
8499
|
},
|
|
8500
|
+
"reload": {
|
|
8501
|
+
"description": "Force-reload the collection from disk, picking up new/changed/deleted documents.",
|
|
8502
|
+
"parameters": {},
|
|
8503
|
+
"required": [],
|
|
8504
|
+
"returns": "Promise<ContentDb>"
|
|
8505
|
+
},
|
|
8487
8506
|
"read": {
|
|
8488
8507
|
"description": "Read a single document by its path ID, optionally filtering to specific sections. The document title (H1) is always included in the output. When using `include`, the leading content (paragraphs between the H1 and first H2) is also included by default, controlled by the `leadingContent` option. When `include` is provided, only those sections are returned (via extractSections in flat mode). When `exclude` is provided, those sections are removed from the full document. If both are set, `include` takes precedence.",
|
|
8489
8508
|
"parameters": {
|
|
@@ -8683,7 +8702,13 @@ setBuildTimeData('features.contentDb', {
|
|
|
8683
8702
|
]
|
|
8684
8703
|
}
|
|
8685
8704
|
},
|
|
8686
|
-
"events": {
|
|
8705
|
+
"events": {
|
|
8706
|
+
"reloaded": {
|
|
8707
|
+
"name": "reloaded",
|
|
8708
|
+
"description": "Event emitted by ContentDb",
|
|
8709
|
+
"arguments": {}
|
|
8710
|
+
}
|
|
8711
|
+
},
|
|
8687
8712
|
"state": {},
|
|
8688
8713
|
"options": {},
|
|
8689
8714
|
"envVars": [],
|
|
@@ -8862,7 +8887,7 @@ setBuildTimeData('servers.mcp', {
|
|
|
8862
8887
|
|
|
8863
8888
|
setBuildTimeData('servers.express', {
|
|
8864
8889
|
"id": "servers.express",
|
|
8865
|
-
"description": "
|
|
8890
|
+
"description": "Express.js HTTP server with automatic endpoint mounting, CORS, and SPA history fallback. Wraps an Express application with convention-based endpoint discovery. Endpoints defined as modules are automatically mounted as routes. Supports static file serving, CORS configuration, and single-page app history fallback out of the box.",
|
|
8866
8891
|
"shortcut": "servers.express",
|
|
8867
8892
|
"className": "ExpressServer",
|
|
8868
8893
|
"methods": {
|
|
@@ -8955,12 +8980,18 @@ setBuildTimeData('servers.express', {
|
|
|
8955
8980
|
"events": {},
|
|
8956
8981
|
"state": {},
|
|
8957
8982
|
"options": {},
|
|
8958
|
-
"envVars": []
|
|
8983
|
+
"envVars": [],
|
|
8984
|
+
"examples": [
|
|
8985
|
+
{
|
|
8986
|
+
"language": "ts",
|
|
8987
|
+
"code": "const server = container.server('express', { cors: true, static: './public' })\nawait server.start({ port: 3000 })\n\n// Mount endpoints programmatically\nserver.mount(myEndpoint)\n\n// Access the underlying Express app\nserver.app.get('/health', (req, res) => res.json({ ok: true }))"
|
|
8988
|
+
}
|
|
8989
|
+
]
|
|
8959
8990
|
});
|
|
8960
8991
|
|
|
8961
8992
|
setBuildTimeData('servers.websocket', {
|
|
8962
8993
|
"id": "servers.websocket",
|
|
8963
|
-
"description": "
|
|
8994
|
+
"description": "WebSocket server built on the `ws` library with optional JSON message framing. Manages WebSocket connections, tracks connected clients, and bridges messages to Luca's event bus. When `json` mode is enabled, messages are automatically parsed and stringified.",
|
|
8964
8995
|
"shortcut": "servers.websocket",
|
|
8965
8996
|
"className": "WebsocketServer",
|
|
8966
8997
|
"methods": {
|
|
@@ -9037,7 +9068,13 @@ setBuildTimeData('servers.websocket', {
|
|
|
9037
9068
|
},
|
|
9038
9069
|
"state": {},
|
|
9039
9070
|
"options": {},
|
|
9040
|
-
"envVars": []
|
|
9071
|
+
"envVars": [],
|
|
9072
|
+
"examples": [
|
|
9073
|
+
{
|
|
9074
|
+
"language": "ts",
|
|
9075
|
+
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (client, data) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
|
|
9076
|
+
}
|
|
9077
|
+
]
|
|
9041
9078
|
});
|
|
9042
9079
|
|
|
9043
9080
|
// Container introspection data
|
|
@@ -10285,7 +10322,7 @@ export const introspectionData = [
|
|
|
10285
10322
|
"className": "ESBuild",
|
|
10286
10323
|
"methods": {
|
|
10287
10324
|
"transformSync": {
|
|
10288
|
-
"description": "Transform code synchronously",
|
|
10325
|
+
"description": "/** Transform code synchronously",
|
|
10289
10326
|
"parameters": {
|
|
10290
10327
|
"code": {
|
|
10291
10328
|
"type": "string",
|
|
@@ -11409,65 +11446,45 @@ export const introspectionData = [
|
|
|
11409
11446
|
],
|
|
11410
11447
|
"returns": "void"
|
|
11411
11448
|
},
|
|
11412
|
-
"
|
|
11413
|
-
"description": "
|
|
11449
|
+
"exec": {
|
|
11450
|
+
"description": "Execute a command synchronously and return its output. Runs a shell command and waits for it to complete before returning. Useful for simple commands where you need the result immediately.",
|
|
11414
11451
|
"parameters": {
|
|
11415
|
-
"
|
|
11452
|
+
"command": {
|
|
11416
11453
|
"type": "string",
|
|
11417
|
-
"description": "
|
|
11454
|
+
"description": "The command to execute"
|
|
11418
11455
|
},
|
|
11419
11456
|
"options": {
|
|
11420
|
-
"type": "
|
|
11421
|
-
"description": "Options"
|
|
11422
|
-
"properties": {
|
|
11423
|
-
"cwd": {
|
|
11424
|
-
"type": "any",
|
|
11425
|
-
"description": "Working directory"
|
|
11426
|
-
},
|
|
11427
|
-
"maxLines": {
|
|
11428
|
-
"type": "any",
|
|
11429
|
-
"description": "Max stderr lines to keep"
|
|
11430
|
-
},
|
|
11431
|
-
"env": {
|
|
11432
|
-
"type": "any",
|
|
11433
|
-
"description": "Extra environment variables"
|
|
11434
|
-
}
|
|
11435
|
-
}
|
|
11457
|
+
"type": "any",
|
|
11458
|
+
"description": "Options for command execution (cwd, encoding, etc.)"
|
|
11436
11459
|
}
|
|
11437
11460
|
},
|
|
11438
11461
|
"required": [
|
|
11439
|
-
"
|
|
11462
|
+
"command"
|
|
11440
11463
|
],
|
|
11441
|
-
"returns": "
|
|
11464
|
+
"returns": "string",
|
|
11442
11465
|
"examples": [
|
|
11443
11466
|
{
|
|
11444
11467
|
"language": "ts",
|
|
11445
|
-
"code": "const
|
|
11468
|
+
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
11446
11469
|
}
|
|
11447
11470
|
]
|
|
11448
11471
|
},
|
|
11449
|
-
"
|
|
11450
|
-
"description": "
|
|
11472
|
+
"execSync": {
|
|
11473
|
+
"description": "",
|
|
11451
11474
|
"parameters": {
|
|
11452
11475
|
"command": {
|
|
11453
11476
|
"type": "string",
|
|
11454
|
-
"description": "
|
|
11477
|
+
"description": "Parameter command"
|
|
11455
11478
|
},
|
|
11456
11479
|
"options": {
|
|
11457
11480
|
"type": "any",
|
|
11458
|
-
"description": "
|
|
11481
|
+
"description": "Parameter options"
|
|
11459
11482
|
}
|
|
11460
11483
|
},
|
|
11461
11484
|
"required": [
|
|
11462
11485
|
"command"
|
|
11463
11486
|
],
|
|
11464
|
-
"returns": "string"
|
|
11465
|
-
"examples": [
|
|
11466
|
-
{
|
|
11467
|
-
"language": "ts",
|
|
11468
|
-
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
11469
|
-
}
|
|
11470
|
-
]
|
|
11487
|
+
"returns": "string"
|
|
11471
11488
|
},
|
|
11472
11489
|
"establishLock": {
|
|
11473
11490
|
"description": "Establishes a PID-file lock to prevent duplicate process instances. Writes the current process PID to the given file path. If the file already exists and the PID inside it refers to a running process, the current process exits immediately. Stale PID files (where the process is no longer running) are automatically cleaned up. Cleanup handlers are registered on SIGTERM, SIGINT, and process exit to remove the PID file when the process shuts down.",
|
|
@@ -11764,28 +11781,35 @@ export const introspectionData = [
|
|
|
11764
11781
|
}
|
|
11765
11782
|
]
|
|
11766
11783
|
},
|
|
11784
|
+
"wrapTopLevelAwait": {
|
|
11785
|
+
"description": "Wrap code containing top-level `await` in an async IIFE, injecting `return` before the last expression so the value is not lost. If the code does not contain `await`, or is already wrapped in an async function/arrow, it is returned unchanged.",
|
|
11786
|
+
"parameters": {
|
|
11787
|
+
"code": {
|
|
11788
|
+
"type": "string",
|
|
11789
|
+
"description": "Parameter code"
|
|
11790
|
+
}
|
|
11791
|
+
},
|
|
11792
|
+
"required": [
|
|
11793
|
+
"code"
|
|
11794
|
+
],
|
|
11795
|
+
"returns": "string"
|
|
11796
|
+
},
|
|
11767
11797
|
"run": {
|
|
11768
|
-
"description": "
|
|
11798
|
+
"description": "",
|
|
11769
11799
|
"parameters": {
|
|
11770
11800
|
"code": {
|
|
11771
11801
|
"type": "string",
|
|
11772
|
-
"description": "
|
|
11802
|
+
"description": "Parameter code"
|
|
11773
11803
|
},
|
|
11774
11804
|
"ctx": {
|
|
11775
11805
|
"type": "any",
|
|
11776
|
-
"description": "
|
|
11806
|
+
"description": "Parameter ctx"
|
|
11777
11807
|
}
|
|
11778
11808
|
},
|
|
11779
11809
|
"required": [
|
|
11780
11810
|
"code"
|
|
11781
11811
|
],
|
|
11782
|
-
"returns": "Promise<T>"
|
|
11783
|
-
"examples": [
|
|
11784
|
-
{
|
|
11785
|
-
"language": "ts",
|
|
11786
|
-
"code": "// Simple calculation\nconst result = vm.run('2 + 3 * 4')\nconsole.log(result) // 14\n\n// Using context variables\nconst greeting = vm.run('`Hello ${name}!`', { name: 'Alice' })\nconsole.log(greeting) // 'Hello Alice!'\n\n// Array operations\nconst sum = vm.run('numbers.reduce((a, b) => a + b, 0)', { \n numbers: [1, 2, 3, 4, 5] \n})\nconsole.log(sum) // 15\n\n// Error handling\nconst error = vm.run('invalidFunction()')\nif (error instanceof Error) {\n console.log('Execution failed:', error.message)\n}"
|
|
11787
|
-
}
|
|
11788
|
-
]
|
|
11812
|
+
"returns": "Promise<T>"
|
|
11789
11813
|
},
|
|
11790
11814
|
"runSync": {
|
|
11791
11815
|
"description": "Execute JavaScript code synchronously in a controlled environment.",
|
|
@@ -14750,6 +14774,19 @@ export const introspectionData = [
|
|
|
14750
14774
|
}
|
|
14751
14775
|
]
|
|
14752
14776
|
},
|
|
14777
|
+
"mkdirp": {
|
|
14778
|
+
"description": "",
|
|
14779
|
+
"parameters": {
|
|
14780
|
+
"folder": {
|
|
14781
|
+
"type": "string",
|
|
14782
|
+
"description": "Parameter folder"
|
|
14783
|
+
}
|
|
14784
|
+
},
|
|
14785
|
+
"required": [
|
|
14786
|
+
"folder"
|
|
14787
|
+
],
|
|
14788
|
+
"returns": "void"
|
|
14789
|
+
},
|
|
14753
14790
|
"ensureFile": {
|
|
14754
14791
|
"description": "Synchronously ensures a file exists with the specified content, creating directories as needed.",
|
|
14755
14792
|
"parameters": {
|
|
@@ -14845,6 +14882,19 @@ export const introspectionData = [
|
|
|
14845
14882
|
}
|
|
14846
14883
|
]
|
|
14847
14884
|
},
|
|
14885
|
+
"existsSync": {
|
|
14886
|
+
"description": "",
|
|
14887
|
+
"parameters": {
|
|
14888
|
+
"path": {
|
|
14889
|
+
"type": "string",
|
|
14890
|
+
"description": "Parameter path"
|
|
14891
|
+
}
|
|
14892
|
+
},
|
|
14893
|
+
"required": [
|
|
14894
|
+
"path"
|
|
14895
|
+
],
|
|
14896
|
+
"returns": "boolean"
|
|
14897
|
+
},
|
|
14848
14898
|
"rm": {
|
|
14849
14899
|
"description": "Asynchronously removes a file.",
|
|
14850
14900
|
"parameters": {
|
|
@@ -17911,6 +17961,12 @@ export const introspectionData = [
|
|
|
17911
17961
|
}
|
|
17912
17962
|
]
|
|
17913
17963
|
},
|
|
17964
|
+
"reload": {
|
|
17965
|
+
"description": "Force-reload the collection from disk, picking up new/changed/deleted documents.",
|
|
17966
|
+
"parameters": {},
|
|
17967
|
+
"required": [],
|
|
17968
|
+
"returns": "Promise<ContentDb>"
|
|
17969
|
+
},
|
|
17914
17970
|
"read": {
|
|
17915
17971
|
"description": "Read a single document by its path ID, optionally filtering to specific sections. The document title (H1) is always included in the output. When using `include`, the leading content (paragraphs between the H1 and first H2) is also included by default, controlled by the `leadingContent` option. When `include` is provided, only those sections are returned (via extractSections in flat mode). When `exclude` is provided, those sections are removed from the full document. If both are set, `include` takes precedence.",
|
|
17916
17972
|
"parameters": {
|
|
@@ -18110,7 +18166,13 @@ export const introspectionData = [
|
|
|
18110
18166
|
]
|
|
18111
18167
|
}
|
|
18112
18168
|
},
|
|
18113
|
-
"events": {
|
|
18169
|
+
"events": {
|
|
18170
|
+
"reloaded": {
|
|
18171
|
+
"name": "reloaded",
|
|
18172
|
+
"description": "Event emitted by ContentDb",
|
|
18173
|
+
"arguments": {}
|
|
18174
|
+
}
|
|
18175
|
+
},
|
|
18114
18176
|
"state": {},
|
|
18115
18177
|
"options": {},
|
|
18116
18178
|
"envVars": [],
|
|
@@ -18287,7 +18349,7 @@ export const introspectionData = [
|
|
|
18287
18349
|
},
|
|
18288
18350
|
{
|
|
18289
18351
|
"id": "servers.express",
|
|
18290
|
-
"description": "
|
|
18352
|
+
"description": "Express.js HTTP server with automatic endpoint mounting, CORS, and SPA history fallback. Wraps an Express application with convention-based endpoint discovery. Endpoints defined as modules are automatically mounted as routes. Supports static file serving, CORS configuration, and single-page app history fallback out of the box.",
|
|
18291
18353
|
"shortcut": "servers.express",
|
|
18292
18354
|
"className": "ExpressServer",
|
|
18293
18355
|
"methods": {
|
|
@@ -18380,11 +18442,17 @@ export const introspectionData = [
|
|
|
18380
18442
|
"events": {},
|
|
18381
18443
|
"state": {},
|
|
18382
18444
|
"options": {},
|
|
18383
|
-
"envVars": []
|
|
18445
|
+
"envVars": [],
|
|
18446
|
+
"examples": [
|
|
18447
|
+
{
|
|
18448
|
+
"language": "ts",
|
|
18449
|
+
"code": "const server = container.server('express', { cors: true, static: './public' })\nawait server.start({ port: 3000 })\n\n// Mount endpoints programmatically\nserver.mount(myEndpoint)\n\n// Access the underlying Express app\nserver.app.get('/health', (req, res) => res.json({ ok: true }))"
|
|
18450
|
+
}
|
|
18451
|
+
]
|
|
18384
18452
|
},
|
|
18385
18453
|
{
|
|
18386
18454
|
"id": "servers.websocket",
|
|
18387
|
-
"description": "
|
|
18455
|
+
"description": "WebSocket server built on the `ws` library with optional JSON message framing. Manages WebSocket connections, tracks connected clients, and bridges messages to Luca's event bus. When `json` mode is enabled, messages are automatically parsed and stringified.",
|
|
18388
18456
|
"shortcut": "servers.websocket",
|
|
18389
18457
|
"className": "WebsocketServer",
|
|
18390
18458
|
"methods": {
|
|
@@ -18461,7 +18529,13 @@ export const introspectionData = [
|
|
|
18461
18529
|
},
|
|
18462
18530
|
"state": {},
|
|
18463
18531
|
"options": {},
|
|
18464
|
-
"envVars": []
|
|
18532
|
+
"envVars": [],
|
|
18533
|
+
"examples": [
|
|
18534
|
+
{
|
|
18535
|
+
"language": "ts",
|
|
18536
|
+
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (client, data) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
|
|
18537
|
+
}
|
|
18538
|
+
]
|
|
18465
18539
|
}
|
|
18466
18540
|
];
|
|
18467
18541
|
|