import type { RuntimeContext } from "../runtime/state/context.js"; import type { StateStack } from "../runtime/state/stateStack.js"; import type { ThreadStore } from "../runtime/state/threadStore.js"; export declare function _print(...messages: any[]): void; export declare function _printJSON(obj: any): void; export declare function _parseJSON(text: string): any; /** Deprecated context-injected wrapper kept in place during the ALS * migration so the registry/codegen path keeps working until the * follow-up cleanup PR removes it. New stdlib `.agency` files should * call `_input` instead. */ export declare function __internal_input(ctx: RuntimeContext, stack: StateStack, _threads: ThreadStore, prompt: string): Promise; /** Test-only: install an input override that resolves after `delayMs`, * used by guard fixtures to simulate a slow human without touching stdin. * Installs on the EXECUTION's context, not globalThis, so it lives and * dies with the run that called it. Exposed to fixtures as the * non-exported `_installSlowInput` def in `stdlib/thread.agency` * (test imports only). */ export declare function _installSlowInputImpl(delayMs: number, answer: string): void; /** Test-only: advance the run's fake clock by `ms`, firing any guard timer * that comes due. Exposed to fixtures as the non-exported `_advanceTime` * def in `stdlib/date.agency` (test imports only). Throws if the run holds * the real clock, so a stray call outside a fake-clock test fails loudly * rather than doing nothing. * * `advance` lives on FakeClock only, not on the Clock type, so this branches * on the concrete type. That is a deliberate trade: putting a test-only * `advance` verb on the production Clock interface would be worse. The * instanceof is confined to this one test-only helper and never runs on a * production path. */ export declare function _advanceTimeImpl(ms: number): void; /** ALS-reading replacement. Same body as `__internal_input`. */ export declare function _input(prompt: string): Promise; /** Deprecated; see comment on `__internal_input`. */ export declare function __internal_sleep(ctx: RuntimeContext, stack: StateStack, _threads: ThreadStore, ms: number): Promise; /** ALS-reading replacement for `__internal_sleep`. */ export declare function _sleep(ms: number): Promise; export declare function _round(num: number, precision: number): number; export declare function _read(dir: string, filename: string, offset?: number, limit?: number): Promise; declare const VALID_WRITE_MODES: readonly ["overwrite", "append", "create-only"]; export type WriteMode = typeof VALID_WRITE_MODES[number]; export declare function _write(dir: string, filename: string, content: string, mode?: WriteMode): Promise; export declare function _writeBinary(dir: string, filename: string, base64: string, mode?: WriteMode): Promise; export declare function _readBinary(dir: string, filename: string): Promise; export declare function _notify(title: string, message: string): Promise; export declare function _mostCommon(items: any[]): any; export declare function _keys(obj: any): string[]; export declare function _values(obj: any): any[]; export declare function _entries(obj: any): { key: string; value: any; }[]; /** The two-binder comprehension lowering target. Shares its notion of * "what is iterable" with `Runner.loop` via classifyIterable, so * `[f(x,i) for x, i in src]` and `for (x, i in src)` cannot disagree. * * Unlike the loop, this genuinely does build a list: the comprehension * desugars to `map(_pairsOf(src))`, and `map` needs a real array. Only * the classification is shared, which is the part that would drift. */ export declare function _pairsOf(src: unknown): unknown[][]; export declare function _range(startOrN: number, end?: number): number[]; export {};