open-agents-ai 0.184.41 → 0.184.43
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/index.js +19 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61880,6 +61880,9 @@ function ollamaRequest(ollamaUrl, path, method, body) {
|
|
|
61880
61880
|
});
|
|
61881
61881
|
});
|
|
61882
61882
|
});
|
|
61883
|
+
proxyReq.setTimeout(1e4, () => {
|
|
61884
|
+
proxyReq.destroy(new Error("Backend request timeout (10s)"));
|
|
61885
|
+
});
|
|
61883
61886
|
proxyReq.on("error", reject);
|
|
61884
61887
|
if (body)
|
|
61885
61888
|
proxyReq.write(body);
|
|
@@ -61903,6 +61906,9 @@ function ollamaStream(ollamaUrl, path, method, body, onData, onEnd, onError) {
|
|
|
61903
61906
|
proxyRes.on("data", onData);
|
|
61904
61907
|
proxyRes.on("end", onEnd);
|
|
61905
61908
|
});
|
|
61909
|
+
proxyReq.setTimeout(3e4, () => {
|
|
61910
|
+
proxyReq.destroy(new Error("Backend stream timeout (30s)"));
|
|
61911
|
+
});
|
|
61906
61912
|
proxyReq.on("error", onError);
|
|
61907
61913
|
if (body)
|
|
61908
61914
|
proxyReq.write(body);
|
|
@@ -65056,22 +65062,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
65056
65062
|
}
|
|
65057
65063
|
} catch {
|
|
65058
65064
|
}
|
|
65059
|
-
try {
|
|
65060
|
-
const apiPort = parseInt(process.env["OA_PORT"] || "11435", 10);
|
|
65061
|
-
const { startApiServer: startApiServer2 } = await Promise.resolve().then(() => (init_serve(), serve_exports));
|
|
65062
|
-
const apiServer = startApiServer2({
|
|
65063
|
-
port: apiPort,
|
|
65064
|
-
ollamaUrl: currentConfig.backendUrl || "http://127.0.0.1:11434"
|
|
65065
|
-
});
|
|
65066
|
-
let apiStarted = false;
|
|
65067
|
-
apiServer.on?.("listening", () => {
|
|
65068
|
-
apiStarted = true;
|
|
65069
|
-
writeContent(() => renderInfo(`REST API: http://localhost:${apiPort}`));
|
|
65070
|
-
});
|
|
65071
|
-
apiServer.on?.("error", () => {
|
|
65072
|
-
});
|
|
65073
|
-
} catch {
|
|
65074
|
-
}
|
|
65075
65065
|
try {
|
|
65076
65066
|
const { homedir: _hd } = await import("node:os");
|
|
65077
65067
|
const globalNamePath = join69(_hd(), ".open-agents", "agent-name");
|
|
@@ -65128,6 +65118,19 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
65128
65118
|
}
|
|
65129
65119
|
})().catch(() => {
|
|
65130
65120
|
});
|
|
65121
|
+
Promise.resolve().then(() => (init_serve(), serve_exports)).then(({ startApiServer: startApiServer2 }) => {
|
|
65122
|
+
const apiPort = parseInt(process.env["OA_PORT"] || "11435", 10);
|
|
65123
|
+
const apiServer = startApiServer2({
|
|
65124
|
+
port: apiPort,
|
|
65125
|
+
ollamaUrl: currentConfig.backendUrl || "http://127.0.0.1:11434"
|
|
65126
|
+
});
|
|
65127
|
+
apiServer.on?.("listening", () => {
|
|
65128
|
+
writeContent(() => renderInfo(`REST API: http://localhost:${apiPort}`));
|
|
65129
|
+
});
|
|
65130
|
+
apiServer.on?.("error", () => {
|
|
65131
|
+
});
|
|
65132
|
+
}).catch(() => {
|
|
65133
|
+
});
|
|
65131
65134
|
let passwordShowPlain = false;
|
|
65132
65135
|
function handleSudoRequest(_command) {
|
|
65133
65136
|
if (sudoPromptPending)
|
package/package.json
CHANGED