@soederpop/luca 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/agi/features/assistant.ts +58 -2
- package/src/bootstrap/generated.ts +1 -1
- package/src/cli/build-info.ts +2 -2
- package/src/command.ts +20 -1
- package/src/commands/serve.ts +27 -0
- package/src/endpoint.ts +6 -0
- package/src/helper.ts +42 -5
- package/src/introspection/generated.agi.ts +844 -776
- package/src/introspection/generated.node.ts +47 -1
- package/src/introspection/generated.web.ts +1 -1
- package/src/node/features/helpers.ts +5 -2
- package/src/scaffolds/generated.ts +1 -1
- package/src/servers/express.ts +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-24T09:08:05.888Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.googleDocs', {
|
|
7
7
|
"id": "features.googleDocs",
|
|
@@ -10426,6 +10426,16 @@ setBuildTimeData('features.helpers', {
|
|
|
10426
10426
|
"absPath": {
|
|
10427
10427
|
"type": "string",
|
|
10428
10428
|
"description": "Absolute path to the module file"
|
|
10429
|
+
},
|
|
10430
|
+
"options": {
|
|
10431
|
+
"type": "{ cacheBust?: boolean }",
|
|
10432
|
+
"description": "Optional settings",
|
|
10433
|
+
"properties": {
|
|
10434
|
+
"cacheBust": {
|
|
10435
|
+
"type": "any",
|
|
10436
|
+
"description": "When true, appends a timestamp query to bypass the native import cache (useful for hot reload)"
|
|
10437
|
+
}
|
|
10438
|
+
}
|
|
10429
10439
|
}
|
|
10430
10440
|
},
|
|
10431
10441
|
"required": [
|
|
@@ -12749,6 +12759,19 @@ setBuildTimeData('servers.express', {
|
|
|
12749
12759
|
],
|
|
12750
12760
|
"returns": "Promise<this>"
|
|
12751
12761
|
},
|
|
12762
|
+
"reloadEndpoint": {
|
|
12763
|
+
"description": "Reload a mounted endpoint by its file path. Re-reads the module through the helpers VM loader so the next request picks up the new handlers.",
|
|
12764
|
+
"parameters": {
|
|
12765
|
+
"filePath": {
|
|
12766
|
+
"type": "string",
|
|
12767
|
+
"description": "Absolute path to the endpoint file"
|
|
12768
|
+
}
|
|
12769
|
+
},
|
|
12770
|
+
"required": [
|
|
12771
|
+
"filePath"
|
|
12772
|
+
],
|
|
12773
|
+
"returns": "Promise<Endpoint | null>"
|
|
12774
|
+
},
|
|
12752
12775
|
"useEndpointModules": {
|
|
12753
12776
|
"description": "",
|
|
12754
12777
|
"parameters": {
|
|
@@ -23768,6 +23791,16 @@ export const introspectionData = [
|
|
|
23768
23791
|
"absPath": {
|
|
23769
23792
|
"type": "string",
|
|
23770
23793
|
"description": "Absolute path to the module file"
|
|
23794
|
+
},
|
|
23795
|
+
"options": {
|
|
23796
|
+
"type": "{ cacheBust?: boolean }",
|
|
23797
|
+
"description": "Optional settings",
|
|
23798
|
+
"properties": {
|
|
23799
|
+
"cacheBust": {
|
|
23800
|
+
"type": "any",
|
|
23801
|
+
"description": "When true, appends a timestamp query to bypass the native import cache (useful for hot reload)"
|
|
23802
|
+
}
|
|
23803
|
+
}
|
|
23771
23804
|
}
|
|
23772
23805
|
},
|
|
23773
23806
|
"required": [
|
|
@@ -26080,6 +26113,19 @@ export const introspectionData = [
|
|
|
26080
26113
|
],
|
|
26081
26114
|
"returns": "Promise<this>"
|
|
26082
26115
|
},
|
|
26116
|
+
"reloadEndpoint": {
|
|
26117
|
+
"description": "Reload a mounted endpoint by its file path. Re-reads the module through the helpers VM loader so the next request picks up the new handlers.",
|
|
26118
|
+
"parameters": {
|
|
26119
|
+
"filePath": {
|
|
26120
|
+
"type": "string",
|
|
26121
|
+
"description": "Absolute path to the endpoint file"
|
|
26122
|
+
}
|
|
26123
|
+
},
|
|
26124
|
+
"required": [
|
|
26125
|
+
"filePath"
|
|
26126
|
+
],
|
|
26127
|
+
"returns": "Promise<Endpoint | null>"
|
|
26128
|
+
},
|
|
26083
26129
|
"useEndpointModules": {
|
|
26084
26130
|
"description": "",
|
|
26085
26131
|
"parameters": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-24T09:08:05.900Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.containerLink', {
|
|
7
7
|
"id": "features.containerLink",
|
|
@@ -408,11 +408,14 @@ export class Helpers extends Feature<HelpersState, HelpersOptions> {
|
|
|
408
408
|
* Uses the same `useNativeImport` check as discovery to decide the loading strategy.
|
|
409
409
|
*
|
|
410
410
|
* @param absPath - Absolute path to the module file
|
|
411
|
+
* @param options - Optional settings
|
|
412
|
+
* @param options.cacheBust - When true, appends a timestamp query to bypass the native import cache (useful for hot reload)
|
|
411
413
|
* @returns The module's exports
|
|
412
414
|
*/
|
|
413
|
-
async loadModuleExports(absPath: string): Promise<Record<string, any>> {
|
|
415
|
+
async loadModuleExports(absPath: string, options?: { cacheBust?: boolean }): Promise<Record<string, any>> {
|
|
414
416
|
if (this.useNativeImport) {
|
|
415
|
-
const
|
|
417
|
+
const importPath = options?.cacheBust ? `${absPath}?t=${Date.now()}` : absPath
|
|
418
|
+
const mod = await import(importPath)
|
|
416
419
|
return mod
|
|
417
420
|
}
|
|
418
421
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Auto-generated scaffold and MCP readme content
|
|
2
|
-
// Generated at: 2026-03-
|
|
2
|
+
// Generated at: 2026-03-24T09:08:06.782Z
|
|
3
3
|
// Source: docs/scaffolds/*.md, docs/examples/assistant/, and docs/mcp/readme.md
|
|
4
4
|
//
|
|
5
5
|
// Do not edit manually. Run: luca build-scaffolds
|
package/src/servers/express.ts
CHANGED
|
@@ -211,6 +211,24 @@ export class ExpressServer<T extends ServerState = ServerState, K extends Expres
|
|
|
211
211
|
return this
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Reload a mounted endpoint by its file path. Re-reads the module through
|
|
216
|
+
* the helpers VM loader so the next request picks up the new handlers.
|
|
217
|
+
*
|
|
218
|
+
* @param filePath - Absolute path to the endpoint file
|
|
219
|
+
* @returns The reloaded Endpoint, or null if no mounted endpoint matches
|
|
220
|
+
*/
|
|
221
|
+
async reloadEndpoint(filePath: string): Promise<Endpoint | null> {
|
|
222
|
+
const endpoint = this._mountedEndpoints.find(ep => (ep.options as any).filePath === filePath)
|
|
223
|
+
if (!endpoint) return null
|
|
224
|
+
|
|
225
|
+
const helpers = this.container.feature('helpers') as any
|
|
226
|
+
const mod = await helpers.loadModuleExports(filePath, { cacheBust: true })
|
|
227
|
+
const endpointModule: EndpointModule = mod.default || mod
|
|
228
|
+
await endpoint.load(endpointModule)
|
|
229
|
+
return endpoint
|
|
230
|
+
}
|
|
231
|
+
|
|
214
232
|
async useEndpointModules(modules: EndpointModule[]): Promise<this> {
|
|
215
233
|
for (const mod of modules) {
|
|
216
234
|
try {
|