Skip to content

feat(ai): AI subsystem overhaul, phases 0-10 (vault, v4 config, provider plugins, catalog, core, tasks, local runtimes, sessions, surface adoption, config CLI) - #298

Merged
genesiscz merged 30 commits into
masterfrom
feat/ai-overhaul
Jul 30, 2026
Merged

feat(ai): AI subsystem overhaul, phases 0-10 (vault, v4 config, provider plugins, catalog, core, tasks, local runtimes, sessions, surface adoption, config CLI)#298
genesiscz merged 30 commits into
masterfrom
feat/ai-overhaul

Conversation

@genesiscz

@genesiscz genesiscz commented Jul 28, 2026

Copy link
Copy Markdown
Owner

The AI-subsystem overhaul, phases 0-10. 119 commits, 327 files, +29811/-5025 against master.

Rebased onto master 2026-07-29: the previous base branch was split into separate PRs (#297, #299-#306) and merged with its commits regrouped, so the campaign commits were replayed with git rebase --onto. origin/master is a strict ancestor; every line master added to the overlapping files was verified to have survived or been deliberately superseded.

What this is

One modular, config-driven AI layer under src/utils/ai/ and src/utils/security/, replacing the parallel stacks that had accumulated: 4 LLM call paths, 4 TTS entry points, 2 account stores, 3 pricing tables, a stale hand-kept model catalog, and SDK singletons reading API keys straight from the environment.

  • security/: encrypted secret vault (AES-256-GCM per entry, HKDF-derived per-entry keys, entry path bound as GCM AAD so ciphertexts cannot be swapped between entries), master key resolved via a ladder (env, OS keychain via @napi-rs/keyring, opt-in key file), passphrase-wrapped export/import, rotation that aborts before writing if any entry fails to decrypt.
  • ai/config/: v4 schema (zod) with immutable account id vs renameable name, first-class @account/<id> refs with a reverse index (referrersOf, external scanners pluggable), derived selectors instead of stored booleans, per-account useEnvApiKey.
  • ai/providers/: ~20 provider plugins behind one interface with a single resolveCredential chokepoint; argless SDK factories and bare singletons are gone, enforced by a CI guard.
  • ai/catalog/: all-provider model registry plus live discovery overlays (LiteLLM, OpenRouter, per-plugin probes); unified async pricing.
  • ai/core/: ModelRef grammar (provider/model, @account/<id>:<model>, aliases), one resolution ladder (explicit, app default, task default, global default), a single callLLM/streamLLM.
  • ai/tasks/: ai.chat/summarize/translate/embed/transcribe/speak/... facades; TTS entry points collapse from 4 to 1.
  • ai/local/: artifacts/runtimes/adapters restructure of the ONNX, CoreML and sherpa stack, exposed as regular provider plugins.
  • ai/session/: SessionBackend (sqlite and JSONL), SessionStore.turn() with atomic question+answer append, MiniAgent with interject support.
  • ai/usage/: central recordUsage/queryUsage; the ai-proxy client ledger is untouched by design.
  • Surface adoption: ask, ai-proxy (accounts by ref), claude, dev-dashboard, youtube, say and transcribe call through the new layer.
  • Config CLI/TUI: tools ai config account add|list|show|edit|rm|test, default set, link ls, secret set|rotate|export|import, doctor; rm refuses while referrersOf reports links.
  • Migrations: v3-to-v4 plus plaintext-to-vault on load, idempotent; hybrid pass-through so pre-v4 binaries and v4 builds can interleave without breaking each other; a _schemaVersion: 3 sentinel keeps old binaries' migration check quiet; a defaults snapshot old code never touches.

Behavior changes

API keys resolve from configured accounts. Ambient env pickup works only through an account's explicit useEnvApiKey (pickups alive before the migration are grandfathered into accounts, so nothing silently loses capability); a configured account now outranks an env var instead of the reverse. Secrets move from plaintext config fields to the vault as { type: "secure", path: ... } refs.

Verification

  • Full test suite exits 0 (parallel and serial phases, twice consecutively). The 14 tests failing on origin/master are fixed in this branch (test preload list, a walkFiles fallback that silently dropped subtrees on transient errors, serialization of load-sensitive test files, and related runner fixes).
  • tsgo --noEmit and biome check . clean repo-wide.
  • The v3-to-v4 migration was rehearsed end to end on config copies (including the keyless/headless defer path), with byte-identical projections between the legacy facade and the new store, and an old-binary interleave test proving the sentinel armor.
  • Review threads: 0 unresolved.

Not in this PR

  • The live config migration. A deliberate post-merge step; builds running from a worktree refuse to touch the real config (assertSafeToWriteRealConfig() plus a migration guard that checks both cwd and the code's own location).
  • Removal of the legacy AIConfig facade (it projects v4 into the v3 shape and syncs edits back; deleting it and its importers is a follow-up PR).
  • Cross-vendor retry for failed transcription requests: the new stack degrades at provider-selection time only; request-failure retry over the plugin stack is follow-up work.
  • eve adoption (gated on eve stability).

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@eve-bot-lovinka

eve-bot-lovinka Bot commented Jul 28, 2026

Copy link
Copy Markdown

🐉 eve review — 🔴 REQUEST_CHANGES · 8 findings

review · run

  • Queued 01:06:47Z
  • Reading diff — 300 files
  • Building repo map
  • Analyzing (find → verify) — 10 candidates → 8 survivors
  • Posting review
  • Review posted 01:13:22Z (6m 35s)
Previous runs (10)
run head outcome findings took
28 f12e168 ✅ APPROVE 7 6m 30s
27 b4a682e ✅ APPROVE 2 4m 51s
26 234341f ✅ APPROVE 1 3m 17s
25 4dcff8a 🔴 REQUEST_CHANGES 1 6m 34s
24 e725f04 🔴 REQUEST_CHANGES 9 7m 49s
23 c7ac283 ✅ APPROVE 2 5m 10s
22 c016ed7 ✅ APPROVE 3 4m 42s
21 e76cf45 ✅ APPROVE 1 2m 22s
20 manual 🔴 REQUEST_CHANGES 7 9m 13s
19 be16c51 ⏭️ superseded 15m 55s

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 324 files, which is 174 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to Pro+ to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5875defd-9de8-4aeb-8dda-3129f4dfe8b9

📥 Commits

Reviewing files that changed from the base of the PR and between 7c6209a and 5758fe8.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (329)
  • .claude-plugin/marketplace.json
  • .claude/docs/ai-adding-providers.md
  • .claude/docs/ai.md
  • .githooks/pre-commit
  • .github/workflows/ci.yml
  • CLAUDE.md
  • apps/eve/agent/agent.ts
  • apps/eve/agent/connections/youtube.ts
  • apps/eve/agent/lib/env.ts
  • apps/eve/agent/lib/service-key-auth.ts
  • apps/eve/agent/model.ts
  • bunfig.toml
  • docs/CONSUMING.md
  • package.json
  • plugins/genesis-tools/.claude-plugin/plugin.json
  • plugins/genesis-tools/commands/github-pr.md
  • plugins/genesis-tools/skills/github/scripts/actions-cost.ts
  • scripts/ci/ai-credentials-guard.sh
  • scripts/ci/ai-credentials-guard.test.ts
  • scripts/ci/check-package-boundaries.ts
  • scripts/test.ts
  • src/agents/tests/matrix-e2e.test.ts
  • src/agents/tests/matrix.sh
  • src/ai-proxy/commands/clients.ts
  • src/ai-proxy/commands/link.ts
  • src/ai-proxy/commands/serve.ts
  • src/ai-proxy/index.ts
  • src/ai-proxy/lib/account-config.test.ts
  • src/ai-proxy/lib/account-config.ts
  • src/ai-proxy/lib/account-refs.test.ts
  • src/ai-proxy/lib/account-refs.ts
  • src/ai-proxy/lib/billing/pricing.test.ts
  • src/ai-proxy/lib/billing/pricing.ts
  • src/ai-proxy/lib/clients.test.ts
  • src/ai-proxy/lib/clients.ts
  • src/ai-proxy/lib/config-store.ts
  • src/ai-proxy/lib/gateway-account.test.ts
  • src/ai-proxy/lib/gateway-account.ts
  • src/ai-proxy/lib/model-meta.test.ts
  • src/ai-proxy/lib/model-meta.ts
  • src/ai-proxy/lib/providers/registry.ts
  • src/ai-proxy/lib/realtime.test.ts
  • src/ai-proxy/lib/route-guards.ts
  • src/ai-proxy/lib/server.ts
  • src/ai-proxy/lib/types.ts
  • src/ai-proxy/lib/usage/client-ledger.ts
  • src/ai-proxy/lib/usage/track-response.ts
  • src/ai-proxy/lib/usage/usage-events.test.ts
  • src/ai-proxy/lib/usage/usage-events.ts
  • src/ai-spend/lib/pricing.ts
  • src/ai/commands/config/account.ts
  • src/ai/commands/config/defaults.ts
  • src/ai/commands/config/display.test.ts
  • src/ai/commands/config/display.ts
  • src/ai/commands/config/doctor.ts
  • src/ai/commands/config/index.ts
  • src/ai/commands/config/link.ts
  • src/ai/commands/config/secret.ts
  • src/ai/commands/config/stdin.ts
  • src/ai/commands/config/tui.test.ts
  • src/ai/commands/config/tui.ts
  • src/ai/index.ts
  • src/ask/README.md
  • src/ask/chat/ChatEngine.test.ts
  • src/ask/chat/ChatEngine.ts
  • src/ask/chat/ConversationManager.ts
  • src/ask/index.ts
  • src/ask/lib/ChatSessionManager.ts
  • src/ask/lib/__tests__/ChatSessionManager.test.ts
  • src/ask/output/CostPredictor.ts
  • src/ask/output/CostTracker.ts
  • src/ask/pricing/index.ts
  • src/ask/providers/DynamicPricing.ts
  • src/ask/providers/ModelSelector.ts
  • src/ask/providers/ProviderManager.test.ts
  • src/ask/providers/ProviderManager.ts
  • src/ask/providers/detect-api-key.test.ts
  • src/ask/providers/pricing-ladder.test.ts
  • src/ask/utils/helpers.ts
  • src/claude/commands/logout.ts
  • src/claude/commands/summarize.ts
  • src/claude/lib/history/summarize/engine.ts
  • src/claude/lib/models.ts
  • src/claude/lib/teammate-wrapper.test.ts
  • src/claude/lib/teammate-wrapper.ts
  • src/claude/lib/usage/shared-cache.ts
  • src/claude/lib/usage/usage-mirror.test.ts
  • src/claude/mcp/boards.e2e.test.ts
  • src/claude/mcp/server.e2e.test.ts
  • src/dev-dashboard/lib/claude-usage/aggregator.ts
  • src/dev-dashboard/lib/claude-usage/totals.test.ts
  • src/dev-dashboard/lib/claude-usage/types.ts
  • src/dev-dashboard/server/routes/claude.ts
  • src/dev-dashboard/ui/src/components/claude-usage/SpendTotals.tsx
  • src/dev-dashboard/ui/src/routes/claude.tsx
  • src/indexer/commands/add.ts
  • src/indexer/commands/models.ts
  • src/indexer/lib/indexer.ts
  • src/indexer/lib/model-registry.test.ts
  • src/indexer/lib/model-registry.ts
  • src/indexer/mcp/tools/models.ts
  • src/macos/commands/mail/index-cmd.ts
  • src/say/index.ts
  • src/say/lib/speak.ts
  • src/stash/commands/apply-conflict.test.ts
  • src/transcribe/index.ts
  • src/usage/index.ts
  • src/utils/ai/AIConfig.ts
  • src/utils/ai/LanguageDetector.ts
  • src/utils/ai/ModelManager.ts
  • src/utils/ai/__tests__/AIConfig.characterization.test.ts
  • src/utils/ai/__tests__/AIConfig.test.ts
  • src/utils/ai/anthropic/models.ts
  • src/utils/ai/call-llm.ts
  • src/utils/ai/catalog/discover.ts
  • src/utils/ai/catalog/index.ts
  • src/utils/ai/catalog/keys.ts
  • src/utils/ai/catalog/litellm.ts
  • src/utils/ai/catalog/pricing.test.ts
  • src/utils/ai/catalog/pricing.ts
  • src/utils/ai/catalog/static.test.ts
  • src/utils/ai/catalog/static.ts
  • src/utils/ai/catalog/types.ts
  • src/utils/ai/config/AiConfigStore.test.ts
  • src/utils/ai/config/AiConfigStore.ts
  • src/utils/ai/config/account-ops.test.ts
  • src/utils/ai/config/account-ops.ts
  • src/utils/ai/config/defaults-snapshot.ts
  • src/utils/ai/config/doctor-no-refresh.test.ts
  • src/utils/ai/config/doctor.test.ts
  • src/utils/ai/config/doctor.ts
  • src/utils/ai/config/migrate.test.ts
  • src/utils/ai/config/migrate.ts
  • src/utils/ai/config/migration-guard.test.ts
  • src/utils/ai/config/migration-guard.ts
  • src/utils/ai/config/migrations/2026-08-configV4.test.ts
  • src/utils/ai/config/migrations/2026-08-configV4.ts
  • src/utils/ai/config/migrations/2026-08-secretsToVault.test.ts
  • src/utils/ai/config/migrations/2026-08-secretsToVault.ts
  • src/utils/ai/config/migrations/2026-08-seedEnvAccounts.test.ts
  • src/utils/ai/config/migrations/2026-08-seedEnvAccounts.ts
  • src/utils/ai/config/migrations/chain.test.ts
  • src/utils/ai/config/paths.test.ts
  • src/utils/ai/config/paths.ts
  • src/utils/ai/config/refs.test.ts
  • src/utils/ai/config/refs.ts
  • src/utils/ai/config/schema.test.ts
  • src/utils/ai/config/schema.ts
  • src/utils/ai/config/selectors.ts
  • src/utils/ai/config/store-bridge.ts
  • src/utils/ai/config/v3-adapter.test.ts
  • src/utils/ai/config/v3-adapter.ts
  • src/utils/ai/core/call-dispose.test.ts
  • src/utils/ai/core/call.ts
  • src/utils/ai/core/choose.test.ts
  • src/utils/ai/core/choose.ts
  • src/utils/ai/core/fetch.test.ts
  • src/utils/ai/core/fetch.ts
  • src/utils/ai/core/gateway-tags.test.ts
  • src/utils/ai/core/model-ref.test.ts
  • src/utils/ai/core/model-ref.ts
  • src/utils/ai/core/resolve.test.ts
  • src/utils/ai/core/resolve.ts
  • src/utils/ai/core/types.ts
  • src/utils/ai/embedding-selection.ts
  • src/utils/ai/github-copilot/token.ts
  • src/utils/ai/grok/account.ts
  • src/utils/ai/index.ts
  • src/utils/ai/llm-cost.ts
  • src/utils/ai/local/adapters/index.test.ts
  • src/utils/ai/local/adapters/index.ts
  • src/utils/ai/local/artifacts/index.ts
  • src/utils/ai/local/artifacts/sources/hf.test.ts
  • src/utils/ai/local/artifacts/sources/hf.ts
  • src/utils/ai/local/artifacts/sources/url.ts
  • src/utils/ai/local/artifacts/store.test.ts
  • src/utils/ai/local/artifacts/store.ts
  • src/utils/ai/local/artifacts/types.ts
  • src/utils/ai/local/descriptors.characterization.test.ts
  • src/utils/ai/local/descriptors/index.test.ts
  • src/utils/ai/local/descriptors/index.ts
  • src/utils/ai/local/descriptors/models.ts
  • src/utils/ai/local/descriptors/types.ts
  • src/utils/ai/local/device.test.ts
  • src/utils/ai/local/device.ts
  • src/utils/ai/local/index.ts
  • src/utils/ai/local/runtimes/coreml/index.ts
  • src/utils/ai/local/runtimes/index.ts
  • src/utils/ai/local/runtimes/sherpa/diarize.preflight.test.ts
  • src/utils/ai/local/runtimes/sherpa/diarize.ts
  • src/utils/ai/local/runtimes/sherpa/index.ts
  • src/utils/ai/local/runtimes/sherpa/models.test.ts
  • src/utils/ai/local/runtimes/sherpa/models.ts
  • src/utils/ai/local/runtimes/sherpa/paths.ts
  • src/utils/ai/local/runtimes/transformers-js/dtype.ts
  • src/utils/ai/local/runtimes/transformers-js/index.test.ts
  • src/utils/ai/local/runtimes/transformers-js/index.ts
  • src/utils/ai/local/runtimes/types.ts
  • src/utils/ai/models/registry.ts
  • src/utils/ai/openai/codex-auth.ts
  • src/utils/ai/providers/AICloudProvider.ts
  • src/utils/ai/providers/AICoreMLProvider.ts
  • src/utils/ai/providers/AILocalProvider.ts
  • src/utils/ai/providers/credentials.test.ts
  • src/utils/ai/providers/credentials.ts
  • src/utils/ai/providers/embedding-adapter.ts
  • src/utils/ai/providers/openai/AIOpenAITextToSpeechProvider.test.ts
  • src/utils/ai/providers/plugin-types.ts
  • src/utils/ai/providers/plugins.ts
  • src/utils/ai/providers/plugins/ai-proxy.test.ts
  • src/utils/ai/providers/plugins/ai-proxy.ts
  • src/utils/ai/providers/plugins/anthropic-sub.ts
  • src/utils/ai/providers/plugins/api-key.ts
  • src/utils/ai/providers/plugins/asr-vendors.test.ts
  • src/utils/ai/providers/plugins/asr-vendors.ts
  • src/utils/ai/providers/plugins/github-copilot.ts
  • src/utils/ai/providers/plugins/grok-sub.ts
  • src/utils/ai/providers/plugins/huggingface.ts
  • src/utils/ai/providers/plugins/openai-sub.ts
  • src/utils/ai/providers/registry.test.ts
  • src/utils/ai/providers/registry.ts
  • src/utils/ai/providers/resolve.test.ts
  • src/utils/ai/providers/resolve.ts
  • src/utils/ai/providers/speech-adapter.test.ts
  • src/utils/ai/providers/speech-adapter.ts
  • src/utils/ai/providers/speech-engines.ts
  • src/utils/ai/providers/transcription-adapter.test.ts
  • src/utils/ai/providers/transcription-adapter.ts
  • src/utils/ai/providers/xai/AIXAITextToSpeechProvider.ts
  • src/utils/ai/proxy/AiProxyClient.ts
  • src/utils/ai/proxy/session-transport.test.ts
  • src/utils/ai/proxy/session-transport.ts
  • src/utils/ai/resolvers/AnthropicSubResolver.ts
  • src/utils/ai/resolvers/GrokSubResolver.ts
  • src/utils/ai/resolvers/OpenAISubResolver.ts
  • src/utils/ai/resolvers/index.ts
  • src/utils/ai/resolvers/resolve-models.test.ts
  • src/utils/ai/resolvers/resolve-models.ts
  • src/utils/ai/session/backends/json-files.ts
  • src/utils/ai/session/backends/sqlite.test.ts
  • src/utils/ai/session/backends/sqlite.ts
  • src/utils/ai/session/index.ts
  • src/utils/ai/session/mini-agent.test.ts
  • src/utils/ai/session/mini-agent.ts
  • src/utils/ai/session/store.test.ts
  • src/utils/ai/session/store.ts
  • src/utils/ai/session/types.ts
  • src/utils/ai/tasks/Embedder.ts
  • src/utils/ai/tasks/Summarizer.ts
  • src/utils/ai/tasks/Synthesizer.ts
  • src/utils/ai/tasks/Transcriber.diarize-invariant.test.ts
  • src/utils/ai/tasks/Transcriber.ts
  • src/utils/ai/tasks/Translator.ts
  • src/utils/ai/tasks/__tests__/Synthesizer.test.ts
  • src/utils/ai/tasks/facade.dispose.test.ts
  • src/utils/ai/tasks/facade.ts
  • src/utils/ai/tasks/resolve-task.test.ts
  • src/utils/ai/tasks/resolve-task.ts
  • src/utils/ai/tasks/task-models.ts
  • src/utils/ai/transcription/TranscriptionManager.ts
  • src/utils/ai/transcription/sdk-result.ts
  • src/utils/ai/usage/core-emit.test.ts
  • src/utils/ai/usage/index.ts
  • src/utils/ai/usage/paths.ts
  • src/utils/ai/usage/query.ts
  • src/utils/ai/usage/record.ts
  • src/utils/ai/usage/types.ts
  • src/utils/ai/usage/usage.test.ts
  • src/utils/ask/providers/compat.ts
  • src/utils/ask/providers/detected.ts
  • src/utils/ask/providers/providers.ts
  • src/utils/ask/usage-tokens.ts
  • src/utils/audio/diarize-local.ts
  • src/utils/audio/diarize-models.test.ts
  • src/utils/audio/diarize-models.ts
  • src/utils/bun/preload-test-keyring.ts
  • src/utils/bun/preload-test-sandbox.test.ts
  • src/utils/bun/preload-test-sandbox.ts
  • src/utils/claude/database.ts
  • src/utils/claude/subscription-auth.ts
  • src/utils/claude/token-journal.test.ts
  • src/utils/cli/stdout.test.ts
  • src/utils/config/migrations/2026-04-07-migrateAI.ts
  • src/utils/env/envVariables.ts
  • src/utils/format.test.ts
  • src/utils/format.ts
  • src/utils/fs/disk-usage.ts
  • src/utils/fs/watcher.test.ts
  • src/utils/package.json
  • src/utils/security/MasterKey.ts
  • src/utils/security/SecretStore.test.ts
  • src/utils/security/SecretStore.ts
  • src/utils/security/SecureRef.test.ts
  • src/utils/security/SecureRef.ts
  • src/utils/security/index.ts
  • src/utils/security/keyring/headless.ts
  • src/utils/security/keyring/keychain-guard.test.ts
  • src/utils/security/keyring/os-keyring.ts
  • src/utils/security/keyring/types.ts
  • src/utils/security/vault-admin.test.ts
  • src/utils/security/vault-admin.ts
  • src/utils/security/vault-format.ts
  • src/utils/test/skip.test.ts
  • src/utils/test/skip.ts
  • src/youtube/commands/_shared/ask-provider.ts
  • src/youtube/lib/__tests__/ask-session-store.test.ts
  • src/youtube/lib/__tests__/call-llm-structured.test.ts
  • src/youtube/lib/__tests__/collection-ask.test.ts
  • src/youtube/lib/__tests__/presets-injection.test.ts
  • src/youtube/lib/__tests__/reports.test.ts
  • src/youtube/lib/__tests__/summarize.test.ts
  • src/youtube/lib/__tests__/summary-audio-synthesis.test.ts
  • src/youtube/lib/__tests__/translate-transcript.test.ts
  • src/youtube/lib/ask-answer.ts
  • src/youtube/lib/ask-session-store.ts
  • src/youtube/lib/ask-session.ts
  • src/youtube/lib/collection-ask.ts
  • src/youtube/lib/provider-choice.ts
  • src/youtube/lib/qa.ts
  • src/youtube/lib/qa.types.ts
  • src/youtube/lib/server/routes/models.ts
  • src/youtube/lib/server/routes/videos.audio.test.ts
  • src/youtube/lib/server/routes/videos.ts
  • src/youtube/lib/summarize.ts
  • src/youtube/lib/summarize.types.ts
  • src/youtube/lib/summary-audio.ts
  • src/youtube/lib/transcripts.ts
  • src/youtube/lib/transcripts.types.ts
  • src/youtube/lib/usage.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ai-overhaul

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​napi-rs/​keyring@​1.3.0951007684100

View full report

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

b8e1c6d · 12 actionable findings · view run ↗

Severity Count
🟠 High 4
🟡 Medium 5
🔵 Low 3

Comment thread src/utils/security/vault-admin.ts Outdated
Comment thread src/utils/security/keyring/os-keyring.ts Outdated
Comment thread src/utils/security/vault-admin.ts Outdated
Comment thread src/utils/security/MasterKey.ts
Comment thread src/utils/ai/config/schema.ts
Comment thread src/utils/security/index.ts Outdated
Comment thread src/utils/security/vault-admin.test.ts
Comment thread src/utils/security/keyring/headless.ts
Comment thread src/utils/security/keyring/os-keyring.ts
Comment thread src/utils/security/keyring/types.ts
@eve-bot-lovinka

Copy link
Copy Markdown

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — ✅ Approved

71b442e · 1 actionable finding · view run ↗

Severity Count
🔵 Low 1

Comment thread src/utils/ai/__tests__/AIConfig.characterization.test.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🟡 Review comments

21f93aa · 4 actionable findings · view run ↗

Severity Count
🟡 Medium 2
🔵 Low 2

Comment thread src/utils/ai/config/AiConfigStore.ts
Comment thread src/utils/ai/config/AiConfigStore.ts
Comment thread src/utils/ai/config/AiConfigStore.ts
Comment thread src/utils/bun/preload-test-sandbox.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

f702a96 · 6 actionable findings · view run ↗

Severity Count
🟠 High 1
🟡 Medium 5

Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts Outdated
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts
Comment thread src/utils/ai/config/migrations/2026-08-secretsToVault.ts Outdated
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

2dd1d2f · 9 actionable findings · view run ↗

Severity Count
🟠 High 2
🟡 Medium 6
🔵 Low 1

Comment thread src/utils/ai/AIConfig.ts
Comment thread src/utils/security/MasterKey.ts
Comment thread src/utils/ai/config/store-bridge.ts
Comment thread src/utils/claude/subscription-auth.ts
Comment thread src/utils/claude/token-journal.test.ts
Comment thread src/utils/ai/AIConfig.ts Outdated
Comment thread src/utils/ai/config/store-bridge.ts
Comment thread src/utils/ai/config/store-bridge.ts
Comment thread src/utils/ai/config/v3-adapter.ts Outdated
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

6df7725 · 9 actionable findings · view run ↗

Severity Count
🟠 High 2
🟡 Medium 3
🔵 Low 4

Comment thread src/utils/ai/config/migrate.ts Outdated
Comment thread src/utils/ai/config/migration-guard.ts Outdated
Comment thread src/utils/ai/config/migrate.ts Outdated
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts Outdated
Comment thread src/utils/ai/providers/plugins/api-key.ts
Comment thread src/utils/ai/config/migration-guard.ts Outdated
Comment thread src/utils/ai/providers/credentials.ts Outdated
Comment thread src/utils/ai/providers/plugins/anthropic-sub.ts
Comment thread src/utils/ai/providers/plugins/api-key.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

07625af · 8 actionable findings · view run ↗

Severity Count
🟠 High 2
🟡 Medium 4
🔵 Low 2

Comment thread package.json Outdated
Comment thread src/utils/ai/providers/resolve.ts
Comment thread scripts/ci/ai-credentials-guard.sh Outdated
Comment thread src/utils/ai/providers/plugins/local.ts Outdated
Comment thread src/utils/ai/providers/plugins/local.ts Outdated
Comment thread src/utils/ai/providers/plugins/grok-sub.ts
Comment thread src/utils/ai/config/migration-guard.ts Outdated
Comment thread src/ask/providers/ProviderManager.ts Outdated
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

9473a60 · 7 actionable findings · view run ↗

Severity Count
🟠 High 3
🟡 Medium 2
🔵 Low 2

Comment thread src/utils/ai/catalog/pricing.ts
Comment thread src/utils/ai/config/migrations/2026-08-configV4.ts Outdated
Comment thread src/utils/ai/catalog/litellm.ts
Comment thread src/utils/ai/catalog/litellm.ts Outdated
Comment thread src/utils/ai/catalog/static.ts Outdated
Comment thread src/utils/ai/models/registry.ts Outdated
Comment thread src/utils/ai/models/registry.ts Outdated
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

e617a84 · 9 actionable findings · view run ↗

Severity Count
🟠 High 2
🟡 Medium 5
🔵 Low 2

Comment thread src/utils/ai/resolvers/resolve-models.ts
Comment thread src/utils/security/vault-admin.ts
Comment thread .githooks/pre-commit Outdated
Comment thread src/ask/providers/ProviderManager.ts Outdated
Comment thread src/utils/security/vault-admin.test.ts
Comment thread src/utils/security/vault-admin.ts
Comment thread src/utils/ai/resolvers/resolve-models.ts
Comment thread src/ask/providers/ProviderManager.ts Outdated
Comment thread src/utils/ask/providers/compat.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

7ecef5c · 6 actionable findings · view run ↗

Severity Count
🟠 High 1
🟡 Medium 2
🔵 Low 3

Comment thread src/utils/ai/core/resolve.ts Outdated
Comment thread src/utils/ai/catalog/static.ts
Comment thread src/utils/ai/core/fetch.ts Outdated
Comment thread src/ask/chat/ChatEngine.ts
Comment thread src/utils/ai/proxy/AiProxyClient.ts
Comment thread src/utils/bun/preload-test-keyring.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

ff0ccc0 · 10 actionable findings · view run ↗

Severity Count
🟠 High 2
🟡 Medium 5
🔵 Low 3

Comment thread src/utils/ai/config/account-ops.ts
Comment thread src/utils/ai/session/store.ts
Comment thread src/ai/commands/config/secret.ts Outdated
Comment thread src/utils/ai/local/artifacts/sources/hf.ts
Comment thread src/utils/ai/local/artifacts/store.ts
Comment thread src/utils/security/vault-admin.ts Outdated
Comment thread src/utils/ai/session/mini-agent.ts Outdated
Comment thread src/utils/ai/local/artifacts/sources/hf.ts
Comment thread src/utils/ai/local/artifacts/sources/url.ts
Comment thread src/utils/security/keyring/headless.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

8916e50 · 9 actionable findings · view run ↗

Severity Count
🟠 High 4
🟡 Medium 2
🔵 Low 3

Comment thread src/utils/ai/tasks/facade.ts
Comment thread src/utils/ai/tasks/resolve-task.ts
Comment thread src/utils/ai/local/adapters/index.ts Outdated
Comment thread src/utils/ai/tasks/facade.ts Outdated
Comment thread src/utils/ai/tasks/facade.ts
Comment thread src/utils/ai/tasks/facade.ts Outdated
Comment thread src/utils/ai/grok/account.ts
Comment thread src/utils/ai/local/adapters/index.ts
Comment thread src/utils/ai/transcription/TranscriptionManager.ts
@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@genesiscz
genesiscz force-pushed the feat/fixes-2026-07-27 branch from 1a71acf to 6b6cb1e Compare July 29, 2026 04:38

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

0a80f2e · 10 actionable findings · view run ↗

Severity Count
🟠 High 1
🟡 Medium 4
🔵 Low 5

Comment thread src/utils/ai/core/call.ts
Comment thread src/ai-proxy/lib/account-config.ts
Comment thread src/dev-dashboard/lib/claude-usage/aggregator.ts
Comment thread src/ai-proxy/lib/account-config.ts
Comment thread src/utils/ai/llm-cost.ts
Comment thread src/utils/ai/usage/record.ts
Comment thread src/ai-proxy/lib/clients.ts
Comment thread src/ai-proxy/commands/link.ts
Comment thread src/ai-proxy/lib/providers/registry.ts
Comment thread src/dev-dashboard/ui/src/components/claude-usage/SpendTotals.tsx
genesiscz added 25 commits July 30, 2026 03:06
…egistry, first plugins

- d96e7d2 feat(ai-providers): plugin contracts and the single credential chokepoint
- 302d32f feat(ai-providers): plugin registry and the first provider plugins
…sandboxed-config tripup

- 5bb7b70 fix(agents): matrix e2e must resolve its data root like the CLI does
- 95acaa1 feat(test): make env gates visible and fix the migration guard no-op
- 2fc6b9c fix(ai-config): make the sandboxed-config tripup structurally impossible
…first key resolution

- 9a85c76 feat(ai-providers): subscription, local and gateway plugins
- 944a64e feat(ai-providers): account-first key resolution with a declared env fallback
- 28dc362 fix(ai-config): read a pre-v4 config instead of dying on its shape
…dder

- d9b6ddf feat(ai-catalog): all-provider static registry (moved from models/registry)
- 8d5d341 feat(ai-catalog): unified pricing ladder; judge fixes for scope, gates and garbage tolerance
…tag pinning

- 45edd73 fix(security): rotation key escrow, generate-path rung fallback, GCM tag pinning
…ELS; real long-context rates

- e5b408e feat(ask): catalog-backed model listing, drop stale KNOWN_MODELS
- 1c0f9bd feat(ai-proxy): catalog-backed static fallbacks
- 897b70b refactor(indexer): rename clashing MODEL_REGISTRY export
- 83f3c75 fix(ai-catalog): price Sonnet 4.5 long context at its real >200k rate
…gle callLLM

- 4ec1c83 feat(ai-core): ModelRef grammar
- 0b8d1a8 feat(ai-catalog): record tool support so pickers can filter on it again
- 9fa3c83 feat(ai-core): resolveModel ladder
- 80c775e chore(ai-core): drop unused ModelRequest.explicit flag
- 83d2cbe feat(ai-catalog): current-generation openai, google and groq entries
- 8c8c9dd feat(ai-core): composable auth fetch
- 1f416b0 refactor(ai-core): single callLLM implementation; ChatEngine delegates
- 3823874 style(ai-core): biome line wrap in streamLLM signature
…b tags, banded pricing rules

- aea9592 fix(security): rebind vault store when home moves, block real keychain under tests
- 9997279 feat(ai-core): per-request job tags ride the gateway binding
- aff43af style: biome reflow residue from staged-only hook passes
- 0b5fc3f feat(security): triple-layer lockdown keeping tests off the real OS keychain
- 6b47187 feat(ai-catalog): time-windowed and context-banded pricing rules
- 349c7e9 feat(security): dual-signal test detection and non-interactive keychain write barrier
- 70b36e4 feat(ai-config): doctor + account ops library
- 6fb2760 feat(ai): tools ai config account/default/link commands
- 3e95539 fix(security): refuse master-key rotation while the env rung supplies the key
- cb07d40 feat(ai): tools ai config secret commands
- ed959ec style(ai-config): biome import order and wrapping
- a8dab42 feat(ai): config doctor + interactive TUI
…adapters

- 5d34225 refactor(ai-local): model descriptors extracted from ModelRegistry blob
- 8722d21 feat(ai-local): unified artifact store over HF hub + url sources
- 00df39a refactor(ai-local): runtime folders (transformers-js/coreml/sherpa)
- 34686ac feat(ai-local): plugin adapters over descriptor/artifact/runtime tree
- 57f4ee5 docs: biome formatting gotchas observed during the ai-overhaul session
- 94b7a2b docs: SafeJSON exclusion zones; drop stale suppressions
- 64bb9b4 docs: hard worktree rules for teammate agents (base check, bun install)
…e, ask and proxy adopt

- 5a10e93 feat(ai-session): session store + json backend (ask format)
- 244fb64 feat(ai-session): sqlite backend
- c933d33 feat(ai-session): mini-agent tool loop with interject
- 670afd3 refactor(youtube): ask sessions ride shared session store
- 3253070 refactor(ai-session): ask + proxy sessions on shared store
…ngle TTS path, one summarize

- 368b916 feat(ai-tasks): unified ai.* facade (chat/embed/translate/summarize/image)
- 494b02b feat(ai-tasks): transcription through provider bindings
- 8c6b623 feat(ai-providers): huggingface plugin so hf-cloud accounts have a home
- 5e517d5 feat(ai-tasks): single TTS path (say/youtube/xai unified)
- 300290e refactor(ai-tasks): one summarize path; realtime stub
- 4708aa1 fix(ai-tasks): --provider without --model resolves a real model ref
- d7ea45a fix(ai): diagnostic probes must never rotate a subscription credential
- 5329d67 docs: rules against diagnostics that mutate durable state
- 54b192d fix(ai): probe-purity for grok-sub, openai-sub and github-copilot
…legacy cloud task dropped

- 4d07fc0 fix(ai-tasks): facade owns the binding lifetime, and TranscriptionManager stops being a second ASR path
- 007ff32 refactor(ai-tasks): Summarizer and Translator run the facade's single path
- 690a0ab fix(ai-config): v4 migration drops the legacy "cloud" task provider
…gistration, usage events

- f6fca7c feat(ai-proxy): bill AI accounts by @account ref, with credential hot-reload
- 1a05e34 feat(ai-proxy): client keys as vault references instead of plaintext
- ced78b7 feat(ai-proxy): register the proxy as an AI-config account so @Proxy refs resolve
- 9c9e233 feat(ai-proxy): emit usage events from the ledger booking site
- d2925d9 fix(ai-proxy-client): resolve the proxy config under GENESIS_TOOLS_HOME
- 9a43dbf fix(ai-config): AiConfigStore.mutate awaits its callback
…n over the unified stack

- 6689146 refactor(ai): shared usage-token helpers and one call-cost implementation
- 98f09da refactor(ask): provider detection over unified config/plugins/catalog
- bd2684a feat(ai-core): chooseProviderModel; youtube stops importing ask internals
- a4a9328 test(ai): pin the scanned-all guard and grandfathered env resolution; drop dead ASR picker
…on; cache-rate fixes

- 9513118 feat(ai-usage): unified usage events (record/query)
- 0542892 feat(claude,dev-dashboard): usage through unified layer
- 7109076 fix(ai-usage): sandbox the claude db path, wire the proxy sink, record cost provenance
- d96cdbf fix(ai-usage): price cached input at cache rates, not twice at full rate
- 5287801 docs(ai-usage): costSource is a top-level field, not a meta key
…ricing, AI docs rewrite

- 2d51c03 refactor(eve): env facade for the agent, one process.env reference
- e31d73b chore(ai): delete the ai/device re-export shim
- 77e7872 refactor(claude): summarize prices via catalog, not ask's pricing shim
- f39141c docs(ai): rewrite the AI section for the new layers, add the two recipes
- 97adf9f fix(ai-core): callLLM releases a binding it resolved itself
… fixes

- fb79069 fix(ai,security): PR #298 review round — logout that logs out, and five ladder fixes
- 3ccec3d style(claude): import order in the summarize engine
- 92cc506 refactor(ai): reuse slugify and the one TASK_CAPABILITY map
- 8bdcf37 perf(ai,ask,ai-proxy): fix ask usage attribution and three hot-path costs
- dc10257 fix(ai-proxy,ai,security): address PR #298 review on cache identity, vault bytes, HF cache listing
- 71fdca2 fix(ai): address PR #298 review on config validation, load races and backup coverage
- 5a23600 fix(ai): address PR #298 review on the migration chain and local plugin bindings
- 8c28d00 fix(ai): address PR #298 review on bind transport, repair hints and the credentials guard
- 9215204 fix(ai): address PR #298 review on refresh-once, cache paths, pricing rules and send concurrency
- 4c60124 fix(ai,ci): address PR #298 review on catalog layering, derived lists, the preload and the pre-commit hook
- 2c5ace0 fix(claude): address PR #298 review by enforcing the token journal's byte cap
- 458265e fix(ask,ai-proxy): address PR #298 review on model switching and fingerprint coverage
- 233c070 fix(ai,security): address PR #298 review on grok-sub binding, escrow recovery and the fingerprint stat
- a0f49c8 refactor(ai): address PR #298 review by naming the converter after what it returns
- 10491f1 test(ask): address PR #298 review by pinning switchModel's attribution fields
- 4bf1e3e docs(plugin): record the reviewer bot logins and the thread-close protocol
- ffa07c0 fix(claude,ai-proxy): address PR #298 review on the teammate binary fallback and the client-secret mint
- 4f3aea3 docs(plugin): remove the contradiction between the resolve rule and its exception
- 5b6b976 fix(claude,plugin): address PR #298 review on test env restore, the fallback seam and the missing step
- e725f04 fix(plugin,docs): per-line biome ignores now that the plugin-scripts override is gone
- 4dcff8a fix(ai-config): repair a config an older binary re-stamped, instead of bricking on it
- 234341f fix(ai-config): three-layer armor so a pre-v4 binary cannot damage a migrated config
- e5b559f refactor(ai): kill the compatibility shims — importers move to the real modules
- b4a682e refactor(ai): apply the simplify round — armor depth, sandbox escape, atomic saves, one stdin reader
…, serialized suites, first green run

- 6949e59 fix(test,fs,ai-proxy,ai-config): eve round + the master-inherited suite failures
- f12e168 fix(test): serialize the opentui and getattrlistbulk suites — first fully green run

@eve-bot-lovinka eve-bot-lovinka Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐉 eve review — 🔴 Changes requested

5758fe8 · 8 actionable findings · view run ↗

Severity Count
🟠 High 1
🟡 Medium 3
🔵 Low 4

Not line-anchorable (review without the full diff context)

  • 🟠 High src/ask/providers/ProviderManager.ts:65 · confidence 97/100 — Provider cache bypasses config and credential refreshes: After one full detection pass, this singleton returns cached bound providers forever without even loading AiConfigStore. Consequently account deletion/disablement, default changes, endpoint edits, and vault credential rotation are invisible to long-running ask/youtube consumers—the exact stale-credential problem AiConfigStore was introduced to solve. The new test even pins this behavior by changing the config root and expecting the cached answer. Cache catalog data if needed, but invalidate/rebind providers from a config/vault generation stamp (as ai-proxy's binding fingerprint does).
  • 🟡 Medium src/ask/providers/ProviderManager.ts:64 · confidence 99/100 — Implementation is unrelated to the supplied migration plan: The supplied .claude/plans/2026-01-31-clack-prompts-migration.md specifies a gradual @inquirer/prompts to @clack/prompts migration, shared prompt/color utilities, and tool-by-tool CLI adoption. This hunk instead replaces provider discovery, account selection, credential binding, and model catalog behavior as part of a repository-wide AI overhaul. That matches the PR title but is substantive scope beyond the supplied plan; the plan/spec association should be corrected or replaced so reviewers and future implementers do not treat this AI architecture as execution of the Clack migration plan.


const store = await AiConfigStore.load();
const endpoint = gatewayEndpoint(config);
const existing = store.account(GATEWAY_ACCOUNT_ID);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Quality | 🟡 Medium · confidence 99/100

⚠️ Potential issue

Gateway linking can overwrite a concurrent account edit

existing is captured before acquiring the config lock, then its editable fields are copied into the entry written inside withLock. Although withLock rereads fresh config, this callback ignores the fresh account in data; a concurrent edit to name, label, enabled, tags, apps, billing, or credentials between lines 95 and 103 is overwritten with the stale snapshot. Resolve the existing gateway account from data.accounts inside the locked callback and derive the replacement from that value. Add a lock-interleaving test to preserve concurrent user edits.

🧩 Analysis

Grep evidence: const existing = store\.account\(GATEWAY_ACCOUNT_ID\)

/** Re-read when another process has written since we loaded. */
private async refreshIfStale(): Promise<void> {
const current = AiConfigStore.stampOf(this.storage);
if (current.mtimeMs === this.stamp.mtimeMs && current.size === this.stamp.size) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Quality | 🟡 Medium · confidence 99/100

⚠️ Potential issue

Equal-size rewrites can still leave the config stale

The refresh stamp compares only mtimeMs and file size. A same-length replacement whose timestamp is preserved (the surrounding comment explicitly names rsync -t, restores, and atomic replacements) passes this check even when its contents changed, so a long-running process can retain stale account settings or credential references indefinitely. Size only fixes differing-size writes; it does not make the stated preserved-timestamp case safe. Include a content digest or another replacement-sensitive identity in the stamp, and add a test that rewrites different same-length JSON while preserving mtime.

🧩 Analysis

Grep evidence: current\.mtimeMs === this\.stamp\.mtimeMs && current\.size === this\.stamp\.size

const blob = await exportVault(passphrase);
const target = resolve(flags.out);

writeFileSync(target, blob, { mode: 0o600 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Quality | 🔵 Low · confidence 93/100

⚠️ Potential issue

Vault export bypasses the repository write primitive

The new command uses synchronous Node writeFileSync/chmodSync for an output file. Project review memory requires Bun file APIs for writes and explicit output-mode behavior; this also blocks the CLI event loop during export and performs a second non-atomic permission operation. Use the repository/Bun owner-only write path so permissions are correct at creation and errors retain operational context.

🧩 Analysis

Grep evidence: writeFileSync\(target, blob, \{ mode: 0o600 \}\)

Comment thread apps/eve/agent/lib/env.ts
@@ -0,0 +1,73 @@
/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Tests | 🔵 Low · confidence 65/100

⚠️ Potential issue

No test changes accompany 73 added lines in apps/eve/agent/lib/env.ts

This PR adds 73 lines to apps/eve/agent/lib/env.ts with no touching test change (no changed test names env and none under apps/eve/agent/lib/). If the change alters behavior, add or extend a test that pins it (deterministic static check — ignore if the change is genuinely untestable or covered elsewhere).

🧩 Analysis

Grep evidence: env

@@ -0,0 +1,32 @@
import { loadConfigFresh } from "@app/ai-proxy/lib/config";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Tests | 🔵 Low · confidence 65/100

⚠️ Potential issue

No test changes accompany 32 added lines in src/ai-proxy/commands/link.ts

This PR adds 32 lines to src/ai-proxy/commands/link.ts with no touching test change (no changed test names link and none under src/ai-proxy/commands/). If the change alters behavior, add or extend a test that pins it (deterministic static check — ignore if the change is genuinely untestable or covered elsewhere).

🧩 Analysis

Grep evidence: link

@@ -1,7 +1,8 @@
import * as p from "@clack/prompts";
import { AIConfig } from "@genesiscz/utils/ai/AIConfig";
import { type ClearableCredential, clearCredentials } from "@genesiscz/utils/ai/config/account-ops";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Tests | 🔵 Low · confidence 65/100

⚠️ Potential issue

No test changes accompany 24 added lines in src/claude/commands/logout.ts

This PR adds 24 lines to src/claude/commands/logout.ts with no touching test change (no changed test names logout and none under src/claude/commands/). If the change alters behavior, add or extend a test that pins it (deterministic static check — ignore if the change is genuinely untestable or covered elsewhere).

🧩 Analysis

Grep evidence: logout

@eve-bot-lovinka

Copy link
Copy Markdown

Delta review completed and posted.

@genesiscz
genesiscz merged commit 5758fe8 into master Jul 30, 2026
@genesiscz
genesiscz deleted the feat/ai-overhaul branch July 30, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant