Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
8a03b88
Export cd3556b5
RhysSullivan Nov 17, 2026
68f18b3
Export 81e80bb6
RhysSullivan Nov 17, 2026
8e597ad
Export 06d2a833
RhysSullivan Nov 17, 2026
27fcf8a
Export ab006006
RhysSullivan Nov 17, 2026
40a7e23
Export 65363558
RhysSullivan Nov 17, 2026
9239541
Export aea22914
RhysSullivan Nov 17, 2026
b858985
Export 0b10ece5
RhysSullivan Nov 18, 2026
cebcfed
Export 9cc67764
RhysSullivan Nov 18, 2026
65b7f89
Export 4a1152de
RhysSullivan Nov 18, 2026
70c613c
Export 638d7e79
RhysSullivan Nov 18, 2026
973de5f
Export a26f7a08
RhysSullivan Nov 18, 2026
ab9d604
Export f5954acf
RhysSullivan Nov 18, 2026
625c5da
Export 5a340ce9
RhysSullivan Nov 18, 2026
069ba13
Export af35a6fe
RhysSullivan Nov 18, 2026
516ef8c
Export a615ac76
RhysSullivan Nov 18, 2026
a87dbd4
Export 6188e2ca
RhysSullivan Nov 18, 2026
fcfc328
Export 6c815903
RhysSullivan Nov 18, 2026
6c98a45
Export b5be0c9a
RhysSullivan Nov 18, 2026
aa005c7
Export 5e2e3a25
RhysSullivan Nov 18, 2026
ddf4eda
Export 6241927d
RhysSullivan Nov 18, 2026
9f55997
Export 439f32a5
RhysSullivan Nov 18, 2026
6acbbf9
Export e7df3acf
RhysSullivan Nov 18, 2026
9c224e0
Export 0724195e
RhysSullivan Nov 18, 2026
196c39a
Export 030a64b8
RhysSullivan Nov 18, 2026
b2da1e9
Export 3a86ef07
RhysSullivan Nov 18, 2026
4816219
Export 9663564e
RhysSullivan Nov 18, 2026
9734066
Export 38144c76
RhysSullivan Nov 18, 2026
503fc2d
Export a3e9bdb7
RhysSullivan Nov 18, 2026
d115aba
Export 2eb33fe6
RhysSullivan Nov 18, 2026
191ac0f
Export a51beafe
RhysSullivan Nov 18, 2026
af3076b
Export 8e2aae02
RhysSullivan Nov 18, 2026
abad90e
Export 0bd73295
RhysSullivan Nov 18, 2026
8262ee1
Export 74baf1da
RhysSullivan Nov 18, 2026
669540c
Export c4b66d3a
RhysSullivan Nov 18, 2026
0c727f0
Export 8e5fc43c
RhysSullivan Nov 18, 2026
470e717
Export ba91bd2a
RhysSullivan Nov 18, 2026
d6de38a
Export f1cceef7
RhysSullivan Nov 18, 2026
ae13a82
Export a247a40b
RhysSullivan Nov 18, 2026
3972b50
Export bba0b71a
RhysSullivan Nov 18, 2026
81f6233
Export ebe8df82
RhysSullivan Nov 18, 2026
6d433bd
Export cb9b0438
RhysSullivan Nov 18, 2026
29e0c00
Export af89db70
RhysSullivan Nov 18, 2026
1f85700
Export b5e2b143
RhysSullivan Nov 18, 2026
4dbedf8
Export f4bc3fa5
RhysSullivan Nov 18, 2026
d2fb404
Export ed082fa5
RhysSullivan Nov 19, 2026
166f7bc
Export 1f7d836b
RhysSullivan Nov 19, 2026
825cce0
Export 0825770c
RhysSullivan Nov 19, 2026
4545d4f
Export 05bd3e5d
RhysSullivan Nov 19, 2026
1ea0732
Export 7dd5e04b
RhysSullivan Nov 19, 2026
a95bf8f
Export 7973c01e
RhysSullivan Nov 19, 2026
05ae3bd
Export 112f646e
RhysSullivan Nov 19, 2026
3dd7f2f
Export 3829135d
RhysSullivan Nov 19, 2026
b8dc056
Export 1fc585a4
RhysSullivan Nov 19, 2026
1a92d29
Export 29280233
RhysSullivan Nov 20, 2026
a4ae17c
Export 6ed1e9db
RhysSullivan Nov 20, 2026
e311867
Export e13cab70
RhysSullivan Nov 20, 2026
f2582c5
Export a8317103
RhysSullivan Nov 20, 2026
c381941
Export 47bff0fb
RhysSullivan Nov 22, 2026
a739636
Export b89a131a
RhysSullivan Nov 22, 2026
d3bbe68
Keep offline MCP grants working after their approving session expires
hemaaanth Nov 22, 2026
288e708
Export d2a406a1
RhysSullivan Nov 22, 2026
0d8cee1
Export 08420ccd
RhysSullivan Nov 22, 2026
3a3006b
Export a9299f3e
RhysSullivan Nov 22, 2026
f8bfb8e
Export 5632a4ce
RhysSullivan Nov 22, 2026
45e39ee
Export 106993ea
RhysSullivan Nov 23, 2026
e754f9d
Export 29b6c5fa
RhysSullivan Nov 24, 2026
cf393bb
Merge upstream Executor v2 at e754f9d630
shuv1337 Nov 24, 2026
f2f200e
Keep MCP skill evaluation inside the caller connection
shuv1337 Nov 24, 2026
af9c8de
Enforce live caller connection scope for hosted MCP skills
shuv1337 Nov 24, 2026
62ffa1b
Keep scoped MCP tool caches and OAuth consent consistent
shuv1337 Nov 24, 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
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/api-key-automatic-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@executor-js/mcp-auth": patch
---

API keys at the plain `/mcp` URL now use `automatic` approval mode, as a new
sign-in there does: Executor accepts approvals at once and the agent's own
permission prompt is the check. A URL that names a mode keeps it; add
`?elicitation_mode=model`, `native` or `browser` to have approvals pause.
3 changes: 1 addition & 2 deletions .changeset/automatic-approval-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ agent's own permission prompt for `call` or `execute` is the check. Questions a
running tool asks still reach the agent, as in `model` mode. The sign-in page
now preselects it for the plain `/mcp` URL, on hosted and local; local's
sign-in page now offers the approval choice too. Existing grants keep their
mode, and personal access tokens still use `model` mode at the plain URL. Use
`?elicitation_mode=automatic` to choose it with a token.
mode.
9 changes: 9 additions & 0 deletions .changeset/execute-entry-skill-once.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@executor-js/mcp": patch
---

The `execute` and `skills` descriptions no longer tell agents to read the
Executor app's entry skill first. The server instructions are that skill, so an
agent that received them would fetch the same text again; the descriptions now
say so and name the `skills` call only for clients that do not show server
instructions.
8 changes: 8 additions & 0 deletions .changeset/mcp-call-teardown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"apps": patch
---

A completed MCP tool call no longer sends `notifications/cancelled` for itself when its client
closes, and its result returns without waiting for the server to acknowledge the session's
`DELETE`. The session still ends after the reply, within the invocation, through the host's
background runner; a failed or cancelled call ends its session before returning, as before.
12 changes: 12 additions & 0 deletions .changeset/oauth-declared-pkce-false.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"apps": patch
"@executor-js/sdk": patch
"@executor-js/app-templates": patch
---

Declared `oauth2()` endpoints accept `pkce: false` for a service whose token endpoint refuses a
confidential client's `code_verifier`. LinkedIn's web flow answers such a request with 401
`invalid_client`, so every LinkedIn sign-in failed at the code exchange whatever secret was saved.
With the declaration, sign-in sends no `code_challenge` and no `code_verifier`. Only a secret
`tokenEndpointAuthMethod` may declare it; without one the build fails. Every other provider keeps
PKCE S256.
15 changes: 15 additions & 0 deletions .changeset/self-host-mcp-clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@executor-js/hosted-self-host": patch
---

Self-host no longer refuses new MCP clients after 256 API keys or OAuth grants
have been used within half an hour. It keeps up to 512 clients
(`EXECUTOR_MCP_CLIENTS`), and when a new one would pass that it forgets the
least recently used client that has no request in flight and no program waiting
for approval. That client's next request gets `404` and it must initialize a
new session; a client that does not do so on its own needs reconnecting. One member holds at
most 256 of them (`EXECUTOR_MCP_CLIENTS_PER_USER`), so one member's
clients cannot push out everyone else's. When every client that could make room
owns work, a new client gets `503` with `Retry-After: 1`.
A setting that is not a whole number of at least 1 stops the server with an
error naming the setting.
7 changes: 7 additions & 0 deletions .changeset/self-host-runtime-root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@executor-js/hosted-self-host": patch
---

The self-host image's runtime under `/app`, such as `product.mjs`,
`workerd.capnp` and the workerd binary, now belongs to root and is read-only to
the user the server runs as. Only the data directories are that user's.
10 changes: 8 additions & 2 deletions .github/workflows/fork-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,20 @@ jobs:
# "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|with private fetch off, a build|App dependency registry|keeps renewing grants that hold a scope|own Google client still signs in gmail.modify'
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|keeps renewing grants that hold a scope|own Google client still signs in gmail.modify'
# A parked program outlives the request that started it: the entry must hold through idle
# deadlines until its batch finishes, and a crash must report the program lost, not missing.
- name: Parked MCP program scenarios
run: |
bun run e2e:self-host --test-name 'Self-host MCP (resumes all three|reports a crashed parked)|PAT MCP approvals bind|PAT MCP model-mode resume' --workers 1
- name: Person-only approval scenarios
run: bun run e2e:self-host --test-name 'a tool that requires a person refuses the agent|owner of an automatic-mode grant approves' --workers 1
run: bun run e2e:self-host --test-name 'a tool that requires a person refuses the agent|owner of an automatic-mode grant approves|A plain-URL API key in automatic mode' --workers 1
- name: MCP Skills extension and client bounds
run: |
bun run e2e:self-host --test-name 'Skills extension|Self-host MCP (admits|never forgets) a' --workers 1
bun run e2e:local --test-name 'Skills extension' --workers 1
- name: Member managed keys
run: bun run e2e:self-host --test-name "Executor app's managed key is recreated after an admin becomes a member|Executor installs each user" --workers 1
# A failed default-app install names its tagged cause in the log, never the registry's URL.
- name: Provisioning failure scenarios
run: |
Expand Down
22 changes: 22 additions & 0 deletions .oxlintrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@
],
},
"overrides": [
{
// Snapshots are assertions a person reads (e2e/README.md, "Snapshots"): small enough to read,
// never built from interpolated values, and inline beside the code, never in a .snap file.
// The plugin's other default rules that fire here do not know `it.effect` from
// @effect/vitest is a test, so they read every scenario's expect as outside one.
"files": ["e2e/**"],
"plugins": ["vitest"],
"rules": {
"vitest/no-large-snapshots": ["error", { "maxSize": 30, "inlineMaxSize": 30 }],
"vitest/no-interpolation-in-snapshots": "error",
"vitest/no-restricted-matchers": [
"error",
{
"toMatchSnapshot": "Use toMatchInlineSnapshot, beside the code that produced the value.",
"toThrowErrorMatchingSnapshot": "Use toThrowErrorMatchingInlineSnapshot.",
},
],
"vitest/no-standalone-expect": "off",
"vitest/valid-expect": "off",
"vitest/require-awaited-expect-poll": "off",
},
},
{
// The live host protocol reaches these patterns, and its record is compared with every
// released protocol's, flags included; see notes/apps-publishing.md.
Expand Down
108 changes: 95 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ CI runs it in the `collector-native` job when the crate, its build script
on Ubuntu 22.04. A run on main saves it to the cache under its identity; a pull request's run
restores main's entry when the identity matches and otherwise builds from scratch, saving nothing.

A snapshot (`toMatchInlineSnapshot`) is an assertion. Use one when the whole text is the
behaviour; read every line of a changed one as a changed assertion. No run writes one unless
asked: record it locally with `--update-snapshots --test-name '<title>'`, which CI refuses
([Snapshots](e2e/README.md#snapshots)).

Tests are not sacred. Delete a scenario when it no longer proves behavior a user
or public API caller depends on, or when other scenarios already cover it. Say
what it covered and why that coverage is not needed. Deletion is not a fix for
Expand Down Expand Up @@ -171,6 +176,16 @@ private and out of tool output.

Run `bun run format` before committing. `bun run check` runs the format check,
`oxlint`, and the typecheck; CI-style verification should use it.
Before every push to a pull request, run `bun run pr:check` (`--description <file>` before the
pull request is open): it runs some of the cheap gates CI applies, with CI's own code, in about 25
seconds: `bun run check`, the `select` job's check of this branch's `e2e` block and of each other
open stack layer's (each on a checkout of its local head, so a spec file it names must exist in its
own tree, and a `skip` with no open layer above fails), bun.lock, the apps version bump, the host
protocols and the Release-note lines of the squashed commit. It does not check, and says so at the
end of every run: a `skip` layer's check that the layer above's CI run was computed on it, `site`
(the build, links and Worker size budgets), `apps-package`, `tooling`, the native and collector
jobs, any E2E scenario or release lane, and line coverage. It needs the network (origin, and `gh`
signed in, with gh-stack for a stack) and fails with a message saying so when it cannot reach them.

`packages/apps/protocols/*.json` are generated records of the app host
protocols. Never read, grep or edit them; run `bun run apps:protocols` and read
Expand Down Expand Up @@ -229,6 +244,33 @@ TypeScript 7 has no JavaScript compiler API. The `packages/apps` build scripts
and `e2e/check-boundary.ts` import TypeScript 5.9 as `typescript-5` for it;
do not use that package to typecheck.

## Release notes

A public release lists only the changes whose squashed commit has a line
`Release-note: <text>`; pull request titles are never published. For a change a
user of the CLI, the desktop app or the self-host image would notice, put one
such line, one plain sentence for users, at the start of a line of its own (not
indented or quoted) in the body of a commit message on the pull request's
branch: the squashed commit's body is its commits' messages, not the pull
request's description. A message that holds `<`, `[`, `$`, ` ``` ` or `~~~`
anywhere has no notes, so keep HTML, links, math and code blocks out of it. The
one exception is a line that is only a co-author trailer,
`Co-authored-by: Name <name@host>` (a bot's name may end `[bot]`), with nothing
after it, anywhere in the message.
Every such line is listed. Start the note with its kind, `Feature: `, `Improvement: ` or `Fix: `
(the word, a colon and exactly one space; a tab or two spaces leave the note refused), as in
`Release-note: Feature: Teams can be renamed.`: Cloud's What's new leads only with a feature
or an improvement, the kind is cut off before the rules below are applied and is never published,
and a note without one is a fix. Mark a note for what it is, and never reword a fix to sound like a
feature. A note, after its kind, is plain prose of at most 300 characters:
ASCII letters, digits, spaces and `.,;:!?'"()-`, starting with a letter or
digit, with no `@`, `#`, `/`, URL, host name, code, Markdown, `GH-123` or whole
word of 7 or more hex characters or digits; any other is left out whole. Name no
customer, organization or reporter, use no internal names, and say nothing
about a security problem not yet fixed and disclosed. Write none for tests, CI,
tooling or internal refactors. The rules are in
[Release notes](RELEASING.md#release-notes).

## CI

`.github/workflows/ci.yml` runs on pull requests, pushes to `main` and manual
Expand All @@ -237,15 +279,30 @@ A PR run on an earlier head is cancelled by the new head's run; two runs on the
same head both run, one after the other. Each push to `main` has its own
concurrency group, so every push finishes a run and gives each merge a baseline,
even when merges come in a burst. A stack that lands in one push gets one run, at
its top commit. Overlapping `main` runs share no deployed stage, database or
its top commit; `gh stack merge` lands it that way. Overlapping `main` runs share no deployed stage, database or
secret. They do read the npm registry and create hosted emulators.dev instances,
each named with a random UUID, so they do not interfere. The jobs live in `.github/workflows/checks.yml`,
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 selection reaches the jobs as title patterns; no value it puts in
A draft pull request runs only the E2E scenarios it selects. Once it is ready for
review, it runs the full suite, unless everything it changes since `main` is in the
narrowing table in [`e2e/narrowing.ts`](e2e/narrowing.ts) (notes, the repository's
documents and skills, spec files); then it keeps its selection. Marking it ready starts
that run, and the merge waits for it, so mark a pull request ready when you push the
head you mean to merge, not after its draft run passes. Whether it is a draft is read
live when `select` runs, so re-running a draft's run on a ready pull request runs it as
ready. A draft's `e2e` job is named `e2e (draft)` and never reports the required
`checks / e2e`, so a draft's green cannot stand for the merge. A stack's top layer is
compared with `main`, so a tests layer above a code layer runs the full suite, and every
spec file any layer changed runs on it. A ready pull request
also runs its new local and self-host scenarios (those of the spec files the stack changed
that `main`'s `e2e/test-plan.ts` does not name) four more times, each on its own runner and
the last with half the cores busy; any failure fails it, so a new scenario that passes only
sometimes never reaches `main`. Fix the race; never add a retry or a longer deadline. At
most 60 repeat, the first by title, and the run summary says when there were more. Pushes to `main`
run the 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,
Expand Down Expand Up @@ -285,7 +342,9 @@ them; run it before merging. A scenario new to the deployed suite (one main's `e
does not name) first runs on a deployed stage after merge even when managed local Cloud runs it
here, so the `select` job fails until the description has a line `Verified on a deployed stage:`
saying what ran and its result, for example the `bun run e2e:deployed --database planetscale
--test-name '…'` command the failure prints. Write `none` for a change no scenario exercises, such as documentation. Write each name as it appears in
--test-name '…'` command the failure prints. A scenario is known by its exact title, so renaming one, even
cosmetically and only in `e2e/test-plan.ts`, makes it new and needs that line; moving a scenario to
another file under the same title does not. Write `none` for a change no scenario exercises, such as documentation. Write each name as it appears in
`e2e/tests/`, optionally prefixed with `e2e/tests/`. The `select` job fails when the
description has no block, a name is not a spec file there, or a named file is one these
jobs never run: the release, desktop, billing and PGlite suites have their own
Expand Down Expand Up @@ -321,15 +380,30 @@ open PR targets the layer's branch, so a lone PR or the top layer cannot skip. T
`select` job waits up to 3 minutes for that PR to open, so open the stack's layers together
(`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.
([`e2e/ci-skip-check.ts`](e2e/ci-skip-check.ts)). On a layer that is ready for review the
check is enforced and stricter, because a ready layer can be merged alone: it passes only when a
ready layer above has a run on its head that contains this layer's head and finished green, its
`checks / check` and `checks / e2e` passed, having run the full suite (or the narrowing table's
selection, which is what that layer merges on), or when the ready skip layer above passed this same
check. Its `select` waits up to 50 minutes for that run, so mark the whole stack ready together,
top included; a draft above never passes it. On a draft it only logs what it would decide
(`skip-check` in the select log and summary): a draft cannot be merged. 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.

Choose from the actual callers of the changed code. Search `e2e/tests/` for the
Land a stack only when the top layer passes, and only with `gh stack merge <top PR> --yes
--squash`, never layer by layer. It merges every layer in one operation and one push to
`main`, so `main` runs CI, Deploy and the public export once, on the top commit, with no
commit in between that has a code layer without its tests (checked with #5035 and #5036 on
18 Nov 2026, `notes/ci.md`). A lower layer merged by itself lands untested by the run that
covered it; `main`'s CI then warns "Stack layer landed alone".
`gh stack merge` merges only the GitHub stack its argument is in, into that stack's base. First
check that every layer is in one stack based on `main`: `gh api
repos/UsefulSoftwareCo/executor-next/pulls/<top PR> --jq .stack` shows its number, size and base.
If the layers sit in two stacks, run `gh stack unstack <upper stack>` and then `gh stack link <lower
stack> <each PR above it>`, which changes no branch or base (done for #4989 to #5002 on 18 Nov 2026).

The draft's selection is for fast answers while you work; the ready run is the one that
cannot miss. Choose from the actual callers of the changed code. Search `e2e/tests/` for the
routes, tools and UI the change touches, and include every file that exercises them
on any target. A tests PR on top of a stack gets its own new or changed spec files
for free; add the existing files that cover the code layers below it. `main` runs the
Expand Down Expand Up @@ -388,7 +462,15 @@ REST or GraphQL API to get around a refusal, and no change to the ruleset. Only
Rhys turns it off, in an emergency. See [CI configuration](notes/ci.md#the-main-ruleset).

A failure on `main` is a regression or a flake that a PR selection missed. Fixing
it takes priority over new work that touches the same area.
it takes priority over new work that touches the same area. While CI on `main` is red, the
paced Windows check is red, or a beta release is held for more than six hours (or by five
failed attempts in a day), one open issue labelled `main-health` says so: the failed jobs and
scenarios, the commits since the last green run, and why the beta is held. Main health
(`.github/workflows/main-health.yml`) is its only writer; each run rewrites it whole from
those three facts, closes it once each is known to be fine, and while one cannot be read
(no run yet, no recent Beta decision) opens or closes nothing. It touches only issues
github-actions opened with its marker; an older `main-red` issue is closed by hand. Read it
before investigating.

A PR run takes at most about seven minutes. Wait for it once; do not poll post-merge
suites before handing off. When a job fails in a scenario the change does not
Expand Down
Loading
Loading