executespec-core
v0.2.1
Published
Shared client core for the ExecuteSpec CLI and VS Code extension — typed REST/SSE client, PAT auth, and the local tool runtime for the local-hands/remote-brain execution model. No business logic lives here; the server keeps the agent loop, prompts, model
Readme
executespec-core
Shared TypeScript client core for ExecuteSpec CLI and VS Code clients.
This package contains the typed REST/SSE client, browser-login helpers, PAT token handling, provider helpers, chat/session primitives, and local tool-runtime contracts used by the public clients. It does not contain the ExecuteSpec agent loop, prompts, model routing, scoring, billing, or project execution logic. Those remain server-side.
Install
npm install executespec-coreDefault Host
The default backend is:
https://dev.executespec.aiConsumers can override it with EXECUTESPEC_HOST, stored client config, or an explicit host option.
Usage
import {createClient, resolveConfig} from 'executespec-core';
const config = resolveConfig();
const client = createClient({host: config.host, token: 'es_pat_...'});
const me = await client.getMe();Runtime Model
ExecuteSpec clients are thin clients:
- local clients hold credentials and optional local tool execution state
- the backend owns the agent loop, plan gate, model routing, scoring, and run history
- managed-AI credit state is read from
/api/billing/managed-ai/*; unlimited BYOK/Team/Enterprise tiers useunlimitedAiCredits=trueand-1included/remaining credit sentinels - local-hands execution is opt-in and guarded by the caller surface
- local-hands
TOOL_CALLevents are executed sequentially: the client runs the local tool, posts the result, then resumes SSE reading so the backend cannot be left waiting on a stranded pending call - app-shell continuity state includes the
launcherroute used by the CLI TUI as the workflow hub before entering runs, evidence, diff, permissions, settings, or session panes
License
Proprietary. All rights reserved.
