Skip to content

Commit 6b2760f

Browse files
authored
feat(computer-use): add shared desktops and bounded UI programs (#6091)
* feat(workbot): browse connected Drive documents behind a feature flag Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): edit connected documents in tabs and browse recent files Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): integrate full Word and Excel editors in Documents Signed-off-by: Jalil <reachjalil@gmail.com> * feat(desktop): gate computer control and floating browser in admin Restore native Mac computer sessions and optional browser presentation through the shared feature registry. Keep browser approvals independent, require explicit window approval, and cancel requests across rollout changes. Refresh feature contracts and adapt proofs to current session and platform boundaries. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(desktop): enable direct computer access and refresh browser previews Signed-off-by: Jalil <reachjalil@gmail.com> * refactor(computer-use): make the rollout the application opt-in Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): keep floating page previews painting Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): release sessions when a turn finishes Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): withhold raw editable Accessibility values Signed-off-by: Jalil <reachjalil@gmail.com> * fix(desktop): rebuild the computer helper when sources change Signed-off-by: Jalil <reachjalil@gmail.com> * feat(computer-use): gate remote adapters and contain window input Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): dispatch VM input and interrupt stale batches Signed-off-by: Jalil <reachjalil@gmail.com> * test(computer-use): cover rollout authority and invalid VM setup Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): register VM tools on Linux and Windows Signed-off-by: Jalil <reachjalil@gmail.com> * fix(documents): use open-source editors and consolidate headers Signed-off-by: Jalil <reachjalil@gmail.com> * fix(documents): refine focus and add editable tab controls Signed-off-by: Jalil <reachjalil@gmail.com> * feat(documents): add presentation editing and OpenWork controls Signed-off-by: Jalil <reachjalil@gmail.com> * feat(computer): share a managed Daytona desktop with browser tools Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): open the shared desktop through noVNC Signed-off-by: Jalil <reachjalil@gmail.com> * fix(workbot): preserve desktop state and verify remote control Signed-off-by: Jalil <reachjalil@gmail.com> * fix(workbot): recheck access after waking the computer Signed-off-by: Jalil <reachjalil@gmail.com> * docs(computer): build the Daytona images for AMD64 Signed-off-by: Jalil <reachjalil@gmail.com> * fix(documents): align editor API with contract conventions Signed-off-by: Jalil <reachjalil@gmail.com> * fix(workbot): bound viewer requests with supported abort APIs Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): equip the desktop with creative and productivity apps Signed-off-by: Jalil <reachjalil@gmail.com> * test(den): sync upstream MCP session attribution Signed-off-by: Jalil <reachjalil@gmail.com> * feat(computer): preserve microVM state and bound idle costs Signed-off-by: Jalil <reachjalil@gmail.com> * chore(helm): expose the microVM auto-pause interval Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): verify form values and control states Signed-off-by: Jalil <reachjalil@gmail.com> * feat(computer-use): run UI shortcuts and conditional programs Signed-off-by: Jalil <reachjalil@gmail.com> * fix(desktop): stage only the computer program runtime Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): integrate programs with the shared cloud runtime Signed-off-by: Jalil <reachjalil@gmail.com> * fix(desktop): include compiled UI programs in staged modules Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): compose program shortcuts with verified form controls Signed-off-by: Jalil <reachjalil@gmail.com> * ci(computer): publish the AMD64 desktop image on demand Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): reveal controls clipped by a scroll container Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): retain partial and uncertain program receipts Signed-off-by: Jalil <reachjalil@gmail.com> * feat(preview): run Workbot with a managed cloud desktop Signed-off-by: Jalil <reachjalil@gmail.com> * fix(preview): build the desktop bridge before runner startup Signed-off-by: Jalil <reachjalil@gmail.com> * fix(world): accept the published Workbot desktop snapshot option Signed-off-by: Jalil <reachjalil@gmail.com> * fix(preview): load the compiled Daytona client in native worlds Signed-off-by: Jalil <reachjalil@gmail.com> * fix(server): load the embedded input worker on demand Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): bind semantic refs to the selected window Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): restore desktop helpers before microVM startup Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): preserve control validation across isolated worlds Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): restore shared folder ACLs after VM import Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): connect computer programs and stop to the cloud desktop Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): reconcile merged browser and guest runtime contracts Signed-off-by: Jalil <reachjalil@gmail.com> * fix(daytona): normalize snapshot URLs in linear time Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): rearm native control when the person returns access Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): keep browser streams visible behind desktop apps Signed-off-by: Jalil <reachjalil@gmail.com> * test(workbot): wait for rollout refresh before checking revocation Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): withhold payment-card fields from page observations Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): stop typing when another window takes focus Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): serve embedded mode only to the signed OpenWork host Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): keep the cloud desktop off private networks Signed-off-by: Jalil <reachjalil@gmail.com> * fix(world): give the Workbot preview runner a scoped Daytona key Signed-off-by: Jalil <reachjalil@gmail.com> * fix(app): read computer flags through the shared organization feature hook Signed-off-by: Jalil <reachjalil@gmail.com> * fix(den): keep VM workers awake while an Office editor is open Signed-off-by: Jalil <reachjalil@gmail.com> * fix(workbot): load the computer viewer in the development server noVNC uses top-level await, so pre-bundling it for the default ES2020 target failed and the Workbot page never loaded under Vite. Pre-bundle for ES2022, the same target as the production build. Signed-off-by: Jalil <reachjalil@gmail.com> * feat(workbot): offer the computer from the reply that used it With guided navigation on, the newest reply that used Workbot's computer shows one quiet Open Computer action, like a mentioned document. It opens the Computer view and keeps the same conversation open beside it, and it is hidden while the computer is already on screen. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): click only when the approved window is under the pointer Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): send accessibility values only for controls that show them Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): keep the cloud browser on public sites Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): stop a program that waits across a feature toggle Signed-off-by: Jalil <reachjalil@gmail.com> * fix(world): run the desktop preview only on reviewed commits Signed-off-by: Jalil <reachjalil@gmail.com> * chore(daytona): name the wait argument when deleting a sandbox Signed-off-by: Jalil <reachjalil@gmail.com> * test(workbot): give the computer journey a verified Workbot model Since Workbot checks the organization's model against a verified runner catalog, the local journey's message was refused and the page opened on the first-run welcome. The scripted upstream now lists its model, the world selects it, and a refused seed message fails the world loudly. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): refuse embedded mode in helpers without a team signature A helper with no team identifier cannot authenticate its parent, so it now fails closed. Only the local ad-hoc build made by the desktop's prepare script compiles in an exception, and macOS attributes that build's access to the app that launched it. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): keep page-filled form values out of observations Observations report whether ordinary inputs, textareas, selects and editable regions are filled, not their values, so autofilled or typed personal data stays in the page. The agent still reads back what it entered itself, including the page's formatting of it. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): type the withheld-value fields in observations Signed-off-by: Jalil <reachjalil@gmail.com> * test(desktop): give the first chat in feature worlds time to settle On CI the desktop sometimes reports "create task" ready while its workspace is still settling, and creation returns no chat. The feature worlds now retry that first chat a few times and, if it never works, fail with what the desktop showed. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): check every page load and redirect in the cloud browser A public page could redirect Chromium to a private or metadata address after the requested URL passed the check. Document requests, redirect hops included, now pass the same public-destination check before they load; the VM firewall remains the second layer. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): withhold a field's diagnostics while its value is withheld A page can echo a typed or autofilled value into validation or description text, so those are omitted until the agent entered the value itself. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): make the unsigned helper host a developer opt-in A helper without a team signature now refuses embedded mode by default. A developer can rebuild it for their own machine with OPENWORK_COMPUTER_USE_UNSIGNED_DEV_HOST=1; signed helpers are unchanged. Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): isolate desktop privileges and recover browser access Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): match desktop images by reproducible source identity Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): isolate native apps from browser storage and networks Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): preserve shared browser downloads with app isolation Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): refresh refused targets after browser layout changes Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): enforce window approval and isolate control channels Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): typecheck explicit window decisions Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): scope automatic approval to conversation computers Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): isolate viewer streams and complete privacy checks Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): narrow privacy scans to HTML controls Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): withhold images of protected payment fields Signed-off-by: Jalil <reachjalil@gmail.com> * refactor(browser): share protected-field detection Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): preserve public control labels during redaction Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): retain private control identity checks Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): preserve labels containing short option ids Signed-off-by: Jalil <reachjalil@gmail.com> * fix(evals): retry interrupted pinned engine downloads Signed-off-by: Jalil <reachjalil@gmail.com> * fix(browser): bind form actions to observed values Signed-off-by: Jalil <reachjalil@gmail.com> * test(browser): require unmatched fill values to stay private Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): require authenticated embedded helper hosts Signed-off-by: Jalil <reachjalil@gmail.com> * docs(computer-use): align tool guidance with window approval Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): confine requests and observations to approved targets Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): revoke stale viewers and verify private destinations and child lists Signed-off-by: Jalil <reachjalil@gmail.com> * test(computer): use member gateway access in the Workbot journey Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): protect root startup state and preserve Stop across targets Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): continue enabled access without approval prompts Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): validate target types and signed-helper packaging Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer): keep human handoff controls visible after cleanup Signed-off-by: Jalil <reachjalil@gmail.com> * fix(computer-use): preserve takeover across program surfaces Signed-off-by: Jalil <reachjalil@gmail.com> * fix(app): prebundle the compiler runtime before desktop startup Signed-off-by: Jalil <reachjalil@gmail.com> --------- Signed-off-by: Jalil <reachjalil@gmail.com>
1 parent 10c6edc commit 6b2760f

213 files changed

Lines changed: 18110 additions & 298 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import assert from "node:assert/strict";
2+
import { readFileSync } from "node:fs";
3+
import { test } from "node:test";
4+
5+
const workflow = readFileSync(new URL("../workflows/pr-proof.yml", import.meta.url), "utf8");
6+
const step = workflow.split(" - name: Select proof records from this workflow run\n")[1]?.split("\n - name:")[0];
7+
const script = step?.split(" script: |\n")[1]?.split("\n").map(line => line.slice(12)).join("\n");
8+
assert.ok(script, "The evidence artifact selector must be present in the workflow");
9+
const execute = new (Object.getPrototypeOf(async function () {}).constructor)("github", "context", "core", "process", script);
10+
const key = "a".repeat(64);
11+
const name = attempt => `pr-proof-${attempt}-${key}`;
12+
async function select(artifacts, attempt = 2, suppliedKey = key) {
13+
const outputs = {};
14+
await execute({ rest: { actions: { listWorkflowRunArtifacts() {} } }, paginate: async (_method, input) => {
15+
assert.deepEqual(input, { owner: "example", repo: "repo", run_id: 42, per_page: 100 });
16+
return artifacts;
17+
} }, { repo: { owner: "example", repo: "repo" }, runId: 42 }, { setOutput: (key, value) => { outputs[key] = value; } },
18+
{ env: { PROOF_KEY: suppliedKey, GITHUB_RUN_ATTEMPT: String(attempt) } });
19+
return outputs.name;
20+
}
21+
22+
test("failed-only retries can judge passing evidence retained from an earlier attempt", async () => {
23+
assert.equal(await select([{ name: name(1), expired: false }, { name: `pr-proof-2-${"b".repeat(64)}`, expired: false }]), name(1));
24+
assert.equal(await select([{ name: name(1) }, { name: name(2) }]), name(2));
25+
});
26+
27+
test("missing, duplicate, expired, future and invalid proof identities fail closed", async () => {
28+
for (const artifacts of [[], [{ name: name(2) }, { name: name(2) }], [{ name: name(1) }, { name: name(2), expired: true }], [{ name: name(3) }]]) {
29+
await assert.rejects(select(artifacts));
30+
}
31+
await assert.rejects(select([{ name: name(1) }], 2, "../other"));
32+
await assert.rejects(select([{ name: name(1) }], 0));
33+
});

‎.github/workflows/alpha-macos-aarch64.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
- apps/server/**
2121
- packages/docs/**
2222
- packages/enterprise-mcp-client/**
23+
- packages/computer-use/**
2324
- packages/install-config/**
2425
- packages/paths/**
2526
- packages/types/**

‎.github/workflows/ci-tests.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
pnpm --filter @openwork-ee/headless-computer build
9494
pnpm --filter @openwork-ee/headless-computer test
9595
pnpm --filter @openwork-ee/headless-runner test:computer-config
96+
pnpm --filter @openwork-ee/workbot exec tsx --conditions=development --test scripts/computer.test.ts
9697
- name: Test headless conversations (follow-ups, read-only lookups, waiting messages, bounded reads, moving to Node)
9798
run: |
9899
pnpm --filter @openwork-ee/headless-runner test:conversation
@@ -119,7 +120,18 @@ jobs:
119120
- name: Test fork authorization and free screening policy
120121
run: node --test .github/scripts/contributor-pr.test.mjs .github/scripts/contributor-screen.test.mjs .github/scripts/warden-check.test.mjs .github/scripts/warden-report.test.mjs .github/scripts/warden-fast.test.mjs .github/scripts/setup-browser.test.mjs
121122
- name: Test on-demand PR proof review builds
122-
run: node --test .github/scripts/pr-proof-review-build.test.mjs
123+
run: node --test .github/scripts/pr-proof-review-build.test.mjs .github/scripts/pr-proof-artifacts.test.mjs evals/scripts/engine-parity-binaries.test.mjs evals/scripts/run-parity-proof.test.mjs
124+
- name: Test desktop and cloud computer access and interruption
125+
run: |
126+
pnpm --filter @openwork/computer-use build
127+
node --test ee/packages/headless-computer/src/viewer-tickets.test.mjs
128+
node --test apps/desktop/electron/computer-control.test.mjs apps/desktop/electron/computer-remote.test.mjs packages/computer-use/cloud.test.mjs packages/computer-use/browser-task-privacy.test.mjs packages/computer-use/chromium.test.mjs apps/desktop/electron/computer-program.test.mjs
129+
python3 ee/packages/headless-computer/scripts/desktop-bridge.test.py
130+
python3 ee/packages/headless-computer/scripts/configure-desktop-files.test.py
131+
python3 ee/packages/headless-computer/scripts/cloud-desktop.test.py
132+
python3 ee/packages/headless-computer/scripts/vnc-stdio.test.py
133+
python3 packages/computer-use/computer-x11-worker.test.py
134+
pnpm --dir evals exec vitest run --config vitest.config.ts --project pr ../apps/server/test/computer-use-tools.vitest.test.ts ../apps/server/test/cloud-computer-lifecycle.vitest.test.ts
123135
- name: Test default-setup CodeQL coverage accounting
124136
run: node --test scripts/ci/check-codeql-results.test.mjs
125137
- name: Test packaged smoke engine diagnosis and kept logs

‎.github/workflows/daytona-eval-image.yml‎

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ on:
1313
- pnpm-lock.yaml
1414
- package.json
1515
workflow_dispatch:
16+
inputs:
17+
target:
18+
description: Image to publish (desktop uses an immutable tag; eval-vnc keeps its existing tags)
19+
type: choice
20+
default: eval-vnc
21+
options:
22+
- eval-vnc
23+
- computer-desktop
1624

1725
permissions:
1826
contents: read
@@ -46,22 +54,51 @@ jobs:
4654
- name: Normalize image name
4755
id: image
4856
shell: bash
57+
env:
58+
TARGET: ${{ inputs.target || 'eval-vnc' }}
4959
run: |
5060
set -euo pipefail
5161
image="${IMAGE_NAME,,}"
5262
echo "name=$image" >> "$GITHUB_OUTPUT"
63+
case "$TARGET" in
64+
computer-desktop)
65+
echo "context=." >> "$GITHUB_OUTPUT"
66+
echo "file=ee/packages/headless-computer/Dockerfile.desktop" >> "$GITHUB_OUTPUT"
67+
echo "platforms=linux/amd64" >> "$GITHUB_OUTPUT"
68+
echo "tags=$image:computer-desktop-${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
69+
# Official Node 24 Bookworm AMD64 manifest; pin the build input.
70+
echo "build_args=OPENWORK_COMPUTER_BASE_IMAGE=node:24-bookworm-slim@sha256:ec857ea6bb60cb3d0fa4d97495590c5fe7d51be8572c307b55957eeb06569cf7" >> "$GITHUB_OUTPUT"
71+
;;
72+
eval-vnc)
73+
echo "context=.devcontainer" >> "$GITHUB_OUTPUT"
74+
echo "file=.devcontainer/Dockerfile.daytona-vnc" >> "$GITHUB_OUTPUT"
75+
echo "platforms=linux/amd64,linux/arm64" >> "$GITHUB_OUTPUT"
76+
echo "tags<<TAGS" >> "$GITHUB_OUTPUT"
77+
echo "$image:dev" >> "$GITHUB_OUTPUT"
78+
echo "$image:${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
79+
echo "TAGS" >> "$GITHUB_OUTPUT"
80+
;;
81+
*) echo "Unsupported image target" >&2; exit 1 ;;
82+
esac
5383
5484
- name: Build and push
85+
id: build
5586
uses: docker/build-push-action@v6
5687
with:
57-
context: .devcontainer
58-
file: .devcontainer/Dockerfile.daytona-vnc
88+
context: ${{ steps.image.outputs.context }}
89+
file: ${{ steps.image.outputs.file }}
5990
# Daytona's `us` target pulls linux/amd64; keep arm64 for existing ARM runners.
60-
platforms: linux/amd64,linux/arm64
91+
platforms: ${{ steps.image.outputs.platforms }}
92+
build-args: ${{ steps.image.outputs.build_args }}
6193
push: true
62-
tags: |
63-
${{ steps.image.outputs.name }}:dev
64-
${{ steps.image.outputs.name }}:${{ github.sha }}
94+
tags: ${{ steps.image.outputs.tags }}
6595
labels: |
6696
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
6797
org.opencontainers.image.revision=${{ github.sha }}
98+
99+
- name: Record immutable image
100+
env:
101+
IMAGE: ${{ steps.image.outputs.name }}
102+
DIGEST: ${{ steps.build.outputs.digest }}
103+
run: |
104+
printf 'Published image: %s@%s\n' "$IMAGE" "$DIGEST" >> "$GITHUB_STEP_SUMMARY"

‎.github/workflows/pr-proof.yml‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ jobs:
201201
github.actor != 'dependabot[bot]' &&
202202
github.triggering_actor != 'dependabot[bot]'
203203
runs-on: ubuntu-latest
204+
permissions:
205+
contents: read
206+
actions: read
204207
timeout-minutes: 15
205208
strategy:
206209
fail-fast: false
@@ -217,10 +220,33 @@ jobs:
217220
- uses: pnpm/action-setup@v4
218221
- name: Install trusted judge dependencies
219222
run: pnpm --dir evals --filter @openwork/test-evidence... install --frozen-lockfile --ignore-scripts
223+
- name: Select proof records from this workflow run
224+
id: records
225+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
226+
env:
227+
PROOF_KEY: ${{ matrix.key }}
228+
with:
229+
script: |
230+
const key = process.env.PROOF_KEY;
231+
const attempt = Number(process.env.GITHUB_RUN_ATTEMPT);
232+
if (!/^[a-f0-9]{64}$/.test(key ?? '') || !Number.isSafeInteger(attempt) || attempt < 1) throw new Error('Invalid proof identity');
233+
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { ...context.repo, run_id: context.runId, per_page: 100 });
234+
const matches = artifacts.flatMap(artifact => {
235+
const match = /^pr-proof-([1-9]\d{0,3})-([a-f0-9]{64})$/.exec(artifact.name);
236+
if (!match || match[2] !== key) return [];
237+
const from = Number(match[1]);
238+
if (from > attempt) throw new Error('Unexpected future proof artifact');
239+
return [{ artifact, from }];
240+
});
241+
const latest = Math.max(...matches.map(item => item.from));
242+
const newest = matches.filter(item => item.from === latest);
243+
if (newest.length !== 1 || newest[0].artifact.expired) throw new Error('Required proof artifact is missing, duplicated or expired');
244+
// Every attempt of this workflow run tests the same immutable head.
245+
core.setOutput('name', newest[0].artifact.name);
220246
- name: Restore the proof records
221247
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
222248
with:
223-
name: pr-proof-${{ github.run_attempt }}-${{ matrix.key }}
249+
name: ${{ steps.records.outputs.name }}
224250
path: evals/results
225251
- name: Judge deferred vision claims
226252
env:

‎apps/app/src/app/lib/desktop.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,20 @@ import type {
5353
BrowserStatePayload,
5454
OpenBrowserUrlResult,
5555
} from "@openwork/browser-tabs";
56+
import type { ComputerRequest } from "@openwork/types/desktop-ipc";
5657
export type { BrowserStatePayload } from "@openwork/browser-tabs";
5758

59+
export type BrowserPresentationMode = "hidden" | "floating" | "side" | "fullscreen";
60+
61+
export type BrowserThumbnail = {
62+
tabId: string;
63+
url: string;
64+
dataUrl: string;
65+
width: number;
66+
height: number;
67+
capturedAt: number;
68+
};
69+
5870
export type BrowserProxyState = {
5971
proxy: { rules: string; authenticated: boolean } | null;
6072
};
@@ -87,6 +99,9 @@ declare global {
8799
command: C,
88100
...args: DesktopCommandArgs<C>
89101
) => Promise<DesktopCommandResult<C>>;
102+
computer?: {
103+
onRequest?: (callback: (payload: { sessionId: string; request: ComputerRequest | null }) => void) => () => void;
104+
};
90105
automationRunner?: {
91106
onCredentialRejected?: (callback: () => void) => () => void;
92107
};
@@ -184,6 +199,10 @@ declare global {
184199
options?: { sessionId?: string | null },
185200
) => Promise<OpenBrowserUrlResult>;
186201
setVisibleSession?: (sessionId: string | null) => Promise<string | null>;
202+
/** Tells the host how the visible conversation shows its browser, so Escape inside a full-screen page can leave full screen. */
203+
setPresentation?: (sessionId: string | null, mode: BrowserPresentationMode) => Promise<boolean>;
204+
/** A small JPEG preview of the visible conversation's on-screen tab, or null when none may be captured. */
205+
thumbnail?: (tabId: string) => Promise<BrowserThumbnail | null>;
187206
navigate?: (url: string) => Promise<void>;
188207
back?: () => Promise<void>;
189208
forward?: () => Promise<void>;
@@ -213,6 +232,8 @@ declare global {
213232
onStateChange?: (callback: (state: BrowserStatePayload) => void) => () => void;
214233
onPanelOpened?: (callback: (payload?: BrowserPanelOwnerPayload) => void) => () => void;
215234
onPanelClosed?: (callback: (payload?: BrowserPanelOwnerPayload) => void) => () => void;
235+
/** Escape was pressed inside the page of a conversation shown full screen. */
236+
onPresentationExit?: (callback: (payload: { sessionId: string | null; tabId: string }) => void) => () => void;
216237
};
217238
terminal?: {
218239
create?: (options: { cwd: string; cols: number; rows: number }) => Promise<{ terminalId: string }>;

‎apps/app/src/app/lib/openwork-server.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,9 @@ export function createOpenworkServerClient(options: { baseUrl: string; token?: s
16731673

16741674
return {
16751675
baseUrl,
1676+
cloudComputerStatus: () => requestJson<{ ready: boolean; paused: boolean; busy: boolean; sessionId: string | null }>(baseUrl, "/cloud-computer/status", { token, timeoutMs: 15_000 }),
1677+
cloudComputerFrame: () => requestJson<{ dataUrl: string; width: number; height: number; screenWidth: number; screenHeight: number; generation: number }>(baseUrl, "/cloud-computer/frame", { token, timeoutMs: 15_000 }),
1678+
cloudComputerInteract: (body: Record<string, unknown>) => requestJson<unknown>(baseUrl, "/cloud-computer/interact", { token, method: "POST", body, timeoutMs: 15_000 }),
16761679
desktopFreePreferences: async () => desktopFreePreferencesSchema.parse(await requestJson<unknown>(baseUrl, "/anonymous-inference/preferences", { hostToken, timeoutMs: timeouts.config })),
16771680
setDesktopFreeEnabled: async (enabled: boolean) => desktopFreePreferencesSchema.parse(await requestJson<unknown>(baseUrl, "/anonymous-inference/preferences", { hostToken, method: "PUT", body: { enabled }, timeoutMs: timeouts.cloudMcpReconcile })),
16781681
desktopFreeStatus: async () => desktopFreeAccessStatusSchema.parse(await requestJson<unknown>(baseUrl, "/anonymous-inference/status", { token, timeoutMs: 15_000 })),

0 commit comments

Comments
 (0)