otterly 0.3.4 → 0.3.5
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/dist/cli.js +1 -1
- package/dist/engine.js +3 -5
- package/dist/server/index.js +1 -1
- package/dist/server/playground.js +1 -1
- package/dist/server/routes-native.js +1 -1
- package/dist/server/swagger.js +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/engine.js
CHANGED
|
@@ -30,12 +30,8 @@ function buildCLICommand(cliBin, prompt, opts) {
|
|
|
30
30
|
// Shell-escape single quotes in prompt
|
|
31
31
|
const safePrompt = prompt.replace(/'/g, "'\\''");
|
|
32
32
|
const parts = [cliBin, "-p", `'${safePrompt}'`, "--output-format", "stream-json", "--verbose"];
|
|
33
|
-
if (opts.cwd)
|
|
34
|
-
parts.push("--cwd", `'${String(opts.cwd).replace(/'/g, "'\\''")}'`);
|
|
35
33
|
if (opts.model)
|
|
36
34
|
parts.push("--model", String(opts.model));
|
|
37
|
-
if (opts.maxTurns)
|
|
38
|
-
parts.push("--max-turns", String(opts.maxTurns));
|
|
39
35
|
if (opts.systemPrompt) {
|
|
40
36
|
const safe = String(opts.systemPrompt).replace(/'/g, "'\\''");
|
|
41
37
|
parts.push("--system-prompt", `'${safe}'`);
|
|
@@ -78,6 +74,7 @@ function createCLIQueryFn(cliBin) {
|
|
|
78
74
|
encoding: 'utf-8',
|
|
79
75
|
timeout: workerData.timeout,
|
|
80
76
|
maxBuffer: 50 * 1024 * 1024,
|
|
77
|
+
cwd: workerData.cwd || undefined,
|
|
81
78
|
env: process.env,
|
|
82
79
|
});
|
|
83
80
|
parentPort.postMessage({ ok: true, data: out });
|
|
@@ -88,9 +85,10 @@ function createCLIQueryFn(cliBin) {
|
|
|
88
85
|
const timeout = opts.abortController
|
|
89
86
|
? 10 * 60 * 1000 // 10 min for streaming
|
|
90
87
|
: 5 * 60 * 1000; // 5 min for one-shot
|
|
88
|
+
const cwd = opts.cwd ? String(opts.cwd) : undefined;
|
|
91
89
|
const worker = new Worker(workerCode, {
|
|
92
90
|
eval: true,
|
|
93
|
-
workerData: { cmd, timeout },
|
|
91
|
+
workerData: { cmd, timeout, cwd },
|
|
94
92
|
});
|
|
95
93
|
worker.on("message", (msg) => {
|
|
96
94
|
if (msg.ok) {
|
package/dist/server/index.js
CHANGED
|
@@ -114,7 +114,7 @@ export async function startApiServer(opts = {}) {
|
|
|
114
114
|
}
|
|
115
115
|
// GET / — server info
|
|
116
116
|
if (req.method === "GET" && path === "/") {
|
|
117
|
-
jsonResponse(res, 200, { name: "otterly", version: "0.3.
|
|
117
|
+
jsonResponse(res, 200, { name: "otterly", version: "0.3.5", playground: "/playground" });
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
// ── POST routes: auth → rate limit → circuit breaker → queue ──
|
|
@@ -1335,7 +1335,7 @@ function playgroundHTML() {
|
|
|
1335
1335
|
<div class="header-left">
|
|
1336
1336
|
<span class="logo">\u{1F9A6}</span>
|
|
1337
1337
|
<span class="logo-text">otterly</span>
|
|
1338
|
-
<span class="version-badge">v0.3.
|
|
1338
|
+
<span class="version-badge">v0.3.5</span>
|
|
1339
1339
|
</div>
|
|
1340
1340
|
<div class="header-center">
|
|
1341
1341
|
<nav class="nav">
|
|
@@ -5,7 +5,7 @@ import { AgentError } from "../errors.js";
|
|
|
5
5
|
import { apiSessions } from "./session-store.js";
|
|
6
6
|
import { errorToHttpStatus } from "./openai-compat.js";
|
|
7
7
|
import { logError } from "./logger.js";
|
|
8
|
-
const PKG_VERSION = "0.3.
|
|
8
|
+
const PKG_VERSION = "0.3.5";
|
|
9
9
|
/**
|
|
10
10
|
* GET /api/status — health check with queue and circuit breaker stats
|
|
11
11
|
*/
|
package/dist/server/swagger.js
CHANGED
|
@@ -3,7 +3,7 @@ export const openApiSpec = {
|
|
|
3
3
|
openapi: "3.0.3",
|
|
4
4
|
info: {
|
|
5
5
|
title: "Otterly API",
|
|
6
|
-
version: "0.3.
|
|
6
|
+
version: "0.3.5",
|
|
7
7
|
description: "Local inference server with OpenAI-compatible and native endpoints. " +
|
|
8
8
|
"WebSocket available at ws://localhost:{port}/ws for interactive sessions.",
|
|
9
9
|
},
|
|
@@ -21,7 +21,7 @@ export const openApiSpec = {
|
|
|
21
21
|
type: "object",
|
|
22
22
|
properties: {
|
|
23
23
|
status: { type: "string", example: "ok" },
|
|
24
|
-
version: { type: "string", example: "0.3.
|
|
24
|
+
version: { type: "string", example: "0.3.5" },
|
|
25
25
|
activeSessions: { type: "integer" },
|
|
26
26
|
queue: {
|
|
27
27
|
type: "object",
|
|
@@ -67,7 +67,7 @@ export const openApiSpec = {
|
|
|
67
67
|
type: "object",
|
|
68
68
|
properties: {
|
|
69
69
|
name: { type: "string", example: "otterly" },
|
|
70
|
-
version: { type: "string", example: "0.3.
|
|
70
|
+
version: { type: "string", example: "0.3.5" },
|
|
71
71
|
playground: { type: "string", example: "/playground" },
|
|
72
72
|
},
|
|
73
73
|
required: ["name", "version", "playground"],
|