Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Implement command palette (⌘K) using cmdk and Radix Dialog with a global action registry.
- Add a keyboard shortcut system with a capture-phase hotkey manager and scope stack.
- Integrate seed navigation actions for Home, Chat, Intelligence, Skills, and Settings.
- Improve chat UX with a `useStickToBottom` hook for auto-scroll and fixed hydration errors.
- Refactor command UI to display shortcuts inline and remove the redundant help overlay.
- Fix Vite HMR connection issues within the Tauri/CEF environment.
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
- Add ENVIRONMENT-CONTRACT-ROADMAP.md covering post-v1 trace persistence and operator feedback.
- Add HYPERNYM-COGNEE-SPIKE.md for trace compression and graph-based candidate-skill discovery.
- Add CREDENTIAL-PROXY-SPIKE.md detailing native Rust credential proxying and token handling.
- Update planning docs to align with current SKILL.md standards and deterministic matching.
- Fix internal module import for whitespace collapsing in threads/ops.
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Two cleanups surfaced during a codebase review:
## Changes
- **Drop dead integration-token crypto** — `integrationTokensCrypto.ts` + helpers; no remaining consumers
- **Trim stale `.claude/rules`** — rules that contradict current CLAUDE.md
- **Windows doctor disk probe** — detect low-disk conditions on Windows
- **Refresh stale binary-size claim** in docs
Net: +82 / −3,596 (mostly dead-code removal).
## Test plan
- [ ] `yarn typecheck` green — no dangling imports to crypto module
- [ ] `cargo check` green
- [ ] Doctor runs on Windows host
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Adds a canonical WDIO spec that captures screenshots, page-source dumps, and
mock request logs at named checkpoints, plus an afterTest hook that dumps
failure artifacts. Wrapper script prints the run dir so coding agents (and
humans) can inspect the flow from disk.
Co-authored-by: Jwalin Shah <jshah1331@gmail.com>
Co-authored-by: WOZCODE <contact@withwoz.com>
* feat(webview_accounts): native OS notifications from embedded webviews (#714)
Forward CEF notification intercept payloads to tauri-plugin-notification,
prefixing the title with the provider label so the source of each toast is
obvious at a glance. Honour `silent` (skip toast, still record route),
`icon` (passed through to the native builder), and `tag` (used as the
dedup key, with a monotonic timestamp fallback for untagged payloads).
Record a NotificationRoute keyed by `{provider}:{account_id}:{tag_or_uuid}`
so a future click hook (UNUserNotificationCenter / notify-rust on_response)
can route the OS click back to the source account. Entries are cleared on
webview_account_close / _purge to bound map growth.
Expose webview_notification_permission_state / _request commands mapping
tauri::plugin::PermissionState onto the web API triple. Non-cef stubs
return "default" so the frontend can call the same invoke names on both
runtimes. Wire notification:allow-* capabilities so the plugin can be
invoked from the webview.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(accounts): wire notification permission + click bridge (#714)
Round-trip the OS notification permission once per session on first
account open via the new invoke pair. Attach a dormant notification:click
listener that dispatches setActiveAccount and brings the main window to
front when a platform click hook starts emitting the event — contract
matches the Rust NotificationRoute shape so the emit side is a one-liner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: sync Cargo.lock to 0.52.26 after version bump
Lockfile picked up the pending 0.52.26 version bump from Cargo.toml
while building the notification feature. No dependency graph change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(notifications): add notification bypass for embedded webview apps (#679)
- Add NotificationBypassPrefs (global DND, per-account mute, bypass-when-focused)
to WebviewAccountsState with thread-safe AtomicBool window focus tracking
- Evaluate all three bypass conditions inside forward_native_notification before
showing OS toast; each suppression path logs at debug with [notify-bypass] prefix
- Add four new Tauri commands: webview_notification_set_dnd,
webview_notification_mute_account, webview_notification_get_bypass_prefs,
webview_set_focused_account
- Wire window focus tracking in setup hook via on_window_event Focused handler
- Frontend: add setAccountMuted, setGlobalDnd, getBypassPrefs, setFocusedAccount
helpers in webviewAccountService; sync focused account on open + click
- Add NotificationsPanel settings page with Global DND toggle
- Register NotificationsPanel at /settings/notifications
Closes#679
* feat(notifications): integrate notifications feature into app
- Added Notifications page and routing to AppRoutes.
- Introduced NotificationRoutingPanel in Settings for managing notification settings.
- Updated SettingsHome to include navigation for notification routing.
- Integrated notifications reducer into the store for state management.
- Enhanced Rust backend to support notification handling from embedded webviews.
This commit lays the groundwork for a comprehensive notification system within the application.
* refactor(notifications): clean up code formatting and structure
- Simplified JSX structure in NotificationCard for better readability.
- Consolidated fetchNotifications call in NotificationCenter for cleaner syntax.
- Improved formatting in NotificationRoutingPanel and notificationsSlice for consistency.
- Enhanced Rust code readability by streamlining function signatures and logic.
These changes enhance code maintainability and readability across the notifications feature.
* refactor(webview_accounts): simplify webview_notification_set_dnd function signature
- Removed unnecessary line breaks in the webview_notification_set_dnd function for improved readability.
* feat(notifications): implement provider-level notification settings management
- Added `getNotificationSettings` and `setNotificationSettings` functions to manage notification settings for providers.
- Enhanced `NotificationRoutingPanel` to display and update settings for Gmail, Slack, Discord, and WhatsApp.
- Introduced new RPC endpoints for retrieving and updating notification settings.
- Updated database schema to store notification settings persistently.
This commit establishes a robust system for managing notification preferences, improving user control over notifications.
* refactor(notifications): improve code formatting and readability
- Enhanced formatting in NotificationRoutingPanel for better clarity.
- Streamlined function signatures in notificationService and Rust backend.
- Improved readability of assertions in tests by adjusting line breaks.
These changes contribute to a more maintainable and comprehensible codebase for the notifications feature.
* chore(vendor): bump tauri-cef to fix Slack notification permission banner
Updates the tauri-cef submodule to 55db2d6 which adds a
navigator.permissions.query shim in the CEF render process. Slack checks
this API (not just Notification.permission) to decide whether to show its
"needs your permission" banner — the shim returns "granted" for
notifications queries so the banner no longer appears.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(vendor): bump tauri-cef for cargo fmt fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(vendor): bump tauri-cef — native V8 permissions.query shim
Switches from context.eval() to a proper PermissionsQueryV8Handler so
the navigator.permissions.query fix actually runs in on_context_created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(notifications): patch navigator.permissions.query in ua_spoof.js
The V8 set_value_bykey approach in cef-helper's on_context_created does
not stick on CEF platform objects (Chromium's V8 binding layer silently
ignores property writes on native wrappers like Permissions). The init
script path via frame.execute_java_script runs in the fully-initialised
JS context where navigator.permissions IS writable, matching how
ua_spoof.js already overrides navigator.userAgent successfully.
Slack checks navigator.permissions.query({ name: 'notifications' })
before showing its "needs permission" banner — patching it here to
return "granted" removes the banner.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(notifications): use Object.defineProperty to shim navigator.permissions
Two-layer fix for the Slack "needs permission to enable notifications" banner:
1. cef-helper (submodule update to 99a2686): context.eval() in
on_context_created installs Object.defineProperty(navigator, 'permissions',
...) before any page JS runs.
2. ua_spoof.js: same Object.defineProperty pattern as belt-and-suspenders
for frames that reload or trigger permission checks after on_load_end.
Simple property assignment on Blink platform objects is silently ignored;
Object.defineProperty on the navigator wrapper itself (the same mechanism
already used for navigator.userAgent) works correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(notifications): address CodeRabbit review issues on PR #727
- Move raw_title out of log::info! (PII risk) — log title_chars at info,
raw_title at debug only
- Fix permissionChecked set before async invoke in ensureNotificationPermission
so transient failures allow retry on next account open
* fix(cef): enable webview-data-url feature for CEF placeholder URL
The CEF backend uses a data: URL as the initial webview location so CDP
can attach before the real provider URL loads. Tauri's add_child rejects
data: URLs unless the webview-data-url feature is enabled.
* fix(notifications): address remaining CodeRabbit issues on PR #727
- cdp/emulation: bump Chrome UA 124→136 to pass Slack browser check
- cdp/session: inject Page.addScriptToEvaluateOnNewDocument to stub
Notification.permission as "granted" and silence provider banners
- notifications/mod.rs + core/all.rs: wire notifications domain into
the controller registry (fixes unknown-method in json_rpc_e2e tests)
- notifications/schemas: add skipped bool output to ingest schema
- notifications/store: add tracing::warn on datetime parse failure
- notificationService: union return type for ingestNotification
- webviewAccountService: narrow union before accessing result.id
- NotificationCenter: drive loading/error from fetch effect; track
allProviders separately so filter pills don't collapse on selection
- NotificationRoutingPanel: rollback optimistic update on save failure
- useSettingsNavigation: add notifications/notification-routing routes
- scripts/install.sh: remove silent dry-run exit 0 on asset failure
- scripts/setup-dev-codesign.sh: remove unconditional -legacy flag
- docs/SUMMARY.md: remove worktree path, fix macOS capitalisation,
remove self-referential deletion note
* chore: apply prettier + cargo fmt + fix useEffect dep warning
Auto-apply formatting changes flagged by the pre-push hook:
- prettier reformatted NotificationCenter.tsx and notificationService.ts
- cargo fmt reformatted all.rs, openhuman/mod.rs, notifications/schemas.rs
- NotificationRoutingPanel: move providers array to module scope so
useEffect dependency array is satisfied without exhaustive-deps warning
* feat(notifications): enhance notification management and permissions
- Added new commands for managing notification preferences, including setting global Do Not Disturb (DND), muting specific accounts, and retrieving current bypass preferences.
- Implemented a notification permission state handler to ensure consistent behavior across different environments.
- Updated the JavaScript shim for notification permissions to handle both Notification and PushManager states, ensuring compatibility with various providers.
- Refactored the WebviewAccountsState to include a new structure for managing notification bypass preferences, improving the overall notification handling logic.
* update agents
* fix(notifications): complete schema + navigation metadata for ingest/settings routes
- app/src/components/settings/hooks/useSettingsNavigation.ts: resolve the
new `/settings/notifications` and `/settings/notification-routing` URLs
to their SettingsRoute values and feed them into breadcrumbs so the new
panels don't silently fall through to `'home'`. Addresses CodeRabbit on
useSettingsNavigation.ts:34.
- src/openhuman/notifications/schemas.rs: add the optional `reason` output
on `notification.ingest` (populated alongside `skipped=true` by the
runtime) and the normalized `settings` output on `notification.settings_set`
so schema-driven clients see the full response shape. Addresses
CodeRabbit on schemas.rs:103 and schemas.rs:217.
- src/core/all.rs: add a `notification` namespace_description so CLI help
covers the new controllers, plus a test assertion. Addresses CodeRabbit
on src/core/all.rs:149.
* fix(notifications): trace DB entry, surface empty update matches, warn on bad scored_at
- Add `tracing::trace!` checkpoints around the `with_connection` DB open
and schema migration so notification-delivery issues are reconstructible
from logs.
- `update_triage` and `mark_read` now inspect `Connection::execute`'s
affected-row count: log a `warn!` when the update matched zero rows
(row deleted between ingest and scoring / client passed a stale id),
`debug!` on the normal path.
- `scored_at` parsing no longer silently drops malformed values — log a
`warn!` with the raw value and parse error before treating the row as
unscored, matching the existing behavior for `received_at`.
Addresses CodeRabbit on store.rs (lines 72, 172, 294).
* fix(webview): respect silent notifications, multi-host CDP fallback, shim idempotency
- webview_accounts/mod.rs: honor the Web Notification `silent` flag.
Previously we only logged it and still called `builder.show()`, so
pages that marked a notification silent still produced an OS toast.
Mirror event still fires so the in-app center updates; only the OS
toast is suppressed. Also picks up a prior cargo-fmt rewrap.
- cdp/target.rs: `browser_ws_url()` now continues the host loop when
`resp.json()` fails instead of early-returning via `?`. A malformed
response from the first host (CDP_HOST) no longer prevents the
`localhost` fallback from being tried.
- webview_accounts/ua_spoof.js: guard the Notification wrapper behind
`window.__OH_NOTIF_SHIM` so repeated evaluations of the script
(Page.addScriptToEvaluateOnNewDocument + frame-level re-injections)
don't stack wrappers onto the same page globals or re-proxy
`Function.prototype.toString`.
Addresses CodeRabbit on webview_accounts/mod.rs:377, cdp/target.rs:33,
and ua_spoof.js:176.
* update agents
* update
---------
Co-authored-by: oxoxDev <nikhil@tinyhumans.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
* ci(release): bake Sentry DSN into shipped tauri bundle
Released builds weren't reporting anything to Sentry. Root cause: the
tauri.conf.json `beforeBuildCommand` re-runs `vite build` inside
`cargo tauri build`. The prior `yarn build` step set `VITE_SENTRY_DSN`
for its own run, but the tauri step did not — so the rebuild produced
a DSN-less `dist/` that overwrote the good one, and the shipped web UI
initialized Sentry with an empty DSN (`initSentry` returns early when
`!SENTRY_DSN`).
Fix:
- `release.yml` / `build-desktop` — declare `VITE_SENTRY_DSN` and
`VITE_DEBUG` on the tauri-build step so the `beforeBuildCommand`
rebuild bakes them into the final bundle.
- `release-packages.yml` / `build-cli-linux-arm64` — guard against a
missing `vars.OPENHUMAN_SENTRY_DSN` so the Linux arm64 CLI tarball
cannot ship without error reporting baked in via `option_env!`.
The core sidecar's `option_env!("OPENHUMAN_SENTRY_DSN")` already gets
the value from the dedicated "Build sidecar core binary" step; the
tauri shell doesn't rebuild it (separate crate, not a workspace dep),
so the baked DSN survives into the bundled installer.
* feat(observability): Sentry release tracking + source maps (#405)
Tags every Sentry event with a canonical release identifier shared by
the frontend and Rust core, uploads source maps so stack traces are
symbolicated in the dashboard, and adds a CLI probe for repeatable
verification of any future release.
Release identifier
openhuman@<semver>[+<short_git_sha>]
- Frontend (`app/src/utils/config.ts::SENTRY_RELEASE`) builds the tag
from `VITE_BUILD_SHA`.
- Core sidecar (`src/main.rs::build_release_tag`) builds the same tag
from `option_env!("OPENHUMAN_BUILD_SHA")`, so events from both
surfaces group under one release. Cargo's fingerprint already tracks
`option_env!` changes.
Environment separation
- Frontend: new `APP_ENVIRONMENT` export (`development` | `staging` |
`production`) derived from `VITE_OPENHUMAN_APP_ENV`, passed to
`Sentry.init`.
- Core: `resolve_environment` honors `OPENHUMAN_APP_ENV` at runtime,
falling back to `debug_assertions` detection.
Source-map upload
- `@sentry/vite-plugin` added as an app devDependency.
- `vite.config.ts` emits source maps unconditionally and registers the
plugin only when `SENTRY_AUTH_TOKEN` is present, so local dev skips
silently. The plugin uploads `dist/**/*.js{,.map}` under the
canonical release name and then deletes the on-disk `.map` files so
they never ship to end users.
CI wiring (`release.yml` + `release-packages.yml`)
- `Build frontend` and `Build and package Tauri app` both receive
`VITE_BUILD_SHA`, `SENTRY_RELEASE`, `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`,
`SENTRY_PROJECT_FRONTEND`. The tauri step needs the same env because
its `beforeBuildCommand` re-runs `vite build`.
- `Build sidecar core binary` receives `OPENHUMAN_BUILD_SHA` so
`option_env!` bakes the short SHA into the release tag.
- `build-cli-linux-arm64` mirrors `OPENHUMAN_BUILD_SHA` and
`OPENHUMAN_APP_ENV` for the arm64 CLI tarball.
Verification support
- New `openhuman sentry-test` CLI subcommand captures an `Error`-level
event against the currently-initialized client, flushes, and prints
the event UUID. Optional `--panic` flag exercises the panic
integration. Requires a DSN resolvable at runtime or baked in at
compile time; exits non-zero otherwise so misconfiguration is loud.
- `src/main.rs` now loads `.env` before `sentry::init`, so a DSN
defined only in the repo-local dotenv file (common dev case) is
honored by the startup-time Sentry client.
Docs
- `docs/sentry.md` covers the release identifier, environment table,
source-map pipeline, required CI variables, and a verification
runbook with troubleshooting tips.
- `.env.example` + `app/.env.example` document the new build-time vars.
* fix(agent): orchestrator never sends users to external dashboards for connect
Agent was improvising guidance like 'open your Composio dashboard at
app.composio.dev' when users asked to connect a service, which is broken
UX for non-technical users. Add an explicit rule: route connect requests
to the in-app Settings → Connections path, never paste external URLs
or explain OAuth/Composio internals.
* plan: imessage live-tick harness
Plan doc for extracting run_single_tick from ScannerRegistry's
AppHandle-coupled loop, enabling unit tests with fake deps against
real chat.db and an ignored live-sidecar integration test.
Scaffolding only — code changes follow in subsequent commits.
Co-Authored-By: WOZCODE <contact@withwoz.com>
* feat(imessage): testable tick harness + fix scanner never ingested
Extract pure `run_single_tick` + `TickDeps` trait from `run_scanner`. Prod
path wraps in `HttpDeps`; tests use `FakeDeps` with real chat.db so the
scanner body runs without a Tauri AppHandle. Template for five more
Apple-native sources per the roadmap.
While running it end-to-end, two pre-existing bugs in the shipped scanner
surfaced — both had to be fixed for a tick to ever succeed:
1. `ScannerRegistry::ensure_scanner` called `tokio::spawn` from the Tauri
`setup` hook, which runs before a Tokio reactor is active. Scanner
task never spawned; main thread panicked with "no reactor running".
Fix: `tauri::async_runtime::spawn`, which uses Tauri's own runtime.
2. `fetch_imessage_gate` used JSON pointer `/result/config/...` but the
JSON-RPC `RpcOutcome` envelope nests one level deeper:
`/result/result/config/...`. Gate always resolved to None, so every
tick silently skipped even with iMessage connected. Fix: correct
the pointer.
Verification: after both fixes, iMessage connected via
`openhuman.channels_connect` with `allowed_contacts=["*"]`, scanner
ingested 252 chat-day groups into `memory_docs` namespace
`imessage_default` — first successful ingest in the project's history.
Tests: 10 unit (9 existing + `skips_when_gate_disconnected`), 4 ignored
live-chat.db (2 existing + `run_single_tick_ingests_groups_from_real_chatdb`
+ `run_single_tick_keeps_cursor_on_group_failure`). All green.
Infra: `scripts/worktree-bootstrap.sh` — one-shot to init submodules,
symlink `.env`, build+stage sidecar, ensure tauri-cli. Worktrees didn't
inherit any of this, costing ~30 min of manual setup per branch.
Docs: `docs/superpowers/learnings/2026-04-21-imessage-harness-session.md`
captures what broke, why, and the debuggability ladder that would have
caught both bugs at merge time (launch-smoke CI, minimum).
Co-Authored-By: WOZCODE <contact@withwoz.com>
* chore(bootstrap): yarn install so husky hooks don't block push
Pre-push hook needs prettier; worktree had no node_modules. Friction
discovered pushing this branch.
Co-Authored-By: WOZCODE <contact@withwoz.com>
---------
Co-authored-by: Jwalin Shah <jshah1331@gmail.com>
Co-authored-by: WOZCODE <contact@withwoz.com>
* refactor(tauri): update development scripts and configuration for CEF integration
- Modified `package.json` scripts to consistently export `CEF_PATH` for all `cargo tauri` commands, ensuring a unified CEF binary distribution location.
- Removed the overlay window configuration from `tauri.conf.json` and updated related Rust functions to reflect this change, while retaining helper functions for potential future use.
- Updated documentation in `install.md` to clarify the importance of setting `CEF_PATH` for consistent CEF integration across builds.
- Enhanced the `ensure-tauri-cli.sh` script to set `CEF_PATH` and ensure proper installation of the vendored CEF-aware `tauri-cli`.
These changes streamline the development workflow and improve the reliability of CEF integration in the application.
* refactor(release): enhance macOS signing script for nested frameworks and helper apps
- Introduced a new `codesign_hardened` function to streamline the signing process with consistent options.
- Improved the signing logic for nested frameworks and helper applications, ensuring all binaries are signed correctly.
- Updated output messages for better clarity during the signing process, including detailed listings of bundle contents.
- Disabled the summarizer payload threshold in the configuration to prevent recursive invocations until the issue is resolved.
These changes improve the reliability and maintainability of the macOS signing and notarization workflow.
* feat(orchestrator): add current_time tool and enhance agent capabilities
- Introduced the `current_time` tool to provide the current date and time in UTC and local time zones, facilitating scheduling and reminders.
- Updated `agent.toml` to include new tools: `current_time`, `cron_add`, `cron_list`, `cron_remove`, and `schedule`, enhancing the orchestrator's functionality.
- Expanded documentation in `prompt.md` to guide users on utilizing the new direct tools effectively.
These changes improve the orchestrator's ability to handle time-related queries and scheduling tasks directly, enhancing user experience.
* feat(gmail): implement post-processing for Gmail responses to convert HTML to markdown
- Added a new `post_process` module specifically for Gmail, which modifies action responses to convert HTML content into markdown format, improving usability and reducing context token usage.
- Enhanced the `ComposioProvider` trait with a `post_process_action_result` method to allow providers to handle response modifications.
- Introduced a `post_process` function that checks for a `raw_html` flag in the arguments to determine whether to apply the conversion.
- Implemented tests to validate the HTML detection and conversion logic, ensuring the integrity of the post-processing functionality.
These changes enhance the handling of Gmail responses, making them more suitable for further processing and display in the application.
* refactor(gmail): improve HTML to markdown conversion and tool result budget
- Enhanced the `post_process` module for Gmail to handle large HTML payloads more efficiently, implementing a fallback mechanism for oversized content.
- Updated the `DEFAULT_TOOL_RESULT_BUDGET_BYTES` to `0`, disabling the budget temporarily while reworking the oversized-output path.
- Refined the `extract_markdown_body` function to better manage HTML content, ensuring cleaner markdown output and improved performance.
- Added utility functions for stripping HTML noise and handling large email bodies, enhancing the overall robustness of the email processing logic.
These changes optimize the handling of Gmail responses, improving usability and performance in processing large HTML content.
* feat(thread): implement thread title generation from user and assistant messages
- Added a new `generateTitleIfNeeded` function in the `threadApi` to create a thread title based on the first user message and the assistant's reply.
- Introduced a new `GenerateConversationThreadTitleRequest` struct to handle requests for title generation.
- Updated the `ChatRuntimeProvider` to dispatch the title generation action after processing inference responses.
- Enhanced the `threadSlice` with a new async thunk for generating thread titles, ensuring proper error handling and thread loading.
- Added tests for the new title generation functionality to validate the integration with the threads RPC.
These changes improve the user experience by automatically generating relevant thread titles, enhancing the organization of conversations.
* feat(conversations): add thread title update functionality
- Implemented `update_thread_title` method in `ConversationStore` to allow updating the title of existing conversation threads.
- Added a corresponding public function `update_thread_title` for external access.
- Enhanced tests to verify that thread titles are correctly updated and persisted in the store.
These changes improve the management of conversation threads by enabling dynamic title updates, enhancing user experience and organization.
* feat(docs): add comprehensive agent and subagent tool flow documentation
- Introduced a new document detailing the runtime flow of the agent harness, including execution paths for main agents and tools.
- Explained the differences between typed and fork subagents, and provided guidance for debugging harness and delegation issues.
- Included a file map outlining key components and their roles within the Rust implementation.
- Added a flow diagram to visually represent the interaction between agents, tools, and subagents.
These changes enhance the understanding of the agent architecture and improve the documentation for developers working with the system.
* feat(subagent): implement extraction tool and handoff cache for oversized results
- Introduced `extract_from_result` tool to allow targeted queries against oversized tool outputs, improving efficiency by directly interacting with the extraction model.
- Added `ResultHandoffCache` to manage oversized payloads, enabling progressive disclosure and reducing context length issues in sub-agent history.
- Implemented hygiene helpers for cleaning tool outputs before caching, ensuring only relevant data is stored.
- Enhanced the sub-agent runner with new modules for tool preparation and execution, streamlining the overall agent workflow.
These changes enhance the sub-agent's ability to handle large tool results effectively, improving performance and user experience.
* feat(conversations): enhance message bubble rendering and timeline entry formatting
- Introduced new utility functions for parsing and rendering agent messages, including `splitAgentMessageIntoBubbles` and `parseMarkdownTable`, to improve the display of messages in conversation threads.
- Implemented `BubbleMarkdown` and `TableCellMarkdown` components for better formatting of user and agent messages, ensuring consistent styling and interaction.
- Enhanced the `formatTimelineEntry` function to provide clearer titles and details for tool timeline entries, improving the user experience during interactions with subagents.
- Updated the `ChatRuntimeProvider` to utilize the new formatting functions, ensuring that tool timeline entries are displayed with relevant context and detail.
These changes improve the overall presentation and usability of conversation messages and tool interactions, enhancing user engagement and clarity.
* feat(subagent): enforce restrictions on sub-agent spawning tools
- Introduced a filter to prevent sub-agents from invoking their own spawning tools, specifically `spawn_subagent` and `delegate_*`, to avoid recursion issues and ensure proper delegation by the top-level orchestrator.
- Updated the `is_subagent_spawn_tool` function to identify these tools and integrated checks in both `run_typed_mode` and `run_fork_mode` to maintain the integrity of the sub-agent execution environment.
- Enhanced logging to track the removal of restricted tools from the sub-agent's tool surface, improving observability and debugging capabilities.
These changes strengthen the sub-agent architecture by enforcing strict boundaries on tool invocation, enhancing stability and performance.
* feat(conversations): add ToolTimelineBlock component and enhance timeline entry formatting
- Introduced the `ToolTimelineBlock` component to display tool timeline entries with improved formatting and user interaction, including auto-expansion for running entries.
- Enhanced the `formatTimelineEntry` function to include user-friendly titles for specific tool actions, such as 'Viewing your Integrations'.
- Updated the rendering logic in the `Conversations` component to filter and display visible messages more effectively, improving user experience during conversations.
These changes enhance the clarity and usability of tool interactions within conversation threads, providing users with better context and engagement.
* refactor(conversations): streamline component imports and enhance formatting consistency
- Consolidated import statements in `Conversations.tsx` and `ChatRuntimeProvider.tsx` for improved readability.
- Refactored the `ToolTimelineBlock` component to simplify its props structure.
- Enhanced formatting consistency in the rendering logic of agent message bubbles and timeline entries, ensuring cleaner code and better maintainability.
- Updated test cases for `splitAgentMessageIntoBubbles` and `formatTimelineEntry` to reflect formatting changes and ensure accuracy.
These changes improve code clarity and maintainability while enhancing the overall user experience in conversation threads.
* fix: satisfy pre-push lint on fix/tauri
* fix(chat): refresh usage counters after responses
* refactor(ChatRuntimeProvider): remove redundant import of requestUsageRefresh
- Eliminated the duplicate import statement for `requestUsageRefresh` in `ChatRuntimeProvider.tsx`, streamlining the code for better readability and maintainability.
* fix(chat): satisfy pre-push checks
* refactor(conversations): improve error handling and remove unused title generation logic
- Removed the unused `generateThreadTitleIfNeeded` function call from the `Conversations` component, simplifying the message dispatch logic.
- Enhanced error handling during message dispatch by using `unwrap()` to catch and log errors, providing clearer feedback on send failures.
- Updated the `ChatRuntimeProvider` to ensure proper error logging when generating thread titles, improving observability of issues related to title generation.
These changes streamline the conversation handling process and improve the robustness of error management in the chat system.
* refactor(conversations): improve formatting of title redaction and streamline test assertions
- Reformatted the `redact_title_for_log` function for better readability by adjusting the formatting of the output string.
- Simplified the assertion in the timezone test to enhance clarity and maintainability.
These changes contribute to cleaner code and improved test structure in the conversations module.
* refactor(tokenjuice): sort fact parts for improved formatting in inline summary
- Modified the `format_inline` function to sort the fact parts before generating the summary string. This change enhances the readability and consistency of the output by ensuring that facts are presented in a stable order.
These changes contribute to better formatted summaries in the token juice module.
* fix: address remaining CodeRabbit review comments
* refactor: streamline error handling and improve code readability
- Updated error handling in prompt loading to use `std::io::Error::other` for better clarity.
- Simplified conditional checks using `is_none_or` and `is_some_and` for improved readability.
- Refactored string trimming logic to utilize array syntax for better clarity.
- Enhanced default implementations for several structs to reduce boilerplate code.
These changes contribute to cleaner code and improved maintainability across various modules.
* refactor: improve code formatting and structure
- Adjusted formatting in `post_process.rs` for better readability by aligning the conditional block.
- Combined derive attributes in `tools.rs` for the `ComputerControlConfig` struct to reduce redundancy.
- Streamlined entry retrieval in `compatible.rs` by condensing multiple lines into a single line for clarity.
These changes enhance code readability and maintainability across the affected modules.
- Added a new script `ensure-tauri-cli.sh` to ensure the vendored CEF-aware `tauri-cli` is installed, preventing runtime errors related to missing Chromium Embedded Framework files.
- Updated `package.json` scripts to call `yarn tauri:ensure` before other commands, ensuring the correct CLI is used for building and running the application.
- Enhanced documentation in `CLAUDE.md` and `install.md` to clarify the requirement for the vendored `tauri-cli` and the installation process.
- Improved the `dev:app` and `dev:wry` scripts to streamline the development workflow with the new CLI setup.
These changes enhance the development experience by ensuring the correct tooling is in place for building and running the application with CEF support.