This is the checkable support matrix for CodeMode's confined JavaScript interpreter. It tracks the language and standard-library surface that programs can use today, plus concrete gaps that may be implemented later.
[x] means the feature is implemented at the scope described here.[ ] means the feature is unavailable, incomplete, or intentionally divergent as described.When behavior changes, update this file and the tests in the same change. The implementation and tests remain the ultimate source of truth.
await and return through the program's implicit async-function scope.return, final top-level expression as a REPL-style result, and null when no value is produced.undefined and non-finite numbers normalized to null.tools tree only.search(...) built-in: synchronous tool discovery that counts as an admitted tool call and is
shadowable by program declarations like other globals.null, undefined, booleans, finite and non-finite numbers, and strings.NaN and Infinity globals.const, let, and accepted var declarations.for...of bindings.var function scope, hoisting, and redeclaration. Accepted var currently behaves like a
lexical declaration; prefer let or const.let/const temporal-dead-zone and declaration-hoisting semantics.const { [field]: value } = record.const { length } = values.delete object[key].if/else and conditional expressions.switch, including default clauses and fallthrough.for, while, and do...while.for...of over arrays, strings, Maps, Sets, and URLSearchParams.for...in over own keys of plain objects, arrays, and tool references.break and continue.try, catch, optional catch bindings, and finally.throw with arbitrary values.break, and labeled continue.for await...of and async iteration.with and debugger statements.async functions.Boolean, Number, String, parseInt, parseFloat, and URI helpers as callbacks where applicable.this, super, constructor functions, or function prototype methods such as call, apply, and bind.yield.Promise.all, but a promise is not a meaningful predicate or sort result.values.map(Math.abs) or
records.map(JSON.stringify).await for CodeMode promises; a plain value passes through unchanged, though every await still defers its
continuation one reaction turn.new for Error types, Date, RegExp, Map, Set, URL, URLSearchParams, and Promise.+, -, *, /, %, and **.==, !=, ===, !==, <, <=, >, and >=.&, |, ^, ~, <<, >>, and >>>.&&, ||, ??, and !, with short-circuiting.+, unary -, typeof, instanceof, and own-property-only in.++ and --.void and delete.await, repeated awaits, and implicit resolution when a promise is returned from a function/program.Promise.resolve and Promise.reject.Promise.all, Promise.allSettled, Promise.race, and Promise.any over supported collections containing
promises and plain values.Promise.all preserves result order and rejects on the first observed failure without cancelling siblings.Promise.allSettled returns plain fulfilled/rejected outcome records.Promise.race settles from the first result without cancelling losers at settlement time.Promise.all, Promise.allSettled, and Promise.race; separately constructed
combinator batches overlap as in normal JavaScript..then, .catch, and .finally: handlers run deferred in attach order, returned
promises are adopted, handler throws reject the derived promise, .finally preserves the original settlement
unless its cleanup fails, and direct self-resolution rejects with a TypeError.await (including of plain values and already-settled promises) defers its continuation one reaction
turn, so concurrent async functions interleave at await points as in JavaScript.Promise.race. Exact microtask-count parity beyond this observable ordering is not a documented guarantee.Promise.all stragglers, and un-awaited calls alike) is
interrupted when the program returns; rejections that settled un-awaited become Success.warnings
diagnostics. A combinator abandoned inside its final settlement turn counts as pending and is interrupted
without a warning.try/catch can handle awaited tool and promise failures.Promise.any: first fulfillment wins; all-rejected rejects with an AggregateError whose errors array holds
the catch-normalized reasons in input order, and empty input rejects with an empty AggregateError.new Promise((resolve, reject) => ...): the executor runs synchronously and receives first-class resolve/reject
callables that settle the promise exactly once (they may escape the executor and settle later); an executor
throw rejects unless the promise already settled, resolving with a promise adopts it, and resolving with the
promise itself rejects with a TypeError. Resolver callables work as .then/.catch handlers and collection
callbacks but remain opaque references that cannot cross the data boundary.then method are plain data, not promises).Object.keys, Object.values, Object.entries, Object.hasOwn, Object.assign, and Object.fromEntries.Object.keys over arrays and tool references.__proto__, constructor, and prototype.Object.is; runtime and tool-reference identity semantics need to be defined first.Object.groupBy.__proto__, constructor, or prototype.Array.isArray, Array.of, and Array.from.map, filter, flatMap, and forEach.find, findIndex, findLast, findLastIndex, some, every, includes, indexOf, and
lastIndexOf.reduce and reduceRight.sort, toSorted, reverse, and toReversed.at, slice, concat, flat, with, and join.push, pop, shift, unshift, splice, fill, and copyWithin.keys, values, and entries return arrays rather than iterators.length, numeric indexing, index assignment, spread, and for...of.thisArg forms of Array.from.Array.prototype.toSpliced."01" must not alias index 1.undefined members, as in JS.toLowerCase, toUpperCase, normalize.trim, trimStart, and trimEnd.includes, startsWith, endsWith, indexOf, lastIndexOf, and search.slice, substring, at, charAt, charCodeAt, and codePointAt.split, concat, repeat, padStart, padEnd, replace, and replaceAll.match, materialized matchAll, replace, replaceAll, split, and search.localeCompare; locale and options arguments are currently ignored.toString, length, numeric indexing, spread, and for...of by Unicode code point.String.fromCharCode and String.fromCodePoint.localeCompare and locale formatting APIs.match() and search().Number, parseInt, and parseFloat.Number.isInteger, Number.isFinite, Number.isNaN, Number.isSafeInteger,
Number.parseInt, and Number.parseFloat.toFixed, toPrecision, toExponential, toString, and valueOf.MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, MAX_VALUE, MIN_VALUE, EPSILON, NaN,
POSITIVE_INFINITY, and NEGATIVE_INFINITY.PI, E, LN2, LN10, LOG2E, LOG10E, SQRT2, and SQRT1_2.random, max, min, abs, acos, acosh, asin, asinh, atan, atan2, atanh,
floor, ceil, round, trunc, sign, sqrt, cbrt, pow, hypot, cos, cosh, sin, sinh,
tan, tanh, log, log2, log10, log1p, exp, expm1, f16round, fround, clz32, and imul.Number() and String(); they currently do not produce 0 and "".++ and -- rather than host Number(...) coercion.Math.sumPrecise.isFinite and isNaN.JSON.parse and JSON.stringify.JSON.stringify.console.log, console.info, console.debug, console.warn, and console.error.console.dir and console.table.JSON.parse reviver callbacks.JSON.stringify function/array replacers.Date.now, Date.parse, and Date.UTC.new Date() from the current time, epoch milliseconds, a date string, another Date, or local components.getTime, valueOf, toISOString, toJSON, and deterministic ISO toString.getFullYear, getMonth, getDate, getDay, getHours, getMinutes, getSeconds, and
getMilliseconds.getUTCFullYear, getUTCMonth, getUTCDate, getUTCDay, getUTCHours, getUTCMinutes,
getUTCSeconds, and getUTCMilliseconds.getTimezoneOffset, arithmetic, relational comparison, and instanceof Date.null.toUTCString, locale methods, and other Date formatting methods.RangeError branding for invalid toISOString() calls.new RegExp(pattern, flags) construction.test, exec, and toString.source, flags, lastIndex, global, ignoreCase, multiline, sticky, unicode, and dotAll.lastIndex.d and v flags.RegExp.escape.new Map() from entry arrays or another Map.get, set, has, delete, clear, size, and forEach.new Set() from arrays, strings, or another Set.add, has, delete, clear, size, and forEach.keys, values, and entries arrays for Map and Set.for...of, Array.from, and Object.fromEntries integration.{} at host/JSON boundaries.union, intersection, difference, and relation predicates.encodeURI, encodeURIComponent, decodeURI, and decodeURIComponent.new URL(input, base), URL.canParse, and URL.parse.toString, toJSON, and linked searchParams.href, origin, protocol, username, password, host, hostname, port,
pathname, search, and hash.origin.new URLSearchParams() from query strings, data objects, pairs, Maps, and URLSearchParams.append, delete, get, getAll, has, set, sort, forEach, keys, values,
entries, toString, and size.{}.Error, TypeError, RangeError, SyntaxError, ReferenceError, EvalError, and URIError, callable with
or without new.AggregateError with the (errors, message?) signature and an own errors array, constructed directly or by
an all-rejected Promise.any.name/message, error inheritance through instanceof, and plain-data serialization.instanceof for Date, RegExp, Map, Set, URL, URLSearchParams, Array, Object, Promise, and Error types.ToolError messages.catch and Promise.allSettled.These are actionable implementation items. Check them off only when behavior and direct tests land.
Promise.all, Promise.allSettled, and Promise.race.undefined so invalid values cannot silently become
null in render-only or OpenAPI tool calls.These constraints preserve CodeMode's confinement and host-neutral scope. They are not TODO items.
fetch, timers, crypto, or other host globals unless a future host explicitly supplies a bounded capability.eval, Function(...), arbitrary host execution, and prototype mutation.