@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:57.079Z
|
|
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,26 +10355,222 @@ 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.supabase', {
|
|
10359
|
+
"id": "clients.supabase",
|
|
10360
|
+
"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).",
|
|
10361
|
+
"shortcut": "clients.supabase",
|
|
10362
|
+
"className": "SupabaseClient",
|
|
10117
10363
|
"methods": {
|
|
10118
|
-
"
|
|
10119
|
-
"description": "
|
|
10120
|
-
"parameters": {
|
|
10121
|
-
|
|
10364
|
+
"from": {
|
|
10365
|
+
"description": "Start a query on a Postgres table or view.",
|
|
10366
|
+
"parameters": {
|
|
10367
|
+
"table": {
|
|
10368
|
+
"type": "string",
|
|
10369
|
+
"description": "The table or view name to query"
|
|
10370
|
+
}
|
|
10371
|
+
},
|
|
10372
|
+
"required": [
|
|
10373
|
+
"table"
|
|
10374
|
+
],
|
|
10122
10375
|
"returns": "void"
|
|
10123
10376
|
},
|
|
10124
|
-
"
|
|
10125
|
-
"description": "
|
|
10126
|
-
"parameters": {
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10377
|
+
"rpc": {
|
|
10378
|
+
"description": "Call a Postgres function (RPC).",
|
|
10379
|
+
"parameters": {
|
|
10380
|
+
"fn": {
|
|
10381
|
+
"type": "string",
|
|
10382
|
+
"description": "The function name"
|
|
10383
|
+
},
|
|
10384
|
+
"params": {
|
|
10385
|
+
"type": "Record<string, unknown>",
|
|
10386
|
+
"description": "Arguments to pass to the function"
|
|
10387
|
+
},
|
|
10388
|
+
"options": {
|
|
10389
|
+
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
10390
|
+
"description": "Optional settings (head, get, count)"
|
|
10391
|
+
}
|
|
10392
|
+
},
|
|
10393
|
+
"required": [
|
|
10394
|
+
"fn"
|
|
10395
|
+
],
|
|
10396
|
+
"returns": "void"
|
|
10397
|
+
},
|
|
10398
|
+
"signInWithPassword": {
|
|
10399
|
+
"description": "Sign in with email and password.",
|
|
10400
|
+
"parameters": {
|
|
10401
|
+
"email": {
|
|
10402
|
+
"type": "string",
|
|
10403
|
+
"description": "Parameter email"
|
|
10404
|
+
},
|
|
10405
|
+
"password": {
|
|
10406
|
+
"type": "string",
|
|
10407
|
+
"description": "Parameter password"
|
|
10408
|
+
}
|
|
10409
|
+
},
|
|
10410
|
+
"required": [
|
|
10411
|
+
"email",
|
|
10412
|
+
"password"
|
|
10413
|
+
],
|
|
10414
|
+
"returns": "void"
|
|
10415
|
+
},
|
|
10416
|
+
"signUp": {
|
|
10417
|
+
"description": "Create a new user account with email and password.",
|
|
10418
|
+
"parameters": {
|
|
10419
|
+
"email": {
|
|
10420
|
+
"type": "string",
|
|
10421
|
+
"description": "Parameter email"
|
|
10422
|
+
},
|
|
10423
|
+
"password": {
|
|
10424
|
+
"type": "string",
|
|
10425
|
+
"description": "Parameter password"
|
|
10426
|
+
}
|
|
10427
|
+
},
|
|
10428
|
+
"required": [
|
|
10429
|
+
"email",
|
|
10430
|
+
"password"
|
|
10431
|
+
],
|
|
10432
|
+
"returns": "void"
|
|
10433
|
+
},
|
|
10434
|
+
"signOut": {
|
|
10435
|
+
"description": "Sign the current user out.",
|
|
10436
|
+
"parameters": {},
|
|
10437
|
+
"required": [],
|
|
10438
|
+
"returns": "void"
|
|
10439
|
+
},
|
|
10440
|
+
"getSession": {
|
|
10441
|
+
"description": "Get the current session, if any.",
|
|
10442
|
+
"parameters": {},
|
|
10443
|
+
"required": [],
|
|
10444
|
+
"returns": "void"
|
|
10445
|
+
},
|
|
10446
|
+
"getUser": {
|
|
10447
|
+
"description": "Get the current user, if any.",
|
|
10448
|
+
"parameters": {},
|
|
10449
|
+
"required": [],
|
|
10450
|
+
"returns": "void"
|
|
10451
|
+
},
|
|
10452
|
+
"invoke": {
|
|
10453
|
+
"description": "Invoke a Supabase Edge Function by name.",
|
|
10454
|
+
"parameters": {
|
|
10455
|
+
"name": {
|
|
10456
|
+
"type": "string",
|
|
10457
|
+
"description": "Parameter name"
|
|
10458
|
+
},
|
|
10459
|
+
"body": {
|
|
10460
|
+
"type": "any",
|
|
10461
|
+
"description": "Parameter body"
|
|
10462
|
+
}
|
|
10463
|
+
},
|
|
10464
|
+
"required": [
|
|
10465
|
+
"name"
|
|
10466
|
+
],
|
|
10467
|
+
"returns": "void"
|
|
10468
|
+
},
|
|
10469
|
+
"subscribe": {
|
|
10470
|
+
"description": "Subscribe to realtime changes on a Postgres table.",
|
|
10471
|
+
"parameters": {
|
|
10472
|
+
"channelName": {
|
|
10473
|
+
"type": "string",
|
|
10474
|
+
"description": "A name for this subscription channel"
|
|
10475
|
+
},
|
|
10476
|
+
"table": {
|
|
10477
|
+
"type": "string",
|
|
10478
|
+
"description": "The table to listen to"
|
|
10479
|
+
},
|
|
10480
|
+
"callback": {
|
|
10481
|
+
"type": "(payload: any) => void",
|
|
10482
|
+
"description": "Called with the payload on each change"
|
|
10483
|
+
},
|
|
10484
|
+
"event": {
|
|
10485
|
+
"type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
|
|
10486
|
+
"description": "The event type to listen for (default: all changes)"
|
|
10487
|
+
}
|
|
10488
|
+
},
|
|
10489
|
+
"required": [
|
|
10490
|
+
"channelName",
|
|
10491
|
+
"table",
|
|
10492
|
+
"callback"
|
|
10493
|
+
],
|
|
10494
|
+
"returns": "RealtimeChannel"
|
|
10495
|
+
},
|
|
10496
|
+
"unsubscribe": {
|
|
10497
|
+
"description": "Unsubscribe and remove a realtime channel by name.",
|
|
10498
|
+
"parameters": {
|
|
10499
|
+
"channelName": {
|
|
10500
|
+
"type": "string",
|
|
10501
|
+
"description": "The channel name to remove"
|
|
10502
|
+
}
|
|
10503
|
+
},
|
|
10504
|
+
"required": [
|
|
10505
|
+
"channelName"
|
|
10506
|
+
],
|
|
10507
|
+
"returns": "void"
|
|
10508
|
+
},
|
|
10509
|
+
"unsubscribeAll": {
|
|
10510
|
+
"description": "Unsubscribe and remove all realtime channels.",
|
|
10511
|
+
"parameters": {},
|
|
10512
|
+
"required": [],
|
|
10513
|
+
"returns": "void"
|
|
10514
|
+
},
|
|
10515
|
+
"connect": {
|
|
10516
|
+
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
10517
|
+
"parameters": {},
|
|
10518
|
+
"required": [],
|
|
10519
|
+
"returns": "void"
|
|
10520
|
+
},
|
|
10521
|
+
"disconnect": {
|
|
10522
|
+
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
10523
|
+
"parameters": {},
|
|
10524
|
+
"required": [],
|
|
10525
|
+
"returns": "void"
|
|
10526
|
+
}
|
|
10527
|
+
},
|
|
10528
|
+
"getters": {
|
|
10529
|
+
"sdk": {
|
|
10530
|
+
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
10531
|
+
"returns": "SupabaseSDKClient<any, any>"
|
|
10532
|
+
},
|
|
10533
|
+
"storage": {
|
|
10534
|
+
"description": "Returns the Supabase Storage client for managing buckets and files.",
|
|
10535
|
+
"returns": "any"
|
|
10536
|
+
},
|
|
10537
|
+
"functions": {
|
|
10538
|
+
"description": "Returns the Supabase Functions client.",
|
|
10539
|
+
"returns": "any"
|
|
10540
|
+
}
|
|
10541
|
+
},
|
|
10542
|
+
"events": {},
|
|
10543
|
+
"state": {},
|
|
10544
|
+
"options": {},
|
|
10545
|
+
"envVars": [],
|
|
10546
|
+
"examples": [
|
|
10547
|
+
{
|
|
10548
|
+
"language": "ts",
|
|
10549
|
+
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
10550
|
+
}
|
|
10551
|
+
]
|
|
10552
|
+
});
|
|
10553
|
+
|
|
10554
|
+
setBuildTimeData('clients.elevenlabs', {
|
|
10555
|
+
"id": "clients.elevenlabs",
|
|
10556
|
+
"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.",
|
|
10557
|
+
"shortcut": "clients.elevenlabs",
|
|
10558
|
+
"className": "ElevenLabsClient",
|
|
10559
|
+
"methods": {
|
|
10560
|
+
"beforeRequest": {
|
|
10561
|
+
"description": "Inject the xi-api-key header before each request.",
|
|
10562
|
+
"parameters": {},
|
|
10563
|
+
"required": [],
|
|
10564
|
+
"returns": "void"
|
|
10565
|
+
},
|
|
10566
|
+
"connect": {
|
|
10567
|
+
"description": "Validate the API key by listing available models.",
|
|
10568
|
+
"parameters": {},
|
|
10569
|
+
"required": [],
|
|
10570
|
+
"returns": "Promise<this>",
|
|
10571
|
+
"examples": [
|
|
10572
|
+
{
|
|
10573
|
+
"language": "ts",
|
|
10132
10574
|
"code": "await el.connect()"
|
|
10133
10575
|
}
|
|
10134
10576
|
]
|
|
@@ -10311,243 +10753,47 @@ setBuildTimeData('clients.elevenlabs', {
|
|
|
10311
10753
|
]
|
|
10312
10754
|
});
|
|
10313
10755
|
|
|
10314
|
-
setBuildTimeData('clients.
|
|
10315
|
-
"id": "clients.
|
|
10316
|
-
"description": "
|
|
10317
|
-
"shortcut": "clients.
|
|
10318
|
-
"className": "
|
|
10756
|
+
setBuildTimeData('clients.comfyui', {
|
|
10757
|
+
"id": "clients.comfyui",
|
|
10758
|
+
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
10759
|
+
"shortcut": "clients.comfyui",
|
|
10760
|
+
"className": "ComfyUIClient",
|
|
10319
10761
|
"methods": {
|
|
10320
|
-
"
|
|
10321
|
-
"description": "
|
|
10762
|
+
"queuePrompt": {
|
|
10763
|
+
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
10322
10764
|
"parameters": {
|
|
10323
|
-
"
|
|
10765
|
+
"prompt": {
|
|
10766
|
+
"type": "Record<string, any>",
|
|
10767
|
+
"description": "The API-format workflow object"
|
|
10768
|
+
},
|
|
10769
|
+
"clientId": {
|
|
10324
10770
|
"type": "string",
|
|
10325
|
-
"description": "
|
|
10771
|
+
"description": "Override the client ID for this request"
|
|
10326
10772
|
}
|
|
10327
10773
|
},
|
|
10328
10774
|
"required": [
|
|
10329
|
-
"
|
|
10775
|
+
"prompt"
|
|
10330
10776
|
],
|
|
10331
|
-
"returns": "
|
|
10777
|
+
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
10778
|
+
"examples": [
|
|
10779
|
+
{
|
|
10780
|
+
"language": "ts",
|
|
10781
|
+
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
10782
|
+
}
|
|
10783
|
+
]
|
|
10332
10784
|
},
|
|
10333
|
-
"
|
|
10334
|
-
"description": "
|
|
10785
|
+
"getQueue": {
|
|
10786
|
+
"description": "Get the current prompt queue status.",
|
|
10787
|
+
"parameters": {},
|
|
10788
|
+
"required": [],
|
|
10789
|
+
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
10790
|
+
},
|
|
10791
|
+
"getHistory": {
|
|
10792
|
+
"description": "Get execution history, optionally for a specific prompt.",
|
|
10335
10793
|
"parameters": {
|
|
10336
|
-
"
|
|
10794
|
+
"promptId": {
|
|
10337
10795
|
"type": "string",
|
|
10338
|
-
"description": "
|
|
10339
|
-
},
|
|
10340
|
-
"params": {
|
|
10341
|
-
"type": "Record<string, unknown>",
|
|
10342
|
-
"description": "Arguments to pass to the function"
|
|
10343
|
-
},
|
|
10344
|
-
"options": {
|
|
10345
|
-
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
10346
|
-
"description": "Optional settings (head, get, count)"
|
|
10347
|
-
}
|
|
10348
|
-
},
|
|
10349
|
-
"required": [
|
|
10350
|
-
"fn"
|
|
10351
|
-
],
|
|
10352
|
-
"returns": "void"
|
|
10353
|
-
},
|
|
10354
|
-
"signInWithPassword": {
|
|
10355
|
-
"description": "Sign in with email and password.",
|
|
10356
|
-
"parameters": {
|
|
10357
|
-
"email": {
|
|
10358
|
-
"type": "string",
|
|
10359
|
-
"description": "Parameter email"
|
|
10360
|
-
},
|
|
10361
|
-
"password": {
|
|
10362
|
-
"type": "string",
|
|
10363
|
-
"description": "Parameter password"
|
|
10364
|
-
}
|
|
10365
|
-
},
|
|
10366
|
-
"required": [
|
|
10367
|
-
"email",
|
|
10368
|
-
"password"
|
|
10369
|
-
],
|
|
10370
|
-
"returns": "void"
|
|
10371
|
-
},
|
|
10372
|
-
"signUp": {
|
|
10373
|
-
"description": "Create a new user account with email and password.",
|
|
10374
|
-
"parameters": {
|
|
10375
|
-
"email": {
|
|
10376
|
-
"type": "string",
|
|
10377
|
-
"description": "Parameter email"
|
|
10378
|
-
},
|
|
10379
|
-
"password": {
|
|
10380
|
-
"type": "string",
|
|
10381
|
-
"description": "Parameter password"
|
|
10382
|
-
}
|
|
10383
|
-
},
|
|
10384
|
-
"required": [
|
|
10385
|
-
"email",
|
|
10386
|
-
"password"
|
|
10387
|
-
],
|
|
10388
|
-
"returns": "void"
|
|
10389
|
-
},
|
|
10390
|
-
"signOut": {
|
|
10391
|
-
"description": "Sign the current user out.",
|
|
10392
|
-
"parameters": {},
|
|
10393
|
-
"required": [],
|
|
10394
|
-
"returns": "void"
|
|
10395
|
-
},
|
|
10396
|
-
"getSession": {
|
|
10397
|
-
"description": "Get the current session, if any.",
|
|
10398
|
-
"parameters": {},
|
|
10399
|
-
"required": [],
|
|
10400
|
-
"returns": "void"
|
|
10401
|
-
},
|
|
10402
|
-
"getUser": {
|
|
10403
|
-
"description": "Get the current user, if any.",
|
|
10404
|
-
"parameters": {},
|
|
10405
|
-
"required": [],
|
|
10406
|
-
"returns": "void"
|
|
10407
|
-
},
|
|
10408
|
-
"invoke": {
|
|
10409
|
-
"description": "Invoke a Supabase Edge Function by name.",
|
|
10410
|
-
"parameters": {
|
|
10411
|
-
"name": {
|
|
10412
|
-
"type": "string",
|
|
10413
|
-
"description": "Parameter name"
|
|
10414
|
-
},
|
|
10415
|
-
"body": {
|
|
10416
|
-
"type": "any",
|
|
10417
|
-
"description": "Parameter body"
|
|
10418
|
-
}
|
|
10419
|
-
},
|
|
10420
|
-
"required": [
|
|
10421
|
-
"name"
|
|
10422
|
-
],
|
|
10423
|
-
"returns": "void"
|
|
10424
|
-
},
|
|
10425
|
-
"subscribe": {
|
|
10426
|
-
"description": "Subscribe to realtime changes on a Postgres table.",
|
|
10427
|
-
"parameters": {
|
|
10428
|
-
"channelName": {
|
|
10429
|
-
"type": "string",
|
|
10430
|
-
"description": "A name for this subscription channel"
|
|
10431
|
-
},
|
|
10432
|
-
"table": {
|
|
10433
|
-
"type": "string",
|
|
10434
|
-
"description": "The table to listen to"
|
|
10435
|
-
},
|
|
10436
|
-
"callback": {
|
|
10437
|
-
"type": "(payload: any) => void",
|
|
10438
|
-
"description": "Called with the payload on each change"
|
|
10439
|
-
},
|
|
10440
|
-
"event": {
|
|
10441
|
-
"type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
|
|
10442
|
-
"description": "The event type to listen for (default: all changes)"
|
|
10443
|
-
}
|
|
10444
|
-
},
|
|
10445
|
-
"required": [
|
|
10446
|
-
"channelName",
|
|
10447
|
-
"table",
|
|
10448
|
-
"callback"
|
|
10449
|
-
],
|
|
10450
|
-
"returns": "RealtimeChannel"
|
|
10451
|
-
},
|
|
10452
|
-
"unsubscribe": {
|
|
10453
|
-
"description": "Unsubscribe and remove a realtime channel by name.",
|
|
10454
|
-
"parameters": {
|
|
10455
|
-
"channelName": {
|
|
10456
|
-
"type": "string",
|
|
10457
|
-
"description": "The channel name to remove"
|
|
10458
|
-
}
|
|
10459
|
-
},
|
|
10460
|
-
"required": [
|
|
10461
|
-
"channelName"
|
|
10462
|
-
],
|
|
10463
|
-
"returns": "void"
|
|
10464
|
-
},
|
|
10465
|
-
"unsubscribeAll": {
|
|
10466
|
-
"description": "Unsubscribe and remove all realtime channels.",
|
|
10467
|
-
"parameters": {},
|
|
10468
|
-
"required": [],
|
|
10469
|
-
"returns": "void"
|
|
10470
|
-
},
|
|
10471
|
-
"connect": {
|
|
10472
|
-
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
10473
|
-
"parameters": {},
|
|
10474
|
-
"required": [],
|
|
10475
|
-
"returns": "void"
|
|
10476
|
-
},
|
|
10477
|
-
"disconnect": {
|
|
10478
|
-
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
10479
|
-
"parameters": {},
|
|
10480
|
-
"required": [],
|
|
10481
|
-
"returns": "void"
|
|
10482
|
-
}
|
|
10483
|
-
},
|
|
10484
|
-
"getters": {
|
|
10485
|
-
"sdk": {
|
|
10486
|
-
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
10487
|
-
"returns": "SupabaseSDKClient<any, any>"
|
|
10488
|
-
},
|
|
10489
|
-
"storage": {
|
|
10490
|
-
"description": "Returns the Supabase Storage client for managing buckets and files.",
|
|
10491
|
-
"returns": "any"
|
|
10492
|
-
},
|
|
10493
|
-
"functions": {
|
|
10494
|
-
"description": "Returns the Supabase Functions client.",
|
|
10495
|
-
"returns": "any"
|
|
10496
|
-
}
|
|
10497
|
-
},
|
|
10498
|
-
"events": {},
|
|
10499
|
-
"state": {},
|
|
10500
|
-
"options": {},
|
|
10501
|
-
"envVars": [],
|
|
10502
|
-
"examples": [
|
|
10503
|
-
{
|
|
10504
|
-
"language": "ts",
|
|
10505
|
-
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
10506
|
-
}
|
|
10507
|
-
]
|
|
10508
|
-
});
|
|
10509
|
-
|
|
10510
|
-
setBuildTimeData('clients.comfyui', {
|
|
10511
|
-
"id": "clients.comfyui",
|
|
10512
|
-
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
10513
|
-
"shortcut": "clients.comfyui",
|
|
10514
|
-
"className": "ComfyUIClient",
|
|
10515
|
-
"methods": {
|
|
10516
|
-
"queuePrompt": {
|
|
10517
|
-
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
10518
|
-
"parameters": {
|
|
10519
|
-
"prompt": {
|
|
10520
|
-
"type": "Record<string, any>",
|
|
10521
|
-
"description": "The API-format workflow object"
|
|
10522
|
-
},
|
|
10523
|
-
"clientId": {
|
|
10524
|
-
"type": "string",
|
|
10525
|
-
"description": "Override the client ID for this request"
|
|
10526
|
-
}
|
|
10527
|
-
},
|
|
10528
|
-
"required": [
|
|
10529
|
-
"prompt"
|
|
10530
|
-
],
|
|
10531
|
-
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
10532
|
-
"examples": [
|
|
10533
|
-
{
|
|
10534
|
-
"language": "ts",
|
|
10535
|
-
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
10536
|
-
}
|
|
10537
|
-
]
|
|
10538
|
-
},
|
|
10539
|
-
"getQueue": {
|
|
10540
|
-
"description": "Get the current prompt queue status.",
|
|
10541
|
-
"parameters": {},
|
|
10542
|
-
"required": [],
|
|
10543
|
-
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
10544
|
-
},
|
|
10545
|
-
"getHistory": {
|
|
10546
|
-
"description": "Get execution history, optionally for a specific prompt.",
|
|
10547
|
-
"parameters": {
|
|
10548
|
-
"promptId": {
|
|
10549
|
-
"type": "string",
|
|
10550
|
-
"description": "If provided, returns history for this prompt only"
|
|
10796
|
+
"description": "If provided, returns history for this prompt only"
|
|
10551
10797
|
}
|
|
10552
10798
|
},
|
|
10553
10799
|
"required": [],
|
|
@@ -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
|
});
|
|
@@ -11978,16 +12282,47 @@ setBuildTimeData('features.assistant', {
|
|
|
11978
12282
|
"required": [],
|
|
11979
12283
|
"returns": "void"
|
|
11980
12284
|
},
|
|
11981
|
-
"
|
|
11982
|
-
"description": "
|
|
12285
|
+
"addSystemPromptExtension": {
|
|
12286
|
+
"description": "Add or update a named system prompt extension. The value is appended to the base system prompt when passed to the conversation.",
|
|
11983
12287
|
"parameters": {
|
|
11984
|
-
"
|
|
11985
|
-
"type": "
|
|
11986
|
-
"description": "
|
|
12288
|
+
"key": {
|
|
12289
|
+
"type": "string",
|
|
12290
|
+
"description": "A unique identifier for this extension"
|
|
12291
|
+
},
|
|
12292
|
+
"value": {
|
|
12293
|
+
"type": "string",
|
|
12294
|
+
"description": "The text to append"
|
|
11987
12295
|
}
|
|
11988
12296
|
},
|
|
11989
12297
|
"required": [
|
|
11990
|
-
"
|
|
12298
|
+
"key",
|
|
12299
|
+
"value"
|
|
12300
|
+
],
|
|
12301
|
+
"returns": "this"
|
|
12302
|
+
},
|
|
12303
|
+
"removeSystemPromptExtension": {
|
|
12304
|
+
"description": "Remove a named system prompt extension.",
|
|
12305
|
+
"parameters": {
|
|
12306
|
+
"key": {
|
|
12307
|
+
"type": "string",
|
|
12308
|
+
"description": "The identifier of the extension to remove"
|
|
12309
|
+
}
|
|
12310
|
+
},
|
|
12311
|
+
"required": [
|
|
12312
|
+
"key"
|
|
12313
|
+
],
|
|
12314
|
+
"returns": "this"
|
|
12315
|
+
},
|
|
12316
|
+
"use": {
|
|
12317
|
+
"description": "Apply a setup function or a Helper instance to this assistant. When passed a function, it receives the assistant and can configure tools, hooks, event listeners, etc. When passed a Helper instance that exposes tools via toTools(), those tools are automatically added to this assistant.",
|
|
12318
|
+
"parameters": {
|
|
12319
|
+
"fnOrHelper": {
|
|
12320
|
+
"type": "((assistant: this) => void | Promise<void>) | { toTools: () => { schemas: Record<string, z.ZodType>, handlers: Record<string, Function> } } | { schemas: Record<string, z.ZodType>, handlers: Record<string, Function> }",
|
|
12321
|
+
"description": "Setup function or Helper instance"
|
|
12322
|
+
}
|
|
12323
|
+
},
|
|
12324
|
+
"required": [
|
|
12325
|
+
"fnOrHelper"
|
|
11991
12326
|
],
|
|
11992
12327
|
"returns": "this",
|
|
11993
12328
|
"examples": [
|
|
@@ -12248,6 +12583,14 @@ setBuildTimeData('features.assistant', {
|
|
|
12248
12583
|
"description": "The current system prompt text.",
|
|
12249
12584
|
"returns": "string"
|
|
12250
12585
|
},
|
|
12586
|
+
"systemPromptExtensions": {
|
|
12587
|
+
"description": "The named extensions appended to the system prompt.",
|
|
12588
|
+
"returns": "Record<string, string>"
|
|
12589
|
+
},
|
|
12590
|
+
"effectiveSystemPrompt": {
|
|
12591
|
+
"description": "The system prompt with all extensions appended. This is the value passed to the conversation.",
|
|
12592
|
+
"returns": "string"
|
|
12593
|
+
},
|
|
12251
12594
|
"tools": {
|
|
12252
12595
|
"description": "The tools registered with this assistant.",
|
|
12253
12596
|
"returns": "Record<string, ConversationTool>"
|
|
@@ -12291,6 +12634,11 @@ setBuildTimeData('features.assistant', {
|
|
|
12291
12634
|
"description": "Event emitted by Assistant",
|
|
12292
12635
|
"arguments": {}
|
|
12293
12636
|
},
|
|
12637
|
+
"systemPromptExtensionsChanged": {
|
|
12638
|
+
"name": "systemPromptExtensionsChanged",
|
|
12639
|
+
"description": "Event emitted by Assistant",
|
|
12640
|
+
"arguments": {}
|
|
12641
|
+
},
|
|
12294
12642
|
"toolsChanged": {
|
|
12295
12643
|
"name": "toolsChanged",
|
|
12296
12644
|
"description": "Event emitted by Assistant",
|
|
@@ -13960,6 +14308,10 @@ setContainerBuildTimeData('Container', {
|
|
|
13960
14308
|
"description": "Returns a map of enabled feature shortcut IDs to their instances.",
|
|
13961
14309
|
"returns": "Partial<AvailableInstanceTypes<Features>>"
|
|
13962
14310
|
},
|
|
14311
|
+
"describer": {
|
|
14312
|
+
"description": "Lazy-initialized ContainerDescriber for introspecting registries, helpers, and members.",
|
|
14313
|
+
"returns": "ContainerDescriber"
|
|
14314
|
+
},
|
|
13963
14315
|
"context": {
|
|
13964
14316
|
"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.",
|
|
13965
14317
|
"returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
|
|
@@ -15611,7 +15963,7 @@ export const introspectionData = [
|
|
|
15611
15963
|
},
|
|
15612
15964
|
{
|
|
15613
15965
|
"id": "features.windowManager",
|
|
15614
|
-
"description": "WindowManager Feature — Native window control via LucaVoiceLauncher
|
|
15966
|
+
"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).",
|
|
15615
15967
|
"shortcut": "features.windowManager",
|
|
15616
15968
|
"className": "WindowManager",
|
|
15617
15969
|
"methods": {
|
|
@@ -15627,7 +15979,18 @@ export const introspectionData = [
|
|
|
15627
15979
|
"returns": "Promise<this>"
|
|
15628
15980
|
},
|
|
15629
15981
|
"listen": {
|
|
15630
|
-
"description": "Start
|
|
15982
|
+
"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.",
|
|
15983
|
+
"parameters": {
|
|
15984
|
+
"socketPath": {
|
|
15985
|
+
"type": "string",
|
|
15986
|
+
"description": "Override the configured app socket path"
|
|
15987
|
+
}
|
|
15988
|
+
},
|
|
15989
|
+
"required": [],
|
|
15990
|
+
"returns": "Promise<this>"
|
|
15991
|
+
},
|
|
15992
|
+
"cleanupSocket": {
|
|
15993
|
+
"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.",
|
|
15631
15994
|
"parameters": {
|
|
15632
15995
|
"socketPath": {
|
|
15633
15996
|
"type": "string",
|
|
@@ -15635,10 +15998,10 @@ export const introspectionData = [
|
|
|
15635
15998
|
}
|
|
15636
15999
|
},
|
|
15637
16000
|
"required": [],
|
|
15638
|
-
"returns": "
|
|
16001
|
+
"returns": "Promise<boolean>"
|
|
15639
16002
|
},
|
|
15640
16003
|
"stop": {
|
|
15641
|
-
"description": "Stop the
|
|
16004
|
+
"description": "Stop the window manager and clean up all connections. Rejects any pending window operation requests.",
|
|
15642
16005
|
"parameters": {},
|
|
15643
16006
|
"required": [],
|
|
15644
16007
|
"returns": "Promise<this>"
|
|
@@ -15911,7 +16274,7 @@ export const introspectionData = [
|
|
|
15911
16274
|
]
|
|
15912
16275
|
},
|
|
15913
16276
|
"send": {
|
|
15914
|
-
"description": "Write an NDJSON message to the connected app client. Public so other features can send arbitrary protocol messages over the same socket.",
|
|
16277
|
+
"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.",
|
|
15915
16278
|
"parameters": {
|
|
15916
16279
|
"msg": {
|
|
15917
16280
|
"type": "Record<string, any>",
|
|
@@ -15925,12 +16288,20 @@ export const introspectionData = [
|
|
|
15925
16288
|
}
|
|
15926
16289
|
},
|
|
15927
16290
|
"getters": {
|
|
16291
|
+
"isBroker": {
|
|
16292
|
+
"description": "Whether this instance is acting as the broker.",
|
|
16293
|
+
"returns": "boolean"
|
|
16294
|
+
},
|
|
16295
|
+
"isProducer": {
|
|
16296
|
+
"description": "Whether this instance is acting as a producer.",
|
|
16297
|
+
"returns": "boolean"
|
|
16298
|
+
},
|
|
15928
16299
|
"isListening": {
|
|
15929
|
-
"description": "Whether the IPC server is currently listening.",
|
|
16300
|
+
"description": "Whether the IPC server is currently listening (broker) or connected to broker (producer).",
|
|
15930
16301
|
"returns": "boolean"
|
|
15931
16302
|
},
|
|
15932
16303
|
"isClientConnected": {
|
|
15933
|
-
"description": "Whether the native app client is currently connected.",
|
|
16304
|
+
"description": "Whether the native app client is currently connected (only meaningful for broker).",
|
|
15934
16305
|
"returns": "boolean"
|
|
15935
16306
|
}
|
|
15936
16307
|
},
|
|
@@ -15965,6 +16336,11 @@ export const introspectionData = [
|
|
|
15965
16336
|
"description": "Event emitted by WindowManager",
|
|
15966
16337
|
"arguments": {}
|
|
15967
16338
|
},
|
|
16339
|
+
"windowFocus": {
|
|
16340
|
+
"name": "windowFocus",
|
|
16341
|
+
"description": "Event emitted by WindowManager",
|
|
16342
|
+
"arguments": {}
|
|
16343
|
+
},
|
|
15968
16344
|
"message": {
|
|
15969
16345
|
"name": "message",
|
|
15970
16346
|
"description": "Event emitted by WindowManager",
|
|
@@ -19364,6 +19740,23 @@ export const introspectionData = [
|
|
|
19364
19740
|
}
|
|
19365
19741
|
]
|
|
19366
19742
|
},
|
|
19743
|
+
"readFileSync": {
|
|
19744
|
+
"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",
|
|
19745
|
+
"parameters": {
|
|
19746
|
+
"path": {
|
|
19747
|
+
"type": "string",
|
|
19748
|
+
"description": "Parameter path"
|
|
19749
|
+
},
|
|
19750
|
+
"encoding": {
|
|
19751
|
+
"type": "BufferEncoding | null",
|
|
19752
|
+
"description": "Parameter encoding"
|
|
19753
|
+
}
|
|
19754
|
+
},
|
|
19755
|
+
"required": [
|
|
19756
|
+
"path"
|
|
19757
|
+
],
|
|
19758
|
+
"returns": "string | Buffer"
|
|
19759
|
+
},
|
|
19367
19760
|
"readFileAsync": {
|
|
19368
19761
|
"description": "Asynchronously reads a file and returns its contents as a string.",
|
|
19369
19762
|
"parameters": {
|
|
@@ -19406,6 +19799,19 @@ export const introspectionData = [
|
|
|
19406
19799
|
}
|
|
19407
19800
|
]
|
|
19408
19801
|
},
|
|
19802
|
+
"readJsonSync": {
|
|
19803
|
+
"description": "Read and parse a JSON file synchronously",
|
|
19804
|
+
"parameters": {
|
|
19805
|
+
"path": {
|
|
19806
|
+
"type": "string",
|
|
19807
|
+
"description": "Parameter path"
|
|
19808
|
+
}
|
|
19809
|
+
},
|
|
19810
|
+
"required": [
|
|
19811
|
+
"path"
|
|
19812
|
+
],
|
|
19813
|
+
"returns": "void"
|
|
19814
|
+
},
|
|
19409
19815
|
"readJsonAsync": {
|
|
19410
19816
|
"description": "Asynchronously reads and parses a JSON file.",
|
|
19411
19817
|
"parameters": {
|
|
@@ -20258,7 +20664,7 @@ export const introspectionData = [
|
|
|
20258
20664
|
},
|
|
20259
20665
|
{
|
|
20260
20666
|
"id": "features.ipcSocket",
|
|
20261
|
-
"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:** -
|
|
20667
|
+
"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 }); }); ```",
|
|
20262
20668
|
"shortcut": "features.ipcSocket",
|
|
20263
20669
|
"className": "IpcSocket",
|
|
20264
20670
|
"methods": {
|
|
@@ -20298,61 +20704,127 @@ export const introspectionData = [
|
|
|
20298
20704
|
]
|
|
20299
20705
|
},
|
|
20300
20706
|
"broadcast": {
|
|
20301
|
-
"description": "Broadcasts a message to all connected clients (server mode only).
|
|
20707
|
+
"description": "Broadcasts a message to all connected clients (server mode only).",
|
|
20302
20708
|
"parameters": {
|
|
20303
20709
|
"message": {
|
|
20304
20710
|
"type": "any",
|
|
20305
|
-
"description": "The message object to broadcast
|
|
20711
|
+
"description": "The message object to broadcast"
|
|
20712
|
+
},
|
|
20713
|
+
"exclude": {
|
|
20714
|
+
"type": "string",
|
|
20715
|
+
"description": "Optional client ID to exclude from broadcast"
|
|
20306
20716
|
}
|
|
20307
20717
|
},
|
|
20308
20718
|
"required": [
|
|
20309
20719
|
"message"
|
|
20310
20720
|
],
|
|
20311
|
-
"returns": "void"
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20721
|
+
"returns": "void"
|
|
20722
|
+
},
|
|
20723
|
+
"sendTo": {
|
|
20724
|
+
"description": "Sends a message to a specific client by ID (server mode only).",
|
|
20725
|
+
"parameters": {
|
|
20726
|
+
"clientId": {
|
|
20727
|
+
"type": "string",
|
|
20728
|
+
"description": "The target client ID"
|
|
20729
|
+
},
|
|
20730
|
+
"message": {
|
|
20731
|
+
"type": "any",
|
|
20732
|
+
"description": "The message to send"
|
|
20316
20733
|
}
|
|
20317
|
-
|
|
20734
|
+
},
|
|
20735
|
+
"required": [
|
|
20736
|
+
"clientId",
|
|
20737
|
+
"message"
|
|
20738
|
+
],
|
|
20739
|
+
"returns": "boolean"
|
|
20318
20740
|
},
|
|
20319
20741
|
"send": {
|
|
20320
|
-
"description": "
|
|
20742
|
+
"description": "Fire-and-forget: sends a message to the server (client mode only). For server→client, use sendTo() or broadcast().",
|
|
20321
20743
|
"parameters": {
|
|
20322
20744
|
"message": {
|
|
20323
20745
|
"type": "any",
|
|
20324
|
-
"description": "The message
|
|
20746
|
+
"description": "The message to send"
|
|
20325
20747
|
}
|
|
20326
20748
|
},
|
|
20327
20749
|
"required": [
|
|
20328
20750
|
"message"
|
|
20329
20751
|
],
|
|
20330
|
-
"returns": "void"
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
|
|
20752
|
+
"returns": "void"
|
|
20753
|
+
},
|
|
20754
|
+
"ask": {
|
|
20755
|
+
"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.",
|
|
20756
|
+
"parameters": {
|
|
20757
|
+
"message": {
|
|
20758
|
+
"type": "any",
|
|
20759
|
+
"description": "The message to send"
|
|
20760
|
+
},
|
|
20761
|
+
"options": {
|
|
20762
|
+
"type": "{ clientId?: string; timeoutMs?: number }",
|
|
20763
|
+
"description": "Optional: clientId (server mode target), timeoutMs"
|
|
20335
20764
|
}
|
|
20336
|
-
|
|
20765
|
+
},
|
|
20766
|
+
"required": [
|
|
20767
|
+
"message"
|
|
20768
|
+
],
|
|
20769
|
+
"returns": "Promise<any>"
|
|
20770
|
+
},
|
|
20771
|
+
"reply": {
|
|
20772
|
+
"description": "Sends a reply to a previous ask() call, correlated by requestId.",
|
|
20773
|
+
"parameters": {
|
|
20774
|
+
"requestId": {
|
|
20775
|
+
"type": "string",
|
|
20776
|
+
"description": "The requestId from the incoming message"
|
|
20777
|
+
},
|
|
20778
|
+
"data": {
|
|
20779
|
+
"type": "any",
|
|
20780
|
+
"description": "The reply payload"
|
|
20781
|
+
},
|
|
20782
|
+
"clientId": {
|
|
20783
|
+
"type": "string",
|
|
20784
|
+
"description": "Target client (server mode; for client mode, omit)"
|
|
20785
|
+
}
|
|
20786
|
+
},
|
|
20787
|
+
"required": [
|
|
20788
|
+
"requestId",
|
|
20789
|
+
"data"
|
|
20790
|
+
],
|
|
20791
|
+
"returns": "void"
|
|
20337
20792
|
},
|
|
20338
20793
|
"connect": {
|
|
20339
|
-
"description": "Connects to an IPC server at the specified socket path (client mode).
|
|
20794
|
+
"description": "Connects to an IPC server at the specified socket path (client mode).",
|
|
20340
20795
|
"parameters": {
|
|
20341
20796
|
"socketPath": {
|
|
20342
20797
|
"type": "string",
|
|
20343
|
-
"description": "
|
|
20798
|
+
"description": "Path to the server's Unix domain socket"
|
|
20799
|
+
},
|
|
20800
|
+
"options": {
|
|
20801
|
+
"type": "{ reconnect?: boolean; name?: string }",
|
|
20802
|
+
"description": "Optional: reconnect (enable auto-reconnect), name (identify this client)"
|
|
20344
20803
|
}
|
|
20345
20804
|
},
|
|
20346
20805
|
"required": [
|
|
20347
20806
|
"socketPath"
|
|
20348
20807
|
],
|
|
20349
|
-
"returns": "Promise<Socket>"
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20808
|
+
"returns": "Promise<Socket>"
|
|
20809
|
+
},
|
|
20810
|
+
"disconnect": {
|
|
20811
|
+
"description": "Disconnects the client and stops any reconnection attempts.",
|
|
20812
|
+
"parameters": {},
|
|
20813
|
+
"required": [],
|
|
20814
|
+
"returns": "void"
|
|
20815
|
+
},
|
|
20816
|
+
"probeSocket": {
|
|
20817
|
+
"description": "Probe an existing socket to see if a live listener is behind it. Attempts a quick connect — if it succeeds, someone is listening.",
|
|
20818
|
+
"parameters": {
|
|
20819
|
+
"socketPath": {
|
|
20820
|
+
"type": "string",
|
|
20821
|
+
"description": "Parameter socketPath"
|
|
20354
20822
|
}
|
|
20355
|
-
|
|
20823
|
+
},
|
|
20824
|
+
"required": [
|
|
20825
|
+
"socketPath"
|
|
20826
|
+
],
|
|
20827
|
+
"returns": "Promise<boolean>"
|
|
20356
20828
|
}
|
|
20357
20829
|
},
|
|
20358
20830
|
"getters": {
|
|
@@ -20364,12 +20836,25 @@ export const introspectionData = [
|
|
|
20364
20836
|
"description": "Checks if the IPC socket is operating in server mode.",
|
|
20365
20837
|
"returns": "any"
|
|
20366
20838
|
},
|
|
20839
|
+
"clientCount": {
|
|
20840
|
+
"description": "Returns the number of currently connected clients (server mode).",
|
|
20841
|
+
"returns": "any"
|
|
20842
|
+
},
|
|
20843
|
+
"connectedClients": {
|
|
20844
|
+
"description": "Returns info about all connected clients (server mode).",
|
|
20845
|
+
"returns": "Array<{ id: string; name?: string; connectedAt: number }>"
|
|
20846
|
+
},
|
|
20367
20847
|
"connection": {
|
|
20368
20848
|
"description": "Gets the current client connection socket.",
|
|
20369
20849
|
"returns": "any"
|
|
20370
20850
|
}
|
|
20371
20851
|
},
|
|
20372
20852
|
"events": {
|
|
20853
|
+
"disconnection": {
|
|
20854
|
+
"name": "disconnection",
|
|
20855
|
+
"description": "Event emitted by IpcSocket",
|
|
20856
|
+
"arguments": {}
|
|
20857
|
+
},
|
|
20373
20858
|
"connection": {
|
|
20374
20859
|
"name": "connection",
|
|
20375
20860
|
"description": "Event emitted by IpcSocket",
|
|
@@ -21284,10 +21769,68 @@ export const introspectionData = [
|
|
|
21284
21769
|
},
|
|
21285
21770
|
{
|
|
21286
21771
|
"id": "features.processManager",
|
|
21287
|
-
"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.",
|
|
21772
|
+
"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.",
|
|
21288
21773
|
"shortcut": "features.processManager",
|
|
21289
21774
|
"className": "ProcessManager",
|
|
21290
21775
|
"methods": {
|
|
21776
|
+
"spawnProcess": {
|
|
21777
|
+
"description": "Tool handler: spawn a long-running background process.",
|
|
21778
|
+
"parameters": {
|
|
21779
|
+
"args": {
|
|
21780
|
+
"type": "{ command: string; args?: string; tag?: string; cwd?: string }",
|
|
21781
|
+
"description": "Parameter args"
|
|
21782
|
+
}
|
|
21783
|
+
},
|
|
21784
|
+
"required": [
|
|
21785
|
+
"args"
|
|
21786
|
+
],
|
|
21787
|
+
"returns": "void"
|
|
21788
|
+
},
|
|
21789
|
+
"runCommand": {
|
|
21790
|
+
"description": "Tool handler: run a command to completion and return its output.",
|
|
21791
|
+
"parameters": {
|
|
21792
|
+
"args": {
|
|
21793
|
+
"type": "{ command: string; cwd?: string }",
|
|
21794
|
+
"description": "Parameter args"
|
|
21795
|
+
}
|
|
21796
|
+
},
|
|
21797
|
+
"required": [
|
|
21798
|
+
"args"
|
|
21799
|
+
],
|
|
21800
|
+
"returns": "void"
|
|
21801
|
+
},
|
|
21802
|
+
"listProcesses": {
|
|
21803
|
+
"description": "Tool handler: list all tracked processes.",
|
|
21804
|
+
"parameters": {},
|
|
21805
|
+
"required": [],
|
|
21806
|
+
"returns": "void"
|
|
21807
|
+
},
|
|
21808
|
+
"getProcessOutput": {
|
|
21809
|
+
"description": "Tool handler: peek at a process's buffered output.",
|
|
21810
|
+
"parameters": {
|
|
21811
|
+
"args": {
|
|
21812
|
+
"type": "{ id?: string; tag?: string; stream?: string }",
|
|
21813
|
+
"description": "Parameter args"
|
|
21814
|
+
}
|
|
21815
|
+
},
|
|
21816
|
+
"required": [
|
|
21817
|
+
"args"
|
|
21818
|
+
],
|
|
21819
|
+
"returns": "void"
|
|
21820
|
+
},
|
|
21821
|
+
"killProcess": {
|
|
21822
|
+
"description": "Tool handler: kill a process by ID or tag.",
|
|
21823
|
+
"parameters": {
|
|
21824
|
+
"args": {
|
|
21825
|
+
"type": "{ id?: string; tag?: string; signal?: string }",
|
|
21826
|
+
"description": "Parameter args"
|
|
21827
|
+
}
|
|
21828
|
+
},
|
|
21829
|
+
"required": [
|
|
21830
|
+
"args"
|
|
21831
|
+
],
|
|
21832
|
+
"returns": "void"
|
|
21833
|
+
},
|
|
21291
21834
|
"spawn": {
|
|
21292
21835
|
"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.",
|
|
21293
21836
|
"parameters": {
|
|
@@ -21465,7 +22008,7 @@ export const introspectionData = [
|
|
|
21465
22008
|
"examples": [
|
|
21466
22009
|
{
|
|
21467
22010
|
"language": "ts",
|
|
21468
|
-
"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"
|
|
22011
|
+
"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"
|
|
21469
22012
|
}
|
|
21470
22013
|
]
|
|
21471
22014
|
},
|
|
@@ -23546,6 +24089,14 @@ export const introspectionData = [
|
|
|
23546
24089
|
"description": "Returns the available document ids in the collection",
|
|
23547
24090
|
"returns": "string[]"
|
|
23548
24091
|
},
|
|
24092
|
+
"modelDefinitionTable": {
|
|
24093
|
+
"description": "",
|
|
24094
|
+
"returns": "any"
|
|
24095
|
+
},
|
|
24096
|
+
"fileTree": {
|
|
24097
|
+
"description": "",
|
|
24098
|
+
"returns": "any"
|
|
24099
|
+
},
|
|
23549
24100
|
"searchIndexStatus": {
|
|
23550
24101
|
"description": "Get the current search index status.",
|
|
23551
24102
|
"returns": "any"
|
|
@@ -23815,7 +24366,7 @@ export const introspectionData = [
|
|
|
23815
24366
|
},
|
|
23816
24367
|
{
|
|
23817
24368
|
"id": "clients.websocket",
|
|
23818
|
-
"description": "
|
|
24369
|
+
"description": "WebSocketClient helper",
|
|
23819
24370
|
"shortcut": "clients.websocket",
|
|
23820
24371
|
"className": "WebSocketClient",
|
|
23821
24372
|
"methods": {
|
|
@@ -23838,6 +24389,59 @@ export const introspectionData = [
|
|
|
23838
24389
|
],
|
|
23839
24390
|
"returns": "Promise<void>"
|
|
23840
24391
|
},
|
|
24392
|
+
"ask": {
|
|
24393
|
+
"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.",
|
|
24394
|
+
"parameters": {
|
|
24395
|
+
"type": {
|
|
24396
|
+
"type": "string",
|
|
24397
|
+
"description": "A string identifying the request type"
|
|
24398
|
+
},
|
|
24399
|
+
"data": {
|
|
24400
|
+
"type": "any",
|
|
24401
|
+
"description": "Optional payload to include with the request"
|
|
24402
|
+
},
|
|
24403
|
+
"timeout": {
|
|
24404
|
+
"type": "any",
|
|
24405
|
+
"description": "How long to wait for a response (default 10 000 ms)"
|
|
24406
|
+
}
|
|
24407
|
+
},
|
|
24408
|
+
"required": [
|
|
24409
|
+
"type"
|
|
24410
|
+
],
|
|
24411
|
+
"returns": "Promise<R>",
|
|
24412
|
+
"examples": [
|
|
24413
|
+
{
|
|
24414
|
+
"language": "ts",
|
|
24415
|
+
"code": "const result = await ws.ask('getUser', { id: 42 })"
|
|
24416
|
+
}
|
|
24417
|
+
]
|
|
24418
|
+
},
|
|
24419
|
+
"_handleReply": {
|
|
24420
|
+
"description": "",
|
|
24421
|
+
"parameters": {
|
|
24422
|
+
"message": {
|
|
24423
|
+
"type": "any",
|
|
24424
|
+
"description": "Parameter message"
|
|
24425
|
+
}
|
|
24426
|
+
},
|
|
24427
|
+
"required": [
|
|
24428
|
+
"message"
|
|
24429
|
+
],
|
|
24430
|
+
"returns": "boolean"
|
|
24431
|
+
},
|
|
24432
|
+
"_rejectAllPending": {
|
|
24433
|
+
"description": "",
|
|
24434
|
+
"parameters": {
|
|
24435
|
+
"reason": {
|
|
24436
|
+
"type": "string",
|
|
24437
|
+
"description": "Parameter reason"
|
|
24438
|
+
}
|
|
24439
|
+
},
|
|
24440
|
+
"required": [
|
|
24441
|
+
"reason"
|
|
24442
|
+
],
|
|
24443
|
+
"returns": "void"
|
|
24444
|
+
},
|
|
23841
24445
|
"disconnect": {
|
|
23842
24446
|
"description": "Gracefully close the WebSocket connection. Suppresses auto-reconnect and updates connection state to disconnected.",
|
|
23843
24447
|
"parameters": {},
|
|
@@ -23880,13 +24484,7 @@ export const introspectionData = [
|
|
|
23880
24484
|
},
|
|
23881
24485
|
"state": {},
|
|
23882
24486
|
"options": {},
|
|
23883
|
-
"envVars": []
|
|
23884
|
-
"examples": [
|
|
23885
|
-
{
|
|
23886
|
-
"language": "ts",
|
|
23887
|
-
"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' })"
|
|
23888
|
-
}
|
|
23889
|
-
]
|
|
24487
|
+
"envVars": []
|
|
23890
24488
|
},
|
|
23891
24489
|
{
|
|
23892
24490
|
"id": "clients.openai",
|
|
@@ -24155,207 +24753,6 @@ export const introspectionData = [
|
|
|
24155
24753
|
}
|
|
24156
24754
|
]
|
|
24157
24755
|
},
|
|
24158
|
-
{
|
|
24159
|
-
"id": "clients.elevenlabs",
|
|
24160
|
-
"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.",
|
|
24161
|
-
"shortcut": "clients.elevenlabs",
|
|
24162
|
-
"className": "ElevenLabsClient",
|
|
24163
|
-
"methods": {
|
|
24164
|
-
"beforeRequest": {
|
|
24165
|
-
"description": "Inject the xi-api-key header before each request.",
|
|
24166
|
-
"parameters": {},
|
|
24167
|
-
"required": [],
|
|
24168
|
-
"returns": "void"
|
|
24169
|
-
},
|
|
24170
|
-
"connect": {
|
|
24171
|
-
"description": "Validate the API key by listing available models.",
|
|
24172
|
-
"parameters": {},
|
|
24173
|
-
"required": [],
|
|
24174
|
-
"returns": "Promise<this>",
|
|
24175
|
-
"examples": [
|
|
24176
|
-
{
|
|
24177
|
-
"language": "ts",
|
|
24178
|
-
"code": "await el.connect()"
|
|
24179
|
-
}
|
|
24180
|
-
]
|
|
24181
|
-
},
|
|
24182
|
-
"listVoices": {
|
|
24183
|
-
"description": "List available voices with optional search and filtering.",
|
|
24184
|
-
"parameters": {
|
|
24185
|
-
"options": {
|
|
24186
|
-
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
24187
|
-
"description": "Query parameters for filtering voices"
|
|
24188
|
-
}
|
|
24189
|
-
},
|
|
24190
|
-
"required": [],
|
|
24191
|
-
"returns": "Promise<any>",
|
|
24192
|
-
"examples": [
|
|
24193
|
-
{
|
|
24194
|
-
"language": "ts",
|
|
24195
|
-
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
24196
|
-
}
|
|
24197
|
-
]
|
|
24198
|
-
},
|
|
24199
|
-
"getVoice": {
|
|
24200
|
-
"description": "Get details for a single voice.",
|
|
24201
|
-
"parameters": {
|
|
24202
|
-
"voiceId": {
|
|
24203
|
-
"type": "string",
|
|
24204
|
-
"description": "The voice ID to look up"
|
|
24205
|
-
}
|
|
24206
|
-
},
|
|
24207
|
-
"required": [
|
|
24208
|
-
"voiceId"
|
|
24209
|
-
],
|
|
24210
|
-
"returns": "Promise<any>",
|
|
24211
|
-
"examples": [
|
|
24212
|
-
{
|
|
24213
|
-
"language": "ts",
|
|
24214
|
-
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
24215
|
-
}
|
|
24216
|
-
]
|
|
24217
|
-
},
|
|
24218
|
-
"listModels": {
|
|
24219
|
-
"description": "List available TTS models.",
|
|
24220
|
-
"parameters": {},
|
|
24221
|
-
"required": [],
|
|
24222
|
-
"returns": "Promise<any[]>",
|
|
24223
|
-
"examples": [
|
|
24224
|
-
{
|
|
24225
|
-
"language": "ts",
|
|
24226
|
-
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
24227
|
-
}
|
|
24228
|
-
]
|
|
24229
|
-
},
|
|
24230
|
-
"synthesize": {
|
|
24231
|
-
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
24232
|
-
"parameters": {
|
|
24233
|
-
"text": {
|
|
24234
|
-
"type": "string",
|
|
24235
|
-
"description": "The text to convert to speech"
|
|
24236
|
-
},
|
|
24237
|
-
"options": {
|
|
24238
|
-
"type": "SynthesizeOptions",
|
|
24239
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
24240
|
-
"properties": {
|
|
24241
|
-
"voiceId": {
|
|
24242
|
-
"type": "string",
|
|
24243
|
-
"description": ""
|
|
24244
|
-
},
|
|
24245
|
-
"modelId": {
|
|
24246
|
-
"type": "string",
|
|
24247
|
-
"description": ""
|
|
24248
|
-
},
|
|
24249
|
-
"outputFormat": {
|
|
24250
|
-
"type": "string",
|
|
24251
|
-
"description": ""
|
|
24252
|
-
},
|
|
24253
|
-
"voiceSettings": {
|
|
24254
|
-
"type": "ElevenLabsVoiceSettings",
|
|
24255
|
-
"description": ""
|
|
24256
|
-
},
|
|
24257
|
-
"disableCache": {
|
|
24258
|
-
"type": "boolean",
|
|
24259
|
-
"description": ""
|
|
24260
|
-
}
|
|
24261
|
-
}
|
|
24262
|
-
}
|
|
24263
|
-
},
|
|
24264
|
-
"required": [
|
|
24265
|
-
"text"
|
|
24266
|
-
],
|
|
24267
|
-
"returns": "Promise<Buffer>",
|
|
24268
|
-
"examples": [
|
|
24269
|
-
{
|
|
24270
|
-
"language": "ts",
|
|
24271
|
-
"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})"
|
|
24272
|
-
}
|
|
24273
|
-
]
|
|
24274
|
-
},
|
|
24275
|
-
"say": {
|
|
24276
|
-
"description": "Synthesize speech and write the audio to a file.",
|
|
24277
|
-
"parameters": {
|
|
24278
|
-
"text": {
|
|
24279
|
-
"type": "string",
|
|
24280
|
-
"description": "The text to convert to speech"
|
|
24281
|
-
},
|
|
24282
|
-
"outputPath": {
|
|
24283
|
-
"type": "string",
|
|
24284
|
-
"description": "File path to write the audio to"
|
|
24285
|
-
},
|
|
24286
|
-
"options": {
|
|
24287
|
-
"type": "SynthesizeOptions",
|
|
24288
|
-
"description": "Voice, model, format, and voice settings overrides",
|
|
24289
|
-
"properties": {
|
|
24290
|
-
"voiceId": {
|
|
24291
|
-
"type": "string",
|
|
24292
|
-
"description": ""
|
|
24293
|
-
},
|
|
24294
|
-
"modelId": {
|
|
24295
|
-
"type": "string",
|
|
24296
|
-
"description": ""
|
|
24297
|
-
},
|
|
24298
|
-
"outputFormat": {
|
|
24299
|
-
"type": "string",
|
|
24300
|
-
"description": ""
|
|
24301
|
-
},
|
|
24302
|
-
"voiceSettings": {
|
|
24303
|
-
"type": "ElevenLabsVoiceSettings",
|
|
24304
|
-
"description": ""
|
|
24305
|
-
},
|
|
24306
|
-
"disableCache": {
|
|
24307
|
-
"type": "boolean",
|
|
24308
|
-
"description": ""
|
|
24309
|
-
}
|
|
24310
|
-
}
|
|
24311
|
-
}
|
|
24312
|
-
},
|
|
24313
|
-
"required": [
|
|
24314
|
-
"text",
|
|
24315
|
-
"outputPath"
|
|
24316
|
-
],
|
|
24317
|
-
"returns": "Promise<string>",
|
|
24318
|
-
"examples": [
|
|
24319
|
-
{
|
|
24320
|
-
"language": "ts",
|
|
24321
|
-
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
24322
|
-
}
|
|
24323
|
-
]
|
|
24324
|
-
}
|
|
24325
|
-
},
|
|
24326
|
-
"getters": {
|
|
24327
|
-
"apiKey": {
|
|
24328
|
-
"description": "The resolved API key from options or environment.",
|
|
24329
|
-
"returns": "string"
|
|
24330
|
-
}
|
|
24331
|
-
},
|
|
24332
|
-
"events": {
|
|
24333
|
-
"failure": {
|
|
24334
|
-
"name": "failure",
|
|
24335
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
24336
|
-
"arguments": {}
|
|
24337
|
-
},
|
|
24338
|
-
"voices": {
|
|
24339
|
-
"name": "voices",
|
|
24340
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
24341
|
-
"arguments": {}
|
|
24342
|
-
},
|
|
24343
|
-
"speech": {
|
|
24344
|
-
"name": "speech",
|
|
24345
|
-
"description": "Event emitted by ElevenLabsClient",
|
|
24346
|
-
"arguments": {}
|
|
24347
|
-
}
|
|
24348
|
-
},
|
|
24349
|
-
"state": {},
|
|
24350
|
-
"options": {},
|
|
24351
|
-
"envVars": [],
|
|
24352
|
-
"examples": [
|
|
24353
|
-
{
|
|
24354
|
-
"language": "ts",
|
|
24355
|
-
"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"
|
|
24356
|
-
}
|
|
24357
|
-
]
|
|
24358
|
-
},
|
|
24359
24756
|
{
|
|
24360
24757
|
"id": "clients.supabase",
|
|
24361
24758
|
"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).",
|
|
@@ -24444,110 +24841,311 @@ export const introspectionData = [
|
|
|
24444
24841
|
"required": [],
|
|
24445
24842
|
"returns": "void"
|
|
24446
24843
|
},
|
|
24447
|
-
"getUser": {
|
|
24448
|
-
"description": "Get the current user, if any.",
|
|
24844
|
+
"getUser": {
|
|
24845
|
+
"description": "Get the current user, if any.",
|
|
24846
|
+
"parameters": {},
|
|
24847
|
+
"required": [],
|
|
24848
|
+
"returns": "void"
|
|
24849
|
+
},
|
|
24850
|
+
"invoke": {
|
|
24851
|
+
"description": "Invoke a Supabase Edge Function by name.",
|
|
24852
|
+
"parameters": {
|
|
24853
|
+
"name": {
|
|
24854
|
+
"type": "string",
|
|
24855
|
+
"description": "Parameter name"
|
|
24856
|
+
},
|
|
24857
|
+
"body": {
|
|
24858
|
+
"type": "any",
|
|
24859
|
+
"description": "Parameter body"
|
|
24860
|
+
}
|
|
24861
|
+
},
|
|
24862
|
+
"required": [
|
|
24863
|
+
"name"
|
|
24864
|
+
],
|
|
24865
|
+
"returns": "void"
|
|
24866
|
+
},
|
|
24867
|
+
"subscribe": {
|
|
24868
|
+
"description": "Subscribe to realtime changes on a Postgres table.",
|
|
24869
|
+
"parameters": {
|
|
24870
|
+
"channelName": {
|
|
24871
|
+
"type": "string",
|
|
24872
|
+
"description": "A name for this subscription channel"
|
|
24873
|
+
},
|
|
24874
|
+
"table": {
|
|
24875
|
+
"type": "string",
|
|
24876
|
+
"description": "The table to listen to"
|
|
24877
|
+
},
|
|
24878
|
+
"callback": {
|
|
24879
|
+
"type": "(payload: any) => void",
|
|
24880
|
+
"description": "Called with the payload on each change"
|
|
24881
|
+
},
|
|
24882
|
+
"event": {
|
|
24883
|
+
"type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
|
|
24884
|
+
"description": "The event type to listen for (default: all changes)"
|
|
24885
|
+
}
|
|
24886
|
+
},
|
|
24887
|
+
"required": [
|
|
24888
|
+
"channelName",
|
|
24889
|
+
"table",
|
|
24890
|
+
"callback"
|
|
24891
|
+
],
|
|
24892
|
+
"returns": "RealtimeChannel"
|
|
24893
|
+
},
|
|
24894
|
+
"unsubscribe": {
|
|
24895
|
+
"description": "Unsubscribe and remove a realtime channel by name.",
|
|
24896
|
+
"parameters": {
|
|
24897
|
+
"channelName": {
|
|
24898
|
+
"type": "string",
|
|
24899
|
+
"description": "The channel name to remove"
|
|
24900
|
+
}
|
|
24901
|
+
},
|
|
24902
|
+
"required": [
|
|
24903
|
+
"channelName"
|
|
24904
|
+
],
|
|
24905
|
+
"returns": "void"
|
|
24906
|
+
},
|
|
24907
|
+
"unsubscribeAll": {
|
|
24908
|
+
"description": "Unsubscribe and remove all realtime channels.",
|
|
24909
|
+
"parameters": {},
|
|
24910
|
+
"required": [],
|
|
24911
|
+
"returns": "void"
|
|
24912
|
+
},
|
|
24913
|
+
"connect": {
|
|
24914
|
+
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
24915
|
+
"parameters": {},
|
|
24916
|
+
"required": [],
|
|
24917
|
+
"returns": "void"
|
|
24918
|
+
},
|
|
24919
|
+
"disconnect": {
|
|
24920
|
+
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
24921
|
+
"parameters": {},
|
|
24922
|
+
"required": [],
|
|
24923
|
+
"returns": "void"
|
|
24924
|
+
}
|
|
24925
|
+
},
|
|
24926
|
+
"getters": {
|
|
24927
|
+
"sdk": {
|
|
24928
|
+
"description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
|
|
24929
|
+
"returns": "SupabaseSDKClient<any, any>"
|
|
24930
|
+
},
|
|
24931
|
+
"storage": {
|
|
24932
|
+
"description": "Returns the Supabase Storage client for managing buckets and files.",
|
|
24933
|
+
"returns": "any"
|
|
24934
|
+
},
|
|
24935
|
+
"functions": {
|
|
24936
|
+
"description": "Returns the Supabase Functions client.",
|
|
24937
|
+
"returns": "any"
|
|
24938
|
+
}
|
|
24939
|
+
},
|
|
24940
|
+
"events": {},
|
|
24941
|
+
"state": {},
|
|
24942
|
+
"options": {},
|
|
24943
|
+
"envVars": [],
|
|
24944
|
+
"examples": [
|
|
24945
|
+
{
|
|
24946
|
+
"language": "ts",
|
|
24947
|
+
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
24948
|
+
}
|
|
24949
|
+
]
|
|
24950
|
+
},
|
|
24951
|
+
{
|
|
24952
|
+
"id": "clients.elevenlabs",
|
|
24953
|
+
"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.",
|
|
24954
|
+
"shortcut": "clients.elevenlabs",
|
|
24955
|
+
"className": "ElevenLabsClient",
|
|
24956
|
+
"methods": {
|
|
24957
|
+
"beforeRequest": {
|
|
24958
|
+
"description": "Inject the xi-api-key header before each request.",
|
|
24959
|
+
"parameters": {},
|
|
24960
|
+
"required": [],
|
|
24961
|
+
"returns": "void"
|
|
24962
|
+
},
|
|
24963
|
+
"connect": {
|
|
24964
|
+
"description": "Validate the API key by listing available models.",
|
|
24965
|
+
"parameters": {},
|
|
24966
|
+
"required": [],
|
|
24967
|
+
"returns": "Promise<this>",
|
|
24968
|
+
"examples": [
|
|
24969
|
+
{
|
|
24970
|
+
"language": "ts",
|
|
24971
|
+
"code": "await el.connect()"
|
|
24972
|
+
}
|
|
24973
|
+
]
|
|
24974
|
+
},
|
|
24975
|
+
"listVoices": {
|
|
24976
|
+
"description": "List available voices with optional search and filtering.",
|
|
24977
|
+
"parameters": {
|
|
24978
|
+
"options": {
|
|
24979
|
+
"type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
|
|
24980
|
+
"description": "Query parameters for filtering voices"
|
|
24981
|
+
}
|
|
24982
|
+
},
|
|
24983
|
+
"required": [],
|
|
24984
|
+
"returns": "Promise<any>",
|
|
24985
|
+
"examples": [
|
|
24986
|
+
{
|
|
24987
|
+
"language": "ts",
|
|
24988
|
+
"code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
|
|
24989
|
+
}
|
|
24990
|
+
]
|
|
24991
|
+
},
|
|
24992
|
+
"getVoice": {
|
|
24993
|
+
"description": "Get details for a single voice.",
|
|
24994
|
+
"parameters": {
|
|
24995
|
+
"voiceId": {
|
|
24996
|
+
"type": "string",
|
|
24997
|
+
"description": "The voice ID to look up"
|
|
24998
|
+
}
|
|
24999
|
+
},
|
|
25000
|
+
"required": [
|
|
25001
|
+
"voiceId"
|
|
25002
|
+
],
|
|
25003
|
+
"returns": "Promise<any>",
|
|
25004
|
+
"examples": [
|
|
25005
|
+
{
|
|
25006
|
+
"language": "ts",
|
|
25007
|
+
"code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
|
|
25008
|
+
}
|
|
25009
|
+
]
|
|
25010
|
+
},
|
|
25011
|
+
"listModels": {
|
|
25012
|
+
"description": "List available TTS models.",
|
|
24449
25013
|
"parameters": {},
|
|
24450
25014
|
"required": [],
|
|
24451
|
-
"returns": "
|
|
25015
|
+
"returns": "Promise<any[]>",
|
|
25016
|
+
"examples": [
|
|
25017
|
+
{
|
|
25018
|
+
"language": "ts",
|
|
25019
|
+
"code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
|
|
25020
|
+
}
|
|
25021
|
+
]
|
|
24452
25022
|
},
|
|
24453
|
-
"
|
|
24454
|
-
"description": "
|
|
25023
|
+
"synthesize": {
|
|
25024
|
+
"description": "Synthesize speech from text, returning audio as a Buffer.",
|
|
24455
25025
|
"parameters": {
|
|
24456
|
-
"
|
|
25026
|
+
"text": {
|
|
24457
25027
|
"type": "string",
|
|
24458
|
-
"description": "
|
|
25028
|
+
"description": "The text to convert to speech"
|
|
24459
25029
|
},
|
|
24460
|
-
"
|
|
24461
|
-
"type": "
|
|
24462
|
-
"description": "
|
|
25030
|
+
"options": {
|
|
25031
|
+
"type": "SynthesizeOptions",
|
|
25032
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
25033
|
+
"properties": {
|
|
25034
|
+
"voiceId": {
|
|
25035
|
+
"type": "string",
|
|
25036
|
+
"description": ""
|
|
25037
|
+
},
|
|
25038
|
+
"modelId": {
|
|
25039
|
+
"type": "string",
|
|
25040
|
+
"description": ""
|
|
25041
|
+
},
|
|
25042
|
+
"outputFormat": {
|
|
25043
|
+
"type": "string",
|
|
25044
|
+
"description": ""
|
|
25045
|
+
},
|
|
25046
|
+
"voiceSettings": {
|
|
25047
|
+
"type": "ElevenLabsVoiceSettings",
|
|
25048
|
+
"description": ""
|
|
25049
|
+
},
|
|
25050
|
+
"disableCache": {
|
|
25051
|
+
"type": "boolean",
|
|
25052
|
+
"description": ""
|
|
25053
|
+
}
|
|
25054
|
+
}
|
|
24463
25055
|
}
|
|
24464
25056
|
},
|
|
24465
25057
|
"required": [
|
|
24466
|
-
"
|
|
25058
|
+
"text"
|
|
24467
25059
|
],
|
|
24468
|
-
"returns": "
|
|
25060
|
+
"returns": "Promise<Buffer>",
|
|
25061
|
+
"examples": [
|
|
25062
|
+
{
|
|
25063
|
+
"language": "ts",
|
|
25064
|
+
"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})"
|
|
25065
|
+
}
|
|
25066
|
+
]
|
|
24469
25067
|
},
|
|
24470
|
-
"
|
|
24471
|
-
"description": "
|
|
25068
|
+
"say": {
|
|
25069
|
+
"description": "Synthesize speech and write the audio to a file.",
|
|
24472
25070
|
"parameters": {
|
|
24473
|
-
"
|
|
25071
|
+
"text": {
|
|
24474
25072
|
"type": "string",
|
|
24475
|
-
"description": "
|
|
25073
|
+
"description": "The text to convert to speech"
|
|
24476
25074
|
},
|
|
24477
|
-
"
|
|
25075
|
+
"outputPath": {
|
|
24478
25076
|
"type": "string",
|
|
24479
|
-
"description": "
|
|
24480
|
-
},
|
|
24481
|
-
"callback": {
|
|
24482
|
-
"type": "(payload: any) => void",
|
|
24483
|
-
"description": "Called with the payload on each change"
|
|
25077
|
+
"description": "File path to write the audio to"
|
|
24484
25078
|
},
|
|
24485
|
-
"
|
|
24486
|
-
"type": "
|
|
24487
|
-
"description": "
|
|
25079
|
+
"options": {
|
|
25080
|
+
"type": "SynthesizeOptions",
|
|
25081
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
25082
|
+
"properties": {
|
|
25083
|
+
"voiceId": {
|
|
25084
|
+
"type": "string",
|
|
25085
|
+
"description": ""
|
|
25086
|
+
},
|
|
25087
|
+
"modelId": {
|
|
25088
|
+
"type": "string",
|
|
25089
|
+
"description": ""
|
|
25090
|
+
},
|
|
25091
|
+
"outputFormat": {
|
|
25092
|
+
"type": "string",
|
|
25093
|
+
"description": ""
|
|
25094
|
+
},
|
|
25095
|
+
"voiceSettings": {
|
|
25096
|
+
"type": "ElevenLabsVoiceSettings",
|
|
25097
|
+
"description": ""
|
|
25098
|
+
},
|
|
25099
|
+
"disableCache": {
|
|
25100
|
+
"type": "boolean",
|
|
25101
|
+
"description": ""
|
|
25102
|
+
}
|
|
25103
|
+
}
|
|
24488
25104
|
}
|
|
24489
25105
|
},
|
|
24490
25106
|
"required": [
|
|
24491
|
-
"
|
|
24492
|
-
"
|
|
24493
|
-
"callback"
|
|
25107
|
+
"text",
|
|
25108
|
+
"outputPath"
|
|
24494
25109
|
],
|
|
24495
|
-
"returns": "
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
"channelName": {
|
|
24501
|
-
"type": "string",
|
|
24502
|
-
"description": "The channel name to remove"
|
|
25110
|
+
"returns": "Promise<string>",
|
|
25111
|
+
"examples": [
|
|
25112
|
+
{
|
|
25113
|
+
"language": "ts",
|
|
25114
|
+
"code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
|
|
24503
25115
|
}
|
|
24504
|
-
|
|
24505
|
-
"required": [
|
|
24506
|
-
"channelName"
|
|
24507
|
-
],
|
|
24508
|
-
"returns": "void"
|
|
24509
|
-
},
|
|
24510
|
-
"unsubscribeAll": {
|
|
24511
|
-
"description": "Unsubscribe and remove all realtime channels.",
|
|
24512
|
-
"parameters": {},
|
|
24513
|
-
"required": [],
|
|
24514
|
-
"returns": "void"
|
|
24515
|
-
},
|
|
24516
|
-
"connect": {
|
|
24517
|
-
"description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
|
|
24518
|
-
"parameters": {},
|
|
24519
|
-
"required": [],
|
|
24520
|
-
"returns": "void"
|
|
24521
|
-
},
|
|
24522
|
-
"disconnect": {
|
|
24523
|
-
"description": "Disconnect by signing out and removing all realtime channels.",
|
|
24524
|
-
"parameters": {},
|
|
24525
|
-
"required": [],
|
|
24526
|
-
"returns": "void"
|
|
25116
|
+
]
|
|
24527
25117
|
}
|
|
24528
25118
|
},
|
|
24529
25119
|
"getters": {
|
|
24530
|
-
"
|
|
24531
|
-
"description": "
|
|
24532
|
-
"returns": "
|
|
25120
|
+
"apiKey": {
|
|
25121
|
+
"description": "The resolved API key from options or environment.",
|
|
25122
|
+
"returns": "string"
|
|
25123
|
+
}
|
|
25124
|
+
},
|
|
25125
|
+
"events": {
|
|
25126
|
+
"failure": {
|
|
25127
|
+
"name": "failure",
|
|
25128
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
25129
|
+
"arguments": {}
|
|
24533
25130
|
},
|
|
24534
|
-
"
|
|
24535
|
-
"
|
|
24536
|
-
"
|
|
25131
|
+
"voices": {
|
|
25132
|
+
"name": "voices",
|
|
25133
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
25134
|
+
"arguments": {}
|
|
24537
25135
|
},
|
|
24538
|
-
"
|
|
24539
|
-
"
|
|
24540
|
-
"
|
|
25136
|
+
"speech": {
|
|
25137
|
+
"name": "speech",
|
|
25138
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
25139
|
+
"arguments": {}
|
|
24541
25140
|
}
|
|
24542
25141
|
},
|
|
24543
|
-
"events": {},
|
|
24544
25142
|
"state": {},
|
|
24545
25143
|
"options": {},
|
|
24546
25144
|
"envVars": [],
|
|
24547
25145
|
"examples": [
|
|
24548
25146
|
{
|
|
24549
25147
|
"language": "ts",
|
|
24550
|
-
"code": "const
|
|
25148
|
+
"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"
|
|
24551
25149
|
}
|
|
24552
25150
|
]
|
|
24553
25151
|
},
|
|
@@ -25084,7 +25682,7 @@ export const introspectionData = [
|
|
|
25084
25682
|
},
|
|
25085
25683
|
{
|
|
25086
25684
|
"id": "servers.websocket",
|
|
25087
|
-
"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.",
|
|
25685
|
+
"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.",
|
|
25088
25686
|
"shortcut": "servers.websocket",
|
|
25089
25687
|
"className": "WebsocketServer",
|
|
25090
25688
|
"methods": {
|
|
@@ -25119,6 +25717,64 @@ export const introspectionData = [
|
|
|
25119
25717
|
],
|
|
25120
25718
|
"returns": "void"
|
|
25121
25719
|
},
|
|
25720
|
+
"ask": {
|
|
25721
|
+
"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.",
|
|
25722
|
+
"parameters": {
|
|
25723
|
+
"ws": {
|
|
25724
|
+
"type": "any",
|
|
25725
|
+
"description": "The WebSocket client to ask"
|
|
25726
|
+
},
|
|
25727
|
+
"type": {
|
|
25728
|
+
"type": "string",
|
|
25729
|
+
"description": "A string identifying the request type"
|
|
25730
|
+
},
|
|
25731
|
+
"data": {
|
|
25732
|
+
"type": "any",
|
|
25733
|
+
"description": "Optional payload"
|
|
25734
|
+
},
|
|
25735
|
+
"timeout": {
|
|
25736
|
+
"type": "any",
|
|
25737
|
+
"description": "How long to wait (default 10 000 ms)"
|
|
25738
|
+
}
|
|
25739
|
+
},
|
|
25740
|
+
"required": [
|
|
25741
|
+
"ws",
|
|
25742
|
+
"type"
|
|
25743
|
+
],
|
|
25744
|
+
"returns": "Promise<R>",
|
|
25745
|
+
"examples": [
|
|
25746
|
+
{
|
|
25747
|
+
"language": "ts",
|
|
25748
|
+
"code": "ws.on('connection', async (client) => {\n const info = await ws.ask(client, 'identify')\n console.log('Client says:', info)\n})"
|
|
25749
|
+
}
|
|
25750
|
+
]
|
|
25751
|
+
},
|
|
25752
|
+
"_handleReply": {
|
|
25753
|
+
"description": "",
|
|
25754
|
+
"parameters": {
|
|
25755
|
+
"message": {
|
|
25756
|
+
"type": "any",
|
|
25757
|
+
"description": "Parameter message"
|
|
25758
|
+
}
|
|
25759
|
+
},
|
|
25760
|
+
"required": [
|
|
25761
|
+
"message"
|
|
25762
|
+
],
|
|
25763
|
+
"returns": "boolean"
|
|
25764
|
+
},
|
|
25765
|
+
"_rejectAllPending": {
|
|
25766
|
+
"description": "",
|
|
25767
|
+
"parameters": {
|
|
25768
|
+
"reason": {
|
|
25769
|
+
"type": "string",
|
|
25770
|
+
"description": "Parameter reason"
|
|
25771
|
+
}
|
|
25772
|
+
},
|
|
25773
|
+
"required": [
|
|
25774
|
+
"reason"
|
|
25775
|
+
],
|
|
25776
|
+
"returns": "void"
|
|
25777
|
+
},
|
|
25122
25778
|
"start": {
|
|
25123
25779
|
"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.",
|
|
25124
25780
|
"parameters": {
|
|
@@ -25165,7 +25821,7 @@ export const introspectionData = [
|
|
|
25165
25821
|
"examples": [
|
|
25166
25822
|
{
|
|
25167
25823
|
"language": "ts",
|
|
25168
|
-
"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})"
|
|
25824
|
+
"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})"
|
|
25169
25825
|
}
|
|
25170
25826
|
]
|
|
25171
25827
|
},
|
|
@@ -26013,11 +26669,42 @@ export const introspectionData = [
|
|
|
26013
26669
|
"required": [],
|
|
26014
26670
|
"returns": "void"
|
|
26015
26671
|
},
|
|
26672
|
+
"addSystemPromptExtension": {
|
|
26673
|
+
"description": "Add or update a named system prompt extension. The value is appended to the base system prompt when passed to the conversation.",
|
|
26674
|
+
"parameters": {
|
|
26675
|
+
"key": {
|
|
26676
|
+
"type": "string",
|
|
26677
|
+
"description": "A unique identifier for this extension"
|
|
26678
|
+
},
|
|
26679
|
+
"value": {
|
|
26680
|
+
"type": "string",
|
|
26681
|
+
"description": "The text to append"
|
|
26682
|
+
}
|
|
26683
|
+
},
|
|
26684
|
+
"required": [
|
|
26685
|
+
"key",
|
|
26686
|
+
"value"
|
|
26687
|
+
],
|
|
26688
|
+
"returns": "this"
|
|
26689
|
+
},
|
|
26690
|
+
"removeSystemPromptExtension": {
|
|
26691
|
+
"description": "Remove a named system prompt extension.",
|
|
26692
|
+
"parameters": {
|
|
26693
|
+
"key": {
|
|
26694
|
+
"type": "string",
|
|
26695
|
+
"description": "The identifier of the extension to remove"
|
|
26696
|
+
}
|
|
26697
|
+
},
|
|
26698
|
+
"required": [
|
|
26699
|
+
"key"
|
|
26700
|
+
],
|
|
26701
|
+
"returns": "this"
|
|
26702
|
+
},
|
|
26016
26703
|
"use": {
|
|
26017
26704
|
"description": "Apply a setup function or a Helper instance to this assistant. When passed a function, it receives the assistant and can configure tools, hooks, event listeners, etc. When passed a Helper instance that exposes tools via toTools(), those tools are automatically added to this assistant.",
|
|
26018
26705
|
"parameters": {
|
|
26019
26706
|
"fnOrHelper": {
|
|
26020
|
-
"type": "((assistant: this) => void | Promise<void>) | { toTools: () => { schemas: Record<string, z.ZodType>, handlers: Record<string, Function> } }",
|
|
26707
|
+
"type": "((assistant: this) => void | Promise<void>) | { toTools: () => { schemas: Record<string, z.ZodType>, handlers: Record<string, Function> } } | { schemas: Record<string, z.ZodType>, handlers: Record<string, Function> }",
|
|
26021
26708
|
"description": "Setup function or Helper instance"
|
|
26022
26709
|
}
|
|
26023
26710
|
},
|
|
@@ -26283,6 +26970,14 @@ export const introspectionData = [
|
|
|
26283
26970
|
"description": "The current system prompt text.",
|
|
26284
26971
|
"returns": "string"
|
|
26285
26972
|
},
|
|
26973
|
+
"systemPromptExtensions": {
|
|
26974
|
+
"description": "The named extensions appended to the system prompt.",
|
|
26975
|
+
"returns": "Record<string, string>"
|
|
26976
|
+
},
|
|
26977
|
+
"effectiveSystemPrompt": {
|
|
26978
|
+
"description": "The system prompt with all extensions appended. This is the value passed to the conversation.",
|
|
26979
|
+
"returns": "string"
|
|
26980
|
+
},
|
|
26286
26981
|
"tools": {
|
|
26287
26982
|
"description": "The tools registered with this assistant.",
|
|
26288
26983
|
"returns": "Record<string, ConversationTool>"
|
|
@@ -26326,6 +27021,11 @@ export const introspectionData = [
|
|
|
26326
27021
|
"description": "Event emitted by Assistant",
|
|
26327
27022
|
"arguments": {}
|
|
26328
27023
|
},
|
|
27024
|
+
"systemPromptExtensionsChanged": {
|
|
27025
|
+
"name": "systemPromptExtensionsChanged",
|
|
27026
|
+
"description": "Event emitted by Assistant",
|
|
27027
|
+
"arguments": {}
|
|
27028
|
+
},
|
|
26329
27029
|
"toolsChanged": {
|
|
26330
27030
|
"name": "toolsChanged",
|
|
26331
27031
|
"description": "Event emitted by Assistant",
|
|
@@ -27993,6 +28693,10 @@ export const containerIntrospectionData = [
|
|
|
27993
28693
|
"description": "Returns a map of enabled feature shortcut IDs to their instances.",
|
|
27994
28694
|
"returns": "Partial<AvailableInstanceTypes<Features>>"
|
|
27995
28695
|
},
|
|
28696
|
+
"describer": {
|
|
28697
|
+
"description": "Lazy-initialized ContainerDescriber for introspecting registries, helpers, and members.",
|
|
28698
|
+
"returns": "ContainerDescriber"
|
|
28699
|
+
},
|
|
27996
28700
|
"context": {
|
|
27997
28701
|
"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.",
|
|
27998
28702
|
"returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
|