Commit graph

22063 commits

Author SHA1 Message Date
James Long
7e0fa408cc chore(codemode): tidy the prelude helpers and native-kind notes 2026-11-05 16:29:36 +00:00
James Long
2cdf6a67e8 refactor(codemode): write iterator helpers and Iterator.from as prelude generators; drop the Helper cursor and its kinds 2026-11-05 16:17:17 +00:00
James Long
6759bff034 test(codemode): cover prelude round trips, names, privacy, and failure locations 2026-11-05 15:44:38 +00:00
James Long
9cc8ec9b86 refactor(codemode): move iterator consumers, Iterator.from, the JSON reviver, and string replace callbacks to the prelude; drop Drain and consumers 2026-11-05 15:28:31 +00:00
James Long
fa7b94f2fe refactor(codemode): move fromEntries, sumPrecise, AggregateError, Uint8Array sources, and Headers/URLSearchParams pairs to the prelude 2026-11-05 15:24:01 +00:00
James Long
d8504a97b0 refactor(codemode): move collection constructors, groupBy, forEach, getOrInsertComputed, and Set methods to the prelude 2026-11-05 15:20:57 +00:00
James Long
0bff057313 refactor(codemode): keep array callbacks and sort native, move Array.from iterables and toLocaleString to the prelude 2026-11-05 15:17:00 +00:00
James Long
1acdf4b478 refactor(codemode): add a Code Mode prelude for built-ins that call program code, starting with array callbacks 2026-11-05 15:11:36 +00:00
James Long
cac2611c68 fix(codemode): seal frame kinds so the snapshot build id doesn't depend on what was imported 2026-11-05 15:04:33 +00:00
James Long
dc08129e12 fix(codemode): report a durable call cancelled with its run to tool.after, and document suspend and resume hooks 2026-11-05 00:53:15 +00:00
James Long
edbeec8c2c feat(codemode): pass each tool call its idempotency key, at the tool and at both hooks 2026-11-05 00:53:15 +00:00
James Long
3eab346e2c feat(codemode): suspend and resume runs, with durable tool calls and idempotency keys 2026-11-05 00:53:15 +00:00
James Long
5ad0d06ab2 feat(codemode): save and restore a run's state as a snapshot, with a round-trip test mode 2026-11-05 00:53:15 +00:00
James Long
fce860cf9c docs(codemode): describe built-in frames instead of native host generators 2026-11-05 00:53:14 +00:00
James Long
a9d9cb7a8d refactor(codemode): run JSON, Date, tool calls, search and extension calls as data frames and drop the host generator bridge 2026-11-05 00:53:14 +00:00
James Long
92ba3e60ab refactor(codemode): run array, collection, iterator helper and promise built-ins as data frames 2026-11-05 00:53:14 +00:00
James Long
cd0478a46f test(codemode): check suspended generators and for await state is data 2026-11-05 00:53:14 +00:00
James Long
b54d451fb6 refactor(codemode): run generators, yield* and the async-from-sync adapter as frames 2026-11-05 00:53:14 +00:00
James Long
14ccd9e351 refactor(codemode): label blocking host calls and drop an unused boundary getter 2026-11-05 00:53:14 +00:00
James Long
ad4fd72c55 refactor(codemode): run every job on the machine and drive it from a thin Effect loop
The machine now owns the scheduler: job queue, inbox, parked awaits, unhandled
rejections, and promise operations. An await cuts the stack at the innermost
async boundary (the program's frame or an async function's call frame) and
parks the frames on the promise as data. Host calls are HostCall records the
machine hands to the driver at its stops; blocking host work is a blocking
HostCall. The generator evaluator, runner.ts, and CODEMODE_EVALUATOR are gone.
2026-11-05 00:53:14 +00:00
James Long
1dd74883d6 refactor(codemode): keep the machine's hot paths free of per-evaluation closures 2026-11-05 00:53:14 +00:00
James Long
8a4479e1ef test(codemode): run the suite on both evaluators 2026-11-05 00:53:14 +00:00
James Long
a706db7228 feat(codemode): add the machine evaluator behind CODEMODE_EVALUATOR
Program code can now run as explicit frames on a stack stepped by a loop (src/machine)
instead of host generators. Each frame is a kind, a node, a phase, slots and a scope chain;
expressions that cannot run program code still finish inline within one step. Abrupt
completions unwind frame by frame through try, for...of and array-pattern handlers.

Async bodies, generator bodies and calls the runner starts are machine tasks the runner
drives as activation bodies; built-ins that call program code run as opaque native frames
whose program calls become frames. CODEMODE_EVALUATOR=machine selects it; the generator
evaluator stays the default.
2026-11-05 00:53:14 +00:00
James Long
9d233cf026 refactor(codemode): share synchronous operations and signal types between evaluators
Move the operators, property references, hoisting and iterator checks that never run
program code out of the generator evaluator into operations.ts, and the driver's signal
and activation types out of runner.ts into signals.ts, which needs no Effect at run time.
The machine evaluator builds on both.
2026-11-05 00:53:14 +00:00
James Long
252b78a768 test(codemode): report the fastest run in benchmarks 2026-11-05 00:53:14 +00:00
James Long
9c239c1b73 refactor(codemode): queue jobs, reactions and host calls as data records 2026-11-05 00:53:14 +00:00
James Long
90b228dfe8 refactor(codemode): keep Map, Set, iterators, weak collections and RegExp state as data 2026-11-05 00:53:14 +00:00
James Long
377875d6e5 refactor(codemode): make bound functions and resolvers data kinds 2026-11-05 00:53:14 +00:00
James Long
2daa79a85d refactor(codemode): name intrinsics deterministically 2026-11-05 00:53:14 +00:00
James Long
72d958271d refactor(codemode): number AST nodes with stable node ids 2026-11-05 00:53:14 +00:00
James Long
e99c23ff54 test(codemode): add interpreter benchmarks 2026-11-05 00:53:14 +00:00
Luke Parker
9b7ffd32b3
refactor(app): drop the unused file tree scope option (#61846) 2026-11-04 18:49:46 -06:00
Luke Parker
fb26077935
fix(app): close the slash commands on a second press or Backspace (#61840) 2026-11-04 18:30:41 -06:00
Jack
6d365198c4
chore(console): show the New badge only on Hy4 in Go charts (#61849) 2026-11-05 08:30:01 +08:00
Luke Parker
f8b951cb38
fix(session-ui): drive tool and message disclosures through one state machine (#61830) 2026-11-04 18:23:27 -06:00
Luke Parker
6f725c68d1
fix(session-ui): end the live turn phase on retry, failure and interrupt (#61823) 2026-11-04 18:22:09 -06:00
Luke Parker
8bae6b5c1c
fix(app): announce voice session replies from a state machine instead of a 1 s poll (#61813) 2026-11-04 18:14:51 -06:00
Luke Parker
c777f9a24e
fix(app): reread a workspace file changed during its read (#61818) 2026-11-04 18:10:34 -06:00
Luke Parker
fa34b0e095
fix(session-ui): keep the newest Mermaid diagram when renders finish out of order (#61821) 2026-11-04 18:05:37 -06:00
Luke Parker
71f1ad16e4
fix(app): drive the voice call lifecycle from one state machine (#61812) 2026-11-04 18:05:09 -06:00
Luke Parker
e42ac691d5
fix(app): reload a file tree directory changed during its listing (#61814) 2026-11-04 18:03:41 -06:00
Aiden Cline
64ca766ff7
fix(core): fall back to legacy for stdio MCP servers that ignore the version probe (#61817) 2026-11-04 17:56:11 -06:00
Luke Parker
9ff07c0d3a
fix(app): drive window plugin activation through one state machine (#61793) 2026-11-04 17:51:40 -06:00
Aiden Cline
33d52e6011
feat(core): share MCP connections across locations with pool: true (#61185) 2026-11-04 17:43:08 -06:00
opencode-agent[bot]
b551f60452
docs(go): set Hy4's Go Teams limit to $65 (#61836)
Co-authored-by: MrMushrooooom <19261047+MrMushrooooom@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-11-04 23:36:02 +00:00
Luke Parker
452cfb579c
fix(app): retry failed mark-viewed reports for every caller (#61809) 2026-11-04 17:34:16 -06:00
Luke Parker
6838d95795
fix(app): make tab promotion and route-to-tab sync explicit state machines (#61801) 2026-11-04 17:31:25 -06:00
Luke Parker
7ffde6cad9
fix(app): keep the server dialog open on an invalid address and close it once (#61815) 2026-11-04 17:31:07 -06:00
Filip
a0c6df8fde
fix(core): start background compaction a fixed lead before the threshold (#60049) 2026-11-05 00:28:39 +01:00
Aiden Cline
134d1b411c
fix(app): read timeline follow state on composer submit (#61822) 2026-11-04 17:17:55 -06:00