Status: Initial plan — results are appended as phases complete.
| Area | Planned coverage |
|---|---|
altai-core |
Config precedence, event schema, palette manifest, secret redaction, workspace leases |
altai-cli |
Argument parsing, help snapshots, desktop routing, output/exit-code contracts |
| IsanAgent adapter | Session resume, runtime events, approvals, cancellation, compaction, model switching |
| TUI | PTY interaction, 80/100/160-column snapshots, truecolor/ANSI/no-color modes |
| Integration | Real temporary workspace, installed binary, durable state sharing, concurrent ownership |
| Packaging | macOS, Linux, and Windows installed-command smoke tests |
- Interactive edit with an approval, followed by desktop session resume.
- One-shot JSONL run with stdout-only machine output and deterministic exit code.
- Model switch, fallback failure, cancellation, and timeout.
- Background job promotion, restart, inspection, and cancellation.
- Skill installation, MCP probe, checkpoint restore dry-run, and automation lifecycle.
- Orchestration lifecycle from readiness scan through stop/recovery.
- Narrow terminal, no-color terminal, and screen-reader-compatible line mode.
- Tests invoke the installed command, not only Rust library functions.
- E2E tests use the real ALTAI/IsanAgent backend and persist evidence paths.
- Snapshot updates require review of visual intent, not a blanket re-record.
- Secret values must be absent from stdout, stderr, JSONL, logs, and support bundles.
cargo test --manifest-path src-tauri/Cargo.toml -p altai-core -p altai-clipassed: 23 tests.cargo fmt --manifest-path src-tauri/Cargo.toml -p altai-core -p altai-cli -- --checkpassed.cargo clippy --manifest-path src-tauri/Cargo.toml -p altai-core -p altai-cli -- -D warningspassed.cargo check --manifest-path src-tauri/Cargo.toml --workspace --quietpassed.- CLI smoke checks passed for
doctor --json,version --verbose, Bash completion generation,open --dry-run, and the declaredagentcontract's host-unavailable exit code (10). agent --dry-runandrun --dry-runnow emit resolved workspace/state, model, permissions, theme, and output-contract previews without creating IsanAgent state or starting a host process. Relative file targets resolve to their parent workspace.config path --jsonreports the project-local ALTAI and IsanAgent configuration locations through the same workspace resolution contract.config list --resolved --show-origin --jsonresolves non-secret model, fallback, provider, and base URL fields from native IsanAgent[provider], ALTAI[agent], andALTAI_*environment layers. Smoke coverage confirms environment values win and origin labels remain machine-readable.models current --show-origin --jsonreuses that resolved configuration contract for primary and fallback model inspection.- The IsanAgent host-extraction patch is recorded at
docs/cli/isanagent-host-api.patchand published as IsanAgentmainmerge commit8c9eef2viaaltaidevorg/isanagent#98. Its isolated worktree passedcargo check --bin isanagentand a publicHostConfigunit tests; lifecycle shutdown, state/sandbox separation, and model/permission override mapping are covered by isolated host tests. ALTAI pins that commit and maps project root to the host sandbox while keeping state under.isanagent. altai-cli agentnow starts the reusable IsanAgent host for the supported TUI path.--modelis applied as a provider/model runtime override and--permissionmaps to the host shell/edit policy (ask,auto-edit,plan, orbypass); the remaining adapter flags continue to fail explicitly rather than being ignored.agent --dry-runexposes the resolved host state/config/sandbox mapping.
- Added a narrow IsanAgent oneshot host API (
run_oneshot,oneshot_prompt,observe_tx,scripted_responses, headlessaltai-clichannel). Temporarily later merged upstream viaaltaidevorg/isanagent#101; seedocs/cli/isanagent-oneshot-api.md. altai runnow performs a real one-shot host session (pretty / json / jsonl, Ctrl-C → exit 7, timeout → exit 8, non-TTY approval/clarification → exit 4).- Non-interactive runs default to
--permission planwhen no permission flag is set. cargo test --manifest-path src-tauri/Cargo.toml -p altai-clipassed: 17 tests, includingoneshot_smoke_completes_with_scripted_provider.cargo run -q -p altai-cli -- run . --prompt "summarize this project" --dry-runstill emits the resolved preview JSON.
- Wired ALTAI terminal palette roles (truecolor RGB derived from
src/styles/globals.css) through IsanAgentTheme+HostConfig.theme. altai agent --theme auto|dark|light|no-coloris unblocked;NO_COLORandALTAI_TUI_THEMEresolve viaaltai_core::resolve_terminal_appearance*.- Dense status header shows
ALTAI · workspace · model · permission · session. - Responsive layout: narrow (<80), medium (80–119), wide (120+) with transcript
- secondary pane split when a side pane is focused.
--no-tuiline mode prints a status banner and labeled outbound lines.- Width-fit snapshot coverage at 80/100/160 columns (string snapshots; full PTY golden frames deferred).
cargo test -p altai-core -p altai-cli→ 35 tests; IsanAgentwidth_fit+theme+ oneshot host tests pass against the (then) path pin.
- Approval replies accept
approve/deny/always(this process) /abort; session grant cache skips repeat prompts for the same shell/edit key. - Edit approvals carry unified diffs into the TUI transcript and line mode;
hotkeys
y/n/a/x(and1–4) submit when an approval is pending. - JSONL emits
edit_diff+clarification_requested(in addition to shellapproval_requested). Edit oneshot outcomes map toApprovalRequired. - Plan mode parity with desktop: shell
ask, editdeny(altai_core::policy+ host mapping). /dev/ttyhelper added for future interactive resume; oneshot still exits4when approval is required without a live TUI.cargo test -p altai-core -p altai-cli→ 38 tests; IsanAgent approval/diff/ policy unit tests pass.
altai-core::compactionresolves--no-auto-compact/--compact-threshold/--compact-tail(plusALTAI_DISABLE_AUTOCOMPACT/ALTAI_COMPACT_*env) into IsanAgentHostConfig.compact_*/AgentLogicParams.- Line mode supports
/context,/compact [focus], and@pathattachments (text / image / PDF) with fuzzy basename resolve under the sandbox. altai run --fileand oneshot loads real file content viaload_host_file_attachments(not path-only notes). Line mode merges--fileattachments into the first user message; TUI still seeds@pathinto the composer (parsed on send).- Dry-run for
agent/runincludes acompactionpreview object. - Focused tests:
altai-corecompaction, attachment unit tests, clap compaction flag parse + preview. cargo test -p altai-core -p altai-cli→ 42 tests; IsanAgentchannels::terminal_ui::attachments→ 4 tests.
- Moved
EventJournal/JournalEvent/JournalError/AppendStatus/RunJournalSummaryfromsrc-tauri/src/altai/agent/event_journal.rsintoaltai-core::journal(Tauri-free;rusqlitemoved toaltai-core's own dependencies). Desktop'sevent_journalmodule is now a one-linepub use altai_core::journal::*;re-export, soruntime.rsandtauri_channel.rsare unchanged. All of the moved journal unit tests (migration idempotency, concurrent migration race, append/fetch ordering, duplicate/conflict handling, terminal CAS race) now run underaltai-core::journal::testsand still pass. - Added
WorkspacePaths::agent_event_journal_db()toaltai-core::workspace(<isanagent_state>/.system_generated/agent_event_journal.db), matching the path desktop'sensure_workspace_servicesalready used inline, plus a unit test. - The main Tauri crate now depends on
altai-coredirectly (src-tauri/Cargo.toml), which it previously only referenced transitively as a workspace member. - New
altai-cli::journal_sink::JournalSinkopens the sameagent_event_journal_db()duringaltai runand appends a minimal subset mirroring desktop's journalkindconventions:run_startedon the firstRunLifecycle::Startedbus message, then a singlerun_terminatedonce the oneshot host returns — synthesizing the run/chat identity from the finalOneshotResultif no bus message was ever observed (e.g. an early host failure). Append failures are logged to stderr and never fail the run.describe_oneshot_outcomewas extracted fromrun_output::FinalRunResultso the sink's terminaloutcome.kind/outcome.detailmatch therun --output jsonoutcome labels exactly. - Added
altai journal summary [--chat ID] [--json](incomplete runs + optional latest-run-for-chat) andaltai journal fetch --run ID [--after SEQ] [--limit N] [--json], both reusingaltai_core::resolve_workspace+EventJournal::openthe same wayconfig/modelsdo. CARGO_TARGET_DIR=src-tauri/target cargo test --manifest-path src-tauri/Cargo.toml -p altai-core -p altai-cli→ 56 tests passed (30altai-core, 26altai-cli), includingjournal::tests::*(the moved desktop tests) and the newjournal_sink::tests::*/journal_*_contract_*/journal_summary_and_fetch_round_trip_a_runtests.cargo check --manifest-path src-tauri/Cargo.toml -p altai(desktop crate) andcargo test --manifest-path src-tauri/Cargo.toml -p altai --lib altai::agent::runtime(34 tests, includingrun_event_tests::restart_classifies_incomplete_runs_once_without_resuming_work) both passed against the re-exported journal module.- Manual smoke:
altai-cli run . --prompt "..." --permission plan --output jsonlagainst a scratch workspace with no provider configured (so the run fails withProviderRetriesExhausted) still committedrun_started+run_terminated(outcome.kind = "failed") to.isanagent/.system_generated/agent_event_journal.db;altai journal summary --chat <id> --jsonandaltai journal fetch --run <id> --jsonround-tripped that run correctly. - Not covered in M5 (deferred to M6 follow-up): mirroring tool-call/thinking/usage bus messages into the journal.
- Oneshot channel resumes approvals/clarifications on the controlling TTY when
available (
prompt_on_tty); hotkeysy/n/a/xnormalize to approve/deny/always/abort. Non-TTY / failed tty still exits with code4. - Synced into IsanAgent upstream via
altaidevorg/isanagent#101(superseding the #99 / revert cycle). - Packaging / installed-binary CI matrix and full PTY golden frames remain open.
- After IsanAgent
mainlanded the oneshot host surface (ea90fa0), ALTAICargo.tomldeps switched back togit = "https://github.com/altaidevorg/isanagent.git", branch = "main". - Removed
tools/isanagent-oneshot. cargo test -p altai-core -p altai-cliandcargo check -p altai --libpassed against the git tip;pnpm isanagent:sync(cargo update -p isanagent) works again.
JournalSinkmirrors Desktop-shaped durable events afterrun_started:tool_call_start,tool_call_end,thinking(ToolProgress as[tool] message), andusage, withisanagent::redactbefore append.- Legacy
ToolCallStarted/ToolCallFinishedignored (no duplicate rows). - Telemetry before run identity is known is dropped.
- Unit tests cover ordered kinds, tool error field, redaction, and pre-start ignore.
altai-cli smokeCI job now runs on ubuntu-22.04, windows-latest, and macos-14 (release binary + version/doctor/completion/open/run/journal contract).
JournalSinkalso mirrorsBusMessage::Outboundas Desktopagent_message/clarification(key-presence clarification detection, string-only choices, validatededit_diff).- Adds
execution_run_finished,execution_job_finished,subagent_spawned, andsubagent_finishedtelemetry kinds. - Unit tests: 12
journal_sinkcases including pre-start ignore and malformed edit_diff omission.
- Added
scripts/package-altai-cli.sh(tar.gz / zip +.sha256). - CI
altai-cli smokepacks a release-style archive per target and uploads it as a workflow artifact (altai-cli-linux-x64/win32-x64/darwin-arm64). - Release workflow gains a
climatrix job that buildsaarch64-apple-darwin,x86_64-apple-darwin,x86_64-unknown-linux-gnu, andx86_64-pc-windows-msvc, smokes the packed binary, and attaches archives to the GitHub Release viasoftprops/action-gh-release. INSTALL.mddocuments CLI archive names and PATH install steps.
JournalSinkmirrorsRunLifecycleEvent::Warning/WarningClearedas Desktoprun_warning/run_warning_clearedafterrun_started, scoped by(chat_id, run_id).Terminatedstill ignored (oneshotfinalizeowns the terminal row).- Background / notification bus traffic is not journaled — matches Desktop
(
is_system_eventUI-only), not a CLI gap. - Unit tests: 14
journal_sinkcases including foreign-run warning ignore.
- Bumped IsanAgent lock to
7018685(ACP agent support fromisanagent#102). host_adapter::acp_host_configsetsHostConfig.acp_mode = true.- New
altai acpcommand starts IsanAgent as an ACP JSON-RPC server on stdio (for Zed and other ACP clients). Distinct fromaltai serve --stdio(ALTAI agent-host protocol). - Clap dry-run preview includes
kind: "acp"andhost.acp_mode. - Unit tests: host adapter ACP flag + clap contract parse.