@soederpop/luca 0.0.2

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 (358) hide show
  1. package/CLAUDE.md +71 -0
  2. package/README.md +78 -0
  3. package/bun.lock +2928 -0
  4. package/bunfig.toml +3 -0
  5. package/commands/audit-docs.ts +740 -0
  6. package/commands/build-scaffolds.ts +154 -0
  7. package/commands/generate-api-docs.ts +114 -0
  8. package/commands/update-introspection.ts +67 -0
  9. package/docs/CLI.md +335 -0
  10. package/docs/README.md +88 -0
  11. package/docs/TABLE-OF-CONTENTS.md +157 -0
  12. package/docs/apis/clients/elevenlabs.md +84 -0
  13. package/docs/apis/clients/graph.md +56 -0
  14. package/docs/apis/clients/openai.md +69 -0
  15. package/docs/apis/clients/rest.md +41 -0
  16. package/docs/apis/clients/websocket.md +107 -0
  17. package/docs/apis/features/agi/assistant.md +471 -0
  18. package/docs/apis/features/agi/assistants-manager.md +154 -0
  19. package/docs/apis/features/agi/claude-code.md +602 -0
  20. package/docs/apis/features/agi/conversation-history.md +352 -0
  21. package/docs/apis/features/agi/conversation.md +333 -0
  22. package/docs/apis/features/agi/docs-reader.md +121 -0
  23. package/docs/apis/features/agi/openai-codex.md +318 -0
  24. package/docs/apis/features/agi/openapi.md +138 -0
  25. package/docs/apis/features/agi/semantic-search.md +387 -0
  26. package/docs/apis/features/agi/skills-library.md +216 -0
  27. package/docs/apis/features/node/container-link.md +133 -0
  28. package/docs/apis/features/node/content-db.md +313 -0
  29. package/docs/apis/features/node/disk-cache.md +379 -0
  30. package/docs/apis/features/node/dns.md +651 -0
  31. package/docs/apis/features/node/docker.md +705 -0
  32. package/docs/apis/features/node/downloader.md +81 -0
  33. package/docs/apis/features/node/esbuild.md +59 -0
  34. package/docs/apis/features/node/file-manager.md +182 -0
  35. package/docs/apis/features/node/fs.md +581 -0
  36. package/docs/apis/features/node/git.md +330 -0
  37. package/docs/apis/features/node/google-auth.md +174 -0
  38. package/docs/apis/features/node/google-calendar.md +187 -0
  39. package/docs/apis/features/node/google-docs.md +151 -0
  40. package/docs/apis/features/node/google-drive.md +225 -0
  41. package/docs/apis/features/node/google-sheets.md +179 -0
  42. package/docs/apis/features/node/grep.md +290 -0
  43. package/docs/apis/features/node/helpers.md +135 -0
  44. package/docs/apis/features/node/ink.md +334 -0
  45. package/docs/apis/features/node/ipc-socket.md +260 -0
  46. package/docs/apis/features/node/json-tree.md +86 -0
  47. package/docs/apis/features/node/launcher-app-command-listener.md +145 -0
  48. package/docs/apis/features/node/networking.md +281 -0
  49. package/docs/apis/features/node/nlp.md +133 -0
  50. package/docs/apis/features/node/opener.md +97 -0
  51. package/docs/apis/features/node/os.md +118 -0
  52. package/docs/apis/features/node/package-finder.md +402 -0
  53. package/docs/apis/features/node/postgres.md +212 -0
  54. package/docs/apis/features/node/proc.md +430 -0
  55. package/docs/apis/features/node/process-manager.md +210 -0
  56. package/docs/apis/features/node/python.md +278 -0
  57. package/docs/apis/features/node/repl.md +88 -0
  58. package/docs/apis/features/node/runpod.md +673 -0
  59. package/docs/apis/features/node/secure-shell.md +169 -0
  60. package/docs/apis/features/node/semantic-search.md +401 -0
  61. package/docs/apis/features/node/sqlite.md +211 -0
  62. package/docs/apis/features/node/telegram.md +254 -0
  63. package/docs/apis/features/node/tts.md +118 -0
  64. package/docs/apis/features/node/ui.md +703 -0
  65. package/docs/apis/features/node/vault.md +64 -0
  66. package/docs/apis/features/node/vm.md +84 -0
  67. package/docs/apis/features/node/window-manager.md +337 -0
  68. package/docs/apis/features/node/yaml-tree.md +85 -0
  69. package/docs/apis/features/node/yaml.md +176 -0
  70. package/docs/apis/features/web/asset-loader.md +47 -0
  71. package/docs/apis/features/web/container-link.md +133 -0
  72. package/docs/apis/features/web/esbuild.md +59 -0
  73. package/docs/apis/features/web/helpers.md +135 -0
  74. package/docs/apis/features/web/network.md +30 -0
  75. package/docs/apis/features/web/speech.md +55 -0
  76. package/docs/apis/features/web/vault.md +64 -0
  77. package/docs/apis/features/web/vm.md +84 -0
  78. package/docs/apis/features/web/voice.md +67 -0
  79. package/docs/apis/servers/express.md +127 -0
  80. package/docs/apis/servers/mcp.md +213 -0
  81. package/docs/apis/servers/websocket.md +99 -0
  82. package/docs/documentation-audit.md +134 -0
  83. package/docs/examples/content-db.md +77 -0
  84. package/docs/examples/disk-cache.md +83 -0
  85. package/docs/examples/docker.md +101 -0
  86. package/docs/examples/downloader.md +70 -0
  87. package/docs/examples/esbuild.md +80 -0
  88. package/docs/examples/file-manager.md +82 -0
  89. package/docs/examples/fs.md +83 -0
  90. package/docs/examples/git.md +85 -0
  91. package/docs/examples/google-auth.md +88 -0
  92. package/docs/examples/google-calendar.md +94 -0
  93. package/docs/examples/google-docs.md +82 -0
  94. package/docs/examples/google-drive.md +96 -0
  95. package/docs/examples/google-sheets.md +95 -0
  96. package/docs/examples/grep.md +85 -0
  97. package/docs/examples/ink-blocks.md +75 -0
  98. package/docs/examples/ink-renderer.md +41 -0
  99. package/docs/examples/ink.md +103 -0
  100. package/docs/examples/ipc-socket.md +103 -0
  101. package/docs/examples/json-tree.md +91 -0
  102. package/docs/examples/launcher-app-command-listener.md +120 -0
  103. package/docs/examples/networking.md +58 -0
  104. package/docs/examples/nlp.md +91 -0
  105. package/docs/examples/opener.md +78 -0
  106. package/docs/examples/os.md +72 -0
  107. package/docs/examples/package-finder.md +89 -0
  108. package/docs/examples/port-exposer.md +89 -0
  109. package/docs/examples/postgres.md +91 -0
  110. package/docs/examples/proc.md +81 -0
  111. package/docs/examples/process-manager.md +79 -0
  112. package/docs/examples/python.md +91 -0
  113. package/docs/examples/repl.md +93 -0
  114. package/docs/examples/runpod.md +119 -0
  115. package/docs/examples/secure-shell.md +92 -0
  116. package/docs/examples/sqlite.md +86 -0
  117. package/docs/examples/telegram.md +77 -0
  118. package/docs/examples/tts.md +86 -0
  119. package/docs/examples/ui.md +80 -0
  120. package/docs/examples/vault.md +70 -0
  121. package/docs/examples/vm.md +86 -0
  122. package/docs/examples/window-manager.md +125 -0
  123. package/docs/examples/yaml-tree.md +93 -0
  124. package/docs/examples/yaml.md +104 -0
  125. package/docs/ideas/class-registration-refactor-possibilities.md +197 -0
  126. package/docs/ideas/container-use-api.md +9 -0
  127. package/docs/ideas/easy-auth-for-express-servers-and-luca-serve.md +0 -0
  128. package/docs/ideas/feature-stacks.md +22 -0
  129. package/docs/ideas/luca-cli-self-sufficiency-demo.md +23 -0
  130. package/docs/ideas/mcp-design.md +9 -0
  131. package/docs/ideas/web-container-debugging-feature.md +13 -0
  132. package/docs/introspection-audit.md +49 -0
  133. package/docs/introspection.md +154 -0
  134. package/docs/mcp/readme.md +162 -0
  135. package/docs/models.ts +38 -0
  136. package/docs/philosophy.md +85 -0
  137. package/docs/principles.md +7 -0
  138. package/docs/prompts/audit-codebase-for-failures-to-use-the-container.md +34 -0
  139. package/docs/prompts/mcp-test-easy-command.md +27 -0
  140. package/docs/reports/assistant-bugs.md +38 -0
  141. package/docs/reports/attach-pattern-usage.md +18 -0
  142. package/docs/reports/code-audit-results.md +391 -0
  143. package/docs/reports/introspection-audit-tasks.md +378 -0
  144. package/docs/reports/luca-mcp-improvements.md +128 -0
  145. package/docs/scaffolds/client.md +140 -0
  146. package/docs/scaffolds/command.md +106 -0
  147. package/docs/scaffolds/endpoint.md +176 -0
  148. package/docs/scaffolds/feature.md +148 -0
  149. package/docs/scaffolds/server.md +187 -0
  150. package/docs/tasks/web-container-helper-discovery.md +71 -0
  151. package/docs/todos.md +1 -0
  152. package/docs/tutorials/01-getting-started.md +106 -0
  153. package/docs/tutorials/02-container.md +210 -0
  154. package/docs/tutorials/03-scripts.md +194 -0
  155. package/docs/tutorials/04-features-overview.md +196 -0
  156. package/docs/tutorials/05-state-and-events.md +171 -0
  157. package/docs/tutorials/06-servers.md +157 -0
  158. package/docs/tutorials/07-endpoints.md +198 -0
  159. package/docs/tutorials/08-commands.md +171 -0
  160. package/docs/tutorials/09-clients.md +162 -0
  161. package/docs/tutorials/10-creating-features.md +198 -0
  162. package/docs/tutorials/11-contentbase.md +191 -0
  163. package/docs/tutorials/12-assistants.md +215 -0
  164. package/docs/tutorials/13-introspection.md +147 -0
  165. package/docs/tutorials/14-type-system.md +174 -0
  166. package/docs/tutorials/15-project-patterns.md +222 -0
  167. package/docs/tutorials/16-google-features.md +534 -0
  168. package/docs/tutorials/17-tui-blocks.md +530 -0
  169. package/docs/tutorials/18-semantic-search.md +334 -0
  170. package/index.ts +1 -0
  171. package/luca.console.ts +9 -0
  172. package/main.py +6 -0
  173. package/package.json +154 -0
  174. package/pyproject.toml +7 -0
  175. package/scripts/animations/chrome-glitch.ts +55 -0
  176. package/scripts/animations/index.ts +16 -0
  177. package/scripts/animations/neon-pulse.ts +64 -0
  178. package/scripts/animations/types.ts +6 -0
  179. package/scripts/build-web.ts +28 -0
  180. package/scripts/examples/ask-luca-expert.ts +42 -0
  181. package/scripts/examples/assistant-questions.ts +12 -0
  182. package/scripts/examples/excalidraw-expert.ts +75 -0
  183. package/scripts/examples/expert-chat.ts +0 -0
  184. package/scripts/examples/file-manager.ts +14 -0
  185. package/scripts/examples/ideas.ts +12 -0
  186. package/scripts/examples/interactive-chat.ts +20 -0
  187. package/scripts/examples/openai-tool-calls.ts +113 -0
  188. package/scripts/examples/opening-a-web-browser.ts +5 -0
  189. package/scripts/examples/telegram-bot.ts +79 -0
  190. package/scripts/examples/telegram-ink-ui.ts +302 -0
  191. package/scripts/examples/using-assistant-with-mcp.ts +560 -0
  192. package/scripts/examples/using-claude-code.ts +10 -0
  193. package/scripts/examples/using-contentdb.ts +35 -0
  194. package/scripts/examples/using-conversations.ts +35 -0
  195. package/scripts/examples/using-disk-cache.ts +10 -0
  196. package/scripts/examples/using-docker-shell.ts +75 -0
  197. package/scripts/examples/using-elevenlabs.ts +25 -0
  198. package/scripts/examples/using-google-calendar.ts +57 -0
  199. package/scripts/examples/using-google-docs.ts +74 -0
  200. package/scripts/examples/using-google-drive.ts +74 -0
  201. package/scripts/examples/using-google-sheets.ts +89 -0
  202. package/scripts/examples/using-nlp.ts +55 -0
  203. package/scripts/examples/using-ollama.ts +10 -0
  204. package/scripts/examples/using-openai-codex.ts +23 -0
  205. package/scripts/examples/using-postgres.ts +55 -0
  206. package/scripts/examples/using-runpod.ts +32 -0
  207. package/scripts/examples/using-tts.ts +40 -0
  208. package/scripts/examples/vm-loading-esm-modules.ts +16 -0
  209. package/scripts/scaffold.ts +391 -0
  210. package/scripts/scratch.ts +15 -0
  211. package/scripts/test-command-listener.ts +123 -0
  212. package/scripts/test-window-manager-lifecycle.ts +86 -0
  213. package/scripts/test-window-manager.ts +43 -0
  214. package/scripts/update-introspection-data.ts +58 -0
  215. package/src/agi/README.md +14 -0
  216. package/src/agi/container.server.ts +114 -0
  217. package/src/agi/endpoints/ask.ts +60 -0
  218. package/src/agi/endpoints/conversations/[id].ts +45 -0
  219. package/src/agi/endpoints/conversations.ts +31 -0
  220. package/src/agi/endpoints/experts.ts +37 -0
  221. package/src/agi/features/assistant.ts +767 -0
  222. package/src/agi/features/assistants-manager.ts +260 -0
  223. package/src/agi/features/claude-code.ts +1111 -0
  224. package/src/agi/features/conversation-history.ts +497 -0
  225. package/src/agi/features/conversation.ts +799 -0
  226. package/src/agi/features/openai-codex.ts +631 -0
  227. package/src/agi/features/openapi.ts +438 -0
  228. package/src/agi/features/skills-library.ts +425 -0
  229. package/src/agi/index.ts +6 -0
  230. package/src/agi/lib/token-counter.ts +122 -0
  231. package/src/browser.ts +25 -0
  232. package/src/bus.ts +100 -0
  233. package/src/cli/cli.ts +70 -0
  234. package/src/client.ts +461 -0
  235. package/src/clients/civitai/index.ts +541 -0
  236. package/src/clients/client-template.ts +41 -0
  237. package/src/clients/comfyui/index.ts +597 -0
  238. package/src/clients/elevenlabs/index.ts +291 -0
  239. package/src/clients/openai/index.ts +451 -0
  240. package/src/clients/supabase/index.ts +366 -0
  241. package/src/command.ts +164 -0
  242. package/src/commands/chat.ts +182 -0
  243. package/src/commands/console.ts +192 -0
  244. package/src/commands/describe.ts +433 -0
  245. package/src/commands/eval.ts +116 -0
  246. package/src/commands/help.ts +214 -0
  247. package/src/commands/index.ts +14 -0
  248. package/src/commands/mcp.ts +64 -0
  249. package/src/commands/prompt.ts +807 -0
  250. package/src/commands/run.ts +257 -0
  251. package/src/commands/sandbox-mcp.ts +439 -0
  252. package/src/commands/scaffold.ts +79 -0
  253. package/src/commands/serve.ts +172 -0
  254. package/src/container.ts +781 -0
  255. package/src/endpoint.ts +340 -0
  256. package/src/feature.ts +75 -0
  257. package/src/hash-object.ts +97 -0
  258. package/src/helper.ts +543 -0
  259. package/src/introspection/generated.agi.ts +23388 -0
  260. package/src/introspection/generated.node.ts +18899 -0
  261. package/src/introspection/generated.web.ts +2021 -0
  262. package/src/introspection/index.ts +256 -0
  263. package/src/introspection/scan.ts +912 -0
  264. package/src/node/container.ts +354 -0
  265. package/src/node/feature.ts +13 -0
  266. package/src/node/features/container-link.ts +558 -0
  267. package/src/node/features/content-db.ts +475 -0
  268. package/src/node/features/disk-cache.ts +382 -0
  269. package/src/node/features/dns.ts +655 -0
  270. package/src/node/features/docker.ts +912 -0
  271. package/src/node/features/downloader.ts +92 -0
  272. package/src/node/features/esbuild.ts +68 -0
  273. package/src/node/features/file-manager.ts +357 -0
  274. package/src/node/features/fs.ts +534 -0
  275. package/src/node/features/git.ts +492 -0
  276. package/src/node/features/google-auth.ts +502 -0
  277. package/src/node/features/google-calendar.ts +300 -0
  278. package/src/node/features/google-docs.ts +404 -0
  279. package/src/node/features/google-drive.ts +339 -0
  280. package/src/node/features/google-sheets.ts +279 -0
  281. package/src/node/features/grep.ts +406 -0
  282. package/src/node/features/helpers.ts +374 -0
  283. package/src/node/features/ink.ts +490 -0
  284. package/src/node/features/ipc-socket.ts +459 -0
  285. package/src/node/features/json-tree.ts +188 -0
  286. package/src/node/features/launcher-app-command-listener.ts +388 -0
  287. package/src/node/features/networking.ts +925 -0
  288. package/src/node/features/nlp.ts +211 -0
  289. package/src/node/features/opener.ts +166 -0
  290. package/src/node/features/os.ts +157 -0
  291. package/src/node/features/package-finder.ts +539 -0
  292. package/src/node/features/port-exposer.ts +342 -0
  293. package/src/node/features/postgres.ts +273 -0
  294. package/src/node/features/proc.ts +502 -0
  295. package/src/node/features/process-manager.ts +542 -0
  296. package/src/node/features/python.ts +444 -0
  297. package/src/node/features/repl.ts +194 -0
  298. package/src/node/features/runpod.ts +802 -0
  299. package/src/node/features/secure-shell.ts +248 -0
  300. package/src/node/features/semantic-search.ts +924 -0
  301. package/src/node/features/sqlite.ts +289 -0
  302. package/src/node/features/telegram.ts +342 -0
  303. package/src/node/features/tts.ts +184 -0
  304. package/src/node/features/ui.ts +857 -0
  305. package/src/node/features/vault.ts +164 -0
  306. package/src/node/features/vm.ts +312 -0
  307. package/src/node/features/window-manager.ts +804 -0
  308. package/src/node/features/yaml-tree.ts +149 -0
  309. package/src/node/features/yaml.ts +132 -0
  310. package/src/node.ts +70 -0
  311. package/src/react/index.ts +175 -0
  312. package/src/registry.ts +199 -0
  313. package/src/scaffolds/generated.ts +1613 -0
  314. package/src/scaffolds/template.ts +37 -0
  315. package/src/schemas/base.ts +255 -0
  316. package/src/server.ts +135 -0
  317. package/src/servers/express.ts +209 -0
  318. package/src/servers/mcp.ts +805 -0
  319. package/src/servers/socket.ts +120 -0
  320. package/src/state.ts +101 -0
  321. package/src/web/clients/socket.ts +82 -0
  322. package/src/web/container.ts +74 -0
  323. package/src/web/extension.ts +30 -0
  324. package/src/web/feature.ts +12 -0
  325. package/src/web/features/asset-loader.ts +64 -0
  326. package/src/web/features/container-link.ts +385 -0
  327. package/src/web/features/esbuild.ts +79 -0
  328. package/src/web/features/helpers.ts +267 -0
  329. package/src/web/features/network.ts +61 -0
  330. package/src/web/features/speech.ts +87 -0
  331. package/src/web/features/vault.ts +189 -0
  332. package/src/web/features/vm.ts +78 -0
  333. package/src/web/features/voice-recognition.ts +129 -0
  334. package/src/web/shims/isomorphic-vm.ts +149 -0
  335. package/test/bus.test.ts +134 -0
  336. package/test/clients-servers.test.ts +216 -0
  337. package/test/container-link.test.ts +274 -0
  338. package/test/features.test.ts +160 -0
  339. package/test/integration.test.ts +787 -0
  340. package/test/node-container.test.ts +121 -0
  341. package/test/rate-limit.test.ts +272 -0
  342. package/test/semantic-search.test.ts +550 -0
  343. package/test/state.test.ts +121 -0
  344. package/test-integration/assistant.test.ts +138 -0
  345. package/test-integration/assistants-manager.test.ts +123 -0
  346. package/test-integration/claude-code.test.ts +98 -0
  347. package/test-integration/conversation-history.test.ts +205 -0
  348. package/test-integration/conversation.test.ts +137 -0
  349. package/test-integration/elevenlabs.test.ts +55 -0
  350. package/test-integration/google-services.test.ts +80 -0
  351. package/test-integration/helpers.ts +89 -0
  352. package/test-integration/openai-codex.test.ts +93 -0
  353. package/test-integration/runpod.test.ts +58 -0
  354. package/test-integration/server-endpoints.test.ts +97 -0
  355. package/test-integration/skills-library.test.ts +157 -0
  356. package/test-integration/telegram.test.ts +46 -0
  357. package/tsconfig.json +58 -0
  358. package/uv.lock +8 -0
@@ -0,0 +1,2021 @@
1
+ import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
2
+
3
+ // Auto-generated introspection registry data
4
+ // Generated at: 2026-03-07T09:00:43.785Z
5
+
6
+ setBuildTimeData('features.containerLink', {
7
+ "id": "features.containerLink",
8
+ "description": "ContainerLink (Web-side) — WebSocket client that connects to a node host. Connects to a ContainerLink host over WebSocket. The host can evaluate code in this container, and the web side can emit structured events to the host. The web side can NEVER eval code in the host — trust is strictly one-way.",
9
+ "shortcut": "features.containerLink",
10
+ "className": "ContainerLink",
11
+ "methods": {
12
+ "connect": {
13
+ "description": "Connect to the host WebSocket server and perform registration.",
14
+ "parameters": {
15
+ "hostUrl": {
16
+ "type": "string",
17
+ "description": "Override the configured host URL"
18
+ }
19
+ },
20
+ "required": [],
21
+ "returns": "Promise<this>"
22
+ },
23
+ "disconnect": {
24
+ "description": "Disconnect from the host.",
25
+ "parameters": {
26
+ "reason": {
27
+ "type": "string",
28
+ "description": "Optional reason string"
29
+ }
30
+ },
31
+ "required": [],
32
+ "returns": "void"
33
+ },
34
+ "emitToHost": {
35
+ "description": "Send a structured event to the host container.",
36
+ "parameters": {
37
+ "eventName": {
38
+ "type": "string",
39
+ "description": "Name of the event"
40
+ },
41
+ "data": {
42
+ "type": "any",
43
+ "description": "Optional event data"
44
+ }
45
+ },
46
+ "required": [
47
+ "eventName"
48
+ ],
49
+ "returns": "void"
50
+ }
51
+ },
52
+ "getters": {
53
+ "isConnected": {
54
+ "description": "Whether currently connected to the host.",
55
+ "returns": "boolean"
56
+ },
57
+ "token": {
58
+ "description": "The auth token received from the host.",
59
+ "returns": "string | undefined"
60
+ },
61
+ "hostId": {
62
+ "description": "The host container's UUID.",
63
+ "returns": "string | undefined"
64
+ }
65
+ },
66
+ "events": {
67
+ "connected": {
68
+ "name": "connected",
69
+ "description": "Event emitted by ContainerLink",
70
+ "arguments": {}
71
+ },
72
+ "disconnected": {
73
+ "name": "disconnected",
74
+ "description": "Event emitted by ContainerLink",
75
+ "arguments": {}
76
+ },
77
+ "evalRequest": {
78
+ "name": "evalRequest",
79
+ "description": "Event emitted by ContainerLink",
80
+ "arguments": {}
81
+ },
82
+ "reconnecting": {
83
+ "name": "reconnecting",
84
+ "description": "Event emitted by ContainerLink",
85
+ "arguments": {}
86
+ }
87
+ },
88
+ "state": {},
89
+ "options": {},
90
+ "envVars": [],
91
+ "examples": [
92
+ {
93
+ "language": "ts",
94
+ "code": "const link = container.feature('containerLink', {\n enable: true,\n hostUrl: 'ws://localhost:8089',\n})\nawait link.connect()\n\n// Send events to the host\nlink.emitToHost('click', { x: 100, y: 200 })\n\n// Listen for eval requests before they execute\nlink.on('evalRequest', (code, requestId) => {\n console.log('Host is evaluating:', code)\n})"
95
+ }
96
+ ]
97
+ });
98
+
99
+ setBuildTimeData('features.esbuild', {
100
+ "id": "features.esbuild",
101
+ "description": "Esbuild helper",
102
+ "shortcut": "features.esbuild",
103
+ "className": "Esbuild",
104
+ "methods": {
105
+ "compile": {
106
+ "description": "",
107
+ "parameters": {
108
+ "code": {
109
+ "type": "string",
110
+ "description": "Parameter code"
111
+ },
112
+ "options": {
113
+ "type": "esbuild.TransformOptions",
114
+ "description": "Parameter options"
115
+ }
116
+ },
117
+ "required": [
118
+ "code"
119
+ ],
120
+ "returns": "void"
121
+ },
122
+ "clearCache": {
123
+ "description": "",
124
+ "parameters": {},
125
+ "required": [],
126
+ "returns": "void"
127
+ },
128
+ "start": {
129
+ "description": "",
130
+ "parameters": {},
131
+ "required": [],
132
+ "returns": "void"
133
+ }
134
+ },
135
+ "getters": {
136
+ "assetLoader": {
137
+ "description": "Returns the assetLoader feature for loading external libraries from unpkg.",
138
+ "returns": "any"
139
+ }
140
+ },
141
+ "events": {},
142
+ "state": {},
143
+ "options": {},
144
+ "envVars": []
145
+ });
146
+
147
+ setBuildTimeData('features.voice', {
148
+ "id": "features.voice",
149
+ "description": "VoiceRecognition helper",
150
+ "shortcut": "features.voice",
151
+ "className": "VoiceRecognition",
152
+ "methods": {
153
+ "whenFinished": {
154
+ "description": "",
155
+ "parameters": {},
156
+ "required": [],
157
+ "returns": "void"
158
+ },
159
+ "start": {
160
+ "description": "",
161
+ "parameters": {},
162
+ "required": [],
163
+ "returns": "void"
164
+ },
165
+ "stop": {
166
+ "description": "",
167
+ "parameters": {},
168
+ "required": [],
169
+ "returns": "void"
170
+ },
171
+ "abort": {
172
+ "description": "",
173
+ "parameters": {},
174
+ "required": [],
175
+ "returns": "void"
176
+ },
177
+ "clearTranscript": {
178
+ "description": "",
179
+ "parameters": {},
180
+ "required": [],
181
+ "returns": "void"
182
+ }
183
+ },
184
+ "getters": {
185
+ "listening": {
186
+ "description": "Whether the speech recognizer is currently listening for audio input.",
187
+ "returns": "any"
188
+ },
189
+ "transcript": {
190
+ "description": "Returns the accumulated final transcript text from recognition results.",
191
+ "returns": "any"
192
+ }
193
+ },
194
+ "events": {
195
+ "start": {
196
+ "name": "start",
197
+ "description": "Event emitted by VoiceRecognition",
198
+ "arguments": {}
199
+ },
200
+ "stop": {
201
+ "name": "stop",
202
+ "description": "Event emitted by VoiceRecognition",
203
+ "arguments": {}
204
+ },
205
+ "abort": {
206
+ "name": "abort",
207
+ "description": "Event emitted by VoiceRecognition",
208
+ "arguments": {}
209
+ }
210
+ },
211
+ "state": {},
212
+ "options": {},
213
+ "envVars": []
214
+ });
215
+
216
+ setBuildTimeData('features.vm', {
217
+ "id": "features.vm",
218
+ "description": "The VM features providers a virtual machine for executing JavaScript code in a sandboxed environment. The Vm feature automatically injects the container.context object into the global scope, so these things can be referenced in the code and the code can use anything provided by the container.",
219
+ "shortcut": "features.vm",
220
+ "className": "VM",
221
+ "methods": {
222
+ "createScript": {
223
+ "description": "",
224
+ "parameters": {
225
+ "code": {
226
+ "type": "string",
227
+ "description": "Parameter code"
228
+ }
229
+ },
230
+ "required": [
231
+ "code"
232
+ ],
233
+ "returns": "void"
234
+ },
235
+ "createContext": {
236
+ "description": "",
237
+ "parameters": {
238
+ "ctx": {
239
+ "type": "any",
240
+ "description": "Parameter ctx"
241
+ }
242
+ },
243
+ "required": [],
244
+ "returns": "void"
245
+ },
246
+ "run": {
247
+ "description": "",
248
+ "parameters": {
249
+ "code": {
250
+ "type": "string",
251
+ "description": "Parameter code"
252
+ },
253
+ "ctx": {
254
+ "type": "any",
255
+ "description": "Parameter ctx"
256
+ },
257
+ "options": {
258
+ "type": "any",
259
+ "description": "Parameter options"
260
+ }
261
+ },
262
+ "required": [
263
+ "code"
264
+ ],
265
+ "returns": "void"
266
+ }
267
+ },
268
+ "getters": {},
269
+ "events": {},
270
+ "state": {},
271
+ "options": {},
272
+ "envVars": []
273
+ });
274
+
275
+ setBuildTimeData('features.assetLoader', {
276
+ "id": "features.assetLoader",
277
+ "description": "The AssetLoader provides an API for injecting scripts and stylesheets into the page. It also provides a convenient way of loading any library from unpkg.com",
278
+ "shortcut": "features.assetLoader",
279
+ "className": "AssetLoader",
280
+ "methods": {
281
+ "removeStylesheet": {
282
+ "description": "",
283
+ "parameters": {
284
+ "href": {
285
+ "type": "string",
286
+ "description": "Parameter href"
287
+ }
288
+ },
289
+ "required": [
290
+ "href"
291
+ ],
292
+ "returns": "void"
293
+ },
294
+ "loadScript": {
295
+ "description": "",
296
+ "parameters": {
297
+ "url": {
298
+ "type": "string",
299
+ "description": "Parameter url"
300
+ }
301
+ },
302
+ "required": [
303
+ "url"
304
+ ],
305
+ "returns": "Promise<void>"
306
+ },
307
+ "unpkg": {
308
+ "description": "",
309
+ "parameters": {
310
+ "packageName": {
311
+ "type": "string",
312
+ "description": "Parameter packageName"
313
+ },
314
+ "globalName": {
315
+ "type": "string",
316
+ "description": "Parameter globalName"
317
+ }
318
+ },
319
+ "required": [
320
+ "packageName",
321
+ "globalName"
322
+ ],
323
+ "returns": "Promise<any>"
324
+ }
325
+ },
326
+ "getters": {},
327
+ "events": {},
328
+ "state": {},
329
+ "options": {},
330
+ "envVars": []
331
+ });
332
+
333
+ setBuildTimeData('features.vault', {
334
+ "id": "features.vault",
335
+ "description": "WebVault helper",
336
+ "shortcut": "features.vault",
337
+ "className": "WebVault",
338
+ "methods": {
339
+ "secret": {
340
+ "description": "",
341
+ "parameters": {
342
+ "{ refresh = false, set = true }": {
343
+ "type": "any",
344
+ "description": "Parameter { refresh = false, set = true }"
345
+ }
346
+ },
347
+ "required": [],
348
+ "returns": "Promise<ArrayBuffer>"
349
+ },
350
+ "decrypt": {
351
+ "description": "",
352
+ "parameters": {
353
+ "payload": {
354
+ "type": "string",
355
+ "description": "Parameter payload"
356
+ }
357
+ },
358
+ "required": [
359
+ "payload"
360
+ ],
361
+ "returns": "void"
362
+ },
363
+ "encrypt": {
364
+ "description": "",
365
+ "parameters": {
366
+ "payload": {
367
+ "type": "string",
368
+ "description": "Parameter payload"
369
+ }
370
+ },
371
+ "required": [
372
+ "payload"
373
+ ],
374
+ "returns": "void"
375
+ }
376
+ },
377
+ "getters": {},
378
+ "events": {},
379
+ "state": {},
380
+ "options": {},
381
+ "envVars": []
382
+ });
383
+
384
+ setBuildTimeData('features.network', {
385
+ "id": "features.network",
386
+ "description": "Network helper",
387
+ "shortcut": "features.network",
388
+ "className": "Network",
389
+ "methods": {
390
+ "start": {
391
+ "description": "",
392
+ "parameters": {},
393
+ "required": [],
394
+ "returns": "void"
395
+ },
396
+ "disable": {
397
+ "description": "",
398
+ "parameters": {},
399
+ "required": [],
400
+ "returns": "void"
401
+ }
402
+ },
403
+ "getters": {
404
+ "isOffline": {
405
+ "description": "Whether the browser is currently offline.",
406
+ "returns": "any"
407
+ },
408
+ "isOnline": {
409
+ "description": "Whether the browser is currently online.",
410
+ "returns": "any"
411
+ }
412
+ },
413
+ "events": {},
414
+ "state": {},
415
+ "options": {},
416
+ "envVars": []
417
+ });
418
+
419
+ setBuildTimeData('features.speech', {
420
+ "id": "features.speech",
421
+ "description": "Speech helper",
422
+ "shortcut": "features.speech",
423
+ "className": "Speech",
424
+ "methods": {
425
+ "loadVoices": {
426
+ "description": "",
427
+ "parameters": {},
428
+ "required": [],
429
+ "returns": "void"
430
+ },
431
+ "setDefaultVoice": {
432
+ "description": "",
433
+ "parameters": {
434
+ "name": {
435
+ "type": "string",
436
+ "description": "Parameter name"
437
+ }
438
+ },
439
+ "required": [
440
+ "name"
441
+ ],
442
+ "returns": "void"
443
+ },
444
+ "cancel": {
445
+ "description": "",
446
+ "parameters": {},
447
+ "required": [],
448
+ "returns": "void"
449
+ },
450
+ "say": {
451
+ "description": "",
452
+ "parameters": {
453
+ "text": {
454
+ "type": "string",
455
+ "description": "Parameter text"
456
+ },
457
+ "options": {
458
+ "type": "{ voice?: Voice }",
459
+ "description": "Parameter options"
460
+ }
461
+ },
462
+ "required": [
463
+ "text"
464
+ ],
465
+ "returns": "void"
466
+ }
467
+ },
468
+ "getters": {
469
+ "voices": {
470
+ "description": "Returns the array of available speech synthesis voices.",
471
+ "returns": "any"
472
+ },
473
+ "defaultVoice": {
474
+ "description": "Returns the Voice object matching the currently selected default voice name.",
475
+ "returns": "any"
476
+ }
477
+ },
478
+ "events": {},
479
+ "state": {},
480
+ "options": {},
481
+ "envVars": []
482
+ });
483
+
484
+ setBuildTimeData('features.helpers', {
485
+ "id": "features.helpers",
486
+ "description": "The Helpers feature discovers and loads project-level helpers from a JSON manifest served over HTTP. Scripts are injected via AssetLoader and self-register into the container's registries. This is the web equivalent of the node Helpers feature, which scans the filesystem. Instead of filesystem scanning, this feature fetches a manifest from a well-known URL and uses AssetLoader.loadScript() to inject each helper's script tag.",
487
+ "shortcut": "features.helpers",
488
+ "className": "Helpers",
489
+ "methods": {
490
+ "setManifestURL": {
491
+ "description": "Set a new manifest URL. Invalidates any cached manifest.",
492
+ "parameters": {
493
+ "url": {
494
+ "type": "string",
495
+ "description": "The new URL to fetch the manifest from"
496
+ }
497
+ },
498
+ "required": [
499
+ "url"
500
+ ],
501
+ "returns": "void"
502
+ },
503
+ "discover": {
504
+ "description": "Discover and register helpers of the given type from the manifest. Fetches the manifest, then for each entry of the requested type, loads the script via AssetLoader and checks what got newly registered.",
505
+ "parameters": {
506
+ "type": {
507
+ "type": "RegistryType",
508
+ "description": "Which type of helpers to discover ('features' or 'clients')"
509
+ }
510
+ },
511
+ "required": [
512
+ "type"
513
+ ],
514
+ "returns": "Promise<string[]>"
515
+ },
516
+ "discoverAll": {
517
+ "description": "Discover all helper types from the manifest.",
518
+ "parameters": {},
519
+ "required": [],
520
+ "returns": "Promise<Record<string, string[]>>"
521
+ },
522
+ "discoverFeatures": {
523
+ "description": "Convenience method to discover only features.",
524
+ "parameters": {},
525
+ "required": [],
526
+ "returns": "Promise<string[]>"
527
+ },
528
+ "discoverClients": {
529
+ "description": "Convenience method to discover only clients.",
530
+ "parameters": {},
531
+ "required": [],
532
+ "returns": "Promise<string[]>"
533
+ },
534
+ "lookup": {
535
+ "description": "Look up a helper class by type and name.",
536
+ "parameters": {
537
+ "type": {
538
+ "type": "RegistryType",
539
+ "description": "The registry type"
540
+ },
541
+ "name": {
542
+ "type": "string",
543
+ "description": "The helper name within that registry"
544
+ }
545
+ },
546
+ "required": [
547
+ "type",
548
+ "name"
549
+ ],
550
+ "returns": "any"
551
+ },
552
+ "describe": {
553
+ "description": "Get the introspection description for a specific helper.",
554
+ "parameters": {
555
+ "type": {
556
+ "type": "RegistryType",
557
+ "description": "The registry type"
558
+ },
559
+ "name": {
560
+ "type": "string",
561
+ "description": "The helper name"
562
+ }
563
+ },
564
+ "required": [
565
+ "type",
566
+ "name"
567
+ ],
568
+ "returns": "string"
569
+ }
570
+ },
571
+ "getters": {
572
+ "manifestURL": {
573
+ "description": "The URL to fetch the helpers manifest from.",
574
+ "returns": "string"
575
+ },
576
+ "available": {
577
+ "description": "Returns a unified view of all available helpers across all registries. Each key is a registry type, each value is the list of helper names in that registry.",
578
+ "returns": "Record<string, string[]>"
579
+ }
580
+ },
581
+ "events": {},
582
+ "state": {},
583
+ "options": {},
584
+ "envVars": [],
585
+ "examples": [
586
+ {
587
+ "language": "ts",
588
+ "code": "const helpers = container.feature('helpers', { enable: true })\n\n// Discover all helper types from the manifest\nawait helpers.discoverAll()\n\n// Discover a specific type\nawait helpers.discover('features')\n\n// Unified view of all available helpers\nconsole.log(helpers.available)"
589
+ }
590
+ ]
591
+ });
592
+
593
+ // Container introspection data
594
+ setContainerBuildTimeData('Container', {
595
+ "className": "Container",
596
+ "description": "Containers are single objects that contain state, an event bus, and registries of helpers such as: - features - clients - servers A Helper represents a category of components in your program which have a common interface, e.g. all servers can be started / stopped, all features can be enabled, if supported, all clients can connect to something. A Helper can be introspected at runtime to learn about the interface of the helper. A helper has state, and emits events. You can design your own containers and load them up with the helpers you want for that environment.",
597
+ "methods": {
598
+ "subcontainer": {
599
+ "description": "Creates a new subcontainer instance of the same concrete Container subclass. The new instance is constructed with the same options as this container, shallow-merged with any overrides you provide. This preserves the runtime container type (e.g. NodeContainer, BrowserContainer, etc.).",
600
+ "parameters": {
601
+ "this": {
602
+ "type": "This",
603
+ "description": "Parameter this"
604
+ },
605
+ "options": {
606
+ "type": "ConstructorParameters<This['constructor']>[0]",
607
+ "description": "Options to override for the new container instance."
608
+ }
609
+ },
610
+ "required": [
611
+ "this",
612
+ "options"
613
+ ],
614
+ "returns": "This"
615
+ },
616
+ "addContext": {
617
+ "description": "",
618
+ "parameters": {
619
+ "keyOrContext": {
620
+ "type": "keyof ContainerContext | Partial<ContainerContext>",
621
+ "description": "Parameter keyOrContext"
622
+ },
623
+ "value": {
624
+ "type": "ContainerContext[keyof ContainerContext]",
625
+ "description": "Parameter value"
626
+ }
627
+ },
628
+ "required": [
629
+ "keyOrContext"
630
+ ],
631
+ "returns": "this"
632
+ },
633
+ "setState": {
634
+ "description": "Sets the state of the container.",
635
+ "parameters": {
636
+ "newState": {
637
+ "type": "SetStateValue<ContainerState>",
638
+ "description": "The new state of the container."
639
+ }
640
+ },
641
+ "required": [
642
+ "newState"
643
+ ],
644
+ "returns": "void"
645
+ },
646
+ "bus": {
647
+ "description": "Convenience method for creating a new event bus instance.",
648
+ "parameters": {},
649
+ "required": [],
650
+ "returns": "void"
651
+ },
652
+ "newState": {
653
+ "description": "Convenience method for creating a new observable State object.",
654
+ "parameters": {
655
+ "initialState": {
656
+ "type": "T",
657
+ "description": "Parameter initialState"
658
+ }
659
+ },
660
+ "required": [],
661
+ "returns": "void"
662
+ },
663
+ "normalizeHelperOptions": {
664
+ "description": "Parse helper options through the helper's static options schema so defaults are materialized.",
665
+ "parameters": {
666
+ "BaseClass": {
667
+ "type": "any",
668
+ "description": "Parameter BaseClass"
669
+ },
670
+ "options": {
671
+ "type": "any",
672
+ "description": "Parameter options"
673
+ },
674
+ "fallbackName": {
675
+ "type": "string",
676
+ "description": "Parameter fallbackName"
677
+ }
678
+ },
679
+ "required": [
680
+ "BaseClass",
681
+ "options"
682
+ ],
683
+ "returns": "void"
684
+ },
685
+ "buildHelperCacheKey": {
686
+ "description": "",
687
+ "parameters": {
688
+ "type": {
689
+ "type": "string",
690
+ "description": "Parameter type"
691
+ },
692
+ "id": {
693
+ "type": "string",
694
+ "description": "Parameter id"
695
+ },
696
+ "options": {
697
+ "type": "any",
698
+ "description": "Parameter options"
699
+ },
700
+ "omitOptionKeys": {
701
+ "type": "string[]",
702
+ "description": "Parameter omitOptionKeys"
703
+ }
704
+ },
705
+ "required": [
706
+ "type",
707
+ "id",
708
+ "options"
709
+ ],
710
+ "returns": "void"
711
+ },
712
+ "createHelperInstance": {
713
+ "description": "",
714
+ "parameters": {
715
+ "{\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }": {
716
+ "type": "{\n cache: Map<string, any>\n type: string\n id: string\n BaseClass: any\n options?: any\n fallbackName?: string\n omitOptionKeys?: string[]\n context?: any\n }",
717
+ "description": "Parameter {\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }"
718
+ }
719
+ },
720
+ "required": [
721
+ "{\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }"
722
+ ],
723
+ "returns": "void"
724
+ },
725
+ "feature": {
726
+ "description": "Creates a new instance of a feature. If you pass the same arguments, it will return the same instance as last time you created that. If you need the ability to create fresh instances, it is up to you how you define your options to support that.",
727
+ "parameters": {
728
+ "id": {
729
+ "type": "T",
730
+ "description": "The id of the feature to create."
731
+ },
732
+ "options": {
733
+ "type": "ConstructorParameters<Features[T]>[0]",
734
+ "description": "The options to pass to the feature constructor."
735
+ }
736
+ },
737
+ "required": [
738
+ "id"
739
+ ],
740
+ "returns": "InstanceType<Features[T]>"
741
+ },
742
+ "start": {
743
+ "description": "TODO: A container should be able to container.use(plugin) and that plugin should be able to define an asynchronous method that will be run when the container is started. Right now there's nothing to do with starting / stopping a container but that might be neat.",
744
+ "parameters": {},
745
+ "required": [],
746
+ "returns": "void"
747
+ },
748
+ "emit": {
749
+ "description": "Emit an event on the container's event bus.",
750
+ "parameters": {
751
+ "event": {
752
+ "type": "string",
753
+ "description": "Parameter event"
754
+ },
755
+ "args": {
756
+ "type": "any[]",
757
+ "description": "Parameter args"
758
+ }
759
+ },
760
+ "required": [
761
+ "event",
762
+ "args"
763
+ ],
764
+ "returns": "void"
765
+ },
766
+ "on": {
767
+ "description": "Subscribe to an event on the container's event bus.",
768
+ "parameters": {
769
+ "event": {
770
+ "type": "string",
771
+ "description": "Parameter event"
772
+ },
773
+ "listener": {
774
+ "type": "(...args: any[]) => void",
775
+ "description": "Parameter listener"
776
+ }
777
+ },
778
+ "required": [
779
+ "event",
780
+ "listener"
781
+ ],
782
+ "returns": "void"
783
+ },
784
+ "off": {
785
+ "description": "Unsubscribe a listener from an event on the container's event bus.",
786
+ "parameters": {
787
+ "event": {
788
+ "type": "string",
789
+ "description": "Parameter event"
790
+ },
791
+ "listener": {
792
+ "type": "(...args: any[]) => void",
793
+ "description": "Parameter listener"
794
+ }
795
+ },
796
+ "required": [
797
+ "event"
798
+ ],
799
+ "returns": "void"
800
+ },
801
+ "once": {
802
+ "description": "Subscribe to an event on the container's event bus, but only fire once.",
803
+ "parameters": {
804
+ "event": {
805
+ "type": "string",
806
+ "description": "Parameter event"
807
+ },
808
+ "listener": {
809
+ "type": "(...args: any[]) => void",
810
+ "description": "Parameter listener"
811
+ }
812
+ },
813
+ "required": [
814
+ "event",
815
+ "listener"
816
+ ],
817
+ "returns": "void"
818
+ },
819
+ "waitFor": {
820
+ "description": "Returns a promise that will resolve when the event is emitted",
821
+ "parameters": {
822
+ "event": {
823
+ "type": "string",
824
+ "description": "Parameter event"
825
+ }
826
+ },
827
+ "required": [
828
+ "event"
829
+ ],
830
+ "returns": "void"
831
+ },
832
+ "registerHelperType": {
833
+ "description": "Register a helper type (registry + factory pair) on this container. Called automatically by Helper.attach() methods (e.g. Client.attach, Server.attach).",
834
+ "parameters": {
835
+ "registryName": {
836
+ "type": "string",
837
+ "description": "The plural name of the registry, e.g. \"clients\", \"servers\""
838
+ },
839
+ "factoryName": {
840
+ "type": "string",
841
+ "description": "The singular factory method name, e.g. \"client\", \"server\""
842
+ }
843
+ },
844
+ "required": [
845
+ "registryName",
846
+ "factoryName"
847
+ ],
848
+ "returns": "void"
849
+ },
850
+ "inspect": {
851
+ "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).",
852
+ "parameters": {},
853
+ "required": [],
854
+ "returns": "ContainerIntrospection"
855
+ },
856
+ "inspectAsText": {
857
+ "description": "Returns a human-readable markdown representation of this container's introspection data. Useful in REPLs, AI agent contexts, or documentation generation. The first argument can be a section name (`'methods'`, `'getters'`, etc.) to render only that section, or a number for the starting heading depth (backward compatible).",
858
+ "parameters": {
859
+ "sectionOrDepth": {
860
+ "type": "IntrospectionSection | number",
861
+ "description": "Parameter sectionOrDepth"
862
+ },
863
+ "startHeadingDepth": {
864
+ "type": "number",
865
+ "description": "Parameter startHeadingDepth"
866
+ }
867
+ },
868
+ "required": [],
869
+ "returns": "string"
870
+ },
871
+ "introspectAsText": {
872
+ "description": "Alias for inspectAsText",
873
+ "parameters": {
874
+ "sectionOrDepth": {
875
+ "type": "IntrospectionSection | number",
876
+ "description": "Parameter sectionOrDepth"
877
+ },
878
+ "startHeadingDepth": {
879
+ "type": "number",
880
+ "description": "Parameter startHeadingDepth"
881
+ }
882
+ },
883
+ "required": [],
884
+ "returns": "string"
885
+ },
886
+ "introspectAsJSON": {
887
+ "description": "Alias for inspectAsJSON",
888
+ "parameters": {
889
+ "sectionOrDepth": {
890
+ "type": "IntrospectionSection | number",
891
+ "description": "Parameter sectionOrDepth"
892
+ },
893
+ "startHeadingDepth": {
894
+ "type": "number",
895
+ "description": "Parameter startHeadingDepth"
896
+ }
897
+ },
898
+ "required": [],
899
+ "returns": "any"
900
+ },
901
+ "sleep": {
902
+ "description": "Sleep for the specified number of milliseconds. Useful for scripting and sequencing.",
903
+ "parameters": {
904
+ "ms": {
905
+ "type": "any",
906
+ "description": "Parameter ms"
907
+ }
908
+ },
909
+ "required": [],
910
+ "returns": "void"
911
+ },
912
+ "use": {
913
+ "description": "Apply a plugin or enable a feature by string name. Plugins must have a static attach(container) method.",
914
+ "parameters": {
915
+ "plugin": {
916
+ "type": "Extension<T>",
917
+ "description": "A feature name string, or a class/object with a static attach method"
918
+ },
919
+ "options": {
920
+ "type": "any",
921
+ "description": "Options to pass to the plugin's attach method"
922
+ }
923
+ },
924
+ "required": [
925
+ "plugin"
926
+ ],
927
+ "returns": "this & T"
928
+ }
929
+ },
930
+ "getters": {
931
+ "state": {
932
+ "description": "The observable state object for this container instance.",
933
+ "returns": "any"
934
+ },
935
+ "enabledFeatureIds": {
936
+ "description": "Returns the list of shortcut IDs for all currently enabled features.",
937
+ "returns": "any"
938
+ },
939
+ "enabledFeatures": {
940
+ "description": "Returns a map of enabled feature shortcut IDs to their instances.",
941
+ "returns": "Partial<AvailableInstanceTypes<Features>>"
942
+ },
943
+ "context": {
944
+ "description": "The Container's context is an object that contains the enabled features, the container itself, and any additional context that has been added to the container. All helper instances that are created by the container will have access to the shared context.",
945
+ "returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
946
+ },
947
+ "currentState": {
948
+ "description": "The current state of the container. This is a snapshot of the container's state at the time this method is called.",
949
+ "returns": "any"
950
+ },
951
+ "isBrowser": {
952
+ "description": "Returns true if the container is running in a browser.",
953
+ "returns": "any"
954
+ },
955
+ "isBun": {
956
+ "description": "Returns true if the container is running in Bun.",
957
+ "returns": "any"
958
+ },
959
+ "isNode": {
960
+ "description": "Returns true if the container is running in Node.",
961
+ "returns": "any"
962
+ },
963
+ "isElectron": {
964
+ "description": "Returns true if the container is running in Electron.",
965
+ "returns": "any"
966
+ },
967
+ "isDevelopment": {
968
+ "description": "Returns true if the container is running in development mode.",
969
+ "returns": "any"
970
+ },
971
+ "isProduction": {
972
+ "description": "Returns true if the container is running in production mode.",
973
+ "returns": "any"
974
+ },
975
+ "isCI": {
976
+ "description": "Returns true if the container is running in a CI environment.",
977
+ "returns": "any"
978
+ },
979
+ "registryNames": {
980
+ "description": "Returns the names of all attached registries (e.g. [\"features\", \"clients\", \"servers\"]).",
981
+ "returns": "string[]"
982
+ },
983
+ "factoryNames": {
984
+ "description": "Returns the names of all available factory methods (e.g. [\"feature\", \"client\", \"server\"]).",
985
+ "returns": "string[]"
986
+ }
987
+ },
988
+ "events": {
989
+ "started": {
990
+ "name": "started",
991
+ "description": "Event emitted by Container",
992
+ "arguments": {}
993
+ }
994
+ }
995
+ });
996
+
997
+ setContainerBuildTimeData('WebContainer', {
998
+ "className": "WebContainer",
999
+ "description": "Browser-specific container that extends the base Container with web client support and browser-specific features like speech, voice recognition, and asset loading.",
1000
+ "methods": {},
1001
+ "getters": {
1002
+ "Client": {
1003
+ "description": "Returns the base Client class for creating custom clients.",
1004
+ "returns": "any"
1005
+ },
1006
+ "SocketClient": {
1007
+ "description": "Returns the SocketClient class for WebSocket connections.",
1008
+ "returns": "any"
1009
+ },
1010
+ "RestClient": {
1011
+ "description": "Returns the RestClient class for HTTP REST API connections.",
1012
+ "returns": "any"
1013
+ }
1014
+ },
1015
+ "events": {}
1016
+ });
1017
+ export const introspectionData = [
1018
+ {
1019
+ "id": "features.containerLink",
1020
+ "description": "ContainerLink (Web-side) — WebSocket client that connects to a node host. Connects to a ContainerLink host over WebSocket. The host can evaluate code in this container, and the web side can emit structured events to the host. The web side can NEVER eval code in the host — trust is strictly one-way.",
1021
+ "shortcut": "features.containerLink",
1022
+ "className": "ContainerLink",
1023
+ "methods": {
1024
+ "connect": {
1025
+ "description": "Connect to the host WebSocket server and perform registration.",
1026
+ "parameters": {
1027
+ "hostUrl": {
1028
+ "type": "string",
1029
+ "description": "Override the configured host URL"
1030
+ }
1031
+ },
1032
+ "required": [],
1033
+ "returns": "Promise<this>"
1034
+ },
1035
+ "disconnect": {
1036
+ "description": "Disconnect from the host.",
1037
+ "parameters": {
1038
+ "reason": {
1039
+ "type": "string",
1040
+ "description": "Optional reason string"
1041
+ }
1042
+ },
1043
+ "required": [],
1044
+ "returns": "void"
1045
+ },
1046
+ "emitToHost": {
1047
+ "description": "Send a structured event to the host container.",
1048
+ "parameters": {
1049
+ "eventName": {
1050
+ "type": "string",
1051
+ "description": "Name of the event"
1052
+ },
1053
+ "data": {
1054
+ "type": "any",
1055
+ "description": "Optional event data"
1056
+ }
1057
+ },
1058
+ "required": [
1059
+ "eventName"
1060
+ ],
1061
+ "returns": "void"
1062
+ }
1063
+ },
1064
+ "getters": {
1065
+ "isConnected": {
1066
+ "description": "Whether currently connected to the host.",
1067
+ "returns": "boolean"
1068
+ },
1069
+ "token": {
1070
+ "description": "The auth token received from the host.",
1071
+ "returns": "string | undefined"
1072
+ },
1073
+ "hostId": {
1074
+ "description": "The host container's UUID.",
1075
+ "returns": "string | undefined"
1076
+ }
1077
+ },
1078
+ "events": {
1079
+ "connected": {
1080
+ "name": "connected",
1081
+ "description": "Event emitted by ContainerLink",
1082
+ "arguments": {}
1083
+ },
1084
+ "disconnected": {
1085
+ "name": "disconnected",
1086
+ "description": "Event emitted by ContainerLink",
1087
+ "arguments": {}
1088
+ },
1089
+ "evalRequest": {
1090
+ "name": "evalRequest",
1091
+ "description": "Event emitted by ContainerLink",
1092
+ "arguments": {}
1093
+ },
1094
+ "reconnecting": {
1095
+ "name": "reconnecting",
1096
+ "description": "Event emitted by ContainerLink",
1097
+ "arguments": {}
1098
+ }
1099
+ },
1100
+ "state": {},
1101
+ "options": {},
1102
+ "envVars": [],
1103
+ "examples": [
1104
+ {
1105
+ "language": "ts",
1106
+ "code": "const link = container.feature('containerLink', {\n enable: true,\n hostUrl: 'ws://localhost:8089',\n})\nawait link.connect()\n\n// Send events to the host\nlink.emitToHost('click', { x: 100, y: 200 })\n\n// Listen for eval requests before they execute\nlink.on('evalRequest', (code, requestId) => {\n console.log('Host is evaluating:', code)\n})"
1107
+ }
1108
+ ]
1109
+ },
1110
+ {
1111
+ "id": "features.esbuild",
1112
+ "description": "Esbuild helper",
1113
+ "shortcut": "features.esbuild",
1114
+ "className": "Esbuild",
1115
+ "methods": {
1116
+ "compile": {
1117
+ "description": "",
1118
+ "parameters": {
1119
+ "code": {
1120
+ "type": "string",
1121
+ "description": "Parameter code"
1122
+ },
1123
+ "options": {
1124
+ "type": "esbuild.TransformOptions",
1125
+ "description": "Parameter options"
1126
+ }
1127
+ },
1128
+ "required": [
1129
+ "code"
1130
+ ],
1131
+ "returns": "void"
1132
+ },
1133
+ "clearCache": {
1134
+ "description": "",
1135
+ "parameters": {},
1136
+ "required": [],
1137
+ "returns": "void"
1138
+ },
1139
+ "start": {
1140
+ "description": "",
1141
+ "parameters": {},
1142
+ "required": [],
1143
+ "returns": "void"
1144
+ }
1145
+ },
1146
+ "getters": {
1147
+ "assetLoader": {
1148
+ "description": "Returns the assetLoader feature for loading external libraries from unpkg.",
1149
+ "returns": "any"
1150
+ }
1151
+ },
1152
+ "events": {},
1153
+ "state": {},
1154
+ "options": {},
1155
+ "envVars": []
1156
+ },
1157
+ {
1158
+ "id": "features.voice",
1159
+ "description": "VoiceRecognition helper",
1160
+ "shortcut": "features.voice",
1161
+ "className": "VoiceRecognition",
1162
+ "methods": {
1163
+ "whenFinished": {
1164
+ "description": "",
1165
+ "parameters": {},
1166
+ "required": [],
1167
+ "returns": "void"
1168
+ },
1169
+ "start": {
1170
+ "description": "",
1171
+ "parameters": {},
1172
+ "required": [],
1173
+ "returns": "void"
1174
+ },
1175
+ "stop": {
1176
+ "description": "",
1177
+ "parameters": {},
1178
+ "required": [],
1179
+ "returns": "void"
1180
+ },
1181
+ "abort": {
1182
+ "description": "",
1183
+ "parameters": {},
1184
+ "required": [],
1185
+ "returns": "void"
1186
+ },
1187
+ "clearTranscript": {
1188
+ "description": "",
1189
+ "parameters": {},
1190
+ "required": [],
1191
+ "returns": "void"
1192
+ }
1193
+ },
1194
+ "getters": {
1195
+ "listening": {
1196
+ "description": "Whether the speech recognizer is currently listening for audio input.",
1197
+ "returns": "any"
1198
+ },
1199
+ "transcript": {
1200
+ "description": "Returns the accumulated final transcript text from recognition results.",
1201
+ "returns": "any"
1202
+ }
1203
+ },
1204
+ "events": {
1205
+ "start": {
1206
+ "name": "start",
1207
+ "description": "Event emitted by VoiceRecognition",
1208
+ "arguments": {}
1209
+ },
1210
+ "stop": {
1211
+ "name": "stop",
1212
+ "description": "Event emitted by VoiceRecognition",
1213
+ "arguments": {}
1214
+ },
1215
+ "abort": {
1216
+ "name": "abort",
1217
+ "description": "Event emitted by VoiceRecognition",
1218
+ "arguments": {}
1219
+ }
1220
+ },
1221
+ "state": {},
1222
+ "options": {},
1223
+ "envVars": []
1224
+ },
1225
+ {
1226
+ "id": "features.vm",
1227
+ "description": "The VM features providers a virtual machine for executing JavaScript code in a sandboxed environment. The Vm feature automatically injects the container.context object into the global scope, so these things can be referenced in the code and the code can use anything provided by the container.",
1228
+ "shortcut": "features.vm",
1229
+ "className": "VM",
1230
+ "methods": {
1231
+ "createScript": {
1232
+ "description": "",
1233
+ "parameters": {
1234
+ "code": {
1235
+ "type": "string",
1236
+ "description": "Parameter code"
1237
+ }
1238
+ },
1239
+ "required": [
1240
+ "code"
1241
+ ],
1242
+ "returns": "void"
1243
+ },
1244
+ "createContext": {
1245
+ "description": "",
1246
+ "parameters": {
1247
+ "ctx": {
1248
+ "type": "any",
1249
+ "description": "Parameter ctx"
1250
+ }
1251
+ },
1252
+ "required": [],
1253
+ "returns": "void"
1254
+ },
1255
+ "run": {
1256
+ "description": "",
1257
+ "parameters": {
1258
+ "code": {
1259
+ "type": "string",
1260
+ "description": "Parameter code"
1261
+ },
1262
+ "ctx": {
1263
+ "type": "any",
1264
+ "description": "Parameter ctx"
1265
+ },
1266
+ "options": {
1267
+ "type": "any",
1268
+ "description": "Parameter options"
1269
+ }
1270
+ },
1271
+ "required": [
1272
+ "code"
1273
+ ],
1274
+ "returns": "void"
1275
+ }
1276
+ },
1277
+ "getters": {},
1278
+ "events": {},
1279
+ "state": {},
1280
+ "options": {},
1281
+ "envVars": []
1282
+ },
1283
+ {
1284
+ "id": "features.assetLoader",
1285
+ "description": "The AssetLoader provides an API for injecting scripts and stylesheets into the page. It also provides a convenient way of loading any library from unpkg.com",
1286
+ "shortcut": "features.assetLoader",
1287
+ "className": "AssetLoader",
1288
+ "methods": {
1289
+ "removeStylesheet": {
1290
+ "description": "",
1291
+ "parameters": {
1292
+ "href": {
1293
+ "type": "string",
1294
+ "description": "Parameter href"
1295
+ }
1296
+ },
1297
+ "required": [
1298
+ "href"
1299
+ ],
1300
+ "returns": "void"
1301
+ },
1302
+ "loadScript": {
1303
+ "description": "",
1304
+ "parameters": {
1305
+ "url": {
1306
+ "type": "string",
1307
+ "description": "Parameter url"
1308
+ }
1309
+ },
1310
+ "required": [
1311
+ "url"
1312
+ ],
1313
+ "returns": "Promise<void>"
1314
+ },
1315
+ "unpkg": {
1316
+ "description": "",
1317
+ "parameters": {
1318
+ "packageName": {
1319
+ "type": "string",
1320
+ "description": "Parameter packageName"
1321
+ },
1322
+ "globalName": {
1323
+ "type": "string",
1324
+ "description": "Parameter globalName"
1325
+ }
1326
+ },
1327
+ "required": [
1328
+ "packageName",
1329
+ "globalName"
1330
+ ],
1331
+ "returns": "Promise<any>"
1332
+ }
1333
+ },
1334
+ "getters": {},
1335
+ "events": {},
1336
+ "state": {},
1337
+ "options": {},
1338
+ "envVars": []
1339
+ },
1340
+ {
1341
+ "id": "features.vault",
1342
+ "description": "WebVault helper",
1343
+ "shortcut": "features.vault",
1344
+ "className": "WebVault",
1345
+ "methods": {
1346
+ "secret": {
1347
+ "description": "",
1348
+ "parameters": {
1349
+ "{ refresh = false, set = true }": {
1350
+ "type": "any",
1351
+ "description": "Parameter { refresh = false, set = true }"
1352
+ }
1353
+ },
1354
+ "required": [],
1355
+ "returns": "Promise<ArrayBuffer>"
1356
+ },
1357
+ "decrypt": {
1358
+ "description": "",
1359
+ "parameters": {
1360
+ "payload": {
1361
+ "type": "string",
1362
+ "description": "Parameter payload"
1363
+ }
1364
+ },
1365
+ "required": [
1366
+ "payload"
1367
+ ],
1368
+ "returns": "void"
1369
+ },
1370
+ "encrypt": {
1371
+ "description": "",
1372
+ "parameters": {
1373
+ "payload": {
1374
+ "type": "string",
1375
+ "description": "Parameter payload"
1376
+ }
1377
+ },
1378
+ "required": [
1379
+ "payload"
1380
+ ],
1381
+ "returns": "void"
1382
+ }
1383
+ },
1384
+ "getters": {},
1385
+ "events": {},
1386
+ "state": {},
1387
+ "options": {},
1388
+ "envVars": []
1389
+ },
1390
+ {
1391
+ "id": "features.network",
1392
+ "description": "Network helper",
1393
+ "shortcut": "features.network",
1394
+ "className": "Network",
1395
+ "methods": {
1396
+ "start": {
1397
+ "description": "",
1398
+ "parameters": {},
1399
+ "required": [],
1400
+ "returns": "void"
1401
+ },
1402
+ "disable": {
1403
+ "description": "",
1404
+ "parameters": {},
1405
+ "required": [],
1406
+ "returns": "void"
1407
+ }
1408
+ },
1409
+ "getters": {
1410
+ "isOffline": {
1411
+ "description": "Whether the browser is currently offline.",
1412
+ "returns": "any"
1413
+ },
1414
+ "isOnline": {
1415
+ "description": "Whether the browser is currently online.",
1416
+ "returns": "any"
1417
+ }
1418
+ },
1419
+ "events": {},
1420
+ "state": {},
1421
+ "options": {},
1422
+ "envVars": []
1423
+ },
1424
+ {
1425
+ "id": "features.speech",
1426
+ "description": "Speech helper",
1427
+ "shortcut": "features.speech",
1428
+ "className": "Speech",
1429
+ "methods": {
1430
+ "loadVoices": {
1431
+ "description": "",
1432
+ "parameters": {},
1433
+ "required": [],
1434
+ "returns": "void"
1435
+ },
1436
+ "setDefaultVoice": {
1437
+ "description": "",
1438
+ "parameters": {
1439
+ "name": {
1440
+ "type": "string",
1441
+ "description": "Parameter name"
1442
+ }
1443
+ },
1444
+ "required": [
1445
+ "name"
1446
+ ],
1447
+ "returns": "void"
1448
+ },
1449
+ "cancel": {
1450
+ "description": "",
1451
+ "parameters": {},
1452
+ "required": [],
1453
+ "returns": "void"
1454
+ },
1455
+ "say": {
1456
+ "description": "",
1457
+ "parameters": {
1458
+ "text": {
1459
+ "type": "string",
1460
+ "description": "Parameter text"
1461
+ },
1462
+ "options": {
1463
+ "type": "{ voice?: Voice }",
1464
+ "description": "Parameter options"
1465
+ }
1466
+ },
1467
+ "required": [
1468
+ "text"
1469
+ ],
1470
+ "returns": "void"
1471
+ }
1472
+ },
1473
+ "getters": {
1474
+ "voices": {
1475
+ "description": "Returns the array of available speech synthesis voices.",
1476
+ "returns": "any"
1477
+ },
1478
+ "defaultVoice": {
1479
+ "description": "Returns the Voice object matching the currently selected default voice name.",
1480
+ "returns": "any"
1481
+ }
1482
+ },
1483
+ "events": {},
1484
+ "state": {},
1485
+ "options": {},
1486
+ "envVars": []
1487
+ },
1488
+ {
1489
+ "id": "features.helpers",
1490
+ "description": "The Helpers feature discovers and loads project-level helpers from a JSON manifest served over HTTP. Scripts are injected via AssetLoader and self-register into the container's registries. This is the web equivalent of the node Helpers feature, which scans the filesystem. Instead of filesystem scanning, this feature fetches a manifest from a well-known URL and uses AssetLoader.loadScript() to inject each helper's script tag.",
1491
+ "shortcut": "features.helpers",
1492
+ "className": "Helpers",
1493
+ "methods": {
1494
+ "setManifestURL": {
1495
+ "description": "Set a new manifest URL. Invalidates any cached manifest.",
1496
+ "parameters": {
1497
+ "url": {
1498
+ "type": "string",
1499
+ "description": "The new URL to fetch the manifest from"
1500
+ }
1501
+ },
1502
+ "required": [
1503
+ "url"
1504
+ ],
1505
+ "returns": "void"
1506
+ },
1507
+ "discover": {
1508
+ "description": "Discover and register helpers of the given type from the manifest. Fetches the manifest, then for each entry of the requested type, loads the script via AssetLoader and checks what got newly registered.",
1509
+ "parameters": {
1510
+ "type": {
1511
+ "type": "RegistryType",
1512
+ "description": "Which type of helpers to discover ('features' or 'clients')"
1513
+ }
1514
+ },
1515
+ "required": [
1516
+ "type"
1517
+ ],
1518
+ "returns": "Promise<string[]>"
1519
+ },
1520
+ "discoverAll": {
1521
+ "description": "Discover all helper types from the manifest.",
1522
+ "parameters": {},
1523
+ "required": [],
1524
+ "returns": "Promise<Record<string, string[]>>"
1525
+ },
1526
+ "discoverFeatures": {
1527
+ "description": "Convenience method to discover only features.",
1528
+ "parameters": {},
1529
+ "required": [],
1530
+ "returns": "Promise<string[]>"
1531
+ },
1532
+ "discoverClients": {
1533
+ "description": "Convenience method to discover only clients.",
1534
+ "parameters": {},
1535
+ "required": [],
1536
+ "returns": "Promise<string[]>"
1537
+ },
1538
+ "lookup": {
1539
+ "description": "Look up a helper class by type and name.",
1540
+ "parameters": {
1541
+ "type": {
1542
+ "type": "RegistryType",
1543
+ "description": "The registry type"
1544
+ },
1545
+ "name": {
1546
+ "type": "string",
1547
+ "description": "The helper name within that registry"
1548
+ }
1549
+ },
1550
+ "required": [
1551
+ "type",
1552
+ "name"
1553
+ ],
1554
+ "returns": "any"
1555
+ },
1556
+ "describe": {
1557
+ "description": "Get the introspection description for a specific helper.",
1558
+ "parameters": {
1559
+ "type": {
1560
+ "type": "RegistryType",
1561
+ "description": "The registry type"
1562
+ },
1563
+ "name": {
1564
+ "type": "string",
1565
+ "description": "The helper name"
1566
+ }
1567
+ },
1568
+ "required": [
1569
+ "type",
1570
+ "name"
1571
+ ],
1572
+ "returns": "string"
1573
+ }
1574
+ },
1575
+ "getters": {
1576
+ "manifestURL": {
1577
+ "description": "The URL to fetch the helpers manifest from.",
1578
+ "returns": "string"
1579
+ },
1580
+ "available": {
1581
+ "description": "Returns a unified view of all available helpers across all registries. Each key is a registry type, each value is the list of helper names in that registry.",
1582
+ "returns": "Record<string, string[]>"
1583
+ }
1584
+ },
1585
+ "events": {},
1586
+ "state": {},
1587
+ "options": {},
1588
+ "envVars": [],
1589
+ "examples": [
1590
+ {
1591
+ "language": "ts",
1592
+ "code": "const helpers = container.feature('helpers', { enable: true })\n\n// Discover all helper types from the manifest\nawait helpers.discoverAll()\n\n// Discover a specific type\nawait helpers.discover('features')\n\n// Unified view of all available helpers\nconsole.log(helpers.available)"
1593
+ }
1594
+ ]
1595
+ }
1596
+ ];
1597
+
1598
+ export const containerIntrospectionData = [
1599
+ {
1600
+ "className": "Container",
1601
+ "description": "Containers are single objects that contain state, an event bus, and registries of helpers such as: - features - clients - servers A Helper represents a category of components in your program which have a common interface, e.g. all servers can be started / stopped, all features can be enabled, if supported, all clients can connect to something. A Helper can be introspected at runtime to learn about the interface of the helper. A helper has state, and emits events. You can design your own containers and load them up with the helpers you want for that environment.",
1602
+ "methods": {
1603
+ "subcontainer": {
1604
+ "description": "Creates a new subcontainer instance of the same concrete Container subclass. The new instance is constructed with the same options as this container, shallow-merged with any overrides you provide. This preserves the runtime container type (e.g. NodeContainer, BrowserContainer, etc.).",
1605
+ "parameters": {
1606
+ "this": {
1607
+ "type": "This",
1608
+ "description": "Parameter this"
1609
+ },
1610
+ "options": {
1611
+ "type": "ConstructorParameters<This['constructor']>[0]",
1612
+ "description": "Options to override for the new container instance."
1613
+ }
1614
+ },
1615
+ "required": [
1616
+ "this",
1617
+ "options"
1618
+ ],
1619
+ "returns": "This"
1620
+ },
1621
+ "addContext": {
1622
+ "description": "",
1623
+ "parameters": {
1624
+ "keyOrContext": {
1625
+ "type": "keyof ContainerContext | Partial<ContainerContext>",
1626
+ "description": "Parameter keyOrContext"
1627
+ },
1628
+ "value": {
1629
+ "type": "ContainerContext[keyof ContainerContext]",
1630
+ "description": "Parameter value"
1631
+ }
1632
+ },
1633
+ "required": [
1634
+ "keyOrContext"
1635
+ ],
1636
+ "returns": "this"
1637
+ },
1638
+ "setState": {
1639
+ "description": "Sets the state of the container.",
1640
+ "parameters": {
1641
+ "newState": {
1642
+ "type": "SetStateValue<ContainerState>",
1643
+ "description": "The new state of the container."
1644
+ }
1645
+ },
1646
+ "required": [
1647
+ "newState"
1648
+ ],
1649
+ "returns": "void"
1650
+ },
1651
+ "bus": {
1652
+ "description": "Convenience method for creating a new event bus instance.",
1653
+ "parameters": {},
1654
+ "required": [],
1655
+ "returns": "void"
1656
+ },
1657
+ "newState": {
1658
+ "description": "Convenience method for creating a new observable State object.",
1659
+ "parameters": {
1660
+ "initialState": {
1661
+ "type": "T",
1662
+ "description": "Parameter initialState"
1663
+ }
1664
+ },
1665
+ "required": [],
1666
+ "returns": "void"
1667
+ },
1668
+ "normalizeHelperOptions": {
1669
+ "description": "Parse helper options through the helper's static options schema so defaults are materialized.",
1670
+ "parameters": {
1671
+ "BaseClass": {
1672
+ "type": "any",
1673
+ "description": "Parameter BaseClass"
1674
+ },
1675
+ "options": {
1676
+ "type": "any",
1677
+ "description": "Parameter options"
1678
+ },
1679
+ "fallbackName": {
1680
+ "type": "string",
1681
+ "description": "Parameter fallbackName"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "BaseClass",
1686
+ "options"
1687
+ ],
1688
+ "returns": "void"
1689
+ },
1690
+ "buildHelperCacheKey": {
1691
+ "description": "",
1692
+ "parameters": {
1693
+ "type": {
1694
+ "type": "string",
1695
+ "description": "Parameter type"
1696
+ },
1697
+ "id": {
1698
+ "type": "string",
1699
+ "description": "Parameter id"
1700
+ },
1701
+ "options": {
1702
+ "type": "any",
1703
+ "description": "Parameter options"
1704
+ },
1705
+ "omitOptionKeys": {
1706
+ "type": "string[]",
1707
+ "description": "Parameter omitOptionKeys"
1708
+ }
1709
+ },
1710
+ "required": [
1711
+ "type",
1712
+ "id",
1713
+ "options"
1714
+ ],
1715
+ "returns": "void"
1716
+ },
1717
+ "createHelperInstance": {
1718
+ "description": "",
1719
+ "parameters": {
1720
+ "{\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }": {
1721
+ "type": "{\n cache: Map<string, any>\n type: string\n id: string\n BaseClass: any\n options?: any\n fallbackName?: string\n omitOptionKeys?: string[]\n context?: any\n }",
1722
+ "description": "Parameter {\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }"
1723
+ }
1724
+ },
1725
+ "required": [
1726
+ "{\n cache,\n type,\n id,\n BaseClass,\n options,\n fallbackName,\n omitOptionKeys = [],\n context,\n }"
1727
+ ],
1728
+ "returns": "void"
1729
+ },
1730
+ "feature": {
1731
+ "description": "Creates a new instance of a feature. If you pass the same arguments, it will return the same instance as last time you created that. If you need the ability to create fresh instances, it is up to you how you define your options to support that.",
1732
+ "parameters": {
1733
+ "id": {
1734
+ "type": "T",
1735
+ "description": "The id of the feature to create."
1736
+ },
1737
+ "options": {
1738
+ "type": "ConstructorParameters<Features[T]>[0]",
1739
+ "description": "The options to pass to the feature constructor."
1740
+ }
1741
+ },
1742
+ "required": [
1743
+ "id"
1744
+ ],
1745
+ "returns": "InstanceType<Features[T]>"
1746
+ },
1747
+ "start": {
1748
+ "description": "TODO: A container should be able to container.use(plugin) and that plugin should be able to define an asynchronous method that will be run when the container is started. Right now there's nothing to do with starting / stopping a container but that might be neat.",
1749
+ "parameters": {},
1750
+ "required": [],
1751
+ "returns": "void"
1752
+ },
1753
+ "emit": {
1754
+ "description": "Emit an event on the container's event bus.",
1755
+ "parameters": {
1756
+ "event": {
1757
+ "type": "string",
1758
+ "description": "Parameter event"
1759
+ },
1760
+ "args": {
1761
+ "type": "any[]",
1762
+ "description": "Parameter args"
1763
+ }
1764
+ },
1765
+ "required": [
1766
+ "event",
1767
+ "args"
1768
+ ],
1769
+ "returns": "void"
1770
+ },
1771
+ "on": {
1772
+ "description": "Subscribe to an event on the container's event bus.",
1773
+ "parameters": {
1774
+ "event": {
1775
+ "type": "string",
1776
+ "description": "Parameter event"
1777
+ },
1778
+ "listener": {
1779
+ "type": "(...args: any[]) => void",
1780
+ "description": "Parameter listener"
1781
+ }
1782
+ },
1783
+ "required": [
1784
+ "event",
1785
+ "listener"
1786
+ ],
1787
+ "returns": "void"
1788
+ },
1789
+ "off": {
1790
+ "description": "Unsubscribe a listener from an event on the container's event bus.",
1791
+ "parameters": {
1792
+ "event": {
1793
+ "type": "string",
1794
+ "description": "Parameter event"
1795
+ },
1796
+ "listener": {
1797
+ "type": "(...args: any[]) => void",
1798
+ "description": "Parameter listener"
1799
+ }
1800
+ },
1801
+ "required": [
1802
+ "event"
1803
+ ],
1804
+ "returns": "void"
1805
+ },
1806
+ "once": {
1807
+ "description": "Subscribe to an event on the container's event bus, but only fire once.",
1808
+ "parameters": {
1809
+ "event": {
1810
+ "type": "string",
1811
+ "description": "Parameter event"
1812
+ },
1813
+ "listener": {
1814
+ "type": "(...args: any[]) => void",
1815
+ "description": "Parameter listener"
1816
+ }
1817
+ },
1818
+ "required": [
1819
+ "event",
1820
+ "listener"
1821
+ ],
1822
+ "returns": "void"
1823
+ },
1824
+ "waitFor": {
1825
+ "description": "Returns a promise that will resolve when the event is emitted",
1826
+ "parameters": {
1827
+ "event": {
1828
+ "type": "string",
1829
+ "description": "Parameter event"
1830
+ }
1831
+ },
1832
+ "required": [
1833
+ "event"
1834
+ ],
1835
+ "returns": "void"
1836
+ },
1837
+ "registerHelperType": {
1838
+ "description": "Register a helper type (registry + factory pair) on this container. Called automatically by Helper.attach() methods (e.g. Client.attach, Server.attach).",
1839
+ "parameters": {
1840
+ "registryName": {
1841
+ "type": "string",
1842
+ "description": "The plural name of the registry, e.g. \"clients\", \"servers\""
1843
+ },
1844
+ "factoryName": {
1845
+ "type": "string",
1846
+ "description": "The singular factory method name, e.g. \"client\", \"server\""
1847
+ }
1848
+ },
1849
+ "required": [
1850
+ "registryName",
1851
+ "factoryName"
1852
+ ],
1853
+ "returns": "void"
1854
+ },
1855
+ "inspect": {
1856
+ "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).",
1857
+ "parameters": {},
1858
+ "required": [],
1859
+ "returns": "ContainerIntrospection"
1860
+ },
1861
+ "inspectAsText": {
1862
+ "description": "Returns a human-readable markdown representation of this container's introspection data. Useful in REPLs, AI agent contexts, or documentation generation. The first argument can be a section name (`'methods'`, `'getters'`, etc.) to render only that section, or a number for the starting heading depth (backward compatible).",
1863
+ "parameters": {
1864
+ "sectionOrDepth": {
1865
+ "type": "IntrospectionSection | number",
1866
+ "description": "Parameter sectionOrDepth"
1867
+ },
1868
+ "startHeadingDepth": {
1869
+ "type": "number",
1870
+ "description": "Parameter startHeadingDepth"
1871
+ }
1872
+ },
1873
+ "required": [],
1874
+ "returns": "string"
1875
+ },
1876
+ "introspectAsText": {
1877
+ "description": "Alias for inspectAsText",
1878
+ "parameters": {
1879
+ "sectionOrDepth": {
1880
+ "type": "IntrospectionSection | number",
1881
+ "description": "Parameter sectionOrDepth"
1882
+ },
1883
+ "startHeadingDepth": {
1884
+ "type": "number",
1885
+ "description": "Parameter startHeadingDepth"
1886
+ }
1887
+ },
1888
+ "required": [],
1889
+ "returns": "string"
1890
+ },
1891
+ "introspectAsJSON": {
1892
+ "description": "Alias for inspectAsJSON",
1893
+ "parameters": {
1894
+ "sectionOrDepth": {
1895
+ "type": "IntrospectionSection | number",
1896
+ "description": "Parameter sectionOrDepth"
1897
+ },
1898
+ "startHeadingDepth": {
1899
+ "type": "number",
1900
+ "description": "Parameter startHeadingDepth"
1901
+ }
1902
+ },
1903
+ "required": [],
1904
+ "returns": "any"
1905
+ },
1906
+ "sleep": {
1907
+ "description": "Sleep for the specified number of milliseconds. Useful for scripting and sequencing.",
1908
+ "parameters": {
1909
+ "ms": {
1910
+ "type": "any",
1911
+ "description": "Parameter ms"
1912
+ }
1913
+ },
1914
+ "required": [],
1915
+ "returns": "void"
1916
+ },
1917
+ "use": {
1918
+ "description": "Apply a plugin or enable a feature by string name. Plugins must have a static attach(container) method.",
1919
+ "parameters": {
1920
+ "plugin": {
1921
+ "type": "Extension<T>",
1922
+ "description": "A feature name string, or a class/object with a static attach method"
1923
+ },
1924
+ "options": {
1925
+ "type": "any",
1926
+ "description": "Options to pass to the plugin's attach method"
1927
+ }
1928
+ },
1929
+ "required": [
1930
+ "plugin"
1931
+ ],
1932
+ "returns": "this & T"
1933
+ }
1934
+ },
1935
+ "getters": {
1936
+ "state": {
1937
+ "description": "The observable state object for this container instance.",
1938
+ "returns": "any"
1939
+ },
1940
+ "enabledFeatureIds": {
1941
+ "description": "Returns the list of shortcut IDs for all currently enabled features.",
1942
+ "returns": "any"
1943
+ },
1944
+ "enabledFeatures": {
1945
+ "description": "Returns a map of enabled feature shortcut IDs to their instances.",
1946
+ "returns": "Partial<AvailableInstanceTypes<Features>>"
1947
+ },
1948
+ "context": {
1949
+ "description": "The Container's context is an object that contains the enabled features, the container itself, and any additional context that has been added to the container. All helper instances that are created by the container will have access to the shared context.",
1950
+ "returns": "ContainerContext<Features> & Partial<AvailableInstanceTypes<AvailableFeatures>>"
1951
+ },
1952
+ "currentState": {
1953
+ "description": "The current state of the container. This is a snapshot of the container's state at the time this method is called.",
1954
+ "returns": "any"
1955
+ },
1956
+ "isBrowser": {
1957
+ "description": "Returns true if the container is running in a browser.",
1958
+ "returns": "any"
1959
+ },
1960
+ "isBun": {
1961
+ "description": "Returns true if the container is running in Bun.",
1962
+ "returns": "any"
1963
+ },
1964
+ "isNode": {
1965
+ "description": "Returns true if the container is running in Node.",
1966
+ "returns": "any"
1967
+ },
1968
+ "isElectron": {
1969
+ "description": "Returns true if the container is running in Electron.",
1970
+ "returns": "any"
1971
+ },
1972
+ "isDevelopment": {
1973
+ "description": "Returns true if the container is running in development mode.",
1974
+ "returns": "any"
1975
+ },
1976
+ "isProduction": {
1977
+ "description": "Returns true if the container is running in production mode.",
1978
+ "returns": "any"
1979
+ },
1980
+ "isCI": {
1981
+ "description": "Returns true if the container is running in a CI environment.",
1982
+ "returns": "any"
1983
+ },
1984
+ "registryNames": {
1985
+ "description": "Returns the names of all attached registries (e.g. [\"features\", \"clients\", \"servers\"]).",
1986
+ "returns": "string[]"
1987
+ },
1988
+ "factoryNames": {
1989
+ "description": "Returns the names of all available factory methods (e.g. [\"feature\", \"client\", \"server\"]).",
1990
+ "returns": "string[]"
1991
+ }
1992
+ },
1993
+ "events": {
1994
+ "started": {
1995
+ "name": "started",
1996
+ "description": "Event emitted by Container",
1997
+ "arguments": {}
1998
+ }
1999
+ }
2000
+ },
2001
+ {
2002
+ "className": "WebContainer",
2003
+ "description": "Browser-specific container that extends the base Container with web client support and browser-specific features like speech, voice recognition, and asset loading.",
2004
+ "methods": {},
2005
+ "getters": {
2006
+ "Client": {
2007
+ "description": "Returns the base Client class for creating custom clients.",
2008
+ "returns": "any"
2009
+ },
2010
+ "SocketClient": {
2011
+ "description": "Returns the SocketClient class for WebSocket connections.",
2012
+ "returns": "any"
2013
+ },
2014
+ "RestClient": {
2015
+ "description": "Returns the RestClient class for HTTP REST API connections.",
2016
+ "returns": "any"
2017
+ }
2018
+ },
2019
+ "events": {}
2020
+ }
2021
+ ];