DenoNamespace
Minimal subset of the Deno namespace needed by the adapter.
We avoid @types/deno to keep the core runtime-agnostic at the type level. This interface declares only what createDenoAdapter actually reads.
Reading env requires --allow-env permission. The adapter checks permissions before reading, so a missing or scoped grant leaves the ungranted variables unset instead of failing or prompting.
- Import:
@kjanat/dreamcli/runtime - Export kind: interface
- Declared in:
src/runtime/deno.ts - Source link:
src/runtime/deno.ts:45
Signatures
interface DenoNamespace {}Members
Properties
build
Build target metadata (OS detection).
build: { os: "darwin" | "linux" | "android" | "windows" | "freebsd" | "netbsd" | "aix" | "solaris" | "illumos"; };version
Deno version info — used for minimum-version guard.
version?: { deno?: string; };args
Raw command-line args (excludes the binary/script — Deno pre-strips them).
args: readonly string[];permissions
Permission state queries; read without prompting the user.
permissions?: { querySync(descriptor: { name: "env"; variable?: string; }): { state: "granted" | "denied" | "prompt"; }; };env
Environment variable access (requires --allow-env).
env: { get(key: string): string | undefined; toObject(): Record<string, string>; };stdout
Standard output — synchronous byte writer with TTY detection.
stdout: { writeSync(p: Uint8Array): number; isTerminal(): boolean; };stderr
Standard error — synchronous byte writer.
stderr: { writeSync(p: Uint8Array): number; };stdin
Standard input — TTY detection and readable byte stream.
stdin: { readable: ReadableStream<Uint8Array>; setRaw(mode: boolean): void; isTerminal(): boolean; };Methods
cwd
Current working directory (may throw if --allow-read is denied for cwd).
cwd(): string;consoleSize
Current console dimensions.
consoleSize(): { columns: number; rows: number; };addSignalListener
Register a native signal listener.
addSignalListener(signal: "SIGWINCH", listener: { (): void; }): void;removeSignalListener
Remove a native signal listener.
removeSignalListener(signal: "SIGWINCH", listener: { (): void; }): void;exit
Exit the process with the given code.
exit(code: number): never;readTextFile
Read a file as UTF-8 text (requires --allow-read).
readTextFile(path: string): Promise<string>;stat
Probe a filesystem path (requires --allow-read).
stat(path: string): Promise<{ isDirectory: boolean; }>;mkdir
Create a directory (requires --allow-write).
mkdir(path: string, options?: { recursive?: boolean; }): Promise<void>;