atlarix 15.19.1 → 15.19.2
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.
|
@@ -128069,6 +128069,49 @@ function retryAfterMs(err2) {
|
|
|
128069
128069
|
const dateMs = Date.parse(raw);
|
|
128070
128070
|
return Number.isFinite(dateMs) ? Math.max(0, dateMs - Date.now()) : null;
|
|
128071
128071
|
}
|
|
128072
|
+
function* errorChain(err2) {
|
|
128073
|
+
let e3 = err2;
|
|
128074
|
+
for (let depth = 0; depth < 5 && e3 && typeof e3 === "object"; depth++) {
|
|
128075
|
+
const rec = e3;
|
|
128076
|
+
yield rec;
|
|
128077
|
+
e3 = rec.cause ?? rec.error;
|
|
128078
|
+
}
|
|
128079
|
+
}
|
|
128080
|
+
function isLoopbackHost(host) {
|
|
128081
|
+
const h3 = host.replace(/^\[|\]$/g, "").toLowerCase();
|
|
128082
|
+
return h3 === "localhost" || h3.endsWith(".localhost") || h3 === "::1" || h3 === "0.0.0.0" || /^127\./.test(h3);
|
|
128083
|
+
}
|
|
128084
|
+
function refusedLocalOrigin(err2) {
|
|
128085
|
+
let url2;
|
|
128086
|
+
let refused = false;
|
|
128087
|
+
for (const e3 of errorChain(err2)) {
|
|
128088
|
+
if (!url2 && typeof e3.url === "string") url2 = e3.url;
|
|
128089
|
+
if (typeof e3.code === "string" && REFUSED_CODES.has(e3.code)) refused = true;
|
|
128090
|
+
if (/\bECONNREFUSED\b/.test(String(e3.message ?? ""))) refused = true;
|
|
128091
|
+
}
|
|
128092
|
+
if (!refused || !url2) return null;
|
|
128093
|
+
try {
|
|
128094
|
+
const u4 = new URL(url2);
|
|
128095
|
+
return isLoopbackHost(u4.hostname) ? u4.origin : null;
|
|
128096
|
+
} catch {
|
|
128097
|
+
return null;
|
|
128098
|
+
}
|
|
128099
|
+
}
|
|
128100
|
+
function localServerDownMessage(origin, providerId, providerName) {
|
|
128101
|
+
const port = (() => {
|
|
128102
|
+
if (providerId?.startsWith("custom::")) return "";
|
|
128103
|
+
try {
|
|
128104
|
+
return new URL(origin).port;
|
|
128105
|
+
} catch {
|
|
128106
|
+
return "";
|
|
128107
|
+
}
|
|
128108
|
+
})();
|
|
128109
|
+
if (providerId === "ollama" || port === "11434")
|
|
128110
|
+
return `Ollama isn't running at ${origin}. Open Ollama or run \`ollama serve\`, then try again.`;
|
|
128111
|
+
if (providerId === "lmstudio" || port === "1234")
|
|
128112
|
+
return `LM Studio's server isn't running at ${origin}. Start it in LM Studio, then try again.`;
|
|
128113
|
+
return `Nothing is running at ${origin}${providerName ? ` for ${providerName}` : ""}. Start the server, then try again.`;
|
|
128114
|
+
}
|
|
128072
128115
|
function isProviderBusyError(err2) {
|
|
128073
128116
|
const e3 = err2?.error ?? err2;
|
|
128074
128117
|
if (!e3 || typeof e3 !== "object") return false;
|
|
@@ -128077,17 +128120,20 @@ function isProviderBusyError(err2) {
|
|
|
128077
128120
|
const text6 = `${String(e3.code ?? "")} ${String(e3.type ?? "")} ${String(e3.message ?? "")}`;
|
|
128078
128121
|
return /rate.?limit|too many requests|overloaded|server_error|temporarily unavailable|try again (later|in)|capacity/i.test(text6);
|
|
128079
128122
|
}
|
|
128080
|
-
var RECONNECT_DELAYS_MS, RETRY_AFTER_CAP_MS, RETRY_AFTER_JITTER_MS, NetworkStreamDisconnectedError, PROVIDER_BUSY_DELAYS_MS;
|
|
128123
|
+
var RECONNECT_DELAYS_MS, RETRY_AFTER_CAP_MS, RETRY_AFTER_JITTER_MS, REFUSED_CODES, NetworkStreamDisconnectedError, PROVIDER_BUSY_DELAYS_MS;
|
|
128081
128124
|
var init_network_retry = __esm({
|
|
128082
128125
|
"src/ipc/handlers/chat_stream/network-retry.ts"() {
|
|
128083
128126
|
init_provider_finish_error();
|
|
128084
128127
|
RECONNECT_DELAYS_MS = [2e3, 5e3, 1e4];
|
|
128085
128128
|
RETRY_AFTER_CAP_MS = 6e4;
|
|
128086
128129
|
RETRY_AFTER_JITTER_MS = 1e3;
|
|
128130
|
+
REFUSED_CODES = /* @__PURE__ */ new Set(["ECONNREFUSED", "ConnectionRefused"]);
|
|
128087
128131
|
NetworkStreamDisconnectedError = class extends Error {
|
|
128088
128132
|
partialResponse;
|
|
128089
128133
|
/** The last transport error's own words ("Cannot connect to API: …"). */
|
|
128090
128134
|
detail;
|
|
128135
|
+
/** Set when a server on this computer refused the connection (refusedLocalOrigin). */
|
|
128136
|
+
localOrigin;
|
|
128091
128137
|
constructor(partialResponse, cause) {
|
|
128092
128138
|
super("Network stream disconnected after retries");
|
|
128093
128139
|
this.name = "NetworkStreamDisconnectedError";
|
|
@@ -128095,6 +128141,8 @@ var init_network_retry = __esm({
|
|
|
128095
128141
|
this.partialResponse = partialResponse;
|
|
128096
128142
|
const m4 = cause instanceof Error ? cause.message : cause?.error?.message;
|
|
128097
128143
|
if (m4) this.detail = m4;
|
|
128144
|
+
const local2 = refusedLocalOrigin(cause);
|
|
128145
|
+
if (local2) this.localOrigin = local2;
|
|
128098
128146
|
}
|
|
128099
128147
|
};
|
|
128100
128148
|
PROVIDER_BUSY_DELAYS_MS = [1e4, 3e4, 6e4];
|
|
@@ -132822,7 +132870,7 @@ var init_computer_use_models = __esm({
|
|
|
132822
132870
|
"src/lib/computer/computer-use-models.json"() {
|
|
132823
132871
|
computer_use_models_default = {
|
|
132824
132872
|
source: "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json",
|
|
132825
|
-
fetchedAt: "2026-11-
|
|
132873
|
+
fetchedAt: "2026-11-21",
|
|
132826
132874
|
ids: [
|
|
132827
132875
|
"claude-3-5-sonnet",
|
|
132828
132876
|
"claude-3-7-sonnet",
|
|
@@ -143670,6 +143718,19 @@ var init_assistant_message_parts = __esm({
|
|
|
143670
143718
|
});
|
|
143671
143719
|
|
|
143672
143720
|
// src/headless/fake-sender.ts
|
|
143721
|
+
function disconnectedMessage(p2) {
|
|
143722
|
+
if (typeof p2?.message === "string" && p2.message.trim()) return p2.message.trim();
|
|
143723
|
+
const name30 = p2?.providerName || "the model provider";
|
|
143724
|
+
const detail = typeof p2?.detail === "string" && p2.detail.trim() ? `: ${p2.detail.trim().replace(/\.?$/, ".")}` : ".";
|
|
143725
|
+
return `Couldn't reach ${name30}${detail}`;
|
|
143726
|
+
}
|
|
143727
|
+
function turnErrorText2(send2) {
|
|
143728
|
+
const p2 = send2.payload;
|
|
143729
|
+
if (send2.channel === "chat:stream:disconnected") return disconnectedMessage(p2);
|
|
143730
|
+
if (typeof p2?.error === "string" && p2.error.trim()) return p2.error.trim();
|
|
143731
|
+
if (typeof p2?.message === "string" && p2.message.trim()) return p2.message.trim();
|
|
143732
|
+
return JSON.stringify(p2).slice(0, 500);
|
|
143733
|
+
}
|
|
143673
143734
|
function makeFakeSender(onSend) {
|
|
143674
143735
|
const sends = [];
|
|
143675
143736
|
const waiters2 = [];
|
|
@@ -143679,7 +143740,7 @@ function makeFakeSender(onSend) {
|
|
|
143679
143740
|
onSend?.(send2);
|
|
143680
143741
|
for (let i4 = waiters2.length - 1; i4 >= 0; i4--) {
|
|
143681
143742
|
const w3 = waiters2[i4];
|
|
143682
|
-
if (w3.channel
|
|
143743
|
+
if (onChannel(w3.channel, channel2) && (!w3.pred || w3.pred(payload))) {
|
|
143683
143744
|
waiters2.splice(i4, 1);
|
|
143684
143745
|
w3.resolve(send2);
|
|
143685
143746
|
}
|
|
@@ -143696,7 +143757,7 @@ function makeFakeSender(onSend) {
|
|
|
143696
143757
|
sends,
|
|
143697
143758
|
waitFor: (channel2, pred, timeoutMs = 6e5) => {
|
|
143698
143759
|
const existing = sends.find(
|
|
143699
|
-
(s3) => s3.channel
|
|
143760
|
+
(s3) => onChannel(channel2, s3.channel) && (!pred || pred(s3.payload))
|
|
143700
143761
|
);
|
|
143701
143762
|
if (existing) return Promise.resolve(existing);
|
|
143702
143763
|
return new Promise((resolve19, reject2) => {
|
|
@@ -143708,7 +143769,7 @@ function makeFakeSender(onSend) {
|
|
|
143708
143769
|
if (i4 >= 0) {
|
|
143709
143770
|
waiters2.splice(i4, 1);
|
|
143710
143771
|
reject2(
|
|
143711
|
-
new Error(`waitFor("${channel2}") timed out after ${timeoutMs}ms`)
|
|
143772
|
+
new Error(`waitFor("${typeof channel2 === "string" ? channel2 : channel2.join(" | ")}") timed out after ${timeoutMs}ms`)
|
|
143712
143773
|
);
|
|
143713
143774
|
}
|
|
143714
143775
|
}, timeoutMs);
|
|
@@ -143717,8 +143778,11 @@ function makeFakeSender(onSend) {
|
|
|
143717
143778
|
}
|
|
143718
143779
|
};
|
|
143719
143780
|
}
|
|
143781
|
+
var TURN_END_CHANNELS, onChannel;
|
|
143720
143782
|
var init_fake_sender = __esm({
|
|
143721
143783
|
"src/headless/fake-sender.ts"() {
|
|
143784
|
+
TURN_END_CHANNELS = ["chat:response:end", "chat:stream:disconnected"];
|
|
143785
|
+
onChannel = (want, channel2) => typeof want === "string" ? want === channel2 : want.includes(channel2);
|
|
143722
143786
|
}
|
|
143723
143787
|
});
|
|
143724
143788
|
|
|
@@ -143862,7 +143926,7 @@ async function automationAutoApprove(opts) {
|
|
|
143862
143926
|
}
|
|
143863
143927
|
};
|
|
143864
143928
|
const endWatch = sender.waitFor(
|
|
143865
|
-
|
|
143929
|
+
TURN_END_CHANNELS,
|
|
143866
143930
|
(p2) => p2?.chatId === chatId,
|
|
143867
143931
|
timeoutMs
|
|
143868
143932
|
).then(() => {
|
|
@@ -143880,6 +143944,7 @@ async function automationAutoApprove(opts) {
|
|
|
143880
143944
|
var sleep5;
|
|
143881
143945
|
var init_auto_approve = __esm({
|
|
143882
143946
|
"src/lib/automations/auto-approve.ts"() {
|
|
143947
|
+
init_fake_sender();
|
|
143883
143948
|
init_unattended();
|
|
143884
143949
|
init_bug_report();
|
|
143885
143950
|
sleep5 = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
|
|
@@ -216766,6 +216831,8 @@ function atlarixPageKernel(req) {
|
|
|
216766
216831
|
"[role]",
|
|
216767
216832
|
"[onclick]",
|
|
216768
216833
|
'[contenteditable="true"]',
|
|
216834
|
+
'[contenteditable=""]',
|
|
216835
|
+
'[contenteditable="plaintext-only"]',
|
|
216769
216836
|
'[tabindex]:not([tabindex="-1"])'
|
|
216770
216837
|
].join(",");
|
|
216771
216838
|
const isRendered = (el) => {
|
|
@@ -216802,7 +216869,7 @@ function atlarixPageKernel(req) {
|
|
|
216802
216869
|
return String(raw).replace(/\s+/g, " ").trim();
|
|
216803
216870
|
};
|
|
216804
216871
|
const roleOf = (el) => el.getAttribute("role") || el.tagName.toLowerCase();
|
|
216805
|
-
if (req.op === "resolve" || req.op === "click" || req.op === "fill") {
|
|
216872
|
+
if (req.op === "resolve" || req.op === "click" || req.op === "fill" || req.op === "fill-check" || req.op === "fill-select") {
|
|
216806
216873
|
let el = null;
|
|
216807
216874
|
const wantRef = String(req.ref || "");
|
|
216808
216875
|
const wantSel = String(req.selector || "");
|
|
@@ -216959,7 +217026,7 @@ function atlarixPageKernel(req) {
|
|
|
216959
217026
|
url: location.href
|
|
216960
217027
|
};
|
|
216961
217028
|
}
|
|
216962
|
-
const FILLABLE = "input:not([type=hidden]),textarea,select,[contenteditable=true],[contenteditable='']";
|
|
217029
|
+
const FILLABLE = "input:not([type=hidden]),textarea,select,[contenteditable=true],[contenteditable=''],[contenteditable=plaintext-only]";
|
|
216963
217030
|
if (!el.matches(FILLABLE)) {
|
|
216964
217031
|
const inner = el.querySelector(FILLABLE);
|
|
216965
217032
|
const outer = el.closest(FILLABLE);
|
|
@@ -216974,6 +217041,27 @@ function atlarixPageKernel(req) {
|
|
|
216974
217041
|
};
|
|
216975
217042
|
}
|
|
216976
217043
|
}
|
|
217044
|
+
if (req.op === "fill-check") {
|
|
217045
|
+
const flat = (v3) => v3.replace(/\u00a0/g, " ").replace(/\s+/g, " ").trim();
|
|
217046
|
+
const bare = (v3) => v3.replace(/[\u2018\u2019\u201a\u2032]/g, "'").replace(/[\u201c\u201d\u201e\u2033]/g, '"').replace(/[\s\u00a0\u200b-\u200d\u2060\ufeff]+/g, "");
|
|
217047
|
+
const shown = el.innerText;
|
|
217048
|
+
const holds = flat(typeof shown === "string" ? shown : el.textContent || "");
|
|
217049
|
+
const took = bare(holds) === bare(String(req.value));
|
|
217050
|
+
if (took) return { ok: true, tag: el.tagName.toLowerCase(), url: location.href };
|
|
217051
|
+
return {
|
|
217052
|
+
ok: false,
|
|
217053
|
+
tag: el.tagName.toLowerCase(),
|
|
217054
|
+
kept: holds,
|
|
217055
|
+
error: 'The editor did not take the text: it holds "' + (holds.length > 80 ? holds.slice(0, 80) + "\u2026" : holds) + '".',
|
|
217056
|
+
url: location.href
|
|
217057
|
+
};
|
|
217058
|
+
}
|
|
217059
|
+
if (req.op === "fill-select") {
|
|
217060
|
+
el.focus();
|
|
217061
|
+
const sel = window.getSelection();
|
|
217062
|
+
if (sel) sel.selectAllChildren(el);
|
|
217063
|
+
return { ok: true, tag: el.tagName.toLowerCase(), url: location.href };
|
|
217064
|
+
}
|
|
216977
217065
|
try {
|
|
216978
217066
|
el.scrollIntoView({ block: "center" });
|
|
216979
217067
|
} catch {
|
|
@@ -216982,7 +217070,7 @@ function atlarixPageKernel(req) {
|
|
|
216982
217070
|
const raw = req.value;
|
|
216983
217071
|
const value = typeof raw === "string" ? raw : String(raw);
|
|
216984
217072
|
const fire = (node2, name30) => {
|
|
216985
|
-
node2.dispatchEvent(new Event(name30, { bubbles: true }));
|
|
217073
|
+
node2.dispatchEvent(new Event(name30, { bubbles: true, composed: name30 === "input" }));
|
|
216986
217074
|
};
|
|
216987
217075
|
if (el instanceof HTMLInputElement && (el.type === "checkbox" || el.type === "radio")) {
|
|
216988
217076
|
const want = typeof raw === "boolean" ? raw : !/^(false|0|off|no|unchecked)$/i.test(value);
|
|
@@ -217005,21 +217093,133 @@ function atlarixPageKernel(req) {
|
|
|
217005
217093
|
fire(el, "input");
|
|
217006
217094
|
fire(el, "change");
|
|
217007
217095
|
} else if (
|
|
217008
|
-
//
|
|
217096
|
+
// A field inside an editable region can report isContentEditable: it is
|
|
217097
|
+
// still a typed input, with the read-back below.
|
|
217098
|
+
!(el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) && // The PROPERTY and the ATTRIBUTE, because they disagree in cases that
|
|
217009
217099
|
// matter. The isContentEditable PROPERTY is computed from rendering, so it reads
|
|
217010
217100
|
// false for an element that is detached or inside a hidden subtree even
|
|
217011
217101
|
// when the author explicitly set the attribute — and false here falls
|
|
217012
217102
|
// through to the native value setter, which throws on a div. (It is also
|
|
217013
217103
|
// simply absent in jsdom, which is how this was noticed.)
|
|
217014
|
-
el.isContentEditable || el.getAttribute("contenteditable") === "" || el.getAttribute("contenteditable") === "true"
|
|
217104
|
+
(el.isContentEditable || el.getAttribute("contenteditable") === "" || el.getAttribute("contenteditable") === "true" || el.getAttribute("contenteditable") === "plaintext-only")
|
|
217015
217105
|
) {
|
|
217016
|
-
|
|
217017
|
-
|
|
217106
|
+
const host = el;
|
|
217107
|
+
host.focus();
|
|
217108
|
+
const root2 = host.getRootNode();
|
|
217109
|
+
const active = root2.activeElement || document.activeElement;
|
|
217110
|
+
const focused = active === host || host.contains(active);
|
|
217111
|
+
let reacted = false;
|
|
217112
|
+
if (focused && typeof document.execCommand === "function") {
|
|
217113
|
+
const onInput = () => {
|
|
217114
|
+
reacted = true;
|
|
217115
|
+
};
|
|
217116
|
+
const watch = typeof MutationObserver === "function" ? new MutationObserver(() => {
|
|
217117
|
+
}) : null;
|
|
217118
|
+
watch?.observe(host, { childList: true, characterData: true, subtree: true });
|
|
217119
|
+
host.addEventListener("input", onInput, true);
|
|
217120
|
+
const step = (inputType, cmd, data) => {
|
|
217121
|
+
if (typeof InputEvent === "function") {
|
|
217122
|
+
const ev = new InputEvent("beforeinput", {
|
|
217123
|
+
inputType,
|
|
217124
|
+
data: data === void 0 ? null : data,
|
|
217125
|
+
bubbles: true,
|
|
217126
|
+
cancelable: true,
|
|
217127
|
+
composed: true
|
|
217128
|
+
});
|
|
217129
|
+
host.dispatchEvent(ev);
|
|
217130
|
+
if (ev.defaultPrevented) {
|
|
217131
|
+
reacted = true;
|
|
217132
|
+
return;
|
|
217133
|
+
}
|
|
217134
|
+
}
|
|
217135
|
+
document.execCommand(cmd, false, data);
|
|
217136
|
+
};
|
|
217137
|
+
try {
|
|
217138
|
+
window.getSelection()?.selectAllChildren(host);
|
|
217139
|
+
if (value === "") step("deleteContentBackward", "delete");
|
|
217140
|
+
else
|
|
217141
|
+
value.split(/\r\n|\r|\n/).forEach((line, i4) => {
|
|
217142
|
+
if (i4 > 0) step("insertParagraph", "insertParagraph");
|
|
217143
|
+
if (line !== "") step("insertText", "insertText", line);
|
|
217144
|
+
});
|
|
217145
|
+
} catch {
|
|
217146
|
+
}
|
|
217147
|
+
host.removeEventListener("input", onInput, true);
|
|
217148
|
+
if (watch) {
|
|
217149
|
+
if (watch.takeRecords().length) reacted = true;
|
|
217150
|
+
watch.disconnect();
|
|
217151
|
+
}
|
|
217152
|
+
}
|
|
217153
|
+
if (!reacted) {
|
|
217154
|
+
host.textContent = value;
|
|
217155
|
+
fire(el, "input");
|
|
217156
|
+
}
|
|
217157
|
+
return {
|
|
217158
|
+
ok: true,
|
|
217159
|
+
verify: true,
|
|
217160
|
+
tag: el.tagName.toLowerCase(),
|
|
217161
|
+
label: describe3(el),
|
|
217162
|
+
rect: boxOf(el),
|
|
217163
|
+
target: targetOf(el),
|
|
217164
|
+
url: location.href
|
|
217165
|
+
};
|
|
217018
217166
|
} else {
|
|
217019
217167
|
const proto = el instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : el instanceof HTMLInputElement ? HTMLInputElement.prototype : null;
|
|
217020
217168
|
const setter = proto ? Object.getOwnPropertyDescriptor(proto, "value")?.set : null;
|
|
217021
|
-
|
|
217022
|
-
|
|
217169
|
+
const prev = String(el.value ?? "");
|
|
217170
|
+
const put2 = (v3) => {
|
|
217171
|
+
if (setter) setter.call(el, v3);
|
|
217172
|
+
else el.value = v3;
|
|
217173
|
+
};
|
|
217174
|
+
put2(value);
|
|
217175
|
+
const kept = String(el.value ?? "");
|
|
217176
|
+
const lf = (v3) => v3.replace(/\r\n?/g, "\n");
|
|
217177
|
+
if (lf(kept) !== lf(value)) {
|
|
217178
|
+
const type2 = el instanceof HTMLInputElement ? el.type : "";
|
|
217179
|
+
const kind = type2 ? "<input type=" + type2 + ">" : "<" + el.tagName.toLowerCase() + ">";
|
|
217180
|
+
const rejected = kept === "" && value !== "" || type2 === "range" && value.trim() !== "" && isNaN(Number(value)) || type2 === "color" && kept.toLowerCase() !== value.toLowerCase();
|
|
217181
|
+
if (rejected) {
|
|
217182
|
+
put2(prev);
|
|
217183
|
+
const formats = {
|
|
217184
|
+
time: "HH:MM",
|
|
217185
|
+
date: "YYYY-MM-DD",
|
|
217186
|
+
"datetime-local": "YYYY-MM-DDTHH:MM",
|
|
217187
|
+
month: "YYYY-MM",
|
|
217188
|
+
week: "YYYY-Www",
|
|
217189
|
+
color: "#rrggbb"
|
|
217190
|
+
};
|
|
217191
|
+
let hint = formats[type2] || "";
|
|
217192
|
+
if (type2 === "number" || type2 === "range") {
|
|
217193
|
+
const bounds = [];
|
|
217194
|
+
for (const attr2 of ["min", "max", "step"]) {
|
|
217195
|
+
const v3 = el.getAttribute(attr2);
|
|
217196
|
+
if (v3) bounds.push(attr2 + " " + v3);
|
|
217197
|
+
}
|
|
217198
|
+
hint = "a number" + (bounds.length ? ", " + bounds.join(", ") : "");
|
|
217199
|
+
}
|
|
217200
|
+
return {
|
|
217201
|
+
ok: false,
|
|
217202
|
+
tag: el.tagName.toLowerCase(),
|
|
217203
|
+
label: describe3(el),
|
|
217204
|
+
kept: prev,
|
|
217205
|
+
error: kind + ' rejected "' + value + '" and still holds "' + prev + '". Use ' + // "time HH:MM" names a pattern; "a number, min 1" already reads
|
|
217206
|
+
// as a sentence and needs no type in front of it.
|
|
217207
|
+
(hint ? "the type's format (" + (hint.indexOf("a ") === 0 ? "" : type2 + " ") + hint + ")." : "a value this input accepts."),
|
|
217208
|
+
url: location.href
|
|
217209
|
+
};
|
|
217210
|
+
}
|
|
217211
|
+
fire(el, "input");
|
|
217212
|
+
fire(el, "change");
|
|
217213
|
+
return {
|
|
217214
|
+
ok: true,
|
|
217215
|
+
tag: el.tagName.toLowerCase(),
|
|
217216
|
+
label: describe3(el),
|
|
217217
|
+
rect: boxOf(el),
|
|
217218
|
+
target: targetOf(el),
|
|
217219
|
+
kept,
|
|
217220
|
+
url: location.href
|
|
217221
|
+
};
|
|
217222
|
+
}
|
|
217023
217223
|
fire(el, "input");
|
|
217024
217224
|
fire(el, "change");
|
|
217025
217225
|
}
|
|
@@ -244090,7 +244290,7 @@ function isLoopbackIp(ip) {
|
|
|
244090
244290
|
}
|
|
244091
244291
|
return false;
|
|
244092
244292
|
}
|
|
244093
|
-
function
|
|
244293
|
+
function isLoopbackHost2(hostname4) {
|
|
244094
244294
|
const h3 = hostname4.toLowerCase().replace(/^\[|\]$/g, "");
|
|
244095
244295
|
if (h3 === "localhost" || h3.endsWith(".localhost")) return true;
|
|
244096
244296
|
if (net3.isIP(h3)) return isLoopbackIp(h3);
|
|
@@ -244098,7 +244298,7 @@ function isLoopbackHost(hostname4) {
|
|
|
244098
244298
|
}
|
|
244099
244299
|
async function resolveAndCheckHost(hostname4, trustedOrigins, requestOrigin, allowLoopback) {
|
|
244100
244300
|
const allowPrivate = trustedOrigins.has(requestOrigin);
|
|
244101
|
-
const okLoopbackHost = allowLoopback &&
|
|
244301
|
+
const okLoopbackHost = allowLoopback && isLoopbackHost2(hostname4);
|
|
244102
244302
|
const okLoopbackIp = (ip) => allowLoopback && isLoopbackIp(ip);
|
|
244103
244303
|
const bare = hostname4.toLowerCase().replace(/^\[|\]$/g, "");
|
|
244104
244304
|
if (isHostnameBlocked(hostname4)) {
|
|
@@ -306921,6 +307121,10 @@ async function act(args2) {
|
|
|
306921
307121
|
const sentAt = Date.now();
|
|
306922
307122
|
const res = await requestChrome(op2, callArgs);
|
|
306923
307123
|
if (isChromeRefusal(res)) return res;
|
|
307124
|
+
const pageResult = res.result;
|
|
307125
|
+
if (action !== "navigate" && pageResult && typeof pageResult === "object" && pageResult.ok === false && typeof pageResult.error === "string") {
|
|
307126
|
+
return { success: false, error: pageResult.error };
|
|
307127
|
+
}
|
|
306924
307128
|
if (action !== "navigate") return { success: true, result: res.result };
|
|
306925
307129
|
markNavigated(res.result, sentAt);
|
|
306926
307130
|
const loaded2 = res.result?.loaded;
|
|
@@ -312266,6 +312470,7 @@ async function runStreamRoundWithEmptyOutputRetry(ctx, deps, params) {
|
|
|
312266
312470
|
const resumeMessages = current?.getResumeMessages?.() ?? [];
|
|
312267
312471
|
if (resumeMessages.length === 0) return null;
|
|
312268
312472
|
if (networkAttempt >= RECONNECT_DELAYS_MS.length) return null;
|
|
312473
|
+
if (refusedLocalOrigin(fault2)) return null;
|
|
312269
312474
|
const delay3 = jitteredDelay(networkAttempt, retryAfterMs(fault2));
|
|
312270
312475
|
networkAttempt++;
|
|
312271
312476
|
noteTurn(params.chatId, "retries");
|
|
@@ -312463,6 +312668,11 @@ async function runStreamRoundWithEmptyOutputRetry(ctx, deps, params) {
|
|
|
312463
312668
|
);
|
|
312464
312669
|
throw new EmptyModelOutputAfterRetryError();
|
|
312465
312670
|
}
|
|
312671
|
+
const refusedLocally = isNetworkStreamError(err2) ? refusedLocalOrigin(err2) : null;
|
|
312672
|
+
if (refusedLocally) {
|
|
312673
|
+
logger84.warn(`[stream] Local server not running at ${refusedLocally}: not retrying`);
|
|
312674
|
+
throw new NetworkStreamDisconnectedError(fullResponse, err2);
|
|
312675
|
+
}
|
|
312466
312676
|
if (isNetworkStreamError(err2)) {
|
|
312467
312677
|
const resumeMessages = await resumeAfterNetworkFault(bundle, err2);
|
|
312468
312678
|
if (resumeMessages) {
|
|
@@ -320539,15 +320749,17 @@ async function handleTurnError(error62, ctx, deps) {
|
|
|
320539
320749
|
logger100.error("Error calling LLM:", error62);
|
|
320540
320750
|
if (error62 instanceof NetworkStreamDisconnectedError) {
|
|
320541
320751
|
const { providerDisplayName: providerDisplayName2 } = await Promise.resolve().then(() => (init_language_model_helpers(), language_model_helpers_exports));
|
|
320752
|
+
const providerId = turnModelOf(req.chatId, req.modelOverride ?? getEffectiveModel(readSettings())).provider;
|
|
320753
|
+
const providerName = providerDisplayName2(providerId);
|
|
320542
320754
|
safeSend(event.sender, "chat:stream:disconnected", {
|
|
320543
320755
|
chatId: req.chatId,
|
|
320544
320756
|
partialResponse: error62.partialResponse,
|
|
320545
320757
|
reason: "network",
|
|
320546
|
-
|
|
320547
|
-
providerName: providerDisplayName2(
|
|
320548
|
-
turnModelOf(req.chatId, req.modelOverride ?? getEffectiveModel(readSettings())).provider
|
|
320549
|
-
),
|
|
320758
|
+
providerName,
|
|
320550
320759
|
...error62.detail ? { detail: error62.detail } : {},
|
|
320760
|
+
// A server on this computer that isn't running: the whole message, said
|
|
320761
|
+
// once here for the app, the CLI and automations alike.
|
|
320762
|
+
...error62.localOrigin ? { message: localServerDownMessage(error62.localOrigin, providerId, providerName) } : {},
|
|
320551
320763
|
canResume: true
|
|
320552
320764
|
});
|
|
320553
320765
|
if (activeStreamId.get(req.chatId) === streamId)
|
|
@@ -323352,6 +323564,8 @@ function turnFailure(sends, chatId) {
|
|
|
323352
323564
|
);
|
|
323353
323565
|
if (!failed) return null;
|
|
323354
323566
|
if (failed.channel === "chat:stream:disconnected") {
|
|
323567
|
+
const whole = String(failed.payload?.message ?? "").trim();
|
|
323568
|
+
if (whole) return whole;
|
|
323355
323569
|
const detail = String(failed.payload?.detail ?? "").trim();
|
|
323356
323570
|
return detail ? `Couldn't reach the model provider: ${detail}` : "Couldn't reach the model provider.";
|
|
323357
323571
|
}
|
|
@@ -392918,6 +393132,7 @@ import os33 from "node:os";
|
|
|
392918
393132
|
import path102 from "node:path";
|
|
392919
393133
|
|
|
392920
393134
|
// src/headless/auto-approve.ts
|
|
393135
|
+
init_fake_sender();
|
|
392921
393136
|
init_unattended();
|
|
392922
393137
|
init_bug_report();
|
|
392923
393138
|
var sleep7 = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
|
|
@@ -392952,7 +393167,7 @@ async function autoApprove(opts) {
|
|
|
392952
393167
|
}
|
|
392953
393168
|
};
|
|
392954
393169
|
const endWatch = sender.waitFor(
|
|
392955
|
-
|
|
393170
|
+
TURN_END_CHANNELS,
|
|
392956
393171
|
(p2) => p2?.chatId === chatId,
|
|
392957
393172
|
timeoutMs
|
|
392958
393173
|
).then(() => {
|
|
@@ -392985,6 +393200,7 @@ function applyLiveTextPatch(current, patch) {
|
|
|
392985
393200
|
// src/headless/trajectory-writer.ts
|
|
392986
393201
|
init_thinking_tags();
|
|
392987
393202
|
init_redact_secrets();
|
|
393203
|
+
init_fake_sender();
|
|
392988
393204
|
var TRAJECTORY_SCHEMA_VERSION = 1;
|
|
392989
393205
|
var THOUGHT_BLOCK_RE = /<(think|thinking|reasoning|redacted_thinking)>([\s\S]*?)<\/\1>/gi;
|
|
392990
393206
|
var TOOL_TAGS = "atlarix-tool-call|atlarix-mcp-tool-call|atlarix-tool-result|atlarix-mcp-tool-result";
|
|
@@ -393119,6 +393335,13 @@ function createTrajectoryWriter(filePath, meta3) {
|
|
|
393119
393335
|
});
|
|
393120
393336
|
return;
|
|
393121
393337
|
}
|
|
393338
|
+
// The provider couldn't be reached: the turn's last event, with no
|
|
393339
|
+
// chat:response:end after it. Without this the file ended with no reason.
|
|
393340
|
+
case "chat:stream:disconnected": {
|
|
393341
|
+
flushAssistantText();
|
|
393342
|
+
writeLine({ type: "error", message: disconnectedMessage(p2) });
|
|
393343
|
+
return;
|
|
393344
|
+
}
|
|
393122
393345
|
default:
|
|
393123
393346
|
return;
|
|
393124
393347
|
}
|
|
@@ -393266,7 +393489,7 @@ async function runHeadlessAgent(opts) {
|
|
|
393266
393489
|
...opts.attachments?.length ? { attachments: opts.attachments.map((a2) => ({ ...a2, attachmentType: "chat-context" })) } : {}
|
|
393267
393490
|
});
|
|
393268
393491
|
const endPromise = sender.waitFor(
|
|
393269
|
-
|
|
393492
|
+
TURN_END_CHANNELS,
|
|
393270
393493
|
(p2) => p2?.chatId === chatId,
|
|
393271
393494
|
timeoutMs
|
|
393272
393495
|
);
|
|
@@ -393287,12 +393510,16 @@ async function runHeadlessAgent(opts) {
|
|
|
393287
393510
|
chat:response:error ${errors.join("\n ")}` : "")
|
|
393288
393511
|
);
|
|
393289
393512
|
}
|
|
393290
|
-
const turnErrors = sender.sends.filter(
|
|
393513
|
+
const turnErrors = sender.sends.filter(
|
|
393514
|
+
(s3) => s3.channel === "chat:response:error" || s3.channel === "chat:stream:disconnected"
|
|
393515
|
+
);
|
|
393291
393516
|
if (completed && turnErrors.length) {
|
|
393292
393517
|
completed = false;
|
|
393293
393518
|
console.error(
|
|
393519
|
+
// The message itself: in the payload it came after any partial reply,
|
|
393520
|
+
// past a 500-character cut ("Ollama isn't running…" went unseen).
|
|
393294
393521
|
`[atlarix-headless] the run ended on an error:
|
|
393295
|
-
${turnErrors.map(
|
|
393522
|
+
${turnErrors.map(turnErrorText2).join("\n ")}`
|
|
393296
393523
|
);
|
|
393297
393524
|
}
|
|
393298
393525
|
trajectory?.recordRunEnd(completed);
|
|
@@ -393418,7 +393645,7 @@ async function useCliSession(loc) {
|
|
|
393418
393645
|
|
|
393419
393646
|
// src/headless/atlarix-headless.mts
|
|
393420
393647
|
init_wsl_workspace();
|
|
393421
|
-
var VERSION15 = false ? "dev" : "15.19.
|
|
393648
|
+
var VERSION15 = false ? "dev" : "15.19.2";
|
|
393422
393649
|
process.env.ATLARIX_VERSION ??= VERSION15;
|
|
393423
393650
|
if (process.argv[2] === "run") process.argv.splice(2, 1);
|
|
393424
393651
|
var RUN_HELP = `atlarix run: one turn without the UI, for scripts and CI
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atlarix",
|
|
3
|
-
"version": "15.19.
|
|
3
|
+
"version": "15.19.2",
|
|
4
4
|
"description": "Atlarix CLI: an AI coding agent in your terminal. Works with any model (Atlarix Auto, your own API key, or a local model) and runs unattended with `atlarix run` for CI.",
|
|
5
5
|
"license": "PROPRIETARY",
|
|
6
6
|
"author": {
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"provenance": false
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
|
-
"atlarix-darwin-arm64": "15.19.
|
|
70
|
-
"atlarix-darwin-x64": "15.19.
|
|
71
|
-
"atlarix-linux-x64": "15.19.
|
|
72
|
-
"atlarix-linux-arm64": "15.19.
|
|
73
|
-
"atlarix-linux-x64-musl": "15.19.
|
|
74
|
-
"atlarix-linux-arm64-musl": "15.19.
|
|
75
|
-
"atlarix-windows-x64": "15.19.
|
|
69
|
+
"atlarix-darwin-arm64": "15.19.2",
|
|
70
|
+
"atlarix-darwin-x64": "15.19.2",
|
|
71
|
+
"atlarix-linux-x64": "15.19.2",
|
|
72
|
+
"atlarix-linux-arm64": "15.19.2",
|
|
73
|
+
"atlarix-linux-x64-musl": "15.19.2",
|
|
74
|
+
"atlarix-linux-arm64-musl": "15.19.2",
|
|
75
|
+
"atlarix-windows-x64": "15.19.2"
|
|
76
76
|
}
|
|
77
77
|
}
|