@soederpop/luca 0.0.3 → 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.321Z
|
|
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
|
setBuildTimeData('features.assistantsManager', {
|
|
@@ -12534,7 +12571,7 @@ export const introspectionData = [
|
|
|
12534
12571
|
"className": "ESBuild",
|
|
12535
12572
|
"methods": {
|
|
12536
12573
|
"transformSync": {
|
|
12537
|
-
"description": "Transform code synchronously",
|
|
12574
|
+
"description": "/** Transform code synchronously",
|
|
12538
12575
|
"parameters": {
|
|
12539
12576
|
"code": {
|
|
12540
12577
|
"type": "string",
|
|
@@ -13658,65 +13695,45 @@ export const introspectionData = [
|
|
|
13658
13695
|
],
|
|
13659
13696
|
"returns": "void"
|
|
13660
13697
|
},
|
|
13661
|
-
"
|
|
13662
|
-
"description": "
|
|
13698
|
+
"exec": {
|
|
13699
|
+
"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.",
|
|
13663
13700
|
"parameters": {
|
|
13664
|
-
"
|
|
13701
|
+
"command": {
|
|
13665
13702
|
"type": "string",
|
|
13666
|
-
"description": "
|
|
13703
|
+
"description": "The command to execute"
|
|
13667
13704
|
},
|
|
13668
13705
|
"options": {
|
|
13669
|
-
"type": "
|
|
13670
|
-
"description": "Options"
|
|
13671
|
-
"properties": {
|
|
13672
|
-
"cwd": {
|
|
13673
|
-
"type": "any",
|
|
13674
|
-
"description": "Working directory"
|
|
13675
|
-
},
|
|
13676
|
-
"maxLines": {
|
|
13677
|
-
"type": "any",
|
|
13678
|
-
"description": "Max stderr lines to keep"
|
|
13679
|
-
},
|
|
13680
|
-
"env": {
|
|
13681
|
-
"type": "any",
|
|
13682
|
-
"description": "Extra environment variables"
|
|
13683
|
-
}
|
|
13684
|
-
}
|
|
13706
|
+
"type": "any",
|
|
13707
|
+
"description": "Options for command execution (cwd, encoding, etc.)"
|
|
13685
13708
|
}
|
|
13686
13709
|
},
|
|
13687
13710
|
"required": [
|
|
13688
|
-
"
|
|
13711
|
+
"command"
|
|
13689
13712
|
],
|
|
13690
|
-
"returns": "
|
|
13713
|
+
"returns": "string",
|
|
13691
13714
|
"examples": [
|
|
13692
13715
|
{
|
|
13693
13716
|
"language": "ts",
|
|
13694
|
-
"code": "const
|
|
13717
|
+
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
13695
13718
|
}
|
|
13696
13719
|
]
|
|
13697
13720
|
},
|
|
13698
|
-
"
|
|
13699
|
-
"description": "
|
|
13721
|
+
"execSync": {
|
|
13722
|
+
"description": "",
|
|
13700
13723
|
"parameters": {
|
|
13701
13724
|
"command": {
|
|
13702
13725
|
"type": "string",
|
|
13703
|
-
"description": "
|
|
13726
|
+
"description": "Parameter command"
|
|
13704
13727
|
},
|
|
13705
13728
|
"options": {
|
|
13706
13729
|
"type": "any",
|
|
13707
|
-
"description": "
|
|
13730
|
+
"description": "Parameter options"
|
|
13708
13731
|
}
|
|
13709
13732
|
},
|
|
13710
13733
|
"required": [
|
|
13711
13734
|
"command"
|
|
13712
13735
|
],
|
|
13713
|
-
"returns": "string"
|
|
13714
|
-
"examples": [
|
|
13715
|
-
{
|
|
13716
|
-
"language": "ts",
|
|
13717
|
-
"code": "const branch = proc.exec('git branch --show-current')\nconst version = proc.exec('node --version')"
|
|
13718
|
-
}
|
|
13719
|
-
]
|
|
13736
|
+
"returns": "string"
|
|
13720
13737
|
},
|
|
13721
13738
|
"establishLock": {
|
|
13722
13739
|
"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.",
|
|
@@ -14013,28 +14030,35 @@ export const introspectionData = [
|
|
|
14013
14030
|
}
|
|
14014
14031
|
]
|
|
14015
14032
|
},
|
|
14033
|
+
"wrapTopLevelAwait": {
|
|
14034
|
+
"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.",
|
|
14035
|
+
"parameters": {
|
|
14036
|
+
"code": {
|
|
14037
|
+
"type": "string",
|
|
14038
|
+
"description": "Parameter code"
|
|
14039
|
+
}
|
|
14040
|
+
},
|
|
14041
|
+
"required": [
|
|
14042
|
+
"code"
|
|
14043
|
+
],
|
|
14044
|
+
"returns": "string"
|
|
14045
|
+
},
|
|
14016
14046
|
"run": {
|
|
14017
|
-
"description": "
|
|
14047
|
+
"description": "",
|
|
14018
14048
|
"parameters": {
|
|
14019
14049
|
"code": {
|
|
14020
14050
|
"type": "string",
|
|
14021
|
-
"description": "
|
|
14051
|
+
"description": "Parameter code"
|
|
14022
14052
|
},
|
|
14023
14053
|
"ctx": {
|
|
14024
14054
|
"type": "any",
|
|
14025
|
-
"description": "
|
|
14055
|
+
"description": "Parameter ctx"
|
|
14026
14056
|
}
|
|
14027
14057
|
},
|
|
14028
14058
|
"required": [
|
|
14029
14059
|
"code"
|
|
14030
14060
|
],
|
|
14031
|
-
"returns": "Promise<T>"
|
|
14032
|
-
"examples": [
|
|
14033
|
-
{
|
|
14034
|
-
"language": "ts",
|
|
14035
|
-
"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}"
|
|
14036
|
-
}
|
|
14037
|
-
]
|
|
14061
|
+
"returns": "Promise<T>"
|
|
14038
14062
|
},
|
|
14039
14063
|
"runSync": {
|
|
14040
14064
|
"description": "Execute JavaScript code synchronously in a controlled environment.",
|
|
@@ -16999,6 +17023,19 @@ export const introspectionData = [
|
|
|
16999
17023
|
}
|
|
17000
17024
|
]
|
|
17001
17025
|
},
|
|
17026
|
+
"mkdirp": {
|
|
17027
|
+
"description": "",
|
|
17028
|
+
"parameters": {
|
|
17029
|
+
"folder": {
|
|
17030
|
+
"type": "string",
|
|
17031
|
+
"description": "Parameter folder"
|
|
17032
|
+
}
|
|
17033
|
+
},
|
|
17034
|
+
"required": [
|
|
17035
|
+
"folder"
|
|
17036
|
+
],
|
|
17037
|
+
"returns": "void"
|
|
17038
|
+
},
|
|
17002
17039
|
"ensureFile": {
|
|
17003
17040
|
"description": "Synchronously ensures a file exists with the specified content, creating directories as needed.",
|
|
17004
17041
|
"parameters": {
|
|
@@ -17094,6 +17131,19 @@ export const introspectionData = [
|
|
|
17094
17131
|
}
|
|
17095
17132
|
]
|
|
17096
17133
|
},
|
|
17134
|
+
"existsSync": {
|
|
17135
|
+
"description": "",
|
|
17136
|
+
"parameters": {
|
|
17137
|
+
"path": {
|
|
17138
|
+
"type": "string",
|
|
17139
|
+
"description": "Parameter path"
|
|
17140
|
+
}
|
|
17141
|
+
},
|
|
17142
|
+
"required": [
|
|
17143
|
+
"path"
|
|
17144
|
+
],
|
|
17145
|
+
"returns": "boolean"
|
|
17146
|
+
},
|
|
17097
17147
|
"rm": {
|
|
17098
17148
|
"description": "Asynchronously removes a file.",
|
|
17099
17149
|
"parameters": {
|
|
@@ -20160,6 +20210,12 @@ export const introspectionData = [
|
|
|
20160
20210
|
}
|
|
20161
20211
|
]
|
|
20162
20212
|
},
|
|
20213
|
+
"reload": {
|
|
20214
|
+
"description": "Force-reload the collection from disk, picking up new/changed/deleted documents.",
|
|
20215
|
+
"parameters": {},
|
|
20216
|
+
"required": [],
|
|
20217
|
+
"returns": "Promise<ContentDb>"
|
|
20218
|
+
},
|
|
20163
20219
|
"read": {
|
|
20164
20220
|
"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.",
|
|
20165
20221
|
"parameters": {
|
|
@@ -20359,7 +20415,13 @@ export const introspectionData = [
|
|
|
20359
20415
|
]
|
|
20360
20416
|
}
|
|
20361
20417
|
},
|
|
20362
|
-
"events": {
|
|
20418
|
+
"events": {
|
|
20419
|
+
"reloaded": {
|
|
20420
|
+
"name": "reloaded",
|
|
20421
|
+
"description": "Event emitted by ContentDb",
|
|
20422
|
+
"arguments": {}
|
|
20423
|
+
}
|
|
20424
|
+
},
|
|
20363
20425
|
"state": {},
|
|
20364
20426
|
"options": {},
|
|
20365
20427
|
"envVars": [],
|
|
@@ -20536,7 +20598,7 @@ export const introspectionData = [
|
|
|
20536
20598
|
},
|
|
20537
20599
|
{
|
|
20538
20600
|
"id": "servers.express",
|
|
20539
|
-
"description": "
|
|
20601
|
+
"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.",
|
|
20540
20602
|
"shortcut": "servers.express",
|
|
20541
20603
|
"className": "ExpressServer",
|
|
20542
20604
|
"methods": {
|
|
@@ -20629,11 +20691,17 @@ export const introspectionData = [
|
|
|
20629
20691
|
"events": {},
|
|
20630
20692
|
"state": {},
|
|
20631
20693
|
"options": {},
|
|
20632
|
-
"envVars": []
|
|
20694
|
+
"envVars": [],
|
|
20695
|
+
"examples": [
|
|
20696
|
+
{
|
|
20697
|
+
"language": "ts",
|
|
20698
|
+
"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 }))"
|
|
20699
|
+
}
|
|
20700
|
+
]
|
|
20633
20701
|
},
|
|
20634
20702
|
{
|
|
20635
20703
|
"id": "servers.websocket",
|
|
20636
|
-
"description": "
|
|
20704
|
+
"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.",
|
|
20637
20705
|
"shortcut": "servers.websocket",
|
|
20638
20706
|
"className": "WebsocketServer",
|
|
20639
20707
|
"methods": {
|
|
@@ -20710,7 +20778,13 @@ export const introspectionData = [
|
|
|
20710
20778
|
},
|
|
20711
20779
|
"state": {},
|
|
20712
20780
|
"options": {},
|
|
20713
|
-
"envVars": []
|
|
20781
|
+
"envVars": [],
|
|
20782
|
+
"examples": [
|
|
20783
|
+
{
|
|
20784
|
+
"language": "ts",
|
|
20785
|
+
"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})"
|
|
20786
|
+
}
|
|
20787
|
+
]
|
|
20714
20788
|
},
|
|
20715
20789
|
{
|
|
20716
20790
|
"id": "features.assistantsManager",
|