Commit Graph
67 Commits
Author SHA1 Message Date
retoor 609e5d8e91 v1.43.1: sync README (tool counts, MCP resolver plus OAuth, research stats) 2026-10-18 21:14:13 +02:00
retoor 58786386cf v1.43.0: automatic MCP GitHub resolver agent plus stdlib-only OAuth login
- mcp_resolve_agent: bounded fork subagent fallback when the
  deterministic GitHub pass finds no run contract (MCP_RESOLVER_*).
- McpOAuth/McpOAuthCallback: discovery, DCR, PKCE loopback, token
  exchange, sealed per-profile token storage, one-shot refresh.
- McpHttpError carries status plus WWW-Authenticate through the
  client; bridge retries once after refresh, else names mcp_login.
- mcp_add stores 401-gated servers disabled; mcp_login approves,
  verifies, enables; mcp_remove drops tokens.
- Docs, conclusions, 17 new tests (1209 + 16 green).
2026-10-18 20:38:52 +02:00
retoor 66ed0f9ea6 MCP both directions: client bridge plus --serve-mcp (1.42.0)
- client: stdio + Streamable HTTP transports, 2025-11-25
  handshake/list/call/ping, vault mcp_servers with sealed headers,
  per-profile enable, description-hash pins, tool cache
- mcp_normalize: pasted JSON/TOML configs (type repair, ${VAR}
  expansion from env then vault secrets, allow/deny lists);
  github URLs resolve via registry/package/README with live
  handshake verification before storing
- bridge: enabled tools enter lazy select_tools as
  mcp_<server>_<tool>, dispatch fallback, approval like non-safe
  shell, drift re-prompt, 64KB spill, per-call audit
- 7 agent tools: mcp_add/list/enable/disable/remove/tools/call
  (native count 42->60 in README, was already stale at 53)
- server: --serve-mcp KEY (+ --mcp-port/--mcp-bind) serves all 60
  native tools plus chat (agent turn, per-session history) and
  completions (stateless, current model) over single-threaded
  HTTP with Bearer auth, sessions, idle expiry; yolo documented
- rotation + plaintext-boot refusal cover sealed headers
- mcp.md contract with drift tests; 47 new tests; live loopback
  verified (client->serve over real HTTP)
2026-10-18 19:46:55 +02:00
retoor 251c3dc2ba research: mcp-client-support subject (106 sources, 3 conclusions)
- wire spec: lifecycle, stdio + Streamable HTTP transports, tools,
  utilities, legacy SSE, versioning, changelog (14 Tier 1)
- client ecosystem: Claude Code/VS Code/Cursor/Codex configs,
  mcp-remote, Smithery, registries, Glama (12 Tier 1)
- security/ops: authorization draft, trust model, poisoning,
  rug pulls, production hardening (12 Tier 1) + 68 Tier 2 cards
- conclusions: minimal stdlib client on 2025-11-25, normalizer +
  resolver agent for pasted configs/GitHub URLs, untrusted-until-
  consent trust model; nothing built yet
- audit PASS (14 subjects, 797 sources, 32 conclusions)
2026-10-18 19:23:02 +02:00
retoor fa4e638a5c Vault-backed settings catalog with three-function API (1.41.0)
- SETTINGS_CATALOG: 28 env-mapped settings with type, default,
  required/nullable, strict options, preferred (reserved), encrypted
  flags, per-key bool word sets; routing split into
  CONFIG_SETTING_FIELDS (Config build) and SETTING_EXPORT_KEYS
- Store.get_or_create_settings / get_all_settings /
  upsert_settings: global+profile scopes, atomic strict validation,
  canonical forms, created/updated timestamps, env/db/default source
  reporting; encrypted values sealed at rest, rotation-aware,
  plaintext-boot refusal covers the table
- boot_settings in boot() and default_runner: Config second pass
  (env wins, CLI --no-opencode wins) plus env export for peripheral
  and applied keys; applied keys printed at boot
- settings.md contract with full catalog and exclusion rationale;
  16 SettingsTests incl. catalog self-check and doc drift guard
2026-10-18 14:15:35 +02:00
retoor 789f5206c4 docs: skills.md contract for the skill system and bundled set
- discovery/frontmatter contract incl. the bare->/| subset limit
- bundled table with upstream provenance and adaptation rules
- install target semantics, sidecar shape, maintenance workflow
- wired in AGENTS.md, README layout; drift test in BundledSkillsTests
2026-10-18 13:51:44 +02:00
retoor 1d2e861c7c Six bundled default skills with skills install target (1.40.0)
- BUNDLED_SKILLS embeds deep-research, seriousdevelopment, git, plan,
  requirements-clarification, taste (21 files), adapted for tai:
  load_skill, ask_user, fork/poll workers, web_fetch (never curl),
  single-line descriptions, no em dashes; seriousdevelopment verbatim
- new skills install target (12th): install writes missing only,
  upgrade refreshes pristine and loudly keeps user-modified files,
  reinstall rebuilds tracked files keeping extras, uninstall removes
  only unmodified content; sidecar records upstream provenance
- bare --install includes skills; run_install refreshes live skills
- README: Skills section bundled paragraph, twelve targets
2026-10-18 13:47:07 +02:00
retoor f97eb255ed docs: AGENTS.md replaces fictional devops bot and profiles with the real model 2026-10-18 13:27:05 +02:00
retoor 88dba08236 docs: README research-driven development section with archive stats 2026-10-18 13:24:55 +02:00
retoor 5d2c9d478c docs: README covers CAP, goal verification, caps, retrieval eval
- new CAP section (agent + orchestrator directions, drivers, gaps)
- one-shot exit codes, --continue, approval re-ask behavior
- sandbox resource caps, scheduler burst/lease/no-retry
- --eval-retrieval, CAP_SESSION_CONFIG, layout additions
2026-10-18 13:22:20 +02:00
retoor cc1c130b51 CAP protocol both directions: agent speak plus orchestrator drivers (1.39.0)
- Agent side: --cap-manifest plus --cap-speak stream-json binding with
  transcript-diff frames, diff/transcript artifacts, session config
- Orchestrator: PTY driver (settle heuristics on PtyProc/TuiVtScreen),
  stream-json, ACP-stdio (permission/elicit/fs/terminal serving) and
  A2A drivers (dual draft/current spelling, SSE mapping)
- Sessions, fleets: worktrees, master plans, mediated routing,
  budget refusal, audit log, research auto-answerer, --cap CLI
- cap.md contract with drift tests; research/cap-protocol archive
- Suites 1119 + 16 green
2026-10-18 13:17:35 +02:00
retoor 8c5e5bd16c Restore tai.py executable bit dropped by the release bump rewrite 2026-10-18 12:13:34 +02:00
retoor af080fe68e Strict goal verification, approval hardening, retrieval eval, work limits, sandbox caps (1.38.0)
- Approval: re-prompt unknown answers (max 3), shell-only affirmative
  guidance recovery; destructive actions stay strict
- GoalVerifier subagent with strict JSON verdicts, bounded follow-up
  rounds, nonzero exit plus open turn on unverified one-shots
- Retrieval eval (Hit@K/MRR/nDCG/Context Precision), FTS cascade with
  title weighting, query/read event logging, --eval-retrieval CLI
- Supervisor caps (8 parallel, 64 records) and scheduler hardening
  (4 fires/tick, per-schedule lease, stated misfire policy)
- Sandbox box resource trio: 2g/2.0/256 at create, best-effort
  update for existing boxes, rm -f recovery pointer
- Research archive: 12 subjects, 667 sources, 27 conclusions;
  suites 979 + 16 green
2026-10-18 12:13:24 +02:00
retoor fb72ab8a7f Update 2026-10-18 02:00:53 +02:00
retoorandClaude Sonnet 5.5 bdb732e918 Agents can drive the running grr TUI: a private unix control socket in --tui and six tui_* tools (screen, keys, type, click, goto, result) whose calls can be async jobs; documented in grrtui.md, 9 tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 20:00:47 +02:00
retoorandClaude Sonnet 5.5 ad8c241e6e Commit everything on disk: capability text, codex and gemini sandbox switches, test updates, examples/ and mplex.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 19:54:12 +02:00
retoorandClaude Sonnet 5.5 560ab4cb4d grr TUI: message cards coerce odd server values (None, numbers, lists) instead of raising; a seeded 400-message fuzz of every card kind at three widths is part of the suite
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 19:52:04 +02:00
retoorandClaude Sonnet 5.5 690264013c tai.py --tui is the grr app in the terminal: a stdlib client of the grr server with every screen (drawer, bots, profile, chat with approvals, questions, files and live process cards, automations, library, projects, search, the whole settings tree, bot computer terminal, side pane), the grr palette, strings and caps read from the server; old Telegram-style scene kept as --tui-local; spec in grrtui.md with drift tests, 77 unit tests, 4 integration tests through the real binary and a real model
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 19:48:30 +02:00
retoorandClaude Sonnet 5.5 0c2151ad08 Streaming tool calls tolerate argument fragments under a fresh index; empty or invalid tool arguments repaired in history (fixes HTTP 400 cascade)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 01:24:24 +02:00
retoorandClaude Sonnet 5.5 a103fa0611 Free model lists discovered live for zen, pollinations, openrouter, devplace; fallbacks refreshed; research archived
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:57:12 +02:00
retoorandClaude Sonnet 5.5 1298a4fe5d Backend retries only transient failures, history cleaned of nameless tool calls, stale dir pins ignored, @molodetz routes to devplace/molodetz
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:51:47 +02:00
retoorandClaude Sonnet 5.5 07f3b36e32 Lazy TUI, remaining gaps closed: no heartbeat, DECLRMM margins, skip-clean layout, watched user state, terminal row reuse, geometry animation
The loop now sleeps until woken (no 1 s heartbeat); SIGCHLD and a drained pty writer wake it, the latter also fixes a busy writer callback. Partial layout no longer climbs the whole tree for all-auto panels: arrange() skips panels whose box is unchanged and that nothing under them asked about (a pending flag that survives hidden ancestors), measured() keeps measures until a touch drops them, and only really arranged panels are diffed; one leaf growing in a 301-panel all-auto tree costs 0.29 ms instead of 4.6 ms. A scroll offset written out of range arranges that panel for its clamp. TuiWatched is the base for state objects (TuiStyle and TuiSpan are ones): a write to a public field touches every panel holding it, directly or through a watched list, dict or set. TuiTerminal keeps converted screen rows keyed by content (200x50 scroll-by-one frame 16.0 ms to 1.8 ms). The terminal scroll uses left/right margins (DECLRMM) when the startup DECRQM probe says the terminal has them, so the sidebar beside a transcript is not touched (3-line scroll at 80x24: 1354 B to 734 B in the emulator); TuiVtScreen implements the margins and answers DECRQM. The scroll cost model counts runs and style switches the way diff_row writes them and its constants were swept over 1200 recorded frames. animate() of x, y, w, h now starts from the drawn place and writes whole cells.

Not verified on a real terminal: the margin path (tmux has no DECLRMM). Remaining gaps are listed in tui.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.36.0
2026-10-12 19:42:47 +02:00
retoor b37281390f Per-shell conversation contexts: ShellSession id per shell instance, TAI_SESSION var, vault session tree, /ctx
Each bash/zsh/fish instance resolves a stable dated id (no install hook);
transcripts and turn state scope per session so every new shell starts
fresh, while vault data stays shared. Parent links accrete in the
shell_sessions table with stub rows for outer shells, and /ctx renders
the ancestor path plus children. TAI_SESSION pins or overrides the scope.
2026-10-12 19:10:06 +02:00
retoorandClaude Sonnet 5.5 f22d15a2f7 Lazy TUI, the rest: watched state, incremental layout, terminal scroll, row reuse, event-driven loop
Closes every gap listed under "Lazy rendering gaps" in tui.md.

State a panel keeps in a list, dict or set (nested, depth cap 4) or a TuiStyle is watched, so an in-place mutation repaints the panel with no touch(). Layout arranges only the subtrees that asked, from the nearest ancestor with a fixed size, and a touched auto-sized panel is measured again so text that grows relays out; app.verify checks every partial pass against a full arrange. A log that scrolls moves the terminal's rows (DECSTBM, IND, RI) when an exact cost count says it writes less, and keeps each line's converted row (cap 4096), so a 3-line scroll at 200x50 writes 1.8 KB instead of 7.9 KB and a line appended while pinned costs 0.6 ms. The main loop sleeps until a timer, an animation, a half-read key or a wake() (touch from any thread, pty, SIGWINCH, quit, end of input): 5 s idle at 200x50 is 7 loop iterations and 4 ms CPU instead of 147 and 20 ms. The chat composer resizes from a TuiChange event and its spinner timer only exists during a turn, instead of 0.2 s and 0.08 s polls.

Found by the new random-tree storm and fixed: a padding, border or alignment change that left the rect the same left stale cells (it was in v1.34.0); a bordered, padded log built a pad row too wide. Known and documented, not changed: animate() on x, y, w, h cannot work because positions and sizes read ints only.

Tests: TuiObservedTests (every mutator), TuiLayoutTests (random trees, partial equals full), TuiScrollTests (VT replay, overlays, resizes), TuiLoopTests (the real _main on pipes: wakeups, latency, timers, signals); twelve mutants of the new code were each caught. VERSION is left to the pending 1.35.0 work in the same file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 17:54:30 +02:00
retoorandClaude Sonnet 5.5 46682d42c3 mplex: copy mode matches tmux 3.6 (cursor, scrolling, search, selections), window selection history, loop survives a failing iteration, spec mplex.md
Copy mode was compared with the installed tmux 3.6 by differential fuzzing and 842 recorded results instead of being written from memory: the cursor stands between characters and remembers its column (lastcx/lastsx), pages are rows - 2, searches land at the match end for emacs keys and the match start for vi keys and scroll by tmux's rule, a failed search is a status message, emacs selections are half open and vi selections include the cursor character and the line end, select-word on blanks takes the previous word, copy-line and copy-end-of-line start a fresh selection. Window selection keeps a history (last, then previous with wrap when the current window dies), swap-window keeps the current window current, new-session -d -x -y sizes the window as given. Server loop logs and survives a failing iteration (50 in a row end it).

mplex.md is the specification (architecture, wire format, caps, every option, command and default key, what was checked against tmux, known differences); MplexSpecTests fails when it drifts from the code. New: MplexCopyModeVersusTmuxTests (tmux-recorded fixtures), MplexSessionTests, MplexServerLoopTests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 17:47:14 +02:00
retoor dfc97c31be Update. 2026-10-12 17:02:51 +02:00
retoorandClaude Sonnet 5.5 4fb146edb2 Lazy TUI rendering: per-panel cell cache, front-to-back occlusion, damage rects; a typed character costs 0.08 ms instead of 4.6 ms at 200x50, an unchanged frame writes nothing
Panels cache their painted cells and repaint only after touch(); any attribute write on a mounted panel is the change signal. The compositor builds a frame front to back with per-row coverage (a fully covered panel is never painted), keeps the screen it believes is shown, and recomposes and diffs only damaged rects, with a layout pass that diffs panel geometry. Anonymous dirty_paint()/dirty_layout() still drop every cache, so unaudited callers are slow, never wrong. Also: TuiStyle.key() cached, measure() memoized per layout pass, hit map built on first mouse event, damage recorded under a lock for turn threads, rect count capped at 64.

The original compositor is kept as compose_reference; TAI_TUI_VERIFY=1 checks every frame against it. New TuiLazyTests: seeded 400-step storm replayed through the VT emulator, mutation checks, thread race, laziness counters.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.34.0
2026-10-12 15:10:02 +02:00
retoorandClaude Sonnet 5.5 1367373792 Theme switch repaints every cell: cells are diffed by role name, so F4 left old-theme speckles on spaces and unchanged glyphs; fix a loop-less live stream test that never fired its timers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.33.1
2026-10-12 14:34:54 +02:00
retoorandClaude Sonnet 5.5 b4bae3c34d AGENTS.md: command output rule, live streaming and prompt relay for every process an agent runs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 13:49:58 +02:00
retoorandClaude Sonnet 5.5 d030a4a1d3 Shell output streams live as a scrolling message in the chat TUI and REPL; commands that stop on a prompt (sudo, ssh, y/n) run on a pty and ask you, with the wait excluded from the timeout
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.33.0
2026-10-12 13:49:52 +02:00
retoorandClaude Sonnet 5.5 72f337f012 Chat TUI: one session per bot, so a long task in one bot never blocks talking to another; background approvals wait for you, counted stdio guard for concurrent turns
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.32.0
2026-10-12 13:06:35 +02:00
retoorandClaude Sonnet 5.5 3c3c498b49 Input history lives in the sealed vault (input_history table) shared by the REPL and chat TUI; one-time import of the old history file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.31.0
2026-10-12 12:56:46 +02:00
retoorandClaude Sonnet 5.5 305b8f747e Chat composer: readline-style input history with Up/Down, shared with the REPL history file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.30.0
2026-10-12 12:50:17 +02:00
retoorandClaude Sonnet 5.5 80bb245be7 TUI: honest phases (thinking/running/typing/online) with animation, real approval and ask_user dialogs instead of silent denial, 18x faster frames, paint on input, fd fixes for turn-thread stdout swap
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.29.0
2026-10-12 12:45:50 +02:00
retoorandClaude Sonnet 5.5 e8e88cb741 TUI loop is asyncio: readers/writers plus frame clock, agent turns offloaded to a thread so the UI never freezes; spinner while thinking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.28.0
2026-10-12 12:23:57 +02:00
retoorandClaude Sonnet 5.5 ac813ab731 Redesign --tui chat scene: colorful borderless layout, markdown bubbles, tool chips, rounded composer; fix clipped composer and hidden-panel gap
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.27.0
2026-10-12 12:17:36 +02:00
retoorandClaude Sonnet 5.5 60fb9150c4 Run opencode as build agent (plan injects READ-ONLY notice), flag workers with 0 tool calls
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.26.1
2026-10-12 08:46:35 +02:00
retoor c1c9b5c9f6 Wow 2026-10-12 08:37:48 +02:00
retoor f9c48c6b93 Update 2026-10-12 03:10:25 +02:00
retoorandClaude Sonnet 5.5 9b57f936b8 Add describe_image tool (rsearch /describe), show result count and description after search/describe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:09:39 +02:00
retoorandClaude Sonnet 5.5 0e880a6041 Add --update-models: rediscover provider model lists, prune stale health entries
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 02:14:04 +02:00
retoorandClaude Sonnet 5.5 f3c9d3eef7 Add --no-opencode flag to skip opencode backends per run
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 02:12:34 +02:00
retoorandClaude Sonnet 5.5 bc4b016ff7 Strip leaked harmony control tokens from tool names
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 01:52:18 +02:00
retoor 3038c5724b Update 2026-10-12 00:53:52 +02:00
retoor afc88b8087 ask_user tool, prompt-JSON CLI repair loop, tool-loop research archive
- New ask_user core tool: mid-turn user question with option picking,
  refusing cleanly in autonomous mode, for background workers, and
  without a tty; system prompt points at it instead of prose questions.
- Structural loop control for prompt-JSON CLI backends (opencode,
  grok, claude, codex, gemini): shared cli_json_turn repairs a
  missing JSON envelope exactly once, then accepts prose; prompt
  contract hardened against narrate-without-calling.
- research/agentic-tool-loop-design: 74 sources plus 2 conclusions
  backing the loop-control decisions; INDEX updated to 6 subjects.
2026-10-11 02:54:17 +02:00
retoor 2e0e0547ed @-routing: leading tags select provider/model/bot with per-dir DB defaults
Leading @tags on any turn now route and pin: @provider pins the
backend, @model-id pins a model, @botname routes one turn (bare
@bot switches sticky), tags combine freely, @auto clears the pins,
and @path references a file by absolute path. Selections save into
the dir_defaults table keyed by directory and re-apply on next boot
there. Completion for all four kinds in the REPL (readline) and in
TUI textboxes (mentions= source on TuiTextBox/TuiPromptDialog).

Bump 1.22.0 -> 1.22.1.
2026-10-11 02:28:01 +02:00
retoor bd1c400a27 TUI: add TuiPaste event class omitted from paste commit
Selective staging after the banner commit shifted hunk offsets and
this hunk fell outside the cutoff. It completes the previous commit:
without it the paste path references a missing name.
2026-10-11 00:56:12 +02:00
retoor 147e46f89b TUI: bracketed paste plus slash-command autocomplete
Paste: enable CSI ? 2004 mode, parse ESC[200~...ESC[201~ into one
TuiPaste event routed to the focused panel, literal body, over-cap
pastes dropped whole. TextBox inserts with CR/CRLF normalized,
Terminal queues bytes to the pty, unmarked CRLF coalesces to one
Enter, idle flush no longer shreds slow pastes.

Complete: new TuiAutocomplete popup owned by TuiTextBox via
complete=, typing filters, arrows move, Enter accepts, Esc
dismisses. tui_complete_command feeds COMMANDS with HELP_TEXT
descriptions. Demo prompt dialog wired as the showcase.
2026-10-11 00:55:33 +02:00
retoor 6295a02075 Remove per-step tai name banner from REPL output
The run_turn loop printed a bare 'tai' header before every backend
call, so each tool round got its own noise line while the REPL prompt
already identifies the program. The label carried no step, backend,
or bot info. Adds a regression test asserting no bare banner line.
2026-10-11 00:55:18 +02:00
retoor 16211480a7 Update 2026-10-11 00:10:46 +02:00