Commit Graph

3275 Commits

Author SHA1 Message Date
Fusion
08552e213e feat(FN-2526): add remote access CLI changeset
- Add a minor changeset for @runfusion/fusion to prepare the remote access CLI release
- Document provider switching and tunnel lifecycle controls across dashboard/TUI settings
- Capture tokenized remote login URL/QR handoff flows and headless fn serve support
2026-04-26 06:47:49 -07:00
Fusion
5a95353272 fix(FN-2525): harden remote access auth and tunnel regression coverage
- Add regression tests across CLI, core, dashboard, and engine for remote access auth, settings parity, and serve/TUI callback wiring
- Expand dashboard route and modal coverage for remote settings/auth flows including node environment behaviors
- Redact provider-switch failure details in tunnel process manager to avoid leaking sensitive provider diagnostics
- Update route registration and engine lifecycle tests to lock in remote-access behavior under real execution paths
2026-04-26 06:35:46 -07:00
Fusion
0f54c8f36b feat(FN-2548): extract dashboard routes into registrar modules
- Split monolithic dashboard route registration into dedicated project, node, mesh discovery, and settings sync registrar files
- Add settings sync helper and inbound sync registrar modules to isolate shared logic and simplify route composition
- Expand routes test coverage to enforce registrar ordering and prevent regressions after extraction
- Update routes README and clean up lint/doc issues introduced during the refactor
2026-04-26 06:23:14 -07:00
Fusion
5ffa1eeba2 docs(FN-2524): add remote access operator runbook
- Add docs/remote-access.md as the canonical runbook for dashboard, TUI, and headless remote access operations
- Document provider prerequisites, lifecycle restore gates, and status/diagnostic semantics for remote tunnel management
- Add remote auth security guidance for tokenized URLs/QR payloads and include troubleshooting-oriented API flow references
- Cross-link the runbook from docs index and related architecture, CLI, dashboard, getting-started, and settings docs
2026-04-26 05:38:18 -07:00
Fusion
e5ed696922 feat(FN-2523): add safe restart restore lifecycle diagnostics
- Add ProjectEngine restore lifecycle core to perform safe restarts and surface detailed restore state transitions
- Expose restore diagnostics through remote-access status types and settings/memory route context, including legacy API mapping updates
- Add comprehensive regression coverage for restore lifecycle behavior in engine and dashboard headless remote-access tests
- Document the restore lifecycle contract in architecture/settings docs and include a patch changeset for @runfusion/fusion
2026-04-26 05:18:12 -07:00
Fusion
a4c219f89b feat(FN-2521): add remote auth handoff endpoints and login URL flow
- Add remote auth token primitives plus login-url generation for short-lived phone auth handoff
- Expose public handoff API endpoint and wire remote auth handling into dashboard server routes
- Tighten remote access settings update typing to satisfy typecheck and preserve API isolation behavior
- Add comprehensive dashboard tests for remote-auth helpers, route behavior, and server integration
- Document the remote login-url and phone auth handoff contract in architecture docs
2026-04-26 04:38:33 -07:00
Fusion
8a261ae052 feat(FN-2520): add remoteAccess auth link token mode support
- Extend project settings schema/types with remoteAccess defaults and auth link token mode fields
- Update settings store patch handling to deep-merge remoteAccess updates without clobbering sibling keys
- Add dashboard/API wiring for remoteAccess controls, including legacy settings route handling
- Expand core and dashboard tests for remoteAccess settings behavior, merge semantics, and UI coverage
- Align settings reference docs with the implemented remoteAccess schema and options
2026-04-26 03:55:57 -07:00
Fusion
b0c6b14022 feat(FN-2547): split dashboard agent routes into modular registrars
- Extract core agent CRUD and assignment endpoints into a dedicated registrar
- Extract runtime, reflection/rating, and import/export/generation endpoints into focused route modules
- Add a dedicated skills route registrar and wire all new registrars through the main routes entrypoint
- Update routes documentation with registrar breakdown and registration ordering guidance
2026-04-26 03:06:05 -07:00
Fusion
db9f4ba57e feat(FN-2519): add remote tunnel manager for settings sync
- Add remote-access contracts, provider adapters, and a tunnel process manager with lifecycle handling
- Wire tunnel manager into ProjectEngine startup/shutdown flow and export new remote-access modules
- Update settings modal UX for remote auth URLs, including wrapping and related UI test coverage
- Document tunnel manager behavior and remote settings sync details in architecture, CLI, and settings docs
2026-04-26 02:20:28 -07:00
Fusion
a9e68b38eb fix(FN-2545): persist memory audit extraction state and polish MemoryView
- Persist extract-to-audit continuity state in memory insights so extraction progress survives follow-up runs
- Add core and dashboard route tests that cover audit extraction flow and prevent regressions
- Restore lint/typecheck baseline by removing obsolete planning subtask route wiring from dashboard routes
- Apply MemoryView UX refinements with updated component logic and dedicated styling adjustments
2026-04-26 02:15:54 -07:00
Fusion
00626a154b feat(FN-2541): extract dashboard route registrars
- Split task workflow endpoints into register-task-workflow-routes.ts and mount through shared route context
- Extract planning/subtask and chat API handlers into dedicated registrar modules
- Move settings and memory routes into register-settings-memory-routes.ts and keep routes.ts focused on composition
- Update route documentation and task route wiring to reflect the modular registrar structure
2026-04-26 01:42:48 -07:00
Fusion
984f7965f6 feat(FN-2518): add remote TUI settings controls and routing
- Wire remote dashboard route contracts into CLI/TUI state and controller flows
- Add remote settings interaction UX in dashboard and dashboard-tui command paths
- Expand regression coverage for remote TUI behavior in dashboard and app test suites
- Document remote TUI controls and QR behavior in the CLI reference
- Add a changeset for @runfusion/fusion patch release
2026-04-26 01:20:32 -07:00
Fusion
caf538d7d6 fix(FN-2580): persist executor token usage before in-review moves
- Add per-task token usage baselines in TaskExecutor to track agent token deltas safely
- Persist token usage snapshots before every in-progress → in-review transition path, including failures and retries
- Initialize and clear token baselines during execute() lifecycle to avoid cross-run leakage
- Add executor tests covering token usage persistence across completion, failure, and pre-existing usage scenarios
2026-04-26 00:40:47 -07:00
Fusion
b85abfa799 feat(FN-2579): merge fusion/fn-2579 (auto-resolved)
- fix(FN-2579): complete Step 3 — refine split-button accessibility
- fix(FN-2579): resolve workspace lint regression in provider
- test(FN-2579): complete Step 2 — update header engine control tests
- feat(FN-2579): complete Step 1 — style engine split-button dropdown
- feat(FN-2579): complete Step 0 — add engine control split-button behavior
- chore(release): v1.0.0
2026-04-26 00:29:19 -07:00
Fusion
38809d7bb6 fix(FN-2581): align done timer duration with task lifecycle timestamps
- Update TaskCard done-duration calculations to use createdAt as the start baseline for completed tasks
- Refactor TaskCard timer tests to assert against TaskStore-backed timestamps and avoid brittle elapsed-time assumptions
- Cover done-state timer behavior with expanded test scenarios for start/end timestamp combinations
- Remove unused provider code in pi-claude-cli to satisfy lint and keep the full test/build gates green
2026-04-26 00:26:48 -07:00
Fusion
1f931733f8 feat(FN-2517): add remote access controls across dashboard and TUI
- Add project-scoped remote settings and control APIs for provider activation, tunnel lifecycle, token generation, URL, and QR retrieval
- Extend Settings modal with a dedicated Remote Access section, provider forms, status/actions, and coverage in SettingsModal tests
- Wire dashboard TUI settings state to remote configuration/status and add interactive remote shortcuts for start/stop/token/url/qr actions
- Document remote-access behavior in architecture, CLI, and settings references and include a patch changeset for @runfusion/fusion
2026-04-26 00:20:43 -07:00
gsxdsm
e460abfd6d chore(release): v0.3.0
Version bump via changesets (consumed 11 changesets). Forced 0.3.0
instead of changesets' default escalation to 1.0.0 for the pre-1.0
minor bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:15:09 -07:00
gsxdsm
0675e40c6d chore: changesets for pi-claude-cli triage fix and mobile plugins inset
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:11:15 -07:00
gsxdsm
e832f626f3 fix(dashboard): inset plugins settings panel on mobile
Plugin manager cards were sitting flush against the modal edges on
mobile because .settings-plugins-subsection-panel had no horizontal
padding while the heading and toggle were already inset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:09:05 -07:00
gsxdsm
371f2d8e01 fix(pi-claude-cli): unblock parameterless MCP tool calls in triage
Triage with claude-sonnet-4-6 via pi-claude-cli kept looping on
fn_review_spec calls that were rejected by pi's validator with
"root: must be object". Parameterless MCP tools (schema
{type:"object", properties:{}}) emit zero input_json_delta events,
so partialJson stayed "" and the catch fell through to
finalArgs = "" — a string, which TypeBox's Type.Object({}) rightly
refuses. Default empty partialJson to {} so the call lands.

Also:
- Add a 2-step reminder loop in triage before swapping to the
  fallback planning model — primary models that wrote PROMPT.md
  but forgot fn_review_spec recover from a nudge, no need to pay
  the cold-start tax of a new triage on a different model.
- Inject @runfusion/fusion's own pi extension into dashboard/
  daemon/serve sessions and propagate the path to createFnAgent
  via setHostExtensionPaths so fn_* tools register globally
  without requiring `pi install npm:@runfusion/fusion`.
- Drop the "historical" qualifier from replayed tool labels —
  Claude was reading "TOOL RESULT (historical Read):" as
  "previous session, ignore" and looping on verification.
- Remove subprocess-lifecycle stderr debug logs that landed for
  hang diagnosis — root cause is fixed, the noise can go.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:00:49 -07:00
Fusion
1d1d1edfb3 feat(FN-2540): extract shared route context and integrated router registrar
- Refactor dashboard routing to use a shared route context scaffold for provider-safe registration
- Add register-integrated-routers helper and wire routes.ts to compose integrated routers cleanly
- Update route documentation and route types to reflect the new context/registrar structure
- Stabilize quick-entry clear assertion and add routing tests covering integrated router registration behavior
2026-04-25 23:18:11 -07:00
gsxdsm
6f4b42a891 feat(FN-2575): merge fusion/fn-2575 2026-04-25 21:43:38 -07:00
Fusion
0c696f0107 feat(FN-2571): enforce merger aborts through shutdown and git flow
- Add merger abort primitives and track active merge runs for coordinated cancellation
- Abort in-flight merges during engine shutdown and propagate AbortError through fallback catch paths
- Honor abort signals before commit, push, and dependency sync to prevent post-cancel side effects
- Expand merger and project-engine tests to cover abort propagation and merge-abort-on-stop behavior
2026-04-25 21:39:35 -07:00
Fusion
1d0b872914 fix(FN-2573): prevent stale-closure writes in useFavorites
- Refactor useFavorites callbacks to read latest state instead of closing over stale favorites values
- Ensure add/remove/toggle flows update local state and persistence from a consistent source of truth
- Add regression tests that reproduce stale-closure timing scenarios and verify favorites remain correct
- Expand hook test coverage for rapid consecutive updates to guard against future closure regressions
2026-04-25 20:32:37 -07:00
gsxdsm
36e095d90c chore(pi-claude-cli): instrument subprocess lifecycle for hang diagnosis
Triage runs through pi-claude-cli still hang silently for 20+ minutes after
only 2 thinking-deltas before the engine's StuckTaskDetector kills them. We
can't tell from agentLogEntries whether the subprocess crashed, the MCP
server failed to attach, or Claude is in extended thinking that doesn't
stream.

Adds stderr lines tagged [pi-claude-cli] for:
- spawn (pid, model, mode, prompt sizes, mcp on/off)
- init (session id, model, permissionMode, mcp_servers status list)
- first-stdout-line (latency from spawn)
- tool_use (per top-level tool, with piKnown flag)
- break-early (when we kill at message_stop)
- close (exit code, signal, elapsed, broken-flag)

No behavioural change. Restart the dashboard, trigger triage, and these
lines tell us which phase silence sets in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 20:22:57 -07:00
Fusion
96e02928d2 fix(FN-2572): remove dead onboarding modal exports
- Delete obsolete AppModals code that was accidentally left in ModelOnboardingModal.tsx
- Restore the Task type import used by the onboarding modal after dead code cleanup
- Drop the unused SettingsModal.css import tied to removed code paths
- Extend ModelOnboardingModal tests to guard against dead export regressions
2026-04-25 20:21:11 -07:00
Fusion
71ced8f422 feat(FN-2570): add mobile per-message chat render toggles
- Track plain-text render mode per assistant message (including streaming output) in ChatView state
- Add inline mobile-only Eye/EyeOff toggle buttons on assistant bubbles to switch markdown vs plain text per message
- Hide the header markdown/plain toggle on mobile and polish inline toggle sizing, focus, and hover styles in ChatView.css
- Extend ChatView tests with mobile viewport coverage for toggle rendering, per-message isolation, round-trip toggling, and mobile CSS contract checks
2026-04-25 20:14:10 -07:00
Fusion
cfd78af504 feat(FN-2569): sync fusion skill docs with runtime tools
- Add generated engine-tools reference and refresh extension/capabilities docs from source definitions
- Enhance sync-fusion-skill-tools script to verify and maintain skill documentation consistency
- Expand skill-sync tests and enforce sync:fusion-skill:check in the workspace test pipeline
- Add FN-2569 changeset documenting the published @runfusion/fusion patch update
2026-04-25 20:07:49 -07:00
Fusion
b0886cdfd4 fix(FN-2539): preserve dashboard API compatibility and harden proxy wildcard routing
- Replace app/api.ts with a compatibility barrel that re-exports the legacy client API surface from app/api/legacy.ts
- Move the existing dashboard API implementation into app/api/legacy.ts and update static-analysis tests to include the new module path
- Update proxy wildcard routing to use /proxy/:nodeId/{*splat}, keeping explicit proxy handlers ahead of the fallback route
- Reject proxying to local nodes with a consistent 400 response and expand proxy route tests plus route-ordering compatibility notes
2026-04-25 19:56:27 -07:00
Fusion
866706308d fix(FN-2568): keep custom model dropdown header and search wrapper opaque
- Set the combobox search wrapper background to var(--surface) to prevent option list bleed-through behind the input.
- Update the dropdown header background from var(--bg) to var(--surface) for a consistent opaque top section.
- Add a CSS regression test in CustomModelDropdown.test.tsx that asserts the search wrapper rule includes an opaque surface background.
2026-04-25 19:35:47 -07:00
Fusion
662265f086 feat(FN-2567): add pi-claude-cli provider icon alias
- Map the pi-claude-cli provider key to the Claude CLI icon config in ProviderIcon.
- Reuse Anthropic tokenized provider color and accessible label for the new alias.
- Add dashboard tests asserting icon rendering, color/label metadata, and mixed-case alias normalization.
2026-04-25 18:29:32 -07:00
Fusion
8e18fad156 feat(FN-2559): merge fusion/fn-2559 2026-04-25 18:22:37 -07:00
gsxdsm
e96e29dbf2 feat(FN-2565): merge fusion/fn-2565 2026-04-25 18:08:27 -07:00
gsxdsm
2356cbbe08 feat(FN-2538): merge fusion/fn-2538 2026-04-25 18:06:52 -07:00
Fusion
78b09711a2 feat(FN-2557): expand task stats tab with execution insights
- Enrich TaskTokenStatsPanel with timing extraction, workflow runtime summaries, and longest-event highlights from task logs and workflow results
- Add an execution details section for mode, runtime status, step progress, retries, recovery state, and runtime links
- Wire TaskDetailModal to pass the working task into the stats panel so the Stats tab renders execution context with token usage
- Extend TaskDetailModal and TaskTokenStatsPanel tests (plus panel CSS) to cover the new stats sections and loading/empty/token states
2026-04-25 18:06:36 -07:00
Fusion
6eacbc47e5 feat(FN-2544): stabilize memory backend status loading UX
- Reset memory backend status to unresolved during fetches so stale capabilities are never treated as authoritative
- Gate MemoryView read-only and qmd warning states on resolved backend status and add an explicit checking state for qmd availability
- Update SettingsModal memory editor gating so writes remain enabled while backend status is still loading, then enforce resolved read-only state
- Expand dashboard tests for useMemoryBackendStatus, MemoryView, and SettingsModal to lock in loading, warning, and refresh behavior
2026-04-25 17:54:32 -07:00
gsxdsm
99afec0da3 fix(pi-claude-cli): defer to engine StuckTaskDetector instead of 300s subprocess kill
The engine already runs a StuckTaskDetector with a configurable per-task
heartbeat (default 1 hour) and aborts triage/executor sessions through
AbortSignal when it judges them quiet. pi-claude-cli forwards that signal to
the subprocess. The 300s subprocess-level inactivity timeout was a redundant,
much-tighter shadow that kept killing Sonnet 4.6 mid-thinking on the 40k-char
triage prompt — exactly what the engine-level detector is designed not to do.

Move the local timeout to 30 minutes purely as a last-resort guard for embeds
that don't pass an abort signal. Stuck-detection responsibility now lives in
the caller, where it can be configured per task.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:49:09 -07:00
gsxdsm
7b9c787690 feat(FN-2529): merge fusion/fn-2529 2026-04-25 17:44:55 -07:00
Fusion
90d32e04c6 feat(FN-2558): lock TaskCard footer metadata to one line
- Prevent TaskCard footer row metadata from wrapping by enforcing nowrap layout
- Make files-changed chip flex safely and truncate long text with ellipsis while preserving icon visibility
- Keep timer chip placement anchored to the right side of the footer metadata row
- Add TaskCard and board-mobile regression tests asserting footer child order and CSS layout guarantees
2026-04-25 17:44:04 -07:00
gsxdsm
679054905d fix(pi-claude-cli): bump inactivity timeout from 180s to 300s
Sonnet 4.6 with extended thinking on the triage prompt (~40k chars + AGENTS.md
+ skills) can take >3 minutes between thinking deltas. The 180s inactivity
timeout was killing those subprocesses before they could finish PROMPT.md +
fn_review_spec, leaving triage looping into the fallback model. Bump to 5
minutes.

Test mock timings updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:38:36 -07:00
Fusion
f5bbba0eac feat(FN-2556): add TaskForm bottom slot for model configuration
- Add a new renderBelowModelConfiguration prop in TaskForm and render it beneath the Model Configuration section inside More options
- Update TaskDetailModal to use the new slot so the Source Issue edit block appears below model settings instead of near the primary section
- Adjust TaskDetailModal source-issue edit tests to expand More options before interacting with source fields
- Add ordering assertions in TaskForm and TaskDetailModal tests to verify the injected block sits between Model Configuration and Workflow Steps
2026-04-25 17:29:18 -07:00
gsxdsm
0f81a83800 fix(core): sync default-triage prompt with engine's TRIAGE_SYSTEM_PROMPT
Root cause of "fn_review_spec was never called" tracked through the diagnostic
chain: the prompt actually sent to triage agents has zero `fn_*` tokens —
because resolveAgentPrompt("triage", ...) returns the BUILTIN_AGENT_PROMPTS
default-triage template (TRIAGE_PROMPT_TEXT in core/agent-prompts.ts), and that
template was forked from an older version that never had the "MUST call
fn_review_spec()" workflow nor any fn_-prefixed tool names. The fallback
`|| TRIAGE_SYSTEM_PROMPT` in engine/triage.ts never fires because the core
template is non-empty.

So the model writes PROMPT.md, doesn't see any instruction to review it, and
ends. zai/glm-5.1 happened to call fn_review_spec from training-pattern
inertia; Sonnet via pi-claude-cli stopped at write — same prompt, same bug.

Replace TRIAGE_PROMPT_TEXT with the engine's up-to-date TRIAGE_SYSTEM_PROMPT
verbatim (fn_-prefixed tools, fn_review_spec workflow, subtask breakdown,
project-commands handling, frontend UX criteria injection). Also remove the
diagnostic-only console.error lines added during this debugging session — the
core fix is now elsewhere and the noise isn't worth keeping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:24:03 -07:00
gsxdsm
7e290e7b28 chore(pi-claude-cli): show fn_* tokens found in prompt for diagnostic
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:14:56 -07:00
gsxdsm
78698f594b chore(pi-claude-cli): include prompt head + custom names in rewrite diagnostic
User reports "no custom tool refs to rewrite (tools=18)" — meaning Context.tools
is populated but the prompt body doesn't contain any of the names. Need the
first 200 chars of the prompt and a sample of custom-tool names to figure out
whether the engine's customPrompt is reaching us at all or whether names
differ from what we expect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:09:24 -07:00
Fusion
c5f80a5f6c fix(FN-2546): harden scheduled automation catch-up reliability
- Preserve overdue nextRunAt when schedule updates only touch non-cadence fields
- Recompute nextRunAt only when cadence changes, schedules are re-enabled, or nextRunAt is missing
- Sync memory dreams automation during ProjectEngine startup before CronRunner begins ticking
- Add core/engine regression coverage and a patch changeset for @runfusion/fusion release notes
2026-04-25 17:06:38 -07:00
gsxdsm
87a17afd16 chore(pi-claude-cli): log system-prompt tool-name rewrite for diagnostics
Adds stderr lines so we can verify the rewrite is actually firing on a given
session ("rewrote N custom tool ref(s) [fn_review_spec×3, ...]") vs. silently
no-opping (no tools, no matches). Helps distinguish "fix not deployed yet"
from "fix not effective" without redeploying instrumentation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:01:53 -07:00
Fusion
62ffcd7873 feat(FN-2554): rework TaskCard timer semantics
- Split timer calculation paths so in-progress cards show live elapsed time since entering in-progress
- Make done cards show fixed processing duration from start to completion instead of growing post-completion elapsed time
- Improve timer tooltip and aria-label copy for clearer in-progress and done semantics
- Expand TaskCard tests to cover boundary formatting, fixed done-duration behavior, and stable timer output as time advances
2026-04-25 17:01:53 -07:00
Fusion
e864f6c66a fix(pi-claude-cli): rewrite bare custom tool refs in system prompt to MCP names
Triage system prompts read "MUST call fn_review_spec()" but Sonnet 4.6 routed
through pi-claude-cli writes PROMPT.md and silently skips the call — even with
the addendum explaining the deferred-tool protocol. Confirmed by the FN-2564
agent log: model called other MCP tools (fn_memory_search, fn_task_list) fine
but consistently never reached fn_review_spec, leaving triage looping on
"fn_review_spec was never called" and falling back to zai/glm-5.1 every time.

Rewrite bare `fn_*` (and any non-built-in custom tool name) references in the
system prompt to their `mcp__custom-tools__fn_*` form before sending. The
prompt now literally says "call mcp__custom-tools__fn_review_spec()" so the
model has no inference step, and the deferred-tool reminder Claude Code injects
matches verbatim. Word-boundary safe (won't touch fn_review_specifier) and
idempotent (won't double-prefix already-MCP-named occurrences).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:01:53 -07:00
gsxdsm
7a55f491a8 fix(pi-claude-cli): rewrite bare custom tool refs in system prompt to MCP names
Triage system prompts read "MUST call fn_review_spec()" but Sonnet 4.6 routed
through pi-claude-cli writes PROMPT.md and silently skips the call — even with
the addendum explaining the deferred-tool protocol. Confirmed by the FN-2564
agent log: model called other MCP tools (fn_memory_search, fn_task_list) fine
but consistently never reached fn_review_spec, leaving triage looping on
"fn_review_spec was never called" and falling back to zai/glm-5.1 every time.

Rewrite bare `fn_*` (and any non-built-in custom tool name) references in the
system prompt to their `mcp__custom-tools__fn_*` form before sending. The
prompt now literally says "call mcp__custom-tools__fn_review_spec()" so the
model has no inference step, and the deferred-tool reminder Claude Code injects
matches verbatim. Word-boundary safe (won't touch fn_review_specifier) and
idempotent (won't double-prefix already-MCP-named occurrences).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 16:50:33 -07:00
Fusion
a4dc62d817 fix(engine): register grep/find/ls alongside read/bash/edit/write for coding sessions
pi-coding-agent 0.70's createCodingTools preset only includes read/bash/edit/write,
but pi-claude-cli's tool-mapping translates Claude's Glob→find and Grep→grep.
Triage sessions running through Claude CLI hit "Tool find not found" the moment
the model called Glob and looped on the error.

Compose the built-in set explicitly so every tool referenced by tool-mapping.ts
is registered. Read-only sessions also gain ls (was silently dropped earlier
when readonly was redefined upstream).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 16:50:33 -07:00