Skip to main content

Crate abstractcode

Crate abstractcode 

Source
Expand description

abstractcode — AbstractCode on AbstractTUI, speaking to AbstractGateway.

The agent runs durably on the gateway; this crate is a reactive terminal client: it starts runs, streams ledgers live, renders cycles/tools/ answers, resolves approval + ask-user waits, steers mid-run, and keeps a durable session (server-side history replay).

Layer map:

  • config: connection and preference resolution — the login store and prefs.json.
  • gateway: blocking HTTP client + SSE ledger streaming.
  • protocol: pure extraction over ledger records (waits, tools, usage, flow output).
  • transcript: the fold from records to transcript items, stats, and pending waits.
  • store: the reactive signal store (UI thread owns all writes).
  • runner: the worker thread owning every HTTP call and stream.
  • ui: AbstractTUI views (chrome, transcript, modals).
  • cli, exec: argument parsing, doctor/login, headless one-shots.
  • export: /export renderers (archival markdown + SFT JSONL).

Modules§

cli
Command line: argument parsing, login, doctor, and shared options.
commands
Slash-command parsing for the composer.
config
Connection + preference resolution.
convo
Entity conversation state: Focus, EntityConvo, and the turn/recovery state machine as a PURE fold (offline-testable — every transition is a function over the convo + a parsed response; threads and signals live elsewhere).
discovery
Catalog / discovery parsing — PURE functions over gateway JSON.
entities
Entity collaboration: types + parsing for the gateway entity lane.
exec
Headless one-shot runs: abstractcode exec "<prompt>".
export
/export — transcript export: archival markdown + SFT/CPT JSONL.
gateway
Blocking HTTP client for the AbstractGateway control plane.
mention
@name mention parsing + the ‘@’ completion provider rule.
paths
App-side half of the path pipeline. The ENGINE owns drop-spelling classification (abstracttui::input::paste::classify — pure string parsing, the cross-terminal corpus); this module owns what the ruled split assigns the app: ~ expansion, existence checks, and file-vs-directory classification against the REAL filesystem.
preview
Attachment preview: what a staged file ACTUALLY is, shown BEFORE it rides a run.
project_context
Project instructions (AGENTS.md) for gateway agent runs — CLIENT-SIDE discovery, server-side application.
protocol
Pure extraction over gateway ledger records.
run_input
Build input_data for gateway agent runs (abstractcode.agent.v1).
runner
The worker: owns the gateway client, run streams, and every HTTP call.
store
App-scale reactive state: a store struct of signals provided as context.
tool_policy
Persistent tool-approval tiers: which tool batches auto-approve.
transcript
The transcript fold: ledger records -> UI items, stats, pending waits.
ui
Root view composition + orchestration (timers, toasts, modals).

Functions§

run_cli
Full CLI entry: parse args, route subcommands, run the TUI. Returns the process exit code.