trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
66 lines • 2.79 kB
TypeScript
/**
* Sprites CLI helpers
*
* Wrapper functions for interacting with the Sprites VM platform CLI.
*/
/**
* Run a sprite command and capture output.
*/
export declare function runSpriteCmd(args: string[]): Promise<string>;
/**
* Run a remote shell command on a sprite (`bash -c`).
* Wraps commands so flags like `mkdir -p` are not parsed as sprite CLI flags.
*/
export declare function runSpriteExec(spriteName: string, shellCommand: string, extraArgs?: string[]): Promise<string>;
/**
* Upload a local file to a sprite via `exec --file` (Sprites CLI has no `cp` subcommand).
*/
export declare function runSpriteCopy(localPath: string, spriteName: string, remotePath: string): Promise<void>;
/** Remote shell snippet: install Bun if missing and print resolved binary path. */
export declare const SPRITE_ENSURE_BUN_SH: string;
/**
* Stop a Sprite service and kill orphaned bun processes that may still hold
* the HTTP port after `services delete`.
*
* Use a path-based pkill pattern (not `bun run server.js`) so the remote
* `bash -c '…pkill…'` command line does not match itself → exit 143.
*/
export declare function spriteStopServiceSh(service: string, pkillPattern: string): string;
/** Register a bun script as a sprite-env service on the given HTTP port. */
export declare function spriteStartServiceSh(opts: {
service: string;
bun: string;
script: string;
dir: string;
port: number;
}): string;
/** Stop trellis-db room service (see spriteStopServiceSh). */
export declare const SPRITE_STOP_TRELLIS_DB_SH: string;
/** Start trellis-db room service. */
export declare function spriteStartTrellisDbSh(opts: {
bun: string;
port: number;
}): string;
/** Parse `sprite url` stdout → `https://…` (no trailing slash). */
export declare function parseSpriteUrlOutput(stdout: string): string;
/** Resolve the sprite's assigned public HTTPS URL (`sprite url -s <name>`). */
export declare function resolveSpritePublicUrl(spriteName: string): Promise<string>;
/** Make the sprite URL reachable without org auth (TurtleDB API uses its own key). */
export declare function ensureSpritePublicAccess(spriteName: string): Promise<void>;
/**
* Create a sprite if it does not already exist.
*/
export declare function ensureSprite(spriteName: string): Promise<void>;
/**
* Run a sprite command with inherited stdio (for interactive commands).
*/
export declare function runSpriteInteractive(args: string[]): Promise<void>;
/**
* Assert that the sprite CLI is available and authenticated.
*/
export declare function assertSpriteCli(): Promise<void>;
/**
* Resolve a sprite name from explicit flag, active VM config, or error.
*/
export declare function resolveSprite(explicitName?: string): string;
//# sourceMappingURL=sprites.d.ts.map