Commit Graph

2404 Commits

Author SHA1 Message Date
gsxdsm
fab8a62b55 FN-5977: expose goal retrieval tools across engine agents
Make goal lookup tools available and citable throughout engine-driven agent sessions.

- add shared engine goal list/show tools with concise list snippets, full detail lookup, and retrieval audit coverage
- expose fn_goal_list and fn_goal_show in executor, heartbeat, and triage tool surfaces and classify them as readonly coordination-exempt tools
- extend CLI and engine regression coverage, refresh tool reference docs, and add a published changeset for the CLI package

Files changed:
 .changeset/FN-5977-goal-retrieval-engine-tools.md  |   7 +
 packages/cli/skill/fusion/references/engine-tools.md    |   2 +
 packages/cli/src/__tests__/extension-goal-tools-audit.test.ts   |   8 +-
 packages/cli/src/__tests__/extension-goal-tools.test.ts | 118 +++++++++++-
 packages/cli/src/__tests__/goal-store-resolution.test.ts    |   2 +-
 packages/cli/src/extension.ts                      |  38 +++-
 packages/engine/src/__tests__/agent-tools-goal.test.ts  | 213 +++++++++++++++++++++
 packages/engine/src/__tests__/gating-classifications.test.ts   |   4 +
 packages/engine/src/__tests__/heartbeat-executor.test.ts       |  22 ++-
 packages/engine/src/__tests__/heartbeat-session-prompt.test.ts |   8 +-
 packages/engine/src/agent-heartbeat.ts             |   4 +-
 packages/engine/src/agent-tools.ts                 | 180 ++++++++++++++++-
 packages/engine/src/executor.ts                    |   8 +
 packages/engine/src/gating-classifications.ts      |   2 +
 packages/engine/src/triage.ts                      |  26 ++-
 15 files changed, 600 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-5977

Fusion-Task-Lineage: 46f7e777-da4d-4e9c-b014-329a5cb1e3da
2026-06-07 18:51:46 -07:00
gsxdsm
61d687440b FN-5770: promote workflow interpreter to guarded lifecycle driver
Route default coding tasks through the workflow interpreter only when parity readiness checks pass.

- add a core cutover-readiness evaluator and exports for the workflowInterpreterAuthoritative flag
- wire a WorkflowAuthoritativeDriver into runtime dispatch and reuse authoritative lifecycle seams with legacy fallback behavior
- cover the cutover with reliability tests, docs updates, and a published CLI changeset

Files changed:
 .../FN-5770-workflow-interpreter-authoritative.md  |   5 +
 docs/architecture.md                               |   1 +
 docs/settings-reference.md                         |   5 +-
 docs/workflow-steps.md                             |  22 +-
 .../core/src/__tests__/workflow-cutover.test.ts    |  68 +++++
 packages/core/src/index.ts                         |   8 +
 packages/core/src/workflow-cutover.ts              |  81 ++++++
 .../src/__tests__/openclaw-runtime-e2e.test.ts     |   1 +
 .../engine/src/__tests__/pi-layers-wiring.test.ts  |   2 +-
 .../branch-recovery-live-zero-commits.test.ts      |   2 +-
 .../branch-recovery-stale-cached-base.test.ts      |   2 +-
 .../workflow-interpreter-cutover.test.ts           | 306 +++++++++++++++++++++
 .../self-healing-completion-fanout.test.ts         |   2 +-
 .../self-healing-ghost-branch-recovery.test.ts     |   2 +-
 .../self-healing-orphan-only-scope.test.ts         |   2 +-
 .../self-healing-reclaim-live-zero-commits.test.ts |   2 +-
 .../self-healing-stale-merger-status.test.ts       |   2 +-
 .../src/__tests__/step-session-executor.test.ts    |   2 +-
 .../__tests__/worktree-admin-entry-prune.test.ts   |   8 +-
 packages/engine/src/executor.ts                    |  13 +-
 packages/engine/src/index.ts                       |   6 +
 packages/engine/src/runtimes/in-process-runtime.ts |   8 +
 .../engine/src/workflow-authoritative-driver.ts    | 154 +++++++++++
 23 files changed, 686 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-5770
Fusion-Task-Lineage: dee668b5-10e0-4a3c-b025-9cc43a26286a
2026-06-07 18:51:46 -07:00
gsxdsm
23eb7e25c5 FN-5952: delete obsolete cwd-fallback-removed test
Remove obsolete cwd-fallback reliability coverage and keep the remaining worktree recovery test portable.

- delete the skipped reliability-interactions cwd fallback removal test that no longer covers a distinct path
- update executor worktree recovery to use os.tmpdir() and clean up its temporary root in finally

Files changed:
 .../engine/src/__tests__/executor-worktree.test.ts | 57 ++++++++++++----------
 .../cwd-integration-fallback-removed.test.ts       | 56 ---------------------
 2 files changed, 31 insertions(+), 82 deletions(-)

Fusion-Task-Id: FN-5952

Fusion-Task-Lineage: 8a621b9c-ec24-4400-93c7-e9d946e15283
2026-06-07 18:51:46 -07:00
gsxdsm
294209f64b FN-5943: maintain tasks FTS5 indexes automatically
Keep the tasks FTS5 index compact and self-healing during routine maintenance.

- add FTS5 trigger helpers, index sizing utilities, and a schema migration that skips no-op searchable-field rewrites
- run merge/optimize/rebuild maintenance from self-healing with thresholds, cadence, and run-audit logging
- add focused FTS maintenance coverage and update storage/architecture docs for the new behavior

Files changed:
 docs/architecture.md                               |   1 +
 docs/storage.md                                    |  14 ++
 packages/core/src/__tests__/db-migrate.test.ts     |  50 ++--
 packages/core/src/__tests__/db.test.ts             |  84 +++----
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 .../src/__tests__/merge-request-record.test.ts     |   2 +-
 packages/core/src/__tests__/mission-store.test.ts  |   2 +-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 .../src/__tests__/store-archive-search.test.ts     |  33 +++
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/archive-db.ts                    |   6 +-
 packages/core/src/db.ts                            | 162 ++++++++++---
 packages/core/src/store.ts                         |  16 ++
 .../engine/src/__tests__/fts-maintenance.test.ts   | 268 +++++++++++++++++++++
 packages/engine/src/self-healing.ts                |  70 ++++++
 .../src/store/__tests__/roadmap-store.test.ts      |   4 +-
 18 files changed, 622 insertions(+), 108 deletions(-)

Fusion-Task-Id: FN-5943

Fusion-Task-Lineage: 9a851ede-95ee-4b76-bc34-737912f0e3fc
2026-06-07 18:51:46 -07:00
gsxdsm
fb6b441fbe FN-5960: add unlinked mission advisory reporting
Add explicit visibility for active missions that remain intentionally unlinked to goals.

- document the no-backfill decision with an engine-emitted unlinked mission advisory
- add a scheduler reporter that emits one deduped workflow insight for active missions without goal links and falls back to task logs when insight storage is unavailable
- cover the advisory reporter and scheduler integration with focused tests
- clear PR remediation errors when changing the Create Pull Request base branch

Files changed:
 docs/missions.md                                   |   2 +
 .../dashboard/app/components/PrCreateModal.tsx     |   2 +
 packages/engine/src/__tests__/scheduler.test.ts    |   8 +
 .../unlinked-missions-advisory-reporter.test.ts    | 170 +++++++++++++++++++++
 packages/engine/src/scheduler.ts                   |  18 +++
 .../src/unlinked-missions-advisory-reporter.ts     | 117 ++++++++++++++
 6 files changed, 317 insertions(+)

Fusion-Task-Id: FN-5960

Fusion-Task-Lineage: efdbb4f5-fbd5-4ed7-9b9e-58706041d993
2026-06-07 18:51:46 -07:00
gsxdsm
ce8402e37b fix(FN-6021): align workflow runtime fallback run ids 2026-06-07 17:59:24 -07:00
gsxdsm
cbc2bbff7d refactor(workflow): add workflow task runtime facade 2026-06-07 17:42:43 -07:00
gsxdsm
854b6a30c9 fix(lint): empty-interface PrSourceDescriptor → type alias, drop unused eslint-disable directives
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:15:28 -07:00
gsxdsm
841ff9d838 Address PR review feedback (#1461)
- pr-nodes: forward post-increment entity to deps.respond (responseRounds off-by-one); branch-group entity fallback now keys on task.branchContext.groupId, not task.id
- core: hoist shared autoMergeGateReason into @fusion/core pr-entity.ts; CLI + dashboard import the single definition (R13)
- cli: fn pr create also writes the unified PR entity (ensure → open), keeping legacy prInfo; resolveBranchHeadOid uses argv-safe execFileAsync (injection fix)
- changeset: fn-pr-commands bumped minor → major (breaking CLI removal per AGENTS.md)
- tests: bin.test.ts daemon fixture off reserved port 4040; lazy-loaded-views title 19 → 20 views

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:09:53 -07:00
gsxdsm
1922b5efc2 merge: main (workflow editor 109 / cli_sessions 110-111 / workflow_settings 112) — renumber PR-entity migration to 113, union core exports, TaskCard prNode + cliSessionState badges, executor PrNodeDeps + CliAgentRuntime options 2026-06-05 23:06:46 -07:00
gsxdsm
f1e9ab5587 fix(review): apply autofix feedback
Security hardening + cleanups from code review: parseAgentVerdicts now
ignores out-of-batch thread ids and fails safe (disagree) on conflicting
duplicate verdicts for one thread; drop the unused store param from
makePrResponseAgentRunner; correct the rework-bound doc (to-node, not
from-node) and the migration idempotency comment (PK is the re-run guard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 22:49:39 -07:00
gsxdsm
3f313567dd feat(pr): built-in PR workflow template, end-to-end (U9)
Ships BUILTIN_PR_WORKFLOW_IR (builtin:pr-workflow) wiring the lifecycle
end to end: start -> pr-create -> await-review hold -> (changes-requested)
pr-respond -[rework]-> await-review -> (approved) auto-merge gate ->
pr-merge -> end, with conflict/failed holds and manual force-merge/close
edges. Completes U6's validator side: validateV2 permits a top-level
kind:rework edge whose loop-head opts in via config.reworkRegion (non-
rework cycles still rejected). Additive (default builtin:coding untouched);
behind workflowGraphExecutor. Legacy PrCommentHandler/PrMonitor retirement
deferred (they remain the flag-off path's PR handling) — recorded in the
plan. Fast e2e test; 41 core IR/builtin tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 22:42:36 -07:00
gsxdsm
96f801c019 feat(pr): top-level bounded rework + auto-merge gate + legacy-bypass pin (U6)
Generalizes the foreach-only bounded-rework mechanism to the top-level
graph walk so the PR review loop (await-review -> pr-respond -> rework
back) is a legal bounded cycle: a kind:rework back-edge to a stacked node
returns a ReworkSignal the loop-head re-runs up to maxReworkCycles, then
routes outcome:rework-exhausted. Non-rework cycles still throw 'Cycle
detected' (safety preserved); foreach rework unchanged (shared core
constants). Adds createAutoMergeGateHandler (live entity re-fetch +
isPrEntityAutoMergeReady -> auto-on/auto-off). Pins R14: graph-executed
PR tasks merge through pr-merge, never the legacy queue. 122 graph tests
green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 20:32:24 -07:00
gsxdsm
31d4b5335b feat(pr): security-hardened review-response run — pr-respond body (U5)
Implements the fix-or-disagree agent loop behind pr-respond: batched
one-run-per-cycle over actionable threads (filtering resolved/outdated/
self/bot), with prompt-injection delimiting of untrusted comment bodies,
viewer-authenticated anti-spoof markers, a pre-push secret scan, fast-
forward-only push (no force-push path) with non-ff abort+re-batch, reply+
resolve, commit-last thread-state persistence with marker+SHA crash
recovery (R15), and an iteration cap on responseRounds (R8). GitHub/git/
agent ops injected; engine stays dashboard-import-free. Adds GraphQL
getPrReviewThreadsDetailed + getViewerLogin to the client. 23 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 20:20:25 -07:00
gsxdsm
c13f9a123b feat(pr): node-agnostic PR reconcile + hold-release firing (U4)
Adds PrReconciler — a per-repo, self-owned polling loop (started from the
runtime layer in project-engine.ts, NOT the scheduler) that ETag-probes
GitHub, deep-fetches on change, persists mirror state, clears unverified
on first reconcile, and fires releaseHeldTaskByEvent(github:pr-<event>)
for transitions (changes-requested/approved/conflict/conflict-cleared/
merged/closed). Drops terminal entities; persists an audit event on error.
GitHub ops injected via PrReconcileGithubOps at the 3 CLI sites; engine
never imports the dashboard client. scheduler.ts stays PR-free (R20),
pinned by a regression test. 8 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 20:05:29 -07:00
gsxdsm
4e16145aab feat(pr): pr-create/pr-respond/pr-merge node kinds + handlers (U3)
Adds the three first-class PR workflow node kinds and their handlers via
createPrNodeHandlers(deps), registered in createDefaultNodeHandlers
(fail-closed pr-nodes-unwired when absent). GitHub ops are injected as
callbacks (PrNodeGithubOps) at all three CLI sites (daemon/serve/dashboard)
so the engine never imports the dashboard client (FN-3049). pr-create
routes open/failed as outcomes; pr-merge passes expectedHeadOid and never
writes 'merged' (reconcile corroborates); pr-respond delegates to an
injected respond callback (U5 fills the body). 10 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 19:55:31 -07:00
gsxdsm
1f68348441 merge: main (CLI agent interface #1446) — renumber workflow_settings migration to 112 behind main's cli_sessions(110)/adapter(111), full-workspace literal sweep, i18n union 2026-06-05 16:18:39 -07:00
gsxdsm
693ed6290a Merge remote-tracking branch 'origin/main' into gsxdsm/cli-agent-interface
# Conflicts:
#	CONCEPTS.md
#	packages/core/src/__tests__/db-migrate.test.ts
#	packages/core/src/__tests__/db.test.ts
#	packages/core/src/__tests__/goals-schema.test.ts
#	packages/core/src/__tests__/insight-store.test.ts
#	packages/core/src/__tests__/merge-request-record.test.ts
#	packages/core/src/__tests__/mission-store.test.ts
#	packages/core/src/__tests__/run-audit.test.ts
#	packages/core/src/__tests__/store-merge-queue.test.ts
#	packages/core/src/__tests__/task-documents.test.ts
#	packages/core/src/db.ts
#	packages/dashboard/src/__tests__/agent-onboarding.test.ts
#	packages/dashboard/src/__tests__/ai-refine.test.ts
#	packages/dashboard/src/__tests__/chat-attachment-routes.test.ts
#	packages/dashboard/src/__tests__/experiment-routes.finalize.test.ts
#	packages/dashboard/src/__tests__/milestone-slice-interview.test.ts
#	packages/dashboard/src/__tests__/mission-interview.test.ts
#	packages/dashboard/src/__tests__/pr-metadata-generator.test.ts
#	packages/dashboard/src/__tests__/project-pause-resume-routes.test.ts
#	packages/dashboard/src/__tests__/routes-approval-sandbox-provisioning.test.ts
#	packages/dashboard/src/__tests__/routes-approval-secrets.test.ts
#	packages/dashboard/src/__tests__/routes-approval.test.ts
#	packages/dashboard/src/__tests__/routes-worktrunk.test.ts
#	packages/dashboard/src/__tests__/session-error-recovery.test.ts
#	packages/dashboard/src/__tests__/session-persistence-roundtrip.test.ts
#	packages/dashboard/src/__tests__/session-reconnect.test.ts
#	packages/dashboard/src/__tests__/session-resume-history.test.ts
#	packages/dashboard/src/__tests__/setup-routes.test.ts
#	packages/dashboard/src/__tests__/subtask-breakdown.test.ts
#	packages/dashboard/src/routes/__tests__/agent-avatar-routes.test.ts
#	packages/dashboard/src/routes/__tests__/custom-providers.test.ts
#	packages/dashboard/src/routes/__tests__/docker-node-routes.test.ts
#	packages/i18n/locales/en/app.json
#	plugins/fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts
2026-06-05 15:30:59 -07:00
gsxdsm
6d16c07197 merge: main (editor consolidation #1433, fast-tests, learnings) — renumber workflow_settings migration to 110, settings panel joins the sidebar disclosures, full-workspace literal sweep 2026-06-05 15:23:15 -07:00
gsxdsm
7d69691bbf Merge pull request #1433 from Runfusion/gsxdsm/improve-node-editor
feat: workflow editor upgrade and consolidation — primary surface, templates, import/export, AI design
2026-06-05 15:06:32 -07:00
gsxdsm
47e4919a78 Merge pull request #1453 from Runfusion/gsxdsm/fast-tests
refactor(ci): thin trusted merge gate with flaky-test deletion ratchet
2026-06-05 14:52:12 -07:00
gsxdsm
11fb9f1325 merge main: per-column agent assignment (binding validation, policy-escalation handshake, override notes) into workflow editor consolidation
Resolved 4 conflicts preserving both feature sets:
- WorkflowNodeEditor.tsx: kept card-node/edge/dialog/dirty-guard/auto-layout/
  onboarding/template/AI-edit features; wired main's columnAgentsEnabled flag
  gate, override-column agent registry load, and policy-escalation save retry
  (finishSave helper wraps both update payloads).
- WorkflowNodeEditor.test.tsx: kept U2/U4/AI-design describes plus main's U6
  column-agent describe; merged api mock + import lists.
- register-workflow-routes.ts: merged import sets (design DI seam + column-agent
  validators).
- agent-tools.ts: strip-approval-flags and column-agent binding assertion now
  both run in create/update tools.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:43:02 -07:00
gsxdsm
b7fa21c25e merge: main (column-agent assignment #1432) into workflow-settings — union executor/agent-tools/routes imports, both tool-description texts, both route helpers 2026-06-05 14:41:43 -07:00
gsxdsm
60f1b7fa39 Merge remote-tracking branch 'origin/main' into gsxdsm/cli-agent-interface
# Conflicts:
#	packages/dashboard/app/components/__tests__/ListView.test.tsx
2026-06-05 14:36:42 -07:00
gsxdsm
b8eea85dc9 Merge pull request #1432 from Runfusion/feat/column-agent-assignment
feat: per-column agent assignment for workflow columns
2026-06-05 14:19:53 -07:00
gsxdsm
59364e7c58 Address PR review feedback round 2 (#1432)
- R10 kill-switch: workflowColumns flag now gates the execution path (resolver
  installation + resume pass 2), making the documented rollback real
- resolver: skip parse candidates whose templateNodeId doesn't exist under the
  foreach (disambiguation guard)
- editor: reset the project-scoped agents cache on projectId change
- tests: kill-switch inertness, defer→own-settings release, candidate skip
2026-06-05 13:59:50 -07:00
gsxdsm
482fc25add Merge main into fast-tests: keep both CONCEPTS additions (workflow columns/plugins + merge-gate testing vocabulary) 2026-06-05 09:37:22 -07:00
gsxdsm
2a0223472e Address PR review feedback (#1432)
- delimiter-safe foreach instance-id resolution via IR-validated candidates
- restart watcher handles binding removal/defer-flip and re-keys the reverse
  heartbeat guard on agent change/delete
- governing-node stamp owned by the pass-initiating foreach instance (race fix)
- editor: policy-escalation confirm/retry handshake on save; foreach children
  inherit the override note; project-scoped agent fetches; picker disabled on
  registry fetch error; column-agent strings in the canonical i18n catalog
- tests: update-tool escalation surface, PATCH escalation route, parity bound
  to run-derived stages, try/finally cleanup, deterministic event waits,
  symmetric defer surfaces, binding-release regression
2026-06-05 09:29:04 -07:00
gsxdsm
98d5d83e95 feat(test): add curated engine-core gate suite and test:gate command 2026-06-05 08:55:43 -07:00
gsxdsm
b9afce306e fix(review): schema-version gate, output-filter escape-bypass, generic double-wrap, follow-up resolution
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:41:54 -07:00
gsxdsm
58723312d8 feat: bootstrap cli-agent runtime and wire executor, transport, chat, and recovery seams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:24:41 -07:00
gsxdsm
85f70148a1 feat(dashboard): wire cli-agent chat surface and runner glue; fix stale engine mocks (U12 completion)
Mount CliChatSurface in ChatView for cli-backed chat sessions (sessions carrying
cliExecutorAdapterId): the message-pane + composer region is delegated to the
surface (transcript/raw-terminal toggle for hybrid/native adapters, terminal-only
for the generic adapter), while regular sessions keep the standard composer. The
existing message list and composer JSX are captured once as render thunks and
passed through, so there is no parallel message/composer UI.

Add a narrow telemetry seam: TelemetryHub gains an optional onEvent tap (also
settable post-construction via setEventListener) invoked with each sanitized
event after routing — best-effort, a throwing listener never breaks ingest. This
is the seam the CliChatSessionRunner uses to build the durable transcript from
the same sanitized events the hook route already feeds the hub, without the hub
becoming a general subscriber bus.

Fix the stale @fusion/engine vi.mocks across dashboard tests: object-literal
mocks that fully replace the module now also return listCliAdapterDescriptors
(added by U15's cli-agent-settings route, evaluated at module load). Mocks that
spread importOriginal/importActual already pick it up.

Tests: new ChatView.cli-mount.test.tsx (cli session → CliChatSurface, regular
session → normal composer, generic → terminal-only); telemetry-hub onEvent tap
coverage. chat-attachment-routes, chat-cli-sessions, cli-agent-hooks-route,
ChatView.cli-toggle all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:02:27 -07:00
gsxdsm
6c9a81a05f fix(review): apply autofix feedback 2026-06-05 01:53:42 -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
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
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
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
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
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
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