@runfusion/fusion 0.76.0-beta.2 → 0.76.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/bin.js +323 -59
  2. package/dist/child-process-worker.js +274 -42
  3. package/dist/client/.vite/manifest.json +273 -273
  4. package/dist/client/assets/{AgentDetailView-gak4EWTI.js → AgentDetailView-T767kKTg.js} +1 -1
  5. package/dist/client/assets/{AgentPermissionPolicyEditor-DP1QbZL-.js → AgentPermissionPolicyEditor--u9jyUf2.js} +1 -1
  6. package/dist/client/assets/{AgentsView-DAMRTKzI.js → AgentsView-6Ifu7qDr.js} +5 -5
  7. package/dist/client/assets/{ChatView-iE-2gf5P.js → ChatView-BV3lixQi.js} +1 -1
  8. package/dist/client/assets/{CommandCenter-B6RnkLYm.js → CommandCenter-CSRYoveB.js} +1 -1
  9. package/dist/client/assets/{DevServerView-DcFL_LzK.js → DevServerView-B9So_oYx.js} +1 -1
  10. package/dist/client/assets/{DirectoryPicker-CtjqrYoO.js → DirectoryPicker-BhyDL_2m.js} +1 -1
  11. package/dist/client/assets/{DocumentsView-BkAe2S4H.js → DocumentsView-pbERA7O-.js} +1 -1
  12. package/dist/client/assets/{EvalsView-CbGA9dMn.js → EvalsView-DJQ4ltCg.js} +1 -1
  13. package/dist/client/assets/{ExperimentalAgentOnboardingModal-CMgO_S8T.js → ExperimentalAgentOnboardingModal-BwJuzkzB.js} +1 -1
  14. package/dist/client/assets/{GoalsView-_3P9J5sf.js → GoalsView-B6X5_0Ve.js} +1 -1
  15. package/dist/client/assets/InsightsView-CJgI0J7S.js +11 -0
  16. package/dist/client/assets/{InsightsView-Gn5lOBA0.css → InsightsView-DAAXuX4v.css} +1 -1
  17. package/dist/client/assets/{MemoryView-DwJas8vi.js → MemoryView-BHq1AHPu.js} +1 -1
  18. package/dist/client/assets/{PiExtensionsManager-B_LiW_e9.js → PiExtensionsManager-B8At6fO8.js} +1 -1
  19. package/dist/client/assets/{PluginManager-BkB6WLQc.js → PluginManager-k7hV7_9e.js} +1 -1
  20. package/dist/client/assets/{PullRequestView-DcH5tmYc.js → PullRequestView-B1hZFrWo.js} +1 -1
  21. package/dist/client/assets/{ReportModal-BOEbqtqG.js → ReportModal-C46V_zEa.js} +1 -1
  22. package/dist/client/assets/{ResearchView-Dp6V42pI.js → ResearchView-D8G85BYN.js} +2 -2
  23. package/dist/client/assets/{SecretsView-BCqXHB2L.js → SecretsView-CTri9LRK.js} +1 -1
  24. package/dist/client/assets/{SessionTerminal-CkdoQv4y.js → SessionTerminal-BRf6r4Vp.js} +1 -1
  25. package/dist/client/assets/SettingsModal-D0RBeZik.js +21 -0
  26. package/dist/client/assets/{SettingsModal-Dc7YG6KB.js → SettingsModal-rUQcSTJp.js} +1 -1
  27. package/dist/client/assets/{SettingsTextareaRow-WSkBoAOO.js → SettingsTextareaRow-BirlBcem.js} +1 -1
  28. package/dist/client/assets/{SetupWizardModal-VTrJAsKd.js → SetupWizardModal-xnCBM9EL.js} +2 -2
  29. package/dist/client/assets/{SkillsView-CXeXOxfF.js → SkillsView-O5U0ep50.js} +1 -1
  30. package/dist/client/assets/{WorkflowNodeEditor-DoxLGPRF.js → WorkflowNodeEditor-BX4d2qqF.js} +3 -3
  31. package/dist/client/assets/{agent-import-generation-upc0yw-M.js → agent-import-generation-DnqVkPkz.js} +1 -1
  32. package/dist/client/assets/{agentsOrgChartLayout-C3iumMrW.js → agentsOrgChartLayout-CKuzbhFf.js} +1 -1
  33. package/dist/client/assets/app-B2FwULu2.js +5 -0
  34. package/dist/client/assets/{app-BA9gw9hx.js → app-B6nJaqAl.js} +2 -2
  35. package/dist/client/assets/{app-B_lScKc1.js → app-CGXZeIRc.js} +2 -2
  36. package/dist/client/assets/{app-DG_vjDw5.js → app-CGtkeBF5.js} +3 -3
  37. package/dist/client/assets/{app-GBgoY-oh.js → app-CNzN1Plu.js} +2 -2
  38. package/dist/client/assets/{app-B0KFGP8D.js → app-DLs-f5yM.js} +3 -3
  39. package/dist/client/assets/{app-DeHIOCEP.js → app-DsvtcRUG.js} +2 -2
  40. package/dist/client/assets/{architectureDiagram-3BPJPVTR-D6jqc3fJ.js → architectureDiagram-3BPJPVTR-gi467xY0.js} +1 -1
  41. package/dist/client/assets/{blockDiagram-GPEHLZMM-DY3AKuPD.js → blockDiagram-GPEHLZMM-B_gpcYiR.js} +1 -1
  42. package/dist/client/assets/{c4Diagram-AAUBKEIU-CpD52V4g.js → c4Diagram-AAUBKEIU-DeylEYsQ.js} +1 -1
  43. package/dist/client/assets/channel-BoE8DeM4.js +1 -0
  44. package/dist/client/assets/{chunk-2J33WTMH-CPeIHyAX.js → chunk-2J33WTMH-BL2WY0HN.js} +1 -1
  45. package/dist/client/assets/{chunk-4BX2VUAB-ivAwI4xM.js → chunk-4BX2VUAB-BkLExGMe.js} +1 -1
  46. package/dist/client/assets/{chunk-55IACEB6-BtVQ5XaZ.js → chunk-55IACEB6-CSTvCF5T.js} +1 -1
  47. package/dist/client/assets/{chunk-727SXJPM-1eap1vDU.js → chunk-727SXJPM-9J8pKk4x.js} +1 -1
  48. package/dist/client/assets/{chunk-AQP2D5EJ-B2NB3BW9.js → chunk-AQP2D5EJ-DXC1vPWr.js} +1 -1
  49. package/dist/client/assets/{chunk-FMBD7UC4-Hk_smNYv.js → chunk-FMBD7UC4-CFRUb-zD.js} +1 -1
  50. package/dist/client/assets/{chunk-ND2GUHAM-BmGCAojk.js → chunk-ND2GUHAM-B87HFYS8.js} +1 -1
  51. package/dist/client/assets/{chunk-QZHKN3VN-D0aXZ8CV.js → chunk-QZHKN3VN-CTjHiGbd.js} +1 -1
  52. package/dist/client/assets/classDiagram-4FO5ZUOK-qnbLX_9_.js +1 -0
  53. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-qnbLX_9_.js +1 -0
  54. package/dist/client/assets/{cose-bilkent-S5V4N54A-DAbu_gnF.js → cose-bilkent-S5V4N54A-D3Edq3L9.js} +1 -1
  55. package/dist/client/assets/{dagre-BM42HDAG-BdmLlrDJ.js → dagre-BM42HDAG-CwwbeQfN.js} +1 -1
  56. package/dist/client/assets/{dashboard-view-CULL1yhL.js → dashboard-view-BLAoW3D4.js} +1 -1
  57. package/dist/client/assets/{dashboard-view-PRCWCSLm.js → dashboard-view-DAlJxqiJ.js} +1 -1
  58. package/dist/client/assets/{dashboard-view-BoFBSXUn.js → dashboard-view-QxQwJFLz.js} +1 -1
  59. package/dist/client/assets/{dashboard-view-CxXMDfNY.js → dashboard-view-aPzfv99T.js} +1 -1
  60. package/dist/client/assets/{diagram-2AECGRRQ-PpqLbVUA.js → diagram-2AECGRRQ-koJWWXE4.js} +1 -1
  61. package/dist/client/assets/{diagram-5GNKFQAL-9rkGmTwh.js → diagram-5GNKFQAL-Yob5cOKT.js} +1 -1
  62. package/dist/client/assets/{diagram-KO2AKTUF-BT-efOMo.js → diagram-KO2AKTUF-DelvFSkK.js} +1 -1
  63. package/dist/client/assets/{diagram-LMA3HP47-w79OWFxg.js → diagram-LMA3HP47-CMput2h2.js} +1 -1
  64. package/dist/client/assets/{diagram-OG6HWLK6-Bye9I5IO.js → diagram-OG6HWLK6-04VXDl79.js} +1 -1
  65. package/dist/client/assets/{erDiagram-TEJ5UH35-aodREgDf.js → erDiagram-TEJ5UH35-C9iP8Uyp.js} +1 -1
  66. package/dist/client/assets/{flowDiagram-I6XJVG4X-D0DKItY3.js → flowDiagram-I6XJVG4X-DENQvu_t.js} +1 -1
  67. package/dist/client/assets/{folder-open-CqvaMJvx.js → folder-open-D-554oji.js} +1 -1
  68. package/dist/client/assets/{ganttDiagram-6RSMTGT7-CZVApkvw.js → ganttDiagram-6RSMTGT7-BqOttZAT.js} +1 -1
  69. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-D_ynwJ4p.js → gitGraphDiagram-PVQCEYII-CDcydi-5.js} +1 -1
  70. package/dist/client/assets/{index-BzAldNrK.css → index-CXTd3LAB.css} +1 -1
  71. package/dist/client/assets/{index-DWRJyaa3.js → index-CtYRoouR.js} +264 -264
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-pJG6zxjk.js → infoDiagram-5YYISTIA-B5LQQnxt.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-nFZ5laUo.js → ishikawaDiagram-YF4QCWOH-DpFEt7D2.js} +1 -1
  74. package/dist/client/assets/{journeyDiagram-JHISSGLW-CWpCaAIe.js → journeyDiagram-JHISSGLW-MELtgu22.js} +1 -1
  75. package/dist/client/assets/{kanban-definition-UN3LZRKU-ATkPspKa.js → kanban-definition-UN3LZRKU-h33PLATd.js} +1 -1
  76. package/dist/client/assets/{mermaid.core-CDXPNs7a.js → mermaid.core-Dk2mUPOq.js} +4 -4
  77. package/dist/client/assets/{mindmap-definition-RKZ34NQL-BkqS9tpe.js → mindmap-definition-RKZ34NQL-B_T4O2-B.js} +1 -1
  78. package/dist/client/assets/{pieDiagram-4H26LBE5-DEUyVLs-.js → pieDiagram-4H26LBE5-B1YIFkRl.js} +1 -1
  79. package/dist/client/assets/{puzzle-DQ0y1-XK.js → puzzle-hvecxlpJ.js} +1 -1
  80. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-ESBJNK5c.js → quadrantDiagram-W4KKPZXB-BoGQR_hO.js} +1 -1
  81. package/dist/client/assets/{requirementDiagram-4Y6WPE33-CqPs7zcv.js → requirementDiagram-4Y6WPE33-BSDmUBIx.js} +1 -1
  82. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-CkFN0m14.js → sankeyDiagram-5OEKKPKP-Dz_GqOa5.js} +1 -1
  83. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-Dx2nDuMO.js → sequenceDiagram-3UESZ5HK-B6twjYUH.js} +1 -1
  84. package/dist/client/assets/{shield-alert-BS05s4RM.js → shield-alert-BX4WRJOv.js} +1 -1
  85. package/dist/client/assets/{standing-instructions-template-xprxYNHm.js → standing-instructions-template-BJY317CC.js} +1 -1
  86. package/dist/client/assets/{stateDiagram-AJRCARHV-EUPmRFGd.js → stateDiagram-AJRCARHV-DuwqWLx-.js} +1 -1
  87. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-DcQ2mhi5.js → stateDiagram-v2-BHNVJYJU-Bu8Sk187.js} +1 -1
  88. package/dist/client/assets/{timeline-definition-PNZ67QCA-D4YO_3V-.js → timeline-definition-PNZ67QCA-BS6VnqSI.js} +1 -1
  89. package/dist/client/assets/{upload-BjyBtxo7.js → upload-CaDoyaMW.js} +1 -1
  90. package/dist/client/assets/{users-D5ogZ7WQ.js → users-C5uCLwVM.js} +1 -1
  91. package/dist/client/assets/{vennDiagram-CIIHVFJN-BT5_XuQL.js → vennDiagram-CIIHVFJN-CUbzqT5Y.js} +1 -1
  92. package/dist/client/assets/{wardley-L42UT6IY-X_ZMW457.js → wardley-L42UT6IY-Mv-NotFS.js} +1 -1
  93. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-GK9nONHU.js → wardleyDiagram-YWT4CUSO-DuYpvLZX.js} +1 -1
  94. package/dist/client/assets/{xychartDiagram-2RQKCTM6-Dw3zXHAq.js → xychartDiagram-2RQKCTM6-24_7QXdw.js} +1 -1
  95. package/dist/client/index.html +2 -2
  96. package/dist/client/version.json +1 -1
  97. package/dist/droid-cli/package.json +1 -1
  98. package/dist/extension.js +285 -47
  99. package/dist/pi-claude-cli/package.json +1 -1
  100. package/dist/plugin-sdk/index.d.ts +23 -0
  101. package/dist/plugin-sdk/index.js +2 -0
  102. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +2 -0
  103. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  104. package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +2 -0
  105. package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
  106. package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +2 -0
  107. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  108. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +2 -0
  109. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  110. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +2 -0
  111. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  112. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +2 -0
  113. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  114. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +2 -0
  115. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  116. package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +2 -0
  117. package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
  118. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +2 -0
  119. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  120. package/dist/plugins/fusion-plugin-linear-import/bundled.js +2 -0
  121. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  122. package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +2 -0
  123. package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
  124. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +2 -0
  125. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  126. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +2 -0
  127. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  128. package/dist/plugins/fusion-plugin-quality/bundled.js +2 -0
  129. package/dist/plugins/fusion-plugin-quality/package.json +1 -1
  130. package/dist/plugins/fusion-plugin-reports/bundled.js +2 -0
  131. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  132. package/dist/plugins/fusion-plugin-roadmap/bundled.js +2 -0
  133. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  134. package/dist/plugins/fusion-plugin-todos/bundled.js +2 -0
  135. package/dist/plugins/fusion-plugin-todos/package.json +1 -1
  136. package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +2 -0
  137. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  138. package/package.json +1 -1
  139. package/dist/client/assets/InsightsView-DOhO7xH5.js +0 -11
  140. package/dist/client/assets/SettingsModal-D4Fn4GlS.js +0 -21
  141. package/dist/client/assets/app-DBCGrz-f.js +0 -5
  142. package/dist/client/assets/channel-CaxOu15c.js +0 -1
  143. package/dist/client/assets/classDiagram-4FO5ZUOK-DXIkGbsl.js +0 -1
  144. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DXIkGbsl.js +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion/pi-claude-cli",
3
- "version": "0.76.0-beta.2",
3
+ "version": "0.76.0-beta.3",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "main": "index.ts",
@@ -5201,6 +5201,11 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5201
5201
  saveWorkflowRunStepInstanceAsync(state: WorkflowRunStepInstance): Promise<void>;
5202
5202
  loadWorkflowRunStepInstancesAsync(taskId: string, runId: string): Promise<WorkflowRunStepInstance[]>;
5203
5203
  clearWorkflowRunStepInstancesAsync(taskId: string, keepRunId?: string): Promise<void>;
5204
+ listTaskRecommendations(options?: {
5205
+ completeColumns?: ReadonlySet<string>;
5206
+ limit?: number;
5207
+ offset?: number;
5208
+ }): Promise<TaskRecommendationListPage>;
5204
5209
  listTasksForGithubTrackingReconcile(options?: {
5205
5210
  offset?: number;
5206
5211
  limit?: number;
@@ -5580,6 +5585,8 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5580
5585
  }): Promise<WorkflowWorkItem>;
5581
5586
  seedStrandedPlanReviewContinuation(input: WorkflowWorkItemUpsertInput & {
5582
5587
  kind: "task";
5588
+ }, options?: {
5589
+ retirePredecessorId?: string;
5583
5590
  }): Promise<{
5584
5591
  seeded: boolean;
5585
5592
  reason?: "active-continuation" | "plan-review-passed";
@@ -7324,6 +7331,21 @@ interface TaskRecommendation {
7324
7331
  category: TaskRecommendationCategory;
7325
7332
  createdTaskId?: string;
7326
7333
  }
7334
+ interface TaskRecommendationListItem {
7335
+ taskId: string;
7336
+ taskTitle?: string;
7337
+ taskColumn: string;
7338
+ updatedAt: string;
7339
+ recommendation: TaskRecommendation;
7340
+ }
7341
+ interface TaskRecommendationListPage {
7342
+ items: TaskRecommendationListItem[];
7343
+ rowOffset: number;
7344
+ rowLimit: number;
7345
+ returnedRowCount: number;
7346
+ totalRowCount: number;
7347
+ hasMore: boolean;
7348
+ }
7327
7349
  interface TaskReleaseGateVerdict {
7328
7350
  promoteBlocked: boolean;
7329
7351
  unplannedForExecution: boolean;
@@ -8013,6 +8035,7 @@ type ReportActionType = "bug" | "feedback" | "idea" | "help";
8013
8035
  type ReportTarget = "issue" | "discussion";
8014
8036
  interface ProjectSettings {
8015
8037
  maxRecommendationsPerTask?: number;
8038
+ recommendationMailboxNoticeEnabled?: boolean;
8016
8039
  globalPause?: boolean;
8017
8040
  globalPauseReason?: string;
8018
8041
  defaultWorkflowId?: string;
@@ -9125,6 +9125,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9125
9125
  var DEFAULT_PROJECT_SETTINGS = {
9126
9126
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9127
9127
  maxRecommendationsPerTask: 3,
9128
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9129
+ recommendationMailboxNoticeEnabled: true,
9128
9130
  globalPause: false,
9129
9131
  globalPauseReason: void 0,
9130
9132
  defaultWorkflowId: void 0,
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/acp-runtime",
3
- "version": "0.1.35-beta.2",
3
+ "version": "0.1.35-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/claude-runtime",
3
- "version": "0.1.10-beta.2",
3
+ "version": "0.1.10-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9244,6 +9244,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9244
9244
  var DEFAULT_PROJECT_SETTINGS = {
9245
9245
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9246
9246
  maxRecommendationsPerTask: 3,
9247
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9248
+ recommendationMailboxNoticeEnabled: true,
9247
9249
  globalPause: false,
9248
9250
  globalPauseReason: void 0,
9249
9251
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/cli-printing-press",
3
- "version": "0.1.52-beta.2",
3
+ "version": "0.1.52-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/compound-engineering",
3
- "version": "0.1.35-beta.2",
3
+ "version": "0.1.35-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/cursor-runtime",
3
- "version": "0.1.54-beta.2",
3
+ "version": "0.1.54-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/dependency-graph",
3
- "version": "0.1.66-beta.2",
3
+ "version": "0.1.66-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/droid-runtime",
3
- "version": "0.1.61-beta.2",
3
+ "version": "0.1.61-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/grok-runtime",
3
- "version": "0.2.13-beta.2",
3
+ "version": "0.2.13-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/hermes-runtime",
3
- "version": "0.2.85-beta.2",
3
+ "version": "0.2.85-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/linear-import",
3
- "version": "0.1.17-beta.2",
3
+ "version": "0.1.17-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/omp-runtime",
3
- "version": "0.1.10-beta.2",
3
+ "version": "0.1.10-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/openclaw-runtime",
3
- "version": "0.2.85-beta.2",
3
+ "version": "0.2.85-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/paperclip-runtime",
3
- "version": "0.2.85-beta.2",
3
+ "version": "0.2.85-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9127,6 +9127,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9127
9127
  var DEFAULT_PROJECT_SETTINGS = {
9128
9128
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9129
9129
  maxRecommendationsPerTask: 3,
9130
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9131
+ recommendationMailboxNoticeEnabled: true,
9130
9132
  globalPause: false,
9131
9133
  globalPauseReason: void 0,
9132
9134
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/quality",
3
- "version": "0.1.10-beta.2",
3
+ "version": "0.1.10-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9244,6 +9244,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9244
9244
  var DEFAULT_PROJECT_SETTINGS = {
9245
9245
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9246
9246
  maxRecommendationsPerTask: 3,
9247
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9248
+ recommendationMailboxNoticeEnabled: true,
9247
9249
  globalPause: false,
9248
9250
  globalPauseReason: void 0,
9249
9251
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/reports",
3
- "version": "0.1.54-beta.2",
3
+ "version": "0.1.54-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/roadmap",
3
- "version": "0.1.54-beta.2",
3
+ "version": "0.1.54-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9124,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
9124
9124
  var DEFAULT_PROJECT_SETTINGS = {
9125
9125
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
9126
9126
  maxRecommendationsPerTask: 3,
9127
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
9128
+ recommendationMailboxNoticeEnabled: true,
9127
9129
  globalPause: false,
9128
9130
  globalPauseReason: void 0,
9129
9131
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/todos",
3
- "version": "0.1.3-beta.2",
3
+ "version": "0.1.3-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -166425,6 +166425,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
166425
166425
  var DEFAULT_PROJECT_SETTINGS = {
166426
166426
  // FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
166427
166427
  maxRecommendationsPerTask: 3,
166428
+ // FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
166429
+ recommendationMailboxNoticeEnabled: true,
166428
166430
  globalPause: false,
166429
166431
  globalPauseReason: void 0,
166430
166432
  defaultWorkflowId: void 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion-plugin-examples/whatsapp-chat",
3
- "version": "0.1.54-beta.2",
3
+ "version": "0.1.54-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runfusion/fusion",
3
- "version": "0.76.0-beta.2",
3
+ "version": "0.76.0-beta.3",
4
4
  "license": "MIT",
5
5
  "description": "Fusion CLI: HTTP API server, daemon, dashboard launcher, and task tooling for the Fusion AI coding agent.",
6
6
  "homepage": "https://github.com/Runfusion/Fusion#readme",
@@ -1,11 +0,0 @@
1
- import{r as c,j as e}from"./vendor-react-SZ_qB27O.js";import{c as ze,ap as ce,aq as we,ar as Ce,bz as je,bA as Ye,av as Me,bB as Qe,bC as Je,bD as Ze,bE as es,bF as ss,bG as ts,bH as Ie,bI as is,bJ as ns,bK as Ae,V as as,S as A,bL as rs,X as Ne,bM as fe,R as N,_ as cs,bN as ls,an as _e,h as le,bO as Ee,bP as os,P as De,aR as hs,b0 as Pe,bQ as gs,s as ds,l as us}from"./index-DWRJyaa3.js";import{u as $e}from"./vendor-i18n-Duky4gdQ.js";import{U as Fe}from"./users-D5ogZ7WQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";/**
2
- * @license lucide-react v1.7.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ms=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],fs=ze("building",ms);/**
7
- * @license lucide-react v1.7.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const vs=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],bs=ze("chart-line",vs),me=["architecture","quality","workflow","performance","reliability","security","ux","testability","documentation","dependency","features","competitive_analysis","research","trends","other"],Re={quality:"Quality",performance:"Performance",architecture:"Architecture",security:"Security",reliability:"Reliability",ux:"User Experience",testability:"Testability",documentation:"Documentation",dependency:"Dependencies",workflow:"Workflow",other:"Other",features:"Features",competitive_analysis:"Competitive Analysis",research:"Research",trends:"Trends"};function ys(g){const{t:d}=$e("app"),G=g??"",k=`${Ce.INSIGHTS_PREFIX}${G}`,S=`${Ce.INSIGHT_LATEST_RUN_PREFIX}${G}`,s=ce(k,{maxAgeMs:we}),V=ce(S,{maxAgeMs:je}),E=c.useRef(Array.isArray(s)&&s.length>0),U=c.useCallback(a=>d(`insights.category.${a}`,Re[a]??a),[d]),[v,x]=c.useState(()=>Array.isArray(s)?s:[]),[T,W]=c.useState(()=>me.map(a=>({category:a,label:Re[a]??a,items:[],isLoading:!1,error:null}))),[Y,L]=c.useState(!(Array.isArray(s)&&s.length>0)),[Q,H]=c.useState(null),[J,z]=c.useState(V??null),[Z,B]=c.useState(!1),[ee,F]=c.useState(null),[se,_]=c.useState(new Map),[te,C]=c.useState(new Map),[u,w]=c.useState(new Map),[m,D]=c.useState(new Map),[O,j]=c.useState(!1),R=c.useCallback(async()=>{E.current||L(!0),H(null);try{const t=(await Ye({status:void 0,limit:1e3},g)).insights.filter(l=>l.status!=="dismissed");x(t),Me(k,t.length>500?t.slice(0,500):t,{maxBytes:5e5});const r=await Qe(g);r.runs.length>0&&(z(r.runs[0]),Me(S,r.runs[0],{maxBytes:5e5})),E.current=!0}catch(a){const t=a instanceof Error?a.message:"Failed to fetch insights";H(t)}finally{L(!1)}},[k,S,g]),y=c.useCallback(()=>{j(a=>!a)},[]),ie=c.useCallback(async(a,t,r)=>{B(!0),F(null);try{const l=await Je("manual",void 0,g,a,t,r);z(l),l.status==="completed"?await R():l.status==="failed"&&l.error&&F(l.error)}catch(l){if(l instanceof Ze&&l.status===409&&l.details?.code==="ACTIVE_RUN_CONFLICT"){const ne=typeof l.details.activeRunId=="string"?l.details.activeRunId:null;if(ne)try{const de=await es(ne,g);z(de)}catch{}throw F("Insight generation is already running"),l}const f=l instanceof Error?l.message:"Failed to generate insights";throw F(f),l}finally{B(!1)}},[g,R]),X=c.useCallback(async a=>{_(t=>{const r=new Map(t);return r.set(a,{running:!0,error:null}),r});try{await ss(a,g),x(t=>t.filter(r=>r.id!==a)),_(t=>{const r=new Map(t);return r.set(a,{running:!1,error:null}),r})}catch(t){const r=t instanceof Error?t.message:"Failed to dismiss insight";throw _(l=>{const f=new Map(l);return f.set(a,{running:!1,error:r}),f}),t}},[g]),oe=c.useCallback(async a=>{C(t=>{const r=new Map(t);return r.set(a,{running:!0,error:null}),r});try{const t=await ts(a,g);return await Ie(a,g),x(r=>r.map(l=>l.id===a?{...l,status:"archived",updatedAt:new Date().toISOString()}:l)),C(r=>{const l=new Map(r);return l.set(a,{running:!1,error:null}),l}),{title:t.suggestedTitle,description:t.suggestedDescription}}catch(t){const r=t instanceof Error?t.message:"Failed to create task";throw C(l=>{const f=new Map(l);return f.set(a,{running:!1,error:r}),f}),t}},[g]);c.useEffect(()=>{const a=new Map;for(const t of me)a.set(t,[]);for(const t of v){if(!O&&t.status==="archived")continue;const r=a.get(t.category)??[];a.set(t.category,[...r,t])}W(me.map(t=>({category:t,label:U(t),items:a.get(t)??[],isLoading:!1,error:null})))},[v,O,U]);const he=c.useCallback(async a=>{w(t=>{const r=new Map(t);return r.set(a,{running:!0,error:null}),r});try{await Ie(a,g),x(t=>t.map(r=>r.id===a?{...r,status:"archived",updatedAt:new Date().toISOString()}:r)),w(t=>{const r=new Map(t);return r.set(a,{running:!1,error:null}),r})}catch(t){const r=t instanceof Error?t.message:"Failed to archive insight";throw w(l=>{const f=new Map(l);return f.set(a,{running:!1,error:r}),f}),t}},[g]),ge=c.useCallback(async a=>{D(t=>{const r=new Map(t);return r.set(a,{running:!0,error:null}),r});try{await is(a,g),x(t=>t.map(r=>r.id===a?{...r,status:"confirmed",updatedAt:new Date().toISOString()}:r)),D(t=>{const r=new Map(t);return r.set(a,{running:!1,error:null}),r})}catch(t){const r=t instanceof Error?t.message:"Failed to unarchive insight";throw D(l=>{const f=new Map(l);return f.set(a,{running:!1,error:r}),f}),t}},[g]),b=c.useMemo(()=>T.reduce((a,t)=>a+t.items.length,0),[T]),q=c.useMemo(()=>0,[]),p=c.useMemo(()=>v.filter(a=>a.status==="archived").length,[v]);return c.useEffect(()=>{const a=ce(k,{maxAgeMs:we}),t=ce(S,{maxAgeMs:je}),r=Array.isArray(a)&&a.length>0;x(Array.isArray(a)?a:[]),z(t??null),L(!r),E.current=r},[k,S]),c.useEffect(()=>{R()},[R]),{sections:T,loading:Y,error:Q,latestRun:J,isRunInFlight:Z,runError:ee,refresh:R,runInsights:ie,dismiss:X,createTask:oe,archive:he,unarchive:ge,toggleShowArchived:y,dismissStates:se,createTaskStates:te,archiveStates:u,unarchiveStates:m,totalCount:b,dismissedCount:q,archivedCount:p,showArchived:O}}const Ge=["Backlog health:","Backlog pressure detected","Stale paused todo","Backlog health: dependency-blocked todos"];function Te(g){return Ge.some(d=>g.title.startsWith(d))}const Le={architecture:fs,quality:_e,workflow:Pe,performance:Ee,reliability:N,security:le,ux:Fe,testability:fe,documentation:hs,dependency:De,features:os,competitive_analysis:Fe,research:bs,trends:Ee,other:A};function Ms({projectId:g,addToast:d,onClose:G,onCreateTask:k,models:S}){const{t:s}=$e("app"),{sections:V,loading:E,error:U,latestRun:v,isRunInFlight:x,runError:T,refresh:W,runInsights:Y,dismiss:L,createTask:Q,archive:H=async()=>{},unarchive:J=async()=>{},toggleShowArchived:z=()=>{},dismissStates:Z,createTaskStates:B,archiveStates:ee=new Map,unarchiveStates:F=new Map,totalCount:se,archivedCount:_=0,showArchived:te=!1}=ys(g),[C,u]=c.useState(null),[w,m]=c.useState("info"),[D,O]=c.useState(!1),[j,R]=c.useState(!1),[y,ie]=c.useState(()=>localStorage.getItem("fusion-insight-model")??""),[X,oe]=c.useState(()=>localStorage.getItem("fusion-insight-thinking")??""),[he,ge]=c.useState([]),[b,q]=c.useState([]),[p,a]=c.useState([]),[t,r]=c.useState();c.useEffect(()=>{S||ns().then(i=>{ge(i.models),q(i.favoriteProviders),a(i.favoriteModels),r(i.resolvedPlanningProvider);const n=localStorage.getItem("fusion-insight-model");n&&(i.models.some(h=>`${h.provider}/${h.id}`===n)||(localStorage.removeItem("fusion-insight-model"),ie("")))}).catch(()=>{})},[S]);const l=S??he,f=c.useMemo(()=>b.length>0?b:t?[t]:[],[b,t]),ne=c.useCallback(async i=>{const o=b.includes(i)?b.filter(h=>h!==i):[i,...b];q(o);try{await Ae({favoriteProviders:o,favoriteModels:p})}catch{q(b)}},[b,p]),de=c.useCallback(async i=>{const o=p.includes(i)?p.filter(h=>h!==i):[i,...p];a(o);try{await Ae({favoriteProviders:b,favoriteModels:o})}catch{a(p)}},[p,b]),Ue=c.useCallback(i=>{ie(i),i?localStorage.setItem("fusion-insight-model",i):localStorage.removeItem("fusion-insight-model")},[]),He=c.useCallback(i=>{oe(i),i?localStorage.setItem("fusion-insight-thinking",i):localStorage.removeItem("fusion-insight-thinking")},[]),K=c.useMemo(()=>V.filter(i=>i.items.length>0),[V]),ve=c.useMemo(()=>K.reduce((i,n)=>i+n.items.filter(Te).length,0),[K]),M=c.useMemo(()=>j?K.map(i=>({...i,items:i.items.filter(Te)})).filter(i=>i.items.length>0):K,[K,j]),[P,ue]=c.useState(null);c.useEffect(()=>{if(M.length===0){P!==null&&ue(null);return}P&&M.some(n=>n.category===P&&n.items.length>0)||ue(M[0].category)},[M,P]);const I=c.useMemo(()=>M.find(i=>i.category===P)??M[0],[M,P]);c.useEffect(()=>{if(C){const i=setTimeout(()=>u(null),5e3);return()=>clearTimeout(i)}},[C]);const be=c.useCallback(async()=>{try{u(s("insights.generatingInsights","Generating insights...")),m("info");let i,n;if(y){const o=y.indexOf("/");if(o!==-1){const h=y.slice(0,o),ae=y.slice(o+1);h&&ae&&(i=h,n=ae)}}await Y(i,n,X||void 0),u(s("insights.generationStarted","Insight generation started")),m("success"),d(s("insights.generationStarted","Insight generation started"),"success")}catch(i){const n=i instanceof Error?i.message:s("insights.failedToStart","Failed to start generation");if(n==="Insight generation is already running"){u(s("insights.alreadyRunning","Insight generation is already running. Showing the active run.")),m("info"),d(s("insights.alreadyRunningShort","Insight generation is already running"),"info");return}u(n),m("error"),d(n,"error")}},[Y,d,y,X,s]),Be=c.useCallback(async(i,n)=>{try{u(s("insights.dismissing",'Dismissing "{{title}}"...',{title:n})),m("info"),await L(i),u(s("insights.dismissed",'Dismissed "{{title}}"',{title:n})),m("success"),d(s("insights.dismissedMsg","Insight dismissed: {{title}}",{title:n}),"success")}catch(o){const h=o instanceof Error?o.message:s("insights.failedToDismiss","Failed to dismiss insight");u(h),m("error"),d(h,"error")}},[L,d,s]),Oe=c.useCallback(async(i,n)=>{try{u(s("insights.archiving",'Archiving "{{title}}"...',{title:n})),m("info"),await H(i),u(s("insights.archived",'Archived "{{title}}"',{title:n})),m("success"),d(s("insights.archivedMsg","Insight archived: {{title}}",{title:n}),"success")}catch(o){const h=o instanceof Error?o.message:s("insights.failedToArchive","Failed to archive insight");u(h),m("error"),d(h,"error")}},[H,d,s]),Xe=c.useCallback(async(i,n)=>{try{u(s("insights.unarchiving",'Unarchiving "{{title}}"...',{title:n})),m("info"),await J(i),u(s("insights.unarchived",'Unarchived "{{title}}"',{title:n})),m("success"),d(s("insights.unarchivedMsg","Insight unarchived: {{title}}",{title:n}),"success")}catch(o){const h=o instanceof Error?o.message:s("insights.failedToUnarchive","Failed to unarchive insight");u(h),m("error"),d(h,"error")}},[J,d,s]),qe=c.useCallback(async(i,n)=>{try{if(u(s("insights.creatingTask",'Creating task from "{{title}}"...',{title:n})),m("info"),!k)throw new Error(s("insights.taskCreationUnavailable","Task creation is unavailable in this view"));const o=await Q(i);if(!o)throw new Error(s("insights.failedToPreparePayload","Failed to prepare task payload from insight"));await k({insightId:i,title:o.title,description:o.description}),u(s("insights.taskCreated",'Task created from "{{title}}"',{title:n})),m("success"),d(s("insights.taskCreatedMsg","Task created: {{title}}",{title:o.title}),"success")}catch(o){const h=o instanceof Error?o.message:s("insights.failedToCreateTask","Failed to create task");u(h),m("error"),d(h,"error")}},[Q,k,d,s]),Ke=i=>{const n=Le[i.category]??A,o=I?.category===i.category;return e.jsx("li",{children:e.jsxs("button",{type:"button",className:`insights-category-item${o?" insights-category-item--active":""}`,onClick:()=>ue(i.category),"aria-current":o?"true":void 0,"data-testid":`insights-category-${i.category}`,children:[e.jsx(n,{size:16,className:"insights-category-icon"}),e.jsx("span",{className:"insights-category-label",children:i.label}),e.jsx("span",{className:"insights-category-count",children:i.items.length})]})},i.category)},Ve=()=>{if(!I)return null;const i=Le[I.category]??A;return e.jsxs("section",{className:"insights-section","data-testid":`insights-section-${I.category}`,children:[e.jsx("div",{className:"insights-section-header",children:e.jsxs("div",{className:"insights-section-title",children:[e.jsx(i,{size:18,className:"insights-section-icon"}),e.jsx("h3",{children:I.label}),e.jsx("span",{className:"insights-section-count",children:I.items.length})]})}),e.jsx("div",{className:"insights-section-content",children:e.jsx("ul",{className:"insights-list",children:I.items.map(n=>{const o=Z.get(n.id),h=B.get(n.id),ae=ee.get(n.id),We=F.get(n.id),ye=o?.running??!1,xe=h?.running??!1,pe=ae?.running??!1,ke=We?.running??!1,Se=n.status==="archived",re=I.items.some($=>Z.get($.id)?.running||B.get($.id)?.running||ee.get($.id)?.running||F.get($.id)?.running);return e.jsxs("li",{className:`insight-item${Se?" insight-item--archived":""}`,"data-insight-id":n.id,draggable:us(),onDragStart:$=>{ds($.dataTransfer,{kind:"research-finding",id:n.id,projectId:g})},children:[e.jsxs("div",{className:"insight-item-header",children:[e.jsx("h4",{className:"insight-item-title",children:n.title}),e.jsxs("div",{className:"insight-item-actions",children:[Se?e.jsx("button",{className:"insight-item-action-btn",onClick:()=>void Xe(n.id,n.title),disabled:ke||re,title:s("insights.unarchiveTitle","Unarchive this insight"),"aria-label":s("insights.unarchiveLabel","Unarchive this insight"),"data-testid":`unarchive-${n.id}`,children:ke?e.jsx(N,{size:16,className:"spin"}):e.jsx(gs,{size:16})}):e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"insight-item-action-btn",onClick:()=>void qe(n.id,n.title),disabled:xe||re,title:s("insights.createTaskTitle","Create task from this insight"),"aria-label":s("insights.createTaskLabel","Create task from this insight"),"data-testid":`create-task-${n.id}`,children:xe?e.jsx(N,{size:16,className:"spin"}):e.jsx(De,{size:16})}),e.jsx("button",{className:"insight-item-action-btn",onClick:()=>void Oe(n.id,n.title),disabled:pe||re,title:s("insights.archiveTitle","Archive this insight"),"aria-label":s("insights.archiveLabel","Archive this insight"),"data-testid":`archive-${n.id}`,children:pe?e.jsx(N,{size:16,className:"spin"}):e.jsx(fe,{size:16})})]}),e.jsx("button",{className:"insight-item-action-btn",onClick:()=>void Be(n.id,n.title),disabled:ye||re,title:s("insights.dismissTitle","Dismiss this insight"),"aria-label":s("insights.dismissLabel","Dismiss this insight"),"data-testid":`dismiss-${n.id}`,children:ye?e.jsx(N,{size:16,className:"spin"}):e.jsx(Ne,{size:16})})]})]}),n.content&&e.jsx("p",{className:"insight-item-content",children:n.content}),e.jsxs("div",{className:"insight-item-meta",children:[e.jsx("span",{className:`insight-item-status insight-item-status--${n.status}`,children:n.status}),n.createdAt&&e.jsxs("span",{className:"insight-item-date",children:[e.jsx(Pe,{size:12}),new Date(n.createdAt).toLocaleDateString()]})]})]},n.id)})})})]})};return e.jsxs("div",{className:"insights-view","data-testid":"insights-view",children:[e.jsx(as,{icon:A,title:s("insights.title","Insights"),actions:e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"insights-view-count",children:[se," ",s("common.total","total")]}),ve>0&&e.jsxs("button",{className:`btn btn-sm insights-backlog-health-toggle${j?" btn-icon--active":""}`,onClick:()=>R(i=>!i),"aria-pressed":j,"aria-label":j?s("insights.showAllInsights","Show all insights"):s("insights.showBacklogHealth","Show only backlog health insights"),"data-testid":"toggle-backlog-health",title:Ge.join(", "),children:[e.jsx(rs,{size:14}),j?s("insights.allInsights","All Insights"):s("insights.backlogHealth","Backlog")," ",e.jsxs("span",{children:["(",ve,")"]})]}),G&&e.jsx("button",{className:"btn btn-sm insights-view-close",onClick:G,"aria-label":s("actions.closeInsightsView","Close insights view"),title:s("actions.close","Close"),children:e.jsx(Ne,{size:16})}),_>0&&e.jsxs("button",{className:"btn btn-sm insights-show-archived-toggle",onClick:z,"aria-label":te?s("insights.hideArchived","Hide archived insights"):s("insights.showArchived","Show archived insights"),"data-testid":"toggle-archived-insights",children:[e.jsx(fe,{size:14}),te?s("insights.hideArchivedLabel","Archived"):s("insights.showArchivedLabel","Archived ({{count}})",{count:_})]}),e.jsx("button",{className:"btn btn-icon btn-sm insights-refresh-btn",onClick:()=>void W(),disabled:E,"aria-label":s("actions.refreshInsights","Refresh insights"),title:s("actions.refreshInsights","Refresh insights"),"data-testid":"refresh-insights",children:e.jsx(N,{size:14,className:E?"spin":""})}),e.jsxs("button",{className:"btn btn-sm insights-model-toggle",onClick:()=>O(i=>!i),"aria-label":s("insights.configureModel","Configure insight generation model"),"aria-expanded":D,"data-testid":"toggle-model-config",title:y?s("insights.modelConfigured","Model: {{model}}",{model:y}):s("insights.configureModelTitle","Configure model"),children:[e.jsx(cs,{size:14}),y&&e.jsx("span",{className:"insights-model-indicator"})]}),e.jsx("button",{className:"btn btn-primary btn-sm",onClick:()=>void be(),disabled:x,"aria-label":s("insights.generateInsights","Generate new insights"),"data-testid":"run-insights",children:x?e.jsxs(e.Fragment,{children:[e.jsx(N,{size:14,className:"spin"}),s("insights.generating","Generating...")]}):e.jsxs(e.Fragment,{children:[e.jsx(A,{size:14}),s("insights.generateInsightsBtn","Generate Insights")]})})]})}),D&&e.jsxs("div",{className:"insights-model-config","data-testid":"model-config",children:[e.jsx("label",{htmlFor:"insight-model-select",className:"insights-model-label",children:s("insights.model","Model")}),e.jsx(ls,{models:l,value:y,onChange:Ue,placeholder:s("insights.usePlanningDefault","Use planning default"),label:s("insights.generationModel","Insight generation model"),disabled:x,id:"insight-model-select",favoriteProviders:f,favoriteModels:p,onToggleFavorite:ne,onToggleModelFavorite:de,showThinkingLevel:!0,thinkingLevel:X,onThinkingLevelChange:He,defaultThinkingLevel:"off"})]}),e.jsx("div",{className:"insights-status-region","aria-live":"polite","data-testid":"insights-status",children:C&&e.jsxs("div",{className:`insights-status-message insights-status-message--${w}`,role:w==="error"?"alert":void 0,children:[w==="success"&&e.jsx(_e,{size:16}),w==="error"&&e.jsx(le,{size:16}),w==="info"&&e.jsx(A,{size:16}),e.jsx("span",{children:C})]})}),T&&e.jsxs("div",{className:"insights-error-callout",role:"alert","data-testid":"run-error",children:[e.jsx(le,{size:16}),e.jsx("span",{children:T})]}),v&&e.jsx("div",{className:"insights-run-info","data-testid":"latest-run",children:e.jsxs("span",{className:"insights-run-status",children:[s("insights.latestRun","Latest run:")," ",v.status,v.status==="completed"&&e.jsxs(e.Fragment,{children:[" — ",s("insights.runCompleted","{{created}} created, {{updated}} updated",{created:v.insightsCreated,updated:v.insightsUpdated})]}),v.status==="failed"&&v.error&&e.jsxs(e.Fragment,{children:[" — ",v.error]})]})}),E?e.jsxs("div",{className:"insights-loading","data-testid":"insights-loading",children:[e.jsx(N,{size:24,className:"spin"}),e.jsx("p",{children:s("insights.loading","Loading insights...")})]}):U?e.jsxs("div",{className:"insights-error","data-testid":"insights-error",children:[e.jsx(le,{size:24}),e.jsx("p",{children:U}),e.jsx("button",{className:"btn btn-sm",onClick:()=>void W(),children:s("actions.retry","Retry")})]}):se===0?e.jsxs("div",{className:"insights-empty","data-testid":"insights-empty",children:[e.jsx(A,{size:48}),e.jsx("h3",{children:s("insights.noInsightsYet","No insights yet")}),e.jsx("p",{children:s("insights.generateDescription","Generate insights to get AI-powered recommendations for your project.")}),e.jsxs("button",{className:"btn btn-primary",onClick:()=>void be(),children:[e.jsx(A,{size:14}),s("insights.generateFirst","Generate First Insights")]})]}):e.jsxs("div",{className:"insights-body",children:[e.jsx("aside",{className:"insights-sidebar","aria-label":s("insights.categoriesLabel","Insight categories"),children:e.jsx("ul",{className:"insights-category-list",children:M.map(Ke)})}),e.jsx("div",{className:"insights-detail",children:Ve()})]})]})}export{Ms as InsightsView};