mcard-js
Version:
MCard - Content-addressable storage with cryptographic hashing, handle resolution, and vector search for Node.js and browsers
31 lines • 1.05 kB
TypeScript
/**
* Base types and utilities for runtime executors.
*/
import * as child_process from 'child_process';
import type { CardCollection } from '../../../model/CardCollection.js';
export declare const execFile: typeof child_process.execFile.__promisify__;
/**
* Runtime interface - all runtimes must implement this.
*/
export interface Runtime {
execute(codeOrPath: string, context: unknown, config: any, chapterDir?: string): Promise<unknown>;
}
/**
* Options for runtime creation.
*/
export interface RuntimeOptions {
collection?: CardCollection;
}
/**
* Supported runtime types.
*/
export type RuntimeType = 'javascript' | 'python' | 'rust' | 'c' | 'wasm' | 'lean' | 'llm' | 'loader' | 'collection_loader' | 'lambda' | 'network';
/**
* Check if a command is available on the system.
*/
export declare function checkCommand(cmd: string, args?: string[]): Promise<boolean>;
/**
* Parse subprocess output as JSON or return raw string.
*/
export declare function parseOutput(stdout: string): unknown;
//# sourceMappingURL=base.d.ts.map