autopilot-ai 2.2.0 → 2.3.0
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 +25 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23169,6 +23169,7 @@ async function watchConversation(client, remote, conversationId, cursor, signal,
|
|
|
23169
23169
|
const controller = new AbortController();
|
|
23170
23170
|
const stop = () => controller.abort();
|
|
23171
23171
|
signal?.addEventListener("abort", stop, { once: true });
|
|
23172
|
+
if (signal?.aborted) stop();
|
|
23172
23173
|
const renderer = new EventRenderer(io);
|
|
23173
23174
|
let outcome;
|
|
23174
23175
|
try {
|
|
@@ -24949,6 +24950,23 @@ var init_github_auth = __esm({
|
|
|
24949
24950
|
}
|
|
24950
24951
|
});
|
|
24951
24952
|
|
|
24953
|
+
// src/server/serve-config.ts
|
|
24954
|
+
var serve_config_exports = {};
|
|
24955
|
+
__export(serve_config_exports, {
|
|
24956
|
+
resolveServeConfig: () => resolveServeConfig
|
|
24957
|
+
});
|
|
24958
|
+
function resolveServeConfig(cfg, env = process.env) {
|
|
24959
|
+
if (cfg) return { config: cfg, asterOnly: false };
|
|
24960
|
+
if (!env.AUTOPILOT_HOTCELL_ENDPOINT?.trim()) return void 0;
|
|
24961
|
+
return { config: { model: DEFAULT_MODEL }, asterOnly: true };
|
|
24962
|
+
}
|
|
24963
|
+
var init_serve_config = __esm({
|
|
24964
|
+
"src/server/serve-config.ts"() {
|
|
24965
|
+
"use strict";
|
|
24966
|
+
init_config();
|
|
24967
|
+
}
|
|
24968
|
+
});
|
|
24969
|
+
|
|
24952
24970
|
// src/runs/notifications.ts
|
|
24953
24971
|
function resendTransport(apiKey, opts2 = {}) {
|
|
24954
24972
|
const fetchImpl2 = opts2.fetchImpl ?? fetch;
|
|
@@ -42649,11 +42667,16 @@ Open: ${step.url}`);
|
|
|
42649
42667
|
})
|
|
42650
42668
|
);
|
|
42651
42669
|
program.command("serve").description("Start a headless HTTP server for API access and CI integration").option("--port <n>", "port to listen on", (v) => parseInt(v, 10), 4096).option("--hostname <host>", "hostname to listen on", "127.0.0.1").action(async (cmdOpts) => {
|
|
42652
|
-
const
|
|
42653
|
-
|
|
42670
|
+
const { resolveServeConfig: resolveServeConfig2 } = await Promise.resolve().then(() => (init_serve_config(), serve_config_exports));
|
|
42671
|
+
const resolved = resolveServeConfig2(await loadConfig());
|
|
42672
|
+
if (!resolved) {
|
|
42654
42673
|
console.error(`autopilot serve: ${await noCredentialsMessage()}`);
|
|
42655
42674
|
process.exit(2);
|
|
42656
42675
|
}
|
|
42676
|
+
if (resolved.asterOnly) {
|
|
42677
|
+
console.error("autopilot serve: no provider key on this host; serving the Aster API, whose cells reach the model through Hotcell's gateway.");
|
|
42678
|
+
}
|
|
42679
|
+
const cfg = resolved.config;
|
|
42657
42680
|
await initOtel();
|
|
42658
42681
|
await ensureModelCatalog(cfg);
|
|
42659
42682
|
const { startServer: startServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|