orkestrator 2.37.5-beta → 2.37.6-beta
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/artifact-runtime/preview-worker.js +70 -0
- package/dist/artifact-runtime/worker-context/preview-worker.mjs +70 -0
- package/dist/client.js +22 -5
- package/dist/main.js +3759 -2254
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +21 -4
- package/resources/claude-bridge/dist/index.js +1475 -1320
- package/resources/codex-bridge/dist/index.js +24 -5
- package/resources/cursor-bridge/dist/index.js +21 -4
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +26 -5
- package/resources/pi-bridge/runtime/install.json +1 -1
|
@@ -576,6 +576,19 @@ function installDesignRuntime(matchesShortcut, shortcuts, claimsShortcut, focuse
|
|
|
576
576
|
}, "*");
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
|
+
let lastFocused = null;
|
|
580
|
+
document.addEventListener("focusin", (event) => {
|
|
581
|
+
if (event.target instanceof Element && event.target !== document.body)
|
|
582
|
+
lastFocused = event.target;
|
|
583
|
+
}, true);
|
|
584
|
+
window.addEventListener("focus", () => {
|
|
585
|
+
const active = document.activeElement;
|
|
586
|
+
if (active && active !== document.body && active !== document.documentElement)
|
|
587
|
+
return;
|
|
588
|
+
const target = lastFocused;
|
|
589
|
+
if (target?.isConnected && target instanceof HTMLElement)
|
|
590
|
+
target.focus({ preventScroll: true });
|
|
591
|
+
});
|
|
579
592
|
document.addEventListener("click", (event) => event.preventDefault(), true);
|
|
580
593
|
document.addEventListener("auxclick", (event) => event.preventDefault(), true);
|
|
581
594
|
document.addEventListener("submit", (event) => event.preventDefault(), true);
|
|
@@ -765,6 +778,57 @@ var FRAME_CHANNEL_POLICY = {
|
|
|
765
778
|
var ARTIFACT_FRAME_CHANNEL = "orkestrator-artifact";
|
|
766
779
|
var UNSAFE_LINK_CHARACTERS = new RegExp("[\\u0000-\\u001f\\u007f-\\u009f\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]");
|
|
767
780
|
|
|
781
|
+
// ../protocol/src/static-html-document-text.ts
|
|
782
|
+
function staticHtmlDocumentText(input) {
|
|
783
|
+
const INLINE_TEXT = /^(?:a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|font|i|ins|kbd|label|mark|q|rp|rt|ruby|s|samp|small|span|strike|strong|sub|sup|time|tspan|tt|u|var|wbr)$/;
|
|
784
|
+
const max = Math.max(0, Math.floor(input.maxCharacters));
|
|
785
|
+
const doc = new DOMParser().parseFromString(input.html, "text/html");
|
|
786
|
+
let text = "";
|
|
787
|
+
let space = false;
|
|
788
|
+
let boundary = false;
|
|
789
|
+
const emit = (character) => {
|
|
790
|
+
if (text.length < max)
|
|
791
|
+
text += character;
|
|
792
|
+
};
|
|
793
|
+
const visit = (node) => {
|
|
794
|
+
if (node.nodeType === 3) {
|
|
795
|
+
const value = node.nodeValue ?? "";
|
|
796
|
+
for (let offset = 0;offset < value.length; offset++) {
|
|
797
|
+
const character = value[offset];
|
|
798
|
+
if (/\s/.test(character)) {
|
|
799
|
+
space = true;
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
if (text.length > 0) {
|
|
803
|
+
if (boundary)
|
|
804
|
+
emit(`
|
|
805
|
+
`);
|
|
806
|
+
else if (space)
|
|
807
|
+
emit(" ");
|
|
808
|
+
}
|
|
809
|
+
boundary = false;
|
|
810
|
+
space = false;
|
|
811
|
+
emit(character);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
if (node.nodeType !== 1)
|
|
815
|
+
return;
|
|
816
|
+
const element = node;
|
|
817
|
+
if (/^(?:style|noscript)$/.test(element.localName) || element.hasAttribute("hidden"))
|
|
818
|
+
return;
|
|
819
|
+
const isBoundary = !INLINE_TEXT.test(element.localName);
|
|
820
|
+
if (isBoundary)
|
|
821
|
+
boundary = true;
|
|
822
|
+
for (const child of Array.from(element.childNodes))
|
|
823
|
+
visit(child);
|
|
824
|
+
if (isBoundary)
|
|
825
|
+
boundary = true;
|
|
826
|
+
};
|
|
827
|
+
if (doc.body)
|
|
828
|
+
visit(doc.body);
|
|
829
|
+
return text;
|
|
830
|
+
}
|
|
831
|
+
|
|
768
832
|
// ../../apps/backend/src/core/transcript-artifacts/dependency-manifest.ts
|
|
769
833
|
import { createHash } from "crypto";
|
|
770
834
|
import { existsSync } from "fs";
|
|
@@ -1640,6 +1704,12 @@ async function runStatic(browser, job, result, remaining) {
|
|
|
1640
1704
|
}));
|
|
1641
1705
|
result.sanitizer = outcome.report.removed;
|
|
1642
1706
|
result.elementCount = outcome.report.elementCount;
|
|
1707
|
+
try {
|
|
1708
|
+
result.searchText = await page.evaluate(staticHtmlDocumentText, {
|
|
1709
|
+
html: result.effectiveHtml,
|
|
1710
|
+
maxCharacters: STATIC_PRESENTATION_POLICY.maxSearchTextCharacters
|
|
1711
|
+
});
|
|
1712
|
+
} catch {}
|
|
1643
1713
|
result.ok = true;
|
|
1644
1714
|
}
|
|
1645
1715
|
async function runInteractive(browser, job, pkg, result, remaining, emit) {
|
|
@@ -575,6 +575,19 @@ function installDesignRuntime(matchesShortcut, shortcuts, claimsShortcut, focuse
|
|
|
575
575
|
}, "*");
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
|
+
let lastFocused = null;
|
|
579
|
+
document.addEventListener("focusin", (event) => {
|
|
580
|
+
if (event.target instanceof Element && event.target !== document.body)
|
|
581
|
+
lastFocused = event.target;
|
|
582
|
+
}, true);
|
|
583
|
+
window.addEventListener("focus", () => {
|
|
584
|
+
const active = document.activeElement;
|
|
585
|
+
if (active && active !== document.body && active !== document.documentElement)
|
|
586
|
+
return;
|
|
587
|
+
const target = lastFocused;
|
|
588
|
+
if (target?.isConnected && target instanceof HTMLElement)
|
|
589
|
+
target.focus({ preventScroll: true });
|
|
590
|
+
});
|
|
578
591
|
document.addEventListener("click", (event) => event.preventDefault(), true);
|
|
579
592
|
document.addEventListener("auxclick", (event) => event.preventDefault(), true);
|
|
580
593
|
document.addEventListener("submit", (event) => event.preventDefault(), true);
|
|
@@ -764,6 +777,57 @@ var FRAME_CHANNEL_POLICY = {
|
|
|
764
777
|
var ARTIFACT_FRAME_CHANNEL = "orkestrator-artifact";
|
|
765
778
|
var UNSAFE_LINK_CHARACTERS = new RegExp("[\\u0000-\\u001f\\u007f-\\u009f\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]");
|
|
766
779
|
|
|
780
|
+
// packages/protocol/src/static-html-document-text.ts
|
|
781
|
+
function staticHtmlDocumentText(input) {
|
|
782
|
+
const INLINE_TEXT = /^(?:a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|font|i|ins|kbd|label|mark|q|rp|rt|ruby|s|samp|small|span|strike|strong|sub|sup|time|tspan|tt|u|var|wbr)$/;
|
|
783
|
+
const max = Math.max(0, Math.floor(input.maxCharacters));
|
|
784
|
+
const doc = new DOMParser().parseFromString(input.html, "text/html");
|
|
785
|
+
let text = "";
|
|
786
|
+
let space = false;
|
|
787
|
+
let boundary = false;
|
|
788
|
+
const emit = (character) => {
|
|
789
|
+
if (text.length < max)
|
|
790
|
+
text += character;
|
|
791
|
+
};
|
|
792
|
+
const visit = (node) => {
|
|
793
|
+
if (node.nodeType === 3) {
|
|
794
|
+
const value = node.nodeValue ?? "";
|
|
795
|
+
for (let offset = 0;offset < value.length; offset++) {
|
|
796
|
+
const character = value[offset];
|
|
797
|
+
if (/\s/.test(character)) {
|
|
798
|
+
space = true;
|
|
799
|
+
continue;
|
|
800
|
+
}
|
|
801
|
+
if (text.length > 0) {
|
|
802
|
+
if (boundary)
|
|
803
|
+
emit(`
|
|
804
|
+
`);
|
|
805
|
+
else if (space)
|
|
806
|
+
emit(" ");
|
|
807
|
+
}
|
|
808
|
+
boundary = false;
|
|
809
|
+
space = false;
|
|
810
|
+
emit(character);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
if (node.nodeType !== 1)
|
|
814
|
+
return;
|
|
815
|
+
const element = node;
|
|
816
|
+
if (/^(?:style|noscript)$/.test(element.localName) || element.hasAttribute("hidden"))
|
|
817
|
+
return;
|
|
818
|
+
const isBoundary = !INLINE_TEXT.test(element.localName);
|
|
819
|
+
if (isBoundary)
|
|
820
|
+
boundary = true;
|
|
821
|
+
for (const child of Array.from(element.childNodes))
|
|
822
|
+
visit(child);
|
|
823
|
+
if (isBoundary)
|
|
824
|
+
boundary = true;
|
|
825
|
+
};
|
|
826
|
+
if (doc.body)
|
|
827
|
+
visit(doc.body);
|
|
828
|
+
return text;
|
|
829
|
+
}
|
|
830
|
+
|
|
767
831
|
// apps/backend/src/core/transcript-artifacts/dependency-manifest.ts
|
|
768
832
|
import { createHash } from "node:crypto";
|
|
769
833
|
import { existsSync } from "node:fs";
|
|
@@ -1639,6 +1703,12 @@ async function runStatic(browser, job, result, remaining) {
|
|
|
1639
1703
|
}));
|
|
1640
1704
|
result.sanitizer = outcome.report.removed;
|
|
1641
1705
|
result.elementCount = outcome.report.elementCount;
|
|
1706
|
+
try {
|
|
1707
|
+
result.searchText = await page.evaluate(staticHtmlDocumentText, {
|
|
1708
|
+
html: result.effectiveHtml,
|
|
1709
|
+
maxCharacters: STATIC_PRESENTATION_POLICY.maxSearchTextCharacters
|
|
1710
|
+
});
|
|
1711
|
+
} catch {}
|
|
1642
1712
|
result.ok = true;
|
|
1643
1713
|
}
|
|
1644
1714
|
async function runInteractive(browser, job, pkg, result, remaining, emit) {
|
package/dist/client.js
CHANGED
|
@@ -277,6 +277,7 @@ var init_bridge = __esm(() => {
|
|
|
277
277
|
"question.answers-received": "A parked question received its answers.",
|
|
278
278
|
"question.stale": "An answer arrived for a question no longer pending; the route answered stale.",
|
|
279
279
|
"question.wait-failed": "A parked question ended without an answer: cancelled, timed out or closed.",
|
|
280
|
+
"read-only-connection.bedrock-withheld": "A read-only turn did not take the user settings' Bedrock connection: it names no bearer token or static key pair, so the CLI would resolve AWS profiles, whose credential_process runs outside the read-only boundary.",
|
|
280
281
|
"runtime.ended-under-resumed-turn": "The Claude runtime ended while a resumed root turn was still open.",
|
|
281
282
|
"server.listening": "The HTTP server is listening.",
|
|
282
283
|
"server.starting": "The HTTP server is about to bind.",
|
|
@@ -942,6 +943,7 @@ var init_native_agent = __esm(() => {
|
|
|
942
943
|
description: "The OpenCode 2.x provider: its event monitor, steering, routing, host and container servers.",
|
|
943
944
|
events: {
|
|
944
945
|
"events.dropped": "The 2.x event stream ended or failed, so reads go to the server until it reconnects. Error class only.",
|
|
946
|
+
"monitor.silent": "The 2.x event stream sent a heartbeat and then went quiet, so it is replaced. `silenceMs` only.",
|
|
945
947
|
"steer.unconfirmed": "A 2.x steer got no definite answer, so its delivery is reconciled from history. Error class only.",
|
|
946
948
|
"provider.dispose-failed": "Disposing the 2.x provider of a replaced server failed. Error class only.",
|
|
947
949
|
"transcript.unknown-row": "A 2.x history row of a kind the transcript does not know was dropped (a newer server). Its kind name only, once per kind.",
|
|
@@ -1015,7 +1017,7 @@ var init_runtime = __esm(() => {
|
|
|
1015
1017
|
description: "This process's event loop. A stall of 10 seconds or more is written at error, so no level hides it.",
|
|
1016
1018
|
events: {
|
|
1017
1019
|
stalled: {
|
|
1018
|
-
description: "A timer fired late, so every request in that window waited. In the backend the line also names what ran: `storageMs` and the `storage*` fields describe the slow SQLite calls in the window (`operation.slow` in `storage`), `commandsInFlight` and `commands` the commands running, `blockingCommand` one whose synchronous part overlapped it, and `jobsInWindow` and `jobs` the recurring jobs that ran around it. `cpuMs` is the CPU time the process used in the window: near `lagMs` its own thread was busy, far below it the thread waited.",
|
|
1020
|
+
description: "A timer fired late, so every request in that window waited. In the backend the line also names what ran: `storageMs` and the `storage*` fields describe the slow SQLite calls in the window (`operation.slow` in `storage`), `storageCalls` and `storageCallMs` every SQLite call that ended in it, slow or not (`storageMainCallMs` and `storageLedgerCallMs` per database), `commandsInFlight` and `commands` the commands running, `blockingCommand` one whose synchronous part overlapped it, and `jobsInWindow` and `jobs` the recurring jobs that ran around it. `cpuMs` is the CPU time the process used in the window: near `lagMs` its own thread was busy, far below it the thread waited.",
|
|
1019
1021
|
essential: true,
|
|
1020
1022
|
minLevel: "error",
|
|
1021
1023
|
fields: {
|
|
@@ -1028,6 +1030,10 @@ var init_runtime = __esm(() => {
|
|
|
1028
1030
|
storageTable: "label",
|
|
1029
1031
|
storageLongestMs: "number",
|
|
1030
1032
|
storageBusy: "boolean",
|
|
1033
|
+
storageCalls: "number",
|
|
1034
|
+
storageCallMs: "number",
|
|
1035
|
+
storageMainCallMs: "number",
|
|
1036
|
+
storageLedgerCallMs: "number",
|
|
1031
1037
|
commandsInFlight: "number",
|
|
1032
1038
|
blockingCommandMs: "number",
|
|
1033
1039
|
jobsInWindow: "number"
|
|
@@ -1352,7 +1358,6 @@ var init_storage = __esm(() => {
|
|
|
1352
1358
|
"native-session-owners.backfill-failed": "Native-session rows could not be given their environment as owner at open; an environment delete then parses those rows instead, and the next open retries.",
|
|
1353
1359
|
"lease.timed-out": "A waiter gave up on a lease; `lease` and `family` name it, `holderAgeMs` is the time since its holder's last heartbeat (null when the holder had just gone), `waitedMs` how long the waiter waited.",
|
|
1354
1360
|
"lease.heartbeat-failed": "A held lease's heartbeat failed, which shortens the lease; the next one retries.",
|
|
1355
|
-
"scrub.vacuum-failed": "Deleted-content page reclamation failed; the checkpoint is attempted independently.",
|
|
1356
1361
|
"scrub.checkpoint-failed": "Deleted content could not be scrubbed from the WAL yet because the truncating checkpoint failed or a reader held an older snapshot; it is retried without waiting until it succeeds.",
|
|
1357
1362
|
"upkeep.vacuum-failed": "Periodic page reclamation failed; the next upkeep pass retries.",
|
|
1358
1363
|
"upkeep.finished": "One periodic upkeep pass ended: `optimizeMs` is how long refreshing planner statistics held the event loop, `released` and `left` the free pages returned and still free, `releaseMs` the release child's run and `stop` why it ended (`done`, `budget`, `busy`, `no-progress`, `slow-step`, `not-incremental`, `no-free-pages`, `failed`).",
|
|
@@ -1560,7 +1565,17 @@ var init_review = __esm(() => {
|
|
|
1560
1565
|
"fix-outcome.read-failed": "Reading an interactive fix's outcome failed; it stays pending.",
|
|
1561
1566
|
"fix-usage.read-failed": "Reading an Address Findings session's token usage failed.",
|
|
1562
1567
|
"result.consume-deferred": "Consuming a workflow result failed; it stays staged and is retried.",
|
|
1563
|
-
"failure-triage.failed": "Classifying a review package's failing tests failed; the package is sealed without the triage and says so."
|
|
1568
|
+
"failure-triage.failed": "Classifying a review package's failing tests failed; the package is sealed without the triage and says so.",
|
|
1569
|
+
"consolidation.budget-exceeded": {
|
|
1570
|
+
description: "A panel's reports did not fit one consolidation turn even after optional prose was removed, so consolidation failed before dispatch. Counts only.",
|
|
1571
|
+
essential: true,
|
|
1572
|
+
fields: {
|
|
1573
|
+
reviewers: "number",
|
|
1574
|
+
sourceFindings: "number",
|
|
1575
|
+
compactBytes: "number",
|
|
1576
|
+
maxBytes: "number"
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1564
1579
|
}
|
|
1565
1580
|
},
|
|
1566
1581
|
"pull-request": {
|
|
@@ -1668,6 +1683,7 @@ var init_docker = __esm(() => {
|
|
|
1668
1683
|
"opencode.listener-replaced": "The process on a container's OpenCode port (`provider`: `opencode` or `opencode2`) is not the server the backend launched and recorded, so its password was withheld and the next start replaces it. `stage` is `request` when the re-check after a refused connection or an unexpected answer found it; that connection then sends nothing more.",
|
|
1669
1684
|
"opencode.project-config-too-large": "A checkout's opencode.json or opencode.jsonc was larger than the limit, so a launched OpenCode server does not read it. File name only.",
|
|
1670
1685
|
"opencode.project-config-filtered": "Values were left out of a checkout's OpenCode configuration before a launched server reads it: counts of plugin keys, `{env:}` and `{file:}` references and dropped instructions (including separate instructionGlob and instructionUrl counts), and the names of files that were not a JSONC object. Never values.",
|
|
1686
|
+
"daemon.rootless-live-restore": "The Docker daemon is rootless and has live-restore on, which a rootless restart cannot honour: the new daemon reports every container exited while the old containers' processes keep running with no network, so turn live-restore off in its daemon.json. Written once per backend.",
|
|
1671
1687
|
"log-driver.unbounded": "The Docker daemon offers neither the local nor the json-file log driver, so new containers keep its default driver, whose log may be uncapped. Written once per backend.",
|
|
1672
1688
|
"lifecycle-event.reconcile-failed": "Reconciling an environment after a container start or stop event failed; the next status read retries.",
|
|
1673
1689
|
"login-keeper.pass-failed": "A Claude login keeper pass failed; the next interval retries.",
|
|
@@ -1681,7 +1697,8 @@ var init_docker = __esm(() => {
|
|
|
1681
1697
|
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
1682
1698
|
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
1683
1699
|
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
1684
|
-
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried
|
|
1700
|
+
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried (up to three times): with fresh ports, or, when `backendChosen`, on the same backend-chosen port after a pause.",
|
|
1701
|
+
"host-ports.owned-list-failed": "Docker could not list the host ports the backend chose for this owner's other containers, so a new rootless container's ports were chosen avoiding only this process's recent choices.",
|
|
1685
1702
|
"writer-lease.lost": {
|
|
1686
1703
|
description: "This backend lost the registry writer lease, for the fixed `reason` given. Schedules stop and container changes are refused until it restarts.",
|
|
1687
1704
|
essential: true,
|
|
@@ -13245,7 +13262,7 @@ import path5 from "path";
|
|
|
13245
13262
|
// ../../apps/backend/package.json
|
|
13246
13263
|
var package_default = {
|
|
13247
13264
|
name: "@orkestrator/backend",
|
|
13248
|
-
version: "2.37.
|
|
13265
|
+
version: "2.37.6-beta",
|
|
13249
13266
|
private: true,
|
|
13250
13267
|
type: "module",
|
|
13251
13268
|
exports: {
|