Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
ffc8923
Export 2d7b2ce1
RhysSullivan Nov 14, 2026
877921a
Export 0e7eb70c
RhysSullivan Nov 14, 2026
da3f658
Export 5b874a87
RhysSullivan Nov 14, 2026
482bd3a
Export 171539e3
RhysSullivan Nov 14, 2026
dafa1a2
Export 4b292407
RhysSullivan Nov 14, 2026
d1d95bb
Export 093989c0
RhysSullivan Nov 14, 2026
ae96a96
Export 5c173557
RhysSullivan Nov 14, 2026
22597d3
Export 455039c3
RhysSullivan Nov 14, 2026
452f806
Export 3e5177ee
RhysSullivan Nov 15, 2026
bc289ac
Export 89cc1cbe
RhysSullivan Nov 15, 2026
c7657a7
Export ef23d6af
RhysSullivan Nov 15, 2026
89cb789
Export 73fa6963
RhysSullivan Nov 15, 2026
6817f9d
Export ae75d6b6
RhysSullivan Nov 15, 2026
575a9e3
Export 94d61872
RhysSullivan Nov 15, 2026
3ae37a2
Export a8a37256
RhysSullivan Nov 15, 2026
0a0dbab
Export a80ea791
RhysSullivan Nov 15, 2026
145e379
Export 0b57e100
RhysSullivan Nov 15, 2026
f92acac
Export f94e2921
RhysSullivan Nov 15, 2026
072a3cb
Export ffaac561
RhysSullivan Nov 15, 2026
73489a4
Export d6e231c5
RhysSullivan Nov 15, 2026
3481d33
Export d4eca46e
RhysSullivan Nov 15, 2026
7d45b39
Export f584be20
RhysSullivan Nov 15, 2026
b17a89b
Export 446971b2
RhysSullivan Nov 15, 2026
c380e6d
Export 8cb664c6
RhysSullivan Nov 16, 2026
dd65fc9
Export 83adadd5
RhysSullivan Nov 16, 2026
07d9fab
Export 76f294ca
RhysSullivan Nov 16, 2026
a974619
Export c1f1ec46
RhysSullivan Nov 16, 2026
efe8eb3
Export 89daa5d8
RhysSullivan Nov 16, 2026
aeb114d
Export 2e85b8bb
RhysSullivan Nov 16, 2026
d5734be
Export b521fe52
RhysSullivan Nov 16, 2026
48ef780
Export d9564b5e
RhysSullivan Nov 16, 2026
40362a3
Export 53aa10c6
RhysSullivan Nov 16, 2026
e557a21
Export a2ed1c83
RhysSullivan Nov 16, 2026
1d5cd9f
Send application/hujson bodies as text, not JSON
saadbahir Nov 16, 2026
a566b90
Export 046fbcbf
RhysSullivan Nov 16, 2026
e56c054
Export 42021439
RhysSullivan Nov 16, 2026
af7d834
Export 9f863051
RhysSullivan Nov 16, 2026
9ca7bde
Export 21f43ba1
RhysSullivan Nov 16, 2026
59ad439
Export 3344897d
RhysSullivan Nov 16, 2026
e3f1c26
Export b8022866
RhysSullivan Nov 16, 2026
91ac7bc
Export ff5ff191
RhysSullivan Nov 16, 2026
3587067
Export 84200f90
RhysSullivan Nov 16, 2026
aa07b77
Export 9d08fe6a
RhysSullivan Nov 16, 2026
e9a908c
Export 21ebaaf3
RhysSullivan Nov 16, 2026
2e8c8b7
Export c024b3bf
RhysSullivan Nov 16, 2026
502b7c4
Export 5a1f8daf
RhysSullivan Nov 16, 2026
f66f9cf
Export 6defe685
RhysSullivan Nov 16, 2026
ece7846
Export 586e21d4
RhysSullivan Nov 16, 2026
734e0b7
Export 055eb412
RhysSullivan Nov 16, 2026
658397d
Export abb6d42c
RhysSullivan Nov 16, 2026
15cca94
Export ab2a2815
RhysSullivan Nov 16, 2026
9ec62d7
Export 2b2a7794
RhysSullivan Nov 17, 2026
5307d9f
Export 1c135c3a
RhysSullivan Nov 17, 2026
e40e5ea
Export d5530d3f
RhysSullivan Nov 17, 2026
12ee40b
Export e7eebef4
RhysSullivan Nov 17, 2026
ec9dd12
Export 8119bfdd
RhysSullivan Nov 17, 2026
03b23ea
Export 9b1760e4
RhysSullivan Nov 17, 2026
6436223
Export e840f1a7
RhysSullivan Nov 17, 2026
da00d81
Export 699ca96b
RhysSullivan Nov 17, 2026
52c4834
Export b9741a7e
RhysSullivan Nov 17, 2026
e160181
Export 73efa8fc
RhysSullivan Nov 17, 2026
fbb5ac1
Export 3d1bc533
RhysSullivan Nov 17, 2026
41120c3
Export 737c0912
RhysSullivan Nov 17, 2026
dcd272a
Export d5584df0
RhysSullivan Nov 17, 2026
a8d3a2c
Export 5b986347
RhysSullivan Nov 17, 2026
f4416e9
Export ecf8b4e4
RhysSullivan Nov 17, 2026
ab2a346
Export 13ecfda6
RhysSullivan Nov 17, 2026
d2daa20
Export b5c369ed
RhysSullivan Nov 17, 2026
56d893c
Export 0a31c14c
RhysSullivan Nov 17, 2026
ae24c3e
Merge upstream v2 through 56d893c24, preserving fork contracts
shuv1337 Nov 17, 2026
7562d58
Build the pinned collector explicitly in fork CI
shuv1337 Nov 17, 2026
b9b8a50
Document native collector staging and byte verification
shuv1337 Nov 17, 2026
ce0d406
Refuse SDK tarballs outside the builder registry's origin in the self…
shuv1337 Nov 17, 2026
ab5f266
Guard private-registry egress, held scopes and the SDK gate in fork CI
shuv1337 Nov 17, 2026
0784871
Name the telemetry collector in the self-host README
shuv1337 Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .changeset/account-router-listing-cost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"apps": patch
"@executor-js/sdk": patch
---

`accountRouter` merges a listing's tools in time that follows the distinct schema definitions
they hold, rather than their number times the definitions each tool reaches. Routers give every
tool that reaches a definition the same object, and a densely connected API reaches most of its
definitions from every tool: Stripe's 610 tools name about 330,000 `$defs` entries but only 1,537
distinct definitions. Merging wrote each tool's whole schemas to compare its accounts', wrote each
of its definitions again to combine them, and checked each merged tool's schemas on their own, so
a cold Stripe listing spent most of a Cloud app Worker's CPU time there: about 17 seconds with
one account, and with three it reached the Worker's CPU limit. A listing now reads each definition object once, and
the catalog read checks every tool's schemas in its existing single pass. Listings are unchanged.
Apps get this when they are rebuilt on this `apps` release.

When loading an app's tools stops at a resource limit, the recovery still allows one retry, then
says to stop retrying unchanged and investigate: rebuild the app on the host's `apps` version if it
was built on an older one, otherwise reduce what the app does while listing. The limit is matched
from the failure's text, so the recovery does not claim a repeat proves its cause.
9 changes: 9 additions & 0 deletions .changeset/agent-billing-and-connection-reads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@executor-js/hosted-server": patch
"@executor-js/hosted-cloud": patch
---

Agents can read and manage billing on Cloud: owners' and admins' agents see the
plans and member limit and get checkout and billing portal links to open. Agents
can also list the member's scoped connections. Creating, editing and revoking a
connection still needs the dashboard.
17 changes: 17 additions & 0 deletions .changeset/execute-file-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@executor-js/mcp": patch
"@executor-js/app-management": patch
"@executor-js/app-templates": patch
---

Files that app tools return now reach the MCP client as embedded resources instead of base64 text.
When the result of `execute`, `call` or `resume` holds an MCP resource block with binary contents,
`{ type: "resource", resource: { uri, mimeType, blob } }`, it is sent once as its own content block
after the JSON text, as images and audio are, and the JSON keeps the block without its bytes plus
`contentIndex`. A client that saves resources as files, such as Claude Code, can then read a PDF an
app returns, such as an email attachment. Text resources stay in the JSON.

`executor call`, `execute` and `resume` now write every image, audio and file block a result holds
to a file, in a new temporary directory or the one `--files` names, and print each file's `path`
beside its `contentIndex`. Before, the printed JSON kept only the placeholder, so the bytes were
lost.
11 changes: 0 additions & 11 deletions .changeset/motel-resend-once.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/motel-store-low-water.md

This file was deleted.

16 changes: 16 additions & 0 deletions .changeset/rust-telemetry-collector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@executor-js/telemetry": patch
"@executor-js/hosted-self-host": patch
---

The bundled telemetry collector is now `executor-collector`, written in Rust,
in place of Motel. Local, desktop and self-host builds start it where they
started Motel, with the same bounds: seven days and 1 GiB of telemetry, and
exports of at most 16 MiB, four at a time. Measured, it holds 7 to 18 MiB at rest and 27 to 38 MiB under the
product's load, and keeps up at its bound, where Motel fell behind. Locally it serves the trace
viewer at the address in `diagnostics/collector.json`; it stores telemetry in
`diagnostics/collector`. Self-host keeps `EXECUTOR_MOTEL_DATA_DIR`, whose name
is historical, and `executor-host telemetry`. Telemetry Motel stored, up to
about 1 GiB, is neither read nor removed: delete `diagnostics/motel` in the
data directory (by default `~/.executor/v2/cli/diagnostics/motel`), or on a
self-hosted volume run `docker exec <container> rm -rf /app/motel-data/motel`.
2 changes: 1 addition & 1 deletion .changeset/untraced-event-poll.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Self-host and local check for due event deliveries every two seconds. That
check no longer records traces when it finds nothing to deliver; each delivery
attempt and each subscription it expires is still traced. An idle self-host
instance no longer fills the bundled Motel store with polling spans.
instance no longer fills the bundled collector's store with polling spans.
2 changes: 1 addition & 1 deletion .changeset/untraced-idle-polls.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ The scheduler's check for due runs, every second on self-host and local, and
self-host's check for queued provisioning jobs, every second, no longer record
traces when they find nothing to do. Each scheduled operation a check finds is
still traced, in its own `schedule.dispatch` trace, and so is each provisioning
job. An idle self-host instance no longer fills the bundled Motel store with
job. An idle self-host instance no longer fills the bundled collector's store with
polling spans.
20 changes: 16 additions & 4 deletions .github/workflows/fork-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ jobs:
echo "::endgroup::"
done

# Self-host scenarios for scoped-connection widening, OAuth registration, app
# User-Agent, and load-failure containment, plus local MCP search. Both jobs use
# Bun 1.4.4: the collector build and upstream's new-file patches need the newer Bun.
# Self-host scenarios for scoped-connection widening, OAuth registration and held
# scopes, app User-Agent, private-registry build egress, load-failure containment
# and the apps SDK release gate, plus local MCP search. Both jobs use Bun 1.4.4:
# the collector build and upstream's new-file patches need the newer Bun.
# No extra secrets: the runner mints its own API key. CI disables the prepare cache.
security-e2e:
runs-on: ubuntu-latest
Expand All @@ -63,10 +64,21 @@ jobs:
- run: bun install --frozen-lockfile
- name: Install Playwright Chromium
run: bunx playwright install --with-deps chromium
# Upstream CI downloads a separately built collector after prepare; this fork
# has no such artifact job. Build and qualify the exact pinned crate here.
- name: Build and verify the Linux x64 telemetry collector
run: node packages/telemetry/scripts/build-collector.ts --target linux-x64 --install-toolchain build check smoke
- run: bun run e2e:prepare
# Filters match scheduled scenario titles from e2e/test-plan.ts, not suite names; the
# "App dependency registry" suite's only scenario is selected by the private-fetch prefix.
- name: Security scenarios
run: |
bun run e2e:self-host -- --test-name 'application_type|fetch without a User-Agent names Executor|cannot create an all-apps connection|cannot widen a connection or mint|fails to load fails only its own reads'
bun run e2e:self-host -- --test-name 'application_type|fetch without a User-Agent names Executor|cannot create an all-apps connection|cannot widen a connection or mint|fails to load fails only its own reads|with private fetch off, a build|App dependency registry|keeps renewing grants that hold a scope|own Google client still signs in gmail.modify'
# The apps SDK release gate is its own suite, not a self-host scenario.
- name: SDK release gate scenarios
run: |
bun run apps:build
bun run e2e:apps-published -- --testNamePattern 'self-host gate'
- name: Tool error contract scenarios
run: bun run e2e:self-host --test-name 'Every error tools/call and tools/run declare|Every error a write reports after its app code received the call'
- name: Operator feedback scenarios
Expand Down
61 changes: 51 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ Its `cargo test` suite in `tests/` is limited to seven files, which share
export limit emptying the store and a raised one keeping it, every
transition of the
read gate, a gate opening when checkpoints fail, readers held at the gate so
exports are not refused, reads during eviction, and resident memory returned
after a burst.
These would be E2E scenarios, but nothing in `e2e/` builds the binary yet.
exports are not refused, reads during eviction, resident memory returned
after a burst, and the viewer's files: served only from what was read at start,
never a path a request names, only GET and HEAD, and every viewer directory it
cannot serve ending the start before the store is touched.
These run the binary alone, with stores, clocks and resource limits a scenario
through the product cannot set up.

CI runs it in the `collector-native` job when the crate, its build script
(`packages/telemetry/scripts/build-collector.ts`) or the `collector` and `rustup` actions in
Expand All @@ -156,6 +159,9 @@ tests run the deployed suite. When a change is cross-cutting, pick one or two
scenarios per changed path and name them in the handoff. Investigate a failure
CI reports instead of re-running suites to look for one.

A starting run prunes the workspace's `.local/e2e` (`e2e/sdk/run-retention.ts`): it removes runs older than 3 days or past the cap, and shrinks older passed runs, and failed ones a day after they ended, to their logs, reports and evidence (`shrunk.json` says what went). A run that ended in the last 2 hours stays whole unless the 3 GiB cap needs the space.
To keep every run whole while investigating, `touch .local/e2e/keep-all-runs`; remove it when done.

For authenticated testing and bug reproduction, use
[test accounts](notes/test-accounts.md). The fixture command provisions
synthetic users, organization roles and short-lived sessions for self-host,
Expand Down Expand Up @@ -239,7 +245,11 @@ a `workflow_call` workflow, so another repository can call the same jobs.
### Choosing a PR's E2E scenarios

A pull request runs only the E2E scenarios it selects. Pushes to `main` run the
full suite. The static checks (`check` and the jobs it gates, `apps-version`,
full suite. The selection reaches the jobs as title patterns; no value it puts in
an environment variable or argument may approach Linux's 128 KiB limit, and a case in
`e2e/tests/ci-selection.spec.ts` fails at a quarter of it, naming the value. Make room by
splitting (more shards) or by passing it through a file: scenario titles are not a budget,
so never shorten them to fit. The static checks (`check` and the jobs it gates, `apps-version`,
`self-host-native`) always run, except in a skipped stack layer. Put exactly one
fenced `e2e` block in the PR description, listing spec files from `e2e/tests/`:

Expand All @@ -250,12 +260,24 @@ invitation-roles.spec.ts
```
````

Before the first push, commit and check the description as CI's `select` job will:
`bun run e2e:check-description --file description.md` (or `-` for stdin, or `--pr <number>`
once the PR is open, from a checkout at its head commit). It gives CI's verdict and prints what
would run; a `skip` can only be checked once the layer above is open. An edit to the description
after the push needs no re-run unless it changes the selection.

Spec files the PR adds or changes are always included, as are the scenarios that
guard a dependency patch when the PR's tree pins that dependency or its patch
differently from main (`patchGuards` in `e2e/ci-selection.ts`): Bun skips a stale
patch without an error. So are the scenarios that assert a contract one file states in
full when the tree's copy differs from main's (`fileGuards`): a new host protocol in
`app-protocols.ts` runs `app-package.spec.ts`, which reads back the supported list.
The Executor app's skill texts and the MCP instructions generated from them are read back by
scenarios too (`e2e/file-guards.ts`), so changing them runs those scenarios.
A change to the code MCP search and sessions run through (`e2e/mcp-search-guard.ts`) also runs
the Cloud MCP search and session scenarios. That is a floor, not a substitute for naming the spec
files a change can affect: those Cloud scenarios live in `cloud-database-placement.spec.ts` and
`mcp-catalog-scale.spec.ts`, whose names do not say search.
A changed spec file's Cloud scenarios that otherwise first run in Cloud tests on main, after
merge, run in the `cloud-product` job when managed local Cloud can run them. The ones that need a
deployed stage (`runtime: "attached"`) get a warning with the `e2e:deployed` command that runs
Expand Down Expand Up @@ -297,7 +319,12 @@ checks the combined change: its static checks run against the whole tree,
scenarios for every layer's changes. `skip` fails the `select` job unless another
open PR targets the layer's branch, so a lone PR or the top layer cannot skip. The
`select` job waits up to 3 minutes for that PR to open, so open the stack's layers together
(`gh stack submit` does).
(`gh stack submit` does). It then checks that that PR's latest run on its head was built on
this layer's head and compared Worker sizes with the base the stack ends on
([`e2e/ci-skip-check.ts`](e2e/ci-skip-check.ts)). For now it only logs what it would
decide (`skip-check` in the select log and summary); once enforced, it fails and says which command
runs the layer above again. Never write `skip` on a long-lived branch's PR into `main`: it must be
compared with `main` itself.
After changing a lower layer, rebase the layers above it so the top runs again.
Merge the stack only when the top layer passes, bottom first, without pausing between
layers: each merge deploys production.
Expand All @@ -319,8 +346,11 @@ Cloudflare compiles and evaluates the modules a Worker's entry imports staticall
when an isolate starts, about 40 ms for each megabyte on every cold request, and
refuses an upload whose startup takes more than a second of CPU. The `site` job
compares each Cloud Worker's upload, and the bytes its entry imports statically,
with `main`, and fails a pull request that adds more than 50 KB to either, about
2 ms, unless the description allows it:
with the base of the bottom of the pull request's stack, and fails a pull request
that adds more than 50 KB to either, about 2 ms, unless the description allows it.
A stack that ends on `main` is compared with `main`; one that ends on another
branch is compared with that branch, which is charged its total against `main`
when it merges there:

````md
```worker-growth
Expand All @@ -338,6 +368,17 @@ backstops with room above each Worker's size; the deploy enforces them too.
Change one only in a PR that does nothing else and says what the added
cold-start time buys. Never raise one to fit a change.

A push to `main` is held to the same rule against the commit before it: growth
over 50 KB fails `site` on `main` unless the descriptions of the pull requests the
push merges allow it (summed by Worker). That catches growth no pull request was
compared with `main` for, such as a layer retargeted onto `main` after its run, a
`skip` layer above a long-lived branch, or a direct push. A red `site` on `main`
does not stop the deploy, which has already started; it is a red `CI` on `main`
that someone must answer: add the allowance to the merged pull request's
description and rerun the failed job, which reads the descriptions afresh, or
shrink the Worker in a new pull request. Sizes that cannot be had, descriptions
that cannot be read, and commits no pull request merged are notices, never failures.

A ruleset on `main` requires a pull request whose `checks / check` and
`checks / e2e` passed. When GitHub refuses a merge as blocked ("the base branch
policy prohibits the merge"), a required check is pending, failed or missing: wait
Expand Down Expand Up @@ -449,9 +490,9 @@ scenarios on Linux instead of moving them to a Mac.
site and dashboard, with its own origins, into the one `apps/hosted/cloud/.generated/site`
that both serve. On a full run `cloud-product` passes what one local Cloud holds, and each of
its local Clouds has a runner of its own; the longest, about five and a half minutes, waits out
the MCP session restore scenario's 270-second idle. Each runner builds the apps package and
Motel once before its runs; runs only serve that Motel bundle, because every target in a run
shares it.
the MCP session restore scenario's 270-second idle. Each runner builds the apps package and the
telemetry collector and its viewer once before its runs; runs only start that build, because
every target in a run shares it.
- `e2e` passes when `select` succeeded, every E2E job it chose passed and every other one was
skipped; it runs even after a cancellation, which fails it. The matrix runners' check
names change with the selection, so this is the one E2E check to require.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ running Executor from source, the repository layout and how the pieces fit
together. Executor 1 lives on the [`main`](https://github.com/UsefulSoftwareCo/executor/tree/main)
branch.

To report a security problem, follow [SECURITY.md](SECURITY.md) rather than
opening a public issue.

## License

[MIT](LICENSE)
Loading
Loading