loopengine 0.1.70 → 0.1.72
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/README.md +4 -0
- package/dist/web/agent-file-admin.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -414,5 +414,9 @@ them behaves exactly as described above.
|
|
|
414
414
|
| `LOOPENGINE_USAGE_LOG` | `stdout` (one JSON line per model call) or a file path (JSON lines) — tokens per call with agent, tenant, session and model. Or call `setUsageSink()` in code. |
|
|
415
415
|
| `setSecretStore()` | In code, at startup: keep env values set through the Admin UI somewhere other than `.env` files (a vault, a secret manager). The default `FileSecretStore` is today's behaviour. |
|
|
416
416
|
|
|
417
|
+
`GET /healthz` answers `{"ok":true}` with no login, on every server,
|
|
418
|
+
for health checks; it returns 503 once the server starts shutting down,
|
|
419
|
+
and doesn't count as activity.
|
|
420
|
+
|
|
417
421
|
`deploy/workspace/Dockerfile` is a runtime image for this: it serves a
|
|
418
422
|
scaffolded project mounted at `/workspace` instead of baking agents in.
|
|
@@ -34,9 +34,16 @@
|
|
|
34
34
|
// package.json).
|
|
35
35
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
36
36
|
import { join } from 'node:path';
|
|
37
|
-
import
|
|
37
|
+
import { createRequire } from 'node:module';
|
|
38
38
|
import { agentDir } from '../core/gateway-tools.js';
|
|
39
39
|
import { AgentModelError } from '../bin/cli.js';
|
|
40
|
+
// Loaded on the first edit, not at import: typescript is ~9 MB of JS and
|
|
41
|
+
// index.ts re-exports this module, so importing it eagerly added more
|
|
42
|
+
// than a second to every server's startup on a small machine.
|
|
43
|
+
let ts;
|
|
44
|
+
function loadTypeScript() {
|
|
45
|
+
return (ts ??= createRequire(import.meta.url)('typescript'));
|
|
46
|
+
}
|
|
40
47
|
export class AgentEditNotSupportedError extends Error {
|
|
41
48
|
}
|
|
42
49
|
export class AgentFileNotFoundError extends Error {
|
|
@@ -129,6 +136,7 @@ function upsertNumericProperty(configObj, sourceFile, edits, toInsert, name, val
|
|
|
129
136
|
* needing to re-derive them. A field omitted from `fields` entirely is
|
|
130
137
|
* left completely untouched, both on disk and in the return value. */
|
|
131
138
|
export function editAgentFile(agentName, fields) {
|
|
139
|
+
loadTypeScript();
|
|
132
140
|
const indexPath = join(agentDir(agentName), 'index.ts');
|
|
133
141
|
let source;
|
|
134
142
|
try {
|