Skip to content

feat(studio): T04 run from here with pinned tool results - #1066

Merged
LinuxDevil merged 11 commits into
mainfrom
fb-t04-run-from-here
Nov 12, 2026
Merged

LinuxDevil merged 11 commits into
mainfrom
fb-t04-run-from-here

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Summary

  • Pin recorded tool-call results from a node's spans sheet and replay them through a per-run preToolCall hook (studio-pins), so a "Run from here" re-runs the agent from the last user input without re-executing pinned tools.
  • POST /agents/:id/run accepts pins (max 50, LOUSHO_PINS_INVALID on bad input); pins are per-run only — never persisted or attached to chat turns.
  • Pin matching: equal tool name plus stable-JSON args equality when args are pinned; first match wins. Unpinned tools execute normally.
  • Studio: pin/unpin toggles on tool rows, pins chip + Clear + "Run from here" footer (disabled with a reason when there is no recorded result, no user input, or a live run), and a Pin badge on pinned canvas nodes alongside the C19 problem badges.
  • Merged with current main: preserves T08 fork-from-checkpoint, C19 validation, and undo/redo.

Test plan

  • npm run test:server --workspace apps/agent-forge -- pins app.test (47 tests)
  • Studio focused tests: NodeSpansSheet (plain/fork/pins), state pins, ui run (402 tests)
  • npm run typecheck --workspace apps/agent-forge and typecheck:server
  • fallow audit --base origin/main clean on changed files

Generated with Devin

Devin and others added 11 commits November 9, 2026 19:57
# Conflicts:
#	apps/agent-forge/server/app.ts
#	apps/agent-forge/src/canvas/NodeCard.tsx
#	apps/agent-forge/src/components/CanvasArea.tsx
#	apps/agent-forge/src/components/test/NodeSpansSheet.tsx
#	apps/agent-forge/src/components/test/nodeSpans.css
… fallow

Extract PinToggle/SpansFooter/SpansViewer/useSpanRowActions out of
SpansSheet and BarButton out of BarRow so the merged T04+T08 sheet and the
rowAction wrapper stay under the cognitive-complexity gate.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…eads

useAgentStream's mock returned {} but T04's usePins evaluates
chat.messages in its callback deps at render; the empty mock crashed
every provider test after the main merge.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil
LinuxDevil merged commit 98e5393 into main Nov 12, 2026
6 checks passed
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