Commit Graph

941 Commits

Author SHA1 Message Date
gsxdsm
3ebaa321f8 fix(review): apply code-review fixes — runId/foreachNodeId wiring, worktree-leak cleanup, rework re-execution, instance pruning, SIGKILL fallback, type dedup, board memo split, agent-native field-schema context + fn_workflow_get
17 findings from 12-reviewer code review applied:
- P1 runId trio (pin-probe/resume/markIntegrated used placeholder runId; 4-reviewer corroboration) + production-wiring tests
- P1 worktree/branch release on instance failure/exhaustion/abort
- P2 runGraphTaskStep no longer masks step-session failures; rejected memo cleared so rework re-executes
- P2 clearStaleInstanceStates wired at run start/end (mirrors branch pruning)
- P2 code-node timeout killSignal SIGKILL; dead template-recursion removed
- P1/P2 field-type re-declarations replaced with @fusion/core imports (stale comments removed)
- P2 Board memo split + TaskCard comparator stringify guard + modal prop-driven field defs
- HIGH agent-native: executor prompt injects custom-field schema/values; self-correcting rejection text; fn_workflow_get; fn_task_update bare-call guard; integration-conflict task log

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:01:55 -07:00
gsxdsm
7076dd4516 feat(sdk,dashboard,docs): U9 — save-time code validation route, SDK type exports, skill doc, step-inversion docs + changeset
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:15:50 -07:00
gsxdsm
5fa5740afc feat(dashboard,cli): U13 — schema-driven task fields UI (TaskFieldsSection, card badges, PATCH route, board-workflows fields payload, TUI chips)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:26:05 -07:00
gsxdsm
0257bdf9d6 fix(ci): align tests/docs with issue-fix commits (recoveryRehome args, pi-ai mock Unknown/Record, new agent tools doc, hex-pattern comment reword)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 10:56:47 -07:00
gsxdsm
afc72b6bb0 fix(core): widen Task.column to ColumnId across packages; v1-preserving IR persistence for rollback safety (#1403 #1405) 2026-06-04 08:00:33 -07:00
gsxdsm
e711e6e0fd fix(ci): schema-version literal, CLI core-mock spreads, plugin-sdk type-only exports, restore pruned i18n keys 2026-06-04 03:38:05 -07:00
gsxdsm
66cffe904d feat(cli): TUI trait-flag bucket mapping + read-only Other (custom) bucket — no card silently dropped (U11) 2026-06-04 01:33:04 -07:00
gsxdsm
26bc80a0ad FN-5958: add mission goal linking to create and update flows
Expand mission goal-link management across the REST API, CLI, and pi extension.

- accept optional goalIds during mission create and patch requests, and enforce archived-goal rejection while keeping unlink permissive
- add repeatable --goal support to fn mission create and reuse goal validation for CLI linking
- expose archived-goal errors in pi-extension mission goal tools and document the new behavior

Files changed:
 .changeset/FN-5958-mission-goal-links.md           |  10 +
 docs/cli-reference.md                              |   8 +-
 docs/missions.md                                   |  15 +-
 packages/cli/src/__tests__/bin.test.ts             |  34 ++++
 packages/cli/src/__tests__/extension-mission-goal-tools.test.ts |  36 ++++
 packages/cli/src/bin.ts                            |  24 ++-
 packages/cli/src/commands/mission.ts               |  29 ++-
 packages/cli/src/extension.ts                      |   7 +
 packages/dashboard/src/__tests__/mission-goal-links-routes.test.ts | 201 ++++++++++++++++++++-
 packages/dashboard/src/mission-routes.ts           |  66 +++++--
 10 files changed, 390 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-5958
Fusion-Task-Lineage: cf9d6013-5484-439d-b66d-44cac843c6ef
2026-06-03 22:31:23 -07:00
gsxdsm
6d39b9a325 merge main: workflow graph editor + needs-input status; re-applied i18n t() wrapping to restructured WorkflowStepManager header and TaskCard status chain 2026-06-03 21:33:06 -07:00
gsxdsm
dfef5dadbd merge main: branch-group promote/abandon gating + compound-engineering plugin; re-applied i18n t() wrapping to main's restructured promote sections 2026-06-03 20:56:05 -07:00
gsxdsm
a2e96b132a feat(i18n): round-2 sweep — 488 residual strings migrated, markup fidelity restored (#1352)
- 51 fix agents covered every dirty batch from the round-1 verifiers:
  helper-function labels (roles, statuses, relative time), constant
  label maps (SETTINGS_SECTIONS, PROVIDER_INFO, EVENT_TYPE_LABELS),
  TUI help overlay + tab labels, toasts, placeholders, aria-labels
- Inline markup flattened by round 1 restored with <Trans>
  (DbCorruptionBanner storage-docs link, UpdateAvailableBanner code chip)
- Catalogs merged: +527 en keys across 5 locales; CLI bundles + app
  locale tree regenerated (6 locales)
- All 23 sweep-caused test regressions fixed: delta vs the clean-main
  baseline is now zero (remaining 4 local failures reproduce identically
  on origin/main; CI-green upstream)
- typecheck/lint clean; TUI 82/82, core locale 9/9

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 20:52:44 -07:00
gsxdsm
759e2e67af Merge remote-tracking branch 'origin/main' into gsxdsm/workflowbuilder 2026-06-03 19:52:37 -07:00
gsxdsm
1e49494bac feat(i18n): full-sweep string migration — 5,930 keys across 5 locales (#1352)
Migration (multi-agent sweep over 216 files, 60 batches):
- Every user-visible dashboard + TUI string moved to t() with the exact
  English inline default (en rendering byte-identical)
- Catalogs merged from per-batch fragments: en/zh-CN/zh-TW/fr/es now
  carry ~5,930 keys each across common/app/errors/cli namespaces;
  CLI bundles regenerated (6 locales incl. ko)

Integration fixes:
- 18 type errors: reserved {{count}} interpolations renamed, malformed
  plural call, hand-rolled t-param types replaced with TFunction<"app">
- 23 lint errors: superseded label constants/helpers removed
- ExecutorStatusBar hook-order violation (keyboard-open early return
  moved below hooks)
- TUI tests wrapped in I18nextProvider (uninitialized fallback renders
  literal {{placeholders}}); dashboard vitest.setup boots a minimal en
  i18next instance for the same reason

Known WIP (next commits): ~457 residual strings across 50 batches,
Korean drafts for swept keys, and a dashboard test-suite pass that is
still being stabilized (~283 failures under investigation — fake-timer
waitFor interaction, likely stale node_modules vs merged lockfile).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 19:06:53 -07:00
gsxdsm
07dd24e37a Merge pull request #1357 from Runfusion/gsxdsm/taskbranch
feat: branch-group single managed PR flow (planning + missions)
2026-06-03 18:24:54 -07:00
gsxdsm
e5386dc7ee docs(skill): document fn_workflow_list / fn_workflow_select engine tools
skill-sync.test.ts ("engine-tools.md documents all engine session-scoped
tools") scans the engine sources for `name: "fn_*"` and requires each to appear
in packages/cli/skill/fusion/references/engine-tools.md. The two new workflow
tools were added to agent-tools.ts/executor without a doc entry, so the sync
test failed (masked earlier by the dashboard build break). Add both to the
shared agent-tools table.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 18:15:43 -07:00
gsxdsm
1557fc5a47 fix(FN-branch-group): repair CI failures — execFile mock compatibility, TaskCard narrowing, e2e memo race
- resolve execFile lazily via namespace import in coordinator/merger/
  task-lifecycle so the repo's exec-only child_process test mocks load again
  (10+ engine suites failed at import); dashboard.test.ts mock gains execFile
  so the argv-based git probes hit the mock instead of spawning real git
- TaskCard: capture optional branchContext.groupId into a const (narrowing
  doesn't survive into the onClick closure; app tsconfig caught it in CI)
- planning e2e: bounded poll past the 2.5s listTasks startup memo that served
  a pre-landing snapshot on fast CI runs
2026-06-03 17:57:00 -07:00
gsxdsm
c023014b63 Merge pull request #1354 from Runfusion/gsxdsm/acp
feat: ACP (Agent Client Protocol) client runtime plugin
2026-06-03 17:37:29 -07:00
gsxdsm
e703bdd608 feat(i18n): add Korean locale + localized READMEs with language switcher
- ko added to SUPPORTED_LOCALES and every enumeration site (config,
  settings enum, help text, tests); Korean catalogs authored for all
  current keys; CLI bundles regenerated for 6 locales; 한국어 endonym
- README translated into zh-CN, zh-TW, fr, es, ko; every README carries
  a language-switcher line and the localized ones note that English is
  canonical

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 17:33:16 -07:00
gsxdsm
64d02b5108 fix(FN-branch-group): address third-round PR review feedback (#1357)
- abandon (route + CLI) preserves prState 'none' for groups that never had a
  PR instead of falsely persisting 'closed'; regression tests both sides
- stale-snapshot write guard extracted to syncGroupPrOnLanding and covered by
  a fast in-memory unit test (FN-5048); the slow real-git duplicate removed
2026-06-03 17:22:11 -07:00
gsxdsm
d1cd8b6ed8 merge main: unify CONCEPTS.md vocabularies and reconcile core exports
Both sides bootstrapped CONCEPTS.md — kept main's broader structure (Missions,
Merge lifecycle, CE sessions) and folded the branch-group vocabulary into its
Merge-lifecycle cluster (enriched Shared branch group + Self-healing sweep;
added Branch assignment mode, Landed, Group promotion). Union-merged core
index/store imports; took main's AGENTS.md discoverability wording. Also adds
execFile to the two child_process test mocks that only stubbed exec (the
coordinator's argv-based git calls now require it).
2026-06-03 15:57:41 -07:00
gsxdsm
3e927bc5fc fix(FN-branch-group): address second-round PR review feedback (#1357)
- syncGroupPrCallback forwards owner/repo to updatePr (multi-project daemons
  could 404 or edit an unrelated same-numbered PR via process-cwd fallback)
- merger background reconcile re-reads the group before persisting and skips
  the write when the PR snapshot changed (stale-write race vs newer open PR)
- branchContext.groupId trimmed on metadata emit/parse round-trip
- triageSlice non-shared invariant assertions (no groupId, no group row)
2026-06-03 15:46:23 -07:00
gsxdsm
de3273eba3 FN-5937: clear deadlock auto-pause on retry
Clear deadlock auto-pauses when users retry failed in-review tasks.

- add a shared core helper to clear only the in-review stall deadlock auto-pause without overriding manual or unrelated pauses
- apply the auto-pause clear patch across dashboard, CLI, and extension retry flows while preserving existing merge retry reset behavior
- add regression coverage for core, CLI, extension, and dashboard retry paths plus a patch changeset and architecture note

Files changed:
 .changeset/fn-5937-clear-auto-pause-retry.md       |   5 +
 docs/architecture.md                               |   2 +-
 packages/cli/src/__tests__/extension.test.ts       | 126 ++++++++++++++++++
 packages/cli/src/__tests__/task-retry.test.ts      |  59 +++++++++
 packages/cli/src/commands/task.ts                  |  12 +-
 packages/cli/src/extension.ts                      |  12 +-
 .../core/src/__tests__/manual-retry-reset.test.ts  |  44 ++++++-
 packages/core/src/index.ts                         |   7 +-
 packages/core/src/manual-retry-reset.ts            |  19 +++
 packages/core/src/store.ts                         |   8 +-
 .../src/__tests__/routes-tasks-ops.test.ts         | 141 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  12 +-
 12 files changed, 436 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-5937

Fusion-Task-Lineage: 8a15e01b-7b05-4126-ac6b-895467801f02
2026-06-03 15:32:29 -07:00
gsxdsm
acc7456a5e Merge pull request #1343 from Runfusion/gsxdsm/compound
feat: Compound Engineering plugin with interactive sessions, work bridge, and bidirectional sync
2026-06-03 15:31:40 -07:00
gsxdsm
0c26441c01 Merge branch 'main' into gsxdsm/localization 2026-06-03 15:05:41 -07:00
gsxdsm
f3bc757d22 fix(FN-branch-group): address PR review feedback (#1357)
- abandon route: guard already-abandoned groups (matches CLI)
- CLI branch-group list: single task fetch via filterTasksByBranchGroup (N+1)
- branch-name validator: git check-ref-format parity (//, dot-segments, .lock, @, @{, trailing /.)
- updateBranchGroup: validate renamed branchName too
- already-merged-detector: escape regex metachars in git log --grep; non-vacuous prose-mention assertion
- group PR callbacks: thread per-project cwd through SyncGroupPrFn/reconcile/github helpers (multi-project correctness)
- merger: group-PR sync is fire-and-forget (never blocks merge completion); deterministic test handle
- coordinator: sibling PR reuse only when open; reconcile skips member fetch on read-only path; argv-based git calls (no shell)
- task-lifecycle: legacy group-PR path links open PRs only; branch probes via execFile argv (injection hardening)
- mission/planning: branchContext.groupId only stamped for actual shared-mode members (groupId now optional)
- UI: Abandon reachable whenever PR is open (decoupled from completion); promote stays completion-gated
- tests: deterministic concurrency gate, real reconcile path in e2e, Surface Enumeration sections
2026-06-03 13:51:13 -07:00
gsxdsm
614bec2126 fix(tui): stop vitest auto-kill firing on garbage memory metric and killing non-vitest processes
Two compounding bugs made the memory-pressure vitest auto-kill a
30-second SIGKILL sweep of anything mentioning vitest:

1. False pressure: getAvailableMemory probed os.availableMemory, which
   does not exist, and silently fell back to os.freemem() — on macOS
   that reads ~99% used on an idle 256GB machine, permanently above the
   90% threshold. Now reads process.availableMemory() (Node 22+) and
   refuses to auto-kill when only the unreliable freemem fallback is
   available.

2. Overbroad targeting: pgrep -f vitest matches full command lines, so
   the sweep also killed wrapper shells (zsh -c '... npx vitest run'),
   monitor loops, and anything else whose argv mentions vitest —
   stranding exit handlers and taking out unrelated process trees.
   New shared findVitestProcessIds (@fusion/core) filters matches to
   actual node executables.

Surface enumeration (all vitest-process kill/count surfaces):
- TUI memory-pressure auto-kill (controller.killVitestProcesses)
- TUI manual kill-vitest command (same method)
- dashboard POST /api/kill-vitest
- dashboard GET /api/system-stats vitestProcessCount (display)
All four now route through findVitestProcessIds.
2026-06-03 13:33:38 -07:00
gsxdsm
f48602500f merge main: i18n branch + auto-merge override/log-retention work; union CONCEPTS.md vocabularies and docs/solutions reference line 2026-06-03 13:32:26 -07:00
gsxdsm
fa7da2bdfd Merge branch 'main' into gsxdsm/compound 2026-06-03 13:29:20 -07:00
gsxdsm
e08a5633fa feat(i18n): language reset-to-auto-detect + review nitpicks (#1352)
Resolves the remaining review threads:

- Reset to auto-detect across all three layers (Greptile): store passes
  language:null through as null-as-delete; dashboard gains an Auto option
  (clearLanguage + hasExplicitChoice in useLanguage, re-detects from
  navigator, syncs cross-tab); CLI accepts 'fn settings set language auto'.
  Catalog keys added for all five locales; tests at every layer.
- CLI i18n test singleton: afterEach locale restore so zh-CN/fr switches
  can't leak across cases (CodeRabbit nitpick)
- useLocaleFormat memoized per locale for stable formatter identities
  (CodeRabbit nitpick)
- settings-reference.md documents the auto reset path

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:02:23 -07:00
gsxdsm
e54417c987 fix(FN-branch-group): security, parity, reconcile-on-read, N+1 review residuals
Review residuals #5/#7/#8/#11/#12 + #3 wiring: forward the configured GitHub
token to the abandon route's client; guard abandon against finalized/merged
groups; reconcile an open group PR's state from GitHub on single-group reads
(merged out-of-band now flips prState); add fn branch-group abandon for
agent-native parity; block branchName shell injection (execFile argv push +
core-side branch-name validation at group creation); and collapse the
branch-groups list N+1 to a single task fetch via a shared
filterTasksByBranchGroup helper.
2026-06-03 12:43:25 -07:00
gsxdsm
75213bbb08 fix(i18n): address PR review feedback
- config: explicit Hans script wins over HK/MO region (zh-Hans-HK -> zh-CN),
  with regression tests for script-vs-region precedence
- dashboard i18n: detection.caches [] so the detector's init-time auto-persist
  can't masquerade as a user choice and suppress server-settings hydration
- LanguageSelector: role=group (radiogroup conflicted with aria-pressed)
- bin: validate --lang against SUPPORTED_LOCALES (fail loudly, not silent
  fallback); help text clarifies the flag is terminal-UI-only
- cli i18n test: assert a real fr catalog lookup (defaultValue could mask a
  catalog that never loaded); comment the async changeLanguage re-init seam
- assert-locale-chunks: only dirs containing common.json count as locales
- plan doc: merge duplicate Ink 6.8->7.0 risk bullets
- AGENTS.md/solution doc: frontmatter field list + normalizer excerpt synced

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 12:29:02 -07:00
gsxdsm
bde7bdf766 fix(FN-branch-group): review fixes — fast-path mergeTargetSource + open-PR reuse only
Code review (Tier 2) found two P1s: (1) the early no-op fast-path persisted
mergeConfirmed/mergeTargetBranch without mergeTargetSource, so a shared-group
member landing via it could never satisfy the strict completion predicate —
promotion permanently blocked; thread mergeTarget.source through like the
standard landing sites. (2) createGroupPrCallback's findPrForBranch used
state:'all' and could reuse a closed/merged PR from a prior group, persisting
a terminal prState onto a fresh promotion; create path now matches open PRs
only.
2026-06-03 11:23:14 -07:00
gsxdsm
928b14ae1b refactor(FN-branch-group): remove dead cross-unit group-PR helpers
Simplicity pass over the 8-unit diff: delete caller-less closeGroupPrCallback
(CLI), dead dashboard createGroupPullRequest/syncGroupPullRequest (+ their
builders/types/tests — production uses the CLI callbacks), and merge the two
CLI PR-body builders into one parameterized function. ~140 LOC of
parallel-but-unused code from isolated unit implementation.
2026-06-03 11:00:16 -07:00
gsxdsm
9512e98330 feat(FN-branch-group): surface group PR controls in dashboard + CLI (U7)
Extend BranchGroupCard/GroupTaskModal with an Abandon action (open PRs) and
terminal merged/closed badges; promote stays completion-gated. New
fn branch-group list|show|promote (alias fn bg) reaching the same coordinator
path with createGroupPrCallback wired — agent-native parity with the dashboard
promote flow, same completion-gate rejection.
2026-06-03 10:31:18 -07:00
gsxdsm
415470c7bd feat(FN-branch-group): sync group PR as members land + terminal lifecycle (U6)
Push the single group PR's body (member checklist, x/N landed) on each member
landing via an injected SyncGroupPrFn — new updatePr/closePr GitHubClient
helpers (gh CLI + API parity); refreshPrInBackground is task-scoped/wrong
direction and intentionally not reused. Sync failures are non-fatal+retryable;
out-of-band closed/merged PRs reconcile prState instead of erroring. New
POST /branch-groups/:id/abandon closes the PR best-effort and marks the group
abandoned. Also fixes the U5-introduced stub-context regression in the U4
dashboard bridge test (missing options).
2026-06-03 10:20:30 -07:00
gsxdsm
b1454c198e feat(FN-branch-group): create single real GitHub PR on group promotion (U5)
Group promotion in PR mode previously flipped prState to 'open' without ever
calling GitHub — prNumber/prUrl were never populated. Add an injected
CreateGroupPrFn (mirrors the processPullRequestMerge seam, no engine→dashboard
import): coordinator creates-or-reuses exactly one PR per group, persists
prNumber/prUrl/prState, and leaves state untouched on GitHub failure so
re-promotion retries. Idempotent via persisted prNumber +
getBranchGroupByBranchName. Wired at all three CLI engine-construction sites
(daemon/dashboard/serve).
2026-06-03 10:01:53 -07:00
gsxdsm
489a287d6f feat(acp): bundle into CLI, on-demand install, S1 safety + evidence (U8)
Wires the ACP runtime plugin into the published CLI (RUNTIME_PLUGIN_IDS in
tsup.config) and the on-demand BUILTIN_PLUGINS catalog (experimental), matching
the untrusted-subprocess security posture. Adds the Risk S1 default-policy
safety: an acpAllowUnrestricted acknowledgement (default false) — without it, a
blanket allow on a sensitive category is escalated to approval rather than
auto-approved under the allow-all default policy, applied in both the permission
floor and fs write gating. Adds docs/acp-contract.md (launch/readiness +
failure taxonomy), a README with the AGENTS.md-required upstream evidence
(SDK repo/docs/release/integrity), a bundle-output test for the staged plugin,
and a @runfusion/fusion minor changeset. Package green at 179 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 09:25:56 -07:00
gsxdsm
cfff270be7 fix(i18n): green CI — settings mock + canonical text token
- settings.test.ts mocks @fusion/core; add SUPPORTED_LOCALES to the mock so the
  new language enum import resolves (shard 1).
- LanguageSelector.css used the banned --text-secondary token; switch to the
  canonical --text-muted (shard 2 text-token-canonicalization guard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 09:13:03 -07:00
gsxdsm
4f6013ff3a test+refactor(i18n): close code-review residuals
- Extract a shared normalizeToSupportedLocale helper in @fusion/i18n used by
  both the CLI env detection and the dashboard navigator detection
  (convertDetectedLanguage), fixing multi-subtag navigator tags (zh-Hans-CN)
  and unifying Chinese script resolution.
- Add a cross-tab storage listener to useLanguage so a language change in one
  tab propagates to others.
- Dedup the namespace lists into packages/i18n/namespaces.json, consumed by
  config.ts and all three build scripts (no more 3-way drift risk).
- Add tests: dashboard i18n/index.ts (document.lang mirror, init non-blocking),
  useLanguage concurrent-hydration race + cross-tab adoption,
  normalizeToSupportedLocale, namespace-source consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 09:03:16 -07:00
gsxdsm
f707b62155 fix(i18n): address code-review findings
- Validate GlobalSettings.language at the write boundary (store.ts) via
  validateLocale, so invalid locales are dropped not persisted (api-contract P1).
- Fix detectEnvLocale: Traditional-script env tags (zh_Hant/zh_Hant_TW/zh_HK/
  zh_MO) now resolve to zh-TW instead of Simplified; use replaceAll for
  multi-underscore POSIX tags (adversarial P2). Add coverage.
- Agent-native parity: add 'language' to the CLI settings allowlist
  (VALID_SETTINGS + GLOBAL_ONLY + enum) so 'fn settings set language' works
  like the dashboard switcher.
- Document --lang in the bin.ts help table (api-contract P3).
- Derive the expected locale-chunk count from the locales dir instead of a
  hardcoded 5 (maintainability), and add prebuild:client so a raw vite build
  on a fresh clone still syncs catalogs (adversarial P2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 08:51:41 -07:00
gsxdsm
4b0a6df635 feat(cli): migrate TUI board strings to i18n (U7)
Establish the terminal-UI migration pattern: route BoardView's loading/empty
labels through useTranslation("cli"), keeping single-letter keybinding
accelerators literal via interpolation ([{{key}}]). Add the keys to the en cli
catalog, sync the four locales, and regenerate the CLI import map. Tests cover
the migrated label and accelerator preservation. The remaining TUI labels are
deferred long-tail work; the pattern is in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 08:30:54 -07:00
gsxdsm
454b6cd0e9 feat(cli): add terminal-UI i18n runtime and upgrade Ink to 7 (U6)
Add a synchronous Node-side i18next instance built from the generated
@fusion/i18n CLI catalog map (no async backend, first frame localized), with
locale precedence --lang flag -> GlobalSettings.language -> env (LC_ALL/LANG/..)
-> en. Wrap the Ink DashboardApp render in <I18nextProvider> and thread a
--lang flag through runDashboard.

Upgrade ink 6.8 -> 7.0 (native CJK double-width measurement) and raise the
react/@types/react peer floor to ^19.2.0. A spike test confirms react-i18next
works under Ink's custom reconciler: localized first frame + re-render on
changeLanguage (including CJK), retiring the KTD1 unknown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 08:28:52 -07:00
gsxdsm
9072d71306 feat(i18n): add @fusion/i18n package, catalogs, and i18next-cli tooling (U2)
Create the @fusion/i18n package as the authored source-of-truth: shared
i18next config (namespace split, script-aware zh-CN/zh-TW fallback, plural
setup), en base catalogs, and a generated CLI static-import map so the
terminal surface is drop-in for new locales. Add the i18next-cli workflow
(extract/sync/types/status/lint) wired as root i18n:* scripts, install the
i18next stack into dashboard + CLI, strip @fusion/i18n from the published CLI
manifest, gitignore the generated dashboard catalog tree, and add a changeset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 08:00:31 -07:00
gsxdsm
e33dadd77a FN-5916: fix CLI bin targets for pnpm install
Use a committed launcher for published CLI bin links to avoid fresh-install warnings.

- point the published fn and fusion bin entries at a committed bin.mjs launcher
- add a launcher that checks for dist/bin.js and forwards execution to the built CLI
- cover bin target invariants across workspace packages and update CLI package config tests
- add a patch changeset for the published @runfusion/fusion package

Files changed:
 .changeset/fn-5916-cli-bin-launcher.md            |  5 ++
 packages/cli/bin.mjs                              | 20 ++++++
 packages/cli/package.json                         |  5 +-
 packages/cli/src/__tests__/bin-targets.test.ts    | 85 +++++++++++++++++++++++
 packages/cli/src/__tests__/package-config.test.ts |  8 ++-
 5 files changed, 118 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-5916

Fusion-Task-Lineage: 59d40654-ff77-4655-b9ce-3f3421521b2c
2026-06-02 21:54:14 -07:00
gsxdsm
3cf13dd25b feat(compound-engineering): scaffold bundled CE plugin shell (U1) 2026-06-02 18:29:37 -07:00
gsxdsm
abbeaec0a8 FN-5897: surface linked goals in mission read paths
Expose mission-linked goals across mission detail surfaces.

- load linked goal records into mission hierarchy reads in core and return them from the mission detail API
- show linked goals in mission detail views, add goal-chip navigation, and anchor highlighted goal cards in GoalsView
- extend CLI mission output, docs, tests, and add a published changeset for the new read-path support

Files changed:
 .changeset/fn-5897-linked-goals-read-paths.md      |  5 +++
 docs/missions.md                                   |  6 ++-
 packages/cli/src/__tests__/extension.test.ts       | 48 +++++++++++++++++++++-
 packages/cli/src/extension.ts                      | 10 +++++
 packages/core/src/__tests__/mission-store.test.ts  | 14 +++++++
 packages/core/src/mission-store.ts                 | 29 +++++++++++++
 packages/core/src/mission-types.ts                 |  4 ++
 packages/dashboard/app/App.tsx                     | 16 +++++++-
 packages/dashboard/app/components/GoalsView.css    |  6 +++
 packages/dashboard/app/components/GoalsView.tsx    | 42 +++++++++++++++++--
 packages/dashboard/app/components/MissionManager.css | 44 ++++++++++++++++++++
 packages/dashboard/app/components/MissionManager.tsx | 31 +++++++++++++-
 packages/dashboard/app/components/__tests__/GoalsView.test.tsx | 31 ++++++++++++++
 packages/dashboard/app/components/__tests__/MissionManager.test.tsx | 45 ++++++++++++++++++++
 packages/dashboard/app/components/mission-types.ts |  2 +
 packages/dashboard/src/__tests__/mission-e2e.test.ts |  4 ++
 packages/dashboard/src/mission-routes.ts           |  5 ++-
 17 files changed, 332 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5897

Fusion-Task-Lineage: 5176270d-9885-447a-845b-4e0d69d531a0
2026-06-02 17:58:41 -07:00
gsxdsm
93e8bd9940 FN-5899: add mission-goal linking commands and tools
Add mission↔goal linkage support across the API, CLI, and pi-extension surfaces.

- add mission goal list/link/unlink REST endpoints and dashboard route coverage
- add `fn mission goals`, `fn mission link-goal`, and `fn mission unlink-goal` CLI commands with tests
- add `fn_mission_list_goals`, `fn_mission_link_goal`, and `fn_mission_unlink_goal` extension tools plus skill/docs updates
- add a changeset for the published CLI package release

Files changed:
 .changeset/FN-5899-mission-goal-tooling.md         |   5 +
 docs/cli-reference.md                              |  11 +-
 docs/missions.md                                   |  27 ++++
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 packages/cli/skill/fusion/references/extension-tools.md |  26 ++++
 packages/cli/skill/fusion/references/fusion-capabilities.md |   3 +
 packages/cli/src/__tests__/bin.test.ts             |  21 +++
 packages/cli/src/__tests__/extension-mission-goal-tools.test.ts | 140 +++++++++++++++++
 packages/cli/src/bin.ts                            |  32 +++-
 packages/cli/src/commands/__tests__/mission.test.ts     |  99 +++++++++++-
 packages/cli/src/commands/mission.ts               | 102 +++++++++++++-
 packages/cli/src/extension.ts                      | 170 +++++++++++++++++++++
 packages/dashboard/src/__tests__/mission-goal-links-routes.test.ts | 151 ++++++++++++++++++
 packages/dashboard/src/mission-routes.ts           | 153 ++++++++++++++++++-
 14 files changed, 930 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-5899

Fusion-Task-Lineage: c63b0f4b-c77e-4229-ade4-537a4dda0f5f
2026-06-02 14:47:51 -07:00
gsxdsm
48e08c07eb FN-5880: recover plan-ready mission interview drafts
Keep completed mission interview summaries resumable until they are approved or discarded.

- include  mission interview sessions in dashboard, CLI, and extension draft listings
- relabel complete drafts as plan-ready review items and reopen them at the summary approval step
- add regression coverage and docs/changeset updates for resumable complete drafts

Files changed:
 .../fn-5880-mission-interview-complete-draft.md    |  5 ++
 docs/missions.md                                   |  8 +--
 packages/cli/src/__tests__/extension.test.ts       | 13 +++-
 .../cli/src/commands/__tests__/mission.test.ts     | 11 ++-
 packages/cli/src/commands/mission.ts               | 17 ++++-
 packages/cli/src/extension.ts                      |  7 +-
 .../dashboard/app/components/MissionManager.tsx    | 24 ++++---
 .../components/__tests__/MissionManager.test.tsx   | 70 ++++++++++++++++++
 packages/dashboard/app/components/mission-types.ts |  2 +-
 .../mission-interview-drafts-routes.test.ts        | 18 ++++ -
 .../src/__tests__/mission-interview.test.ts        | 82 ++++++++++++++++++++++
 packages/dashboard/src/mission-interview.ts        | 36 +++++-----
 12 files changed, 252 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-5880

Fusion-Task-Lineage: 18a9c25c-3f59-4179-9e9c-63f0747acb7f
2026-06-02 09:02:48 -07:00
gsxdsm
7d20a997b9 FN-5872: clear active-session registry on PR cleanup
Ensure PR-mode merge cleanup removes stale active-session registry state before deleting worktrees.

- unregister the task worktree from the active-session registry during merged-task artifact cleanup
- export the active-session registry from the engine entrypoint for lifecycle cleanup usage
- add CLI and engine regression coverage for registry cleanup and missing-entry best-effort behavior
- add a patch changeset for the published CLI package

Files changed:
 .changeset/fn-5872-registry-cleanup.md             |  5 ++++
 .../src/commands/__tests__/task-lifecycle.test.ts  | 29 +++++++++++++++++++++-
 packages/cli/src/commands/task-lifecycle.ts        |  8 +++++-
 .../pr-mode-worktree-invariants.test.ts            | 11 +++++---
 packages/engine/src/index.ts                       |  1 +
 5 files changed, 49 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-5872

Fusion-Task-Lineage: d4db24a3-7ae0-4d07-b029-7f30b2f65d2e
2026-06-02 07:46:38 -07:00
gsxdsm
e549d7af30 FN-5849: shard dashboard quality Vitest runs
Split the dashboard quality Vitest lane into bounded heap-managed shards to avoid signal exits.

- replace the single dashboard quality test command with sequential app and API shard scripts
- add a heap wrapper plus Vitest config shard definitions for foundation, component, App, ChatView, and SettingsModal coverage
- add guard tests for the sharded dashboard test configuration and restore spinner-animation.css.test.ts to foundation-ui coverage
- update the CLI package-config test expectations for the new dashboard test script layout

Files changed:
 packages/cli/src/__tests__/package-config.test.ts  |   8 +-
 packages/dashboard/package.json                    |  18 +-
 packages/dashboard/scripts/run-vitest-with-heap.mjs     |  41 ++++
 packages/dashboard/src/__tests__/dashboard-test-config-guard.test.ts  |  77 ++++++
 packages/dashboard/vitest.config.ts                | 273 ++++++++++++++++++++-
 5 files changed, 407 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-5849

Fusion-Task-Lineage: 522f3963-4647-4a59-bb6b-a3dacfbf620e
2026-06-02 00:53:39 -07:00