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
Aiden Cline
adcfc83d19
feat(codemode): let programs import globals by Node module name ( #61151 )
2026-11-01 21:52:57 -06:00
github-actions[bot]
4878a0e30f
release: v2.2.5 ( #60744 )
...
Brings the versions and changelog of the published v2.2.5 release back to dev.
2026-10-30 19:18:59 -04:00
github-actions[bot]
872f694b05
release: v2.2.4 ( #60664 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 13:06:06 -04:00
github-actions[bot]
b44b7164ba
release: v2.2.3 ( #60564 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 20:19:43 +10:00
Aiden Cline
d9be7138b7
fix(codemode): copy extension results without trusting their own methods ( #58031 )
2026-10-29 21:56:25 -05:00
xjh
96c5c3a11a
fix(codemode): preserve null in text encoding ( #57639 )
2026-10-29 21:40:05 -05:00
Kit Langton
c24c5af3d8
feat(core): add Code Mode checks with static tool scanning to schedules ( #60140 )
2026-10-29 12:29:02 -07:00
github-actions[bot]
4efad23dd8
release: v2.2.2 ( #60337 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-10-29 13:54:46 -05:00
github-actions[bot]
f74b1416a8
release: v2.2.1 ( #60113 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-10-29 10:41:32 -05:00
Sebastian
66f1fa816d
chore: upgrade effect to 4.0.6 ( #59630 )
2026-10-29 11:06:23 +01:00
Aiden Cline
ecc075a043
fix(codemode): visit inherited enumerable keys in for...in ( #59933 )
2026-10-28 23:44:28 -05:00
Aiden Cline
1c49e51303
fix(codemode): run extension before hooks before the host call ( #60024 )
2026-10-28 16:47:57 -05:00
Aiden Cline
711802c3a3
fix(codemode): let search be awaited or chained like a Promise ( #59981 )
2026-10-28 15:31:19 -05:00
Aiden Cline
a882cf98a0
feat(codemode): let extension globals return Effects ( #59948 )
2026-10-28 13:56:18 -05:00
Aiden Cline
c96d200de8
fix(codemode): report parse errors with a location and a hint ( #59834 )
2026-10-28 10:17:11 -05:00
Aiden Cline
2ed57439da
fix(codemode): explain a stalled program and point at the await that never settles ( #59749 )
2026-10-27 16:54:06 -05:00
Aiden Cline
e26f85bcd3
refactor(codemode): run programs on one job queue instead of a fiber per async call ( #57976 )
2026-10-27 12:13:30 -05:00
github-actions[bot]
86976449c4
release: v2.2.0 ( #59558 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-27 19:13:14 +10:00
Dax
6996bbcd6d
ci: separate release builds from signing and publishing ( #59046 )
2026-10-26 14:21:29 -04:00