Class: QuickJSExecutor
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:248
Runs forged code in QuickJS compiled to WebAssembly, an instance per call.
Declares isolates: true: the guest's heap is the call's own WebAssembly
memory, and only data crosses between the host and the guest.
Implements
Constructors
Constructor
new QuickJSExecutor():
QuickJSExecutor
Returns
QuickJSExecutor
Properties
isolates
readonlyisolates:true=true
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:250
Whether forged code reaches the host only through the functions it is handed.
Implementation of
name
readonlyname:"quickjs-wasm"='quickjs-wasm'
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:249
A short name for logs and reports, such as in-process.
Implementation of
Methods
ready()
ready():
Promise<void>
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:266
Imports the two packages, checks their versions and compiles the variant's WebAssembly, once; rejects with QuickJSUnavailableError. A failure is kept: later calls fail with it. The engine awaits this before a forge's test cases.
Returns
Promise<void>
Implementation of
run()
run(
request):Promise<ExecutorRunResult>
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:270
Runs one call. Resolves in every case, a timeout included; the forge reports a rejection as an execution error.
Parameters
request
Returns
Promise<ExecutorRunResult>
Implementation of
create()
staticcreate():Promise<QuickJSExecutor>
Defined in: packages/agentos/src/cognition/emergent/executor/QuickJSExecutor.ts:254
An executor whose engine has loaded; rejects with QuickJSUnavailableError when it cannot load.
Returns
Promise<QuickJSExecutor>