@soederpop/luca 0.0.25 → 0.0.28
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/docs/examples/assistant-with-process-manager.md +84 -0
- package/docs/examples/websocket-ask-and-reply-example.md +128 -0
- package/docs/window-manager-fix.md +249 -0
- package/package.json +1 -1
- package/src/agi/features/assistant.ts +75 -13
- package/src/agi/features/docs-reader.ts +25 -1
- package/src/bootstrap/generated.ts +215 -1
- package/src/cli/build-info.ts +2 -2
- package/src/clients/websocket.ts +76 -1
- package/src/command.ts +75 -0
- package/src/commands/describe.ts +29 -1089
- package/src/container-describer.ts +1098 -0
- package/src/container.ts +11 -0
- package/src/helper.ts +29 -2
- package/src/introspection/generated.agi.ts +1315 -611
- package/src/introspection/generated.node.ts +1168 -552
- package/src/introspection/generated.web.ts +9 -1
- package/src/node/features/content-db.ts +17 -0
- package/src/node/features/fs.ts +18 -0
- package/src/node/features/ipc-socket.ts +370 -180
- package/src/node/features/process-manager.ts +316 -49
- package/src/node/features/window-manager.ts +843 -235
- package/src/scaffolds/generated.ts +1 -1
- 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 +89 -0
- package/src/web/clients/socket.ts +22 -6
- package/test/websocket-ask.test.ts +101 -0
|
@@ -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-23T07:45:56.976Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.googleDocs', {
|
|
7
7
|
"id": "features.googleDocs",
|
|
@@ -1525,7 +1525,7 @@ setBuildTimeData('features.downloader', {
|
|
|
1525
1525
|
|
|
1526
1526
|
setBuildTimeData('features.windowManager', {
|
|
1527
1527
|
"id": "features.windowManager",
|
|
1528
|
-
"description": "WindowManager Feature — Native window control via LucaVoiceLauncher
|
|
1528
|
+
"description": "WindowManager Feature — Native window control via LucaVoiceLauncher Uses a broker/producer architecture so multiple luca processes can trigger window operations without competing for the same Unix socket. **Architecture:** - The first process to call `listen()` becomes the **broker**. It owns the app-facing socket (`ipc-window.sock`) and a control socket (`ipc-window-control.sock`). - Subsequent processes detect the broker and become **producers**. They connect to the control socket and route commands through the broker. - The broker forwards producer commands to the native app and routes acks and lifecycle events back to the originating producer. **Protocol:** - Bun listens on a Unix domain socket; the native app connects as a client - Window dispatch commands are sent as NDJSON with a `window` field - The app executes window commands and sends back `windowAck` messages - Any non-windowAck message from the app is emitted as a `message` event - Other features can use `send()` to write arbitrary NDJSON to the app **Capabilities:** - Spawn native browser windows with configurable chrome - Navigate, focus, close, and eval JavaScript in windows - Multiple luca processes can trigger window operations simultaneously - Automatic broker detection and producer fallback Observable state includes `windows` (open window metadata), `pendingOperations` (in-flight command ids), and `producerCount` (broker). Sockets, promises, and `WindowHandle` instances stay internal. **Producer state:** The broker pushes `windowStateSync` on the control socket when a producer connects and whenever the window roster changes, so every process sees the same `windows` / `windowCount` / `clientConnected` as the broker (not only its own acks).",
|
|
1529
1529
|
"shortcut": "features.windowManager",
|
|
1530
1530
|
"className": "WindowManager",
|
|
1531
1531
|
"methods": {
|
|
@@ -1541,7 +1541,18 @@ setBuildTimeData('features.windowManager', {
|
|
|
1541
1541
|
"returns": "Promise<this>"
|
|
1542
1542
|
},
|
|
1543
1543
|
"listen": {
|
|
1544
|
-
"description": "Start
|
|
1544
|
+
"description": "Start the window manager. Automatically detects whether a broker already exists and either becomes the broker or connects as a producer. - If no broker is running: becomes the broker, binds the app socket and a control socket for producers. - If a broker is already running: connects as a producer through the control socket.",
|
|
1545
|
+
"parameters": {
|
|
1546
|
+
"socketPath": {
|
|
1547
|
+
"type": "string",
|
|
1548
|
+
"description": "Override the configured app socket path"
|
|
1549
|
+
}
|
|
1550
|
+
},
|
|
1551
|
+
"required": [],
|
|
1552
|
+
"returns": "Promise<this>"
|
|
1553
|
+
},
|
|
1554
|
+
"cleanupSocket": {
|
|
1555
|
+
"description": "Remove stale socket files without starting or stopping the server. Useful when a previous process crashed and left dead sockets behind. Will not remove sockets that have live listeners.",
|
|
1545
1556
|
"parameters": {
|
|
1546
1557
|
"socketPath": {
|
|
1547
1558
|
"type": "string",
|
|
@@ -1549,10 +1560,10 @@ setBuildTimeData('features.windowManager', {
|
|
|
1549
1560
|
}
|
|
1550
1561
|
},
|
|
1551
1562
|
"required": [],
|
|
1552
|
-
"returns": "
|
|
1563
|
+
"returns": "Promise<boolean>"
|
|
1553
1564
|
},
|
|
1554
1565
|
"stop": {
|
|
1555
|
-
"description": "Stop the
|
|
1566
|
+
"description": "Stop the window manager and clean up all connections. Rejects any pending window operation requests.",
|
|
1556
1567
|
"parameters": {},
|
|
1557
1568
|
"required": [],
|
|
1558
1569
|
"returns": "Promise<this>"
|
|
@@ -1825,7 +1836,7 @@ setBuildTimeData('features.windowManager', {
|
|
|
1825
1836
|
]
|
|
1826
1837
|
},
|
|
1827
1838
|
"send": {
|
|
1828
|
-
"description": "Write an NDJSON message to the connected app client. Public so other features can send arbitrary protocol messages over the same socket.",
|
|
1839
|
+
"description": "Write an NDJSON message to the connected app client. In producer mode, routes through the broker. Public so other features can send arbitrary protocol messages over the same socket.",
|
|
1829
1840
|
"parameters": {
|
|
1830
1841
|
"msg": {
|
|
1831
1842
|
"type": "Record<string, any>",
|
|
@@ -1839,12 +1850,20 @@ setBuildTimeData('features.windowManager', {
|
|
|
1839
1850
|
}
|
|
1840
1851
|
},
|
|
1841
1852
|
"getters": {
|
|
1853
|
+
"isBroker": {
|
|
1854
|
+
"description": "Whether this instance is acting as the broker.",
|
|
1855
|
+
"returns": "boolean"
|
|
1856
|
+
},
|
|
1857
|
+
"isProducer": {
|
|
1858
|
+
"description": "Whether this instance is acting as a producer.",
|
|
1859
|
+
"returns": "boolean"
|
|
1860
|
+
},
|
|
1842
1861
|
"isListening": {
|
|
1843
|
-
"description": "Whether the IPC server is currently listening.",
|
|
1862
|
+
"description": "Whether the IPC server is currently listening (broker) or connected to broker (producer).",
|
|
1844
1863
|
"returns": "boolean"
|
|
1845
1864
|
},
|
|
1846
1865
|
"isClientConnected": {
|
|
1847
|
-
"description": "Whether the native app client is currently connected.",
|
|
1866
|
+
"description": "Whether the native app client is currently connected (only meaningful for broker).",
|
|
1848
1867
|
"returns": "boolean"
|
|
1849
1868
|
}
|
|
1850
1869
|
},
|
|
@@ -1879,6 +1898,11 @@ setBuildTimeData('features.windowManager', {
|
|
|
1879
1898
|
"description": "Event emitted by WindowManager",
|
|
1880
1899
|
"arguments": {}
|
|
1881
1900
|
},
|
|
1901
|
+
"windowFocus": {
|
|
1902
|
+
"name": "windowFocus",
|
|
1903
|
+
"description": "Event emitted by WindowManager",
|
|
1904
|
+
"arguments": {}
|
|
1905
|
+
},
|
|
1882
1906
|
"message": {
|
|
1883
1907
|
"name": "message",
|
|
1884
1908
|
"description": "Event emitted by WindowManager",
|
|
@@ -5298,6 +5322,23 @@ setBuildTimeData('features.fs', {
|
|
|
5298
5322
|
}
|
|
5299
5323
|
]
|
|
5300
5324
|
},
|
|
5325
|
+
"readFileSync": {
|
|
5326
|
+
"description": "Synchronously reads a file and returns its contents as a string. added this method because AI Assistants are understandly confused by this deviation from 2000's era node style",
|
|
5327
|
+
"parameters": {
|
|
5328
|
+
"path": {
|
|
5329
|
+
"type": "string",
|
|
5330
|
+
"description": "Parameter path"
|
|
5331
|
+
},
|
|
5332
|
+
"encoding": {
|
|
5333
|
+
"type": "BufferEncoding | null",
|
|
5334
|
+
"description": "Parameter encoding"
|
|
5335
|
+
}
|
|
5336
|
+
},
|
|
5337
|
+
"required": [
|
|
5338
|
+
"path"
|
|
5339
|
+
],
|
|
5340
|
+
"returns": "string | Buffer"
|
|
5341
|
+
},
|
|
5301
5342
|
"readFileAsync": {
|
|
5302
5343
|
"description": "Asynchronously reads a file and returns its contents as a string.",
|
|
5303
5344
|
"parameters": {
|
|
@@ -5340,6 +5381,19 @@ setBuildTimeData('features.fs', {
|
|
|
5340
5381
|
}
|
|
5341
5382
|
]
|
|
5342
5383
|
},
|
|
5384
|
+
"readJsonSync": {
|
|
5385
|
+
"description": "Read and parse a JSON file synchronously",
|
|
5386
|
+
"parameters": {
|
|
5387
|
+
"path": {
|
|
5388
|
+
"type": "string",
|
|
5389
|
+
"description": "Parameter path"
|
|
5390
|
+
}
|
|
5391
|
+
},
|
|
5392
|
+
"required": [
|
|
5393
|
+
"path"
|
|
5394
|
+
],
|
|
5395
|
+
"returns": "void"
|
|
5396
|
+
},
|
|
5343
5397
|
"readJsonAsync": {
|
|
5344
5398
|
"description": "Asynchronously reads and parses a JSON file.",
|
|
5345
5399
|
"parameters": {
|
|
@@ -6193,7 +6247,7 @@ setBuildTimeData('features.fs', {
|
|
|
6193
6247
|
|
|
6194
6248
|
setBuildTimeData('features.ipcSocket', {
|
|
6195
6249
|
"id": "features.ipcSocket",
|
|
6196
|
-
"description": "IpcSocket Feature - Inter-Process Communication via Unix Domain Sockets This feature provides robust IPC (Inter-Process Communication) capabilities using Unix domain sockets. It supports both server and client modes, allowing processes to communicate efficiently through file system-based socket connections. **Key Features:** -
|
|
6250
|
+
"description": "IpcSocket Feature - Inter-Process Communication via Unix Domain Sockets This feature provides robust IPC (Inter-Process Communication) capabilities using Unix domain sockets. It supports both server and client modes, allowing processes to communicate efficiently through file system-based socket connections. **Key Features:** - Hub-and-spoke: one server, many named clients with identity tracking - Targeted messaging: sendTo(clientId), broadcast(msg, excludeId) - Request/reply: ask() + reply() with timeout-based correlation - Auto-reconnect: clients reconnect with exponential backoff - Stale socket detection: probeSocket() before listen() - Clean shutdown: stopServer() removes socket file **Server (Hub):** ```typescript const ipc = container.feature('ipcSocket'); await ipc.listen('/tmp/hub.sock', true); ipc.on('connection', (clientId, socket) => { console.log('Client joined:', clientId); }); ipc.on('message', (data, clientId) => { console.log(`From ${clientId}:`, data); // Reply to sender, or ask and wait ipc.sendTo(clientId, { ack: true }); }); ``` **Client (Spoke):** ```typescript const ipc = container.feature('ipcSocket'); await ipc.connect('/tmp/hub.sock', { reconnect: true, name: 'worker-1' }); // Fire and forget await ipc.send({ type: 'status', ready: true }); // Request/reply ipc.on('message', (data) => { if (data.requestId) ipc.reply(data.requestId, { result: 42 }); }); ```",
|
|
6197
6251
|
"shortcut": "features.ipcSocket",
|
|
6198
6252
|
"className": "IpcSocket",
|
|
6199
6253
|
"methods": {
|
|
@@ -6233,61 +6287,127 @@ setBuildTimeData('features.ipcSocket', {
|
|
|
6233
6287
|
]
|
|
6234
6288
|
},
|
|
6235
6289
|
"broadcast": {
|
|
6236
|
-
"description": "Broadcasts a message to all connected clients (server mode only).
|
|
6290
|
+
"description": "Broadcasts a message to all connected clients (server mode only).",
|
|
6237
6291
|
"parameters": {
|
|
6238
6292
|
"message": {
|
|
6239
6293
|
"type": "any",
|
|
6240
|
-
"description": "The message object to broadcast
|
|
6294
|
+
"description": "The message object to broadcast"
|
|
6295
|
+
},
|
|
6296
|
+
"exclude": {
|
|
6297
|
+
"type": "string",
|
|
6298
|
+
"description": "Optional client ID to exclude from broadcast"
|
|
6241
6299
|
}
|
|
6242
6300
|
},
|
|
6243
6301
|
"required": [
|
|
6244
6302
|
"message"
|
|
6245
6303
|
],
|
|
6246
|
-
"returns": "void"
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6304
|
+
"returns": "void"
|
|
6305
|
+
},
|
|
6306
|
+
"sendTo": {
|
|
6307
|
+
"description": "Sends a message to a specific client by ID (server mode only).",
|
|
6308
|
+
"parameters": {
|
|
6309
|
+
"clientId": {
|
|
6310
|
+
"type": "string",
|
|
6311
|
+
"description": "The target client ID"
|
|
6312
|
+
},
|
|
6313
|
+
"message": {
|
|
6314
|
+
"type": "any",
|
|
6315
|
+
"description": "The message to send"
|
|
6251
6316
|
}
|
|
6252
|
-
|
|
6317
|
+
},
|
|
6318
|
+
"required": [
|
|
6319
|
+
"clientId",
|
|
6320
|
+
"message"
|
|
6321
|
+
],
|
|
6322
|
+
"returns": "boolean"
|
|
6253
6323
|
},
|
|
6254
6324
|
"send": {
|
|
6255
|
-
"description": "
|
|
6325
|
+
"description": "Fire-and-forget: sends a message to the server (client mode only). For server→client, use sendTo() or broadcast().",
|
|
6256
6326
|
"parameters": {
|
|
6257
6327
|
"message": {
|
|
6258
6328
|
"type": "any",
|
|
6259
|
-
"description": "The message
|
|
6329
|
+
"description": "The message to send"
|
|
6260
6330
|
}
|
|
6261
6331
|
},
|
|
6262
6332
|
"required": [
|
|
6263
6333
|
"message"
|
|
6264
6334
|
],
|
|
6265
|
-
"returns": "void"
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6335
|
+
"returns": "void"
|
|
6336
|
+
},
|
|
6337
|
+
"ask": {
|
|
6338
|
+
"description": "Sends a message and waits for a correlated reply. Works in both client and server mode. The recipient should call `reply(requestId, response)` to respond.",
|
|
6339
|
+
"parameters": {
|
|
6340
|
+
"message": {
|
|
6341
|
+
"type": "any",
|
|
6342
|
+
"description": "The message to send"
|
|
6343
|
+
},
|
|
6344
|
+
"options": {
|
|
6345
|
+
"type": "{ clientId?: string; timeoutMs?: number }",
|
|
6346
|
+
"description": "Optional: clientId (server mode target), timeoutMs"
|
|
6270
6347
|
}
|
|
6271
|
-
|
|
6348
|
+
},
|
|
6349
|
+
"required": [
|
|
6350
|
+
"message"
|
|
6351
|
+
],
|
|
6352
|
+
"returns": "Promise<any>"
|
|
6353
|
+
},
|
|
6354
|
+
"reply": {
|
|
6355
|
+
"description": "Sends a reply to a previous ask() call, correlated by requestId.",
|
|
6356
|
+
"parameters": {
|
|
6357
|
+
"requestId": {
|
|
6358
|
+
"type": "string",
|
|
6359
|
+
"description": "The requestId from the incoming message"
|
|
6360
|
+
},
|
|
6361
|
+
"data": {
|
|
6362
|
+
"type": "any",
|
|
6363
|
+
"description": "The reply payload"
|
|
6364
|
+
},
|
|
6365
|
+
"clientId": {
|
|
6366
|
+
"type": "string",
|
|
6367
|
+
"description": "Target client (server mode; for client mode, omit)"
|
|
6368
|
+
}
|
|
6369
|
+
},
|
|
6370
|
+
"required": [
|
|
6371
|
+
"requestId",
|
|
6372
|
+
"data"
|
|
6373
|
+
],
|
|
6374
|
+
"returns": "void"
|
|
6272
6375
|
},
|
|
6273
6376
|
"connect": {
|
|
6274
|
-
"description": "Connects to an IPC server at the specified socket path (client mode).
|
|
6377
|
+
"description": "Connects to an IPC server at the specified socket path (client mode).",
|
|
6275
6378
|
"parameters": {
|
|
6276
6379
|
"socketPath": {
|
|
6277
6380
|
"type": "string",
|
|
6278
|
-
"description": "
|
|
6381
|
+
"description": "Path to the server's Unix domain socket"
|
|
6382
|
+
},
|
|
6383
|
+
"options": {
|
|
6384
|
+
"type": "{ reconnect?: boolean; name?: string }",
|
|
6385
|
+
"description": "Optional: reconnect (enable auto-reconnect), name (identify this client)"
|
|
6279
6386
|
}
|
|
6280
6387
|
},
|
|
6281
6388
|
"required": [
|
|
6282
6389
|
"socketPath"
|
|
6283
6390
|
],
|
|
6284
|
-
"returns": "Promise<Socket>"
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6391
|
+
"returns": "Promise<Socket>"
|
|
6392
|
+
},
|
|
6393
|
+
"disconnect": {
|
|
6394
|
+
"description": "Disconnects the client and stops any reconnection attempts.",
|
|
6395
|
+
"parameters": {},
|
|
6396
|
+
"required": [],
|
|
6397
|
+
"returns": "void"
|
|
6398
|
+
},
|
|
6399
|
+
"probeSocket": {
|
|
6400
|
+
"description": "Probe an existing socket to see if a live listener is behind it. Attempts a quick connect — if it succeeds, someone is listening.",
|
|
6401
|
+
"parameters": {
|
|
6402
|
+
"socketPath": {
|
|
6403
|
+
"type": "string",
|
|
6404
|
+
"description": "Parameter socketPath"
|
|
6289
6405
|
}
|
|
6290
|
-
|
|
6406
|
+
},
|
|
6407
|
+
"required": [
|
|
6408
|
+
"socketPath"
|
|
6409
|
+
],
|
|
6410
|
+
"returns": "Promise<boolean>"
|
|
6291
6411
|
}
|
|
6292
6412
|
},
|
|
6293
6413
|
"getters": {
|
|
@@ -6299,12 +6419,25 @@ setBuildTimeData('features.ipcSocket', {
|
|
|
6299
6419
|
"description": "Checks if the IPC socket is operating in server mode.",
|
|
6300
6420
|
"returns": "any"
|
|
6301
6421
|
},
|
|
6422
|
+
"clientCount": {
|
|
6423
|
+
"description": "Returns the number of currently connected clients (server mode).",
|
|
6424
|
+
"returns": "any"
|
|
6425
|
+
},
|
|
6426
|
+
"connectedClients": {
|
|
6427
|
+
"description": "Returns info about all connected clients (server mode).",
|
|
6428
|
+
"returns": "Array<{ id: string; name?: string; connectedAt: number }>"
|
|
6429
|
+
},
|
|
6302
6430
|
"connection": {
|
|
6303
6431
|
"description": "Gets the current client connection socket.",
|
|
6304
6432
|
"returns": "any"
|
|
6305
6433
|
}
|
|
6306
6434
|
},
|
|
6307
6435
|
"events": {
|
|
6436
|
+
"disconnection": {
|
|
6437
|
+
"name": "disconnection",
|
|
6438
|
+
"description": "Event emitted by IpcSocket",
|
|
6439
|
+
"arguments": {}
|
|
6440
|
+
},
|
|
6308
6441
|
"connection": {
|
|
6309
6442
|
"name": "connection",
|
|
6310
6443
|
"description": "Event emitted by IpcSocket",
|
|
@@ -7225,10 +7358,68 @@ setBuildTimeData('features.packageFinder', {
|
|
|
7225
7358
|
|
|
7226
7359
|
setBuildTimeData('features.processManager', {
|
|
7227
7360
|
"id": "features.processManager",
|
|
7228
|
-
"description": "Manages long-running child processes with tracking, events, and automatic cleanup. Unlike the `proc` feature whose spawn methods block until the child exits, ProcessManager returns a SpawnHandler immediately — a handle object with its own state, events, and lifecycle methods. The feature tracks all spawned processes, maintains observable state, and can automatically kill them on parent exit.",
|
|
7361
|
+
"description": "Manages long-running child processes with tracking, events, and automatic cleanup. Unlike the `proc` feature whose spawn methods block until the child exits, ProcessManager returns a SpawnHandler immediately — a handle object with its own state, events, and lifecycle methods. The feature tracks all spawned processes, maintains observable state, and can automatically kill them on parent exit. Each handler maintains a memory-efficient output buffer: the first 20 lines (head) and last 50 lines (tail) of stdout/stderr are kept, everything in between is discarded.",
|
|
7229
7362
|
"shortcut": "features.processManager",
|
|
7230
7363
|
"className": "ProcessManager",
|
|
7231
7364
|
"methods": {
|
|
7365
|
+
"spawnProcess": {
|
|
7366
|
+
"description": "Tool handler: spawn a long-running background process.",
|
|
7367
|
+
"parameters": {
|
|
7368
|
+
"args": {
|
|
7369
|
+
"type": "{ command: string; args?: string; tag?: string; cwd?: string }",
|
|
7370
|
+
"description": "Parameter args"
|
|
7371
|
+
}
|
|
7372
|
+
},
|
|
7373
|
+
"required": [
|
|
7374
|
+
"args"
|
|
7375
|
+
],
|
|
7376
|
+
"returns": "void"
|
|
7377
|
+
},
|
|
7378
|
+
"runCommand": {
|
|
7379
|
+
"description": "Tool handler: run a command to completion and return its output.",
|
|
7380
|
+
"parameters": {
|
|
7381
|
+
"args": {
|
|
7382
|
+
"type": "{ command: string; cwd?: string }",
|
|
7383
|
+
"description": "Parameter args"
|
|
7384
|
+
}
|
|
7385
|
+
},
|
|
7386
|
+
"required": [
|
|
7387
|
+
"args"
|
|
7388
|
+
],
|
|
7389
|
+
"returns": "void"
|
|
7390
|
+
},
|
|
7391
|
+
"listProcesses": {
|
|
7392
|
+
"description": "Tool handler: list all tracked processes.",
|
|
7393
|
+
"parameters": {},
|
|
7394
|
+
"required": [],
|
|
7395
|
+
"returns": "void"
|
|
7396
|
+
},
|
|
7397
|
+
"getProcessOutput": {
|
|
7398
|
+
"description": "Tool handler: peek at a process's buffered output.",
|
|
7399
|
+
"parameters": {
|
|
7400
|
+
"args": {
|
|
7401
|
+
"type": "{ id?: string; tag?: string; stream?: string }",
|
|
7402
|
+
"description": "Parameter args"
|
|
7403
|
+
}
|
|
7404
|
+
},
|
|
7405
|
+
"required": [
|
|
7406
|
+
"args"
|
|
7407
|
+
],
|
|
7408
|
+
"returns": "void"
|
|
7409
|
+
},
|
|
7410
|
+
"killProcess": {
|
|
7411
|
+
"description": "Tool handler: kill a process by ID or tag.",
|
|
7412
|
+
"parameters": {
|
|
7413
|
+
"args": {
|
|
7414
|
+
"type": "{ id?: string; tag?: string; signal?: string }",
|
|
7415
|
+
"description": "Parameter args"
|
|
7416
|
+
}
|
|
7417
|
+
},
|
|
7418
|
+
"required": [
|
|
7419
|
+
"args"
|
|
7420
|
+
],
|
|
7421
|
+
"returns": "void"
|
|
7422
|
+
},
|
|
7232
7423
|
"spawn": {
|
|
7233
7424
|
"description": "Spawn a long-running process and return a handle immediately. The returned SpawnHandler provides events for stdout/stderr streaming, exit/crash notifications, and methods to kill or await the process.",
|
|
7234
7425
|
"parameters": {
|
|
@@ -7406,7 +7597,7 @@ setBuildTimeData('features.processManager', {
|
|
|
7406
7597
|
"examples": [
|
|
7407
7598
|
{
|
|
7408
7599
|
"language": "ts",
|
|
7409
|
-
"code": "const pm = container.feature('processManager', { enable: true })\n\nconst server = pm.spawn('node', ['server.js'], { tag: 'api', cwd: '/app' })\nserver.on('stdout', (data) => console.log('[api]', data))\nserver.on('crash', (code) => console.error('API crashed:', code))\n\n// Kill one\nserver.kill()\n\n// Kill all tracked processes\npm.killAll()\n\n// List and lookup\npm.list() // SpawnHandler[]\npm.getByTag('api') // SpawnHandler | undefined"
|
|
7600
|
+
"code": "const pm = container.feature('processManager', { enable: true })\n\nconst server = pm.spawn('node', ['server.js'], { tag: 'api', cwd: '/app' })\nserver.on('stdout', (data) => console.log('[api]', data))\nserver.on('crash', (code) => console.error('API crashed:', code))\n\n// Peek at buffered output\nconst { head, tail } = server.peek()\n\n// Kill one\nserver.kill()\n\n// Kill all tracked processes\npm.killAll()\n\n// List and lookup\npm.list() // SpawnHandler[]\npm.getByTag('api') // SpawnHandler | undefined"
|
|
7410
7601
|
}
|
|
7411
7602
|
]
|
|
7412
7603
|
});
|
|
@@ -9495,6 +9686,14 @@ setBuildTimeData('features.contentDb', {
|
|
|
9495
9686
|
"description": "Returns the available document ids in the collection",
|
|
9496
9687
|
"returns": "string[]"
|
|
9497
9688
|
},
|
|
9689
|
+
"modelDefinitionTable": {
|
|
9690
|
+
"description": "",
|
|
9691
|
+
"returns": "any"
|
|
9692
|
+
},
|
|
9693
|
+
"fileTree": {
|
|
9694
|
+
"description": "",
|
|
9695
|
+
"returns": "any"
|
|
9696
|
+
},
|
|
9498
9697
|
"searchIndexStatus": {
|
|
9499
9698
|
"description": "Get the current search index status.",
|
|
9500
9699
|
"returns": "any"
|
|
@@ -9767,7 +9966,7 @@ setBuildTimeData('clients.rest', {
|
|
|
9767
9966
|
|
|
9768
9967
|
setBuildTimeData('clients.websocket', {
|
|
9769
9968
|
"id": "clients.websocket",
|
|
9770
|
-
"description": "
|
|
9969
|
+
"description": "WebSocketClient helper",
|
|
9771
9970
|
"shortcut": "clients.websocket",
|
|
9772
9971
|
"className": "WebSocketClient",
|
|
9773
9972
|
"methods": {
|
|
@@ -9790,6 +9989,59 @@ setBuildTimeData('clients.websocket', {
|
|
|
9790
9989
|
],
|
|
9791
9990
|
"returns": "Promise<void>"
|
|
9792
9991
|
},
|
|
9992
|
+
"ask": {
|
|
9993
|
+
"description": "Send a request and wait for a correlated response. The message is sent with a unique `requestId`; the remote side is expected to reply with a message containing `replyTo` set to that same ID.",
|
|
9994
|
+
"parameters": {
|
|
9995
|
+
"type": {
|
|
9996
|
+
"type": "string",
|
|
9997
|
+
"description": "A string identifying the request type"
|
|
9998
|
+
},
|
|
9999
|
+
"data": {
|
|
10000
|
+
"type": "any",
|
|
10001
|
+
"description": "Optional payload to include with the request"
|
|
10002
|
+
},
|
|
10003
|
+
"timeout": {
|
|
10004
|
+
"type": "any",
|
|
10005
|
+
"description": "How long to wait for a response (default 10 000 ms)"
|
|
10006
|
+
}
|
|
10007
|
+
},
|
|
10008
|
+
"required": [
|
|
10009
|
+
"type"
|
|
10010
|
+
],
|
|
10011
|
+
"returns": "Promise<R>",
|
|
10012
|
+
"examples": [
|
|
10013
|
+
{
|
|
10014
|
+
"language": "ts",
|
|
10015
|
+
"code": "const result = await ws.ask('getUser', { id: 42 })"
|
|
10016
|
+
}
|
|
10017
|
+
]
|
|
10018
|
+
},
|
|
10019
|
+
"_handleReply": {
|
|
10020
|
+
"description": "",
|
|
10021
|
+
"parameters": {
|
|
10022
|
+
"message": {
|
|
10023
|
+
"type": "any",
|
|
10024
|
+
"description": "Parameter message"
|
|
10025
|
+
}
|
|
10026
|
+
},
|
|
10027
|
+
"required": [
|
|
10028
|
+
"message"
|
|
10029
|
+
],
|
|
10030
|
+
"returns": "boolean"
|
|
10031
|
+
},
|
|
10032
|
+
"_rejectAllPending": {
|
|
10033
|
+
"description": "",
|
|
10034
|
+
"parameters": {
|
|
10035
|
+
"reason": {
|
|
10036
|
+
"type": "string",
|
|
10037
|
+
"description": "Parameter reason"
|
|
10038
|
+
}
|
|
10039
|
+
},
|
|
10040
|
+
"required": [
|
|
10041
|
+
"reason"
|
|
10042
|
+
],
|
|
10043
|
+
"returns": "void"
|
|
10044
|
+
},
|
|
9793
10045
|
"disconnect": {
|
|
9794
10046
|
"description": "Gracefully close the WebSocket connection. Suppresses auto-reconnect and updates connection state to disconnected.",
|
|
9795
10047
|
"parameters": {},
|
|
@@ -9832,13 +10084,7 @@ setBuildTimeData('clients.websocket', {
|
|
|
9832
10084
|
},
|
|
9833
10085
|
"state": {},
|
|
9834
10086
|
"options": {},
|
|
9835
|
-
"envVars": []
|
|
9836
|
-
"examples": [
|
|
9837
|
-
{
|
|
9838
|
-
"language": "ts",
|
|
9839
|
-
"code": "const ws = container.client('websocket', {\n baseURL: 'ws://localhost:8080',\n reconnect: true,\n maxReconnectAttempts: 5\n})\nws.on('message', (data) => console.log('Received:', data))\nawait ws.connect()\nawait ws.send({ type: 'hello' })"
|
|
9840
|
-
}
|
|
9841
|
-
]
|
|
10087
|
+
"envVars": []
|
|
9842
10088
|
});
|
|
9843
10089
|
|
|
9844
10090
|
setBuildTimeData('clients.openai', {
|
|
@@ -10109,33 +10355,235 @@ setBuildTimeData('clients.openai', {
|
|
|
10109
10355
|
]
|
|
10110
10356
|
});
|
|
10111
10357
|
|
|
10112
|
-
setBuildTimeData('clients.
|
|
10113
|
-
"id": "clients.
|
|
10114
|
-
"description": "
|
|
10115
|
-
"shortcut": "clients.
|
|
10116
|
-
"className": "
|
|
10358
|
+
setBuildTimeData('clients.elevenlabs', {
|
|
10359
|
+
"id": "clients.elevenlabs",
|
|
10360
|
+
"description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
|
|
10361
|
+
"shortcut": "clients.elevenlabs",
|
|
10362
|
+
"className": "ElevenLabsClient",
|
|
10117
10363
|
"methods": {
|
|
10118
|
-
"
|
|
10119
|
-
"description": "
|
|
10120
|
-
"parameters": {
|
|
10121
|
-
|
|
10122
|
-
"type": "string",
|
|
10123
|
-
"description": "The table or view name to query"
|
|
10124
|
-
}
|
|
10125
|
-
},
|
|
10126
|
-
"required": [
|
|
10127
|
-
"table"
|
|
10128
|
-
],
|
|
10364
|
+
"beforeRequest": {
|
|
10365
|
+
"description": "Inject the xi-api-key header before each request.",
|
|
10366
|
+
"parameters": {},
|
|
10367
|
+
"required": [],
|
|
10129
10368
|
"returns": "void"
|
|
10130
10369
|
},
|
|
10131
|
-
"
|
|
10132
|
-
"description": "
|
|
10133
|
-
"parameters": {
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10370
|
+
"connect": {
|
|
10371
|
+
"description": "Validate the API key by listing available models.",
|
|
10372
|
+
"parameters": {},
|
|
10373
|
+
"required": [],
|
|
10374
|
+
"returns": "Promise<this>",
|
|
10375
|
+
"examples": [
|
|
10376
|
+
{
|
|
10377
|
+
"language": "ts",
|
|
10378
|
+
"code": "await el.connect()"
|
|
10379
|
+
}
|
|
10380
|
+
]
|
|
10381
|
+
},
|
|
10382
|
+
"listVoices": {
|
|
10383
|
+
"description": "List available voices with optional search and filtering.",
|
|
10384
|
+
"parameters": {
|
|
10385
|
+
"options": {
|
|
10386
|
+
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
10387
|
+
"description": "Query parameters for filtering voices"
|
|
10388
|
+
}
|
|
10389
|
+
},
|
|
10390
|
+
"required": [],
|
|
10391
|
+
"returns": "Promise<any>",
|
|
10392
|
+
"examples": [
|
|
10393
|
+
{
|
|
10394
|
+
"language": "ts",
|
|
10395
|
+
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
10396
|
+
}
|
|
10397
|
+
]
|
|
10398
|
+
},
|
|
10399
|
+
"getVoice": {
|
|
10400
|
+
"description": "Get details for a single voice.",
|
|
10401
|
+
"parameters": {
|
|
10402
|
+
"voiceId": {
|
|
10403
|
+
"type": "string",
|
|
10404
|
+
"description": "The voice ID to look up"
|
|
10405
|
+
}
|
|
10406
|
+
},
|
|
10407
|
+
"required": [
|
|
10408
|
+
"voiceId"
|
|
10409
|
+
],
|
|
10410
|
+
"returns": "Promise<any>",
|
|
10411
|
+
"examples": [
|
|
10412
|
+
{
|
|
10413
|
+
"language": "ts",
|
|
10414
|
+
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
10415
|
+
}
|
|
10416
|
+
]
|
|
10417
|
+
},
|
|
10418
|
+
"listModels": {
|
|
10419
|
+
"description": "List available TTS models.",
|
|
10420
|
+
"parameters": {},
|
|
10421
|
+
"required": [],
|
|
10422
|
+
"returns": "Promise<any[]>",
|
|
10423
|
+
"examples": [
|
|
10424
|
+
{
|
|
10425
|
+
"language": "ts",
|
|
10426
|
+
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
10427
|
+
}
|
|
10428
|
+
]
|
|
10429
|
+
},
|
|
10430
|
+
"synthesize": {
|
|
10431
|
+
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
10432
|
+
"parameters": {
|
|
10433
|
+
"text": {
|
|
10434
|
+
"type": "string",
|
|
10435
|
+
"description": "The text to convert to speech"
|
|
10436
|
+
},
|
|
10437
|
+
"options": {
|
|
10438
|
+
"type": "SynthesizeOptions",
|
|
10439
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
10440
|
+
"properties": {
|
|
10441
|
+
"voiceId": {
|
|
10442
|
+
"type": "string",
|
|
10443
|
+
"description": ""
|
|
10444
|
+
},
|
|
10445
|
+
"modelId": {
|
|
10446
|
+
"type": "string",
|
|
10447
|
+
"description": ""
|
|
10448
|
+
},
|
|
10449
|
+
"outputFormat": {
|
|
10450
|
+
"type": "string",
|
|
10451
|
+
"description": ""
|
|
10452
|
+
},
|
|
10453
|
+
"voiceSettings": {
|
|
10454
|
+
"type": "ElevenLabsVoiceSettings",
|
|
10455
|
+
"description": ""
|
|
10456
|
+
},
|
|
10457
|
+
"disableCache": {
|
|
10458
|
+
"type": "boolean",
|
|
10459
|
+
"description": ""
|
|
10460
|
+
}
|
|
10461
|
+
}
|
|
10462
|
+
}
|
|
10463
|
+
},
|
|
10464
|
+
"required": [
|
|
10465
|
+
"text"
|
|
10466
|
+
],
|
|
10467
|
+
"returns": "Promise<Buffer>",
|
|
10468
|
+
"examples": [
|
|
10469
|
+
{
|
|
10470
|
+
"language": "ts",
|
|
10471
|
+
"code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
|
|
10472
|
+
}
|
|
10473
|
+
]
|
|
10474
|
+
},
|
|
10475
|
+
"say": {
|
|
10476
|
+
"description": "Synthesize speech and write the audio to a file.",
|
|
10477
|
+
"parameters": {
|
|
10478
|
+
"text": {
|
|
10479
|
+
"type": "string",
|
|
10480
|
+
"description": "The text to convert to speech"
|
|
10481
|
+
},
|
|
10482
|
+
"outputPath": {
|
|
10483
|
+
"type": "string",
|
|
10484
|
+
"description": "File path to write the audio to"
|
|
10485
|
+
},
|
|
10486
|
+
"options": {
|
|
10487
|
+
"type": "SynthesizeOptions",
|
|
10488
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
10489
|
+
"properties": {
|
|
10490
|
+
"voiceId": {
|
|
10491
|
+
"type": "string",
|
|
10492
|
+
"description": ""
|
|
10493
|
+
},
|
|
10494
|
+
"modelId": {
|
|
10495
|
+
"type": "string",
|
|
10496
|
+
"description": ""
|
|
10497
|
+
},
|
|
10498
|
+
"outputFormat": {
|
|
10499
|
+
"type": "string",
|
|
10500
|
+
"description": ""
|
|
10501
|
+
},
|
|
10502
|
+
"voiceSettings": {
|
|
10503
|
+
"type": "ElevenLabsVoiceSettings",
|
|
10504
|
+
"description": ""
|
|
10505
|
+
},
|
|
10506
|
+
"disableCache": {
|
|
10507
|
+
"type": "boolean",
|
|
10508
|
+
"description": ""
|
|
10509
|
+
}
|
|
10510
|
+
}
|
|
10511
|
+
}
|
|
10512
|
+
},
|
|
10513
|
+
"required": [
|
|
10514
|
+
"text",
|
|
10515
|
+
"outputPath"
|
|
10516
|
+
],
|
|
10517
|
+
"returns": "Promise<string>",
|
|
10518
|
+
"examples": [
|
|
10519
|
+
{
|
|
10520
|
+
"language": "ts",
|
|
10521
|
+
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
10522
|
+
}
|
|
10523
|
+
]
|
|
10524
|
+
}
|
|
10525
|
+
},
|
|
10526
|
+
"getters": {
|
|
10527
|
+
"apiKey": {
|
|
10528
|
+
"description": "The resolved API key from options or environment.",
|
|
10529
|
+
"returns": "string"
|
|
10530
|
+
}
|
|
10531
|
+
},
|
|
10532
|
+
"events": {
|
|
10533
|
+
"failure": {
|
|
10534
|
+
"name": "failure",
|
|
10535
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10536
|
+
"arguments": {}
|
|
10537
|
+
},
|
|
10538
|
+
"voices": {
|
|
10539
|
+
"name": "voices",
|
|
10540
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10541
|
+
"arguments": {}
|
|
10542
|
+
},
|
|
10543
|
+
"speech": {
|
|
10544
|
+
"name": "speech",
|
|
10545
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10546
|
+
"arguments": {}
|
|
10547
|
+
}
|
|
10548
|
+
},
|
|
10549
|
+
"state": {},
|
|
10550
|
+
"options": {},
|
|
10551
|
+
"envVars": [],
|
|
10552
|
+
"examples": [
|
|
10553
|
+
{
|
|
10554
|
+
"language": "ts",
|
|
10555
|
+
"code": "const el = container.client('elevenlabs')\nawait el.connect()\nconst voices = await el.listVoices()\nconst audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data"
|
|
10556
|
+
}
|
|
10557
|
+
]
|
|
10558
|
+
});
|
|
10559
|
+
|
|
10560
|
+
setBuildTimeData('clients.supabase', {
|
|
10561
|
+
"id": "clients.supabase",
|
|
10562
|
+
"description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
|
|
10563
|
+
"shortcut": "clients.supabase",
|
|
10564
|
+
"className": "SupabaseClient",
|
|
10565
|
+
"methods": {
|
|
10566
|
+
"from": {
|
|
10567
|
+
"description": "Start a query on a Postgres table or view.",
|
|
10568
|
+
"parameters": {
|
|
10569
|
+
"table": {
|
|
10570
|
+
"type": "string",
|
|
10571
|
+
"description": "The table or view name to query"
|
|
10572
|
+
}
|
|
10573
|
+
},
|
|
10574
|
+
"required": [
|
|
10575
|
+
"table"
|
|
10576
|
+
],
|
|
10577
|
+
"returns": "void"
|
|
10578
|
+
},
|
|
10579
|
+
"rpc": {
|
|
10580
|
+
"description": "Call a Postgres function (RPC).",
|
|
10581
|
+
"parameters": {
|
|
10582
|
+
"fn": {
|
|
10583
|
+
"type": "string",
|
|
10584
|
+
"description": "The function name"
|
|
10585
|
+
},
|
|
10586
|
+
"params": {
|
|
10139
10587
|
"type": "Record<string, unknown>",
|
|
10140
10588
|
"description": "Arguments to pass to the function"
|
|
10141
10589
|
},
|
|
@@ -10501,250 +10949,48 @@ setBuildTimeData('clients.comfyui', {
|
|
|
10501
10949
|
},
|
|
10502
10950
|
"getters": {
|
|
10503
10951
|
"clientId": {
|
|
10504
|
-
"description": "The unique client ID used for WebSocket session tracking.",
|
|
10505
|
-
"returns": "string"
|
|
10506
|
-
},
|
|
10507
|
-
"wsURL": {
|
|
10508
|
-
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
10509
|
-
"returns": "string"
|
|
10510
|
-
}
|
|
10511
|
-
},
|
|
10512
|
-
"events": {
|
|
10513
|
-
"execution_start": {
|
|
10514
|
-
"name": "execution_start",
|
|
10515
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10516
|
-
"arguments": {}
|
|
10517
|
-
},
|
|
10518
|
-
"execution_complete": {
|
|
10519
|
-
"name": "execution_complete",
|
|
10520
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10521
|
-
"arguments": {}
|
|
10522
|
-
},
|
|
10523
|
-
"executing": {
|
|
10524
|
-
"name": "executing",
|
|
10525
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10526
|
-
"arguments": {}
|
|
10527
|
-
},
|
|
10528
|
-
"progress": {
|
|
10529
|
-
"name": "progress",
|
|
10530
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10531
|
-
"arguments": {}
|
|
10532
|
-
},
|
|
10533
|
-
"executed": {
|
|
10534
|
-
"name": "executed",
|
|
10535
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10536
|
-
"arguments": {}
|
|
10537
|
-
},
|
|
10538
|
-
"execution_cached": {
|
|
10539
|
-
"name": "execution_cached",
|
|
10540
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10541
|
-
"arguments": {}
|
|
10542
|
-
},
|
|
10543
|
-
"execution_error": {
|
|
10544
|
-
"name": "execution_error",
|
|
10545
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10546
|
-
"arguments": {}
|
|
10547
|
-
}
|
|
10548
|
-
},
|
|
10549
|
-
"state": {},
|
|
10550
|
-
"options": {},
|
|
10551
|
-
"envVars": [],
|
|
10552
|
-
"examples": [
|
|
10553
|
-
{
|
|
10554
|
-
"language": "ts",
|
|
10555
|
-
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
10556
|
-
}
|
|
10557
|
-
]
|
|
10558
|
-
});
|
|
10559
|
-
|
|
10560
|
-
setBuildTimeData('clients.elevenlabs', {
|
|
10561
|
-
"id": "clients.elevenlabs",
|
|
10562
|
-
"description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
|
|
10563
|
-
"shortcut": "clients.elevenlabs",
|
|
10564
|
-
"className": "ElevenLabsClient",
|
|
10565
|
-
"methods": {
|
|
10566
|
-
"beforeRequest": {
|
|
10567
|
-
"description": "Inject the xi-api-key header before each request.",
|
|
10568
|
-
"parameters": {},
|
|
10569
|
-
"required": [],
|
|
10570
|
-
"returns": "void"
|
|
10571
|
-
},
|
|
10572
|
-
"connect": {
|
|
10573
|
-
"description": "Validate the API key by listing available models.",
|
|
10574
|
-
"parameters": {},
|
|
10575
|
-
"required": [],
|
|
10576
|
-
"returns": "Promise<this>",
|
|
10577
|
-
"examples": [
|
|
10578
|
-
{
|
|
10579
|
-
"language": "ts",
|
|
10580
|
-
"code": "await el.connect()"
|
|
10581
|
-
}
|
|
10582
|
-
]
|
|
10583
|
-
},
|
|
10584
|
-
"listVoices": {
|
|
10585
|
-
"description": "List available voices with optional search and filtering.",
|
|
10586
|
-
"parameters": {
|
|
10587
|
-
"options": {
|
|
10588
|
-
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
10589
|
-
"description": "Query parameters for filtering voices"
|
|
10590
|
-
}
|
|
10591
|
-
},
|
|
10592
|
-
"required": [],
|
|
10593
|
-
"returns": "Promise<any>",
|
|
10594
|
-
"examples": [
|
|
10595
|
-
{
|
|
10596
|
-
"language": "ts",
|
|
10597
|
-
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
10598
|
-
}
|
|
10599
|
-
]
|
|
10600
|
-
},
|
|
10601
|
-
"getVoice": {
|
|
10602
|
-
"description": "Get details for a single voice.",
|
|
10603
|
-
"parameters": {
|
|
10604
|
-
"voiceId": {
|
|
10605
|
-
"type": "string",
|
|
10606
|
-
"description": "The voice ID to look up"
|
|
10607
|
-
}
|
|
10608
|
-
},
|
|
10609
|
-
"required": [
|
|
10610
|
-
"voiceId"
|
|
10611
|
-
],
|
|
10612
|
-
"returns": "Promise<any>",
|
|
10613
|
-
"examples": [
|
|
10614
|
-
{
|
|
10615
|
-
"language": "ts",
|
|
10616
|
-
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
10617
|
-
}
|
|
10618
|
-
]
|
|
10619
|
-
},
|
|
10620
|
-
"listModels": {
|
|
10621
|
-
"description": "List available TTS models.",
|
|
10622
|
-
"parameters": {},
|
|
10623
|
-
"required": [],
|
|
10624
|
-
"returns": "Promise<any[]>",
|
|
10625
|
-
"examples": [
|
|
10626
|
-
{
|
|
10627
|
-
"language": "ts",
|
|
10628
|
-
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
10629
|
-
}
|
|
10630
|
-
]
|
|
10631
|
-
},
|
|
10632
|
-
"synthesize": {
|
|
10633
|
-
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
10634
|
-
"parameters": {
|
|
10635
|
-
"text": {
|
|
10636
|
-
"type": "string",
|
|
10637
|
-
"description": "The text to convert to speech"
|
|
10638
|
-
},
|
|
10639
|
-
"options": {
|
|
10640
|
-
"type": "SynthesizeOptions",
|
|
10641
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
10642
|
-
"properties": {
|
|
10643
|
-
"voiceId": {
|
|
10644
|
-
"type": "string",
|
|
10645
|
-
"description": ""
|
|
10646
|
-
},
|
|
10647
|
-
"modelId": {
|
|
10648
|
-
"type": "string",
|
|
10649
|
-
"description": ""
|
|
10650
|
-
},
|
|
10651
|
-
"outputFormat": {
|
|
10652
|
-
"type": "string",
|
|
10653
|
-
"description": ""
|
|
10654
|
-
},
|
|
10655
|
-
"voiceSettings": {
|
|
10656
|
-
"type": "ElevenLabsVoiceSettings",
|
|
10657
|
-
"description": ""
|
|
10658
|
-
},
|
|
10659
|
-
"disableCache": {
|
|
10660
|
-
"type": "boolean",
|
|
10661
|
-
"description": ""
|
|
10662
|
-
}
|
|
10663
|
-
}
|
|
10664
|
-
}
|
|
10665
|
-
},
|
|
10666
|
-
"required": [
|
|
10667
|
-
"text"
|
|
10668
|
-
],
|
|
10669
|
-
"returns": "Promise<Buffer>",
|
|
10670
|
-
"examples": [
|
|
10671
|
-
{
|
|
10672
|
-
"language": "ts",
|
|
10673
|
-
"code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
|
|
10674
|
-
}
|
|
10675
|
-
]
|
|
10676
|
-
},
|
|
10677
|
-
"say": {
|
|
10678
|
-
"description": "Synthesize speech and write the audio to a file.",
|
|
10679
|
-
"parameters": {
|
|
10680
|
-
"text": {
|
|
10681
|
-
"type": "string",
|
|
10682
|
-
"description": "The text to convert to speech"
|
|
10683
|
-
},
|
|
10684
|
-
"outputPath": {
|
|
10685
|
-
"type": "string",
|
|
10686
|
-
"description": "File path to write the audio to"
|
|
10687
|
-
},
|
|
10688
|
-
"options": {
|
|
10689
|
-
"type": "SynthesizeOptions",
|
|
10690
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
10691
|
-
"properties": {
|
|
10692
|
-
"voiceId": {
|
|
10693
|
-
"type": "string",
|
|
10694
|
-
"description": ""
|
|
10695
|
-
},
|
|
10696
|
-
"modelId": {
|
|
10697
|
-
"type": "string",
|
|
10698
|
-
"description": ""
|
|
10699
|
-
},
|
|
10700
|
-
"outputFormat": {
|
|
10701
|
-
"type": "string",
|
|
10702
|
-
"description": ""
|
|
10703
|
-
},
|
|
10704
|
-
"voiceSettings": {
|
|
10705
|
-
"type": "ElevenLabsVoiceSettings",
|
|
10706
|
-
"description": ""
|
|
10707
|
-
},
|
|
10708
|
-
"disableCache": {
|
|
10709
|
-
"type": "boolean",
|
|
10710
|
-
"description": ""
|
|
10711
|
-
}
|
|
10712
|
-
}
|
|
10713
|
-
}
|
|
10714
|
-
},
|
|
10715
|
-
"required": [
|
|
10716
|
-
"text",
|
|
10717
|
-
"outputPath"
|
|
10718
|
-
],
|
|
10719
|
-
"returns": "Promise<string>",
|
|
10720
|
-
"examples": [
|
|
10721
|
-
{
|
|
10722
|
-
"language": "ts",
|
|
10723
|
-
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
10724
|
-
}
|
|
10725
|
-
]
|
|
10726
|
-
}
|
|
10727
|
-
},
|
|
10728
|
-
"getters": {
|
|
10729
|
-
"apiKey": {
|
|
10730
|
-
"description": "The resolved API key from options or environment.",
|
|
10952
|
+
"description": "The unique client ID used for WebSocket session tracking.",
|
|
10953
|
+
"returns": "string"
|
|
10954
|
+
},
|
|
10955
|
+
"wsURL": {
|
|
10956
|
+
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
10731
10957
|
"returns": "string"
|
|
10732
10958
|
}
|
|
10733
10959
|
},
|
|
10734
10960
|
"events": {
|
|
10735
|
-
"
|
|
10736
|
-
"name": "
|
|
10737
|
-
"description": "Event emitted by
|
|
10961
|
+
"execution_start": {
|
|
10962
|
+
"name": "execution_start",
|
|
10963
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10738
10964
|
"arguments": {}
|
|
10739
10965
|
},
|
|
10740
|
-
"
|
|
10741
|
-
"name": "
|
|
10742
|
-
"description": "Event emitted by
|
|
10966
|
+
"execution_complete": {
|
|
10967
|
+
"name": "execution_complete",
|
|
10968
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10743
10969
|
"arguments": {}
|
|
10744
10970
|
},
|
|
10745
|
-
"
|
|
10746
|
-
"name": "
|
|
10747
|
-
"description": "Event emitted by
|
|
10971
|
+
"executing": {
|
|
10972
|
+
"name": "executing",
|
|
10973
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10974
|
+
"arguments": {}
|
|
10975
|
+
},
|
|
10976
|
+
"progress": {
|
|
10977
|
+
"name": "progress",
|
|
10978
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10979
|
+
"arguments": {}
|
|
10980
|
+
},
|
|
10981
|
+
"executed": {
|
|
10982
|
+
"name": "executed",
|
|
10983
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10984
|
+
"arguments": {}
|
|
10985
|
+
},
|
|
10986
|
+
"execution_cached": {
|
|
10987
|
+
"name": "execution_cached",
|
|
10988
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10989
|
+
"arguments": {}
|
|
10990
|
+
},
|
|
10991
|
+
"execution_error": {
|
|
10992
|
+
"name": "execution_error",
|
|
10993
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10748
10994
|
"arguments": {}
|
|
10749
10995
|
}
|
|
10750
10996
|
},
|
|
@@ -10754,7 +11000,7 @@ setBuildTimeData('clients.elevenlabs', {
|
|
|
10754
11000
|
"examples": [
|
|
10755
11001
|
{
|
|
10756
11002
|
"language": "ts",
|
|
10757
|
-
"code": "const
|
|
11003
|
+
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
10758
11004
|
}
|
|
10759
11005
|
]
|
|
10760
11006
|
});
|
|
@@ -11043,7 +11289,7 @@ setBuildTimeData('servers.express', {
|
|
|
11043
11289
|
|
|
11044
11290
|
setBuildTimeData('servers.websocket', {
|
|
11045
11291
|
"id": "servers.websocket",
|
|
11046
|
-
"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, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety.",
|
|
11292
|
+
"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, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety. Supports ask/reply semantics when paired with the Luca WebSocket client. The server can `ask(ws, type, data)` a connected client and await a typed response, or handle incoming asks from clients by listening for messages with a `requestId` and replying via `send(ws, { replyTo, data })`. Requests time out if no reply arrives within the configurable window.",
|
|
11047
11293
|
"shortcut": "servers.websocket",
|
|
11048
11294
|
"className": "WebsocketServer",
|
|
11049
11295
|
"methods": {
|
|
@@ -11078,6 +11324,64 @@ setBuildTimeData('servers.websocket', {
|
|
|
11078
11324
|
],
|
|
11079
11325
|
"returns": "void"
|
|
11080
11326
|
},
|
|
11327
|
+
"ask": {
|
|
11328
|
+
"description": "Send a request to a specific client and wait for a correlated response. The client is expected to reply with a message whose `replyTo` matches the `requestId` of this message.",
|
|
11329
|
+
"parameters": {
|
|
11330
|
+
"ws": {
|
|
11331
|
+
"type": "any",
|
|
11332
|
+
"description": "The WebSocket client to ask"
|
|
11333
|
+
},
|
|
11334
|
+
"type": {
|
|
11335
|
+
"type": "string",
|
|
11336
|
+
"description": "A string identifying the request type"
|
|
11337
|
+
},
|
|
11338
|
+
"data": {
|
|
11339
|
+
"type": "any",
|
|
11340
|
+
"description": "Optional payload"
|
|
11341
|
+
},
|
|
11342
|
+
"timeout": {
|
|
11343
|
+
"type": "any",
|
|
11344
|
+
"description": "How long to wait (default 10 000 ms)"
|
|
11345
|
+
}
|
|
11346
|
+
},
|
|
11347
|
+
"required": [
|
|
11348
|
+
"ws",
|
|
11349
|
+
"type"
|
|
11350
|
+
],
|
|
11351
|
+
"returns": "Promise<R>",
|
|
11352
|
+
"examples": [
|
|
11353
|
+
{
|
|
11354
|
+
"language": "ts",
|
|
11355
|
+
"code": "ws.on('connection', async (client) => {\n const info = await ws.ask(client, 'identify')\n console.log('Client says:', info)\n})"
|
|
11356
|
+
}
|
|
11357
|
+
]
|
|
11358
|
+
},
|
|
11359
|
+
"_handleReply": {
|
|
11360
|
+
"description": "",
|
|
11361
|
+
"parameters": {
|
|
11362
|
+
"message": {
|
|
11363
|
+
"type": "any",
|
|
11364
|
+
"description": "Parameter message"
|
|
11365
|
+
}
|
|
11366
|
+
},
|
|
11367
|
+
"required": [
|
|
11368
|
+
"message"
|
|
11369
|
+
],
|
|
11370
|
+
"returns": "boolean"
|
|
11371
|
+
},
|
|
11372
|
+
"_rejectAllPending": {
|
|
11373
|
+
"description": "",
|
|
11374
|
+
"parameters": {
|
|
11375
|
+
"reason": {
|
|
11376
|
+
"type": "string",
|
|
11377
|
+
"description": "Parameter reason"
|
|
11378
|
+
}
|
|
11379
|
+
},
|
|
11380
|
+
"required": [
|
|
11381
|
+
"reason"
|
|
11382
|
+
],
|
|
11383
|
+
"returns": "void"
|
|
11384
|
+
},
|
|
11081
11385
|
"start": {
|
|
11082
11386
|
"description": "Start the WebSocket server. A runtime `port` overrides the constructor option and is written to state before the underlying `ws.Server` is created, so the server binds to the correct port.",
|
|
11083
11387
|
"parameters": {
|
|
@@ -11124,7 +11428,7 @@ setBuildTimeData('servers.websocket', {
|
|
|
11124
11428
|
"examples": [
|
|
11125
11429
|
{
|
|
11126
11430
|
"language": "ts",
|
|
11127
|
-
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
|
|
11431
|
+
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})\n\n// ask/reply: request info from a connected client\nws.on('connection', async (client) => {\n const info = await ws.ask(client, 'identify')\n console.log('Client says:', info)\n})"
|
|
11128
11432
|
}
|
|
11129
11433
|
]
|
|
11130
11434
|
});
|
|
@@ -11479,6 +11783,10 @@ setContainerBuildTimeData('Container', {
|
|
|
11479
11783
|
"description": "Returns a map of enabled feature shortcut IDs to their instances.",
|
|
11480
11784
|
"returns": "Partial<AvailableInstanceTypes<Features>>"
|
|
11481
11785
|
},
|
|
11786
|
+
"describer": {
|
|
11787
|
+
"description": "Lazy-initialized ContainerDescriber for introspecting registries, helpers, and members.",
|
|
11788
|
+
"returns": "ContainerDescriber"
|
|
11789
|
+
},
|
|
11482
11790
|
"context": {
|
|
11483
11791
|
"description": "The Container's context is an object that contains the enabled features, the container itself, and any additional context that has been added to the container. All helper instances that are created by the container will have access to the shared context.",
|
|
11484
11792
|
"returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
|
|
@@ -13076,7 +13384,7 @@ export const introspectionData = [
|
|
|
13076
13384
|
},
|
|
13077
13385
|
{
|
|
13078
13386
|
"id": "features.windowManager",
|
|
13079
|
-
"description": "WindowManager Feature — Native window control via LucaVoiceLauncher
|
|
13387
|
+
"description": "WindowManager Feature — Native window control via LucaVoiceLauncher Uses a broker/producer architecture so multiple luca processes can trigger window operations without competing for the same Unix socket. **Architecture:** - The first process to call `listen()` becomes the **broker**. It owns the app-facing socket (`ipc-window.sock`) and a control socket (`ipc-window-control.sock`). - Subsequent processes detect the broker and become **producers**. They connect to the control socket and route commands through the broker. - The broker forwards producer commands to the native app and routes acks and lifecycle events back to the originating producer. **Protocol:** - Bun listens on a Unix domain socket; the native app connects as a client - Window dispatch commands are sent as NDJSON with a `window` field - The app executes window commands and sends back `windowAck` messages - Any non-windowAck message from the app is emitted as a `message` event - Other features can use `send()` to write arbitrary NDJSON to the app **Capabilities:** - Spawn native browser windows with configurable chrome - Navigate, focus, close, and eval JavaScript in windows - Multiple luca processes can trigger window operations simultaneously - Automatic broker detection and producer fallback Observable state includes `windows` (open window metadata), `pendingOperations` (in-flight command ids), and `producerCount` (broker). Sockets, promises, and `WindowHandle` instances stay internal. **Producer state:** The broker pushes `windowStateSync` on the control socket when a producer connects and whenever the window roster changes, so every process sees the same `windows` / `windowCount` / `clientConnected` as the broker (not only its own acks).",
|
|
13080
13388
|
"shortcut": "features.windowManager",
|
|
13081
13389
|
"className": "WindowManager",
|
|
13082
13390
|
"methods": {
|
|
@@ -13092,7 +13400,18 @@ export const introspectionData = [
|
|
|
13092
13400
|
"returns": "Promise<this>"
|
|
13093
13401
|
},
|
|
13094
13402
|
"listen": {
|
|
13095
|
-
"description": "Start
|
|
13403
|
+
"description": "Start the window manager. Automatically detects whether a broker already exists and either becomes the broker or connects as a producer. - If no broker is running: becomes the broker, binds the app socket and a control socket for producers. - If a broker is already running: connects as a producer through the control socket.",
|
|
13404
|
+
"parameters": {
|
|
13405
|
+
"socketPath": {
|
|
13406
|
+
"type": "string",
|
|
13407
|
+
"description": "Override the configured app socket path"
|
|
13408
|
+
}
|
|
13409
|
+
},
|
|
13410
|
+
"required": [],
|
|
13411
|
+
"returns": "Promise<this>"
|
|
13412
|
+
},
|
|
13413
|
+
"cleanupSocket": {
|
|
13414
|
+
"description": "Remove stale socket files without starting or stopping the server. Useful when a previous process crashed and left dead sockets behind. Will not remove sockets that have live listeners.",
|
|
13096
13415
|
"parameters": {
|
|
13097
13416
|
"socketPath": {
|
|
13098
13417
|
"type": "string",
|
|
@@ -13100,10 +13419,10 @@ export const introspectionData = [
|
|
|
13100
13419
|
}
|
|
13101
13420
|
},
|
|
13102
13421
|
"required": [],
|
|
13103
|
-
"returns": "
|
|
13422
|
+
"returns": "Promise<boolean>"
|
|
13104
13423
|
},
|
|
13105
13424
|
"stop": {
|
|
13106
|
-
"description": "Stop the
|
|
13425
|
+
"description": "Stop the window manager and clean up all connections. Rejects any pending window operation requests.",
|
|
13107
13426
|
"parameters": {},
|
|
13108
13427
|
"required": [],
|
|
13109
13428
|
"returns": "Promise<this>"
|
|
@@ -13376,7 +13695,7 @@ export const introspectionData = [
|
|
|
13376
13695
|
]
|
|
13377
13696
|
},
|
|
13378
13697
|
"send": {
|
|
13379
|
-
"description": "Write an NDJSON message to the connected app client. Public so other features can send arbitrary protocol messages over the same socket.",
|
|
13698
|
+
"description": "Write an NDJSON message to the connected app client. In producer mode, routes through the broker. Public so other features can send arbitrary protocol messages over the same socket.",
|
|
13380
13699
|
"parameters": {
|
|
13381
13700
|
"msg": {
|
|
13382
13701
|
"type": "Record<string, any>",
|
|
@@ -13390,12 +13709,20 @@ export const introspectionData = [
|
|
|
13390
13709
|
}
|
|
13391
13710
|
},
|
|
13392
13711
|
"getters": {
|
|
13712
|
+
"isBroker": {
|
|
13713
|
+
"description": "Whether this instance is acting as the broker.",
|
|
13714
|
+
"returns": "boolean"
|
|
13715
|
+
},
|
|
13716
|
+
"isProducer": {
|
|
13717
|
+
"description": "Whether this instance is acting as a producer.",
|
|
13718
|
+
"returns": "boolean"
|
|
13719
|
+
},
|
|
13393
13720
|
"isListening": {
|
|
13394
|
-
"description": "Whether the IPC server is currently listening.",
|
|
13721
|
+
"description": "Whether the IPC server is currently listening (broker) or connected to broker (producer).",
|
|
13395
13722
|
"returns": "boolean"
|
|
13396
13723
|
},
|
|
13397
13724
|
"isClientConnected": {
|
|
13398
|
-
"description": "Whether the native app client is currently connected.",
|
|
13725
|
+
"description": "Whether the native app client is currently connected (only meaningful for broker).",
|
|
13399
13726
|
"returns": "boolean"
|
|
13400
13727
|
}
|
|
13401
13728
|
},
|
|
@@ -13430,6 +13757,11 @@ export const introspectionData = [
|
|
|
13430
13757
|
"description": "Event emitted by WindowManager",
|
|
13431
13758
|
"arguments": {}
|
|
13432
13759
|
},
|
|
13760
|
+
"windowFocus": {
|
|
13761
|
+
"name": "windowFocus",
|
|
13762
|
+
"description": "Event emitted by WindowManager",
|
|
13763
|
+
"arguments": {}
|
|
13764
|
+
},
|
|
13433
13765
|
"message": {
|
|
13434
13766
|
"name": "message",
|
|
13435
13767
|
"description": "Event emitted by WindowManager",
|
|
@@ -16829,6 +17161,23 @@ export const introspectionData = [
|
|
|
16829
17161
|
}
|
|
16830
17162
|
]
|
|
16831
17163
|
},
|
|
17164
|
+
"readFileSync": {
|
|
17165
|
+
"description": "Synchronously reads a file and returns its contents as a string. added this method because AI Assistants are understandly confused by this deviation from 2000's era node style",
|
|
17166
|
+
"parameters": {
|
|
17167
|
+
"path": {
|
|
17168
|
+
"type": "string",
|
|
17169
|
+
"description": "Parameter path"
|
|
17170
|
+
},
|
|
17171
|
+
"encoding": {
|
|
17172
|
+
"type": "BufferEncoding | null",
|
|
17173
|
+
"description": "Parameter encoding"
|
|
17174
|
+
}
|
|
17175
|
+
},
|
|
17176
|
+
"required": [
|
|
17177
|
+
"path"
|
|
17178
|
+
],
|
|
17179
|
+
"returns": "string | Buffer"
|
|
17180
|
+
},
|
|
16832
17181
|
"readFileAsync": {
|
|
16833
17182
|
"description": "Asynchronously reads a file and returns its contents as a string.",
|
|
16834
17183
|
"parameters": {
|
|
@@ -16871,6 +17220,19 @@ export const introspectionData = [
|
|
|
16871
17220
|
}
|
|
16872
17221
|
]
|
|
16873
17222
|
},
|
|
17223
|
+
"readJsonSync": {
|
|
17224
|
+
"description": "Read and parse a JSON file synchronously",
|
|
17225
|
+
"parameters": {
|
|
17226
|
+
"path": {
|
|
17227
|
+
"type": "string",
|
|
17228
|
+
"description": "Parameter path"
|
|
17229
|
+
}
|
|
17230
|
+
},
|
|
17231
|
+
"required": [
|
|
17232
|
+
"path"
|
|
17233
|
+
],
|
|
17234
|
+
"returns": "void"
|
|
17235
|
+
},
|
|
16874
17236
|
"readJsonAsync": {
|
|
16875
17237
|
"description": "Asynchronously reads and parses a JSON file.",
|
|
16876
17238
|
"parameters": {
|
|
@@ -17723,7 +18085,7 @@ export const introspectionData = [
|
|
|
17723
18085
|
},
|
|
17724
18086
|
{
|
|
17725
18087
|
"id": "features.ipcSocket",
|
|
17726
|
-
"description": "IpcSocket Feature - Inter-Process Communication via Unix Domain Sockets This feature provides robust IPC (Inter-Process Communication) capabilities using Unix domain sockets. It supports both server and client modes, allowing processes to communicate efficiently through file system-based socket connections. **Key Features:** -
|
|
18088
|
+
"description": "IpcSocket Feature - Inter-Process Communication via Unix Domain Sockets This feature provides robust IPC (Inter-Process Communication) capabilities using Unix domain sockets. It supports both server and client modes, allowing processes to communicate efficiently through file system-based socket connections. **Key Features:** - Hub-and-spoke: one server, many named clients with identity tracking - Targeted messaging: sendTo(clientId), broadcast(msg, excludeId) - Request/reply: ask() + reply() with timeout-based correlation - Auto-reconnect: clients reconnect with exponential backoff - Stale socket detection: probeSocket() before listen() - Clean shutdown: stopServer() removes socket file **Server (Hub):** ```typescript const ipc = container.feature('ipcSocket'); await ipc.listen('/tmp/hub.sock', true); ipc.on('connection', (clientId, socket) => { console.log('Client joined:', clientId); }); ipc.on('message', (data, clientId) => { console.log(`From ${clientId}:`, data); // Reply to sender, or ask and wait ipc.sendTo(clientId, { ack: true }); }); ``` **Client (Spoke):** ```typescript const ipc = container.feature('ipcSocket'); await ipc.connect('/tmp/hub.sock', { reconnect: true, name: 'worker-1' }); // Fire and forget await ipc.send({ type: 'status', ready: true }); // Request/reply ipc.on('message', (data) => { if (data.requestId) ipc.reply(data.requestId, { result: 42 }); }); ```",
|
|
17727
18089
|
"shortcut": "features.ipcSocket",
|
|
17728
18090
|
"className": "IpcSocket",
|
|
17729
18091
|
"methods": {
|
|
@@ -17763,61 +18125,127 @@ export const introspectionData = [
|
|
|
17763
18125
|
]
|
|
17764
18126
|
},
|
|
17765
18127
|
"broadcast": {
|
|
17766
|
-
"description": "Broadcasts a message to all connected clients (server mode only).
|
|
18128
|
+
"description": "Broadcasts a message to all connected clients (server mode only).",
|
|
17767
18129
|
"parameters": {
|
|
17768
18130
|
"message": {
|
|
17769
18131
|
"type": "any",
|
|
17770
|
-
"description": "The message object to broadcast
|
|
18132
|
+
"description": "The message object to broadcast"
|
|
18133
|
+
},
|
|
18134
|
+
"exclude": {
|
|
18135
|
+
"type": "string",
|
|
18136
|
+
"description": "Optional client ID to exclude from broadcast"
|
|
17771
18137
|
}
|
|
17772
18138
|
},
|
|
17773
18139
|
"required": [
|
|
17774
18140
|
"message"
|
|
17775
18141
|
],
|
|
17776
|
-
"returns": "void"
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
18142
|
+
"returns": "void"
|
|
18143
|
+
},
|
|
18144
|
+
"sendTo": {
|
|
18145
|
+
"description": "Sends a message to a specific client by ID (server mode only).",
|
|
18146
|
+
"parameters": {
|
|
18147
|
+
"clientId": {
|
|
18148
|
+
"type": "string",
|
|
18149
|
+
"description": "The target client ID"
|
|
18150
|
+
},
|
|
18151
|
+
"message": {
|
|
18152
|
+
"type": "any",
|
|
18153
|
+
"description": "The message to send"
|
|
17781
18154
|
}
|
|
17782
|
-
|
|
18155
|
+
},
|
|
18156
|
+
"required": [
|
|
18157
|
+
"clientId",
|
|
18158
|
+
"message"
|
|
18159
|
+
],
|
|
18160
|
+
"returns": "boolean"
|
|
17783
18161
|
},
|
|
17784
18162
|
"send": {
|
|
17785
|
-
"description": "
|
|
18163
|
+
"description": "Fire-and-forget: sends a message to the server (client mode only). For server→client, use sendTo() or broadcast().",
|
|
17786
18164
|
"parameters": {
|
|
17787
18165
|
"message": {
|
|
17788
18166
|
"type": "any",
|
|
17789
|
-
"description": "The message
|
|
18167
|
+
"description": "The message to send"
|
|
17790
18168
|
}
|
|
17791
18169
|
},
|
|
17792
18170
|
"required": [
|
|
17793
18171
|
"message"
|
|
17794
18172
|
],
|
|
17795
|
-
"returns": "void"
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
18173
|
+
"returns": "void"
|
|
18174
|
+
},
|
|
18175
|
+
"ask": {
|
|
18176
|
+
"description": "Sends a message and waits for a correlated reply. Works in both client and server mode. The recipient should call `reply(requestId, response)` to respond.",
|
|
18177
|
+
"parameters": {
|
|
18178
|
+
"message": {
|
|
18179
|
+
"type": "any",
|
|
18180
|
+
"description": "The message to send"
|
|
18181
|
+
},
|
|
18182
|
+
"options": {
|
|
18183
|
+
"type": "{ clientId?: string; timeoutMs?: number }",
|
|
18184
|
+
"description": "Optional: clientId (server mode target), timeoutMs"
|
|
17800
18185
|
}
|
|
17801
|
-
|
|
18186
|
+
},
|
|
18187
|
+
"required": [
|
|
18188
|
+
"message"
|
|
18189
|
+
],
|
|
18190
|
+
"returns": "Promise<any>"
|
|
18191
|
+
},
|
|
18192
|
+
"reply": {
|
|
18193
|
+
"description": "Sends a reply to a previous ask() call, correlated by requestId.",
|
|
18194
|
+
"parameters": {
|
|
18195
|
+
"requestId": {
|
|
18196
|
+
"type": "string",
|
|
18197
|
+
"description": "The requestId from the incoming message"
|
|
18198
|
+
},
|
|
18199
|
+
"data": {
|
|
18200
|
+
"type": "any",
|
|
18201
|
+
"description": "The reply payload"
|
|
18202
|
+
},
|
|
18203
|
+
"clientId": {
|
|
18204
|
+
"type": "string",
|
|
18205
|
+
"description": "Target client (server mode; for client mode, omit)"
|
|
18206
|
+
}
|
|
18207
|
+
},
|
|
18208
|
+
"required": [
|
|
18209
|
+
"requestId",
|
|
18210
|
+
"data"
|
|
18211
|
+
],
|
|
18212
|
+
"returns": "void"
|
|
17802
18213
|
},
|
|
17803
18214
|
"connect": {
|
|
17804
|
-
"description": "Connects to an IPC server at the specified socket path (client mode).
|
|
18215
|
+
"description": "Connects to an IPC server at the specified socket path (client mode).",
|
|
17805
18216
|
"parameters": {
|
|
17806
18217
|
"socketPath": {
|
|
17807
18218
|
"type": "string",
|
|
17808
|
-
"description": "
|
|
18219
|
+
"description": "Path to the server's Unix domain socket"
|
|
18220
|
+
},
|
|
18221
|
+
"options": {
|
|
18222
|
+
"type": "{ reconnect?: boolean; name?: string }",
|
|
18223
|
+
"description": "Optional: reconnect (enable auto-reconnect), name (identify this client)"
|
|
17809
18224
|
}
|
|
17810
18225
|
},
|
|
17811
18226
|
"required": [
|
|
17812
18227
|
"socketPath"
|
|
17813
18228
|
],
|
|
17814
|
-
"returns": "Promise<Socket>"
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
18229
|
+
"returns": "Promise<Socket>"
|
|
18230
|
+
},
|
|
18231
|
+
"disconnect": {
|
|
18232
|
+
"description": "Disconnects the client and stops any reconnection attempts.",
|
|
18233
|
+
"parameters": {},
|
|
18234
|
+
"required": [],
|
|
18235
|
+
"returns": "void"
|
|
18236
|
+
},
|
|
18237
|
+
"probeSocket": {
|
|
18238
|
+
"description": "Probe an existing socket to see if a live listener is behind it. Attempts a quick connect — if it succeeds, someone is listening.",
|
|
18239
|
+
"parameters": {
|
|
18240
|
+
"socketPath": {
|
|
18241
|
+
"type": "string",
|
|
18242
|
+
"description": "Parameter socketPath"
|
|
17819
18243
|
}
|
|
17820
|
-
|
|
18244
|
+
},
|
|
18245
|
+
"required": [
|
|
18246
|
+
"socketPath"
|
|
18247
|
+
],
|
|
18248
|
+
"returns": "Promise<boolean>"
|
|
17821
18249
|
}
|
|
17822
18250
|
},
|
|
17823
18251
|
"getters": {
|
|
@@ -17829,12 +18257,25 @@ export const introspectionData = [
|
|
|
17829
18257
|
"description": "Checks if the IPC socket is operating in server mode.",
|
|
17830
18258
|
"returns": "any"
|
|
17831
18259
|
},
|
|
18260
|
+
"clientCount": {
|
|
18261
|
+
"description": "Returns the number of currently connected clients (server mode).",
|
|
18262
|
+
"returns": "any"
|
|
18263
|
+
},
|
|
18264
|
+
"connectedClients": {
|
|
18265
|
+
"description": "Returns info about all connected clients (server mode).",
|
|
18266
|
+
"returns": "Array<{ id: string; name?: string; connectedAt: number }>"
|
|
18267
|
+
},
|
|
17832
18268
|
"connection": {
|
|
17833
18269
|
"description": "Gets the current client connection socket.",
|
|
17834
18270
|
"returns": "any"
|
|
17835
18271
|
}
|
|
17836
18272
|
},
|
|
17837
18273
|
"events": {
|
|
18274
|
+
"disconnection": {
|
|
18275
|
+
"name": "disconnection",
|
|
18276
|
+
"description": "Event emitted by IpcSocket",
|
|
18277
|
+
"arguments": {}
|
|
18278
|
+
},
|
|
17838
18279
|
"connection": {
|
|
17839
18280
|
"name": "connection",
|
|
17840
18281
|
"description": "Event emitted by IpcSocket",
|
|
@@ -18749,10 +19190,68 @@ export const introspectionData = [
|
|
|
18749
19190
|
},
|
|
18750
19191
|
{
|
|
18751
19192
|
"id": "features.processManager",
|
|
18752
|
-
"description": "Manages long-running child processes with tracking, events, and automatic cleanup. Unlike the `proc` feature whose spawn methods block until the child exits, ProcessManager returns a SpawnHandler immediately — a handle object with its own state, events, and lifecycle methods. The feature tracks all spawned processes, maintains observable state, and can automatically kill them on parent exit.",
|
|
19193
|
+
"description": "Manages long-running child processes with tracking, events, and automatic cleanup. Unlike the `proc` feature whose spawn methods block until the child exits, ProcessManager returns a SpawnHandler immediately — a handle object with its own state, events, and lifecycle methods. The feature tracks all spawned processes, maintains observable state, and can automatically kill them on parent exit. Each handler maintains a memory-efficient output buffer: the first 20 lines (head) and last 50 lines (tail) of stdout/stderr are kept, everything in between is discarded.",
|
|
18753
19194
|
"shortcut": "features.processManager",
|
|
18754
19195
|
"className": "ProcessManager",
|
|
18755
19196
|
"methods": {
|
|
19197
|
+
"spawnProcess": {
|
|
19198
|
+
"description": "Tool handler: spawn a long-running background process.",
|
|
19199
|
+
"parameters": {
|
|
19200
|
+
"args": {
|
|
19201
|
+
"type": "{ command: string; args?: string; tag?: string; cwd?: string }",
|
|
19202
|
+
"description": "Parameter args"
|
|
19203
|
+
}
|
|
19204
|
+
},
|
|
19205
|
+
"required": [
|
|
19206
|
+
"args"
|
|
19207
|
+
],
|
|
19208
|
+
"returns": "void"
|
|
19209
|
+
},
|
|
19210
|
+
"runCommand": {
|
|
19211
|
+
"description": "Tool handler: run a command to completion and return its output.",
|
|
19212
|
+
"parameters": {
|
|
19213
|
+
"args": {
|
|
19214
|
+
"type": "{ command: string; cwd?: string }",
|
|
19215
|
+
"description": "Parameter args"
|
|
19216
|
+
}
|
|
19217
|
+
},
|
|
19218
|
+
"required": [
|
|
19219
|
+
"args"
|
|
19220
|
+
],
|
|
19221
|
+
"returns": "void"
|
|
19222
|
+
},
|
|
19223
|
+
"listProcesses": {
|
|
19224
|
+
"description": "Tool handler: list all tracked processes.",
|
|
19225
|
+
"parameters": {},
|
|
19226
|
+
"required": [],
|
|
19227
|
+
"returns": "void"
|
|
19228
|
+
},
|
|
19229
|
+
"getProcessOutput": {
|
|
19230
|
+
"description": "Tool handler: peek at a process's buffered output.",
|
|
19231
|
+
"parameters": {
|
|
19232
|
+
"args": {
|
|
19233
|
+
"type": "{ id?: string; tag?: string; stream?: string }",
|
|
19234
|
+
"description": "Parameter args"
|
|
19235
|
+
}
|
|
19236
|
+
},
|
|
19237
|
+
"required": [
|
|
19238
|
+
"args"
|
|
19239
|
+
],
|
|
19240
|
+
"returns": "void"
|
|
19241
|
+
},
|
|
19242
|
+
"killProcess": {
|
|
19243
|
+
"description": "Tool handler: kill a process by ID or tag.",
|
|
19244
|
+
"parameters": {
|
|
19245
|
+
"args": {
|
|
19246
|
+
"type": "{ id?: string; tag?: string; signal?: string }",
|
|
19247
|
+
"description": "Parameter args"
|
|
19248
|
+
}
|
|
19249
|
+
},
|
|
19250
|
+
"required": [
|
|
19251
|
+
"args"
|
|
19252
|
+
],
|
|
19253
|
+
"returns": "void"
|
|
19254
|
+
},
|
|
18756
19255
|
"spawn": {
|
|
18757
19256
|
"description": "Spawn a long-running process and return a handle immediately. The returned SpawnHandler provides events for stdout/stderr streaming, exit/crash notifications, and methods to kill or await the process.",
|
|
18758
19257
|
"parameters": {
|
|
@@ -18930,7 +19429,7 @@ export const introspectionData = [
|
|
|
18930
19429
|
"examples": [
|
|
18931
19430
|
{
|
|
18932
19431
|
"language": "ts",
|
|
18933
|
-
"code": "const pm = container.feature('processManager', { enable: true })\n\nconst server = pm.spawn('node', ['server.js'], { tag: 'api', cwd: '/app' })\nserver.on('stdout', (data) => console.log('[api]', data))\nserver.on('crash', (code) => console.error('API crashed:', code))\n\n// Kill one\nserver.kill()\n\n// Kill all tracked processes\npm.killAll()\n\n// List and lookup\npm.list() // SpawnHandler[]\npm.getByTag('api') // SpawnHandler | undefined"
|
|
19432
|
+
"code": "const pm = container.feature('processManager', { enable: true })\n\nconst server = pm.spawn('node', ['server.js'], { tag: 'api', cwd: '/app' })\nserver.on('stdout', (data) => console.log('[api]', data))\nserver.on('crash', (code) => console.error('API crashed:', code))\n\n// Peek at buffered output\nconst { head, tail } = server.peek()\n\n// Kill one\nserver.kill()\n\n// Kill all tracked processes\npm.killAll()\n\n// List and lookup\npm.list() // SpawnHandler[]\npm.getByTag('api') // SpawnHandler | undefined"
|
|
18934
19433
|
}
|
|
18935
19434
|
]
|
|
18936
19435
|
},
|
|
@@ -21011,6 +21510,14 @@ export const introspectionData = [
|
|
|
21011
21510
|
"description": "Returns the available document ids in the collection",
|
|
21012
21511
|
"returns": "string[]"
|
|
21013
21512
|
},
|
|
21513
|
+
"modelDefinitionTable": {
|
|
21514
|
+
"description": "",
|
|
21515
|
+
"returns": "any"
|
|
21516
|
+
},
|
|
21517
|
+
"fileTree": {
|
|
21518
|
+
"description": "",
|
|
21519
|
+
"returns": "any"
|
|
21520
|
+
},
|
|
21014
21521
|
"searchIndexStatus": {
|
|
21015
21522
|
"description": "Get the current search index status.",
|
|
21016
21523
|
"returns": "any"
|
|
@@ -21280,7 +21787,7 @@ export const introspectionData = [
|
|
|
21280
21787
|
},
|
|
21281
21788
|
{
|
|
21282
21789
|
"id": "clients.websocket",
|
|
21283
|
-
"description": "
|
|
21790
|
+
"description": "WebSocketClient helper",
|
|
21284
21791
|
"shortcut": "clients.websocket",
|
|
21285
21792
|
"className": "WebSocketClient",
|
|
21286
21793
|
"methods": {
|
|
@@ -21303,6 +21810,59 @@ export const introspectionData = [
|
|
|
21303
21810
|
],
|
|
21304
21811
|
"returns": "Promise<void>"
|
|
21305
21812
|
},
|
|
21813
|
+
"ask": {
|
|
21814
|
+
"description": "Send a request and wait for a correlated response. The message is sent with a unique `requestId`; the remote side is expected to reply with a message containing `replyTo` set to that same ID.",
|
|
21815
|
+
"parameters": {
|
|
21816
|
+
"type": {
|
|
21817
|
+
"type": "string",
|
|
21818
|
+
"description": "A string identifying the request type"
|
|
21819
|
+
},
|
|
21820
|
+
"data": {
|
|
21821
|
+
"type": "any",
|
|
21822
|
+
"description": "Optional payload to include with the request"
|
|
21823
|
+
},
|
|
21824
|
+
"timeout": {
|
|
21825
|
+
"type": "any",
|
|
21826
|
+
"description": "How long to wait for a response (default 10 000 ms)"
|
|
21827
|
+
}
|
|
21828
|
+
},
|
|
21829
|
+
"required": [
|
|
21830
|
+
"type"
|
|
21831
|
+
],
|
|
21832
|
+
"returns": "Promise<R>",
|
|
21833
|
+
"examples": [
|
|
21834
|
+
{
|
|
21835
|
+
"language": "ts",
|
|
21836
|
+
"code": "const result = await ws.ask('getUser', { id: 42 })"
|
|
21837
|
+
}
|
|
21838
|
+
]
|
|
21839
|
+
},
|
|
21840
|
+
"_handleReply": {
|
|
21841
|
+
"description": "",
|
|
21842
|
+
"parameters": {
|
|
21843
|
+
"message": {
|
|
21844
|
+
"type": "any",
|
|
21845
|
+
"description": "Parameter message"
|
|
21846
|
+
}
|
|
21847
|
+
},
|
|
21848
|
+
"required": [
|
|
21849
|
+
"message"
|
|
21850
|
+
],
|
|
21851
|
+
"returns": "boolean"
|
|
21852
|
+
},
|
|
21853
|
+
"_rejectAllPending": {
|
|
21854
|
+
"description": "",
|
|
21855
|
+
"parameters": {
|
|
21856
|
+
"reason": {
|
|
21857
|
+
"type": "string",
|
|
21858
|
+
"description": "Parameter reason"
|
|
21859
|
+
}
|
|
21860
|
+
},
|
|
21861
|
+
"required": [
|
|
21862
|
+
"reason"
|
|
21863
|
+
],
|
|
21864
|
+
"returns": "void"
|
|
21865
|
+
},
|
|
21306
21866
|
"disconnect": {
|
|
21307
21867
|
"description": "Gracefully close the WebSocket connection. Suppresses auto-reconnect and updates connection state to disconnected.",
|
|
21308
21868
|
"parameters": {},
|
|
@@ -21345,13 +21905,7 @@ export const introspectionData = [
|
|
|
21345
21905
|
},
|
|
21346
21906
|
"state": {},
|
|
21347
21907
|
"options": {},
|
|
21348
|
-
"envVars": []
|
|
21349
|
-
"examples": [
|
|
21350
|
-
{
|
|
21351
|
-
"language": "ts",
|
|
21352
|
-
"code": "const ws = container.client('websocket', {\n baseURL: 'ws://localhost:8080',\n reconnect: true,\n maxReconnectAttempts: 5\n})\nws.on('message', (data) => console.log('Received:', data))\nawait ws.connect()\nawait ws.send({ type: 'hello' })"
|
|
21353
|
-
}
|
|
21354
|
-
]
|
|
21908
|
+
"envVars": []
|
|
21355
21909
|
},
|
|
21356
21910
|
{
|
|
21357
21911
|
"id": "clients.openai",
|
|
@@ -21616,7 +22170,208 @@ export const introspectionData = [
|
|
|
21616
22170
|
"examples": [
|
|
21617
22171
|
{
|
|
21618
22172
|
"language": "ts",
|
|
21619
|
-
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
22173
|
+
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
22174
|
+
}
|
|
22175
|
+
]
|
|
22176
|
+
},
|
|
22177
|
+
{
|
|
22178
|
+
"id": "clients.elevenlabs",
|
|
22179
|
+
"description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
|
|
22180
|
+
"shortcut": "clients.elevenlabs",
|
|
22181
|
+
"className": "ElevenLabsClient",
|
|
22182
|
+
"methods": {
|
|
22183
|
+
"beforeRequest": {
|
|
22184
|
+
"description": "Inject the xi-api-key header before each request.",
|
|
22185
|
+
"parameters": {},
|
|
22186
|
+
"required": [],
|
|
22187
|
+
"returns": "void"
|
|
22188
|
+
},
|
|
22189
|
+
"connect": {
|
|
22190
|
+
"description": "Validate the API key by listing available models.",
|
|
22191
|
+
"parameters": {},
|
|
22192
|
+
"required": [],
|
|
22193
|
+
"returns": "Promise<this>",
|
|
22194
|
+
"examples": [
|
|
22195
|
+
{
|
|
22196
|
+
"language": "ts",
|
|
22197
|
+
"code": "await el.connect()"
|
|
22198
|
+
}
|
|
22199
|
+
]
|
|
22200
|
+
},
|
|
22201
|
+
"listVoices": {
|
|
22202
|
+
"description": "List available voices with optional search and filtering.",
|
|
22203
|
+
"parameters": {
|
|
22204
|
+
"options": {
|
|
22205
|
+
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
22206
|
+
"description": "Query parameters for filtering voices"
|
|
22207
|
+
}
|
|
22208
|
+
},
|
|
22209
|
+
"required": [],
|
|
22210
|
+
"returns": "Promise<any>",
|
|
22211
|
+
"examples": [
|
|
22212
|
+
{
|
|
22213
|
+
"language": "ts",
|
|
22214
|
+
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
22215
|
+
}
|
|
22216
|
+
]
|
|
22217
|
+
},
|
|
22218
|
+
"getVoice": {
|
|
22219
|
+
"description": "Get details for a single voice.",
|
|
22220
|
+
"parameters": {
|
|
22221
|
+
"voiceId": {
|
|
22222
|
+
"type": "string",
|
|
22223
|
+
"description": "The voice ID to look up"
|
|
22224
|
+
}
|
|
22225
|
+
},
|
|
22226
|
+
"required": [
|
|
22227
|
+
"voiceId"
|
|
22228
|
+
],
|
|
22229
|
+
"returns": "Promise<any>",
|
|
22230
|
+
"examples": [
|
|
22231
|
+
{
|
|
22232
|
+
"language": "ts",
|
|
22233
|
+
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
22234
|
+
}
|
|
22235
|
+
]
|
|
22236
|
+
},
|
|
22237
|
+
"listModels": {
|
|
22238
|
+
"description": "List available TTS models.",
|
|
22239
|
+
"parameters": {},
|
|
22240
|
+
"required": [],
|
|
22241
|
+
"returns": "Promise<any[]>",
|
|
22242
|
+
"examples": [
|
|
22243
|
+
{
|
|
22244
|
+
"language": "ts",
|
|
22245
|
+
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
22246
|
+
}
|
|
22247
|
+
]
|
|
22248
|
+
},
|
|
22249
|
+
"synthesize": {
|
|
22250
|
+
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
22251
|
+
"parameters": {
|
|
22252
|
+
"text": {
|
|
22253
|
+
"type": "string",
|
|
22254
|
+
"description": "The text to convert to speech"
|
|
22255
|
+
},
|
|
22256
|
+
"options": {
|
|
22257
|
+
"type": "SynthesizeOptions",
|
|
22258
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
22259
|
+
"properties": {
|
|
22260
|
+
"voiceId": {
|
|
22261
|
+
"type": "string",
|
|
22262
|
+
"description": ""
|
|
22263
|
+
},
|
|
22264
|
+
"modelId": {
|
|
22265
|
+
"type": "string",
|
|
22266
|
+
"description": ""
|
|
22267
|
+
},
|
|
22268
|
+
"outputFormat": {
|
|
22269
|
+
"type": "string",
|
|
22270
|
+
"description": ""
|
|
22271
|
+
},
|
|
22272
|
+
"voiceSettings": {
|
|
22273
|
+
"type": "ElevenLabsVoiceSettings",
|
|
22274
|
+
"description": ""
|
|
22275
|
+
},
|
|
22276
|
+
"disableCache": {
|
|
22277
|
+
"type": "boolean",
|
|
22278
|
+
"description": ""
|
|
22279
|
+
}
|
|
22280
|
+
}
|
|
22281
|
+
}
|
|
22282
|
+
},
|
|
22283
|
+
"required": [
|
|
22284
|
+
"text"
|
|
22285
|
+
],
|
|
22286
|
+
"returns": "Promise<Buffer>",
|
|
22287
|
+
"examples": [
|
|
22288
|
+
{
|
|
22289
|
+
"language": "ts",
|
|
22290
|
+
"code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
|
|
22291
|
+
}
|
|
22292
|
+
]
|
|
22293
|
+
},
|
|
22294
|
+
"say": {
|
|
22295
|
+
"description": "Synthesize speech and write the audio to a file.",
|
|
22296
|
+
"parameters": {
|
|
22297
|
+
"text": {
|
|
22298
|
+
"type": "string",
|
|
22299
|
+
"description": "The text to convert to speech"
|
|
22300
|
+
},
|
|
22301
|
+
"outputPath": {
|
|
22302
|
+
"type": "string",
|
|
22303
|
+
"description": "File path to write the audio to"
|
|
22304
|
+
},
|
|
22305
|
+
"options": {
|
|
22306
|
+
"type": "SynthesizeOptions",
|
|
22307
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
22308
|
+
"properties": {
|
|
22309
|
+
"voiceId": {
|
|
22310
|
+
"type": "string",
|
|
22311
|
+
"description": ""
|
|
22312
|
+
},
|
|
22313
|
+
"modelId": {
|
|
22314
|
+
"type": "string",
|
|
22315
|
+
"description": ""
|
|
22316
|
+
},
|
|
22317
|
+
"outputFormat": {
|
|
22318
|
+
"type": "string",
|
|
22319
|
+
"description": ""
|
|
22320
|
+
},
|
|
22321
|
+
"voiceSettings": {
|
|
22322
|
+
"type": "ElevenLabsVoiceSettings",
|
|
22323
|
+
"description": ""
|
|
22324
|
+
},
|
|
22325
|
+
"disableCache": {
|
|
22326
|
+
"type": "boolean",
|
|
22327
|
+
"description": ""
|
|
22328
|
+
}
|
|
22329
|
+
}
|
|
22330
|
+
}
|
|
22331
|
+
},
|
|
22332
|
+
"required": [
|
|
22333
|
+
"text",
|
|
22334
|
+
"outputPath"
|
|
22335
|
+
],
|
|
22336
|
+
"returns": "Promise<string>",
|
|
22337
|
+
"examples": [
|
|
22338
|
+
{
|
|
22339
|
+
"language": "ts",
|
|
22340
|
+
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
22341
|
+
}
|
|
22342
|
+
]
|
|
22343
|
+
}
|
|
22344
|
+
},
|
|
22345
|
+
"getters": {
|
|
22346
|
+
"apiKey": {
|
|
22347
|
+
"description": "The resolved API key from options or environment.",
|
|
22348
|
+
"returns": "string"
|
|
22349
|
+
}
|
|
22350
|
+
},
|
|
22351
|
+
"events": {
|
|
22352
|
+
"failure": {
|
|
22353
|
+
"name": "failure",
|
|
22354
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
22355
|
+
"arguments": {}
|
|
22356
|
+
},
|
|
22357
|
+
"voices": {
|
|
22358
|
+
"name": "voices",
|
|
22359
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
22360
|
+
"arguments": {}
|
|
22361
|
+
},
|
|
22362
|
+
"speech": {
|
|
22363
|
+
"name": "speech",
|
|
22364
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
22365
|
+
"arguments": {}
|
|
22366
|
+
}
|
|
22367
|
+
},
|
|
22368
|
+
"state": {},
|
|
22369
|
+
"options": {},
|
|
22370
|
+
"envVars": [],
|
|
22371
|
+
"examples": [
|
|
22372
|
+
{
|
|
22373
|
+
"language": "ts",
|
|
22374
|
+
"code": "const el = container.client('elevenlabs')\nawait el.connect()\nconst voices = await el.listVoices()\nconst audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data"
|
|
21620
22375
|
}
|
|
21621
22376
|
]
|
|
21622
22377
|
},
|
|
@@ -22066,207 +22821,6 @@ export const introspectionData = [
|
|
|
22066
22821
|
}
|
|
22067
22822
|
]
|
|
22068
22823
|
},
|
|
22069
|
-
{
|
|
22070
|
-
"id": "clients.elevenlabs",
|
|
22071
|
-
"description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
|
|
22072
|
-
"shortcut": "clients.elevenlabs",
|
|
22073
|
-
"className": "ElevenLabsClient",
|
|
22074
|
-
"methods": {
|
|
22075
|
-
"beforeRequest": {
|
|
22076
|
-
"description": "Inject the xi-api-key header before each request.",
|
|
22077
|
-
"parameters": {},
|
|
22078
|
-
"required": [],
|
|
22079
|
-
"returns": "void"
|
|
22080
|
-
},
|
|
22081
|
-
"connect": {
|
|
22082
|
-
"description": "Validate the API key by listing available models.",
|
|
22083
|
-
"parameters": {},
|
|
22084
|
-
"required": [],
|
|
22085
|
-
"returns": "Promise<this>",
|
|
22086
|
-
"examples": [
|
|
22087
|
-
{
|
|
22088
|
-
"language": "ts",
|
|
22089
|
-
"code": "await el.connect()"
|
|
22090
|
-
}
|
|
22091
|
-
]
|
|
22092
|
-
},
|
|
22093
|
-
"listVoices": {
|
|
22094
|
-
"description": "List available voices with optional search and filtering.",
|
|
22095
|
-
"parameters": {
|
|
22096
|
-
"options": {
|
|
22097
|
-
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
22098
|
-
"description": "Query parameters for filtering voices"
|
|
22099
|
-
}
|
|
22100
|
-
},
|
|
22101
|
-
"required": [],
|
|
22102
|
-
"returns": "Promise<any>",
|
|
22103
|
-
"examples": [
|
|
22104
|
-
{
|
|
22105
|
-
"language": "ts",
|
|
22106
|
-
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
22107
|
-
}
|
|
22108
|
-
]
|
|
22109
|
-
},
|
|
22110
|
-
"getVoice": {
|
|
22111
|
-
"description": "Get details for a single voice.",
|
|
22112
|
-
"parameters": {
|
|
22113
|
-
"voiceId": {
|
|
22114
|
-
"type": "string",
|
|
22115
|
-
"description": "The voice ID to look up"
|
|
22116
|
-
}
|
|
22117
|
-
},
|
|
22118
|
-
"required": [
|
|
22119
|
-
"voiceId"
|
|
22120
|
-
],
|
|
22121
|
-
"returns": "Promise<any>",
|
|
22122
|
-
"examples": [
|
|
22123
|
-
{
|
|
22124
|
-
"language": "ts",
|
|
22125
|
-
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
22126
|
-
}
|
|
22127
|
-
]
|
|
22128
|
-
},
|
|
22129
|
-
"listModels": {
|
|
22130
|
-
"description": "List available TTS models.",
|
|
22131
|
-
"parameters": {},
|
|
22132
|
-
"required": [],
|
|
22133
|
-
"returns": "Promise<any[]>",
|
|
22134
|
-
"examples": [
|
|
22135
|
-
{
|
|
22136
|
-
"language": "ts",
|
|
22137
|
-
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
22138
|
-
}
|
|
22139
|
-
]
|
|
22140
|
-
},
|
|
22141
|
-
"synthesize": {
|
|
22142
|
-
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
22143
|
-
"parameters": {
|
|
22144
|
-
"text": {
|
|
22145
|
-
"type": "string",
|
|
22146
|
-
"description": "The text to convert to speech"
|
|
22147
|
-
},
|
|
22148
|
-
"options": {
|
|
22149
|
-
"type": "SynthesizeOptions",
|
|
22150
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
22151
|
-
"properties": {
|
|
22152
|
-
"voiceId": {
|
|
22153
|
-
"type": "string",
|
|
22154
|
-
"description": ""
|
|
22155
|
-
},
|
|
22156
|
-
"modelId": {
|
|
22157
|
-
"type": "string",
|
|
22158
|
-
"description": ""
|
|
22159
|
-
},
|
|
22160
|
-
"outputFormat": {
|
|
22161
|
-
"type": "string",
|
|
22162
|
-
"description": ""
|
|
22163
|
-
},
|
|
22164
|
-
"voiceSettings": {
|
|
22165
|
-
"type": "ElevenLabsVoiceSettings",
|
|
22166
|
-
"description": ""
|
|
22167
|
-
},
|
|
22168
|
-
"disableCache": {
|
|
22169
|
-
"type": "boolean",
|
|
22170
|
-
"description": ""
|
|
22171
|
-
}
|
|
22172
|
-
}
|
|
22173
|
-
}
|
|
22174
|
-
},
|
|
22175
|
-
"required": [
|
|
22176
|
-
"text"
|
|
22177
|
-
],
|
|
22178
|
-
"returns": "Promise<Buffer>",
|
|
22179
|
-
"examples": [
|
|
22180
|
-
{
|
|
22181
|
-
"language": "ts",
|
|
22182
|
-
"code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
|
|
22183
|
-
}
|
|
22184
|
-
]
|
|
22185
|
-
},
|
|
22186
|
-
"say": {
|
|
22187
|
-
"description": "Synthesize speech and write the audio to a file.",
|
|
22188
|
-
"parameters": {
|
|
22189
|
-
"text": {
|
|
22190
|
-
"type": "string",
|
|
22191
|
-
"description": "The text to convert to speech"
|
|
22192
|
-
},
|
|
22193
|
-
"outputPath": {
|
|
22194
|
-
"type": "string",
|
|
22195
|
-
"description": "File path to write the audio to"
|
|
22196
|
-
},
|
|
22197
|
-
"options": {
|
|
22198
|
-
"type": "SynthesizeOptions",
|
|
22199
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
22200
|
-
"properties": {
|
|
22201
|
-
"voiceId": {
|
|
22202
|
-
"type": "string",
|
|
22203
|
-
"description": ""
|
|
22204
|
-
},
|
|
22205
|
-
"modelId": {
|
|
22206
|
-
"type": "string",
|
|
22207
|
-
"description": ""
|
|
22208
|
-
},
|
|
22209
|
-
"outputFormat": {
|
|
22210
|
-
"type": "string",
|
|
22211
|
-
"description": ""
|
|
22212
|
-
},
|
|
22213
|
-
"voiceSettings": {
|
|
22214
|
-
"type": "ElevenLabsVoiceSettings",
|
|
22215
|
-
"description": ""
|
|
22216
|
-
},
|
|
22217
|
-
"disableCache": {
|
|
22218
|
-
"type": "boolean",
|
|
22219
|
-
"description": ""
|
|
22220
|
-
}
|
|
22221
|
-
}
|
|
22222
|
-
}
|
|
22223
|
-
},
|
|
22224
|
-
"required": [
|
|
22225
|
-
"text",
|
|
22226
|
-
"outputPath"
|
|
22227
|
-
],
|
|
22228
|
-
"returns": "Promise<string>",
|
|
22229
|
-
"examples": [
|
|
22230
|
-
{
|
|
22231
|
-
"language": "ts",
|
|
22232
|
-
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
22233
|
-
}
|
|
22234
|
-
]
|
|
22235
|
-
}
|
|
22236
|
-
},
|
|
22237
|
-
"getters": {
|
|
22238
|
-
"apiKey": {
|
|
22239
|
-
"description": "The resolved API key from options or environment.",
|
|
22240
|
-
"returns": "string"
|
|
22241
|
-
}
|
|
22242
|
-
},
|
|
22243
|
-
"events": {
|
|
22244
|
-
"failure": {
|
|
22245
|
-
"name": "failure",
|
|
22246
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
22247
|
-
"arguments": {}
|
|
22248
|
-
},
|
|
22249
|
-
"voices": {
|
|
22250
|
-
"name": "voices",
|
|
22251
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
22252
|
-
"arguments": {}
|
|
22253
|
-
},
|
|
22254
|
-
"speech": {
|
|
22255
|
-
"name": "speech",
|
|
22256
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
22257
|
-
"arguments": {}
|
|
22258
|
-
}
|
|
22259
|
-
},
|
|
22260
|
-
"state": {},
|
|
22261
|
-
"options": {},
|
|
22262
|
-
"envVars": [],
|
|
22263
|
-
"examples": [
|
|
22264
|
-
{
|
|
22265
|
-
"language": "ts",
|
|
22266
|
-
"code": "const el = container.client('elevenlabs')\nawait el.connect()\nconst voices = await el.listVoices()\nconst audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data"
|
|
22267
|
-
}
|
|
22268
|
-
]
|
|
22269
|
-
},
|
|
22270
22824
|
{
|
|
22271
22825
|
"id": "servers.mcp",
|
|
22272
22826
|
"description": "MCP (Model Context Protocol) server for exposing tools, resources, and prompts to AI clients like Claude Code. Uses the low-level MCP SDK Server class directly with Zod 4 native JSON Schema conversion. Register tools, resources, and prompts programmatically, then start the server over stdio (for CLI integration) or HTTP (for remote access).",
|
|
@@ -22549,7 +23103,7 @@ export const introspectionData = [
|
|
|
22549
23103
|
},
|
|
22550
23104
|
{
|
|
22551
23105
|
"id": "servers.websocket",
|
|
22552
|
-
"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, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety.",
|
|
23106
|
+
"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, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety. Supports ask/reply semantics when paired with the Luca WebSocket client. The server can `ask(ws, type, data)` a connected client and await a typed response, or handle incoming asks from clients by listening for messages with a `requestId` and replying via `send(ws, { replyTo, data })`. Requests time out if no reply arrives within the configurable window.",
|
|
22553
23107
|
"shortcut": "servers.websocket",
|
|
22554
23108
|
"className": "WebsocketServer",
|
|
22555
23109
|
"methods": {
|
|
@@ -22584,6 +23138,64 @@ export const introspectionData = [
|
|
|
22584
23138
|
],
|
|
22585
23139
|
"returns": "void"
|
|
22586
23140
|
},
|
|
23141
|
+
"ask": {
|
|
23142
|
+
"description": "Send a request to a specific client and wait for a correlated response. The client is expected to reply with a message whose `replyTo` matches the `requestId` of this message.",
|
|
23143
|
+
"parameters": {
|
|
23144
|
+
"ws": {
|
|
23145
|
+
"type": "any",
|
|
23146
|
+
"description": "The WebSocket client to ask"
|
|
23147
|
+
},
|
|
23148
|
+
"type": {
|
|
23149
|
+
"type": "string",
|
|
23150
|
+
"description": "A string identifying the request type"
|
|
23151
|
+
},
|
|
23152
|
+
"data": {
|
|
23153
|
+
"type": "any",
|
|
23154
|
+
"description": "Optional payload"
|
|
23155
|
+
},
|
|
23156
|
+
"timeout": {
|
|
23157
|
+
"type": "any",
|
|
23158
|
+
"description": "How long to wait (default 10 000 ms)"
|
|
23159
|
+
}
|
|
23160
|
+
},
|
|
23161
|
+
"required": [
|
|
23162
|
+
"ws",
|
|
23163
|
+
"type"
|
|
23164
|
+
],
|
|
23165
|
+
"returns": "Promise<R>",
|
|
23166
|
+
"examples": [
|
|
23167
|
+
{
|
|
23168
|
+
"language": "ts",
|
|
23169
|
+
"code": "ws.on('connection', async (client) => {\n const info = await ws.ask(client, 'identify')\n console.log('Client says:', info)\n})"
|
|
23170
|
+
}
|
|
23171
|
+
]
|
|
23172
|
+
},
|
|
23173
|
+
"_handleReply": {
|
|
23174
|
+
"description": "",
|
|
23175
|
+
"parameters": {
|
|
23176
|
+
"message": {
|
|
23177
|
+
"type": "any",
|
|
23178
|
+
"description": "Parameter message"
|
|
23179
|
+
}
|
|
23180
|
+
},
|
|
23181
|
+
"required": [
|
|
23182
|
+
"message"
|
|
23183
|
+
],
|
|
23184
|
+
"returns": "boolean"
|
|
23185
|
+
},
|
|
23186
|
+
"_rejectAllPending": {
|
|
23187
|
+
"description": "",
|
|
23188
|
+
"parameters": {
|
|
23189
|
+
"reason": {
|
|
23190
|
+
"type": "string",
|
|
23191
|
+
"description": "Parameter reason"
|
|
23192
|
+
}
|
|
23193
|
+
},
|
|
23194
|
+
"required": [
|
|
23195
|
+
"reason"
|
|
23196
|
+
],
|
|
23197
|
+
"returns": "void"
|
|
23198
|
+
},
|
|
22587
23199
|
"start": {
|
|
22588
23200
|
"description": "Start the WebSocket server. A runtime `port` overrides the constructor option and is written to state before the underlying `ws.Server` is created, so the server binds to the correct port.",
|
|
22589
23201
|
"parameters": {
|
|
@@ -22630,7 +23242,7 @@ export const introspectionData = [
|
|
|
22630
23242
|
"examples": [
|
|
22631
23243
|
{
|
|
22632
23244
|
"language": "ts",
|
|
22633
|
-
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
|
|
23245
|
+
"code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})\n\n// ask/reply: request info from a connected client\nws.on('connection', async (client) => {\n const info = await ws.ask(client, 'identify')\n console.log('Client says:', info)\n})"
|
|
22634
23246
|
}
|
|
22635
23247
|
]
|
|
22636
23248
|
}
|
|
@@ -22986,6 +23598,10 @@ export const containerIntrospectionData = [
|
|
|
22986
23598
|
"description": "Returns a map of enabled feature shortcut IDs to their instances.",
|
|
22987
23599
|
"returns": "Partial<AvailableInstanceTypes<Features>>"
|
|
22988
23600
|
},
|
|
23601
|
+
"describer": {
|
|
23602
|
+
"description": "Lazy-initialized ContainerDescriber for introspecting registries, helpers, and members.",
|
|
23603
|
+
"returns": "ContainerDescriber"
|
|
23604
|
+
},
|
|
22989
23605
|
"context": {
|
|
22990
23606
|
"description": "The Container's context is an object that contains the enabled features, the container itself, and any additional context that has been added to the container. All helper instances that are created by the container will have access to the shared context.",
|
|
22991
23607
|
"returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
|