@yancyyu/openhermit 1.6.41 → 1.6.43

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 (281) hide show
  1. package/README.md +98 -89
  2. package/bin/hermit.mjs +96 -0
  3. package/dist-renderer/assets/{ProjectEditorOverlay-Br0X83Jf.js → ProjectEditorOverlay-C98qSs7-.js} +1 -1
  4. package/dist-renderer/assets/{TeamGraphOverlay-DHMTbZPZ.js → TeamGraphOverlay-CsBbZwcL.js} +1 -1
  5. package/dist-renderer/assets/{_basePickBy-DzIiX7yH.js → _basePickBy-ZOyLWjMK.js} +1 -1
  6. package/dist-renderer/assets/{_baseUniq-6hZuzTLU.js → _baseUniq-DBb726rt.js} +1 -1
  7. package/dist-renderer/assets/{arc-CXgO6fx_.js → arc-CdiTaR_R.js} +1 -1
  8. package/dist-renderer/assets/{architectureDiagram-VXUJARFQ-DKWgtDHr.js → architectureDiagram-VXUJARFQ-Cz3sc5TH.js} +1 -1
  9. package/dist-renderer/assets/{blockDiagram-VD42YOAC-DOMUcC40.js → blockDiagram-VD42YOAC-DE4c-KJ3.js} +1 -1
  10. package/dist-renderer/assets/{c4Diagram-YG6GDRKO-B_k2L7qX.js → c4Diagram-YG6GDRKO-CmTMDTrV.js} +1 -1
  11. package/dist-renderer/assets/channel-KTpqi9eT.js +1 -0
  12. package/dist-renderer/assets/{chunk-4BX2VUAB-BeD_ccFy.js → chunk-4BX2VUAB-rhHy3tFl.js} +1 -1
  13. package/dist-renderer/assets/{chunk-55IACEB6-ClZfkA5w.js → chunk-55IACEB6-fLZBzuo_.js} +1 -1
  14. package/dist-renderer/assets/{chunk-B4BG7PRW-5XluxXsn.js → chunk-B4BG7PRW-DOzxQhim.js} +1 -1
  15. package/dist-renderer/assets/{chunk-DI55MBZ5-BzIjjNVm.js → chunk-DI55MBZ5-COQCcXC5.js} +1 -1
  16. package/dist-renderer/assets/{chunk-FMBD7UC4-HgH3MK_H.js → chunk-FMBD7UC4-IKU9U_Y4.js} +1 -1
  17. package/dist-renderer/assets/{chunk-QN33PNHL-WeC5T3Ba.js → chunk-QN33PNHL-D6WV154X.js} +1 -1
  18. package/dist-renderer/assets/{chunk-QZHKN3VN-Cu1ApHfW.js → chunk-QZHKN3VN-D90_2DQp.js} +1 -1
  19. package/dist-renderer/assets/{chunk-TZMSLE5B-BOhlynJM.js → chunk-TZMSLE5B-BQEil57G.js} +1 -1
  20. package/dist-renderer/assets/classDiagram-2ON5EDUG-lpzulY5X.js +1 -0
  21. package/dist-renderer/assets/classDiagram-v2-WZHVMYZB-lpzulY5X.js +1 -0
  22. package/dist-renderer/assets/clone-CriGymY9.js +1 -0
  23. package/dist-renderer/assets/{cose-bilkent-S5V4N54A-DGZSihDQ.js → cose-bilkent-S5V4N54A-6WiK6U2P.js} +1 -1
  24. package/dist-renderer/assets/{dagre-6UL2VRFP-CnxwCbku.js → dagre-6UL2VRFP-DF4MMuTn.js} +1 -1
  25. package/dist-renderer/assets/{diagram-PSM6KHXK-DsIhoxdI.js → diagram-PSM6KHXK-CcF1eZ7E.js} +1 -1
  26. package/dist-renderer/assets/{diagram-QEK2KX5R-Cmh9KUF5.js → diagram-QEK2KX5R-DYlOVPQB.js} +1 -1
  27. package/dist-renderer/assets/{diagram-S2PKOQOG-CKxV456A.js → diagram-S2PKOQOG-BHXWsZOP.js} +1 -1
  28. package/dist-renderer/assets/{erDiagram-Q2GNP2WA-EnvYjOjc.js → erDiagram-Q2GNP2WA-GjmuBx8d.js} +1 -1
  29. package/dist-renderer/assets/{flowDiagram-NV44I4VS-BmNeWY_A.js → flowDiagram-NV44I4VS-BuS7YVHk.js} +1 -1
  30. package/dist-renderer/assets/{ganttDiagram-JELNMOA3-D30fyK-u.js → ganttDiagram-JELNMOA3-3Teu5tAa.js} +1 -1
  31. package/dist-renderer/assets/{gitGraphDiagram-V2S2FVAM-CrUNiYg1.js → gitGraphDiagram-V2S2FVAM-BiLdCYu5.js} +1 -1
  32. package/dist-renderer/assets/{graph-CY1gTfTb.js → graph-CDP_R8ct.js} +1 -1
  33. package/dist-renderer/assets/{index-CaEbzwAU.js → index-BSZdT-g-.js} +1 -1
  34. package/dist-renderer/assets/{index-D5K-SjBG.js → index-BhWvMqsz.js} +1 -1
  35. package/dist-renderer/assets/{index-9_hO4N1e.js → index-C2_AupSj.js} +1 -1
  36. package/dist-renderer/assets/{index-59r209c1.js → index-C5ujiwAR.js} +580 -588
  37. package/dist-renderer/assets/index-CIS2CTK9.css +1 -0
  38. package/dist-renderer/assets/{index-DMR9B1UP.js → index-CVNjLwkq.js} +1 -1
  39. package/dist-renderer/assets/{index-BC2hXmg_.js → index-CwG3se0q.js} +1 -1
  40. package/dist-renderer/assets/{infoDiagram-HS3SLOUP-By_XUlcD.js → infoDiagram-HS3SLOUP-DLHUFo72.js} +1 -1
  41. package/dist-renderer/assets/{journeyDiagram-XKPGCS4Q-BM1LJE9m.js → journeyDiagram-XKPGCS4Q-BE07RpJD.js} +1 -1
  42. package/dist-renderer/assets/{kanban-definition-3W4ZIXB7-DHIW3aTA.js → kanban-definition-3W4ZIXB7-DDHZy4NB.js} +1 -1
  43. package/dist-renderer/assets/{layout-DAKiL_Mo.js → layout-5nA5wUxO.js} +1 -1
  44. package/dist-renderer/assets/{linear-DwOaRYea.js → linear-BtF1i2qN.js} +1 -1
  45. package/dist-renderer/assets/{mindmap-definition-VGOIOE7T-b7bJ2cha.js → mindmap-definition-VGOIOE7T-Z1Ui9Sqy.js} +1 -1
  46. package/dist-renderer/assets/{pieDiagram-ADFJNKIX-DxyL9Zr2.js → pieDiagram-ADFJNKIX-LCjxckWv.js} +1 -1
  47. package/dist-renderer/assets/{quadrantDiagram-AYHSOK5B-CR33pHlF.js → quadrantDiagram-AYHSOK5B-BOwKjSco.js} +1 -1
  48. package/dist-renderer/assets/{requirementDiagram-UZGBJVZJ-BAiSRSlh.js → requirementDiagram-UZGBJVZJ-pChP8Znd.js} +1 -1
  49. package/dist-renderer/assets/{sankeyDiagram-TZEHDZUN-C8JmDjoa.js → sankeyDiagram-TZEHDZUN-DifZ2qpo.js} +1 -1
  50. package/dist-renderer/assets/{sequenceDiagram-WL72ISMW-c1d0Wi1m.js → sequenceDiagram-WL72ISMW-CJg-WYyY.js} +1 -1
  51. package/dist-renderer/assets/{splashScene-D0YB9uxm.js → splashScene-94xWCzLA.js} +1 -1
  52. package/dist-renderer/assets/{stateDiagram-FKZM4ZOC-nT8BiH2O.js → stateDiagram-FKZM4ZOC-DWHOoFdv.js} +1 -1
  53. package/dist-renderer/assets/stateDiagram-v2-4FDKWEC3-CGYZOoMb.js +1 -0
  54. package/dist-renderer/assets/{timeline-definition-IT6M3QCI-DpoRepUA.js → timeline-definition-IT6M3QCI-CPgokIo8.js} +1 -1
  55. package/dist-renderer/assets/{treemap-GDKQZRPO-C41UJeIH.js → treemap-GDKQZRPO-DAVqSR9L.js} +1 -1
  56. package/dist-renderer/assets/{xychartDiagram-PRI3JC2R-KMjGARKN.js → xychartDiagram-PRI3JC2R-CCOcGbrD.js} +1 -1
  57. package/dist-renderer/chat-community-qr.jpg +0 -0
  58. package/dist-renderer/fonts/Agave-Bold.ttf +0 -0
  59. package/dist-renderer/fonts/Agave-Regular.ttf +0 -0
  60. package/dist-renderer/icon.png +0 -0
  61. package/dist-renderer/icon.rar +0 -0
  62. package/dist-renderer/index.html +3 -3
  63. package/package.json +21 -26
  64. package/src/features/worker-society/core/application/WorkerSocietyService.test.ts +802 -0
  65. package/src/features/worker-society/core/application/WorkerSocietyService.ts +428 -0
  66. package/src/features/worker-society/core/application/fakes.ts +101 -0
  67. package/src/features/worker-society/core/application/ports.ts +70 -0
  68. package/src/features/worker-society/core/domain/models/society.ts +141 -0
  69. package/src/features/worker-society/core/domain/policies/societyPolicies.test.ts +739 -0
  70. package/src/features/worker-society/core/domain/policies/societyPolicies.ts +496 -0
  71. package/src/features/worker-society/main/adapters/input/societyMcp.test.ts +317 -0
  72. package/src/features/worker-society/main/adapters/input/societyMcp.ts +257 -0
  73. package/src/features/worker-society/main/adapters/input/societyRoutes.test.ts +695 -0
  74. package/src/features/worker-society/main/adapters/input/societyRoutes.ts +194 -0
  75. package/src/features/worker-society/main/composition/societyComposition.test.ts +74 -0
  76. package/src/features/worker-society/main/composition/societyComposition.ts +70 -0
  77. package/src/features/worker-society/main/composition/workerSocietyPlugin.test.ts +69 -0
  78. package/src/features/worker-society/main/composition/workerSocietyPlugin.ts +67 -0
  79. package/src/features/worker-society/main/infrastructure/crossTeamMessageGateway.test.ts +132 -0
  80. package/src/features/worker-society/main/infrastructure/crossTeamMessageGateway.ts +84 -0
  81. package/src/features/worker-society/main/infrastructure/fsStores.test.ts +216 -0
  82. package/src/features/worker-society/main/infrastructure/fsStores.ts +113 -0
  83. package/src/features/worker-society/main/infrastructure/mergingProfileStore.test.ts +195 -0
  84. package/src/features/worker-society/main/infrastructure/mergingProfileStore.ts +96 -0
  85. package/src/features/worker-society/renderer/SocietyGraph.tsx +166 -0
  86. package/src/features/worker-society/renderer/SocietyNodeLabels.tsx +139 -0
  87. package/src/features/worker-society/renderer/SocietyNodeOverlay.tsx +339 -0
  88. package/src/features/worker-society/renderer/SocietyView.tsx +437 -0
  89. package/src/features/worker-society/renderer/index.ts +11 -0
  90. package/src/features/worker-society/renderer/societyApi.test.ts +259 -0
  91. package/src/features/worker-society/renderer/societyApi.ts +144 -0
  92. package/src/features/worker-society/renderer/societyGraphAdapter.test.ts +321 -0
  93. package/src/features/worker-society/renderer/societyGraphAdapter.ts +240 -0
  94. package/src/features/worker-society/renderer/societyOverlayActions.test.ts +57 -0
  95. package/src/features/worker-society/renderer/societyOverlayActions.ts +49 -0
  96. package/src/features/worker-society/renderer/societyStore.test.ts +218 -0
  97. package/src/features/worker-society/renderer/societyStore.ts +146 -0
  98. package/src/features/worker-society/renderer/societyViewUtils.test.ts +81 -0
  99. package/src/features/worker-society/renderer/societyViewUtils.ts +68 -0
  100. package/src/main/ipc/extensions.ts +27 -0
  101. package/src/main/server.ts +1731 -539
  102. package/src/main/services/ccConnect/CcConnectBridge.ts +26 -11
  103. package/src/main/services/ccConnect/CcConnectClient.ts +9 -2
  104. package/src/main/services/ccConnect/workDirReconcile.test.ts +57 -0
  105. package/src/main/services/ccConnect/workDirReconcile.ts +36 -0
  106. package/src/main/services/direct-cli/DirectCliSessionManager.test.ts +397 -0
  107. package/src/main/services/direct-cli/DirectCliSessionManager.ts +508 -0
  108. package/src/main/services/direct-cli/DirectCliSessionStore.test.ts +79 -0
  109. package/src/main/services/direct-cli/DirectCliSessionStore.ts +97 -0
  110. package/src/main/services/direct-cli/__tests__/directCliMessageId.test.ts +40 -0
  111. package/src/main/services/direct-cli/directCliMessageId.ts +21 -0
  112. package/src/main/services/direct-cli/index.ts +17 -0
  113. package/src/main/services/extensions/capability-packs/CapabilityPackLoaderService.ts +637 -0
  114. package/src/main/services/extensions/catalog/PluginCatalogService.ts +2 -2
  115. package/src/main/services/loop-assets/LoopAssetsScannerService.ts +657 -0
  116. package/src/main/services/runtime/providerAwareCliEnv.ts +33 -5
  117. package/src/main/services/session-intelligence/LocalSessionScanner.ts +156 -71
  118. package/src/main/services/session-intelligence/SessionUsageParser.ts +103 -8
  119. package/src/main/services/session-intelligence/UsageTelemetryService.ts +11 -0
  120. package/src/main/services/session-intelligence/__tests__/teamSessionListMapper.test.ts +104 -0
  121. package/src/main/services/session-intelligence/teamSessionListMapper.ts +78 -0
  122. package/src/main/services/system-manager/AdminLoopInitializer.ts +95 -0
  123. package/src/main/services/system-manager/BuiltinWorkflowSeeder.ts +744 -0
  124. package/src/main/services/system-manager/SystemManagerConfigService.ts +19 -1
  125. package/src/main/services/system-manager/WorkflowPromptService.ts +58 -5
  126. package/src/main/services/system-manager/__tests__/AdminLoopInitializer.test.ts +129 -0
  127. package/src/main/services/system-manager/__tests__/SystemManagerConfigService.test.ts +60 -0
  128. package/src/main/services/teams-mvp/CollaborationBoardService.ts +2 -0
  129. package/src/main/services/teams-mvp/OpsRunbookContext.ts +60 -0
  130. package/src/main/services/teams-mvp/TaskDispatchService.test.ts +305 -0
  131. package/src/main/services/teams-mvp/TaskDispatchService.ts +250 -131
  132. package/src/main/services/teams-mvp/TeamProvisioningService.ts +12 -2
  133. package/src/main/services/teams-mvp/TeamWorkspaceService.test.ts +207 -0
  134. package/src/main/services/teams-mvp/TeamWorkspaceService.ts +104 -51
  135. package/src/main/services/teams-mvp/index.ts +6 -0
  136. package/src/main/utils/externalPlatformSessionRouting.ts +92 -0
  137. package/src/main/utils/toolApprovalRules.ts +151 -0
  138. package/src/renderer/App.tsx +24 -89
  139. package/src/renderer/api/httpClient.ts +132 -52
  140. package/src/renderer/api/providers.ts +5 -16
  141. package/src/renderer/components/chat/CommunityChatView.tsx +81 -0
  142. package/src/renderer/components/dashboard/DashboardView.tsx +130 -84
  143. package/src/renderer/components/extensions/ExtensionStoreView.tsx +39 -5
  144. package/src/renderer/components/extensions/ExtensionsSubTabTrigger.tsx +2 -1
  145. package/src/renderer/components/extensions/capability-packs/CapabilityPacksPanel.tsx +170 -0
  146. package/src/renderer/components/layout/PaneContent.tsx +10 -2
  147. package/src/renderer/components/layout/SortableTab.tsx +4 -0
  148. package/src/renderer/components/layout/TabBarActions.tsx +13 -16
  149. package/src/renderer/components/runtime/ProviderRuntimeSettingsDialog.tsx +4 -135
  150. package/src/renderer/components/schedules/SchedulesView.tsx +22 -14
  151. package/src/renderer/components/schedules/calendar/CalendarEventBlock.tsx +7 -6
  152. package/src/renderer/components/settings/SettingsTabs.tsx +24 -21
  153. package/src/renderer/components/settings/SettingsView.tsx +22 -13
  154. package/src/renderer/components/settings/components/SettingRow.tsx +13 -5
  155. package/src/renderer/components/settings/components/SettingsSectionCard.tsx +53 -0
  156. package/src/renderer/components/settings/components/SettingsSectionHeader.tsx +10 -6
  157. package/src/renderer/components/settings/components/SettingsSelect.tsx +12 -9
  158. package/src/renderer/components/settings/components/SettingsToggle.tsx +6 -5
  159. package/src/renderer/components/settings/components/index.ts +1 -0
  160. package/src/renderer/components/settings/sections/AdvancedSection.tsx +78 -59
  161. package/src/renderer/components/settings/sections/CliStatusSection.tsx +32 -44
  162. package/src/renderer/components/settings/sections/ConfigEditorDialog.tsx +1 -1
  163. package/src/renderer/components/settings/sections/GeneralSection.tsx +216 -186
  164. package/src/renderer/components/settings/sections/PlatformsSection.tsx +25 -17
  165. package/src/renderer/components/settings/sections/TaskBusSection.tsx +63 -22
  166. package/src/renderer/components/sidebar/SidebarSessions.tsx +120 -80
  167. package/src/renderer/components/sidebar/SidebarTaskItem.tsx +1 -1
  168. package/src/renderer/components/splash/splashScene.ts +6 -2
  169. package/src/renderer/components/system-manager/SystemManagerView.tsx +169 -255
  170. package/src/renderer/components/tasks/TasksView.tsx +63 -37
  171. package/src/renderer/components/team/CcSessionsSection.tsx +124 -89
  172. package/src/renderer/components/team/HarnessBrandLogos.tsx +318 -0
  173. package/src/renderer/components/team/HarnessSelect.tsx +25 -26
  174. package/src/renderer/components/team/TeamDetailView.tsx +137 -153
  175. package/src/renderer/components/team/TeamEmptyState.tsx +9 -37
  176. package/src/renderer/components/team/TeamListView.tsx +144 -30
  177. package/src/renderer/components/team/__tests__/CcSessionsSection.hasLocalFile.test.tsx +128 -0
  178. package/src/renderer/components/team/activity/ActivityItem.tsx +21 -9
  179. package/src/renderer/components/team/activity/ActivityTimeline.tsx +2 -2
  180. package/src/renderer/components/team/dialogs/AdvancedCliSection.tsx +1 -1
  181. package/src/renderer/components/team/dialogs/CreateTaskDialog.tsx +13 -10
  182. package/src/renderer/components/team/dialogs/CreateTeamDialog.tsx +189 -57
  183. package/src/renderer/components/team/dialogs/EditTeamDialog.tsx +9 -157
  184. package/src/renderer/components/team/dialogs/LaunchTeamDialog.tsx +19 -15
  185. package/src/renderer/components/team/dialogs/PlatformBindingDialog.tsx +48 -10
  186. package/src/renderer/components/team/dialogs/PlatformManualForm.tsx +11 -12
  187. package/src/renderer/components/team/dialogs/PlatformSetupQR.tsx +39 -37
  188. package/src/renderer/components/team/dialogs/RuntimeConfigDialog.tsx +434 -64
  189. package/src/renderer/components/team/dialogs/SendMessageDialog.tsx +12 -10
  190. package/src/renderer/components/team/dialogs/TaskDetailDialog.tsx +2 -2
  191. package/src/renderer/components/team/dialogs/__tests__/CreateTeamDialog.bindProject.test.tsx +399 -0
  192. package/src/renderer/components/team/dialogs/__tests__/CreateTeamDialog.chineseRepro.test.tsx +253 -0
  193. package/src/renderer/components/team/dialogs/platformAllowUtils.ts +91 -0
  194. package/src/renderer/components/team/dialogs/teammateRuntimeCompatibility.tsx +1 -1
  195. package/src/renderer/components/team/kanban/KanbanTaskCard.test.tsx +41 -0
  196. package/src/renderer/components/team/kanban/KanbanTaskCard.tsx +41 -86
  197. package/src/renderer/components/team/loop-console/LoopCommandComposer.tsx +310 -0
  198. package/src/renderer/components/team/loop-console/LoopConsolePanel.tsx +372 -0
  199. package/src/renderer/components/team/loop-console/loopSendIntent.test.ts +85 -0
  200. package/src/renderer/components/team/loop-console/loopSendIntent.ts +221 -0
  201. package/src/renderer/components/team/loop-console/useLeadSessionToolActivity.ts +74 -0
  202. package/src/renderer/components/team/loop-console/useLoopCommandSuggestions.ts +165 -0
  203. package/src/renderer/components/team/loop-console/useLoopConsoleController.ts +266 -0
  204. package/src/renderer/components/team/members/LeadModelRow.test.tsx +1 -1
  205. package/src/renderer/components/team/members/LeadModelRow.tsx +5 -3
  206. package/src/renderer/components/team/members/MemberDetailDialog.tsx +11 -0
  207. package/src/renderer/components/team/members/MemberDetailStats.tsx +13 -3
  208. package/src/renderer/components/team/members/MemberDraftRow.test.tsx +1 -1
  209. package/src/renderer/components/team/members/MemberDraftRow.tsx +1 -1
  210. package/src/renderer/components/team/members/MemberMessagesTab.tsx +2 -2
  211. package/src/renderer/components/team/members/MemberStatsTab.tsx +1 -1
  212. package/src/renderer/components/team/messages/MessageComposer.tsx +150 -44
  213. package/src/renderer/components/team/messages/MessagesFilterPopover.tsx +2 -2
  214. package/src/renderer/components/team/messages/MessagesPanel.tsx +34 -28
  215. package/src/renderer/components/team/schedule/CcCronScheduleDialog.tsx +6 -6
  216. package/src/renderer/components/team/taskLogs/ExactTaskLogCard.tsx +2 -2
  217. package/src/renderer/components/team/taskLogs/TaskLogStreamSection.tsx +1 -1
  218. package/src/renderer/components/terminal/TerminalPanel.tsx +2 -3
  219. package/src/renderer/components/ui/MentionableTextarea.tsx +5 -1
  220. package/src/renderer/constants/teamColors.ts +5 -5
  221. package/src/renderer/hooks/useExtensionsTabState.ts +1 -1
  222. package/src/renderer/hooks/useMentionDetection.ts +5 -1
  223. package/src/renderer/hooks/useProjectWorkflowCommands.ts +57 -0
  224. package/src/renderer/hooks/useTeamSuggestions.ts +2 -0
  225. package/src/renderer/index.css +19 -2
  226. package/src/renderer/main.tsx +7 -1
  227. package/src/renderer/store/index.ts +18 -1
  228. package/src/renderer/store/slices/extensionsSlice.ts +83 -0
  229. package/src/renderer/store/slices/tabSlice.ts +61 -0
  230. package/src/renderer/store/slices/teamSlice.ts +138 -9
  231. package/src/renderer/types/mention.ts +8 -0
  232. package/src/renderer/types/tabs.ts +3 -1
  233. package/src/renderer/utils/__tests__/bindProjectSlug.test.ts +69 -0
  234. package/src/renderer/utils/__tests__/groupTransformer.test.ts +148 -0
  235. package/src/renderer/utils/__tests__/initialRoute.test.ts +101 -0
  236. package/src/renderer/utils/__tests__/leadToolActivity.test.ts +124 -0
  237. package/src/renderer/utils/__tests__/mergeTeamMessages.test.ts +81 -0
  238. package/src/renderer/utils/__tests__/teamMessageFiltering.test.ts +213 -0
  239. package/src/renderer/utils/__tests__/teamMessageKey.test.ts +75 -0
  240. package/src/renderer/utils/__tests__/workflowCommandExecution.test.ts +173 -0
  241. package/src/renderer/utils/__tests__/workflowCommandSuggestions.test.ts +59 -0
  242. package/src/renderer/utils/bindProjectSlug.ts +57 -0
  243. package/src/renderer/utils/capabilityCommandExecution.ts +113 -0
  244. package/src/renderer/utils/initialRoute.ts +89 -0
  245. package/src/renderer/utils/leadToolActivity.ts +117 -0
  246. package/src/renderer/utils/loopShortcutSuggestions.ts +106 -0
  247. package/src/renderer/utils/mentionSuggestions.ts +1 -1
  248. package/src/renderer/utils/slashCommandRegistry.ts +231 -0
  249. package/src/renderer/utils/teamMentionDirective.ts +31 -0
  250. package/src/renderer/utils/workflowCommandExecution.ts +96 -0
  251. package/src/renderer/utils/workflowCommandSuggestions.ts +49 -0
  252. package/src/shared/types/api.ts +79 -4
  253. package/src/shared/types/ccConnect.ts +1 -0
  254. package/src/shared/types/extensions/api.ts +19 -0
  255. package/src/shared/types/extensions/capabilityPack.ts +118 -0
  256. package/src/shared/types/extensions/index.ts +29 -1
  257. package/src/shared/types/index.ts +6 -0
  258. package/src/shared/types/loopAssets.ts +54 -0
  259. package/src/shared/types/providers.ts +0 -16
  260. package/src/shared/types/systemManager.ts +26 -1
  261. package/src/shared/types/team.ts +43 -3
  262. package/src/shared/types/terminal.ts +2 -36
  263. package/src/shared/types/worker.test.ts +28 -0
  264. package/src/shared/types/worker.ts +3 -0
  265. package/src/shared/utils/__tests__/effortLevels.test.ts +88 -0
  266. package/src/shared/utils/__tests__/providerBackend.test.ts +88 -0
  267. package/src/shared/utils/__tests__/providerLaunchArgs.test.ts +220 -0
  268. package/src/shared/utils/claudeStreamJson.test.ts +187 -0
  269. package/src/shared/utils/claudeStreamJson.ts +153 -0
  270. package/src/shared/utils/providerLaunchArgs.ts +217 -0
  271. package/src/shared/utils/slashCommands.ts +10 -0
  272. package/src/types/node-pty.d.ts +8 -0
  273. package/dist-renderer/assets/channel-D0XS_akr.js +0 -1
  274. package/dist-renderer/assets/classDiagram-2ON5EDUG-D13Ffs0U.js +0 -1
  275. package/dist-renderer/assets/classDiagram-v2-WZHVMYZB-D13Ffs0U.js +0 -1
  276. package/dist-renderer/assets/clone-B1ZrxI1D.js +0 -1
  277. package/dist-renderer/assets/index-iyjkpSus.css +0 -32
  278. package/dist-renderer/assets/stateDiagram-v2-4FDKWEC3-Dmibmlso.js +0 -1
  279. package/src/main/services/system-manager/SystemManagerPtyService.ts +0 -233
  280. package/src/renderer/components/common/TerminalPane.tsx +0 -213
  281. package/src/renderer/components/team/dialogs/useTeamEditForm.ts +0 -292
@@ -0,0 +1,231 @@
1
+ import { KNOWN_SLASH_COMMANDS, isSupportedSlashCommandName } from '@shared/utils/slashCommands';
2
+
3
+ import type { MentionSuggestion } from '@renderer/types/mention';
4
+ import type {
5
+ CapabilityCommand,
6
+ CapabilityScope,
7
+ LoadedCapabilityPack,
8
+ RegisteredSlashCommand,
9
+ SlashCommandResolveResult,
10
+ SlashCommandSource,
11
+ } from '@shared/types/extensions';
12
+
13
+ export const RESERVED_SLASH_COMMANDS = new Set([
14
+ ...KNOWN_SLASH_COMMANDS.map((command) => command.name.toLowerCase()),
15
+ 'help',
16
+ 'settings',
17
+ 'permissions',
18
+ 'login',
19
+ 'logout',
20
+ 'mcp',
21
+ 'agents',
22
+ 'hooks',
23
+ 'memory',
24
+ ]);
25
+
26
+ interface SlashRegistryInput {
27
+ packs?: readonly LoadedCapabilityPack[];
28
+ scope?: CapabilityScope;
29
+ }
30
+
31
+ function normalizeAlias(alias: string): string {
32
+ return alias.trim().replace(/^\//, '').toLowerCase();
33
+ }
34
+
35
+ function normalizeNamespace(namespace: string): string {
36
+ return namespace.trim().replace(/^\//, '').toLowerCase();
37
+ }
38
+
39
+ function isRegistryToken(value: string): boolean {
40
+ return isSupportedSlashCommandName(value) && !value.includes(':');
41
+ }
42
+
43
+ function commandAppliesToScope(command: CapabilityCommand, scope?: CapabilityScope): boolean {
44
+ if (!scope) return true;
45
+ return command.scope.includes(scope);
46
+ }
47
+
48
+ function commandSupportsSlash(command: CapabilityCommand): boolean {
49
+ return command.surfaces.includes('slash');
50
+ }
51
+
52
+ interface SlashCommandSuggestionOptions {
53
+ forceNamespacedAliases?: ReadonlySet<string>;
54
+ }
55
+
56
+ function shouldUseNamespacedSlash(
57
+ command: RegisteredSlashCommand,
58
+ options: SlashCommandSuggestionOptions = {}
59
+ ): boolean {
60
+ return (
61
+ RESERVED_SLASH_COMMANDS.has(command.alias) ||
62
+ options.forceNamespacedAliases?.has(command.alias) === true ||
63
+ Boolean(command.conflictsWith?.length)
64
+ );
65
+ }
66
+
67
+ export function collectSlashSuggestionAliases(
68
+ suggestions: readonly MentionSuggestion[]
69
+ ): Set<string> {
70
+ const aliases = new Set<string>();
71
+ for (const suggestion of suggestions) {
72
+ if (!suggestion.command) continue;
73
+ const commandName = suggestion.command.slice(1).split(/\s+/, 1)[0]?.toLowerCase();
74
+ if (commandName && !commandName.includes(':')) aliases.add(commandName);
75
+ }
76
+ return aliases;
77
+ }
78
+
79
+ export function buildSlashCommandRegistry({
80
+ packs = [],
81
+ scope,
82
+ }: SlashRegistryInput): RegisteredSlashCommand[] {
83
+ const registered: RegisteredSlashCommand[] = [];
84
+
85
+ for (const pack of packs) {
86
+ if (!pack.enabled || pack.source === 'builtin') continue;
87
+
88
+ const packId = pack.manifest.id;
89
+ const namespace = normalizeNamespace(pack.manifest.namespace);
90
+ for (const command of pack.manifest.capabilities.commands ?? []) {
91
+ const alias = normalizeAlias(command.alias);
92
+ if (
93
+ !alias ||
94
+ !namespace ||
95
+ !isRegistryToken(alias) ||
96
+ !isRegistryToken(namespace) ||
97
+ !commandSupportsSlash(command) ||
98
+ !commandAppliesToScope(command, scope)
99
+ ) {
100
+ continue;
101
+ }
102
+
103
+ registered.push({
104
+ canonicalId: `${packId}.${command.id}`,
105
+ alias,
106
+ namespace,
107
+ slash: `/${alias}`,
108
+ namespacedSlash: `/${namespace}:${alias}`,
109
+ source: 'pack',
110
+ packId,
111
+ command: {
112
+ ...command,
113
+ alias,
114
+ execution: command.execution ?? {
115
+ type: scope === 'admin-loop' ? 'loop-session' : 'send-message',
116
+ reuse: true,
117
+ },
118
+ },
119
+ });
120
+ }
121
+ }
122
+
123
+ const byAlias = new Map<string, RegisteredSlashCommand[]>();
124
+ for (const command of registered) {
125
+ byAlias.set(command.alias, [...(byAlias.get(command.alias) ?? []), command]);
126
+ }
127
+
128
+ return registered
129
+ .map((command) => {
130
+ const aliasPeers = byAlias.get(command.alias) ?? [];
131
+ const conflictsWith = [
132
+ ...aliasPeers
133
+ .filter((peer) => peer.canonicalId !== command.canonicalId)
134
+ .map((peer) => peer.canonicalId),
135
+ ...(RESERVED_SLASH_COMMANDS.has(command.alias) ? [`official.${command.alias}`] : []),
136
+ ];
137
+ return conflictsWith.length ? { ...command, conflictsWith } : command;
138
+ })
139
+ .sort(
140
+ (a, b) =>
141
+ (a.command.order ?? 999) - (b.command.order ?? 999) || a.alias.localeCompare(b.alias)
142
+ );
143
+ }
144
+
145
+ export function resolveSlashCommand(
146
+ registry: readonly RegisteredSlashCommand[],
147
+ input: string,
148
+ commandRef?: string
149
+ ): SlashCommandResolveResult {
150
+ if (commandRef) {
151
+ const command = registry.find((entry) => entry.canonicalId === commandRef);
152
+ return command ? { status: 'resolved', command } : { status: 'not-found' };
153
+ }
154
+
155
+ const normalized = input.trim().replace(/^\//, '').toLowerCase();
156
+ if (!normalized) return { status: 'not-found' };
157
+
158
+ if (normalized.includes(':')) {
159
+ const parts = normalized.split(':');
160
+ if (parts.length !== 2 || !isRegistryToken(parts[0]) || !isRegistryToken(parts[1])) {
161
+ return { status: 'not-found' };
162
+ }
163
+ const [namespace, alias] = parts;
164
+ const command = registry.find(
165
+ (entry) => entry.namespace === namespace && entry.alias === alias
166
+ );
167
+ return command ? { status: 'resolved', command } : { status: 'not-found' };
168
+ }
169
+
170
+ const candidates = registry.filter((entry) => entry.alias === normalized);
171
+ if (candidates.length === 0) return { status: 'not-found' };
172
+ if (candidates.length > 1 || RESERVED_SLASH_COMMANDS.has(normalized)) {
173
+ return { status: 'conflict', candidates };
174
+ }
175
+ return { status: 'resolved', command: candidates[0] };
176
+ }
177
+
178
+ export function registeredSlashCommandToSuggestion(
179
+ registered: RegisteredSlashCommand,
180
+ options: SlashCommandSuggestionOptions = {}
181
+ ): MentionSuggestion {
182
+ const command = shouldUseNamespacedSlash(registered, options)
183
+ ? registered.namespacedSlash
184
+ : registered.slash;
185
+ const insertText = command.slice(1);
186
+ const conflictLabel = registered.conflictsWith?.length ? ' · use namespaced command' : '';
187
+
188
+ return {
189
+ id: `capability-command:${registered.canonicalId}`,
190
+ name: insertText,
191
+ type: 'command',
192
+ command,
193
+ commandRef: registered.canonicalId,
194
+ insertText,
195
+ description: registered.command.description ?? registered.command.title,
196
+ subtitle: `${registered.namespace} · ${registered.command.safety}${conflictLabel}`,
197
+ searchText: [
198
+ registered.command.title,
199
+ registered.command.description,
200
+ registered.alias,
201
+ registered.namespace,
202
+ registered.packId,
203
+ registered.command.safety,
204
+ ]
205
+ .filter(Boolean)
206
+ .join(' '),
207
+ };
208
+ }
209
+
210
+ export function buildCapabilityPackCommandSuggestions(
211
+ packs: readonly LoadedCapabilityPack[],
212
+ scope: CapabilityScope,
213
+ options: SlashCommandSuggestionOptions = {}
214
+ ): MentionSuggestion[] {
215
+ return buildSlashCommandRegistry({ packs, scope }).map((registered) =>
216
+ registeredSlashCommandToSuggestion(registered, options)
217
+ );
218
+ }
219
+
220
+ export function sourceLabel(source: SlashCommandSource): string {
221
+ switch (source) {
222
+ case 'builtin':
223
+ return 'Built-in';
224
+ case 'official':
225
+ return 'Official';
226
+ case 'project':
227
+ return 'Project';
228
+ case 'pack':
229
+ return 'Capability pack';
230
+ }
231
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Parses a leading "@team subject" directive from a message body.
3
+ *
4
+ * Accepts both the ASCII '@' (U+0040) and the full-width '@' (U+FF20) so a
5
+ * mention typed under a CJK IME still routes cross-team. Without this, a
6
+ * full-width '@' fails the dispatch regex, the message falls through to a
7
+ * local send, and the user's own team answers instead of the mentioned one.
8
+ *
9
+ * Only the trigger character is normalized here; case / slug resolution is left
10
+ * to each caller (MessageComposer vs loopSendIntent), which already differ.
11
+ *
12
+ * `\s` already covers the full-width space (U+3000), so no special separator
13
+ * handling is needed.
14
+ */
15
+ const TEAM_MENTION_DIRECTIVE_RE = /^[@@]([^\s]+)\s+([\s\S]+)$/;
16
+
17
+ export interface TeamMentionDirective {
18
+ /** Token after the trigger, up to the first whitespace (team slug or display name). */
19
+ mentioned: string;
20
+ /** Everything after the separating whitespace, trimmed. */
21
+ subject: string;
22
+ }
23
+
24
+ export function parseTeamMentionDirective(text: string): TeamMentionDirective | null {
25
+ const match = text.match(TEAM_MENTION_DIRECTIVE_RE);
26
+ if (!match) return null;
27
+ const mentioned = match[1];
28
+ const subject = match[2]?.trim();
29
+ if (!mentioned || !subject) return null;
30
+ return { mentioned, subject };
31
+ }
@@ -0,0 +1,96 @@
1
+ import { api } from '@renderer/api';
2
+ import { parseStandaloneSlashCommand } from '@shared/utils/slashCommands';
3
+
4
+ import type { MentionSuggestion } from '@renderer/types/mention';
5
+ import type { SlashCommandMeta } from '@shared/types/team';
6
+ import type { WorkflowPromptSummary } from '@shared/types/systemManager';
7
+
8
+ export interface ResolvedWorkflowCommand {
9
+ folder: string;
10
+ id: string;
11
+ command: `/${string}`;
12
+ args?: string;
13
+ }
14
+
15
+ export interface ExpandedWorkflowCommand {
16
+ text: string;
17
+ summary: string;
18
+ slashCommand: SlashCommandMeta;
19
+ prompt: WorkflowPromptSummary;
20
+ }
21
+
22
+ /**
23
+ * Append trailing user arguments to a prompt body. Mirrors the capability-pack
24
+ * expansion convention so workflow prompts and capability commands format args
25
+ * identically downstream.
26
+ */
27
+ export function appendArgsToPrompt(prompt: string, args?: string): string {
28
+ const trimmedPrompt = prompt.trim();
29
+ const trimmedArgs = args?.trim();
30
+ if (!trimmedArgs) return trimmedPrompt;
31
+ return `${trimmedPrompt}\n\nUser arguments:\n${trimmedArgs}`;
32
+ }
33
+
34
+ /**
35
+ * Resolve a typed slash command against workflow-prompt suggestions.
36
+ *
37
+ * Workflow suggestions (built from `.claude/commands/*.md` via WorkflowPromptService)
38
+ * carry `workflowPromptId` + `workflowPromptFolder` but no `commandRef`, so they are
39
+ * invisible to the capability-pack resolver. This resolver finds the matching prompt
40
+ * so its full content can be loaded and injected — otherwise only the raw `/name`
41
+ * text is sent and the workflow never actually runs.
42
+ */
43
+ export function resolveWorkflowCommandInput(
44
+ suggestions: readonly MentionSuggestion[],
45
+ text: string
46
+ ): ResolvedWorkflowCommand | null {
47
+ const parsed = parseStandaloneSlashCommand(text);
48
+ if (!parsed) return null;
49
+
50
+ const match = suggestions.find(
51
+ (suggestion) =>
52
+ suggestion.workflowPromptId &&
53
+ suggestion.workflowPromptFolder &&
54
+ typeof suggestion.command === 'string' &&
55
+ suggestion.command.toLowerCase() === parsed.command.toLowerCase()
56
+ );
57
+ if (!match || !match.workflowPromptFolder || !match.workflowPromptId) return null;
58
+
59
+ return {
60
+ folder: match.workflowPromptFolder,
61
+ id: match.workflowPromptId,
62
+ command: parsed.command,
63
+ args: parsed.args,
64
+ };
65
+ }
66
+
67
+ /**
68
+ * Load the full prompt content for a resolved workflow command and format it as
69
+ * an injectable message body. Parallel to `expandCapabilityCommand`.
70
+ */
71
+ export async function expandWorkflowCommand(
72
+ resolved: ResolvedWorkflowCommand
73
+ ): Promise<ExpandedWorkflowCommand> {
74
+ if (!api.systemManager) {
75
+ throw new Error('System manager API is unavailable');
76
+ }
77
+
78
+ const { prompt, content } = await api.systemManager.readWorkflowPrompt(
79
+ resolved.folder,
80
+ resolved.id
81
+ );
82
+ const commandName = prompt.commandName ?? resolved.command;
83
+ const slashCommand: SlashCommandMeta = {
84
+ name: commandName.replace(/^\/+/, ''),
85
+ command: commandName.startsWith('/') ? (commandName as `/${string}`) : `/${commandName}`,
86
+ args: resolved.args,
87
+ knownDescription: prompt.description ?? prompt.label,
88
+ };
89
+
90
+ return {
91
+ text: appendArgsToPrompt(content, resolved.args),
92
+ summary: prompt.label,
93
+ slashCommand,
94
+ prompt,
95
+ };
96
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Build command-list suggestions from workflow prompts (`.claude/commands/*.md`).
3
+ *
4
+ * Extracted from SystemManagerView so both the admin Loop console and each
5
+ * team's Loop console can surface workflow commands — the team console loads
6
+ * its own project's commands, so a digital worker's project-specific commands
7
+ * appear alongside the global ones.
8
+ */
9
+
10
+ import type { MentionSuggestion } from '@renderer/types/mention';
11
+ import type { WorkflowPromptSummary } from '@shared/types/systemManager';
12
+
13
+ function formatWorkflowCommand(prompt: WorkflowPromptSummary): string {
14
+ return prompt.commandName ?? `/${prompt.filename.replace(/\.[^.]+$/, '')}`;
15
+ }
16
+
17
+ /**
18
+ * Convert a workflow prompt into a command suggestion carrying the
19
+ * `workflowPromptId` / `workflowPromptFolder` metadata that the submit path
20
+ * uses to inject the prompt's full body (instead of sending the raw `/name`).
21
+ */
22
+ export function buildWorkflowCommandSuggestion(
23
+ prompt: WorkflowPromptSummary,
24
+ idPrefix = 'workflow'
25
+ ): MentionSuggestion {
26
+ const command = formatWorkflowCommand(prompt) as `/${string}`;
27
+ const commandName = command.slice(1);
28
+ return {
29
+ id: `${idPrefix}:${prompt.id}`,
30
+ name: commandName,
31
+ type: 'command',
32
+ command,
33
+ insertText: commandName,
34
+ workflowPromptId: prompt.id,
35
+ workflowPromptFolder: prompt.folder,
36
+ description: prompt.description ?? `运行 ${prompt.label}`,
37
+ subtitle: prompt.safety ? `${prompt.label} · ${prompt.safety}` : prompt.label,
38
+ searchText: [
39
+ prompt.label,
40
+ prompt.description,
41
+ prompt.category,
42
+ prompt.safety,
43
+ prompt.filename,
44
+ command,
45
+ ]
46
+ .filter(Boolean)
47
+ .join(' '),
48
+ };
49
+ }
@@ -10,7 +10,13 @@
10
10
  import type { CliArgsValidationResult } from '../utils/cliArgsParser';
11
11
  import type { CliInstallerAPI } from './cliInstaller';
12
12
  import type { EditorAPI, EditorFileChangeEvent, ProjectAPI, WorkspaceListResponse } from './editor';
13
- import type { ApiKeysAPI, McpCatalogAPI, PluginCatalogAPI, SkillsCatalogAPI } from './extensions';
13
+ import type {
14
+ ApiKeysAPI,
15
+ CapabilityPacksAPI,
16
+ McpCatalogAPI,
17
+ PluginCatalogAPI,
18
+ SkillsCatalogAPI,
19
+ } from './extensions';
14
20
  import type {
15
21
  AppConfig,
16
22
  DetectedError,
@@ -94,8 +100,10 @@ import type {
94
100
  ToolApprovalSettings,
95
101
  UpdateKanbanPatch,
96
102
  } from './team';
103
+ import type { LoopAssetsSnapshot } from './loopAssets';
97
104
  import type { SystemManagerAPI } from './systemManager';
98
105
  import type { TerminalAPI } from './terminal';
106
+ import type { DiscoverableWorker } from './worker';
99
107
  import type { WaterfallData } from './visualization';
100
108
  import type { RecentProjectsElectronApi } from '@features/recent-projects/contracts';
101
109
  import type {
@@ -501,6 +509,14 @@ export interface CcSession {
501
509
  createdAt: string;
502
510
  updatedAt: string;
503
511
  lastMessage: { role: string; content: string; timestamp: string } | null;
512
+ /**
513
+ * Whether this list entry is backed by a local Claude JSONL file. cc-only
514
+ * sessions (e.g. a Feishu listening session with no local file yet) are
515
+ * `false` — expanding them must not attempt a local detail read, which 404s
516
+ * and surfaces a misleading "会话文件已不存在" (#20). Defaults to true when
517
+ * unset, so construction sites that predate the flag keep current behavior.
518
+ */
519
+ hasLocalFile?: boolean;
504
520
  }
505
521
 
506
522
  export interface CcSessionMessage {
@@ -524,6 +540,18 @@ export interface CcSessionDetail {
524
540
  history: CcSessionMessage[];
525
541
  }
526
542
 
543
+ export interface LoopSessionRequest {
544
+ sessionName?: string;
545
+ message?: string;
546
+ reuse?: boolean;
547
+ }
548
+
549
+ export interface LoopSessionResponse {
550
+ session: CcSession;
551
+ reused: boolean;
552
+ messageSent: boolean;
553
+ }
554
+
527
555
  export type ConversationTelemetryExportFormat = 'csv' | 'json' | 'markdown' | 'plaintext';
528
556
 
529
557
  export type ConversationTelemetryIncludeContent = 'none' | 'summary' | 'full';
@@ -577,7 +605,12 @@ export interface ConversationTelemetryRow {
577
605
  endTime?: string;
578
606
  active?: boolean;
579
607
  live?: boolean;
580
- matchStatus: 'matched' | 'missing-agent-session-id' | 'jsonl-not-found' | 'ambiguous' | 'local-only';
608
+ matchStatus:
609
+ | 'matched'
610
+ | 'missing-agent-session-id'
611
+ | 'jsonl-not-found'
612
+ | 'ambiguous'
613
+ | 'local-only';
581
614
  };
582
615
  identity: {
583
616
  platform: string;
@@ -641,6 +674,11 @@ export interface TeamsAPI {
641
674
  list: () => Promise<TeamSummary[]>;
642
675
  ensureSystemManager: () => Promise<SystemManagerSummary>;
643
676
  getData: (teamName: string) => Promise<TeamViewSnapshot>;
677
+ getLoopAssets: (teamName: string) => Promise<LoopAssetsSnapshot>;
678
+ createLoopSession: (
679
+ teamName: string,
680
+ request: LoopSessionRequest
681
+ ) => Promise<LoopSessionResponse>;
644
682
  getTaskChangePresence: (teamName: string) => Promise<Record<string, TaskChangePresenceState>>;
645
683
  setChangePresenceTracking: (teamName: string, enabled: boolean) => Promise<void>;
646
684
  setToolActivityTracking: (teamName: string, enabled: boolean) => Promise<void>;
@@ -840,6 +878,36 @@ export interface CrossTeamAPI {
840
878
  getOutbox: (teamName: string) => Promise<CrossTeamMessage[]>;
841
879
  }
842
880
 
881
+ // =============================================================================
882
+ // Digital Workers API
883
+ // =============================================================================
884
+
885
+ export interface WorkerListResponse {
886
+ workers: DiscoverableWorker[];
887
+ }
888
+
889
+ export interface WorkerInvokeRequest {
890
+ fromTeam?: string;
891
+ text: string;
892
+ summary?: string;
893
+ sessionName?: string;
894
+ reuse?: boolean;
895
+ sessionKey?: string;
896
+ }
897
+
898
+ export interface WorkerInvokeResponse {
899
+ ok: boolean;
900
+ worker: DiscoverableWorker;
901
+ session: CcSession;
902
+ reused: boolean;
903
+ messageSent: boolean;
904
+ }
905
+
906
+ export interface WorkersAPI {
907
+ list: () => Promise<WorkerListResponse>;
908
+ invoke: (workerId: string, request: WorkerInvokeRequest) => Promise<WorkerInvokeResponse>;
909
+ }
910
+
843
911
  // =============================================================================
844
912
  // Collaboration Board API
845
913
  // =============================================================================
@@ -1199,11 +1267,15 @@ export interface ElectronAPI extends RecentProjectsElectronApi {
1199
1267
  work_dir?: string;
1200
1268
  agent_type?: string;
1201
1269
  }
1202
- ) => Promise<{ message: string; restart_required: boolean }>;
1270
+ ) => Promise<{ message: string; restart_required: boolean; restart_handled?: boolean }>;
1203
1271
  };
1204
1272
 
1205
1273
  // Cross-Team Communication API
1206
1274
  crossTeam: CrossTeamAPI;
1275
+
1276
+ // Digital Workers API
1277
+ workers: WorkersAPI;
1278
+
1207
1279
  collab: CollabBoardAPI;
1208
1280
 
1209
1281
  // Review API
@@ -1215,7 +1287,7 @@ export interface ElectronAPI extends RecentProjectsElectronApi {
1215
1287
  // System Manager / Control Console API
1216
1288
  systemManager: SystemManagerAPI;
1217
1289
 
1218
- // Embedded Terminal API (xterm.js + node-pty)
1290
+ // System terminal API
1219
1291
  terminal: TerminalAPI;
1220
1292
 
1221
1293
  // Project file operations (editor-independent)
@@ -1241,6 +1313,9 @@ export interface ElectronAPI extends RecentProjectsElectronApi {
1241
1313
  // Extension Store — Skills Catalog API (Electron-only, optional)
1242
1314
  skills?: SkillsCatalogAPI;
1243
1315
 
1316
+ // Extension Store — Capability Packs API (Electron-only, optional)
1317
+ capabilityPacks?: CapabilityPacksAPI;
1318
+
1244
1319
  // Extension Store — Credentials (project env, MCP credentials)
1245
1320
  credentials?: {
1246
1321
  getStatus: () => Promise<{ encryption: string; storagePath: string } | null>;
@@ -118,6 +118,7 @@ export interface CcSessionListItem {
118
118
  id: string;
119
119
  name: string;
120
120
  session_key: string;
121
+ agent_session_id?: string;
121
122
  agent_type: CcAgentType;
122
123
  active: boolean;
123
124
  live: boolean;
@@ -23,6 +23,14 @@ import type {
23
23
  McpServerDiagnostic,
24
24
  } from './mcp';
25
25
  import type { EnrichedPlugin, PluginInstallRequest } from './plugin';
26
+ import type {
27
+ CapabilityCommandPromptRequest,
28
+ CapabilityCommandPromptResult,
29
+ CapabilityPackExportRequest,
30
+ CapabilityPackImportRequest,
31
+ CapabilityPackListResult,
32
+ CapabilityPackMutationResult,
33
+ } from './capabilityPack';
26
34
  import type {
27
35
  SkillCatalogItem,
28
36
  SkillDeleteRequest,
@@ -88,6 +96,17 @@ export interface SkillsCatalogAPI {
88
96
  onChanged: (callback: (event: SkillWatcherEvent) => void) => () => void;
89
97
  }
90
98
 
99
+ // ── Capability Packs API ──────────────────────────────────────────────────
100
+
101
+ export interface CapabilityPacksAPI {
102
+ list: () => Promise<CapabilityPackListResult>;
103
+ importPack: (request: CapabilityPackImportRequest) => Promise<CapabilityPackMutationResult>;
104
+ exportPack: (request: CapabilityPackExportRequest) => Promise<CapabilityPackMutationResult>;
105
+ getCommandPrompt: (
106
+ request: CapabilityCommandPromptRequest
107
+ ) => Promise<CapabilityCommandPromptResult>;
108
+ }
109
+
91
110
  // ── API Keys API ──────────────────────────────────────────────────────────
92
111
 
93
112
  export interface ApiKeysAPI {