31 Commits

Author SHA1 Message Date
guyuming bf5931e7c1 fix(runtime): close API clients on shutdown
Close API clients when the runtime shuts down to release HTTP connection pool resources, and surface the active session ID in /session output.

Cherry-picked from PR #273. Excluded the embedded-wrapper session resolver and memory parser API changes because they need a narrower public API design.
2026-05-27 10:19:21 +00:00
Mcy0618 033dce67b1 fix(runtime): refresh prompt for permission mode changes
Inject the active permission mode into the runtime system prompt so plan/default/full-auto state is visible to the model.

Refresh the engine model, effort, permission checker, and system prompt when runtime-affecting slash commands update settings.

Based-on: #268
2026-05-24 09:10:10 +00:00
tjb-tech fea0b75bc4 fix(auth): show subscription setup errors
Preserve subscription-auth failures instead of rewriting them as missing API keys, and point Claude/Codex subscription users at the correct login and provider commands.

Fixes #254
2026-05-24 09:01:35 +00:00
tjb-tech 6243793ec0 fix(tui): keep image paste CI stable 2026-05-17 06:18:59 +00:00
tjb-tech 330ece7a62 feat(tui): support clipboard image paste
Fixes #265
2026-05-17 06:13:19 +00:00
yl-jiang f61f70d7b1 feat(tui): preview diffs before edit and write approval
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 13:44:43 +08:00
tjb-tech c835d7cf2e feat(model): manage profile model allowlists
Add /model list/add/remove/clear so a single provider profile can expose multiple switchable models in the TUI selector. Also add regression coverage for invalid grep regexes in the Python fallback.\n\nFixes #222\nRefs #218
2026-05-01 12:38:48 +00:00
tjb-tech 9a8a14331d fix(tasks): preserve multiline prompts for task workers 2026-04-28 02:41:33 +00:00
tjb-tech 25f2043f53 Merge branch 'pr-201' into merge/rest-20260428 2026-04-28 02:35:11 +00:00
ancietyding b731c3ede1 fix(tui): allow escape to interrupt active runs
Add an explicit frontend-to-backend interrupt request so Esc can stop the current agent turn without relying on platform-specific terminal signals.
2026-04-27 14:17:49 +08:00
José Maia 3e09dde114 fix(ui): drain coordinator async agents in interactive backends
Issue #195: in coordinator mode, the React TUI and Textual app never
injected `<task-notification>` envelopes after a worker finished.
`run_print_mode` had `_drain_coordinator_async_agents` wired in, but
`ReactBackendHost._process_line` and `TextualApp._process_line` only
called `handle_line` and returned, leaving the contract documented in
the coordinator system prompt (results arrive between turns) unmet.

Extract the drain helpers into `openharness.ui.coordinator_drain` and
invoke `drain_coordinator_async_agents` from both interactive hosts
after `handle_line` when coordinator mode is active. The shared module
also avoids a circular import between `ui.app` and `ui.backend_host`.
2026-04-27 00:45:43 +01:00
tjb-tech 1325770b28 fix(plugins): defer tool imports for disabled plugins 2026-04-25 06:10:37 +00:00
tjb-tech 1c00020d36 fix(coordinator): wait for async agent tasks in print mode 2026-04-19 14:56:47 +00:00
Hinotobi 59017e0988 fix(plugin): address code execution via untrusted plugin activation (#156)
* [security] fix(plugin): require explicit trust for project plugins

* test: clarify project plugin secure-default behavior
2026-04-17 18:00:13 +08:00
yulin ed0b5f02ab fix(tui): write trailing newline on exit so shell prompt starts on a fresh line (#133)
* fix(tui): write newline on exit so shell prompt starts on fresh line

Ink hides the cursor during rendering and restores it on exit, but does
not emit a trailing newline.  When the TUI process ends, the terminal
cursor sits at the end of the last rendered line, causing the shell
prompt to appear directly concatenated with the TUI output.

Rename restoreCursor → restoreTerminal and append '\n' alongside the
cursor-show escape sequence so the parent shell always receives the
prompt on a clean new line.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(tui): add regression guard for exit newline; update changelog

- Add tests/test_ui/test_tui_exit_sequence.py with two tests:
  * test_tui_exit_handler_writes_newline: asserts the cleanup write
    includes the trailing \n alongside \x1B[?25h
  * test_tui_exit_handler_registered_for_all_signals: asserts cleanup
    is registered for 'exit', SIGINT, and SIGTERM
- Add entry to CHANGELOG.md [Unreleased] Fixed section

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(tests): update ohmo cli test inputs for allow_remote_admin_commands prompt

Commit dd1d235 added a new 'Allow explicitly listed administrative slash
commands from remote channels?' confirmation step to the gateway config
wizard, but the four interactive test cases in test_ohmo/test_cli.py were
not updated to provide an answer for it. This caused stdin to be exhausted
and click to emit Abort(), making all four tests fail with exit_code=1.

Add 'n' as the answer for allow_remote_admin_commands in each affected
test, and move the existing 'restart gateway' answer after it in
test_ohmo_config_interactive_can_restart_gateway.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-13 18:49:47 +08:00
tjb-tech 327c6ed2ff fix(ui,openai): reduce TUI flicker and make timeout configurable 2026-04-11 14:31:19 +00:00
Jiabin Tang a5c29495d4 Merge pull request #95 from siaochuan/fix/effective-model-display
fix(ui): show effective runtime model in header
2026-04-11 21:10:35 +08:00
tjb-tech 76d91fdfa1 fix(swarm): run subprocess teammates in headless worker mode 2026-04-10 09:50:07 +00:00
tjb-tech aca4016898 feat(compact): align lifecycle and carry-over behavior 2026-04-10 08:17:10 +00:00
siaochuan 019812515b fix(ui): show effective model in runtime header 2026-04-10 14:06:23 +08:00
tjb-tech 6fbc61fc13 fix(ohmo): support channel slash commands and stabilize tests 2026-04-09 12:31:40 +00:00
tjb-tech a6a4c3db24 fix(runtime): pass session cwd through runtime construction 2026-04-08 12:41:52 +00:00
tjb-tech 9a3586098a Merge branch 'pr-66'
# Conflicts:
#	src/openharness/ui/backend_host.py
2026-04-08 10:47:37 +00:00
tjb-tech 2f6f8b01d6 release: ship 0.1.4 fixes and ohmo updates 2026-04-08 09:53:39 +00:00
yl-jiang 55f7f8e906 fix(ui): serialise concurrent permission modals with a lock
When the LLM returns multiple tool calls in one response, query.py
executes them concurrently via asyncio.gather. If more than one tool
requires user confirmation, each concurrent _ask_permission call emits
its own modal_request event. The React frontend overwrites its modal
state on every modal_request (setModal), so only the last dialog is
ever shown to the user. The earlier futures never receive a response
and time out after 300 s, causing silent "Permission denied" errors.

This edge case was not addressed by the recent deadlock fix (69c85e4).

Fix: add _permission_lock (asyncio.Lock) to ReactBackendHost and wrap
_ask_permission with 'async with self._permission_lock'. Only one
permission dialog is live at a time; the next concurrent caller waits
until the current modal is resolved or timed out.

Add test_concurrent_ask_permission_are_serialised to verify that two
concurrent _ask_permission calls are serialised and both resolve correctly.

Co-authored-by: Copilot
2026-04-08 14:13:33 +08:00
tjb-tech 69c85e411c fix(ui): avoid blocking paste and permission responses in terminal 2026-04-07 16:30:00 +00:00
tjb-tech b9bfb0520e Merge PR #38: show friendly error on missing API key instead of traceback
Adapted to main's _resolve_api_client_from_settings() architecture.
Added _safe_resolve_auth() wrapper that catches ValueError and prints
a clear message before SystemExit(1).

Co-authored-by: José Maia <glitch-ux@users.noreply.github.com>
2026-04-07 12:06:47 +00:00
tjb-tech cd52191f6e feat(auth): add provider profiles and subscription clients 2026-04-06 08:47:10 +00:00
tjb-tech 9d8c7ddb54 fix(ui): emit utf-8 backend protocol on windows 2026-04-05 09:38:18 +00:00
小川 9ad6b28e85 fix(ui): keep CLI model/provider after slash commands (#4)
Co-authored-by: solon <solon@debian176.solon>
2026-04-05 09:00:06 +00:00
tjb-tech 5dd8b952ec Initial release: oh — OpenHarness: Open Agent Harness v0.1.0
A lightweight open-source Python implementation of the Agent Harness architecture.
44x lighter than Claude Code (11K vs 512K lines), 98% core tool coverage.

- 43 tools with Pydantic validation and parallel execution
- Skills system compatible with anthropics/skills (17+ tested)
- Plugin system compatible with claude-code/plugins (12+ tested)
- API retry with exponential backoff
- Multi-level permissions with path rules
- React/Ink TUI with "Oh my Harness!" branding
- 114 unit tests + 6 E2E test suites
- MIT License
2026-04-01 16:32:25 +00:00