Skip to content

feat(host): oneshot, theme, approvals, attachments, compaction - #101

Merged
monatis merged 4 commits into
mainfrom
feat/altai-host-oneshot-theme-approvals
Jul 30, 2026
Merged

feat(host): oneshot, theme, approvals, attachments, compaction#101
monatis merged 4 commits into
mainfrom
feat/altai-host-oneshot-theme-approvals

Conversation

@efecnc

@efecnc efecnc commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-opens the #99 host API work for Monatis review/merge after #100 reverted the premature merge.

  • Public host additions for ALTAI CLI: run_oneshot, oneshot_prompt, observe_tx, scripted_responses
  • HostThemeMode (auto/dark/light/no-color) wired into TUI/line mode
  • Four-way approvals (approve/deny/always/abort) + edit-diff metadata; plan-mode shell/edit policy
  • Real --file / @path attachments (text/image/PDF) with fuzzy basename resolve
  • compact_auto / compact_threshold_tokens / compact_tail_turns host overrides
  • Line-mode /context + /compact
  • Oneshot /dev/tty approval resume; logger re-init fix for multi-host tests

Please only Monatis merge this PR.

Test plan

  • cargo test --lib host::
  • cargo test --lib channels::terminal_ui::attachments
  • cargo test --lib channels::terminal_ui::approval
  • cargo check --all-targets --locked
  • Smoke: scripted oneshot completes; interactive approval hotkeys y/n/a/x

Made with Cursor

* feat(host): oneshot runs, theme, approvals, attachments, compaction

Add ALTAI-facing host APIs: run_oneshot + observe/scripted providers,
HostThemeMode, four-way approval overlays with edit diffs, text/PDF
@file attachments, and compact_* HostConfig overrides for CLI parity.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(oneshot): resume approvals on controlling TTY

When /dev/tty (or CONIN$) is available, prompt for approve/deny/always/abort
instead of exiting with ApprovalRequired. Non-TTY callers keep exit-4 behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(bin): use public host::HostThemeMode in main

cargo check --all-targets failed because the binary cannot reach the
crate-private channels::terminal_ui module.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(logging): allow re-init when logger already installed

Tests that start multiple hosts in one process hit SetLoggerError; treat
an already-installed runtime logger as success.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 209d76e)

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR successfully introduces headless one-shot command execution for embedding hosts. The implementation includes proper error handling, TTY approval resumption, and comprehensive test coverage. All changes are well-structured and follow established patterns in the codebase.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

efecnc and others added 3 commits July 30, 2026 11:01
Allow /key in TUI and line mode after the session opens: hot-swap via
SwitchModel and persist api_key into config.toml without echoing secrets.

Co-authored-by: Cursor <cursoragent@cursor.com>
@monatis
monatis merged commit ea90fa0 into main Jul 30, 2026
1 check passed
@monatis
monatis deleted the feat/altai-host-oneshot-theme-approvals branch July 30, 2026 12:45
efecnc added a commit to altaidevorg/altai-app that referenced this pull request Jul 30, 2026
Drop the temporary tools/isanagent-oneshot path pin now that
altaidevorg/isanagent#101 landed on main (ea90fa0), and restore the
branch-tracked git dependency used by isanagent:sync / CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
efecnc added a commit to altaidevorg/altai-app that referenced this pull request Jul 30, 2026
Drop the temporary tools/isanagent-oneshot path pin now that
altaidevorg/isanagent#101 landed on main (ea90fa0), and restore the
branch-tracked git dependency used by isanagent:sync / CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants