Commit Graph

1178 Commits

Author SHA1 Message Date
Mohamed Boudra
316253aed6 chore(lint): parallelize Claude persisted agents lookup
Replace sequential parseClaudeSessionDescriptor loop with Promise.all
to fix no-await-in-loop warning.
2026-04-24 03:18:16 +07:00
Mohamed Boudra
01f3502935 chore(lint): extract helpers to satisfy max-depth in server 2026-04-24 03:17:44 +07:00
Mohamed Boudra
4df7e18821 chore(lint): flatten nested blocks to satisfy max-depth in server 2026-04-24 03:11:42 +07:00
Mohamed Boudra
45a6e7545b chore(lint): fix no-shadow and no-nested-ternary in server 2026-04-24 03:10:03 +07:00
Mohamed Boudra
32255cef9a chore(lint): add explicit returns in then() callbacks in server 2026-04-24 03:07:31 +07:00
Mohamed Boudra
eabaf3508e chore(lint): remove unused helpers and vars in server tests 2026-04-24 03:04:12 +07:00
Mohamed Boudra
f8f0240c7d chore(lint): remove unused vitest imports in server tests 2026-04-24 03:01:50 +07:00
Mohamed Boudra
58d92f501b chore(lint): remove explicit any in server (129 warnings)
- session.ts: catch(error: any) -> catch(error) with Error coercion at use
- daemon-client transport: any -> unknown in listener types
- sherpa/onnx loaders: introduce structural native types
- pocket-tts-onnx: typed ONNX session inputs/outputs/tensors
- tests: any -> unknown + named stub types
2026-04-24 02:40:02 +07:00
Mohamed Boudra
d78dff3572 chore(lint): reduce max-depth in opencode-agent foreground loop 2026-04-24 02:10:41 +07:00
Mohamed Boudra
5f6ebe2065 chore(lint): narrow explicit any in claude-agent/openai stt 2026-04-24 02:09:48 +07:00
Mohamed Boudra
9865eb0a34 chore(lint): reduce max-depth in claude-agent query pump 2026-04-24 02:07:35 +07:00
Mohamed Boudra
d892ccb75d chore(lint): flatten nested conditions in pi-direct-agent history 2026-04-24 02:07:16 +07:00
Mohamed Boudra
18f9174bf6 chore(lint): extract helper to reduce max-depth in agent-response-loop 2026-04-24 02:06:42 +07:00
Mohamed Boudra
42516df3f1 chore(lint): reduce max-depth in claude-sdk-behavior test 2026-04-24 02:05:28 +07:00
Mohamed Boudra
2d19b47577 chore(lint): narrow explicit any in codex-app-server-agent thread items 2026-04-24 02:04:39 +07:00
Mohamed Boudra
1f4f0c020c chore(lint): hoist top-level inline arrays in diff-viewer 2026-04-24 02:04:01 +07:00
Mohamed Boudra
6c13bd9ab3 chore(lint): hoist SheetBackground combined style 2026-04-24 02:01:18 +07:00
Mohamed Boudra
34258780ec chore(lint): narrow explicit any in server relay/loader/logger-likes 2026-04-24 01:59:24 +07:00
Mohamed Boudra
afa8fc2709 chore(lint): remove useless constructors in server tests 2026-04-24 01:55:12 +07:00
Mohamed Boudra
89eac88888 chore(lint): narrow explicit any in misc server files 2026-04-24 01:51:26 +07:00
Mohamed Boudra
50faf34b9a fix(server): restore microtask ordering in session message dispatch
Converts per-group dispatchers to Promise<void> | undefined. The complexity
refactor broke two tests by inserting extra microtasks between each
dispatcher's await. The new pattern routes synchronously via a nullish-
coalescing chain and awaits only the matching dispatcher's promise.
2026-04-24 01:49:21 +07:00
Mohamed Boudra
0302b5b32e chore(lint): parallelize more safe awaits in server (no-await-in-loop)
- Workspace reconciliation: archive missing workspaces and orphaned
  projects concurrently instead of sequentially.
- Directory suggestions: resolve child directory candidates in parallel
  before filtering.
2026-04-24 01:44:29 +07:00
Mohamed Boudra
7bef37f458 chore(lint): parallelize safe awaits in server (no-await-in-loop)
Converts three sequential `for ... await` loops to `Promise.all`:
- OpenCode: configure MCP servers in parallel
- Sherpa: download model files and ensure multiple models concurrently
- Speech runtime: check required model files across models in parallel
2026-04-24 01:41:59 +07:00
Mohamed Boudra
6465edc01f fix(server): restore microtask ordering in message dispatch and stream event handler
The complexity refactor added async dispatcher chains that inserted extra
microtasks before message handlers ran, and wrapped the stream event switch
in an await that fired between emitState and dispatchStream. Two tests
regressed on both counts. Route to the matching dispatcher synchronously
and skip the await when the stream handler has no async work.
2026-04-24 01:39:20 +07:00
Mohamed Boudra
94b6604d7a chore(lint): parallelize more safe await-in-loop in server 2026-04-24 01:36:39 +07:00
Mohamed Boudra
cb6987b0a2 chore(lint): parallelize safe await-in-loop in server 2026-04-24 01:33:07 +07:00
Mohamed Boudra
339fc6b316 chore(lint): reduce cyclomatic complexity in server 2026-04-24 01:24:58 +07:00
Mohamed Boudra
6f131ad551 chore(lint): extract nested callbacks in server (max-nested-callbacks) 2026-04-23 23:58:58 +07:00
Mohamed Boudra
55baa53e0b fix(types): add index signatures for Record assignability 2026-04-23 23:44:24 +07:00
Mohamed Boudra
154dcaa479 chore(lint): rename shadowed bindings in server (no-shadow)
Rename inner bindings that shadow outer imports or function params:
- Promise executor `resolve` -> `resolvePromise` (shadowed path `resolve`)
- Method params `options` -> `input`/`target`/`update`/`runOptions`/`opts`/`killOptions`
- Misc loop/destructure renames for `workspaceId`, `scriptNames`, `path`, `query`, `taskNotificationItem`

Mechanical change only; no behavior change.
2026-04-23 23:37:47 +07:00
Mohamed Boudra
6f6c8a607c fix(types): restore Record assignability after type->interface autofix 2026-04-23 23:15:47 +07:00
Mohamed Boudra
9715df9385 chore(lint): flatten nested ternaries in server (no-nested-ternary) 2026-04-23 23:12:35 +07:00
Mohamed Boudra
106249c632 chore(lint): convert type aliases to interfaces (autofix)
- Remove no-use-before-define rule (conflicts with unistyles ordering)
- Add typescript/consistent-type-definitions: interface
- Run oxlint --fix: 606 type->interface conversions across 268 files

Typecheck green. Warnings: 5432 -> 3787 (-1645).
2026-04-23 22:59:49 +07:00
Mohamed Boudra
7aaca4ec8d chore(lint): use Set for LOG_FORMATS membership check 2026-04-23 22:46:32 +07:00
Mohamed Boudra
5b2f3fd830 chore: fix unresolved imports and tighten knip cross-workspace entries
Delete orphaned voice-mcp-agent-smoke.ts (voice-mcp-bridge was removed
in cff41d78). Fix model-catalog.e2e.test.ts import path. Extend knip
server entries to cover shared/client cross-workspace imports.
2026-04-23 22:41:27 +07:00
Mohamed Boudra
2dd8c27573 chore: delete unused files flagged by knip
38 files removed across app and server (verified unreferenced via
grep + typecheck). Includes dead components, hooks, stores, utils,
POC scripts, an empty orchestrator stub, stale playwright configs,
and a duplicate workspace-registry test-helpers module.

knip config tightened: added babel.config.js, native platform
extensions, and test-stubs/ to app entry patterns.
2026-04-23 22:29:49 +07:00
Mohamed Boudra
ba9ed8b995 chore: remove unused deps and declare missing ones
Knip-driven cleanup across all workspaces:

Removed (verified zero imports):
- root: @anthropic-ai/claude-agent-sdk, @modelcontextprotocol/sdk,
  expo, react, react-native, react-dom (duplicates of workspace deps)
- server: @ai-sdk/openai, @deepgram/sdk, express-basic-auth,
  fast-uri, mnemonic-id, tiny-invariant, playwright
- app: @expo/vector-icons, @getpaseo/server,
  @react-navigation/bottom-tabs, @react-navigation/elements,
  base64-js, react-native-css, expo-av, expo-font, expo-symbols,
  expo-web-browser, react-native-permissions,
  react-native-popover-view, react-native-securerandom
- cli: @getpaseo/relay
- desktop: @getpaseo/cli
- relay: @cloudflare/workers-types
- website: tailwindcss (provided by @tailwindcss/vite)

Declared (previously hoisted, now explicit):
- root: @types/ws, playwright, ws (used by scripts/)
- server: @mariozechner/pi-ai, @mariozechner/pi-agent-core
- app: expo-asset, qrcode, @types/qrcode, tiny-invariant,
  @xterm/headless, dotenv, jsdom
- cli: vitest
- desktop: vitest

Also removes the stray `/app.json` (obsolete, overridden by
packages/app/app.config.js).
2026-04-23 22:20:33 +07:00
Mohamed Boudra
cda3d1d46c chore: apply oxlint fix-suggestions (unused imports + useless fragments)
Scoped to only `no-unused-vars` and `react/jsx-no-useless-fragment` —
the safe subset of --fix-suggestions. Primary changes:

- Remove unused named imports from statements
- Remove unused default/type imports entirely
- Collapse `<><Single/></>` fragments to `<Single/>`

Verified clean: typecheck + format + lint all green.
2026-04-23 21:55:25 +07:00
Mohamed Boudra
731c570b25 fix(types): repair typecheck after oxlint safe autofix
The safe --fix introduced three type issues:

1. unicorn/prefer-set-has rewrote array literals to `new Set(...)`
   without updating the `T[]` type annotation — broken assignment.
   Fix type to `Set<T>` in logger.ts and agent-manager.ts.

2. unicorn/no-array-reverse changed `.reverse()` → `.toReversed()`
   (ES2023). Bump `lib` to ES2023 in tsconfig.base.json and
   tsconfig.server.json. Target stays at ES2020 — Node 20 supports
   the methods natively, no downlevel needed.

3. preserve-caught-error added `new Error(msg, { cause })` (ES2022),
   also covered by the lib bump.
2026-04-23 21:55:19 +07:00
Mohamed Boudra
177153e5e8 chore: apply oxlint autofix (safe level)
Auto-fixed 102 warnings (6040 → 5938) across 57 files. Main categories:
- preserve-caught-error: add { cause: error } to re-thrown errors
- unicorn/no-array-reverse: .reverse() → .toReversed()
- unicorn/no-useless-fallback-in-spread: drop unnecessary ?? {} in spreads
- oxc/no-map-spread: rewrite object spread in .map() to Object.assign
- react-hooks/exhaustive-deps: trim module-level constants from dep arrays

Ran npm run format after to clean up whitespace from lint mutations.
2026-04-23 21:47:36 +07:00
Mohamed Boudra
ce4b0d54c7 chore: reformat codebase with oxfmt
Apply prettier-compatible formatting across the repo to match the
incoming oxfmt configuration. Mechanical reformat only — no logic
changes. Covers YAML quote normalization, package.json key sorting,
Markdown/TOML formatting, and minor TS whitespace tweaks.
2026-04-23 21:44:48 +07:00
Mohamed Boudra
e521e1f79d chore(release): cut 0.1.62 2026-04-23 20:28:53 +07:00
Mohamed Boudra
3edf812578 Fix PR worktree status lookup 2026-04-23 20:10:48 +07:00
Mohamed Boudra
dfc8223bcc Make workspace git registration nonblocking (#542) 2026-04-23 18:21:59 +08:00
Mohamed Boudra
8cc7e8951c chore(release): cut 0.1.61 2026-04-23 06:33:09 +07:00
Mohamed Boudra
1f7b4eb10f chore(release): cut 0.1.61-beta.1 2026-04-22 22:37:42 +07:00
Mohamed Boudra
b133285f6d Add additive custom provider models 2026-04-22 22:16:54 +07:00
Mohamed Boudra
4d5889ff38 Load Pi extensions for model discovery 2026-04-22 22:12:49 +07:00
Mohamed Boudra
95c773ce6d chore(release): cut 0.1.60 2026-04-22 20:38:54 +07:00
Mohamed Boudra
c6680b3001 fix(release): preserve 0.1.60 schema compatibility 2026-04-22 20:37:19 +07:00