Commit Graph
103 Commits
Author SHA1 Message Date
+14 bf3bcee3cd docs: require a single Codex launch trigger (#1243)
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: WOZCODE <contact@withwoz.com>
Co-authored-by: sanil-23 <sanil@vezures.xyz>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cyrus Gray <144336577+graycyrus@users.noreply.github.com>
Co-authored-by: CodeGhost21 <164498022+CodeGhost21@users.noreply.github.com>
Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
Co-authored-by: Mega Mind <146339422+M3gA-Mind@users.noreply.github.com>
Co-authored-by: Gaurang Patel <ptelgm.yt@gmail.com>
Co-authored-by: unn-Known1 <unn-known1@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Steven Enamakel <senamakel@users.noreply.github.com>
Co-authored-by: Steven Enamakel's Droid <enamakel.agent@tinyhumans.ai>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: senamakel-droid <281415773+senamakel-droid@users.noreply.github.com>
Co-authored-by: YellowSnnowmann <167776381+YellowSnnowmann@users.noreply.github.com>
Co-authored-by: Neil <neil@maha.xyz>
Co-authored-by: Neel Mistry <neelmistry@Neels-MacBook-Pro.local>
Co-authored-by: obchain <167975049+obchain@users.noreply.github.com>
Co-authored-by: Jwalin Shah <jshah1331@gmail.com>
2026-05-05 11:12:16 -07:00
Steven EnamakelandGitHub e945390d48 feat(tools): coding-harness baseline primitives (#1205) (#1208) 2026-05-05 01:43:57 -07:00
995669fc0a fix(cef): popup paint dies after first frame — skip blank-page guard for popups (#1079) (#1182)
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
2026-05-04 08:56:12 -07:00
YellowSnnowmannandGitHub 995e5ccccb feat(security): enforce prompt-injection guard before model and tool execution (#1175) 2026-05-04 02:30:22 -07:00
Steven EnamakelandGitHub 0333b34771 fix(tauri-shell): proactively kill stale openhuman RPC on startup (#1166) 2026-05-03 22:22:47 -07:00
Steven EnamakelandGitHub ac1363d435 feat(memory): user-facing long-term memory window preset (#1137) (#1161) 2026-05-03 21:50:18 -07:00
CodeGhost21andGitHub 1d8e1bfa0d feat(updater): in-app auto-update with auto-download + restart prompt (#677) (#1114) 2026-05-03 08:29:25 -07:00
Steven EnamakelandGitHub 7d8910f157 ci(staging): cut staging from main; add act local-debug helper (#1099) 2026-05-02 06:29:22 -07:00
Steven EnamakelandGitHub f0654261a7 ci(release): split staging vs production workflows; promote staging tags (#1094) 2026-05-02 05:53:32 -07:00
262d92db22 fix(webview/slack): media perms + deep-link isolation (#1074) (#1080)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-01 17:54:05 -07:00
CodeGhost21andGitHub cd7a56581c fix(sentry): Rust source context + per-release deploy marker (#405) (#1067) 2026-05-01 17:06:31 +05:30
oxoxDevandGitHub 8c65f10863 feat(webview/gmeet): native cam/mic/screenshare + keep Meet routing in-app (#1022) (#1054) 2026-04-30 08:56:38 -07:00
obchainandGitHub f2858f73d0 docs(config): finish #933 — kill BACKEND_URL stragglers + document runtime precedence (#1042) 2026-04-30 08:51:26 -07:00
Cyrus GrayandGitHub a2b9a2e4dc fix(onboarding): rethink welcome agent from checklist to natural conversation (#1030) 2026-04-30 17:29:13 +05:30
84d78145fd fix(webview/slack): scanner spawn + notifications + post-pushState target match (#1016) (#1028)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 18:44:45 -07:00
oxoxDevandGitHub 975614d0ec fix(webview/whatsapp): IDB walk + DOM scrape + active-chat plumbing (#1017) (#1034) 2026-04-29 15:38:09 -07:00
394bfcd0fa fix(app, mcp): PersistGate recovery + MCP handler drain on disconnect (#857)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-04-29 12:52:15 -07:00
obchainandGitHub b2cfcd50e3 ci(weekly-review): aggregator + workflow + runbook for #459 (#914) 2026-04-29 11:38:58 -07:00
f7f9fa2044 test: rewards & progression coverage (#970) (#1003)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 19:33:02 -07:00
Mega MindandGitHub 23a18c9c3f fix(notifications): request OS permission at startup and fix socketService listener leak (#998) 2026-04-28 18:56:44 -07:00
dcbcf7cc4e test(e2e): system tool coverage — fs/shell/git/browser (#967) (#1002)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 18:56:10 -07:00
d88bc5ed0e docs(release): add manual smoke checklist (#971) (#1000)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 18:55:08 -07:00
fd0398d5fa feat(memory): MD-on-disk content + participant bucketing + async pipeline foundation (#1008)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-04-28 17:44:20 -07:00
4f9da9eb8d test(foundation): coverage matrix + strategy + gap-fill batch (#773) (#980)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 16:13:48 +05:30
Steven EnamakelandGitHub 2e4f1925f6 Telegram: silent streaming updates to reduce notification spam (#940) 2026-04-26 10:36:15 -07:00
VectorJetandGitHub 319cfa73e2 Docs/yarn to pnpm (#938) 2026-04-26 10:28:36 -07:00
Steven EnamakelandGitHub 98893ea81a fix(shell): orderly shutdown + CEF child-webview prewarm (#925) 2026-04-25 23:16:35 -07:00
VectorJetandGitHub a96d9da3a4 chore: migrate from yarn to pnpm (#886) 2026-04-24 10:52:16 -07:00
oxoxDevandGitHub 116fa86838 fix(cef): preflight cache-lock check on macOS (#864) (#879) 2026-04-24 09:37:49 -07:00
oxoxDevandGitHub 9ffc61a461 feat(webview): in-page screen-share picker for getDisplayMedia (#713) (#809) 2026-04-24 17:31:13 +05:30
478c92e533 feat(commands): ⌘K palette + keyboard system + chat UX polish (#745)
- 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>
2026-04-23 22:52:54 -07:00
fc54c92509 docs: environment contract roadmap + hypernym/cognee spike plan (#836)
- 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>
2026-04-23 22:17:40 -07:00
53befcd56f chore: drop dead crypto + stale rules, Windows doctor disk probe (#856)
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>
2026-04-23 22:14:48 -07:00
1408666706 feat(notifications): native OS notifications via CEF shim + scanner fallback (#850)
Co-authored-by: oxoxDev <nikhil@tinyhumans.ai>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-04-23 17:52:57 -07:00
Steven EnamakelandGitHub 488dbbd7ec feat(homebrew): add homebrew-core formula (#810) 2026-04-22 14:51:02 -07:00
Steven EnamakelandGitHub 15a9c6f780 docs: rename Referral-doc.md to docs/referral-doc.md (#811) 2026-04-22 14:50:09 -07:00
8212438112 feat(e2e): agent-observable artifact capture for onboarding + privacy flow (#762)
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>
2026-04-22 14:28:34 -07:00
3bb714bf96 feat(webview): native OS notifications from embedded webview apps (#714) (#727)
* 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>
2026-04-22 14:13:35 -07:00
CodeGhost21andGitHub bdbb83772e feat(observability): Sentry release tracking, source maps, and end-to-end DSN plumbing (#734)
* 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.
2026-04-21 22:48:20 -07:00
515c4f4b42 feat(imessage): testable tick harness + fix scanner never ingested (#746)
* 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>
2026-04-21 22:25:44 -07:00
Steven EnamakelandGitHub ee3f6472ca feat: improve sub-agent tooling, conversation timeline UX, and Tauri setup (#646)
* 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.
2026-04-18 00:44:31 -07:00
Steven Enamakel ff684f22e8 feat(tauri): integrate vendored CEF-aware tauri-cli and update development scripts
- 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.
2026-04-17 21:36:22 -07:00
Steven EnamakelandGitHub 99d61f93a7 feat(webui-messaging): multi-provider webview accounts, scanners, and chat runtime (#629)
* feat(accounts): implement accounts management with webview integration

- Added a new Accounts page for managing user accounts, including the ability to add and remove accounts.
- Introduced AddAccountModal for selecting account providers and initiating account setup.
- Implemented WebviewHost to display third-party web applications (e.g., WhatsApp Web) within the app.
- Enhanced routing to include a protected route for the Accounts page.
- Updated the BottomTabBar to include an Accounts tab for easy navigation.
- Integrated Redux for state management of accounts, messages, and logs, ensuring a seamless user experience.
- Updated dependencies in Cargo.lock to version 0.52.9 for compatibility.

This commit significantly enhances the application's functionality by allowing users to manage accounts directly within the app, improving overall user engagement and experience.

* refactor(accounts): clean up Accounts component layout and improve readability

- Removed unnecessary comments and simplified the structure of the Accounts component for better clarity.
- Adjusted the rendering logic to enhance the layout of the active account section, improving user experience.
- Reformatted text in the no accounts message for better readability.
- Streamlined the import statements by consolidating related imports, enhancing code organization.

* feat(accounts): enhance account management with new providers and routing updates

- Introduced support for additional account providers: Telegram, LinkedIn, Gmail, and Slack, expanding user options for account management.
- Updated routing to replace the old /conversations path with /chat, streamlining navigation and improving user experience.
- Refactored the App component to include an AppShell for better layout management, ensuring the bottom tab bar visibility aligns with the selected account.
- Enhanced the BottomTabBar component to reflect the new routing and account options, improving accessibility and usability.
- Implemented fullscreen logic for accounts, allowing for a more immersive experience when interacting with selected accounts.
- Added utility functions for managing fullscreen states and account provider icons, enhancing code organization and maintainability.

This commit significantly improves the application's account management capabilities, providing users with a more flexible and engaging experience.

* feat(cef): integrate Chromium Embedded Framework support and enhance webview functionality

- Added support for the Chromium Embedded Framework (CEF) as an alternative runtime, allowing for improved webview capabilities.
- Updated Cargo.toml to include new dependencies and features for CEF integration, ensuring compatibility with existing Tauri plugins.
- Enhanced the WhatsApp recipe to include ghost-text autocomplete functionality, improving user experience during message composition.
- Implemented WebSocket observation in the WhatsApp recipe to capture and forward relevant message frames, enhancing real-time interaction.
- Introduced user agent spoofing for specific providers to bypass fingerprinting checks, ensuring better compatibility with services like Slack and LinkedIn.
- Refactored various components to accommodate the new runtime and improve overall code organization and maintainability.

This commit significantly enhances the application's webview capabilities and user interaction with messaging services, providing a more robust and flexible experience.

* feat(cef): add development command for CEF and update configuration

- Introduced a new development command `dev:cef` in both package.json files to streamline the development process for the Chromium Embedded Framework (CEF).
- Updated Cargo.toml to include the `tauri/devtools` feature alongside `tauri/cef`, enhancing debugging capabilities.
- Modified tauri.conf.json to adjust visibility settings for the application window and refined the Content Security Policy (CSP) for improved security.
- Enhanced resource paths in tauri.conf.json to support recursive file inclusion for better resource management.
- Updated the Rust code to bypass macOS Keychain prompts when using CEF, improving user experience during development.

This commit enhances the development workflow for CEF integration, providing better tools and configurations for developers.

* fix(cef): update development command for CEF to include signing identity

- Modified the `dev:cef` command in package.json to include the `APPLE_SIGNING_IDENTITY` environment variable, enhancing the development process for CEF on macOS.
- This change improves the build process by ensuring proper code signing during development, streamlining the workflow for developers working with CEF integration.

* feat(cef): enhance development command for CEF with safe storage setup

- Updated the `dev:cef` command in package.json to include a call to a new script, `setup-chromium-safe-storage.sh`, which pre-seeds the "Chromium Safe Storage" keychain entry with a permissive ACL.
- Added the `setup-chromium-safe-storage.sh` script to ensure that CEF/Chromium can read the keychain entry without prompting, improving the development experience on macOS.
- This change streamlines the setup process for developers working with CEF integration, ensuring a smoother workflow.

* feat(whatsapp): enhance message ingestion and IndexedDB integration

- Introduced a new `IngestMessage` interface to standardize message structure for WhatsApp.
- Updated `IngestPayload` to include additional fields for better message handling, including `provider`, `chatId`, and `day`.
- Implemented a new function `persistWhatsappChatDay` to handle the ingestion of chat messages by day, improving data organization and retrieval.
- Enhanced the WhatsApp recipe to utilize IndexedDB for direct data access, eliminating the need for DOM scraping and improving performance.
- Updated the Tauri configuration to enable development tools for easier debugging of webview accounts.

This commit significantly improves the application's ability to manage and ingest WhatsApp messages, providing a more robust and efficient user experience.

* feat(cdp): integrate IndexedDB scanner for WhatsApp via Chrome DevTools Protocol

- Added a new module for scanning IndexedDB using the Chrome DevTools Protocol (CDP), enabling direct access to WhatsApp data without DOM scraping.
- Implemented a scanner that communicates with the embedded CEF instance to read and decrypt messages stored in IndexedDB.
- Updated the Tauri application to manage the new scanner, ensuring it operates seamlessly with existing webview accounts.
- Enhanced the Cargo.toml and Cargo.lock files to include necessary dependencies such as `tokio-tungstenite` and `futures-util` for asynchronous operations.
- Refactored the WhatsApp recipe to utilize the new scanning capabilities, improving performance and data handling.

This commit significantly enhances the application's ability to interact with WhatsApp's IndexedDB, providing a more efficient and robust user experience.

* feat(cdp): enhance message diagnostics in IndexedDB scanner

- Updated the ScanSnapshot struct to include new fields for message diagnostics: `messageKeyUnion`, `messageTypeBreakdown`, and `sampleByType`, providing a comprehensive overview of message structures and types.
- Modified the scanner logic to capture and log detailed information about message types and their shapes, improving debugging capabilities.
- Refactored the JavaScript scanner to aggregate message key signatures and counts, enhancing the analysis of message records.

This commit significantly improves the application's ability to analyze and log message data from WhatsApp's IndexedDB, facilitating better debugging and data handling.

* feat(cdp): implement fast DOM scraping and crypto key extraction for WhatsApp

- Introduced a new fast-tick DOM scraping mechanism to extract rendered WhatsApp message bodies, enabling near real-time message updates without relying on IndexedDB.
- Added scripts for capturing and logging CryptoKey operations within WhatsApp's workers, allowing for better analysis of key derivations and decryptions.
- Enhanced the CDP scanner to interleave fast DOM scans with full IndexedDB scans, optimizing data retrieval and reducing UI spamming during idle periods.
- Updated the ScanSnapshot struct to include new fields for DOM-scraped messages and crypto operation statistics, improving the overall diagnostic capabilities of the application.

This commit significantly enhances the application's ability to interact with WhatsApp's messaging system, providing a more efficient and responsive user experience.

* feat(whatsapp): replace cdp_indexeddb with whatsapp_scanner for enhanced message handling

- Replaced the `cdp_indexeddb` module with `whatsapp_scanner` to streamline the scanning process for WhatsApp messages.
- Updated the application to manage the new `ScannerRegistry` for WhatsApp, improving the integration with the Chrome DevTools Protocol.
- Introduced new scripts for fast DOM scraping and full IndexedDB scanning, optimizing data retrieval and enhancing real-time message updates.
- Added a new `dom_scan.js` for efficient extraction of rendered message bodies directly from the DOM, reducing reliance on IndexedDB.
- Enhanced the `ScanSnapshot` struct to accommodate new fields for DOM-scraped messages, improving diagnostic capabilities.

This commit significantly improves the application's ability to interact with WhatsApp, providing a more efficient and responsive user experience.

* refactor(whatsapp): replace JavaScript DOM scanning with Rust-based DOM snapshot

- Removed the `dom_scan.js` script and replaced it with a new Rust module `dom_snapshot.rs` that captures DOM snapshots directly via the Chrome DevTools Protocol, enhancing performance and reliability.
- Introduced a new `idb.rs` module for scanning WhatsApp's IndexedDB, streamlining data retrieval and improving integration with the Rust backend.
- Updated the `ScanSnapshot` struct to accommodate changes in data handling, ensuring compatibility with the new scanning methods.
- Enhanced overall message handling capabilities, providing a more efficient and responsive user experience.

This commit significantly improves the application's ability to interact with WhatsApp, leveraging Rust for better performance and reducing reliance on JavaScript for DOM operations.

* feat(docs): add webview integration playbook for third-party messaging

- Introduced a comprehensive playbook detailing the process for integrating third-party webviews (e.g., Instagram, Messenger) into the application.
- Documented architecture, workflow, and best practices for building and debugging new integrations, leveraging Rust and Chrome DevTools Protocol.
- Included step-by-step instructions for setting up scanners, monitoring logs, and optimizing message handling, ensuring a streamlined development experience for future integrations.

This addition enhances the documentation, providing developers with a clear guide to implement and maintain webview integrations effectively.

* docs(webview): improve table formatting for clarity

- Enhanced the formatting of tables in the webview integration playbook to improve readability and consistency.
- Adjusted column headers and alignment for better presentation of job intervals and costs, ensuring clearer communication of scanning processes and common pitfalls.

This update aims to provide a more user-friendly documentation experience for developers integrating third-party webviews.

* feat(slack): integrate Slack scanner for message extraction and management

- Updated the OpenHuman package version to 0.52.15 in both Cargo.lock files.
- Introduced a new Slack scanner module to extract messages, users, and channels from Slack's IndexedDB using the Chrome DevTools Protocol.
- Added functionality to manage Slack accounts within the application, allowing for automatic opening of Slack webviews based on environment variables.
- Enhanced the existing webview account management to support Slack integration, ensuring seamless interaction with the Slack API.

This commit significantly improves the application's ability to interact with Slack, providing a robust framework for message handling and account management.

* fix(slack): one-doc-per-channel + omit CDP indexName param

CEF 146's IndexedDB.requestData rejects `indexName: ""` with "Could not
get index"; the CDP spec says empty string means the primary-key index
but this backend only accepts the field unset. Omit it entirely so the
Slack Redux-persist dump actually comes back.

Also switch memory grouping from (channel, day) → channel. Each Slack
channel is now one long-running memory doc keyed by channel name
(e.g. `general`, `team-product`, `elvin516`), falling back to channel
id for non-slug names. Every transcript line carries its own
`YYYY-MM-DD HH:MM` stamp and the header records the full date range.

`infer_team_id` updated to Slack's real DB naming pattern
`objectStore-<TEAM>-<USER>` (not `ReduxPersistIDB:` as initially
assumed).

* fix(onboarding): update navigation and test descriptions in OnboardingOverlay tests

- Changed the navigation path from '/conversations' to '/chat' in the OnboardingOverlay tests to reflect the updated routing logic.
- Updated test descriptions for clarity, ensuring they accurately describe the functionality being tested.

These changes enhance the accuracy and readability of the onboarding tests, aligning them with the current application flow.

* fix(conversations): add return statement to Conversations component

- Introduced a return statement in the Conversations component to ensure proper rendering of the sidebar or page variant.
- This change enhances the component's functionality by ensuring it returns the expected JSX structure.

These modifications improve the overall structure and behavior of the Conversations component.

* feat(accounts): add Discord integration and enhance AddAccountModal

- Introduced Discord as a new account provider, including its icon and service details.
- Updated the AddAccountModal to filter out already connected providers, improving user experience.
- Enhanced the UI to display a message when all providers are connected, ensuring clarity for users.
- Implemented context menu functionality for account management, allowing users to log out directly from the accounts list.

These changes expand the application's capabilities by integrating Discord and refining account management features.

* feat(discord): integrate Discord scanner for HTTP and WebSocket monitoring

- Added a new `discord_scanner` module to capture Discord API calls and WebSocket frames using the Chrome DevTools Protocol (CDP).
- Updated the `lib.rs` to manage the new Discord scanner alongside existing WhatsApp and Slack scanners.
- Enhanced the `webview_accounts` module to support Discord account management, including scanner registration and cleanup.

These changes expand the application's capabilities by enabling real-time monitoring of Discord interactions, enhancing user experience and functionality.

* feat(google-meet): integrate Google Meet as a new account provider

- Added Google Meet as a supported account provider, including its icon and service details.
- Updated the account management logic to handle Google Meet interactions, including recipe integration for call monitoring and notifications.
- Enhanced the UI to accommodate the new provider, ensuring a seamless user experience when managing accounts.

These changes expand the application's capabilities by integrating Google Meet, allowing users to join calls and receive notifications directly within the app.

* refactor(runtime): remove notification handling and composer autocomplete

- Eliminated the notification interception logic and associated functions, streamlining the runtime code.
- Removed composer autocomplete features, transferring responsibility for ghost-text overlays to the UI host.
- Updated comments to reflect the changes and clarify the remaining functionality.

These modifications simplify the runtime script, focusing on core features while delegating UI responsibilities.

* feat(google-meet): enhance Google Meet integration with lifecycle event handling

- Implemented lifecycle event handling for Google Meet, including events for call start, captions, and call end.
- Introduced in-memory storage for caption snapshots during meetings, allowing for the generation of markdown transcripts upon call completion.
- Added interfaces for payload structures related to Google Meet events, improving type safety and clarity in the codebase.
- Updated the webview account service to manage active meetings and flush transcripts to memory, ensuring a seamless user experience.

These changes significantly enhance the Google Meet integration, enabling real-time caption handling and transcript generation, thereby improving the overall functionality of the application.

* feat(cef): integrate CEF-based notification handling and update dependencies

- Added support for native OS notifications through the `tauri-runtime-cef` crate, enabling interception of browser notifications in embedded webviews.
- Introduced a new submodule for `tauri-cef` to manage CEF dependencies and facilitate notification handling.
- Updated the `.gitignore` to exclude CEF-related build artifacts and lock files.
- Removed the deprecated `notification_scanner` module, streamlining the codebase and focusing on the new CEF integration.
- Enhanced the `webview_accounts` module to register and manage CEF browser notifications, improving user experience with real-time alerts.

These changes significantly enhance the application's notification capabilities, leveraging CEF for a more integrated and responsive user experience.

* feat(cef): update CEF integration and dependency management

- Added `cef` and `tauri-runtime-cef` as dependencies to enhance CEF support.
- Updated `Cargo.toml` to reference `tauri-runtime-cef` from a local path, ensuring proper integration with the vendored CEF submodule.
- Removed direct Git references for Tauri packages, streamlining dependency management by using local paths.

These changes improve the application's CEF capabilities and simplify the dependency structure, facilitating better integration and maintenance.

* feat(browserscan): add BrowserScan as a new account provider with associated resources

- Introduced BrowserScan as a development-only account provider, including its icon and service details.
- Updated the account provider types and management logic to accommodate BrowserScan, enhancing the application's capabilities.
- Added a new recipe and manifest for BrowserScan, ensuring it integrates seamlessly into the existing webview account lifecycle.
- Enhanced the UI to display BrowserScan, providing users with a bot-detection sandbox for testing purposes.

These changes expand the application's functionality by integrating BrowserScan, allowing for improved testing and development workflows.

* feat(google-meet): enhance Google Meet integration with new transcript handling and session recovery

- Introduced a new service to handle Google Meet transcripts, enabling structured note extraction and proactive follow-up actions.
- Implemented session recovery logic to manage in-progress meetings when navigating away from the call.
- Updated the webview account service to log call events and captions, improving monitoring and debugging capabilities.
- Enhanced the Google Meet recipe to persist meeting state across navigations, ensuring seamless user experience.

These changes significantly improve the Google Meet integration, allowing for better management of meeting transcripts and user interactions.

* refactor(App): reorganize imports and clean up code structure

- Removed unused imports from App.tsx to streamline the code.
- Adjusted the import order for better readability and consistency.
- Enhanced the BottomTabBar component by simplifying the button rendering logic.
- Cleaned up the AddAccountModal component by consolidating prop destructuring.
- Improved formatting in various components for better code clarity.

These changes enhance code maintainability and readability across the application.

* update tauri

* feat(google-meet): improve caption handling and speaker identification logic

- Enhanced the logic for extracting speaker names from Google Meet rows, adding checks to filter out icon ligatures and irrelevant text.
- Updated the caption processing to better identify and score caption regions, ensuring more accurate transcript generation.
- Introduced new utility functions to differentiate between real captions and icon names, improving the overall reliability of the captioning feature.

These changes significantly enhance the accuracy and usability of the Google Meet integration, providing users with clearer and more relevant caption data.

* chore(dependencies): update Cargo.lock with new package versions and remove obsolete entries

- Bump OpenHuman version to 0.52.20.
- Add new dependencies: cef, futures-util, tauri-plugin-notification, tauri-runtime-cef, tokio-tungstenite, bzip2, clap, console, cookie_store, data-encoding, dioxus-debug-cell, document-features, download-cef, encode_unicode, filetime.
- Remove obsolete packages: alloc-no-stdlib, alloc-stdlib, brotli, brotli-decompressor, gdkx11, gdkx11-sys.
- Update existing dependencies to their latest versions where applicable.

* chore(dependencies): update submodule URLs and pin plugin versions

- Changed the tauri-cef submodule URL from SSH to HTTPS for consistency.
- Updated Cargo.toml to pin tauri plugins to a specific commit for reproducibility.
- Adjusted Cargo.lock to reflect the new plugin source format with pinned revisions.
- Modified the builder configuration in lib.rs to conditionally enable devtools in debug builds only, enhancing security in release builds.
- Updated webview_accounts to restrict devtools access based on build type, ensuring better control over webview inspection.

* feat(ui): enhance BottomTabBar and AddAccountModal interactions

- Added focus and blur event handlers to BottomTabBar for improved visibility management.
- Implemented keyboard accessibility in AddAccountModal by closing the modal on Escape key press and focusing the close button when opened.
- Updated Content Security Policy in tauri.conf.json for enhanced security.
- Improved Gmail recipe to use stable message IDs for better message tracking.
- Introduced account ID sanitization in webview_accounts to prevent path traversal vulnerabilities.

* fix(AddAccountModal): add missing import for improved functionality

* chore(dependencies): bump OpenHuman version to 0.52.20 in Cargo.lock
2026-04-17 15:55:50 -07:00
Mega MindandGitHub ec309c8f90 feat(onboarding): complete conversational onboarding stack and UX audit (#619)
* fix(onboarding): guard complete_onboarding against premature flag flip (#591)

- Remove premature `chat_onboarding_completed = true` flip from
  `set_onboarding_completed` in config/ops.rs. The flag is now
  exclusively owned by the welcome agent via `complete_onboarding`.

- Strip auto-finalize side-effect from `check_status` action. It is
  now pure read-only and returns `onboarding_status`, `exchange_count`,
  and `ready_to_complete` in the snapshot instead of `finalize_action`.

- Add engagement guard to `complete` action: rejects with a descriptive
  error unless exchange_count >= 3 OR ≥1 Composio integration connected.
  Auth check also enforced before any write.

- Add process-global `WELCOME_EXCHANGE_COUNT` (AtomicU32) with
  `increment_welcome_exchange_count()` / `get_welcome_exchange_count()`.
  Dispatch layer calls `increment_welcome_exchange_count()` each time a
  user message routes to the welcome agent.

- Update `welcome_proactive.rs` snapshot call to new signature and
  prompt copy to reflect `onboarding_status: "pending"` / no pre-flip.

- Add 7 pure-logic unit tests for `engagement_criteria_met`, plus tests
  for the new exchange counter and updated snapshot shape.

Fixes #591

* style: cargo fmt for complete_onboarding.rs

* feat(onboarding): inject CONNECTION_STATE block into welcome-agent turns (#593)

Add `build_connection_state_block()` to dispatch.rs: fetches current
Composio integration status (with a 3s timeout for graceful degradation)
and formats it as a `[CONNECTION_STATE]...[/CONNECTION_STATE]` block.

After `resolve_target_agent` selects the welcome agent, the block is
appended to the last user message in history so the agent always has
up-to-date connection state without spending a tool call. This captures
OAuth completions that happened mid-conversation (user clicked auth link
in chat, authenticated in browser, came back).

Scoped strictly to welcome-agent turns (chat_onboarding_completed=false).
Orchestrator turns are unaffected.

Fixes #593
Part of #599

* style: cargo fmt for dispatch.rs

* feat(welcome): parallel template messages with LLM inference for faster perceived welcome (#592)

Show two template messages immediately while the LLM runs in the
background, cutting the perceived wait from ~15s to ~0s:

- Template 1 (t≈0ms): time-of-day greeting that names any connected
  channels, built from the status snapshot without extra I/O
- Template 2 (t=4s): "Getting everything ready for you..." loading
  indicator, published via tokio::join! alongside the LLM future
- LLM response: published when inference completes, opened directly
  with personalised setup content (no duplicate greeting)

`run_proactive_welcome` now fires three `ProactiveMessageRequested`
events rather than one. The two template helpers (`time_of_day_greeting`,
`build_template_greeting`) are pure functions covered by 6 new unit
tests. `prompt.md` gains a proactive-invocation section explaining that
greeting templates are pre-delivered and the agent must skip them.

* feat(welcome): add composio_authorize tool and inline auth link guidance (#594)

Wire `composio_authorize` into the welcome agent's tool allowlist and
teach the prompt how to offer OAuth links directly in chat:

- agent.toml: add "composio_authorize" to the named tools list so the
  welcome agent can call it during multi-turn conversations
- prompt.md: new "Offering inline auth links" section covering the
  consent-first flow (offer → user agrees → call tool → markdown link →
  confirm success via [CONNECTION_STATE] block on next turn)
- prompt.md: toolkit slug reference table for the common services
- prompt.md: auth link rules (no speculative calls, no bare URLs,
  one service at a time, await CONNECTION_STATE before confirming)
- prompt.md: two new "What NOT to do" bullets for composio_authorize
  misuse patterns

* feat(welcome): conversational onboarding prompt for issue #595

- Rewrite prompt.md: multi-turn flow, Gmail-first, no silent first turn
- Align with check_status/complete and ready_to_complete semantics
- Update proactive injection copy to match new tool wording

Made-with: Cursor

* feat(onboarding): add completion readiness reason

Made-with: Cursor

* docs(ux): add onboarding and welcome audit for #563

Made-with: Cursor

* docs(welcome): clarify OAuth link behavior in onboarding prompt

Updated the onboarding prompt to explicitly state that clicking the Gmail connection link opens the user's default browser for authentication. Added guidance to return to the chat after completing the authorization process.

* fix(onboarding): resolve CI test and proactive greeting review

Made-with: Cursor
2026-04-16 14:14:24 -07:00
Steven EnamakelandGitHub 57d307ad1e feat(agent): simplify harness + trim bundled prompts (#500)
* Add built-in agent definitions and prompts for orchestrator, planner, code executor, skills agent, researcher, critic, archivist, and tool maker

- Introduced a new module for built-in agent definitions, allowing for easy addition of agents through a structured format.
- Created TOML configuration files for each agent, detailing their properties such as id, display name, usage context, and tool specifications.
- Developed corresponding prompt files that outline the responsibilities and rules for each agent, enhancing their functionality and usability.
- Implemented a loading function to parse these definitions into usable agent structures, ensuring all agents are correctly initialized and validated.

* Remove deprecated archetypes and related components from the multi-agent harness

- Deleted the `archetypes.rs`, `dag.rs`, `executor.rs`, and `types.rs` files, which contained the definitions and implementations for agent archetypes, task DAGs, and execution logic.
- Updated the `builtin_definitions.rs` and `definition.rs` files to remove references to the now-removed archetypes, streamlining the agent definition process.
- Refactored the `mod.rs` file to eliminate unused modules and clarify the structure of the multi-agent harness.
- Adjusted comments and documentation to reflect the removal of the DAG orchestration flow, emphasizing the current sub-agent delegation model.

* Remove unused `ArchetypeConfig` from schema exports in `mod.rs` to streamline configuration management.

* Implement context guard and memory management features in the harness module

- Introduced `ContextGuard` to monitor context utilization and trigger auto-compaction when usage exceeds defined thresholds.
- Added `scrub_credentials` function to sanitize sensitive information from tool outputs.
- Implemented history management functions to trim conversation history and build compaction transcripts.
- Created `build_tool_instructions` to generate tool usage guidelines for the system prompt.
- Developed `memory_context` functions to manage user memory and relevant context for conversations.
- Enhanced the `tool_loop` to integrate the new context management and tool invocation logic.

This update improves the agent's ability to manage context effectively, ensuring efficient memory usage and secure handling of sensitive data.

* Refactor agent module imports to use the harness instead of loop_

- Updated import paths in `dispatcher.rs`, `memory_loader.rs`, `mod.rs`, `dispatch.rs`, and `startup.rs` to replace references from the `loop_` module to the `harness` module.
- This change enhances module organization and aligns with the recent architectural updates in the agent structure.

* Remove cost tracking and context assembly modules from the agent structure

- Deleted `cost.rs` and `context_assembly.rs` files, which handled token cost tracking and context assembly for the multi-agent harness, respectively.
- Updated `mod.rs` files to remove references to the deleted modules, streamlining the agent's organization and focusing on essential components.
- This cleanup enhances maintainability and aligns with the current architectural direction of the project.

* Remove identity module and related configurations from the agent structure

- Deleted the `identity.rs` file, which contained the AIEOS identity handling logic and related structures.
- Updated `mod.rs` and other files to remove references to the deleted identity module, streamlining the agent's organization.
- This change simplifies the codebase and aligns with the decision to rely solely on OpenClaw markdown files for identity management.

* Enhance agent prompts with improved formatting and clarity

- Added spacing for better readability in the prompts of the Archivist, Code Executor, Critic, Orchestrator, Researcher, Skills Agent, and Tool Maker agents.
- Updated the table formatting in the Orchestrator prompt for consistency and clarity.
- These changes improve the overall presentation and usability of agent documentation, making it easier for users to understand agent responsibilities and rules.

* Remove REPL functionality and related components from the agent structure

- Deleted the `repl.rs` file, which contained the implementation for the interactive REPL.
- Removed references to the REPL in `cli.rs`, `mod.rs`, and other related files, streamlining the agent's organization.
- Eliminated unused REPL session handling logic from the agent schemas and local AI operations, enhancing maintainability and focusing on essential components.
- This cleanup aligns with the current architectural direction of the project, simplifying the codebase.

* Refactor imports and clean up configuration exports

- Updated import paths in `startup.rs` to include `host_runtime` from the correct module.
- Streamlined the export statements in `mod.rs` and `schema/mod.rs` for better organization and clarity.
- Removed unnecessary line breaks in the export lists to enhance readability and maintainability of the configuration schema.

* Remove unused history management functions and clean up agent module exports

- Deleted the `history.rs` and `session.rs` files, which contained functions for managing conversation history and session handling.
- Updated `mod.rs` to remove references to the deleted modules and streamline the agent's organization.
- Cleaned up import statements in `mod.rs` and other files to enhance clarity and maintainability of the codebase.

* Add agent harness module with builder, runtime, and turn management

- Introduced a new `harness` module for the `Agent`, encapsulating the `AgentBuilder`, runtime accessors, and turn lifecycle management.
- Implemented the `AgentBuilder` fluent API for constructing `Agent` instances with customizable configurations.
- Developed the `turn` method to handle user interactions, tool execution, and context management within the agent.
- Created a `runtime` module for public accessors and utility functions related to agent operations.
- Added comprehensive unit and integration tests to ensure the functionality of the new agent structure and its components.

* Remove classifier and traits modules from the agent structure

- Deleted the `classifier.rs` and `traits.rs` files, which contained the classification logic and core agent traits, respectively.
- Updated `mod.rs` to remove references to the deleted modules, streamlining the agent's organization.
- This cleanup enhances maintainability and focuses on essential components of the agent architecture.

* Refactor agent prompt structure and remove unused files

- Updated the `prompt.rs` file to streamline the orchestrator's logic by removing unnecessary tool documentation references and simplifying the file list.
- Deleted several prompt files (`AGENTS.md`, `BOOTSTRAP.md`, `CONSCIOUS_LOOP.md`, `MEMORY.md`, `README.md`, `TOOLS.md`) to declutter the project and focus on essential components.
- Adjusted the `harness/mod.rs` file to change module visibility from public to crate-level for better encapsulation.
- These changes enhance maintainability and align with the current architectural direction of the project.

* Refactor bootstrap file handling and update tests

- Simplified the list of bundled prompt files in `prompt.rs` by removing references to `AGENTS.md` and `TOOLS.md`, focusing on essential identity files.
- Adjusted the logic for injecting `MEMORY.md` to be optional, ensuring it only appears if it exists.
- Updated test cases in `common.rs`, `identity.rs`, and `prompt.rs` to reflect the changes in the bootstrap file structure and ensure accurate validation of the new logic.
- These modifications enhance clarity and maintainability of the codebase while aligning with the current project architecture.

* Implement agent delegation tools and browser automation features

- Introduced new tools for agent delegation, including `ArchetypeDelegationTool`, `AskClarificationTool`, `DelegateTool`, and `SkillDelegationTool`, enhancing the agent's ability to manage tasks through specialized sub-agents.
- Added `SpawnSubagentTool` for delegating tasks to sub-agents, allowing for more complex workflows and improved task management.
- Implemented browser automation capabilities with `BrowserOpenTool`, enabling secure opening of approved URLs in the Brave Browser.
- Enhanced the `BrowserTool` with pluggable backends for improved automation and user interaction.
- Added `ImageInfoTool` for extracting metadata from images, supporting future multimodal capabilities.
- Organized tools into a new `impl` module structure for better maintainability and clarity in the codebase.

* Refactor imports and clean up tool implementations

- Updated import statements across various tool implementations to ensure consistency and clarity, particularly in the `traits.rs` file.
- Removed unnecessary line breaks and adjusted module paths for better organization.
- Cleaned up test files by removing trailing whitespace, enhancing code readability and maintainability.
- These changes streamline the codebase and improve the overall structure of tool-related components.

* Update built-in definitions and prompt handling for clarity and consistency

- Revised the test for built-in agent definitions to dynamically reference the length of `BUILTINS`, enhancing maintainability.
- Clarified documentation for the `system_prompt` field in `AgentDefinition`, emphasizing the default behavior and usage of inline prompts.
- Simplified the `build_system_prompt` function by removing unnecessary conditional logic, ensuring a more straightforward return of the prompt string.

* Enhance agent definition loading and documentation clarity

- Updated the `load_file` function to reject definitions with missing or empty `system_prompt`, ensuring custom definitions are properly validated.
- Added a new test to verify that definitions lacking a `system_prompt` are correctly rejected, improving robustness.
- Clarified documentation for built-in definitions and TOML parsing, emphasizing compile-time guarantees and runtime checks.
- Improved the logic for checking the existence of `MEMORY.md` to prevent errors from stray directories, enhancing file handling reliability.
2026-04-10 21:41:45 -07:00
7b457aa27d feat(agent): pure orchestrator pattern with per-skill delegation tools (#496)
* feat(agent): pure orchestrator pattern with per-skill delegation tools (#478)

Refactors the main agent from a direct tool-calling model to a pure
orchestrator that delegates all work through dynamically generated tools.

Architecture changes:
- Orchestrator only sees generated tools (notion, gmail, research,
  run_code, review_code, plan, spawn_subagent) — skill tools are
  architecturally unreachable from the main agent
- Each installed skill auto-generates a delegation tool at build time
  (SkillDelegationTool) that routes to skills_agent with the correct
  skill_filter
- Static archetype tools (research, run_code, etc.) delegate to their
  respective sub-agents
- visible_tool_specs filters the function-calling schema sent to the
  provider, enforcing the orchestrator boundary at the API level

Prompt changes:
- Rewrote AGENTS.md as a lean orchestrator prompt — no more routing
  tables or agent_id instructions
- Orchestrator skips TOOLS.md, MEMORY.md, HEARTBEAT.md (~6k tokens
  saved per turn) — subagents get tool specs from the registry
- Workspace .md files auto-sync via builtin-hash mechanism so prompt
  updates ship automatically to existing installs

Bug fixes:
- ModelSpec::Hint now resolves to {hint}-v1 (e.g. agentic-v1) instead
  of hint:agentic which the backend rejected
- validate_skill_filter now uses skill_id from the engine tuple instead
  of splitting on __ in the raw tool name (which always failed)
- Memory context forwarded to subagents via ParentExecutionContext

Observability:
- Added [agent] tagged logs for tool responses, agent state transitions,
  and delegation decisions throughout turn.rs

See docs/agent-prompt-architecture.excalidraw for the visual diagram.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: rustfmt orchestrator_tools.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: cargo fmt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address CodeRabbit review — dispatch guard, fork specs, decouple sync

- Enforce visible-tool allowlist at dispatch time (not just schema)
- Fork mode uses visible_tool_specs (not full registry)
- De-duplicate spawn_subagent when extending orchestrator tools
- Raw tool output moved to debug level, info level logs metadata only
- Decouple workspace file sync from prompt rendering so skipped files
  still get synced to disk

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:47:41 -07:00
Steven EnamakelandGitHub 3d17bfb23d Refactor core cross-domain flows onto event bus (#468)
* Refactor core cross-domain flows onto event bus

* feat(agent): enhance error handling and message processing

- Introduced a new constant for maximum error message length in the Agent.
- Added methods for comparing conversation messages and determining new entries for turns.
- Implemented a function to sanitize error messages, improving clarity and consistency in error reporting.
- Updated the `run_single` method to utilize the new error handling and message processing logic, ensuring better tracking of conversation history and error states.

* feat(supervision): initialize global event bus and register health subscriber

- Added initialization of the global event bus with default capacity to ensure channel health events have a live bus and subscriber target.
- Registered a health subscriber to enhance monitoring capabilities within the supervised listener context.
2026-04-09 16:44:53 -07:00
Mega MindandGitHub dc5e7adeb6 fix(auth): update RPC method names for authentication calls (#463)
* fix(auth): update RPC method names for authentication calls

Refactor authentication-related RPC method names to use underscores instead of dots for consistency. Updated methods include `get_state`, `get_session_token`, `clear_session`, and `store_session`.

chore: update OpenHuman version to 0.51.19

style: standardize string formatting in quickjs_libs/bootstrap.js and other files

- Replace single quotes with double quotes for string literals in various functions.
- Ensure consistent formatting across console logging and error handling.

fix(config): improve token retrieval logic in ops_core.rs

- Enhance the logic for retrieving the active session token from the credentials store, accommodating user-specific directories.

* test: align auth and OAuth assertions with current behavior

Update stale test expectations for underscore-style auth RPC methods and light-theme OAuth button classes, and make the bypass-login E2E assertion resilient to the current auth persistence model.

Made-with: Cursor

* chore: apply formatter output for login flow spec

Include Prettier formatting adjustments produced by the pre-push hook so the branch can pass repository push checks cleanly.

Made-with: Cursor
2026-04-09 22:20:20 +05:30
fa5f822f95 feat(subconscious): stabilize heartbeat + subconscious loop (#392) (#437)
* feat(subconscious): stabilize heartbeat + subconscious loop (#392)

- Enable heartbeat by default (enabled=true, inference_enabled=true, 5min interval)
- Seed system tasks on engine init, not first tick
- SQLite-backed task/log/escalation persistence
- Overlap guard with generation counter — stale ticks are cancelled
- Single log entry per task per tick, updated in place (in_progress → act/noop/escalate/failed/cancelled)
- Rate-limit retry (429 only) for agentic-v1 cloud model calls
- Approval gate: unsolicited write actions on read-only tasks require user approval
- Analysis-only mode for agentic-v1 on read-only escalations
- Non-blocking status RPC — reads from DB, never blocks on engine mutex
- Frontend: system vs user task distinction, toggle switches, expandable activity log
- Frontend: 3s auto-poll on Subconscious tab, skill-related escalation navigation
- Consecutive failure counter in status (resets on success)
- last_tick_at only advances on successful evaluation
- Missing LLM evaluation fallback — unevaluated tasks default to noop
- Docs: subconscious.md architecture guide, memory-sync-functions.md reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: fix Prettier formatting for subconscious frontend files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: retrigger checks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(heartbeat): use disabled config in run_returns_immediately_when_disabled test

HeartbeatConfig::default() has enabled: true, so run() entered the infinite
loop and never returned — hanging the test (and CI) indefinitely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(subconscious): remove HEARTBEAT.md task import, use SQLite as sole task source

Tasks are now managed exclusively in SQLite via the Subconscious UI.
HEARTBEAT.md is retained for instructions/context only, not as a task list.
Situation report now reads pending tasks from SQLite instead of HEARTBEAT.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: cargo fmt on subconscious engine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:03:05 -07:00
Mega MindandGitHub 371bcd34ea Feat/chat issue (#441)
* feat: display app version in settings panel

* fix(onboarding): auto-refresh accessibility state after grant (#351)

* style(onboarding): apply formatter for issue #351 fix

* fix(onboarding): ESLint + typed mock for ScreenPermissionsStep; clear flag in handler

Consolidate tauriCommands imports and drop redundant mock cast.

Handle granted accessibility in focus/visibility callback instead of a follow-up effect.

Made-with: Cursor

* feat(env): add support for custom dotenv path and update dependencies

- Introduced an optional environment variable `OPENHUMAN_DOTENV_PATH` to specify a custom path for dotenv files, enhancing configuration flexibility.
- Updated `Cargo.toml` to include the `dotenvy` dependency for improved dotenv file handling.
- Enhanced the `.env.example` file with a new comment for the custom dotenv path.
- Added data-testid attributes and button types in `SkillDebugModal` and `Skills` components for better testability.
- Created new tests for Gmail and Notion third-party skills to ensure proper functionality of sync and debug tools.
- Added documentation for memory sync functions to clarify usage patterns and function details.

* fix: address CodeRabbit review on PR #441

- Dotenv: treat empty OPENHUMAN_DOTENV_PATH as unset; propagate from_path errors
- Document OPENHUMAN_DOTENV_PATH parent-env requirement in .env.example
- Memory docs: MD040 fence language; clarify skill namespace vs integration id
- QuickJS bootstrap: modern helpers, generic platform.notify log, template URLs
- Skills UI: type=button on close/settings; async waitFor in sync tests
- Gmail OAuth e2e: workspace env matches MemoryClient; env/engine drop guards;
  redact secrets from logs
- Add replace_global_engine for test teardown

Made-with: Cursor
2026-04-09 01:51:30 +05:30