Commit Graph

7610 Commits

Author SHA1 Message Date
gsxdsm
6c9a81a05f fix(review): apply autofix feedback 2026-06-05 01:53:42 -07:00
gsxdsm
dfe8dfd70a fix(ci): add createWorkflowAuthoringTools to partial engine mocks; bump roadmap schema assertion to 109 2026-06-05 01:45:48 -07:00
gsxdsm
e208842606 chore: lint fixes and plan status flip to completed 2026-06-05 01:18:50 -07:00
gsxdsm
e2707afbd4 test(core): end-to-end workflow-settings journey + surface enumeration; docs and changeset 2026-06-05 01:16:27 -07:00
gsxdsm
e10db81393 feat(dashboard): cli-agent terminal UI, task-card states, and notification banner support (U11)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 01:16:13 -07:00
gsxdsm
1dbb7052ae refactor(dashboard): extract all remaining Project sections — SettingsModal is now a shell (7,883 → 2,905 lines) 2026-06-05 01:10:35 -07:00
gsxdsm
a47ea3f7a1 fix(review): strip approval-bypass flags in agent workflow authoring for chat/planning lanes 2026-06-05 01:05:51 -07:00
gsxdsm
d05d5f575f fix(review): apply autofix feedback 2026-06-05 00:57:49 -07:00
gsxdsm
968e9a45fc feat(dashboard): node editor becomes the primary workflow surface; retire WorkflowStepManager 2026-06-05 00:48:24 -07:00
gsxdsm
580120e5d5 test(dashboard): revert unrelated board-mobile mock tweak — failure is pre-existing on main (infinite-timer abort, FN-4574 suite) 2026-06-05 00:47:52 -07:00
gsxdsm
3a33604159 feat(dashboard): remove moved settings from SettingsModal with workflow-editor redirect stubs, target-IA regroup, secrets/prompts extraction 2026-06-05 00:46:59 -07:00
gsxdsm
b04c11aae4 feat(dashboard): move columns and fields panels into the editor sidebar 2026-06-05 00:36:51 -07:00
gsxdsm
7a4f6aa506 test(engine): column-agent surface matrix, parity invisibility proof, docs
U7: full mode × surface × own-settings matrix ledger with 5 gap-filling
tests, default-workflow zero-binding parity assertions, changeset covering
the complete feature, and a workflow-steps.md authoring section for column
agents.
2026-06-05 00:32:52 -07:00
gsxdsm
62c820bf99 feat(dashboard): design-with-AI affordances in the workflow editor 2026-06-05 00:32:38 -07:00
gsxdsm
7815055388 Merge U15: cli-agent adapter settings, autonomy approval gate, node editor config 2026-06-05 00:32:12 -07:00
gsxdsm
243113a3cf feat: cli-agent adapter settings, autonomy approval gate, and node editor config (U15)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:30:27 -07:00
gsxdsm
0c0387264f feat(dashboard): palette templates section with fragments and step templates 2026-06-05 00:20:12 -07:00
gsxdsm
41f25d5c52 feat(engine): effective column agent becomes the execution principal
U5: action-gating contexts, the heartbeat deferral gate, a two-pass
resumeTaskForAgent, and the reverse-direction agent.taskId guards (via a
new isAgentEffectivelyExecuting callback wired at the in-process runtime)
all consult the column-effective agent; the restart watcher re-resolves
column bindings per tick for bound graph sessions, hot-swapping on
agent-changed and falling back without restart on agent-deleted.
2026-06-05 00:19:13 -07:00
gsxdsm
8fb7de1f7d Merge U8: cli-agent resume coordinator and self-healing integration 2026-06-05 00:17:14 -07:00
gsxdsm
10acf17c6e feat(engine): cli-agent resume coordinator and self-healing integration (U8)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:16:14 -07:00
gsxdsm
8bac390e1b feat(engine): cli-agent one-shot sessions for validator, planning, and CE (U9)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:15:57 -07:00
gsxdsm
8c9702e909 refactor(dashboard): extract SettingsModal Account/Global/Runtimes sections into shared-primitive components with pure save-split helper 2026-06-05 00:15:15 -07:00
gsxdsm
91284f516d feat(dashboard): template picker on workflow creation 2026-06-05 00:06:06 -07:00
gsxdsm
4fa54075ad feat(engine): execute and step-execute sessions run as the column agent
U4: seams stamp the governing node id into run context; a per-seam
resolveSeamColumnAgent feeds the core resolver and threads the effective
agent through resolveExecutorSessionModel, runtime hints, persona, memory
tools, and StepSessionExecutor attribution. Characterization tests pin the
no-binding path byte-identical. Gating/deferral principal moves in U5.
2026-06-05 00:05:02 -07:00
gsxdsm
e70be3b799 fix(engine): dedupe session-manager exports after U7 merge 2026-06-05 00:04:06 -07:00
gsxdsm
7e94d62f6f Merge U7: cli-agent executor seam, task session lifecycle, hard-cancel integration 2026-06-05 00:02:41 -07:00
gsxdsm
c1c99a9de0 feat(engine): wire cli-agent executor seam and task session lifecycle (U7)
Add `cli-agent` as a task-execute executor kind. A workflow node with
`config.executor === "cli-agent"` drives an engine-owned CLI coding agent
through the execute step via the new cli-agent/task-session.ts orchestration:
spawn in the worktree, issue the hook token + write hook scripts, inject the
prompt after readiness, subscribe to the state machine, and resolve on a
positive completion signal (R20 gating). Config is snapshotted at launch; the
PTY is reaped (completed) at the in-review handoff.

Executor seam: runGraphCustomNode gains a cli-agent branch delegating to
runCliAgentNode; the hard-cancel/abort path (awaitAbortInFlightTaskWork +
abortAllInFlight) claims and SIGKILLs the CLI session as a first-class surface,
marking it killed (never resume-eligible). Re-entry kills any prior live
session and launches fresh; follow-up resumes the recorded native session id
when supported. A PTY-pool ceiling surfaces as a typed task value, not a stall.

Node-config typing extended minimally (WorkflowNodeExecutorKind /
WorkflowNodeExecutorConfig in @fusion/core).

Tests: cli-agent/__tests__/task-session.test.ts (12) and
__tests__/cli-agent-executor.test.ts (9) cover AE1/AE5, hard cancel, re-entry,
follow-up, config snapshot, ceiling, and the generic-tier confirm-advance path,
using scripted adapters + a mock PTY seam. Engine typecheck clean; full
src/cli-agent suite + new tests green (144 passing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:01:12 -07:00
gsxdsm
fbc7c96221 Merge U5: Codex, Droid, and Pi cli-agent adapters (binaries probed; exec -r footgun guarded) 2026-06-05 00:00:49 -07:00
gsxdsm
07dcb1695e feat(engine): add Codex, Droid, and Pi cli-agent adapters (U5)
Codex (hybrid tier): native done via session-scoped notify config,
heuristic PTY waiting detection, codex resume <thread-id>, probed rollout
JSONL tailer. Droid (native tier): Claude-style hooks with a Notification
permission-vs-idle classifier, --resume / exec -s resume (never -r in exec
mode). Pi (native tier): session-JSONL telemetry + transcript tailing,
pi --session resume. Adds the session-jsonl transcript source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:00:05 -07:00
gsxdsm
57631c749f feat(cli): TUI full-screen attach to cli-agent sessions (U14)
Suspend-and-handoff passthrough from the Ink TUI to a cli-agent PTY session:
mint an attach ticket, open the cli-session WebSocket, enter the alternate
screen + raw mode, stream WS scrollback/data frames to stdout, frame stdin
bytes into input messages, propagate resizes, and ACK consumed bytes for flow
control. Detach chord Ctrl-] restores the terminal and remounts Ink; a dropped
WS surfaces the error and restores the terminal cleanly.

Untrusted terminal output is neutralized through the same hardening filter the
dashboard WS bridge uses (re-exported from @fusion/dashboard) so OSC 52, non-
http(s) OSC 8 links, and device-status queries are stripped before reaching the
host TTY — the riskiest leg, since the host terminal honors more sequences than
xterm.js. CJK/double-width bytes pass through verbatim.

- packages/cli/src/commands/dashboard-tui/terminal-attach.ts (passthrough loop +
  injectable WS transport for tests)
- controller.openTerminalAttach() Ink integration (unmount/run/remount)
- adds `ws` runtime dep to packages/cli
- re-exports neutralizeTerminalOutput/flushTerminalOutput from @fusion/dashboard

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:56:10 -07:00
gsxdsm
776def02ea feat(dashboard): AI workflow design endpoint with validation, stripping, and rate limit 2026-06-04 23:55:05 -07:00
gsxdsm
75ebe23b4f feat(dashboard): column agent picker, override visibility, write-time validation
U6: WorkflowColumnPanel agent picker + defer/override toggle with specified
interaction states (flags-off hint, loading, fetch-error, stale-agent
warning, bound-column badge); WorkflowNodeEditor overridden-by-column-agent
note + stale-id treatment; assertColumnAgentsExist + confirmPolicyEscalation
gate (R13) on workflow save routes; flowToIr now preserves column agent
bindings through the editor round-trip.
2026-06-04 23:53:22 -07:00
gsxdsm
d88bfc4c75 feat(engine): custom workflow nodes run as their column's agent
U3: per-run IR resolution feeds the core column-agent resolver at the
runCustomNode seam; override supersedes node agent/model/persona wholesale,
defer fills bare nodes only; adoption and fallback are audited via logEntry;
raw-CLI nodes log a skip. Also fixes the customInstructions persona drift —
node-level executor:"agent" persona injection now uses the typed
soul/instructionsText fields (KTD-6).
2026-06-04 23:53:22 -07:00
gsxdsm
ef33d79e78 feat(core,dashboard): workflow-centric task creation with atomic workflowId materialization 2026-06-04 23:47:24 -07:00
gsxdsm
1b46780fca Merge U10: cli-agent session transport (WS attach, tickets, SSE state, output hardening)
# Conflicts:
#	packages/engine/src/index.ts
2026-06-04 23:46:23 -07:00
gsxdsm
17c9303f22 feat(dashboard): cli-agent session transport — WS attach, tickets, SSE state, output hardening (U10)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:44:39 -07:00
gsxdsm
cb9a3f1cc5 feat(settings): surface sweep for the hard-move — export v2 with workflowSettings, sync moved-key filtering, CLI redirect hints, consistency guard 2026-06-04 23:41:30 -07:00
gsxdsm
a08e144530 Merge U17: cli-agent hook ingestion route, per-session tokens, and hook scripts 2026-06-04 23:40:19 -07:00
gsxdsm
d8248b4c4f feat(dashboard): add cli-agent hook ingestion route and session hook scripts (U17)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:39:07 -07:00
gsxdsm
3eca224e83 Merge U6: generic heuristic-tier adapter with idle state surfacing 2026-06-04 23:36:21 -07:00
gsxdsm
e421774f6a feat(core): column agent IR schema, validation, and effective-agent resolver
U1+U2 of the column-agent plan: WorkflowColumnAgent on WorkflowIrColumn
(defer/override), template-subgraph column validation, v2-only-feature
registration, plugin-sdk type parity, and the shared core resolver with
instanceNodeId format ownership moved to core.
2026-06-04 23:35:32 -07:00
gsxdsm
f3b700aa5d feat(engine): add generic heuristic-tier cli-agent adapter (U6)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:34:33 -07:00
gsxdsm
ec4377e10a feat(engine): add Claude Code native-tier cli-agent adapter (U4)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:32:58 -07:00
gsxdsm
773ba76209 test(engine): self-skip real-PTY e2e when PTY I/O unavailable in environment 2026-06-04 23:24:54 -07:00
gsxdsm
4fe7dbe016 feat(core): one-time hard-move migration of workflow-policy settings to workflow setting values
30 moved keys (step execution, review/approval, per-phase model lanes) leave
DEFAULT_PROJECT_SETTINGS; marker-gated idempotent per-project migration writes
customized values to every in-use (workflowId, projectId); stale-writer guard;
tombstone allowlist derived from the builtin catalog.
2026-06-04 23:23:48 -07:00
gsxdsm
7b961d63f5 Merge pull request #1428 from Runfusion/gsxdsm/compound-plugin
Fix Settings plugin installs registering unloadable directory paths
2026-06-04 23:23:04 -07:00
gsxdsm
ed4c7ba006 feat(engine): add cli-agent telemetry hub and session state machine (U3)
Pure engine code (no HTTP) for the CLI agent executor:

- state-machine.ts: authoritative per-session state machine implementing the
  HTD diagram (starting→ready→busy⇄waitingOnInput→done; done→busy follow-up;
  dead-classification choice → killed/userExited/authFailed/resuming; resume cap
  of 2 with backoff → needsAttention). Positive completion is distinct from idle
  (idle never produces done); inactivity stall backstop re-armed by output/
  telemetry events (no fixed turn timeout); termination classification helper for
  all five paths; per-turn latches reset between turns. Persists every transition
  via CliSessionStore (the transient `resuming` machine state maps onto the U1
  `dead` store enum) and exposes a throttled `onStateChange` subscription for the
  later SSE bridge — no dashboard imports.

- telemetry-hub.ts: in-process ingestion contract (ingest(sessionId, event)) for
  the U17 route and log-tailing adapters. Mints high-entropy per-session hook
  tokens (issueToken/validateToken/invalidate); rebuilds the registry only from
  live sessions in CliSessionStore so stale tokens for non-live sessions never
  validate; a token validates only for its own session. Bounds everything
  ingested: per-event size caps, per-turn count caps (lifecycle events exempt),
  ANSI/control stripping before pattern matching, and secret redaction that
  survives chunk boundaries via a held-back carry window (redactSecrets from
  @fusion/core).

Tests: 35 new (state-machine.test.ts, telemetry-hub.test.ts) covering AE1/AE2,
stall backstop, all termination paths, resume caps, token registry, two-turn
latch reset, oversized capping, ANSI stripping, and cross-chunk redaction.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:18:48 -07:00
gsxdsm
407ce03bf2 feat(dashboard): workflow and template JSON import/export with trust-boundary stripping 2026-06-04 23:16:46 -07:00
gsxdsm
4fc1a9dd46 feat(engine): add CliAgentAdapter interface and CliSessionManager (U2)
Engine-owned PTY lifecycle for CLI agent sessions:
- adapter.ts: CliAgentAdapter interface (launch/env-allowlist builders,
  capability flags, readiness detection, injection formatter, resume builder,
  telemetry wiring) + CliAdapterRegistry with typed unknown/duplicate errors.
- session-manager.ts: CliSessionManager owning node-pty processes via the U16
  shared loader. Byte-bounded scrollback ring (default ~512KB), single
  serialized write queue shared by injections + user input (FIFO, deferral in
  quiet windows), latest-active-client resize, scoped-SIGKILL process registry
  on process exit (never port 4040), explicit async attach interface
  (scrollback + AsyncIterable<Uint8Array> + write/resize/detach),
  requestPause/requestResume watermark hooks, separate concurrency pool with
  typed CliConcurrencyLimitError at the ceiling.
- Security: bracketed paste only when ?2004h observed; unconditional control-char
  neutralization on the raw path; user keystrokes bypass neutralization.
- Persists lifecycle into the U1 CliSessionStore (create on spawn, update
  state/termination).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:04:13 -07:00
gsxdsm
66f1db122b Fix quality-backfill suites broken by fast-tests x workflow-columns merge race
Main went red when the fast-tests quality-backfill projects (PR #1385)
landed alongside the workflow-columns stream (PR #1424) — the new test
projects were written against pre-stream code:

- TaskFieldsSection.css toggle knob used background: #fff, violating the
  theme-token assertion in AgentListModal's styling-parity test; use
  var(--card) per the SkillsView toggle convention
- ListView.test.tsx api mock lacked fetchBoardWorkflows (TaskDetailModal
  now calls it on mount)
- chat.test.ts and routes-agent-import.test.ts @fusion/core mocks lacked
  registerTraitHookImpl (engine merge-trait registers hooks at import)
- auto-merge-toggle-blank.mobile and board-mobile-initial-render used
  vi.runAllTimers(), which never terminates now that sse-bus starts a
  keepalive setInterval; use vi.runOnlyPendingTimers()

Both quality-backfill projects now pass fully: 7151/7151 across 414
files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:02:58 -07:00