@soederpop/luca 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +241 -36
  2. package/bun.lock +24 -5
  3. package/commands/build-python-bridge.ts +43 -0
  4. package/docs/apis/clients/rest.md +7 -7
  5. package/docs/apis/clients/websocket.md +23 -10
  6. package/docs/apis/features/agi/assistant.md +155 -8
  7. package/docs/apis/features/agi/assistants-manager.md +90 -22
  8. package/docs/apis/features/agi/auto-assistant.md +377 -0
  9. package/docs/apis/features/agi/browser-use.md +802 -0
  10. package/docs/apis/features/agi/claude-code.md +6 -1
  11. package/docs/apis/features/agi/conversation-history.md +7 -6
  12. package/docs/apis/features/agi/conversation.md +111 -38
  13. package/docs/apis/features/agi/docs-reader.md +35 -57
  14. package/docs/apis/features/agi/file-tools.md +163 -0
  15. package/docs/apis/features/agi/openapi.md +2 -2
  16. package/docs/apis/features/agi/skills-library.md +227 -0
  17. package/docs/apis/features/node/content-db.md +125 -4
  18. package/docs/apis/features/node/disk-cache.md +11 -11
  19. package/docs/apis/features/node/downloader.md +1 -1
  20. package/docs/apis/features/node/file-manager.md +15 -15
  21. package/docs/apis/features/node/fs.md +78 -21
  22. package/docs/apis/features/node/git.md +50 -10
  23. package/docs/apis/features/node/google-calendar.md +3 -0
  24. package/docs/apis/features/node/google-docs.md +10 -1
  25. package/docs/apis/features/node/google-drive.md +3 -0
  26. package/docs/apis/features/node/google-mail.md +214 -0
  27. package/docs/apis/features/node/google-sheets.md +3 -0
  28. package/docs/apis/features/node/ink.md +10 -10
  29. package/docs/apis/features/node/ipc-socket.md +83 -93
  30. package/docs/apis/features/node/networking.md +5 -5
  31. package/docs/apis/features/node/os.md +7 -7
  32. package/docs/apis/features/node/package-finder.md +14 -14
  33. package/docs/apis/features/node/proc.md +2 -1
  34. package/docs/apis/features/node/process-manager.md +70 -3
  35. package/docs/apis/features/node/python.md +265 -9
  36. package/docs/apis/features/node/redis.md +380 -0
  37. package/docs/apis/features/node/ui.md +13 -13
  38. package/docs/apis/servers/express.md +35 -7
  39. package/docs/apis/servers/mcp.md +3 -3
  40. package/docs/apis/servers/websocket.md +51 -8
  41. package/docs/bootstrap/CLAUDE.md +1 -1
  42. package/docs/bootstrap/SKILL.md +93 -7
  43. package/docs/examples/feature-as-tool-provider.md +143 -0
  44. package/docs/examples/python.md +42 -1
  45. package/docs/introspection.md +15 -5
  46. package/docs/tutorials/00-bootstrap.md +3 -3
  47. package/docs/tutorials/02-container.md +2 -2
  48. package/docs/tutorials/10-creating-features.md +5 -0
  49. package/docs/tutorials/13-introspection.md +12 -2
  50. package/docs/tutorials/19-python-sessions.md +401 -0
  51. package/package.json +8 -4
  52. package/src/agi/container.server.ts +8 -0
  53. package/src/agi/features/assistant.ts +18 -0
  54. package/src/agi/features/autonomous-assistant.ts +435 -0
  55. package/src/agi/features/conversation.ts +58 -6
  56. package/src/agi/features/file-tools.ts +286 -0
  57. package/src/agi/features/luca-coder.ts +643 -0
  58. package/src/bootstrap/generated.ts +705 -17
  59. package/src/cli/build-info.ts +2 -2
  60. package/src/cli/cli.ts +22 -13
  61. package/src/commands/bootstrap.ts +49 -6
  62. package/src/commands/code.ts +369 -0
  63. package/src/commands/describe.ts +7 -2
  64. package/src/commands/index.ts +1 -0
  65. package/src/commands/sandbox-mcp.ts +7 -7
  66. package/src/commands/save-api-docs.ts +1 -1
  67. package/src/container-describer.ts +4 -4
  68. package/src/container.ts +10 -19
  69. package/src/helper.ts +24 -33
  70. package/src/introspection/generated.agi.ts +3026 -590
  71. package/src/introspection/generated.node.ts +1625 -688
  72. package/src/introspection/generated.web.ts +15 -57
  73. package/src/node/container.ts +5 -0
  74. package/src/node/features/figlet-fonts.ts +597 -0
  75. package/src/node/features/fs.ts +3 -9
  76. package/src/node/features/helpers.ts +20 -0
  77. package/src/node/features/python.ts +429 -16
  78. package/src/node/features/redis.ts +446 -0
  79. package/src/node/features/ui.ts +4 -11
  80. package/src/python/bridge.py +220 -0
  81. package/src/python/generated.ts +227 -0
  82. package/src/scaffolds/generated.ts +1 -1
  83. package/test/python-session.test.ts +105 -0
  84. package/assistants/lucaExpert/CORE.md +0 -37
  85. package/assistants/lucaExpert/hooks.ts +0 -9
  86. package/assistants/lucaExpert/tools.ts +0 -177
@@ -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-24T09:09:09.885Z
4
+ // Generated at: 2026-03-26T03:30:20.464Z
5
5
 
6
6
  setBuildTimeData('features.googleDocs', {
7
7
  "id": "features.googleDocs",
@@ -5927,6 +5927,312 @@ setBuildTimeData('features.googleCalendar', {
5927
5927
  }
5928
5928
  });
5929
5929
 
5930
+ setBuildTimeData('features.redis', {
5931
+ "id": "features.redis",
5932
+ "description": "Redis feature for shared state and pub/sub communication between container instances. Wraps ioredis with a focused API for the primitives that matter most: key/value state, pub/sub messaging, and cross-instance coordination. Uses a dedicated subscriber connection for pub/sub (ioredis requirement), created lazily on first subscribe call.",
5933
+ "shortcut": "features.redis",
5934
+ "className": "RedisFeature",
5935
+ "methods": {
5936
+ "set": {
5937
+ "description": "Set a key to a string value with optional TTL.",
5938
+ "parameters": {
5939
+ "key": {
5940
+ "type": "string",
5941
+ "description": "The key name"
5942
+ },
5943
+ "value": {
5944
+ "type": "string",
5945
+ "description": "The string value to store"
5946
+ },
5947
+ "ttl": {
5948
+ "type": "number",
5949
+ "description": "Optional time-to-live in seconds"
5950
+ }
5951
+ },
5952
+ "required": [
5953
+ "key",
5954
+ "value"
5955
+ ],
5956
+ "returns": "Promise<void>"
5957
+ },
5958
+ "get": {
5959
+ "description": "Get a key's value. Returns null if the key doesn't exist.",
5960
+ "parameters": {
5961
+ "key": {
5962
+ "type": "string",
5963
+ "description": "The key name"
5964
+ }
5965
+ },
5966
+ "required": [
5967
+ "key"
5968
+ ],
5969
+ "returns": "Promise<string | null>"
5970
+ },
5971
+ "del": {
5972
+ "description": "Delete one or more keys.",
5973
+ "parameters": {
5974
+ "keys": {
5975
+ "type": "string[]",
5976
+ "description": "One or more key names to delete"
5977
+ }
5978
+ },
5979
+ "required": [
5980
+ "keys"
5981
+ ],
5982
+ "returns": "Promise<number>"
5983
+ },
5984
+ "exists": {
5985
+ "description": "Check if a key exists.",
5986
+ "parameters": {
5987
+ "key": {
5988
+ "type": "string",
5989
+ "description": "The key name"
5990
+ }
5991
+ },
5992
+ "required": [
5993
+ "key"
5994
+ ],
5995
+ "returns": "Promise<boolean>"
5996
+ },
5997
+ "expire": {
5998
+ "description": "Set a key's TTL in seconds.",
5999
+ "parameters": {
6000
+ "key": {
6001
+ "type": "string",
6002
+ "description": "The key name"
6003
+ },
6004
+ "seconds": {
6005
+ "type": "number",
6006
+ "description": "TTL in seconds"
6007
+ }
6008
+ },
6009
+ "required": [
6010
+ "key",
6011
+ "seconds"
6012
+ ],
6013
+ "returns": "Promise<boolean>"
6014
+ },
6015
+ "keys": {
6016
+ "description": "Find keys matching a glob pattern (respects prefix).",
6017
+ "parameters": {
6018
+ "pattern": {
6019
+ "type": "string",
6020
+ "description": "Glob pattern, e.g. \"worker:*\""
6021
+ }
6022
+ },
6023
+ "required": [],
6024
+ "returns": "Promise<string[]>"
6025
+ },
6026
+ "setJSON": {
6027
+ "description": "Store a value as JSON.",
6028
+ "parameters": {
6029
+ "key": {
6030
+ "type": "string",
6031
+ "description": "The key name"
6032
+ },
6033
+ "value": {
6034
+ "type": "unknown",
6035
+ "description": "Any JSON-serializable value"
6036
+ },
6037
+ "ttl": {
6038
+ "type": "number",
6039
+ "description": "Optional TTL in seconds"
6040
+ }
6041
+ },
6042
+ "required": [
6043
+ "key",
6044
+ "value"
6045
+ ],
6046
+ "returns": "Promise<void>"
6047
+ },
6048
+ "getJSON": {
6049
+ "description": "Retrieve and parse a JSON value.",
6050
+ "parameters": {
6051
+ "key": {
6052
+ "type": "string",
6053
+ "description": "The key name"
6054
+ }
6055
+ },
6056
+ "required": [
6057
+ "key"
6058
+ ],
6059
+ "returns": "Promise<T | null>"
6060
+ },
6061
+ "hset": {
6062
+ "description": "Set fields on a hash.",
6063
+ "parameters": {
6064
+ "key": {
6065
+ "type": "string",
6066
+ "description": "The hash key"
6067
+ },
6068
+ "fields": {
6069
+ "type": "Record<string, string>",
6070
+ "description": "Object of field/value pairs"
6071
+ }
6072
+ },
6073
+ "required": [
6074
+ "key",
6075
+ "fields"
6076
+ ],
6077
+ "returns": "Promise<void>"
6078
+ },
6079
+ "hgetall": {
6080
+ "description": "Get all fields from a hash.",
6081
+ "parameters": {
6082
+ "key": {
6083
+ "type": "string",
6084
+ "description": "The hash key"
6085
+ }
6086
+ },
6087
+ "required": [
6088
+ "key"
6089
+ ],
6090
+ "returns": "Promise<Record<string, string>>"
6091
+ },
6092
+ "hget": {
6093
+ "description": "Get a single field from a hash.",
6094
+ "parameters": {
6095
+ "key": {
6096
+ "type": "string",
6097
+ "description": "The hash key"
6098
+ },
6099
+ "field": {
6100
+ "type": "string",
6101
+ "description": "The field name"
6102
+ }
6103
+ },
6104
+ "required": [
6105
+ "key",
6106
+ "field"
6107
+ ],
6108
+ "returns": "Promise<string | null>"
6109
+ },
6110
+ "subscribe": {
6111
+ "description": "Subscribe to one or more channels. Optionally pass a handler that fires only for these channels. The feature also emits a `message` event for all messages.",
6112
+ "parameters": {
6113
+ "channels": {
6114
+ "type": "string | string[]",
6115
+ "description": "Channel name(s) to subscribe to"
6116
+ },
6117
+ "handler": {
6118
+ "type": "MessageHandler",
6119
+ "description": "Optional per-channel message handler"
6120
+ }
6121
+ },
6122
+ "required": [
6123
+ "channels"
6124
+ ],
6125
+ "returns": "Promise<void>",
6126
+ "examples": [
6127
+ {
6128
+ "language": "ts",
6129
+ "code": "await redis.subscribe('tasks', (channel, msg) => {\n console.log(`Got ${msg} on ${channel}`)\n})"
6130
+ }
6131
+ ]
6132
+ },
6133
+ "unsubscribe": {
6134
+ "description": "Unsubscribe from one or more channels.",
6135
+ "parameters": {
6136
+ "channels": {
6137
+ "type": "string[]",
6138
+ "description": "Channel name(s) to unsubscribe from"
6139
+ }
6140
+ },
6141
+ "required": [
6142
+ "channels"
6143
+ ],
6144
+ "returns": "Promise<void>"
6145
+ },
6146
+ "publish": {
6147
+ "description": "Publish a message to a channel.",
6148
+ "parameters": {
6149
+ "channel": {
6150
+ "type": "string",
6151
+ "description": "The channel to publish to"
6152
+ },
6153
+ "message": {
6154
+ "type": "string",
6155
+ "description": "The message string (use JSON.stringify for objects)"
6156
+ }
6157
+ },
6158
+ "required": [
6159
+ "channel",
6160
+ "message"
6161
+ ],
6162
+ "returns": "Promise<number>"
6163
+ },
6164
+ "ensureLocalDocker": {
6165
+ "description": "Spin up a local Redis instance via Docker. Checks if a container with the given name already exists and starts it if stopped, or creates a new one from redis:alpine. Requires the docker feature to be available on the container.",
6166
+ "parameters": {
6167
+ "options": {
6168
+ "type": "{ name?: string; port?: number; image?: string }",
6169
+ "description": "Container name and host port"
6170
+ }
6171
+ },
6172
+ "required": [],
6173
+ "returns": "Promise<string>",
6174
+ "examples": [
6175
+ {
6176
+ "language": "ts",
6177
+ "code": "const redis = container.feature('redis', { url: 'redis://localhost:6379', lazyConnect: true })\nawait redis.ensureLocalDocker()"
6178
+ }
6179
+ ]
6180
+ },
6181
+ "close": {
6182
+ "description": "Close all redis connections (main client + subscriber).",
6183
+ "parameters": {},
6184
+ "required": [],
6185
+ "returns": "Promise<this>"
6186
+ }
6187
+ },
6188
+ "getters": {
6189
+ "client": {
6190
+ "description": "The underlying ioredis client for advanced operations.",
6191
+ "returns": "Redis"
6192
+ },
6193
+ "subscriber": {
6194
+ "description": "The dedicated subscriber connection, if pub/sub is active.",
6195
+ "returns": "Redis | null"
6196
+ }
6197
+ },
6198
+ "events": {
6199
+ "message": {
6200
+ "name": "message",
6201
+ "description": "Event emitted by RedisFeature",
6202
+ "arguments": {}
6203
+ },
6204
+ "error": {
6205
+ "name": "error",
6206
+ "description": "Event emitted by RedisFeature",
6207
+ "arguments": {}
6208
+ },
6209
+ "subscribed": {
6210
+ "name": "subscribed",
6211
+ "description": "Event emitted by RedisFeature",
6212
+ "arguments": {}
6213
+ },
6214
+ "unsubscribed": {
6215
+ "name": "unsubscribed",
6216
+ "description": "Event emitted by RedisFeature",
6217
+ "arguments": {}
6218
+ },
6219
+ "closed": {
6220
+ "name": "closed",
6221
+ "description": "Event emitted by RedisFeature",
6222
+ "arguments": {}
6223
+ }
6224
+ },
6225
+ "state": {},
6226
+ "options": {},
6227
+ "envVars": [],
6228
+ "examples": [
6229
+ {
6230
+ "language": "ts",
6231
+ "code": "const redis = container.feature('redis', { url: 'redis://localhost:6379' })\n\n// Shared state\nawait redis.set('worker:status', 'active')\nconst status = await redis.get('worker:status')\n\n// Pub/sub between instances\nredis.on('message', (channel, msg) => console.log(`${channel}: ${msg}`))\nawait redis.subscribe('tasks')\nawait redis.publish('tasks', JSON.stringify({ type: 'ping' }))\n\n// JSON helpers\nawait redis.setJSON('config', { workers: 4, debug: true })\nconst config = await redis.getJSON<{ workers: number }>('config')"
6232
+ }
6233
+ ]
6234
+ });
6235
+
5930
6236
  setBuildTimeData('features.fs', {
5931
6237
  "id": "features.fs",
5932
6238
  "description": "The FS feature provides methods for interacting with the file system, relative to the container's cwd.",
@@ -7566,7 +7872,7 @@ setBuildTimeData('features.postgres', {
7566
7872
 
7567
7873
  setBuildTimeData('features.python', {
7568
7874
  "id": "features.python",
7569
- "description": "The Python VM feature provides Python virtual machine capabilities for executing Python code. This feature automatically detects Python environments (uv, conda, venv, system) and provides methods to install dependencies and execute Python scripts. It can manage project-specific Python environments and maintain context between executions.",
7875
+ "description": "The Python VM feature provides Python virtual machine capabilities for executing Python code. This feature automatically detects Python environments (uv, conda, venv, system) and provides methods to install dependencies and execute Python scripts. It can manage project-specific Python environments and maintain context between executions. Supports two modes: - **Stateless** (default): `execute()` and `executeFile()` spawn a fresh process per call - **Persistent session**: `startSession()` spawns a long-lived bridge process that maintains state across `run()` calls, enabling real codebase interaction with imports and session variables",
7570
7876
  "shortcut": "features.python",
7571
7877
  "className": "Python",
7572
7878
  "methods": {
@@ -7666,37 +7972,177 @@ setBuildTimeData('features.python', {
7666
7972
  "parameters": {},
7667
7973
  "required": [],
7668
7974
  "returns": "Promise<{ version: string; path: string; packages: string[] }>"
7669
- }
7670
- },
7671
- "getters": {
7672
- "projectDir": {
7673
- "description": "Returns the root directory of the Python project.",
7674
- "returns": "any"
7675
- },
7676
- "pythonPath": {
7677
- "description": "Returns the path to the Python executable for this environment.",
7678
- "returns": "any"
7679
7975
  },
7680
- "environmentType": {
7681
- "description": "Returns the detected environment type: 'uv', 'conda', 'venv', or 'system'.",
7682
- "returns": "any"
7683
- }
7684
- },
7685
- "events": {
7686
- "ready": {
7687
- "name": "ready",
7688
- "description": "Event emitted by Python",
7689
- "arguments": {}
7976
+ "startSession": {
7977
+ "description": "Starts a persistent Python session by spawning the bridge process. The bridge sets up sys.path for the project directory, then enters a JSON-line REPL loop. State (variables, imports) persists across run() calls until stopSession() or resetSession() is called.",
7978
+ "parameters": {},
7979
+ "required": [],
7980
+ "returns": "Promise<void>",
7981
+ "examples": [
7982
+ {
7983
+ "language": "ts",
7984
+ "code": "const python = container.feature('python', { dir: '/path/to/project' })\nawait python.enable()\nawait python.startSession()\nawait python.run('x = 42')\nconst result = await python.run('print(x)')\nconsole.log(result.stdout) // '42\\n'\nawait python.stopSession()"
7985
+ }
7986
+ ]
7690
7987
  },
7691
- "environmentDetected": {
7692
- "name": "environmentDetected",
7693
- "description": "Event emitted by Python",
7694
- "arguments": {}
7988
+ "stopSession": {
7989
+ "description": "Stops the persistent Python session and cleans up the bridge process.",
7990
+ "parameters": {},
7991
+ "required": [],
7992
+ "returns": "Promise<void>",
7993
+ "examples": [
7994
+ {
7995
+ "language": "ts",
7996
+ "code": "await python.stopSession()"
7997
+ }
7998
+ ]
7695
7999
  },
7696
- "installingDependencies": {
7697
- "name": "installingDependencies",
7698
- "description": "Event emitted by Python",
7699
- "arguments": {}
8000
+ "run": {
8001
+ "description": "Executes Python code in the persistent session. Variables and imports survive across calls. This is the session equivalent of execute().",
8002
+ "parameters": {
8003
+ "code": {
8004
+ "type": "string",
8005
+ "description": "Python code to execute"
8006
+ },
8007
+ "variables": {
8008
+ "type": "Record<string, any>",
8009
+ "description": "Variables to inject into the namespace before execution"
8010
+ }
8011
+ },
8012
+ "required": [
8013
+ "code"
8014
+ ],
8015
+ "returns": "Promise<RunResult>",
8016
+ "examples": [
8017
+ {
8018
+ "language": "ts",
8019
+ "code": "await python.startSession()\n\n// State persists across calls\nawait python.run('x = 42')\nconst result = await python.run('print(x * 2)')\nconsole.log(result.stdout) // '84\\n'\n\n// Inject variables from JS\nconst result2 = await python.run('print(f\"Hello {name}!\")', { name: 'World' })\nconsole.log(result2.stdout) // 'Hello World!\\n'"
8020
+ }
8021
+ ]
8022
+ },
8023
+ "eval": {
8024
+ "description": "Evaluates a Python expression in the persistent session and returns its value.",
8025
+ "parameters": {
8026
+ "expression": {
8027
+ "type": "string",
8028
+ "description": "Python expression to evaluate"
8029
+ }
8030
+ },
8031
+ "required": [
8032
+ "expression"
8033
+ ],
8034
+ "returns": "Promise<any>",
8035
+ "examples": [
8036
+ {
8037
+ "language": "ts",
8038
+ "code": "await python.run('x = 42')\nconst result = await python.eval('x * 2')\nconsole.log(result) // 84"
8039
+ }
8040
+ ]
8041
+ },
8042
+ "importModule": {
8043
+ "description": "Imports a Python module into the persistent session namespace.",
8044
+ "parameters": {
8045
+ "moduleName": {
8046
+ "type": "string",
8047
+ "description": "Dotted module path (e.g. 'myapp.models')"
8048
+ },
8049
+ "alias": {
8050
+ "type": "string",
8051
+ "description": "Optional alias for the import (defaults to the last segment)"
8052
+ }
8053
+ },
8054
+ "required": [
8055
+ "moduleName"
8056
+ ],
8057
+ "returns": "Promise<void>",
8058
+ "examples": [
8059
+ {
8060
+ "language": "ts",
8061
+ "code": "await python.importModule('json')\nawait python.importModule('myapp.models', 'models')\nconst result = await python.eval('models.User')"
8062
+ }
8063
+ ]
8064
+ },
8065
+ "call": {
8066
+ "description": "Calls a function by dotted path in the persistent session namespace.",
8067
+ "parameters": {
8068
+ "funcPath": {
8069
+ "type": "string",
8070
+ "description": "Dotted path to the function (e.g. 'json.dumps' or 'my_func')"
8071
+ },
8072
+ "args": {
8073
+ "type": "any[]",
8074
+ "description": "Positional arguments"
8075
+ },
8076
+ "kwargs": {
8077
+ "type": "Record<string, any>",
8078
+ "description": "Keyword arguments"
8079
+ }
8080
+ },
8081
+ "required": [
8082
+ "funcPath"
8083
+ ],
8084
+ "returns": "Promise<any>",
8085
+ "examples": [
8086
+ {
8087
+ "language": "ts",
8088
+ "code": "await python.importModule('json')\nconst result = await python.call('json.dumps', [{ a: 1 }], { indent: 2 })"
8089
+ }
8090
+ ]
8091
+ },
8092
+ "getLocals": {
8093
+ "description": "Returns all non-dunder variables from the persistent session namespace.",
8094
+ "parameters": {},
8095
+ "required": [],
8096
+ "returns": "Promise<Record<string, any>>",
8097
+ "examples": [
8098
+ {
8099
+ "language": "ts",
8100
+ "code": "await python.run('x = 42\\ny = \"hello\"')\nconst locals = await python.getLocals()\nconsole.log(locals) // { x: 42, y: 'hello' }"
8101
+ }
8102
+ ]
8103
+ },
8104
+ "resetSession": {
8105
+ "description": "Clears all variables and imports from the persistent session namespace. The session remains active — you can continue calling run() after reset.",
8106
+ "parameters": {},
8107
+ "required": [],
8108
+ "returns": "Promise<void>",
8109
+ "examples": [
8110
+ {
8111
+ "language": "ts",
8112
+ "code": "await python.run('x = 42')\nawait python.resetSession()\n// x is now undefined"
8113
+ }
8114
+ ]
8115
+ }
8116
+ },
8117
+ "getters": {
8118
+ "projectDir": {
8119
+ "description": "Returns the root directory of the Python project.",
8120
+ "returns": "any"
8121
+ },
8122
+ "pythonPath": {
8123
+ "description": "Returns the path to the Python executable for this environment.",
8124
+ "returns": "any"
8125
+ },
8126
+ "environmentType": {
8127
+ "description": "Returns the detected environment type: 'uv', 'conda', 'venv', or 'system'.",
8128
+ "returns": "any"
8129
+ }
8130
+ },
8131
+ "events": {
8132
+ "ready": {
8133
+ "name": "ready",
8134
+ "description": "Event emitted by Python",
8135
+ "arguments": {}
8136
+ },
8137
+ "environmentDetected": {
8138
+ "name": "environmentDetected",
8139
+ "description": "Event emitted by Python",
8140
+ "arguments": {}
8141
+ },
8142
+ "installingDependencies": {
8143
+ "name": "installingDependencies",
8144
+ "description": "Event emitted by Python",
8145
+ "arguments": {}
7700
8146
  },
7701
8147
  "dependenciesInstalled": {
7702
8148
  "name": "dependenciesInstalled",
@@ -7722,6 +8168,21 @@ setBuildTimeData('features.python', {
7722
8168
  "name": "fileExecuted",
7723
8169
  "description": "Event emitted by Python",
7724
8170
  "arguments": {}
8171
+ },
8172
+ "sessionError": {
8173
+ "name": "sessionError",
8174
+ "description": "Event emitted by Python",
8175
+ "arguments": {}
8176
+ },
8177
+ "sessionStarted": {
8178
+ "name": "sessionStarted",
8179
+ "description": "Event emitted by Python",
8180
+ "arguments": {}
8181
+ },
8182
+ "sessionStopped": {
8183
+ "name": "sessionStopped",
8184
+ "description": "Event emitted by Python",
8185
+ "arguments": {}
7725
8186
  }
7726
8187
  },
7727
8188
  "state": {},
@@ -7730,9 +8191,38 @@ setBuildTimeData('features.python', {
7730
8191
  "examples": [
7731
8192
  {
7732
8193
  "language": "ts",
7733
- "code": "const python = container.feature('python', { \n dir: \"/path/to/python/project\",\n contextScript: \"/path/to/setup-context.py\"\n})\n\n// Auto-install dependencies\nawait python.installDependencies()\n\n// Execute Python code\nconst result = await python.execute('print(\"Hello from Python!\")')\n\n// Execute with custom variables\nconst result2 = await python.execute('print(f\"Hello {name}!\")', { name: 'World' })"
8194
+ "code": "const python = container.feature('python', {\n dir: \"/path/to/python/project\",\n})\n\n// Stateless execution\nconst result = await python.execute('print(\"Hello from Python!\")')\n\n// Persistent session\nawait python.startSession()\nawait python.run('import myapp.models')\nawait python.run('users = myapp.models.User.objects.all()')\nconst result = await python.run('print(len(users))')\nawait python.stopSession()"
7734
8195
  }
7735
- ]
8196
+ ],
8197
+ "types": {
8198
+ "RunResult": {
8199
+ "description": "Result from a persistent session run() call.",
8200
+ "properties": {
8201
+ "ok": {
8202
+ "type": "boolean",
8203
+ "description": ""
8204
+ },
8205
+ "result": {
8206
+ "type": "any",
8207
+ "description": ""
8208
+ },
8209
+ "stdout": {
8210
+ "type": "string",
8211
+ "description": ""
8212
+ },
8213
+ "error": {
8214
+ "type": "string",
8215
+ "description": "",
8216
+ "optional": true
8217
+ },
8218
+ "traceback": {
8219
+ "type": "string",
8220
+ "description": "",
8221
+ "optional": true
8222
+ }
8223
+ }
8224
+ }
8225
+ }
7736
8226
  });
7737
8227
 
7738
8228
  setBuildTimeData('features.jsonTree', {
@@ -11696,334 +12186,70 @@ setBuildTimeData('clients.openai', {
11696
12186
  ]
11697
12187
  });
11698
12188
 
11699
- setBuildTimeData('clients.elevenlabs', {
11700
- "id": "clients.elevenlabs",
11701
- "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.",
11702
- "shortcut": "clients.elevenlabs",
11703
- "className": "ElevenLabsClient",
12189
+ setBuildTimeData('clients.supabase', {
12190
+ "id": "clients.supabase",
12191
+ "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).",
12192
+ "shortcut": "clients.supabase",
12193
+ "className": "SupabaseClient",
11704
12194
  "methods": {
11705
- "beforeRequest": {
11706
- "description": "Inject the xi-api-key header before each request.",
11707
- "parameters": {},
11708
- "required": [],
11709
- "returns": "void"
11710
- },
11711
- "connect": {
11712
- "description": "Validate the API key by listing available models.",
11713
- "parameters": {},
11714
- "required": [],
11715
- "returns": "Promise<this>",
11716
- "examples": [
11717
- {
11718
- "language": "ts",
11719
- "code": "await el.connect()"
12195
+ "from": {
12196
+ "description": "Start a query on a Postgres table or view.",
12197
+ "parameters": {
12198
+ "table": {
12199
+ "type": "string",
12200
+ "description": "The table or view name to query"
11720
12201
  }
11721
- ]
12202
+ },
12203
+ "required": [
12204
+ "table"
12205
+ ],
12206
+ "returns": "void"
11722
12207
  },
11723
- "listVoices": {
11724
- "description": "List available voices with optional search and filtering.",
12208
+ "rpc": {
12209
+ "description": "Call a Postgres function (RPC).",
11725
12210
  "parameters": {
12211
+ "fn": {
12212
+ "type": "string",
12213
+ "description": "The function name"
12214
+ },
12215
+ "params": {
12216
+ "type": "Record<string, unknown>",
12217
+ "description": "Arguments to pass to the function"
12218
+ },
11726
12219
  "options": {
11727
- "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
11728
- "description": "Query parameters for filtering voices"
12220
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
12221
+ "description": "Optional settings (head, get, count)"
11729
12222
  }
11730
12223
  },
11731
- "required": [],
11732
- "returns": "Promise<any>",
11733
- "examples": [
11734
- {
11735
- "language": "ts",
11736
- "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
11737
- }
11738
- ]
12224
+ "required": [
12225
+ "fn"
12226
+ ],
12227
+ "returns": "void"
11739
12228
  },
11740
- "getVoice": {
11741
- "description": "Get details for a single voice.",
12229
+ "signInWithPassword": {
12230
+ "description": "Sign in with email and password.",
11742
12231
  "parameters": {
11743
- "voiceId": {
12232
+ "email": {
11744
12233
  "type": "string",
11745
- "description": "The voice ID to look up"
12234
+ "description": "Parameter email"
12235
+ },
12236
+ "password": {
12237
+ "type": "string",
12238
+ "description": "Parameter password"
11746
12239
  }
11747
12240
  },
11748
12241
  "required": [
11749
- "voiceId"
12242
+ "email",
12243
+ "password"
11750
12244
  ],
11751
- "returns": "Promise<any>",
11752
- "examples": [
11753
- {
11754
- "language": "ts",
11755
- "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
11756
- }
11757
- ]
11758
- },
11759
- "listModels": {
11760
- "description": "List available TTS models.",
11761
- "parameters": {},
11762
- "required": [],
11763
- "returns": "Promise<any[]>",
11764
- "examples": [
11765
- {
11766
- "language": "ts",
11767
- "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
11768
- }
11769
- ]
12245
+ "returns": "void"
11770
12246
  },
11771
- "synthesize": {
11772
- "description": "Synthesize speech from text, returning audio as a Buffer.",
12247
+ "signUp": {
12248
+ "description": "Create a new user account with email and password.",
11773
12249
  "parameters": {
11774
- "text": {
12250
+ "email": {
11775
12251
  "type": "string",
11776
- "description": "The text to convert to speech"
11777
- },
11778
- "options": {
11779
- "type": "SynthesizeOptions",
11780
- "description": "Voice, model, format, and voice settings overrides",
11781
- "properties": {
11782
- "voiceId": {
11783
- "type": "string",
11784
- "description": ""
11785
- },
11786
- "modelId": {
11787
- "type": "string",
11788
- "description": ""
11789
- },
11790
- "outputFormat": {
11791
- "type": "string",
11792
- "description": ""
11793
- },
11794
- "voiceSettings": {
11795
- "type": "ElevenLabsVoiceSettings",
11796
- "description": ""
11797
- },
11798
- "disableCache": {
11799
- "type": "boolean",
11800
- "description": ""
11801
- }
11802
- }
11803
- }
11804
- },
11805
- "required": [
11806
- "text"
11807
- ],
11808
- "returns": "Promise<Buffer>",
11809
- "examples": [
11810
- {
11811
- "language": "ts",
11812
- "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})"
11813
- }
11814
- ]
11815
- },
11816
- "say": {
11817
- "description": "Synthesize speech and write the audio to a file.",
11818
- "parameters": {
11819
- "text": {
11820
- "type": "string",
11821
- "description": "The text to convert to speech"
11822
- },
11823
- "outputPath": {
11824
- "type": "string",
11825
- "description": "File path to write the audio to"
11826
- },
11827
- "options": {
11828
- "type": "SynthesizeOptions",
11829
- "description": "Voice, model, format, and voice settings overrides",
11830
- "properties": {
11831
- "voiceId": {
11832
- "type": "string",
11833
- "description": ""
11834
- },
11835
- "modelId": {
11836
- "type": "string",
11837
- "description": ""
11838
- },
11839
- "outputFormat": {
11840
- "type": "string",
11841
- "description": ""
11842
- },
11843
- "voiceSettings": {
11844
- "type": "ElevenLabsVoiceSettings",
11845
- "description": ""
11846
- },
11847
- "disableCache": {
11848
- "type": "boolean",
11849
- "description": ""
11850
- }
11851
- }
11852
- }
11853
- },
11854
- "required": [
11855
- "text",
11856
- "outputPath"
11857
- ],
11858
- "returns": "Promise<string>",
11859
- "examples": [
11860
- {
11861
- "language": "ts",
11862
- "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
11863
- }
11864
- ]
11865
- }
11866
- },
11867
- "getters": {
11868
- "apiKey": {
11869
- "description": "The resolved API key from options or environment.",
11870
- "returns": "string"
11871
- }
11872
- },
11873
- "events": {
11874
- "failure": {
11875
- "name": "failure",
11876
- "description": "Event emitted by ElevenLabsClient",
11877
- "arguments": {}
11878
- },
11879
- "voices": {
11880
- "name": "voices",
11881
- "description": "Event emitted by ElevenLabsClient",
11882
- "arguments": {}
11883
- },
11884
- "speech": {
11885
- "name": "speech",
11886
- "description": "Event emitted by ElevenLabsClient",
11887
- "arguments": {}
11888
- }
11889
- },
11890
- "state": {},
11891
- "options": {},
11892
- "envVars": [],
11893
- "examples": [
11894
- {
11895
- "language": "ts",
11896
- "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"
11897
- }
11898
- ],
11899
- "types": {
11900
- "SynthesizeOptions": {
11901
- "description": "",
11902
- "properties": {
11903
- "voiceId": {
11904
- "type": "string",
11905
- "description": "",
11906
- "optional": true
11907
- },
11908
- "modelId": {
11909
- "type": "string",
11910
- "description": "",
11911
- "optional": true
11912
- },
11913
- "outputFormat": {
11914
- "type": "string",
11915
- "description": "",
11916
- "optional": true
11917
- },
11918
- "voiceSettings": {
11919
- "type": "ElevenLabsVoiceSettings",
11920
- "description": "",
11921
- "optional": true
11922
- },
11923
- "disableCache": {
11924
- "type": "boolean",
11925
- "description": "",
11926
- "optional": true
11927
- }
11928
- }
11929
- },
11930
- "ElevenLabsVoiceSettings": {
11931
- "description": "",
11932
- "properties": {
11933
- "stability": {
11934
- "type": "number",
11935
- "description": "",
11936
- "optional": true
11937
- },
11938
- "similarityBoost": {
11939
- "type": "number",
11940
- "description": "",
11941
- "optional": true
11942
- },
11943
- "style": {
11944
- "type": "number",
11945
- "description": "",
11946
- "optional": true
11947
- },
11948
- "speed": {
11949
- "type": "number",
11950
- "description": "",
11951
- "optional": true
11952
- },
11953
- "useSpeakerBoost": {
11954
- "type": "boolean",
11955
- "description": "",
11956
- "optional": true
11957
- }
11958
- }
11959
- }
11960
- }
11961
- });
11962
-
11963
- setBuildTimeData('clients.supabase', {
11964
- "id": "clients.supabase",
11965
- "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).",
11966
- "shortcut": "clients.supabase",
11967
- "className": "SupabaseClient",
11968
- "methods": {
11969
- "from": {
11970
- "description": "Start a query on a Postgres table or view.",
11971
- "parameters": {
11972
- "table": {
11973
- "type": "string",
11974
- "description": "The table or view name to query"
11975
- }
11976
- },
11977
- "required": [
11978
- "table"
11979
- ],
11980
- "returns": "void"
11981
- },
11982
- "rpc": {
11983
- "description": "Call a Postgres function (RPC).",
11984
- "parameters": {
11985
- "fn": {
11986
- "type": "string",
11987
- "description": "The function name"
11988
- },
11989
- "params": {
11990
- "type": "Record<string, unknown>",
11991
- "description": "Arguments to pass to the function"
11992
- },
11993
- "options": {
11994
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
11995
- "description": "Optional settings (head, get, count)"
11996
- }
11997
- },
11998
- "required": [
11999
- "fn"
12000
- ],
12001
- "returns": "void"
12002
- },
12003
- "signInWithPassword": {
12004
- "description": "Sign in with email and password.",
12005
- "parameters": {
12006
- "email": {
12007
- "type": "string",
12008
- "description": "Parameter email"
12009
- },
12010
- "password": {
12011
- "type": "string",
12012
- "description": "Parameter password"
12013
- }
12014
- },
12015
- "required": [
12016
- "email",
12017
- "password"
12018
- ],
12019
- "returns": "void"
12020
- },
12021
- "signUp": {
12022
- "description": "Create a new user account with email and password.",
12023
- "parameters": {
12024
- "email": {
12025
- "type": "string",
12026
- "description": "Parameter email"
12252
+ "description": "Parameter email"
12027
12253
  },
12028
12254
  "password": {
12029
12255
  "type": "string",
@@ -12135,25 +12361,289 @@ setBuildTimeData('clients.supabase', {
12135
12361
  "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
12136
12362
  "returns": "SupabaseSDKClient<any, any>"
12137
12363
  },
12138
- "storage": {
12139
- "description": "Returns the Supabase Storage client for managing buckets and files.",
12140
- "returns": "any"
12364
+ "storage": {
12365
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
12366
+ "returns": "any"
12367
+ },
12368
+ "functions": {
12369
+ "description": "Returns the Supabase Functions client.",
12370
+ "returns": "any"
12371
+ }
12372
+ },
12373
+ "events": {},
12374
+ "state": {},
12375
+ "options": {},
12376
+ "envVars": [],
12377
+ "examples": [
12378
+ {
12379
+ "language": "ts",
12380
+ "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})"
12381
+ }
12382
+ ]
12383
+ });
12384
+
12385
+ setBuildTimeData('clients.elevenlabs', {
12386
+ "id": "clients.elevenlabs",
12387
+ "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.",
12388
+ "shortcut": "clients.elevenlabs",
12389
+ "className": "ElevenLabsClient",
12390
+ "methods": {
12391
+ "beforeRequest": {
12392
+ "description": "Inject the xi-api-key header before each request.",
12393
+ "parameters": {},
12394
+ "required": [],
12395
+ "returns": "void"
12396
+ },
12397
+ "connect": {
12398
+ "description": "Validate the API key by listing available models.",
12399
+ "parameters": {},
12400
+ "required": [],
12401
+ "returns": "Promise<this>",
12402
+ "examples": [
12403
+ {
12404
+ "language": "ts",
12405
+ "code": "await el.connect()"
12406
+ }
12407
+ ]
12408
+ },
12409
+ "listVoices": {
12410
+ "description": "List available voices with optional search and filtering.",
12411
+ "parameters": {
12412
+ "options": {
12413
+ "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
12414
+ "description": "Query parameters for filtering voices"
12415
+ }
12416
+ },
12417
+ "required": [],
12418
+ "returns": "Promise<any>",
12419
+ "examples": [
12420
+ {
12421
+ "language": "ts",
12422
+ "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
12423
+ }
12424
+ ]
12425
+ },
12426
+ "getVoice": {
12427
+ "description": "Get details for a single voice.",
12428
+ "parameters": {
12429
+ "voiceId": {
12430
+ "type": "string",
12431
+ "description": "The voice ID to look up"
12432
+ }
12433
+ },
12434
+ "required": [
12435
+ "voiceId"
12436
+ ],
12437
+ "returns": "Promise<any>",
12438
+ "examples": [
12439
+ {
12440
+ "language": "ts",
12441
+ "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
12442
+ }
12443
+ ]
12444
+ },
12445
+ "listModels": {
12446
+ "description": "List available TTS models.",
12447
+ "parameters": {},
12448
+ "required": [],
12449
+ "returns": "Promise<any[]>",
12450
+ "examples": [
12451
+ {
12452
+ "language": "ts",
12453
+ "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
12454
+ }
12455
+ ]
12456
+ },
12457
+ "synthesize": {
12458
+ "description": "Synthesize speech from text, returning audio as a Buffer.",
12459
+ "parameters": {
12460
+ "text": {
12461
+ "type": "string",
12462
+ "description": "The text to convert to speech"
12463
+ },
12464
+ "options": {
12465
+ "type": "SynthesizeOptions",
12466
+ "description": "Voice, model, format, and voice settings overrides",
12467
+ "properties": {
12468
+ "voiceId": {
12469
+ "type": "string",
12470
+ "description": ""
12471
+ },
12472
+ "modelId": {
12473
+ "type": "string",
12474
+ "description": ""
12475
+ },
12476
+ "outputFormat": {
12477
+ "type": "string",
12478
+ "description": ""
12479
+ },
12480
+ "voiceSettings": {
12481
+ "type": "ElevenLabsVoiceSettings",
12482
+ "description": ""
12483
+ },
12484
+ "disableCache": {
12485
+ "type": "boolean",
12486
+ "description": ""
12487
+ }
12488
+ }
12489
+ }
12490
+ },
12491
+ "required": [
12492
+ "text"
12493
+ ],
12494
+ "returns": "Promise<Buffer>",
12495
+ "examples": [
12496
+ {
12497
+ "language": "ts",
12498
+ "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})"
12499
+ }
12500
+ ]
12501
+ },
12502
+ "say": {
12503
+ "description": "Synthesize speech and write the audio to a file.",
12504
+ "parameters": {
12505
+ "text": {
12506
+ "type": "string",
12507
+ "description": "The text to convert to speech"
12508
+ },
12509
+ "outputPath": {
12510
+ "type": "string",
12511
+ "description": "File path to write the audio to"
12512
+ },
12513
+ "options": {
12514
+ "type": "SynthesizeOptions",
12515
+ "description": "Voice, model, format, and voice settings overrides",
12516
+ "properties": {
12517
+ "voiceId": {
12518
+ "type": "string",
12519
+ "description": ""
12520
+ },
12521
+ "modelId": {
12522
+ "type": "string",
12523
+ "description": ""
12524
+ },
12525
+ "outputFormat": {
12526
+ "type": "string",
12527
+ "description": ""
12528
+ },
12529
+ "voiceSettings": {
12530
+ "type": "ElevenLabsVoiceSettings",
12531
+ "description": ""
12532
+ },
12533
+ "disableCache": {
12534
+ "type": "boolean",
12535
+ "description": ""
12536
+ }
12537
+ }
12538
+ }
12539
+ },
12540
+ "required": [
12541
+ "text",
12542
+ "outputPath"
12543
+ ],
12544
+ "returns": "Promise<string>",
12545
+ "examples": [
12546
+ {
12547
+ "language": "ts",
12548
+ "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
12549
+ }
12550
+ ]
12551
+ }
12552
+ },
12553
+ "getters": {
12554
+ "apiKey": {
12555
+ "description": "The resolved API key from options or environment.",
12556
+ "returns": "string"
12557
+ }
12558
+ },
12559
+ "events": {
12560
+ "failure": {
12561
+ "name": "failure",
12562
+ "description": "Event emitted by ElevenLabsClient",
12563
+ "arguments": {}
12564
+ },
12565
+ "voices": {
12566
+ "name": "voices",
12567
+ "description": "Event emitted by ElevenLabsClient",
12568
+ "arguments": {}
12141
12569
  },
12142
- "functions": {
12143
- "description": "Returns the Supabase Functions client.",
12144
- "returns": "any"
12570
+ "speech": {
12571
+ "name": "speech",
12572
+ "description": "Event emitted by ElevenLabsClient",
12573
+ "arguments": {}
12145
12574
  }
12146
12575
  },
12147
- "events": {},
12148
12576
  "state": {},
12149
12577
  "options": {},
12150
12578
  "envVars": [],
12151
12579
  "examples": [
12152
12580
  {
12153
12581
  "language": "ts",
12154
- "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})"
12582
+ "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"
12155
12583
  }
12156
- ]
12584
+ ],
12585
+ "types": {
12586
+ "SynthesizeOptions": {
12587
+ "description": "",
12588
+ "properties": {
12589
+ "voiceId": {
12590
+ "type": "string",
12591
+ "description": "",
12592
+ "optional": true
12593
+ },
12594
+ "modelId": {
12595
+ "type": "string",
12596
+ "description": "",
12597
+ "optional": true
12598
+ },
12599
+ "outputFormat": {
12600
+ "type": "string",
12601
+ "description": "",
12602
+ "optional": true
12603
+ },
12604
+ "voiceSettings": {
12605
+ "type": "ElevenLabsVoiceSettings",
12606
+ "description": "",
12607
+ "optional": true
12608
+ },
12609
+ "disableCache": {
12610
+ "type": "boolean",
12611
+ "description": "",
12612
+ "optional": true
12613
+ }
12614
+ }
12615
+ },
12616
+ "ElevenLabsVoiceSettings": {
12617
+ "description": "",
12618
+ "properties": {
12619
+ "stability": {
12620
+ "type": "number",
12621
+ "description": "",
12622
+ "optional": true
12623
+ },
12624
+ "similarityBoost": {
12625
+ "type": "number",
12626
+ "description": "",
12627
+ "optional": true
12628
+ },
12629
+ "style": {
12630
+ "type": "number",
12631
+ "description": "",
12632
+ "optional": true
12633
+ },
12634
+ "speed": {
12635
+ "type": "number",
12636
+ "description": "",
12637
+ "optional": true
12638
+ },
12639
+ "useSpeakerBoost": {
12640
+ "type": "boolean",
12641
+ "description": "",
12642
+ "optional": true
12643
+ }
12644
+ }
12645
+ }
12646
+ }
12157
12647
  });
12158
12648
 
12159
12649
  setBuildTimeData('clients.comfyui', {
@@ -13185,7 +13675,7 @@ setContainerBuildTimeData('Container', {
13185
13675
  }
13186
13676
  ]
13187
13677
  },
13188
- "inspect": {
13678
+ "introspect": {
13189
13679
  "description": "Returns a full introspection object for this container, merging build-time AST data (JSDoc descriptions, methods, getters) with runtime data (registries, factories, state, environment).",
13190
13680
  "parameters": {},
13191
13681
  "required": [],
@@ -13193,11 +13683,11 @@ setContainerBuildTimeData('Container', {
13193
13683
  "examples": [
13194
13684
  {
13195
13685
  "language": "ts",
13196
- "code": "const info = container.inspect()\nconsole.log(info.methods) // all public methods with descriptions\nconsole.log(info.getters) // all getters with return types\nconsole.log(info.registries) // features, clients, servers, etc."
13686
+ "code": "const info = container.introspect()\nconsole.log(info.methods) // all public methods with descriptions\nconsole.log(info.getters) // all getters with return types\nconsole.log(info.registries) // features, clients, servers, etc."
13197
13687
  }
13198
13688
  ]
13199
13689
  },
13200
- "inspectAsText": {
13690
+ "introspectAsText": {
13201
13691
  "description": "Returns a human-readable markdown representation of this container's introspection data. Useful in REPLs, AI agent contexts, or documentation generation. Pass a section name to render only that section (e.g. 'methods', 'getters', 'events', 'state').",
13202
13692
  "parameters": {
13203
13693
  "sectionOrDepth": {
@@ -13214,32 +13704,17 @@ setContainerBuildTimeData('Container', {
13214
13704
  "examples": [
13215
13705
  {
13216
13706
  "language": "ts",
13217
- "code": "console.log(container.inspectAsText()) // full description\nconsole.log(container.inspectAsText('methods')) // just methods"
13707
+ "code": "console.log(container.introspectAsText()) // full description\nconsole.log(container.introspectAsText('methods')) // just methods"
13218
13708
  }
13219
13709
  ]
13220
13710
  },
13221
- "introspectAsText": {
13222
- "description": "Alias for inspectAsText.",
13223
- "parameters": {
13224
- "sectionOrDepth": {
13225
- "type": "IntrospectionSection | number",
13226
- "description": "Parameter sectionOrDepth"
13227
- },
13228
- "startHeadingDepth": {
13229
- "type": "number",
13230
- "description": "Parameter startHeadingDepth"
13231
- }
13232
- },
13233
- "required": [],
13234
- "returns": "string"
13235
- },
13236
13711
  "introspectAsJSON": {
13237
- "description": "Alias for inspect, returns JSON introspection data.",
13712
+ "description": "Returns JSON introspection data.",
13238
13713
  "parameters": {},
13239
13714
  "required": [],
13240
13715
  "returns": "ContainerIntrospection"
13241
13716
  },
13242
- "inspectAsType": {
13717
+ "introspectAsType": {
13243
13718
  "description": "Returns the container's introspection data formatted as a TypeScript interface declaration. Includes the container's own methods, getters, factories, and registered helper types.",
13244
13719
  "parameters": {},
13245
13720
  "required": [],
@@ -13247,16 +13722,10 @@ setContainerBuildTimeData('Container', {
13247
13722
  "examples": [
13248
13723
  {
13249
13724
  "language": "ts",
13250
- "code": "console.log(container.inspectAsType())\n// interface NodeContainer {\n// feature<T>(id: string, options?: object): T;\n// readonly uuid: string;\n// ...\n// }"
13725
+ "code": "console.log(container.introspectAsType())\n// interface NodeContainer {\n// feature<T>(id: string, options?: object): T;\n// readonly uuid: string;\n// ...\n// }"
13251
13726
  }
13252
13727
  ]
13253
13728
  },
13254
- "introspectAsType": {
13255
- "description": "",
13256
- "parameters": {},
13257
- "required": [],
13258
- "returns": "string"
13259
- },
13260
13729
  "sleep": {
13261
13730
  "description": "Sleep for the specified number of milliseconds. Useful for scripting and sequencing.",
13262
13731
  "parameters": {
@@ -19239,71 +19708,376 @@ export const introspectionData = [
19239
19708
  },
19240
19709
  "timeZone": {
19241
19710
  "type": "string",
19242
- "description": "",
19243
- "optional": true
19711
+ "description": "",
19712
+ "optional": true
19713
+ }
19714
+ }
19715
+ },
19716
+ "CalendarEvent": {
19717
+ "description": "",
19718
+ "properties": {
19719
+ "id": {
19720
+ "type": "string",
19721
+ "description": ""
19722
+ },
19723
+ "summary": {
19724
+ "type": "string",
19725
+ "description": ""
19726
+ },
19727
+ "description": {
19728
+ "type": "string",
19729
+ "description": "",
19730
+ "optional": true
19731
+ },
19732
+ "location": {
19733
+ "type": "string",
19734
+ "description": "",
19735
+ "optional": true
19736
+ },
19737
+ "start": {
19738
+ "type": "{ dateTime?: string; date?: string; timeZone?: string }",
19739
+ "description": ""
19740
+ },
19741
+ "end": {
19742
+ "type": "{ dateTime?: string; date?: string; timeZone?: string }",
19743
+ "description": ""
19744
+ },
19745
+ "status": {
19746
+ "type": "string",
19747
+ "description": ""
19748
+ },
19749
+ "htmlLink": {
19750
+ "type": "string",
19751
+ "description": ""
19752
+ },
19753
+ "creator": {
19754
+ "type": "{ email?: string; displayName?: string }",
19755
+ "description": "",
19756
+ "optional": true
19757
+ },
19758
+ "organizer": {
19759
+ "type": "{ email?: string; displayName?: string }",
19760
+ "description": "",
19761
+ "optional": true
19762
+ },
19763
+ "attendees": {
19764
+ "type": "Array<{ email?: string; displayName?: string; responseStatus?: string }>",
19765
+ "description": "",
19766
+ "optional": true
19767
+ },
19768
+ "recurrence": {
19769
+ "type": "string[]",
19770
+ "description": "",
19771
+ "optional": true
19772
+ }
19773
+ }
19774
+ }
19775
+ }
19776
+ },
19777
+ {
19778
+ "id": "features.redis",
19779
+ "description": "Redis feature for shared state and pub/sub communication between container instances. Wraps ioredis with a focused API for the primitives that matter most: key/value state, pub/sub messaging, and cross-instance coordination. Uses a dedicated subscriber connection for pub/sub (ioredis requirement), created lazily on first subscribe call.",
19780
+ "shortcut": "features.redis",
19781
+ "className": "RedisFeature",
19782
+ "methods": {
19783
+ "set": {
19784
+ "description": "Set a key to a string value with optional TTL.",
19785
+ "parameters": {
19786
+ "key": {
19787
+ "type": "string",
19788
+ "description": "The key name"
19789
+ },
19790
+ "value": {
19791
+ "type": "string",
19792
+ "description": "The string value to store"
19793
+ },
19794
+ "ttl": {
19795
+ "type": "number",
19796
+ "description": "Optional time-to-live in seconds"
19797
+ }
19798
+ },
19799
+ "required": [
19800
+ "key",
19801
+ "value"
19802
+ ],
19803
+ "returns": "Promise<void>"
19804
+ },
19805
+ "get": {
19806
+ "description": "Get a key's value. Returns null if the key doesn't exist.",
19807
+ "parameters": {
19808
+ "key": {
19809
+ "type": "string",
19810
+ "description": "The key name"
19811
+ }
19812
+ },
19813
+ "required": [
19814
+ "key"
19815
+ ],
19816
+ "returns": "Promise<string | null>"
19817
+ },
19818
+ "del": {
19819
+ "description": "Delete one or more keys.",
19820
+ "parameters": {
19821
+ "keys": {
19822
+ "type": "string[]",
19823
+ "description": "One or more key names to delete"
19824
+ }
19825
+ },
19826
+ "required": [
19827
+ "keys"
19828
+ ],
19829
+ "returns": "Promise<number>"
19830
+ },
19831
+ "exists": {
19832
+ "description": "Check if a key exists.",
19833
+ "parameters": {
19834
+ "key": {
19835
+ "type": "string",
19836
+ "description": "The key name"
19837
+ }
19838
+ },
19839
+ "required": [
19840
+ "key"
19841
+ ],
19842
+ "returns": "Promise<boolean>"
19843
+ },
19844
+ "expire": {
19845
+ "description": "Set a key's TTL in seconds.",
19846
+ "parameters": {
19847
+ "key": {
19848
+ "type": "string",
19849
+ "description": "The key name"
19850
+ },
19851
+ "seconds": {
19852
+ "type": "number",
19853
+ "description": "TTL in seconds"
19854
+ }
19855
+ },
19856
+ "required": [
19857
+ "key",
19858
+ "seconds"
19859
+ ],
19860
+ "returns": "Promise<boolean>"
19861
+ },
19862
+ "keys": {
19863
+ "description": "Find keys matching a glob pattern (respects prefix).",
19864
+ "parameters": {
19865
+ "pattern": {
19866
+ "type": "string",
19867
+ "description": "Glob pattern, e.g. \"worker:*\""
19868
+ }
19869
+ },
19870
+ "required": [],
19871
+ "returns": "Promise<string[]>"
19872
+ },
19873
+ "setJSON": {
19874
+ "description": "Store a value as JSON.",
19875
+ "parameters": {
19876
+ "key": {
19877
+ "type": "string",
19878
+ "description": "The key name"
19879
+ },
19880
+ "value": {
19881
+ "type": "unknown",
19882
+ "description": "Any JSON-serializable value"
19883
+ },
19884
+ "ttl": {
19885
+ "type": "number",
19886
+ "description": "Optional TTL in seconds"
19887
+ }
19888
+ },
19889
+ "required": [
19890
+ "key",
19891
+ "value"
19892
+ ],
19893
+ "returns": "Promise<void>"
19894
+ },
19895
+ "getJSON": {
19896
+ "description": "Retrieve and parse a JSON value.",
19897
+ "parameters": {
19898
+ "key": {
19899
+ "type": "string",
19900
+ "description": "The key name"
19244
19901
  }
19245
- }
19902
+ },
19903
+ "required": [
19904
+ "key"
19905
+ ],
19906
+ "returns": "Promise<T | null>"
19246
19907
  },
19247
- "CalendarEvent": {
19248
- "description": "",
19249
- "properties": {
19250
- "id": {
19908
+ "hset": {
19909
+ "description": "Set fields on a hash.",
19910
+ "parameters": {
19911
+ "key": {
19251
19912
  "type": "string",
19252
- "description": ""
19913
+ "description": "The hash key"
19253
19914
  },
19254
- "summary": {
19915
+ "fields": {
19916
+ "type": "Record<string, string>",
19917
+ "description": "Object of field/value pairs"
19918
+ }
19919
+ },
19920
+ "required": [
19921
+ "key",
19922
+ "fields"
19923
+ ],
19924
+ "returns": "Promise<void>"
19925
+ },
19926
+ "hgetall": {
19927
+ "description": "Get all fields from a hash.",
19928
+ "parameters": {
19929
+ "key": {
19255
19930
  "type": "string",
19256
- "description": ""
19257
- },
19258
- "description": {
19931
+ "description": "The hash key"
19932
+ }
19933
+ },
19934
+ "required": [
19935
+ "key"
19936
+ ],
19937
+ "returns": "Promise<Record<string, string>>"
19938
+ },
19939
+ "hget": {
19940
+ "description": "Get a single field from a hash.",
19941
+ "parameters": {
19942
+ "key": {
19259
19943
  "type": "string",
19260
- "description": "",
19261
- "optional": true
19944
+ "description": "The hash key"
19262
19945
  },
19263
- "location": {
19946
+ "field": {
19264
19947
  "type": "string",
19265
- "description": "",
19266
- "optional": true
19267
- },
19268
- "start": {
19269
- "type": "{ dateTime?: string; date?: string; timeZone?: string }",
19270
- "description": ""
19271
- },
19272
- "end": {
19273
- "type": "{ dateTime?: string; date?: string; timeZone?: string }",
19274
- "description": ""
19948
+ "description": "The field name"
19949
+ }
19950
+ },
19951
+ "required": [
19952
+ "key",
19953
+ "field"
19954
+ ],
19955
+ "returns": "Promise<string | null>"
19956
+ },
19957
+ "subscribe": {
19958
+ "description": "Subscribe to one or more channels. Optionally pass a handler that fires only for these channels. The feature also emits a `message` event for all messages.",
19959
+ "parameters": {
19960
+ "channels": {
19961
+ "type": "string | string[]",
19962
+ "description": "Channel name(s) to subscribe to"
19275
19963
  },
19276
- "status": {
19964
+ "handler": {
19965
+ "type": "MessageHandler",
19966
+ "description": "Optional per-channel message handler"
19967
+ }
19968
+ },
19969
+ "required": [
19970
+ "channels"
19971
+ ],
19972
+ "returns": "Promise<void>",
19973
+ "examples": [
19974
+ {
19975
+ "language": "ts",
19976
+ "code": "await redis.subscribe('tasks', (channel, msg) => {\n console.log(`Got ${msg} on ${channel}`)\n})"
19977
+ }
19978
+ ]
19979
+ },
19980
+ "unsubscribe": {
19981
+ "description": "Unsubscribe from one or more channels.",
19982
+ "parameters": {
19983
+ "channels": {
19984
+ "type": "string[]",
19985
+ "description": "Channel name(s) to unsubscribe from"
19986
+ }
19987
+ },
19988
+ "required": [
19989
+ "channels"
19990
+ ],
19991
+ "returns": "Promise<void>"
19992
+ },
19993
+ "publish": {
19994
+ "description": "Publish a message to a channel.",
19995
+ "parameters": {
19996
+ "channel": {
19277
19997
  "type": "string",
19278
- "description": ""
19998
+ "description": "The channel to publish to"
19279
19999
  },
19280
- "htmlLink": {
20000
+ "message": {
19281
20001
  "type": "string",
19282
- "description": ""
19283
- },
19284
- "creator": {
19285
- "type": "{ email?: string; displayName?: string }",
19286
- "description": "",
19287
- "optional": true
19288
- },
19289
- "organizer": {
19290
- "type": "{ email?: string; displayName?: string }",
19291
- "description": "",
19292
- "optional": true
19293
- },
19294
- "attendees": {
19295
- "type": "Array<{ email?: string; displayName?: string; responseStatus?: string }>",
19296
- "description": "",
19297
- "optional": true
19298
- },
19299
- "recurrence": {
19300
- "type": "string[]",
19301
- "description": "",
19302
- "optional": true
20002
+ "description": "The message string (use JSON.stringify for objects)"
19303
20003
  }
19304
- }
20004
+ },
20005
+ "required": [
20006
+ "channel",
20007
+ "message"
20008
+ ],
20009
+ "returns": "Promise<number>"
20010
+ },
20011
+ "ensureLocalDocker": {
20012
+ "description": "Spin up a local Redis instance via Docker. Checks if a container with the given name already exists and starts it if stopped, or creates a new one from redis:alpine. Requires the docker feature to be available on the container.",
20013
+ "parameters": {
20014
+ "options": {
20015
+ "type": "{ name?: string; port?: number; image?: string }",
20016
+ "description": "Container name and host port"
20017
+ }
20018
+ },
20019
+ "required": [],
20020
+ "returns": "Promise<string>",
20021
+ "examples": [
20022
+ {
20023
+ "language": "ts",
20024
+ "code": "const redis = container.feature('redis', { url: 'redis://localhost:6379', lazyConnect: true })\nawait redis.ensureLocalDocker()"
20025
+ }
20026
+ ]
20027
+ },
20028
+ "close": {
20029
+ "description": "Close all redis connections (main client + subscriber).",
20030
+ "parameters": {},
20031
+ "required": [],
20032
+ "returns": "Promise<this>"
19305
20033
  }
19306
- }
20034
+ },
20035
+ "getters": {
20036
+ "client": {
20037
+ "description": "The underlying ioredis client for advanced operations.",
20038
+ "returns": "Redis"
20039
+ },
20040
+ "subscriber": {
20041
+ "description": "The dedicated subscriber connection, if pub/sub is active.",
20042
+ "returns": "Redis | null"
20043
+ }
20044
+ },
20045
+ "events": {
20046
+ "message": {
20047
+ "name": "message",
20048
+ "description": "Event emitted by RedisFeature",
20049
+ "arguments": {}
20050
+ },
20051
+ "error": {
20052
+ "name": "error",
20053
+ "description": "Event emitted by RedisFeature",
20054
+ "arguments": {}
20055
+ },
20056
+ "subscribed": {
20057
+ "name": "subscribed",
20058
+ "description": "Event emitted by RedisFeature",
20059
+ "arguments": {}
20060
+ },
20061
+ "unsubscribed": {
20062
+ "name": "unsubscribed",
20063
+ "description": "Event emitted by RedisFeature",
20064
+ "arguments": {}
20065
+ },
20066
+ "closed": {
20067
+ "name": "closed",
20068
+ "description": "Event emitted by RedisFeature",
20069
+ "arguments": {}
20070
+ }
20071
+ },
20072
+ "state": {},
20073
+ "options": {},
20074
+ "envVars": [],
20075
+ "examples": [
20076
+ {
20077
+ "language": "ts",
20078
+ "code": "const redis = container.feature('redis', { url: 'redis://localhost:6379' })\n\n// Shared state\nawait redis.set('worker:status', 'active')\nconst status = await redis.get('worker:status')\n\n// Pub/sub between instances\nredis.on('message', (channel, msg) => console.log(`${channel}: ${msg}`))\nawait redis.subscribe('tasks')\nawait redis.publish('tasks', JSON.stringify({ type: 'ping' }))\n\n// JSON helpers\nawait redis.setJSON('config', { workers: 4, debug: true })\nconst config = await redis.getJSON<{ workers: number }>('config')"
20079
+ }
20080
+ ]
19307
20081
  },
19308
20082
  {
19309
20083
  "id": "features.fs",
@@ -20940,7 +21714,7 @@ export const introspectionData = [
20940
21714
  },
20941
21715
  {
20942
21716
  "id": "features.python",
20943
- "description": "The Python VM feature provides Python virtual machine capabilities for executing Python code. This feature automatically detects Python environments (uv, conda, venv, system) and provides methods to install dependencies and execute Python scripts. It can manage project-specific Python environments and maintain context between executions.",
21717
+ "description": "The Python VM feature provides Python virtual machine capabilities for executing Python code. This feature automatically detects Python environments (uv, conda, venv, system) and provides methods to install dependencies and execute Python scripts. It can manage project-specific Python environments and maintain context between executions. Supports two modes: - **Stateless** (default): `execute()` and `executeFile()` spawn a fresh process per call - **Persistent session**: `startSession()` spawns a long-lived bridge process that maintains state across `run()` calls, enabling real codebase interaction with imports and session variables",
20944
21718
  "shortcut": "features.python",
20945
21719
  "className": "Python",
20946
21720
  "methods": {
@@ -21004,42 +21778,182 @@ export const introspectionData = [
21004
21778
  "required": [
21005
21779
  "code"
21006
21780
  ],
21007
- "returns": "Promise<{ stdout: string; stderr: string; exitCode: number; locals?: any }>",
21781
+ "returns": "Promise<{ stdout: string; stderr: string; exitCode: number; locals?: any }>",
21782
+ "examples": [
21783
+ {
21784
+ "language": "ts",
21785
+ "code": "// Simple execution\nconst result = await python.execute('print(\"Hello World\")')\nconsole.log(result.stdout) // 'Hello World'\n\n// With variables\nconst result = await python.execute('print(f\"Hello {name}!\")', { name: 'Alice' })\n\n// Capture locals\nconst result = await python.execute('x = 42\\ny = x * 2', {}, { captureLocals: true })\nconsole.log(result.locals) // { x: 42, y: 84 }"
21786
+ }
21787
+ ]
21788
+ },
21789
+ "executeFile": {
21790
+ "description": "Executes a Python file and returns the result.",
21791
+ "parameters": {
21792
+ "filePath": {
21793
+ "type": "string",
21794
+ "description": "Path to the Python file to execute"
21795
+ },
21796
+ "variables": {
21797
+ "type": "Record<string, any>",
21798
+ "description": "Variables to make available via command line arguments"
21799
+ }
21800
+ },
21801
+ "required": [
21802
+ "filePath"
21803
+ ],
21804
+ "returns": "Promise<{ stdout: string; stderr: string; exitCode: number }>",
21805
+ "examples": [
21806
+ {
21807
+ "language": "ts",
21808
+ "code": "const result = await python.executeFile('/path/to/script.py')\nconsole.log(result.stdout)"
21809
+ }
21810
+ ]
21811
+ },
21812
+ "getEnvironmentInfo": {
21813
+ "description": "Gets information about the current Python environment.",
21814
+ "parameters": {},
21815
+ "required": [],
21816
+ "returns": "Promise<{ version: string; path: string; packages: string[] }>"
21817
+ },
21818
+ "startSession": {
21819
+ "description": "Starts a persistent Python session by spawning the bridge process. The bridge sets up sys.path for the project directory, then enters a JSON-line REPL loop. State (variables, imports) persists across run() calls until stopSession() or resetSession() is called.",
21820
+ "parameters": {},
21821
+ "required": [],
21822
+ "returns": "Promise<void>",
21823
+ "examples": [
21824
+ {
21825
+ "language": "ts",
21826
+ "code": "const python = container.feature('python', { dir: '/path/to/project' })\nawait python.enable()\nawait python.startSession()\nawait python.run('x = 42')\nconst result = await python.run('print(x)')\nconsole.log(result.stdout) // '42\\n'\nawait python.stopSession()"
21827
+ }
21828
+ ]
21829
+ },
21830
+ "stopSession": {
21831
+ "description": "Stops the persistent Python session and cleans up the bridge process.",
21832
+ "parameters": {},
21833
+ "required": [],
21834
+ "returns": "Promise<void>",
21835
+ "examples": [
21836
+ {
21837
+ "language": "ts",
21838
+ "code": "await python.stopSession()"
21839
+ }
21840
+ ]
21841
+ },
21842
+ "run": {
21843
+ "description": "Executes Python code in the persistent session. Variables and imports survive across calls. This is the session equivalent of execute().",
21844
+ "parameters": {
21845
+ "code": {
21846
+ "type": "string",
21847
+ "description": "Python code to execute"
21848
+ },
21849
+ "variables": {
21850
+ "type": "Record<string, any>",
21851
+ "description": "Variables to inject into the namespace before execution"
21852
+ }
21853
+ },
21854
+ "required": [
21855
+ "code"
21856
+ ],
21857
+ "returns": "Promise<RunResult>",
21858
+ "examples": [
21859
+ {
21860
+ "language": "ts",
21861
+ "code": "await python.startSession()\n\n// State persists across calls\nawait python.run('x = 42')\nconst result = await python.run('print(x * 2)')\nconsole.log(result.stdout) // '84\\n'\n\n// Inject variables from JS\nconst result2 = await python.run('print(f\"Hello {name}!\")', { name: 'World' })\nconsole.log(result2.stdout) // 'Hello World!\\n'"
21862
+ }
21863
+ ]
21864
+ },
21865
+ "eval": {
21866
+ "description": "Evaluates a Python expression in the persistent session and returns its value.",
21867
+ "parameters": {
21868
+ "expression": {
21869
+ "type": "string",
21870
+ "description": "Python expression to evaluate"
21871
+ }
21872
+ },
21873
+ "required": [
21874
+ "expression"
21875
+ ],
21876
+ "returns": "Promise<any>",
21877
+ "examples": [
21878
+ {
21879
+ "language": "ts",
21880
+ "code": "await python.run('x = 42')\nconst result = await python.eval('x * 2')\nconsole.log(result) // 84"
21881
+ }
21882
+ ]
21883
+ },
21884
+ "importModule": {
21885
+ "description": "Imports a Python module into the persistent session namespace.",
21886
+ "parameters": {
21887
+ "moduleName": {
21888
+ "type": "string",
21889
+ "description": "Dotted module path (e.g. 'myapp.models')"
21890
+ },
21891
+ "alias": {
21892
+ "type": "string",
21893
+ "description": "Optional alias for the import (defaults to the last segment)"
21894
+ }
21895
+ },
21896
+ "required": [
21897
+ "moduleName"
21898
+ ],
21899
+ "returns": "Promise<void>",
21008
21900
  "examples": [
21009
21901
  {
21010
21902
  "language": "ts",
21011
- "code": "// Simple execution\nconst result = await python.execute('print(\"Hello World\")')\nconsole.log(result.stdout) // 'Hello World'\n\n// With variables\nconst result = await python.execute('print(f\"Hello {name}!\")', { name: 'Alice' })\n\n// Capture locals\nconst result = await python.execute('x = 42\\ny = x * 2', {}, { captureLocals: true })\nconsole.log(result.locals) // { x: 42, y: 84 }"
21903
+ "code": "await python.importModule('json')\nawait python.importModule('myapp.models', 'models')\nconst result = await python.eval('models.User')"
21012
21904
  }
21013
21905
  ]
21014
21906
  },
21015
- "executeFile": {
21016
- "description": "Executes a Python file and returns the result.",
21907
+ "call": {
21908
+ "description": "Calls a function by dotted path in the persistent session namespace.",
21017
21909
  "parameters": {
21018
- "filePath": {
21910
+ "funcPath": {
21019
21911
  "type": "string",
21020
- "description": "Path to the Python file to execute"
21912
+ "description": "Dotted path to the function (e.g. 'json.dumps' or 'my_func')"
21021
21913
  },
21022
- "variables": {
21914
+ "args": {
21915
+ "type": "any[]",
21916
+ "description": "Positional arguments"
21917
+ },
21918
+ "kwargs": {
21023
21919
  "type": "Record<string, any>",
21024
- "description": "Variables to make available via command line arguments"
21920
+ "description": "Keyword arguments"
21025
21921
  }
21026
21922
  },
21027
21923
  "required": [
21028
- "filePath"
21924
+ "funcPath"
21029
21925
  ],
21030
- "returns": "Promise<{ stdout: string; stderr: string; exitCode: number }>",
21926
+ "returns": "Promise<any>",
21031
21927
  "examples": [
21032
21928
  {
21033
21929
  "language": "ts",
21034
- "code": "const result = await python.executeFile('/path/to/script.py')\nconsole.log(result.stdout)"
21930
+ "code": "await python.importModule('json')\nconst result = await python.call('json.dumps', [{ a: 1 }], { indent: 2 })"
21035
21931
  }
21036
21932
  ]
21037
21933
  },
21038
- "getEnvironmentInfo": {
21039
- "description": "Gets information about the current Python environment.",
21934
+ "getLocals": {
21935
+ "description": "Returns all non-dunder variables from the persistent session namespace.",
21040
21936
  "parameters": {},
21041
21937
  "required": [],
21042
- "returns": "Promise<{ version: string; path: string; packages: string[] }>"
21938
+ "returns": "Promise<Record<string, any>>",
21939
+ "examples": [
21940
+ {
21941
+ "language": "ts",
21942
+ "code": "await python.run('x = 42\\ny = \"hello\"')\nconst locals = await python.getLocals()\nconsole.log(locals) // { x: 42, y: 'hello' }"
21943
+ }
21944
+ ]
21945
+ },
21946
+ "resetSession": {
21947
+ "description": "Clears all variables and imports from the persistent session namespace. The session remains active — you can continue calling run() after reset.",
21948
+ "parameters": {},
21949
+ "required": [],
21950
+ "returns": "Promise<void>",
21951
+ "examples": [
21952
+ {
21953
+ "language": "ts",
21954
+ "code": "await python.run('x = 42')\nawait python.resetSession()\n// x is now undefined"
21955
+ }
21956
+ ]
21043
21957
  }
21044
21958
  },
21045
21959
  "getters": {
@@ -21096,6 +22010,21 @@ export const introspectionData = [
21096
22010
  "name": "fileExecuted",
21097
22011
  "description": "Event emitted by Python",
21098
22012
  "arguments": {}
22013
+ },
22014
+ "sessionError": {
22015
+ "name": "sessionError",
22016
+ "description": "Event emitted by Python",
22017
+ "arguments": {}
22018
+ },
22019
+ "sessionStarted": {
22020
+ "name": "sessionStarted",
22021
+ "description": "Event emitted by Python",
22022
+ "arguments": {}
22023
+ },
22024
+ "sessionStopped": {
22025
+ "name": "sessionStopped",
22026
+ "description": "Event emitted by Python",
22027
+ "arguments": {}
21099
22028
  }
21100
22029
  },
21101
22030
  "state": {},
@@ -21104,9 +22033,38 @@ export const introspectionData = [
21104
22033
  "examples": [
21105
22034
  {
21106
22035
  "language": "ts",
21107
- "code": "const python = container.feature('python', { \n dir: \"/path/to/python/project\",\n contextScript: \"/path/to/setup-context.py\"\n})\n\n// Auto-install dependencies\nawait python.installDependencies()\n\n// Execute Python code\nconst result = await python.execute('print(\"Hello from Python!\")')\n\n// Execute with custom variables\nconst result2 = await python.execute('print(f\"Hello {name}!\")', { name: 'World' })"
22036
+ "code": "const python = container.feature('python', {\n dir: \"/path/to/python/project\",\n})\n\n// Stateless execution\nconst result = await python.execute('print(\"Hello from Python!\")')\n\n// Persistent session\nawait python.startSession()\nawait python.run('import myapp.models')\nawait python.run('users = myapp.models.User.objects.all()')\nconst result = await python.run('print(len(users))')\nawait python.stopSession()"
21108
22037
  }
21109
- ]
22038
+ ],
22039
+ "types": {
22040
+ "RunResult": {
22041
+ "description": "Result from a persistent session run() call.",
22042
+ "properties": {
22043
+ "ok": {
22044
+ "type": "boolean",
22045
+ "description": ""
22046
+ },
22047
+ "result": {
22048
+ "type": "any",
22049
+ "description": ""
22050
+ },
22051
+ "stdout": {
22052
+ "type": "string",
22053
+ "description": ""
22054
+ },
22055
+ "error": {
22056
+ "type": "string",
22057
+ "description": "",
22058
+ "optional": true
22059
+ },
22060
+ "traceback": {
22061
+ "type": "string",
22062
+ "description": "",
22063
+ "optional": true
22064
+ }
22065
+ }
22066
+ }
22067
+ }
21110
22068
  },
21111
22069
  {
21112
22070
  "id": "features.jsonTree",
@@ -25023,34 +25981,229 @@ export const introspectionData = [
25023
25981
  "description": "Event emitted by OpenAIClient",
25024
25982
  "arguments": {}
25025
25983
  },
25026
- "completion": {
25027
- "name": "completion",
25028
- "description": "Event emitted by OpenAIClient",
25029
- "arguments": {}
25984
+ "completion": {
25985
+ "name": "completion",
25986
+ "description": "Event emitted by OpenAIClient",
25987
+ "arguments": {}
25988
+ },
25989
+ "embedding": {
25990
+ "name": "embedding",
25991
+ "description": "Event emitted by OpenAIClient",
25992
+ "arguments": {}
25993
+ },
25994
+ "image": {
25995
+ "name": "image",
25996
+ "description": "Event emitted by OpenAIClient",
25997
+ "arguments": {}
25998
+ },
25999
+ "models": {
26000
+ "name": "models",
26001
+ "description": "Event emitted by OpenAIClient",
26002
+ "arguments": {}
26003
+ }
26004
+ },
26005
+ "state": {},
26006
+ "options": {},
26007
+ "envVars": [],
26008
+ "examples": [
26009
+ {
26010
+ "language": "ts",
26011
+ "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
26012
+ }
26013
+ ]
26014
+ },
26015
+ {
26016
+ "id": "clients.supabase",
26017
+ "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).",
26018
+ "shortcut": "clients.supabase",
26019
+ "className": "SupabaseClient",
26020
+ "methods": {
26021
+ "from": {
26022
+ "description": "Start a query on a Postgres table or view.",
26023
+ "parameters": {
26024
+ "table": {
26025
+ "type": "string",
26026
+ "description": "The table or view name to query"
26027
+ }
26028
+ },
26029
+ "required": [
26030
+ "table"
26031
+ ],
26032
+ "returns": "void"
26033
+ },
26034
+ "rpc": {
26035
+ "description": "Call a Postgres function (RPC).",
26036
+ "parameters": {
26037
+ "fn": {
26038
+ "type": "string",
26039
+ "description": "The function name"
26040
+ },
26041
+ "params": {
26042
+ "type": "Record<string, unknown>",
26043
+ "description": "Arguments to pass to the function"
26044
+ },
26045
+ "options": {
26046
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
26047
+ "description": "Optional settings (head, get, count)"
26048
+ }
26049
+ },
26050
+ "required": [
26051
+ "fn"
26052
+ ],
26053
+ "returns": "void"
26054
+ },
26055
+ "signInWithPassword": {
26056
+ "description": "Sign in with email and password.",
26057
+ "parameters": {
26058
+ "email": {
26059
+ "type": "string",
26060
+ "description": "Parameter email"
26061
+ },
26062
+ "password": {
26063
+ "type": "string",
26064
+ "description": "Parameter password"
26065
+ }
26066
+ },
26067
+ "required": [
26068
+ "email",
26069
+ "password"
26070
+ ],
26071
+ "returns": "void"
26072
+ },
26073
+ "signUp": {
26074
+ "description": "Create a new user account with email and password.",
26075
+ "parameters": {
26076
+ "email": {
26077
+ "type": "string",
26078
+ "description": "Parameter email"
26079
+ },
26080
+ "password": {
26081
+ "type": "string",
26082
+ "description": "Parameter password"
26083
+ }
26084
+ },
26085
+ "required": [
26086
+ "email",
26087
+ "password"
26088
+ ],
26089
+ "returns": "void"
26090
+ },
26091
+ "signOut": {
26092
+ "description": "Sign the current user out.",
26093
+ "parameters": {},
26094
+ "required": [],
26095
+ "returns": "void"
26096
+ },
26097
+ "getSession": {
26098
+ "description": "Get the current session, if any.",
26099
+ "parameters": {},
26100
+ "required": [],
26101
+ "returns": "void"
26102
+ },
26103
+ "getUser": {
26104
+ "description": "Get the current user, if any.",
26105
+ "parameters": {},
26106
+ "required": [],
26107
+ "returns": "void"
26108
+ },
26109
+ "invoke": {
26110
+ "description": "Invoke a Supabase Edge Function by name.",
26111
+ "parameters": {
26112
+ "name": {
26113
+ "type": "string",
26114
+ "description": "Parameter name"
26115
+ },
26116
+ "body": {
26117
+ "type": "any",
26118
+ "description": "Parameter body"
26119
+ }
26120
+ },
26121
+ "required": [
26122
+ "name"
26123
+ ],
26124
+ "returns": "void"
26125
+ },
26126
+ "subscribe": {
26127
+ "description": "Subscribe to realtime changes on a Postgres table.",
26128
+ "parameters": {
26129
+ "channelName": {
26130
+ "type": "string",
26131
+ "description": "A name for this subscription channel"
26132
+ },
26133
+ "table": {
26134
+ "type": "string",
26135
+ "description": "The table to listen to"
26136
+ },
26137
+ "callback": {
26138
+ "type": "(payload: any) => void",
26139
+ "description": "Called with the payload on each change"
26140
+ },
26141
+ "event": {
26142
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
26143
+ "description": "The event type to listen for (default: all changes)"
26144
+ }
26145
+ },
26146
+ "required": [
26147
+ "channelName",
26148
+ "table",
26149
+ "callback"
26150
+ ],
26151
+ "returns": "RealtimeChannel"
26152
+ },
26153
+ "unsubscribe": {
26154
+ "description": "Unsubscribe and remove a realtime channel by name.",
26155
+ "parameters": {
26156
+ "channelName": {
26157
+ "type": "string",
26158
+ "description": "The channel name to remove"
26159
+ }
26160
+ },
26161
+ "required": [
26162
+ "channelName"
26163
+ ],
26164
+ "returns": "void"
26165
+ },
26166
+ "unsubscribeAll": {
26167
+ "description": "Unsubscribe and remove all realtime channels.",
26168
+ "parameters": {},
26169
+ "required": [],
26170
+ "returns": "void"
26171
+ },
26172
+ "connect": {
26173
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
26174
+ "parameters": {},
26175
+ "required": [],
26176
+ "returns": "void"
25030
26177
  },
25031
- "embedding": {
25032
- "name": "embedding",
25033
- "description": "Event emitted by OpenAIClient",
25034
- "arguments": {}
26178
+ "disconnect": {
26179
+ "description": "Disconnect by signing out and removing all realtime channels.",
26180
+ "parameters": {},
26181
+ "required": [],
26182
+ "returns": "void"
26183
+ }
26184
+ },
26185
+ "getters": {
26186
+ "sdk": {
26187
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
26188
+ "returns": "SupabaseSDKClient<any, any>"
25035
26189
  },
25036
- "image": {
25037
- "name": "image",
25038
- "description": "Event emitted by OpenAIClient",
25039
- "arguments": {}
26190
+ "storage": {
26191
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
26192
+ "returns": "any"
25040
26193
  },
25041
- "models": {
25042
- "name": "models",
25043
- "description": "Event emitted by OpenAIClient",
25044
- "arguments": {}
26194
+ "functions": {
26195
+ "description": "Returns the Supabase Functions client.",
26196
+ "returns": "any"
25045
26197
  }
25046
26198
  },
26199
+ "events": {},
25047
26200
  "state": {},
25048
26201
  "options": {},
25049
26202
  "envVars": [],
25050
26203
  "examples": [
25051
26204
  {
25052
26205
  "language": "ts",
25053
- "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
26206
+ "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})"
25054
26207
  }
25055
26208
  ]
25056
26209
  },
@@ -25317,201 +26470,6 @@ export const introspectionData = [
25317
26470
  }
25318
26471
  }
25319
26472
  },
25320
- {
25321
- "id": "clients.supabase",
25322
- "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).",
25323
- "shortcut": "clients.supabase",
25324
- "className": "SupabaseClient",
25325
- "methods": {
25326
- "from": {
25327
- "description": "Start a query on a Postgres table or view.",
25328
- "parameters": {
25329
- "table": {
25330
- "type": "string",
25331
- "description": "The table or view name to query"
25332
- }
25333
- },
25334
- "required": [
25335
- "table"
25336
- ],
25337
- "returns": "void"
25338
- },
25339
- "rpc": {
25340
- "description": "Call a Postgres function (RPC).",
25341
- "parameters": {
25342
- "fn": {
25343
- "type": "string",
25344
- "description": "The function name"
25345
- },
25346
- "params": {
25347
- "type": "Record<string, unknown>",
25348
- "description": "Arguments to pass to the function"
25349
- },
25350
- "options": {
25351
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
25352
- "description": "Optional settings (head, get, count)"
25353
- }
25354
- },
25355
- "required": [
25356
- "fn"
25357
- ],
25358
- "returns": "void"
25359
- },
25360
- "signInWithPassword": {
25361
- "description": "Sign in with email and password.",
25362
- "parameters": {
25363
- "email": {
25364
- "type": "string",
25365
- "description": "Parameter email"
25366
- },
25367
- "password": {
25368
- "type": "string",
25369
- "description": "Parameter password"
25370
- }
25371
- },
25372
- "required": [
25373
- "email",
25374
- "password"
25375
- ],
25376
- "returns": "void"
25377
- },
25378
- "signUp": {
25379
- "description": "Create a new user account with email and password.",
25380
- "parameters": {
25381
- "email": {
25382
- "type": "string",
25383
- "description": "Parameter email"
25384
- },
25385
- "password": {
25386
- "type": "string",
25387
- "description": "Parameter password"
25388
- }
25389
- },
25390
- "required": [
25391
- "email",
25392
- "password"
25393
- ],
25394
- "returns": "void"
25395
- },
25396
- "signOut": {
25397
- "description": "Sign the current user out.",
25398
- "parameters": {},
25399
- "required": [],
25400
- "returns": "void"
25401
- },
25402
- "getSession": {
25403
- "description": "Get the current session, if any.",
25404
- "parameters": {},
25405
- "required": [],
25406
- "returns": "void"
25407
- },
25408
- "getUser": {
25409
- "description": "Get the current user, if any.",
25410
- "parameters": {},
25411
- "required": [],
25412
- "returns": "void"
25413
- },
25414
- "invoke": {
25415
- "description": "Invoke a Supabase Edge Function by name.",
25416
- "parameters": {
25417
- "name": {
25418
- "type": "string",
25419
- "description": "Parameter name"
25420
- },
25421
- "body": {
25422
- "type": "any",
25423
- "description": "Parameter body"
25424
- }
25425
- },
25426
- "required": [
25427
- "name"
25428
- ],
25429
- "returns": "void"
25430
- },
25431
- "subscribe": {
25432
- "description": "Subscribe to realtime changes on a Postgres table.",
25433
- "parameters": {
25434
- "channelName": {
25435
- "type": "string",
25436
- "description": "A name for this subscription channel"
25437
- },
25438
- "table": {
25439
- "type": "string",
25440
- "description": "The table to listen to"
25441
- },
25442
- "callback": {
25443
- "type": "(payload: any) => void",
25444
- "description": "Called with the payload on each change"
25445
- },
25446
- "event": {
25447
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
25448
- "description": "The event type to listen for (default: all changes)"
25449
- }
25450
- },
25451
- "required": [
25452
- "channelName",
25453
- "table",
25454
- "callback"
25455
- ],
25456
- "returns": "RealtimeChannel"
25457
- },
25458
- "unsubscribe": {
25459
- "description": "Unsubscribe and remove a realtime channel by name.",
25460
- "parameters": {
25461
- "channelName": {
25462
- "type": "string",
25463
- "description": "The channel name to remove"
25464
- }
25465
- },
25466
- "required": [
25467
- "channelName"
25468
- ],
25469
- "returns": "void"
25470
- },
25471
- "unsubscribeAll": {
25472
- "description": "Unsubscribe and remove all realtime channels.",
25473
- "parameters": {},
25474
- "required": [],
25475
- "returns": "void"
25476
- },
25477
- "connect": {
25478
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
25479
- "parameters": {},
25480
- "required": [],
25481
- "returns": "void"
25482
- },
25483
- "disconnect": {
25484
- "description": "Disconnect by signing out and removing all realtime channels.",
25485
- "parameters": {},
25486
- "required": [],
25487
- "returns": "void"
25488
- }
25489
- },
25490
- "getters": {
25491
- "sdk": {
25492
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
25493
- "returns": "SupabaseSDKClient<any, any>"
25494
- },
25495
- "storage": {
25496
- "description": "Returns the Supabase Storage client for managing buckets and files.",
25497
- "returns": "any"
25498
- },
25499
- "functions": {
25500
- "description": "Returns the Supabase Functions client.",
25501
- "returns": "any"
25502
- }
25503
- },
25504
- "events": {},
25505
- "state": {},
25506
- "options": {},
25507
- "envVars": [],
25508
- "examples": [
25509
- {
25510
- "language": "ts",
25511
- "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})"
25512
- }
25513
- ]
25514
- },
25515
26473
  {
25516
26474
  "id": "clients.comfyui",
25517
26475
  "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.",
@@ -26539,7 +27497,7 @@ export const containerIntrospectionData = [
26539
27497
  }
26540
27498
  ]
26541
27499
  },
26542
- "inspect": {
27500
+ "introspect": {
26543
27501
  "description": "Returns a full introspection object for this container, merging build-time AST data (JSDoc descriptions, methods, getters) with runtime data (registries, factories, state, environment).",
26544
27502
  "parameters": {},
26545
27503
  "required": [],
@@ -26547,11 +27505,11 @@ export const containerIntrospectionData = [
26547
27505
  "examples": [
26548
27506
  {
26549
27507
  "language": "ts",
26550
- "code": "const info = container.inspect()\nconsole.log(info.methods) // all public methods with descriptions\nconsole.log(info.getters) // all getters with return types\nconsole.log(info.registries) // features, clients, servers, etc."
27508
+ "code": "const info = container.introspect()\nconsole.log(info.methods) // all public methods with descriptions\nconsole.log(info.getters) // all getters with return types\nconsole.log(info.registries) // features, clients, servers, etc."
26551
27509
  }
26552
27510
  ]
26553
27511
  },
26554
- "inspectAsText": {
27512
+ "introspectAsText": {
26555
27513
  "description": "Returns a human-readable markdown representation of this container's introspection data. Useful in REPLs, AI agent contexts, or documentation generation. Pass a section name to render only that section (e.g. 'methods', 'getters', 'events', 'state').",
26556
27514
  "parameters": {
26557
27515
  "sectionOrDepth": {
@@ -26568,32 +27526,17 @@ export const containerIntrospectionData = [
26568
27526
  "examples": [
26569
27527
  {
26570
27528
  "language": "ts",
26571
- "code": "console.log(container.inspectAsText()) // full description\nconsole.log(container.inspectAsText('methods')) // just methods"
27529
+ "code": "console.log(container.introspectAsText()) // full description\nconsole.log(container.introspectAsText('methods')) // just methods"
26572
27530
  }
26573
27531
  ]
26574
27532
  },
26575
- "introspectAsText": {
26576
- "description": "Alias for inspectAsText.",
26577
- "parameters": {
26578
- "sectionOrDepth": {
26579
- "type": "IntrospectionSection | number",
26580
- "description": "Parameter sectionOrDepth"
26581
- },
26582
- "startHeadingDepth": {
26583
- "type": "number",
26584
- "description": "Parameter startHeadingDepth"
26585
- }
26586
- },
26587
- "required": [],
26588
- "returns": "string"
26589
- },
26590
27533
  "introspectAsJSON": {
26591
- "description": "Alias for inspect, returns JSON introspection data.",
27534
+ "description": "Returns JSON introspection data.",
26592
27535
  "parameters": {},
26593
27536
  "required": [],
26594
27537
  "returns": "ContainerIntrospection"
26595
27538
  },
26596
- "inspectAsType": {
27539
+ "introspectAsType": {
26597
27540
  "description": "Returns the container's introspection data formatted as a TypeScript interface declaration. Includes the container's own methods, getters, factories, and registered helper types.",
26598
27541
  "parameters": {},
26599
27542
  "required": [],
@@ -26601,16 +27544,10 @@ export const containerIntrospectionData = [
26601
27544
  "examples": [
26602
27545
  {
26603
27546
  "language": "ts",
26604
- "code": "console.log(container.inspectAsType())\n// interface NodeContainer {\n// feature<T>(id: string, options?: object): T;\n// readonly uuid: string;\n// ...\n// }"
27547
+ "code": "console.log(container.introspectAsType())\n// interface NodeContainer {\n// feature<T>(id: string, options?: object): T;\n// readonly uuid: string;\n// ...\n// }"
26605
27548
  }
26606
27549
  ]
26607
27550
  },
26608
- "introspectAsType": {
26609
- "description": "",
26610
- "parameters": {},
26611
- "required": [],
26612
- "returns": "string"
26613
- },
26614
27551
  "sleep": {
26615
27552
  "description": "Sleep for the specified number of milliseconds. Useful for scripting and sequencing.",
26616
27553
  "parameters": {