@sovara/runner 0.4.7 → 0.4.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.
- package/README.md +4 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +34 -3
- package/dist/constants.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -316,6 +316,10 @@ for await (const message of handle.query("What did I install last?")) {
|
|
|
316
316
|
| `SOVARA_AGENT_TOKEN` | Project-scoped token for a remote/headless agent | unset |
|
|
317
317
|
| `SOVARA_CLAUDE_PROXY_ACTIVE` | Set automatically by `@sovara/runner/claude` to prevent nested proxy loops | unset |
|
|
318
318
|
|
|
319
|
+
`SOVARA_EXEC_SERVER_PORT` must be an integer between `1` and `65535`. If it is
|
|
320
|
+
set to a blank or invalid value, the runner fails during startup instead of
|
|
321
|
+
silently using the default.
|
|
322
|
+
|
|
319
323
|
### Server URL
|
|
320
324
|
|
|
321
325
|
The TypeScript runner uses the local exec server by default. Pass `url` when
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare function readPositiveIntegerEnv(name: string, defaultValue: number, options?: {
|
|
2
|
+
maximum?: number;
|
|
3
|
+
}): number;
|
|
4
|
+
export declare function readHttpUrlEnv(name: string, defaultValue: string): string;
|
|
1
5
|
export declare const PORT: number;
|
|
2
6
|
export declare const DEFAULT_SERVER_URL: string;
|
|
3
7
|
export declare const SERVER_BOOT_TIMEOUT_MS = 15000;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GACjC,MAAM,CAoBR;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAczE;AAED,eAAO,MAAM,IAAI,QAIhB,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAG9B,CAAC;AACF,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,4BAA4B,MAAM,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export function readPositiveIntegerEnv(name, defaultValue, options = {}) {
|
|
2
|
+
const raw = process.env[name];
|
|
3
|
+
if (raw === undefined) {
|
|
4
|
+
return defaultValue;
|
|
5
|
+
}
|
|
6
|
+
const valueText = raw.trim();
|
|
7
|
+
const value = /^[+]?\d+$/.test(valueText) ? Number(valueText) : Number.NaN;
|
|
8
|
+
const { maximum } = options;
|
|
9
|
+
if (!Number.isSafeInteger(value)
|
|
10
|
+
|| value <= 0
|
|
11
|
+
|| (maximum !== undefined && value > maximum)) {
|
|
12
|
+
const constraint = maximum === undefined
|
|
13
|
+
? "a positive integer"
|
|
14
|
+
: `a positive integer no greater than ${maximum}`;
|
|
15
|
+
throw new Error(`${name} must be ${constraint}; got ${JSON.stringify(raw)}.`);
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
export function readHttpUrlEnv(name, defaultValue) {
|
|
20
|
+
const raw = process.env[name];
|
|
21
|
+
const value = (raw ?? defaultValue).trim();
|
|
22
|
+
try {
|
|
23
|
+
const parsed = new URL(value);
|
|
24
|
+
if (!["http:", "https:"].includes(parsed.protocol) || !parsed.hostname) {
|
|
25
|
+
throw new Error("unsupported URL");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
throw new Error(`${name} must be an absolute HTTP(S) URL.`);
|
|
30
|
+
}
|
|
31
|
+
return value.replace(/\/+$/, "");
|
|
32
|
+
}
|
|
33
|
+
export const PORT = readPositiveIntegerEnv("SOVARA_EXEC_SERVER_PORT", 5960, { maximum: 65_535 });
|
|
34
|
+
export const DEFAULT_SERVER_URL = readHttpUrlEnv("SOVARA_EXEC_SERVER_URL", `http://127.0.0.1:${PORT}`);
|
|
4
35
|
export const SERVER_BOOT_TIMEOUT_MS = 15_000;
|
|
5
36
|
export const SERVER_BOOT_POLL_INTERVAL_MS = 500;
|
|
6
37
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,YAAoB,EACpB,UAAgC,EAAE;IAElC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAC3E,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;WACzB,KAAK,IAAI,CAAC;WACV,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,GAAG,OAAO,CAAC,EAC7C,CAAC;QACD,MAAM,UAAU,GAAG,OAAO,KAAK,SAAS;YACtC,CAA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@@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sovara/runner",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "TypeScript runner for Sovara — wrap a script in a single function to record every LLM call, tool invocation, and log line into a structured run graph.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SovaraLabs",
|