The shared per-IP mutation bucket (30/min) made common dashboard actions
like Respecify fail with "Too many requests" after light activity. Raise
mutation to 600/min, api to 1000/min, sse to 60/min for the local-first
use case.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vite/Vitest's resolver treats `#` as part of the filesystem path in some
environments, causing ERR_MODULE_NOT_FOUND on plugin reload.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Every agent-facing quality gate that used to pair tests with typecheck now
also includes lint. Specifically:
- core/src/types.ts: QA Check skill prompt runs lint, tests, typecheck (was
tests only) and gates task_done() on all three.
- core/src/agent-prompts.ts + engine/src/reviewer.ts: "Do NOT issue REVISE"
exclusion list now covers lint as well, so out-of-scope fixes that
restore lint remain allowed (matches the already-lint-aware completion
gate text at the top of the same prompts).
- engine/src/executor.ts: task_done() pre-flight checklist adds an explicit
"if the repo has a lint command, run it and fix failures" bullet, mirrors
the typecheck bullet, and expands the CRITICAL line from "ALL test
failures" to "ALL lint, test, and typecheck failures".
- core/src/store.ts: default Step 2 checklist (Testing & Verification) now
includes Lint and Typecheck alongside "All tests pass".
- cli/src/commands/plugin-scaffold.ts: generated plugin README and the
"Next steps" CLI output include \`pnpm lint\` between install and test.
Existing prompts that already paired lint with tests+typecheck (the
Completion section, hard quality gates, triage testing requirements) are
unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- All 8 vitest configs now default maxWorkers to \`cpus().length - 1\`
instead of the arbitrary \`Math.min(4, …)\` cap. Respects an explicit
VITEST_MAX_WORKERS override for constrained environments (CI, laptops
on battery). CLI keeps \`fileParallelism: false\` — audit found real
shared state (process.chdir in agent-import, dist/ races in build-exe
suites) that needs refactoring before we can flip it.
- packages/dashboard: move the mobile build-output smoke test (which
invokes \`pnpm build:client\` via execSync, ~3s per run) into a
dedicated \`test:build\` script so \`pnpm test\` isn't gated by it. A
matching root script keeps CI wiring simple.
- Root: bump --workspace-concurrency from 2 → 4 so core/engine/cli/
desktop can pipeline against dashboard's tail.
- Drop the now-redundant VITEST_MAX_WORKERS=4 prefix from the root
scripts; the per-package configs pick up cpu count themselves.
Dashboard test suite: 182s → 38s (5x) on a 10-core machine. Full
workspace run: ~3m15 → 2m29. All tests still pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- BackupManager.listBackups now matches kb-* and kb-pre-restore-* filenames
alongside the fusion-* pattern, parsing timestamps from either prefix.
- canonicalizeSettings rewrites autoBackupDir: ".kb/backups" to
".fusion/backups" so projects upgraded from the old brand keep working
(custom .kb/* paths remain untouched).
- createBackupManager applies the same canonicalization to settings it
receives, so the factory path also produces backups under .fusion/backups.
- Re-export getErrorMessage from core/src/types.ts so the dashboard's vite
"@fusion/core" alias (which points at types.ts) resolves the symbol for
client-side consumers — fixes the mobile build-output test.
Clears all 8 pre-existing kb → fn rename failures plus the 1 test that
regressed from the new getErrorMessage import surfacing the vite alias gap.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- TaskCard: four catch((err: any) => err.message) promise handlers in
archive/unarchive/delete/move → catch((err) => getErrorMessage(err)).
- InlineCreateCard + QuickEntryBox: .catch((err: any)) model-load handlers
→ getErrorMessage(err) with existing @fusion/core import.
- TerminalModal: drop (navigator as any).maxTouchPoints — modern lib.dom
types already expose the property.
- serve.ts: remove unused any annotation on OpenRouter model mapper; the
array element type is already inferred from json.data.
- pi.js, runtime-resolution.ts, dashboard.ts, serve.ts, dev-server-port-
detect.ts, devserver-manager.ts: drop now-stale eslint-disable comments
that the cleanup made redundant.
Fix a prompt-builder regression surfaced by agent's `any` cleanup: toolCall
with a raw string `arguments` field must be preserved verbatim (JSON-quoted)
rather than coerced to `{}`; restores a previously-passing test.
Then promote @typescript-eslint/no-explicit-any from warn → error. Future
new anys must either come with a one-line disable + justification or use a
real type. Workspace is now lint-clean (0 problems).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.
Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
.all()/.get() results via `as unknown as XxxRow[]` (the double cast is
required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
pi-ai concrete shapes; typed Claude stream event message fields.
72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Designed to replace the \`catch (err: any) { ... err.message ... }\` pattern
across the repo. Keeps the catch binding typed as \`unknown\` (TS default)
while still producing a readable message.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- no-useless-escape: drop needless backslashes in character classes and
URL/path regexes (gh-cli, store, task, modelFilter, useFileMention,
RoutineEditor, ScheduleForm).
- no-case-declarations: wrap case bodies in ProjectOverview and
SettingsModal with block scopes.
- prefer-const: convert a never-reassigned slug binding in agent-import;
annotate legitimate forward-declared let bindings in dashboard.ts that
callbacks close over before assignment.
- no-fallthrough: add missing break after settings-subcommand error.
- no-empty-interface/no-empty-object-type: convert ProjectManifest from
empty interface extension to a type alias.
- no-unused-expressions: replace `x && x.method()` short-circuits in
TerminalModal with optional chaining.
Then ratchet these rules from warn → error so regressions are blocked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Widen config match from top-level *.cjs to **/*.cjs so nested CommonJS
scripts (e.g. mcp-schema-server.cjs) get Node globals and require() allowance.
- Replace lazy require() in claude-skills.ts with a normal top-level fs import.
- Tighten an any-typed tool map in pi-claude-cli to { name: string }.
Clears the remaining 12 lint errors; workspace now has 0 errors, 450 warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codebase is now clean for this rule, so enforcing it as an error prevents
regressions. Intentionally unused bindings remain exempt via the \`^_\` prefix
convention already documented in the rule options.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Clears the remaining no-unused-vars warnings across the dashboard app and
server, desktop main, and engine sources. Dead React state destructures are
collapsed to setter-only, unused props are underscore-prefixed to preserve
API shape, and unreferenced catch bindings are dropped. No behaviour change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops orphaned imports and the never-referenced V4 migration SQL constant
(V4 was inlined into runMigrations). Also drops the unused TypedEventEmitter
helper type and unused destructured values from stores.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Eliminates no-unused-vars warnings across the CLI package by dropping
dead type imports, unused destructured helpers, and simplifying try/catch
blocks whose caught errors and intermediate results were never read.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three API shifts converge here:
- DefaultResourceLoaderOptions.agentDir is required as of 0.68 (the
old process.cwd() fallback was removed). Pass getFusionAgentDir()
explicitly in createFnAgent.
- createAgentSession({ tools }) is now a string[] allowlist of tool
names, not a Tool[] array (0.68). Our boundary-wrapping via
wrapToolsWithBoundary produces Tool instances, so we can no longer
pass them through \`tools\`. Move them into \`customTools\` and
suppress the built-in defaults with \`noTools: "builtin"\`. The
wrapped tools keep the same names (read, bash, ...) as the built-ins
they replace, so no call-site or prompt changes are needed.
- SettingsManager.create's first arg (cwd) became required (was
optional before). Dashboard routes that previously passed
\`undefined\` for a process-global settings view now pass
process.cwd() to match the existing DefaultPackageManager call below.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pi-coding-agent 0.70 replaced the mutable \`AgentState.error\` field with
a readonly \`AgentState.errorMessage\`. \`session.prompt()\` still does
not throw when retries are exhausted, so we still need to re-raise the
stored error after each prompt.
- checkSessionError (usage-limit-detector): widen parameter to accept
either key; prefer errorMessage so new sessions work, fall back to
error so we can deploy without forcing everyone's caches to rebuild.
- agent-reflection: same widening at the call site.
- pi.ts helpers: read both keys, best-effort clear both (the new field
is readonly, so the write is a no-op on 0.70 sessions but still
matters for mock sessions in tests).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The pi-coding-agent SDK moved from @sinclair/typebox 0.34.x to the new
typebox 1.x package in 0.69. Our direct imports in merger.ts and
extension.ts need to follow so tool schemas resolve to the same TSchema
the SDK consumes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ModelRegistry's public constructor became private in pi-coding-agent 0.64.
Direct `new ModelRegistry(...)` calls no longer compile. Switch the five
production sites to the factory (`ModelRegistry.create`) and update the
four test modules that mocked the class as a constructor to now mock it
as an object with `create` and `inMemory` static methods.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Jumps engine, cli, and dashboard from 0.62.0 → 0.70.0. Replaces the
@sinclair/typebox 0.34.x dep with typebox@^1 (SDK migrated in 0.69).
Picks up eight releases of provider-side reliability fixes (Anthropic,
OpenAI Responses/Codex, Bedrock, OpenRouter, Kimi), Opus 4.7 adaptive
thinking support, and a uuid security bump. Code migrations follow in
subsequent commits.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the .kb/kb.db migration path, legacy backup filename handling, and
backward-compat test suites. Renames internal kbDir identifiers to
fusionDir and hasKbProject/isValidKbProject to their fusion equivalents.
- Remove needsCentralMigration, autoMigrateToCentral, and the
"needs-migration" FirstRunState; checkAndMigrate and KB_SKIP_MIGRATION
env var are gone
- Remove LEGACY_BACKUP_DIR and canonicalizeBackupDir; listBackups no
longer matches kb-* filenames
- Delete backward-compat.test.ts and store-backward-compat.test.ts;
update remaining tests to new 3-state first-run model
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the stray useClaudeCli settings checkbox + onboarding question
with a proper provider-card UX. The card lives next to OAuth + API-key
cards in onboarding and settings, with Enable/Disable + Test actions.
Backend:
- Vendors rchern/pi-claude-cli@0.3.1 as packages/pi-claude-cli
(MIT, attribution in UPSTREAM.md). Lets us bump peer-dep on
pi-coding-agent in lockstep with Fusion (upstream pinned ^0.52.0
vs ours ^0.62.0) and fix bugs without waiting on upstream.
- Adds @fusion/pi-claude-cli as a workspace dep of @runfusion/fusion
so users don't have to `npm install -g pi-claude-cli` manually.
- serve/daemon/dashboard conditionally load the extension via
discoverAndLoadExtensions() when GlobalSettings.useClaudeCli is on;
no side-effects on user ~/.fusion/agent/settings.json.
- New GET /api/providers/claude-cli/status: claude --version probe
+ toggle state + cached extension resolution.
- New POST /api/auth/claude-cli: flips useClaudeCli, refuses if the
claude binary is missing, fires the existing skill-backfill hook.
- /api/auth/status now injects a synthetic {id:"claude-cli", type:"cli"}
provider entry so onboarding + settings see a consistent list.
Frontend:
- New ClaudeCliProviderCard component shared between ModelOnboardingModal
and SettingsModal's Authentication section.
- New AuthProvider.type = "cli" variant.
- Removed the old "Route AI calls through the Claude CLI" checkbox from
Global Models settings and the opt-in step from the onboarding wizard.
- ProviderIcon gets a composite Anthropic-mark-plus-terminal glyph for
the claude-cli provider id.
Tests:
- 8 unit tests for extension resolution (@fusion/pi-claude-cli is
workspace-linked so these run in-tree).
- 2 unit tests for the binary probe.
- Existing /auth/status tests filter out the new synthetic entry so
they keep asserting structural OAuth/API-key behavior in isolation.
- The vendored package's own 296 tests still pass unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Assert contributing docs explicitly state that pnpm test must run without prior build outputs
- Add CI workflow test coverage to keep docs and verify:workspace ordering aligned
- Expand Vitest workspace alias assertions to include @fusion/test-utils and src-only replacements
- Validate real symbol imports from workspace packages when dist directories are absent
The in-progress/in-review Changes tab was inflating file counts by
preferring a stale task.baseCommitSha over the live merge-base with the
base branch. Once upstream commits are merged into a feature branch,
baseCommitSha..HEAD includes every upstream file as well, producing
counts far larger than the branch's own changes.
resolveDiffBase now prefers merge-base(HEAD, [origin/]baseBranch), falling
back to baseCommitSha only when no merge-base is available or when the
merge-base equals HEAD (task sitting on the base branch with no
divergence, e.g. unit-test scenarios).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PUT /api/settings/global now fires an onUseClaudeCliToggled hook on an
actual transition so the UI toggle has immediate effect — serve/daemon/
dashboard wire it to ensureClaudeSkillsForAllProjectsOnStartup so every
registered project picks up .claude/skills/fusion without a restart.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PluginStore's constructor treats its rootDir arg as a project root and
internally appends `.fusion` before opening the SQLite DB. Several CLI
call sites were passing the already-resolved `.fusion` directory,
producing a doubled `.fusion/.fusion/fusion.db` that the dashboard
process kept recreating on every project load.
Pass the project root instead so the DB lands in the canonical
`.fusion/fusion.db` alongside the rest of the project's state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PluginStore's constructor treats its rootDir arg as a project root and
internally appends `.fusion` before opening the SQLite DB. Several CLI
call sites were passing the already-resolved `.fusion` directory,
producing a doubled `.fusion/.fusion/fusion.db` that the dashboard
process kept recreating on every project load.
Pass the project root instead so the DB lands in the canonical
`.fusion/fusion.db` alongside the rest of the project's state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add root verify:workspace script enforcing lint -> test -> build order
- Update CI workflow to run verify:workspace as the single workspace gate before binary packaging
- Add CLI guardrail tests for workflow sequencing and root script contract invariants
- Document deterministic workspace bootstrap expectations in contributing guide
- Clarify bundle-output test bootstrap intent for explicit artifact setup
- Convert internal @fusion workspace aliases in packages/cli/vitest.config.ts to exact anchored regex entrypoint mappings
- Preserve subpath-before-root alias order so @fusion/core/gh-cli and @fusion/dashboard/planning resolve correctly
- Add vitest-workspace-resolution regression coverage for alias definitions and ordering
- Simulate clean worktrees by temporarily hiding internal dist/ directories and verify dynamic imports resolve from source
- Use shared nonfatal diagnostics wrapper when disposing agent-generation AI sessions
- Emit structured error context (sessionId and operation) instead of silently swallowing dispose failures
- Add regression coverage verifying generation succeeds while dispose failures are logged as nonfatal diagnostics
- Add normalizeErrorForLog helper and use it to emit consistent structured error fields
- Replace string-interpolated rehydrate and cleanup logs with structured summary payloads including source, ttl, and totals
- Emit structured warning/error diagnostics for settings fallback, initial/scheduled cleanup failures, and dev-server shutdown cleanup failures
- Add server startup tests covering structured cleanup success, failure, and settings-fallback logging behavior
- Replace raw console diagnostics in agent-generation with structured ai-session diagnostics events
- Add a test-only cleanup hook and regression tests for cleanup telemetry and AI generation failure logging
- Expand diagnostics guardrail coverage to include agent-generation and generalize guardrail naming to AI-session modules
- Add a dedicated "View Details" button to each agent list card while preserving clickable identity behavior
- Style list card actions so lifecycle controls and the new details action align cleanly across desktop and mobile layouts
- Expand AgentsView coverage to verify button rendering, correct detail-target opening, and backward-compatible identity click behavior
- Stabilize MissionManager activity pagination test timing and document the new list-view details action in the dashboard README
- Add fusion-plugin-openclaw-runtime workspace package with manifest, runtime metadata, and deferred placeholder factory
- Add unit tests for OpenClaw plugin behavior and PluginRunner runtime discovery compatibility
- Document OpenClaw runtime installation and runtimeHint usage in README, getting-started, and settings reference docs
- Include built dist artifacts for the new plugin and update workspace/lockfile entries
- Add a shared runtime logger contract and dashboard runtime logger implementation for structured diagnostics
- Route dashboard CLI/runtime logs through the TUI sink and replace ad-hoc console diagnostics in server paths
- Update CLI and dashboard tests to assert structured runtime logging behavior across sync and error flows
- Document the structured logging architecture updates and include a changeset for @runfusion/fusion
- Add shared test setup helpers that always build dashboard client assets before assertions run
- Remove skip-gated build-output tests and make CLI/dashboard suites deterministic by owning artifact setup
- Enforce hashed vendor chunk naming checks for vendor-react and vendor-xterm in generated assets
- Verify copied CLI client index references real built chunks and does not contain the dashboard stub marker
- Log explicit warning details when pre-merge `git rebase --abort` cleanup fails
- Keep merger fallback behavior intact so smart/AI merge still proceeds after rebase issues
- Add merger tests covering successful abort execution in the task worktree after rebase conflict
- Add regression test asserting abort failure warnings include stderr details while merge continues
- Define --surface-hover in :root and add a light-theme override using semantic color-mix values
- Replace scattered var(--surface-hover, ...) fallbacks with direct var(--surface-hover) references across dashboard styles
- Add status-colors theme tests that assert the token contract in root/light blocks
- Add a regression check to prevent reintroducing per-rule --surface-hover fallback overrides
- Add `["@runfusion/fusion", "runfusion.ai"]` to changesets `fixed` so
future changesets bump both packages to the same version number.
- Catch up `runfusion.ai` from 0.0.8 to 0.1.1 so the fixed group starts
from an aligned baseline; changelog entry notes the rationale.
No functional change to the alias package (`index.js` is unchanged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update AgentLogViewer to anchor scroll position when new streamed entries prepend while the user is reading older logs
- Keep live-follow behavior near the top and avoid false scroll adjustments when loading older history
- Add focused auto-scroll regression tests covering near-top follow, anchored reading, and history pagination cases
- Improve log readability styling by using theme tokens and consistent text color for normal and thinking log lines
- Resolve release changelog conflicts and retain both existing 0.1.1 notes and FN-2300 changelog entry