@soederpop/luca 0.0.6 → 0.0.8

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 (208) hide show
  1. package/CLAUDE.md +10 -1
  2. package/RUNME.md +56 -0
  3. package/bun.lock +1 -1
  4. package/commands/build-bootstrap.ts +78 -0
  5. package/commands/build-scaffolds.ts +24 -2
  6. package/commands/try-all-challenges.ts +543 -0
  7. package/commands/try-challenge.ts +100 -0
  8. package/docs/README.md +52 -80
  9. package/docs/TABLE-OF-CONTENTS.md +82 -51
  10. package/docs/apis/clients/elevenlabs.md +232 -8
  11. package/docs/apis/clients/graph.md +59 -8
  12. package/docs/apis/clients/openai.md +362 -2
  13. package/docs/apis/clients/rest.md +122 -2
  14. package/docs/apis/clients/websocket.md +71 -17
  15. package/docs/apis/features/agi/assistant.md +9 -3
  16. package/docs/apis/features/agi/assistants-manager.md +2 -2
  17. package/docs/apis/features/agi/claude-code.md +153 -14
  18. package/docs/apis/features/agi/conversation-history.md +15 -3
  19. package/docs/apis/features/agi/conversation.md +133 -20
  20. package/docs/apis/features/agi/openai-codex.md +90 -12
  21. package/docs/apis/features/agi/skills-library.md +23 -5
  22. package/docs/apis/features/node/container-link.md +59 -0
  23. package/docs/apis/features/node/content-db.md +1 -1
  24. package/docs/apis/features/node/disk-cache.md +1 -1
  25. package/docs/apis/features/node/dns.md +1 -0
  26. package/docs/apis/features/node/docker.md +2 -1
  27. package/docs/apis/features/node/esbuild.md +4 -3
  28. package/docs/apis/features/node/file-manager.md +13 -4
  29. package/docs/apis/features/node/fs.md +726 -171
  30. package/docs/apis/features/node/git.md +1 -0
  31. package/docs/apis/features/node/google-auth.md +23 -4
  32. package/docs/apis/features/node/google-calendar.md +14 -2
  33. package/docs/apis/features/node/google-docs.md +15 -2
  34. package/docs/apis/features/node/google-drive.md +21 -3
  35. package/docs/apis/features/node/google-sheets.md +14 -2
  36. package/docs/apis/features/node/grep.md +2 -0
  37. package/docs/apis/features/node/helpers.md +29 -0
  38. package/docs/apis/features/node/ink.md +2 -2
  39. package/docs/apis/features/node/networking.md +39 -4
  40. package/docs/apis/features/node/os.md +28 -0
  41. package/docs/apis/features/node/postgres.md +26 -4
  42. package/docs/apis/features/node/proc.md +37 -28
  43. package/docs/apis/features/node/process-manager.md +33 -5
  44. package/docs/apis/features/node/repl.md +1 -1
  45. package/docs/apis/features/node/runpod.md +1 -0
  46. package/docs/apis/features/node/secure-shell.md +7 -0
  47. package/docs/apis/features/node/semantic-search.md +12 -5
  48. package/docs/apis/features/node/sqlite.md +26 -4
  49. package/docs/apis/features/node/telegram.md +30 -5
  50. package/docs/apis/features/node/tts.md +17 -2
  51. package/docs/apis/features/node/ui.md +1 -1
  52. package/docs/apis/features/node/vault.md +4 -9
  53. package/docs/apis/features/node/vm.md +3 -12
  54. package/docs/apis/features/node/window-manager.md +128 -20
  55. package/docs/apis/features/web/asset-loader.md +13 -1
  56. package/docs/apis/features/web/container-link.md +59 -0
  57. package/docs/apis/features/web/esbuild.md +4 -3
  58. package/docs/apis/features/web/helpers.md +29 -0
  59. package/docs/apis/features/web/network.md +16 -2
  60. package/docs/apis/features/web/speech.md +16 -2
  61. package/docs/apis/features/web/vault.md +4 -9
  62. package/docs/apis/features/web/vm.md +3 -12
  63. package/docs/apis/features/web/voice.md +18 -1
  64. package/docs/apis/servers/express.md +18 -2
  65. package/docs/apis/servers/mcp.md +29 -4
  66. package/docs/apis/servers/websocket.md +34 -6
  67. package/docs/bootstrap/CLAUDE.md +100 -0
  68. package/docs/bootstrap/SKILL.md +222 -0
  69. package/docs/bootstrap/templates/about-command.ts +41 -0
  70. package/docs/bootstrap/templates/docs-models.ts +22 -0
  71. package/docs/bootstrap/templates/docs-readme.md +43 -0
  72. package/docs/bootstrap/templates/example-feature.ts +53 -0
  73. package/docs/bootstrap/templates/health-endpoint.ts +15 -0
  74. package/docs/bootstrap/templates/luca-cli.ts +25 -0
  75. package/docs/bootstrap/templates/runme.md +54 -0
  76. package/docs/challenges/caching-proxy.md +16 -0
  77. package/docs/challenges/content-db-round-trip.md +14 -0
  78. package/docs/challenges/custom-command.md +9 -0
  79. package/docs/challenges/file-watcher-pipeline.md +11 -0
  80. package/docs/challenges/grep-audit-report.md +15 -0
  81. package/docs/challenges/multi-feature-dashboard.md +14 -0
  82. package/docs/challenges/process-orchestrator.md +17 -0
  83. package/docs/challenges/rest-api-server-with-client.md +12 -0
  84. package/docs/challenges/script-runner-with-vm.md +11 -0
  85. package/docs/challenges/simple-rest-api.md +15 -0
  86. package/docs/challenges/websocket-serve-and-client.md +11 -0
  87. package/docs/challenges/yaml-config-system.md +14 -0
  88. package/docs/command-system-overhaul.md +94 -0
  89. package/docs/examples/assistant/CORE.md +18 -0
  90. package/docs/examples/assistant/hooks.ts +3 -0
  91. package/docs/examples/assistant/tools.ts +10 -0
  92. package/docs/examples/window-manager-layouts.md +180 -0
  93. package/docs/in-memory-fs.md +4 -0
  94. package/docs/models.ts +13 -10
  95. package/docs/philosophy.md +4 -3
  96. package/docs/reports/console-hmr-design.md +170 -0
  97. package/docs/reports/helper-semantic-search.md +72 -0
  98. package/docs/scaffolds/client.md +29 -20
  99. package/docs/scaffolds/command.md +64 -50
  100. package/docs/scaffolds/endpoint.md +31 -36
  101. package/docs/scaffolds/feature.md +28 -18
  102. package/docs/scaffolds/selector.md +91 -0
  103. package/docs/scaffolds/server.md +18 -9
  104. package/docs/selectors.md +115 -0
  105. package/docs/sessions/custom-command/attempt-log-2.md +195 -0
  106. package/docs/sessions/file-watcher-pipeline/attempt-log-1.md +728 -0
  107. package/docs/sessions/file-watcher-pipeline/attempt-log-2.md +555 -0
  108. package/docs/sessions/grep-audit-report/attempt-log-1.md +289 -0
  109. package/docs/sessions/multi-feature-dashboard/attempt-log-2.md +679 -0
  110. package/docs/sessions/rest-api-server-with-client/attempt-log-1.md +1 -0
  111. package/docs/sessions/rest-api-server-with-client/attempt-log-3.md +920 -0
  112. package/docs/sessions/simple-rest-api/attempt-log-1.md +593 -0
  113. package/docs/sessions/websocket-serve-and-client/attempt-log-2.md +995 -0
  114. package/docs/tutorials/00-bootstrap.md +148 -0
  115. package/docs/tutorials/07-endpoints.md +7 -7
  116. package/docs/tutorials/08-commands.md +153 -72
  117. package/luca.cli.ts +3 -0
  118. package/package.json +6 -5
  119. package/public/index.html +1430 -0
  120. package/scripts/examples/using-ollama.ts +2 -1
  121. package/scripts/update-introspection-data.ts +2 -2
  122. package/src/agi/endpoints/experts.ts +1 -1
  123. package/src/agi/features/assistant.ts +7 -0
  124. package/src/agi/features/assistants-manager.ts +5 -5
  125. package/src/agi/features/claude-code.ts +263 -3
  126. package/src/agi/features/conversation-history.ts +7 -1
  127. package/src/agi/features/conversation.ts +26 -3
  128. package/src/agi/features/openai-codex.ts +26 -2
  129. package/src/agi/features/openapi.ts +6 -1
  130. package/src/agi/features/skills-library.ts +9 -1
  131. package/src/bootstrap/generated.ts +595 -0
  132. package/src/cli/cli.ts +64 -21
  133. package/src/client.ts +23 -357
  134. package/src/clients/civitai/index.ts +1 -1
  135. package/src/clients/client-template.ts +1 -1
  136. package/src/clients/comfyui/index.ts +13 -2
  137. package/src/clients/elevenlabs/index.ts +2 -1
  138. package/src/clients/graph.ts +87 -0
  139. package/src/clients/openai/index.ts +10 -1
  140. package/src/clients/rest.ts +207 -0
  141. package/src/clients/websocket.ts +176 -0
  142. package/src/command.ts +281 -34
  143. package/src/commands/bootstrap.ts +185 -0
  144. package/src/commands/chat.ts +5 -4
  145. package/src/commands/describe.ts +341 -4
  146. package/src/commands/help.ts +35 -9
  147. package/src/commands/index.ts +3 -0
  148. package/src/commands/introspect.ts +92 -2
  149. package/src/commands/prompt.ts +5 -6
  150. package/src/commands/run.ts +75 -10
  151. package/src/commands/save-api-docs.ts +49 -0
  152. package/src/commands/scaffold.ts +169 -23
  153. package/src/commands/select.ts +94 -0
  154. package/src/commands/serve.ts +10 -1
  155. package/src/container.ts +15 -0
  156. package/src/endpoint.ts +19 -0
  157. package/src/graft.ts +181 -0
  158. package/src/introspection/generated.agi.ts +12458 -8968
  159. package/src/introspection/generated.node.ts +10573 -7145
  160. package/src/introspection/generated.web.ts +1 -1
  161. package/src/introspection/index.ts +26 -0
  162. package/src/node/container.ts +6 -7
  163. package/src/node/features/content-db.ts +49 -2
  164. package/src/node/features/disk-cache.ts +16 -9
  165. package/src/node/features/dns.ts +16 -3
  166. package/src/node/features/docker.ts +16 -4
  167. package/src/node/features/esbuild.ts +22 -2
  168. package/src/node/features/file-manager.ts +184 -29
  169. package/src/node/features/fs.ts +704 -248
  170. package/src/node/features/git.ts +21 -8
  171. package/src/node/features/grep.ts +23 -3
  172. package/src/node/features/helpers.ts +372 -43
  173. package/src/node/features/networking.ts +39 -4
  174. package/src/node/features/opener.ts +28 -15
  175. package/src/node/features/os.ts +76 -0
  176. package/src/node/features/port-exposer.ts +11 -1
  177. package/src/node/features/postgres.ts +17 -1
  178. package/src/node/features/proc.ts +4 -1
  179. package/src/node/features/python.ts +63 -14
  180. package/src/node/features/repl.ts +11 -7
  181. package/src/node/features/runpod.ts +16 -3
  182. package/src/node/features/secure-shell.ts +27 -2
  183. package/src/node/features/semantic-search.ts +12 -1
  184. package/src/node/features/ui.ts +5 -69
  185. package/src/node/features/vm.ts +17 -0
  186. package/src/node/features/window-manager.ts +68 -20
  187. package/src/node.ts +5 -0
  188. package/src/scaffolds/generated.ts +492 -290
  189. package/src/scaffolds/template.ts +9 -0
  190. package/src/schemas/base.ts +46 -5
  191. package/src/selector.ts +282 -0
  192. package/src/server.ts +11 -0
  193. package/src/servers/express.ts +27 -12
  194. package/src/servers/socket.ts +45 -11
  195. package/src/web/clients/socket.ts +4 -1
  196. package/src/web/container.ts +2 -1
  197. package/src/web/features/network.ts +7 -1
  198. package/src/web/features/voice-recognition.ts +16 -1
  199. package/test/clients-servers.test.ts +2 -1
  200. package/test/command.test.ts +267 -0
  201. package/test/vm-context.test.ts +146 -0
  202. package/test-integration/assistants-manager.test.ts +10 -20
  203. package/docs/apis/features/node/launcher-app-command-listener.md +0 -145
  204. package/docs/examples/launcher-app-command-listener.md +0 -120
  205. package/docs/tasks/web-container-helper-discovery.md +0 -71
  206. package/docs/todos.md +0 -1
  207. package/scripts/test-command-listener.ts +0 -123
  208. package/src/node/features/launcher-app-command-listener.ts +0 -389
@@ -167,6 +167,7 @@ const history = git.getChangeHistoryForFiles('src/node/features/*.ts')
167
167
 
168
168
  | Property | Type | Description |
169
169
  |----------|------|-------------|
170
+ | `gitPath` | `string` | Resolve the git binary path via `which`, caching the result. |
170
171
  | `branch` | `any` | Gets the current Git branch name. |
171
172
  | `sha` | `any` | Gets the current Git commit SHA hash. |
172
173
  | `isRepo` | `any` | Checks if the current directory is within a Git repository. |
@@ -110,25 +110,44 @@ Revoke the current credentials and clear cached tokens.
110
110
 
111
111
  ### tokenRefreshed
112
112
 
113
- Event emitted by GoogleAuth
113
+ Access token was refreshed
114
114
 
115
115
 
116
116
 
117
117
  ### error
118
118
 
119
- Event emitted by GoogleAuth
119
+ Authentication error occurred
120
+
121
+ **Event Arguments:**
122
+
123
+ | Name | Type | Description |
124
+ |------|------|-------------|
125
+ | `arg0` | `any` | The error |
120
126
 
121
127
 
122
128
 
123
129
  ### authorizationRequired
124
130
 
125
- Event emitted by GoogleAuth
131
+ User must visit this URL to authorize
132
+
133
+ **Event Arguments:**
134
+
135
+ | Name | Type | Description |
136
+ |------|------|-------------|
137
+ | `arg0` | `string` | Authorization URL to visit |
126
138
 
127
139
 
128
140
 
129
141
  ### authenticated
130
142
 
131
- Event emitted by GoogleAuth
143
+ Authentication successful
144
+
145
+ **Event Arguments:**
146
+
147
+ | Name | Type | Description |
148
+ |------|------|-------------|
149
+ | `mode` | `string` | Auth mode used |
150
+ | `email` | `string` | User or service account email |
132
151
 
133
152
 
134
153
 
@@ -140,13 +140,25 @@ Search events by text query across event summaries, descriptions, and locations.
140
140
 
141
141
  ### error
142
142
 
143
- Event emitted by GoogleCalendar
143
+ Calendar API error occurred
144
+
145
+ **Event Arguments:**
146
+
147
+ | Name | Type | Description |
148
+ |------|------|-------------|
149
+ | `arg0` | `any` | The error |
144
150
 
145
151
 
146
152
 
147
153
  ### eventsFetched
148
154
 
149
- Event emitted by GoogleCalendar
155
+ Events were fetched from Calendar
156
+
157
+ **Event Arguments:**
158
+
159
+ | Name | Type | Description |
160
+ |------|------|-------------|
161
+ | `arg0` | `number` | Number of events returned |
150
162
 
151
163
 
152
164
 
@@ -107,13 +107,26 @@ Search for Google Docs by name or content.
107
107
 
108
108
  ### documentFetched
109
109
 
110
- Event emitted by GoogleDocs
110
+ A document was fetched
111
+
112
+ **Event Arguments:**
113
+
114
+ | Name | Type | Description |
115
+ |------|------|-------------|
116
+ | `arg0` | `string` | Document ID |
117
+ | `arg1` | `string` | Title |
111
118
 
112
119
 
113
120
 
114
121
  ### error
115
122
 
116
- Event emitted by GoogleDocs
123
+ Docs API error occurred
124
+
125
+ **Event Arguments:**
126
+
127
+ | Name | Type | Description |
128
+ |------|------|-------------|
129
+ | `arg0` | `any` | The error |
117
130
 
118
131
 
119
132
 
@@ -178,19 +178,37 @@ List all shared drives the user has access to.
178
178
 
179
179
  ### filesFetched
180
180
 
181
- Event emitted by GoogleDrive
181
+ Files were fetched from Drive
182
+
183
+ **Event Arguments:**
184
+
185
+ | Name | Type | Description |
186
+ |------|------|-------------|
187
+ | `arg0` | `number` | Number of files returned |
182
188
 
183
189
 
184
190
 
185
191
  ### error
186
192
 
187
- Event emitted by GoogleDrive
193
+ Drive API error occurred
194
+
195
+ **Event Arguments:**
196
+
197
+ | Name | Type | Description |
198
+ |------|------|-------------|
199
+ | `arg0` | `any` | The error |
188
200
 
189
201
 
190
202
 
191
203
  ### fileDownloaded
192
204
 
193
- Event emitted by GoogleDrive
205
+ A file was downloaded
206
+
207
+ **Event Arguments:**
208
+
209
+ | Name | Type | Description |
210
+ |------|------|-------------|
211
+ | `arg0` | `string` | File ID |
194
212
 
195
213
 
196
214
 
@@ -134,13 +134,25 @@ Download sheet data as CSV and save to a local file.
134
134
 
135
135
  ### error
136
136
 
137
- Event emitted by GoogleSheets
137
+ Sheets API error occurred
138
+
139
+ **Event Arguments:**
140
+
141
+ | Name | Type | Description |
142
+ |------|------|-------------|
143
+ | `arg0` | `any` | The error |
138
144
 
139
145
 
140
146
 
141
147
  ### dataFetched
142
148
 
143
- Event emitted by GoogleSheets
149
+ Sheet data was fetched
150
+
151
+ **Event Arguments:**
152
+
153
+ | Name | Type | Description |
154
+ |------|------|-------------|
155
+ | `arg0` | `number` | Number of rows |
144
156
 
145
157
 
146
158
 
@@ -185,6 +185,8 @@ const affected = await grep.findForReplace('oldFunctionName')
185
185
  | Property | Type | Description |
186
186
  |----------|------|-------------|
187
187
  | `hasRipgrep` | `boolean` | Whether ripgrep (rg) is available on this system |
188
+ | `rgPath` | `string` | Resolved path to the rg binary |
189
+ | `grepPath` | `string` | Resolved path to the grep binary |
188
190
 
189
191
  ## State (Zod v4 schema)
190
192
 
@@ -108,6 +108,35 @@ Get the introspection description for a specific helper.
108
108
  | `manifestURL` | `string` | The URL to fetch the helpers manifest from. |
109
109
  | `available` | `Record<string, string[]>` | 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. |
110
110
 
111
+ ## Events (Zod v4 schema)
112
+
113
+ ### discovered
114
+
115
+ Emitted after a registry type has been discovered
116
+
117
+ **Event Arguments:**
118
+
119
+ | Name | Type | Description |
120
+ |------|------|-------------|
121
+ | `arg0` | `string` | Registry type that was discovered |
122
+ | `arg1` | `array` | Names of newly registered helpers |
123
+
124
+
125
+
126
+ ### registered
127
+
128
+ Emitted when a single helper is registered
129
+
130
+ **Event Arguments:**
131
+
132
+ | Name | Type | Description |
133
+ |------|------|-------------|
134
+ | `arg0` | `string` | Registry type |
135
+ | `arg1` | `string` | Helper name |
136
+ | `arg2` | `any` | The helper class or module |
137
+
138
+
139
+
111
140
  ## State (Zod v4 schema)
112
141
 
113
142
  | Property | Type | Description |
@@ -217,13 +217,13 @@ await renderAsync('AsyncChart', { url: 'https://api.example.com/data' })
217
217
 
218
218
  ### mounted
219
219
 
220
- Event emitted by Ink
220
+ Emitted when a React element is mounted to the terminal via render()
221
221
 
222
222
 
223
223
 
224
224
  ### unmounted
225
225
 
226
- Event emitted by Ink
226
+ Emitted when the mounted Ink app exits or is unmounted
227
227
 
228
228
 
229
229
 
@@ -205,25 +205,60 @@ Convenience method: discover and port-scan hosts across all local networks.
205
205
 
206
206
  ### scan:start
207
207
 
208
- Event emitted by Networking
208
+ When a network scan begins
209
+
210
+ **Event Arguments:**
211
+
212
+ | Name | Type | Description |
213
+ |------|------|-------------|
214
+ | `target` | `string` | Scan target identifier |
215
+ | `type` | `string` | Scan type identifier |
209
216
 
210
217
 
211
218
 
212
219
  ### host:discovered
213
220
 
214
- Event emitted by Networking
221
+ When a host is found during network scanning
222
+
223
+ **Event Arguments:**
224
+
225
+ | Name | Type | Description |
226
+ |------|------|-------------|
227
+ | `ip` | `string` | Host IP address |
228
+ | `mac` | `string` | MAC address when available |
229
+ | `reachable` | `boolean` | Whether host appears reachable |
230
+ | `method` | `'arp' | 'tcp'` | Discovery method used for this host |
215
231
 
216
232
 
217
233
 
218
234
  ### scan:complete
219
235
 
220
- Event emitted by Networking
236
+ When a network scan finishes
237
+
238
+ **Event Arguments:**
239
+
240
+ | Name | Type | Description |
241
+ |------|------|-------------|
242
+ | `target` | `string` | Scan target identifier |
243
+ | `type` | `string` | Scan type identifier |
244
+ | `duration` | `number` | Scan duration in milliseconds |
245
+ | `hostsFound` | `number` | Number of hosts discovered |
246
+ | `portsFound` | `number` | Number of open ports discovered |
221
247
 
222
248
 
223
249
 
224
250
  ### port:open
225
251
 
226
- Event emitted by Networking
252
+ When an open port is detected on a host
253
+
254
+ **Event Arguments:**
255
+
256
+ | Name | Type | Description |
257
+ |------|------|-------------|
258
+ | `host` | `string` | Host IP address |
259
+ | `port` | `number` | Open port number |
260
+ | `service` | `string` | Best-effort service name |
261
+ | `banner` | `string` | Banner text when captured |
227
262
 
228
263
 
229
264
 
@@ -8,6 +8,23 @@ The OS feature provides access to operating system utilities and information. Th
8
8
  container.feature('os')
9
9
  ```
10
10
 
11
+ ## Methods
12
+
13
+ ### getDisplayInfo
14
+
15
+ Gets information about all connected displays. Platform-specific: currently implemented for macOS (darwin). Linux and Windows will throw with a clear "not yet implemented" message.
16
+
17
+ **Returns:** `DisplayInfo[]`
18
+
19
+ ```ts
20
+ const displays = os.getDisplayInfo()
21
+ displays.forEach(d => {
22
+ console.log(`${d.name}: ${d.resolution.width}x${d.resolution.height}${d.retina ? ' (Retina)' : ''}`)
23
+ })
24
+ ```
25
+
26
+
27
+
11
28
  ## Getters
12
29
 
13
30
  | Property | Type | Description |
@@ -42,6 +59,17 @@ console.log(`Home directory: ${osInfo.homedir}`)
42
59
 
43
60
 
44
61
 
62
+ **getDisplayInfo**
63
+
64
+ ```ts
65
+ const displays = os.getDisplayInfo()
66
+ displays.forEach(d => {
67
+ console.log(`${d.name}: ${d.resolution.width}x${d.resolution.height}${d.retina ? ' (Retina)' : ''}`)
68
+ })
69
+ ```
70
+
71
+
72
+
45
73
  **arch**
46
74
 
47
75
  ```ts
@@ -113,25 +113,47 @@ await pg.close()
113
113
 
114
114
  ### query
115
115
 
116
- Event emitted by Postgres
116
+ When a SELECT-like query is executed
117
+
118
+ **Event Arguments:**
119
+
120
+ | Name | Type | Description |
121
+ |------|------|-------------|
122
+ | `arg0` | `string` | The SQL query text |
123
+ | `arg1` | `array` | Bound parameter values |
124
+ | `arg2` | `number` | Number of rows returned |
117
125
 
118
126
 
119
127
 
120
128
  ### error
121
129
 
122
- Event emitted by Postgres
130
+ When a postgres operation fails
131
+
132
+ **Event Arguments:**
133
+
134
+ | Name | Type | Description |
135
+ |------|------|-------------|
136
+ | `arg0` | `any` | The error object |
123
137
 
124
138
 
125
139
 
126
140
  ### execute
127
141
 
128
- Event emitted by Postgres
142
+ When a write/update/delete statement is executed
143
+
144
+ **Event Arguments:**
145
+
146
+ | Name | Type | Description |
147
+ |------|------|-------------|
148
+ | `arg0` | `string` | The SQL statement text |
149
+ | `arg1` | `array` | Bound parameter values |
150
+ | `arg2` | `number` | Number of rows affected |
129
151
 
130
152
 
131
153
 
132
154
  ### closed
133
155
 
134
- Event emitted by Postgres
156
+ When the postgres connection is closed
135
157
 
136
158
 
137
159
 
@@ -150,6 +150,19 @@ const version = proc.exec('node --version')
150
150
 
151
151
 
152
152
 
153
+ ### execSync
154
+
155
+ **Parameters:**
156
+
157
+ | Name | Type | Required | Description |
158
+ |------|------|----------|-------------|
159
+ | `command` | `string` | ✓ | Parameter command |
160
+ | `options` | `any` | | Parameter options |
161
+
162
+ **Returns:** `string`
163
+
164
+
165
+
153
166
  ### establishLock
154
167
 
155
168
  Establishes a PID-file lock to prevent duplicate process instances. Writes the current process PID to the given file path. If the file already exists and the PID inside it refers to a running process, the current process exits immediately. Stale PID files (where the process is no longer running) are automatically cleaned up. Cleanup handlers are registered on SIGTERM, SIGINT, and process exit to remove the PID file when the process shuts down.
@@ -219,35 +232,39 @@ for (const pid of proc.findPidsByPort(3000)) {
219
232
 
220
233
 
221
234
 
222
- ### onSignal
235
+ ### isProcessRunning
223
236
 
224
- Registers a handler for a process signal (e.g. SIGINT, SIGTERM, SIGUSR1). Returns a cleanup function that removes the listener when called.
237
+ Checks whether any process matching a given name is currently running. Uses `pgrep -x` for an exact match against process names.
225
238
 
226
239
  **Parameters:**
227
240
 
228
241
  | Name | Type | Required | Description |
229
242
  |------|------|----------|-------------|
230
- | `signal` | `NodeJS.Signals` | ✓ | The signal name to listen for (e.g. 'SIGINT', 'SIGTERM', 'SIGUSR2') |
231
- | `handler` | `() => void` | ✓ | The function to call when the signal is received |
243
+ | `name` | `string` | ✓ | The process name to look for (e.g. 'afplay', 'node', 'nginx') |
232
244
 
233
- **Returns:** `() => void`
245
+ **Returns:** `boolean`
234
246
 
235
247
  ```ts
236
- // Graceful shutdown
237
- proc.onSignal('SIGTERM', () => {
238
- console.log('Shutting down gracefully...')
239
- process.exit(0)
240
- })
241
-
242
- // Remove the listener later
243
- const off = proc.onSignal('SIGUSR2', () => {
244
- console.log('Received SIGUSR2')
245
- })
246
- off()
248
+ if (proc.isProcessRunning('afplay')) {
249
+ console.log('Audio is currently playing')
250
+ }
247
251
  ```
248
252
 
249
253
 
250
254
 
255
+ ### onSignal
256
+
257
+ **Parameters:**
258
+
259
+ | Name | Type | Required | Description |
260
+ |------|------|----------|-------------|
261
+ | `signal` | `NodeJS.Signals` | ✓ | Parameter signal |
262
+ | `handler` | `() => void` | ✓ | Parameter handler |
263
+
264
+ **Returns:** `() => void`
265
+
266
+
267
+
251
268
  ## State (Zod v4 schema)
252
269
 
253
270
  | Property | Type | Description |
@@ -371,19 +388,11 @@ for (const pid of proc.findPidsByPort(3000)) {
371
388
 
372
389
 
373
390
 
374
- **onSignal**
391
+ **isProcessRunning**
375
392
 
376
393
  ```ts
377
- // Graceful shutdown
378
- proc.onSignal('SIGTERM', () => {
379
- console.log('Shutting down gracefully...')
380
- process.exit(0)
381
- })
382
-
383
- // Remove the listener later
384
- const off = proc.onSignal('SIGUSR2', () => {
385
- console.log('Received SIGUSR2')
386
- })
387
- off()
394
+ if (proc.isProcessRunning('afplay')) {
395
+ console.log('Audio is currently playing')
396
+ }
388
397
  ```
389
398
 
@@ -150,31 +150,59 @@ Called by SpawnHandler when a process finishes. Updates feature-level state.
150
150
 
151
151
  ### spawned
152
152
 
153
- Event emitted by ProcessManager
153
+ Emitted when a new process is spawned
154
+
155
+ **Event Arguments:**
156
+
157
+ | Name | Type | Description |
158
+ |------|------|-------------|
159
+ | `arg0` | `string` | process ID |
160
+ | `arg1` | `any` | process metadata |
154
161
 
155
162
 
156
163
 
157
164
  ### exited
158
165
 
159
- Event emitted by ProcessManager
166
+ Emitted when a process exits normally
167
+
168
+ **Event Arguments:**
169
+
170
+ | Name | Type | Description |
171
+ |------|------|-------------|
172
+ | `arg0` | `string` | process ID |
173
+ | `arg1` | `number` | exit code |
160
174
 
161
175
 
162
176
 
163
177
  ### crashed
164
178
 
165
- Event emitted by ProcessManager
179
+ Emitted when a process exits with non-zero code
180
+
181
+ **Event Arguments:**
182
+
183
+ | Name | Type | Description |
184
+ |------|------|-------------|
185
+ | `arg0` | `string` | process ID |
186
+ | `arg1` | `number` | exit code |
187
+ | `arg2` | `any` | error info |
166
188
 
167
189
 
168
190
 
169
191
  ### killed
170
192
 
171
- Event emitted by ProcessManager
193
+ Emitted when a process is killed
194
+
195
+ **Event Arguments:**
196
+
197
+ | Name | Type | Description |
198
+ |------|------|-------------|
199
+ | `arg0` | `string` | process ID |
172
200
 
173
201
 
174
202
 
175
203
  ### allStopped
176
204
 
177
- Event emitted by ProcessManager
205
+ Emitted when all tracked processes have stopped
178
206
 
179
207
 
180
208
 
@@ -36,7 +36,7 @@ Start the REPL session. Creates a VM context populated with the container and it
36
36
 
37
37
  | Property | Type | Description |
38
38
  |----------|------|-------------|
39
- | `historyPath` | `any` | Custom path for the history file (defaults to node_modules/.cache/.repl_history) |
39
+ | `historyPath` | `any` | Custom path for the history file (defaults to ~/.cache/luca/repl-{cwdHash}.history) |
40
40
  | `context` | `any` | Additional variables to inject into the VM context |
41
41
 
42
42
  **Returns:** `void`
@@ -462,6 +462,7 @@ gpus.forEach(g => console.log(`${g.gpuType}: $${g.ondemandPrice}/hr`))
462
462
  | Property | Type | Description |
463
463
  |----------|------|-------------|
464
464
  | `proc` | `any` | The proc feature used for executing CLI commands like runpodctl. |
465
+ | `runpodctlPath` | `string` | Resolve the runpodctl binary path via `which`, caching the result. |
465
466
  | `apiKey` | `any` | RunPod API key from options or the RUNPOD_API_KEY environment variable. |
466
467
  | `dataCenterId` | `any` | Preferred data center ID, defaults to 'US-TX-3'. |
467
468
 
@@ -105,6 +105,13 @@ await ssh.upload('./build/app.tar.gz', '/opt/releases/app.tar.gz')
105
105
 
106
106
 
107
107
 
108
+ ## Getters
109
+
110
+ | Property | Type | Description |
111
+ |----------|------|-------------|
112
+ | `sshPath` | `string` | Resolved path to the ssh binary |
113
+ | `scpPath` | `string` | Resolved path to the scp binary |
114
+
108
115
  ## State (Zod v4 schema)
109
116
 
110
117
  | Property | Type | Description |
@@ -1,6 +1,6 @@
1
1
  # SemanticSearch (features.semanticSearch)
2
2
 
3
- No description provided
3
+ Semantic search feature providing BM25 keyword search, vector similarity search, and hybrid search with Reciprocal Rank Fusion over a SQLite-backed index. Uses bun:sqlite for FTS5 keyword search and BLOB-stored embeddings with JavaScript cosine similarity for vector search.
4
4
 
5
5
  ## Usage
6
6
 
@@ -353,25 +353,32 @@ Install node-llama-cpp into the user's project for local embedding support. Dete
353
353
 
354
354
  ### dbReady
355
355
 
356
- Event emitted by SemanticSearch
356
+ When the SQLite database is initialized and ready
357
357
 
358
358
 
359
359
 
360
360
  ### modelLoaded
361
361
 
362
- Event emitted by SemanticSearch
362
+ When the local embedding model is loaded into memory
363
363
 
364
364
 
365
365
 
366
366
  ### modelDisposed
367
367
 
368
- Event emitted by SemanticSearch
368
+ When the local embedding model is disposed from memory
369
369
 
370
370
 
371
371
 
372
372
  ### indexed
373
373
 
374
- Event emitted by SemanticSearch
374
+ When documents are indexed with embeddings
375
+
376
+ **Event Arguments:**
377
+
378
+ | Name | Type | Description |
379
+ |------|------|-------------|
380
+ | `documents` | `number` | Number of documents indexed |
381
+ | `chunks` | `number` | Number of chunks created |
375
382
 
376
383
 
377
384