@stigmer/react 3.2.3 → 3.4.0

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 (460) hide show
  1. package/agent/steps/ReviewStep.d.ts.map +1 -1
  2. package/agent/steps/ReviewStep.js +2 -3
  3. package/agent/steps/ReviewStep.js.map +1 -1
  4. package/billing/index.d.ts.map +1 -1
  5. package/billing/index.js +4 -0
  6. package/billing/index.js.map +1 -1
  7. package/channel/AgentChannelsPanel.d.ts.map +1 -1
  8. package/channel/AgentChannelsPanel.js +11 -5
  9. package/channel/AgentChannelsPanel.js.map +1 -1
  10. package/composer/SessionComposer.d.ts +1 -1
  11. package/cursor-accounts/CursorAccountEditor.d.ts +34 -0
  12. package/cursor-accounts/CursorAccountEditor.d.ts.map +1 -0
  13. package/cursor-accounts/CursorAccountEditor.js +67 -0
  14. package/cursor-accounts/CursorAccountEditor.js.map +1 -0
  15. package/cursor-accounts/CursorAccountsAccessNotice.d.ts +11 -0
  16. package/cursor-accounts/CursorAccountsAccessNotice.d.ts.map +1 -0
  17. package/cursor-accounts/CursorAccountsAccessNotice.js +14 -0
  18. package/cursor-accounts/CursorAccountsAccessNotice.js.map +1 -0
  19. package/cursor-accounts/CursorAccountsConsole.d.ts +32 -0
  20. package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -0
  21. package/cursor-accounts/CursorAccountsConsole.js +169 -0
  22. package/cursor-accounts/CursorAccountsConsole.js.map +1 -0
  23. package/cursor-accounts/MemberCoverageTable.d.ts +29 -0
  24. package/cursor-accounts/MemberCoverageTable.d.ts.map +1 -0
  25. package/cursor-accounts/MemberCoverageTable.js +150 -0
  26. package/cursor-accounts/MemberCoverageTable.js.map +1 -0
  27. package/cursor-accounts/MemberKeysPanel.d.ts +25 -0
  28. package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -0
  29. package/cursor-accounts/MemberKeysPanel.js +115 -0
  30. package/cursor-accounts/MemberKeysPanel.js.map +1 -0
  31. package/cursor-accounts/badges.d.ts +9 -0
  32. package/cursor-accounts/badges.d.ts.map +1 -0
  33. package/cursor-accounts/badges.js +10 -0
  34. package/cursor-accounts/badges.js.map +1 -0
  35. package/cursor-accounts/cursor-account-coverage.d.ts +41 -0
  36. package/cursor-accounts/cursor-account-coverage.d.ts.map +1 -0
  37. package/cursor-accounts/cursor-account-coverage.js +26 -0
  38. package/cursor-accounts/cursor-account-coverage.js.map +1 -0
  39. package/cursor-accounts/cursor-account-format.d.ts +23 -0
  40. package/cursor-accounts/cursor-account-format.d.ts.map +1 -0
  41. package/cursor-accounts/cursor-account-format.js +41 -0
  42. package/cursor-accounts/cursor-account-format.js.map +1 -0
  43. package/cursor-accounts/index.d.ts +18 -0
  44. package/cursor-accounts/index.d.ts.map +1 -0
  45. package/cursor-accounts/index.js +13 -0
  46. package/cursor-accounts/index.js.map +1 -0
  47. package/cursor-accounts/useCursorAccountView.d.ts +30 -0
  48. package/cursor-accounts/useCursorAccountView.d.ts.map +1 -0
  49. package/cursor-accounts/useCursorAccountView.js +25 -0
  50. package/cursor-accounts/useCursorAccountView.js.map +1 -0
  51. package/cursor-accounts/useCursorAccounts.d.ts +33 -0
  52. package/cursor-accounts/useCursorAccounts.d.ts.map +1 -0
  53. package/cursor-accounts/useCursorAccounts.js +25 -0
  54. package/cursor-accounts/useCursorAccounts.js.map +1 -0
  55. package/cursor-accounts/useCursorMemberKeyActions.d.ts +49 -0
  56. package/cursor-accounts/useCursorMemberKeyActions.d.ts.map +1 -0
  57. package/cursor-accounts/useCursorMemberKeyActions.js +38 -0
  58. package/cursor-accounts/useCursorMemberKeyActions.js.map +1 -0
  59. package/cursor-accounts/useDeleteCursorAccount.d.ts +30 -0
  60. package/cursor-accounts/useDeleteCursorAccount.d.ts.map +1 -0
  61. package/cursor-accounts/useDeleteCursorAccount.js +32 -0
  62. package/cursor-accounts/useDeleteCursorAccount.js.map +1 -0
  63. package/cursor-accounts/useSyncCursorAccount.d.ts +23 -0
  64. package/cursor-accounts/useSyncCursorAccount.d.ts.map +1 -0
  65. package/cursor-accounts/useSyncCursorAccount.js +31 -0
  66. package/cursor-accounts/useSyncCursorAccount.js.map +1 -0
  67. package/cursor-accounts/useUpsertCursorAccount.d.ts +26 -0
  68. package/cursor-accounts/useUpsertCursorAccount.d.ts.map +1 -0
  69. package/cursor-accounts/useUpsertCursorAccount.js +34 -0
  70. package/cursor-accounts/useUpsertCursorAccount.js.map +1 -0
  71. package/datastore/CollectionRecordsBrowser.d.ts +34 -0
  72. package/datastore/CollectionRecordsBrowser.d.ts.map +1 -0
  73. package/datastore/CollectionRecordsBrowser.js +223 -0
  74. package/datastore/CollectionRecordsBrowser.js.map +1 -0
  75. package/datastore/CollectionSchemaView.d.ts +29 -0
  76. package/datastore/CollectionSchemaView.d.ts.map +1 -0
  77. package/datastore/CollectionSchemaView.js +93 -0
  78. package/datastore/CollectionSchemaView.js.map +1 -0
  79. package/datastore/DatastoreDetailView.d.ts +44 -0
  80. package/datastore/DatastoreDetailView.d.ts.map +1 -0
  81. package/datastore/DatastoreDetailView.js +76 -0
  82. package/datastore/DatastoreDetailView.js.map +1 -0
  83. package/datastore/DatastoreSyncReport.d.ts +19 -0
  84. package/datastore/DatastoreSyncReport.d.ts.map +1 -0
  85. package/datastore/DatastoreSyncReport.js +45 -0
  86. package/datastore/DatastoreSyncReport.js.map +1 -0
  87. package/datastore/DeleteDatastoreDialog.d.ts +35 -0
  88. package/datastore/DeleteDatastoreDialog.d.ts.map +1 -0
  89. package/datastore/DeleteDatastoreDialog.js +90 -0
  90. package/datastore/DeleteDatastoreDialog.js.map +1 -0
  91. package/datastore/FieldValueControl.d.ts +55 -0
  92. package/datastore/FieldValueControl.d.ts.map +1 -0
  93. package/datastore/FieldValueControl.js +138 -0
  94. package/datastore/FieldValueControl.js.map +1 -0
  95. package/datastore/RecordFilterBuilder.d.ts +37 -0
  96. package/datastore/RecordFilterBuilder.d.ts.map +1 -0
  97. package/datastore/RecordFilterBuilder.js +122 -0
  98. package/datastore/RecordFilterBuilder.js.map +1 -0
  99. package/datastore/RecordFormPanel.d.ts +45 -0
  100. package/datastore/RecordFormPanel.d.ts.map +1 -0
  101. package/datastore/RecordFormPanel.js +215 -0
  102. package/datastore/RecordFormPanel.js.map +1 -0
  103. package/datastore/index.d.ts +43 -0
  104. package/datastore/index.d.ts.map +1 -0
  105. package/datastore/index.js +22 -0
  106. package/datastore/index.js.map +1 -0
  107. package/datastore/recordFilter.d.ts +62 -0
  108. package/datastore/recordFilter.d.ts.map +1 -0
  109. package/datastore/recordFilter.js +104 -0
  110. package/datastore/recordFilter.js.map +1 -0
  111. package/datastore/recordValues.d.ts +85 -0
  112. package/datastore/recordValues.d.ts.map +1 -0
  113. package/datastore/recordValues.js +282 -0
  114. package/datastore/recordValues.js.map +1 -0
  115. package/datastore/useDatastore.d.ts +39 -0
  116. package/datastore/useDatastore.d.ts.map +1 -0
  117. package/datastore/useDatastore.js +44 -0
  118. package/datastore/useDatastore.js.map +1 -0
  119. package/datastore/useDatastoreCount.d.ts +48 -0
  120. package/datastore/useDatastoreCount.d.ts.map +1 -0
  121. package/datastore/useDatastoreCount.js +27 -0
  122. package/datastore/useDatastoreCount.js.map +1 -0
  123. package/datastore/useDatastoreDescription.d.ts +54 -0
  124. package/datastore/useDatastoreDescription.d.ts.map +1 -0
  125. package/datastore/useDatastoreDescription.js +50 -0
  126. package/datastore/useDatastoreDescription.js.map +1 -0
  127. package/datastore/useDatastoreList.d.ts +57 -0
  128. package/datastore/useDatastoreList.d.ts.map +1 -0
  129. package/datastore/useDatastoreList.js +29 -0
  130. package/datastore/useDatastoreList.js.map +1 -0
  131. package/datastore/useDatastoreSearch.d.ts +19 -0
  132. package/datastore/useDatastoreSearch.d.ts.map +1 -0
  133. package/datastore/useDatastoreSearch.js +22 -0
  134. package/datastore/useDatastoreSearch.js.map +1 -0
  135. package/datastore/useDeleteDatastore.d.ts +53 -0
  136. package/datastore/useDeleteDatastore.d.ts.map +1 -0
  137. package/datastore/useDeleteDatastore.js +40 -0
  138. package/datastore/useDeleteDatastore.js.map +1 -0
  139. package/datastore/useDeleteRecord.d.ts +34 -0
  140. package/datastore/useDeleteRecord.d.ts.map +1 -0
  141. package/datastore/useDeleteRecord.js +43 -0
  142. package/datastore/useDeleteRecord.js.map +1 -0
  143. package/datastore/useInsertRecord.d.ts +50 -0
  144. package/datastore/useInsertRecord.d.ts.map +1 -0
  145. package/datastore/useInsertRecord.js +55 -0
  146. package/datastore/useInsertRecord.js.map +1 -0
  147. package/datastore/useRecordCollection.d.ts +104 -0
  148. package/datastore/useRecordCollection.d.ts.map +1 -0
  149. package/datastore/useRecordCollection.js +136 -0
  150. package/datastore/useRecordCollection.js.map +1 -0
  151. package/datastore/useRecordList.d.ts +66 -0
  152. package/datastore/useRecordList.d.ts.map +1 -0
  153. package/datastore/useRecordList.js +58 -0
  154. package/datastore/useRecordList.js.map +1 -0
  155. package/datastore/useUpdateRecord.d.ts +52 -0
  156. package/datastore/useUpdateRecord.d.ts.map +1 -0
  157. package/datastore/useUpdateRecord.js +55 -0
  158. package/datastore/useUpdateRecord.js.map +1 -0
  159. package/environment/EnvironmentListPanel.d.ts.map +1 -1
  160. package/environment/EnvironmentListPanel.js +12 -7
  161. package/environment/EnvironmentListPanel.js.map +1 -1
  162. package/execution/ExecutionProgress.d.ts.map +1 -1
  163. package/execution/ExecutionProgress.js +13 -4
  164. package/execution/ExecutionProgress.js.map +1 -1
  165. package/execution/MessageThread.d.ts.map +1 -1
  166. package/execution/MessageThread.js +10 -2
  167. package/execution/MessageThread.js.map +1 -1
  168. package/execution/useCreateAgentExecution.d.ts +31 -1
  169. package/execution/useCreateAgentExecution.d.ts.map +1 -1
  170. package/execution/useCreateAgentExecution.js +2 -0
  171. package/execution/useCreateAgentExecution.js.map +1 -1
  172. package/iam-policy/index.d.ts +1 -1
  173. package/iam-policy/index.d.ts.map +1 -1
  174. package/iam-policy/index.js.map +1 -1
  175. package/iam-policy/useCheckPermission.d.ts +32 -11
  176. package/iam-policy/useCheckPermission.d.ts.map +1 -1
  177. package/iam-policy/useCheckPermission.js +24 -19
  178. package/iam-policy/useCheckPermission.js.map +1 -1
  179. package/index.d.ts +12 -4
  180. package/index.d.ts.map +1 -1
  181. package/index.js +18 -3
  182. package/index.js.map +1 -1
  183. package/internal/form-primitives.d.ts +10 -0
  184. package/internal/form-primitives.d.ts.map +1 -0
  185. package/internal/form-primitives.js +15 -0
  186. package/internal/form-primitives.js.map +1 -0
  187. package/library/index.d.ts +0 -7
  188. package/library/index.d.ts.map +1 -1
  189. package/library/index.js +0 -4
  190. package/library/index.js.map +1 -1
  191. package/library/useApplyResource.d.ts +12 -12
  192. package/library/useApplyResource.d.ts.map +1 -1
  193. package/library/useApplyResource.js +16 -25
  194. package/library/useApplyResource.js.map +1 -1
  195. package/library/useExportResource.d.ts +13 -9
  196. package/library/useExportResource.d.ts.map +1 -1
  197. package/library/useExportResource.js +18 -36
  198. package/library/useExportResource.js.map +1 -1
  199. package/manifest/ApplyManifestDialog.d.ts +48 -0
  200. package/manifest/ApplyManifestDialog.d.ts.map +1 -0
  201. package/manifest/ApplyManifestDialog.js +135 -0
  202. package/manifest/ApplyManifestDialog.js.map +1 -0
  203. package/manifest/EditResourceYamlDialog.d.ts +51 -0
  204. package/manifest/EditResourceYamlDialog.d.ts.map +1 -0
  205. package/manifest/EditResourceYamlDialog.js +104 -0
  206. package/manifest/EditResourceYamlDialog.js.map +1 -0
  207. package/manifest/RedactedSecretsNotice.d.ts +14 -0
  208. package/manifest/RedactedSecretsNotice.d.ts.map +1 -0
  209. package/manifest/RedactedSecretsNotice.js +14 -0
  210. package/manifest/RedactedSecretsNotice.js.map +1 -0
  211. package/manifest/YamlEditor.d.ts +44 -0
  212. package/manifest/YamlEditor.d.ts.map +1 -0
  213. package/manifest/YamlEditor.js +216 -0
  214. package/manifest/YamlEditor.js.map +1 -0
  215. package/manifest/index.d.ts +13 -0
  216. package/manifest/index.d.ts.map +1 -0
  217. package/manifest/index.js +13 -0
  218. package/manifest/index.js.map +1 -0
  219. package/manifest/useApplyManifest.d.ts +82 -0
  220. package/manifest/useApplyManifest.d.ts.map +1 -0
  221. package/manifest/useApplyManifest.js +180 -0
  222. package/manifest/useApplyManifest.js.map +1 -0
  223. package/manifest/useEditResourceYaml.d.ts +106 -0
  224. package/manifest/useEditResourceYaml.d.ts.map +1 -0
  225. package/manifest/useEditResourceYaml.js +168 -0
  226. package/manifest/useEditResourceYaml.js.map +1 -0
  227. package/mcp-server/steps/ReviewStep.d.ts.map +1 -1
  228. package/mcp-server/steps/ReviewStep.js +2 -3
  229. package/mcp-server/steps/ReviewStep.js.map +1 -1
  230. package/package.json +4 -4
  231. package/pricing-governance/BaselineEditor.d.ts +9 -0
  232. package/pricing-governance/BaselineEditor.d.ts.map +1 -0
  233. package/pricing-governance/BaselineEditor.js +270 -0
  234. package/pricing-governance/BaselineEditor.js.map +1 -0
  235. package/pricing-governance/ModelCatalogPanel.d.ts +28 -0
  236. package/pricing-governance/ModelCatalogPanel.d.ts.map +1 -0
  237. package/pricing-governance/ModelCatalogPanel.js +102 -0
  238. package/pricing-governance/ModelCatalogPanel.js.map +1 -0
  239. package/pricing-governance/ModelGovernanceDetail.d.ts +8 -0
  240. package/pricing-governance/ModelGovernanceDetail.d.ts.map +1 -0
  241. package/pricing-governance/ModelGovernanceDetail.js +64 -0
  242. package/pricing-governance/ModelGovernanceDetail.js.map +1 -0
  243. package/pricing-governance/OperatorAccessNotice.d.ts +12 -0
  244. package/pricing-governance/OperatorAccessNotice.d.ts.map +1 -0
  245. package/pricing-governance/OperatorAccessNotice.js +15 -0
  246. package/pricing-governance/OperatorAccessNotice.js.map +1 -0
  247. package/pricing-governance/PricingGovernanceConsole.d.ts +57 -0
  248. package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -0
  249. package/pricing-governance/PricingGovernanceConsole.js +164 -0
  250. package/pricing-governance/PricingGovernanceConsole.js.map +1 -0
  251. package/pricing-governance/PricingGovernancePanel.d.ts +26 -0
  252. package/pricing-governance/PricingGovernancePanel.d.ts.map +1 -0
  253. package/pricing-governance/PricingGovernancePanel.js +64 -0
  254. package/pricing-governance/PricingGovernancePanel.js.map +1 -0
  255. package/pricing-governance/RetireConfirm.d.ts +9 -0
  256. package/pricing-governance/RetireConfirm.d.ts.map +1 -0
  257. package/pricing-governance/RetireConfirm.js +19 -0
  258. package/pricing-governance/RetireConfirm.js.map +1 -0
  259. package/pricing-governance/governance-primitives.d.ts +33 -0
  260. package/pricing-governance/governance-primitives.d.ts.map +1 -0
  261. package/pricing-governance/governance-primitives.js +43 -0
  262. package/pricing-governance/governance-primitives.js.map +1 -0
  263. package/pricing-governance/index.d.ts +19 -0
  264. package/pricing-governance/index.d.ts.map +1 -0
  265. package/pricing-governance/index.js +20 -0
  266. package/pricing-governance/index.js.map +1 -0
  267. package/pricing-governance/pricing-format.d.ts +12 -0
  268. package/pricing-governance/pricing-format.d.ts.map +1 -0
  269. package/pricing-governance/pricing-format.js +50 -0
  270. package/pricing-governance/pricing-format.js.map +1 -0
  271. package/pricing-governance/useDecidePricingOverride.d.ts +46 -0
  272. package/pricing-governance/useDecidePricingOverride.d.ts.map +1 -0
  273. package/pricing-governance/useDecidePricingOverride.js +44 -0
  274. package/pricing-governance/useDecidePricingOverride.js.map +1 -0
  275. package/pricing-governance/useModelGovernanceView.d.ts +103 -0
  276. package/pricing-governance/useModelGovernanceView.d.ts.map +1 -0
  277. package/pricing-governance/useModelGovernanceView.js +144 -0
  278. package/pricing-governance/useModelGovernanceView.js.map +1 -0
  279. package/pricing-governance/useModelPricingBaselines.d.ts +40 -0
  280. package/pricing-governance/useModelPricingBaselines.d.ts.map +1 -0
  281. package/pricing-governance/useModelPricingBaselines.js +32 -0
  282. package/pricing-governance/useModelPricingBaselines.js.map +1 -0
  283. package/pricing-governance/usePricingGovernance.d.ts +39 -0
  284. package/pricing-governance/usePricingGovernance.d.ts.map +1 -0
  285. package/pricing-governance/usePricingGovernance.js +31 -0
  286. package/pricing-governance/usePricingGovernance.js.map +1 -0
  287. package/pricing-governance/useRetireModelPricingBaseline.d.ts +31 -0
  288. package/pricing-governance/useRetireModelPricingBaseline.d.ts.map +1 -0
  289. package/pricing-governance/useRetireModelPricingBaseline.js +36 -0
  290. package/pricing-governance/useRetireModelPricingBaseline.js.map +1 -0
  291. package/pricing-governance/useUpsertModelPricingBaseline.d.ts +38 -0
  292. package/pricing-governance/useUpsertModelPricingBaseline.d.ts.map +1 -0
  293. package/pricing-governance/useUpsertModelPricingBaseline.js +37 -0
  294. package/pricing-governance/useUpsertModelPricingBaseline.js.map +1 -0
  295. package/resource-creation/templates/workflow-templates.js +4 -4
  296. package/session/useCreateSession.d.ts +28 -0
  297. package/session/useCreateSession.d.ts.map +1 -1
  298. package/session/useCreateSession.js +2 -1
  299. package/session/useCreateSession.js.map +1 -1
  300. package/session/useEditSessionPrep.js +3 -3
  301. package/session/useEditSessionPrep.js.map +1 -1
  302. package/session/useNewSessionFlow.d.ts +30 -0
  303. package/session/useNewSessionFlow.d.ts.map +1 -1
  304. package/session/useNewSessionFlow.js +7 -1
  305. package/session/useNewSessionFlow.js.map +1 -1
  306. package/session/useUpdateSession.d.ts +29 -10
  307. package/session/useUpdateSession.d.ts.map +1 -1
  308. package/session/useUpdateSession.js +29 -10
  309. package/session/useUpdateSession.js.map +1 -1
  310. package/settings/index.d.ts +2 -1
  311. package/settings/index.d.ts.map +1 -1
  312. package/settings/index.js +2 -1
  313. package/settings/index.js.map +1 -1
  314. package/settings/settings-nav.d.ts +22 -0
  315. package/settings/settings-nav.d.ts.map +1 -1
  316. package/settings/settings-nav.js +32 -1
  317. package/settings/settings-nav.js.map +1 -1
  318. package/settings/useSettingsNavGroups.d.ts +29 -0
  319. package/settings/useSettingsNavGroups.d.ts.map +1 -0
  320. package/settings/useSettingsNavGroups.js +61 -0
  321. package/settings/useSettingsNavGroups.js.map +1 -0
  322. package/src/agent/steps/ReviewStep.tsx +2 -3
  323. package/src/billing/index.ts +5 -0
  324. package/src/channel/AgentChannelsPanel.tsx +27 -1
  325. package/src/composer/SessionComposer.tsx +1 -1
  326. package/src/cursor-accounts/CursorAccountEditor.tsx +229 -0
  327. package/src/cursor-accounts/CursorAccountsAccessNotice.tsx +36 -0
  328. package/src/cursor-accounts/CursorAccountsConsole.tsx +454 -0
  329. package/src/cursor-accounts/MemberCoverageTable.tsx +439 -0
  330. package/src/cursor-accounts/MemberKeysPanel.tsx +278 -0
  331. package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +680 -0
  332. package/src/cursor-accounts/__tests__/cursor-account-coverage.test.ts +73 -0
  333. package/src/cursor-accounts/badges.tsx +26 -0
  334. package/src/cursor-accounts/cursor-account-coverage.ts +71 -0
  335. package/src/cursor-accounts/cursor-account-format.ts +45 -0
  336. package/src/cursor-accounts/index.ts +29 -0
  337. package/src/cursor-accounts/useCursorAccountView.ts +49 -0
  338. package/src/cursor-accounts/useCursorAccounts.ts +49 -0
  339. package/src/cursor-accounts/useCursorMemberKeyActions.ts +106 -0
  340. package/src/cursor-accounts/useDeleteCursorAccount.ts +62 -0
  341. package/src/cursor-accounts/useSyncCursorAccount.ts +54 -0
  342. package/src/cursor-accounts/useUpsertCursorAccount.ts +57 -0
  343. package/src/datastore/CollectionRecordsBrowser.tsx +570 -0
  344. package/src/datastore/CollectionSchemaView.tsx +247 -0
  345. package/src/datastore/DatastoreDetailView.tsx +201 -0
  346. package/src/datastore/DatastoreSyncReport.tsx +105 -0
  347. package/src/datastore/DeleteDatastoreDialog.tsx +202 -0
  348. package/src/datastore/FieldValueControl.tsx +289 -0
  349. package/src/datastore/RecordFilterBuilder.tsx +422 -0
  350. package/src/datastore/RecordFormPanel.tsx +432 -0
  351. package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +245 -0
  352. package/src/datastore/__tests__/DeleteDatastoreDialog.test.tsx +133 -0
  353. package/src/datastore/__tests__/FieldValueControl.test.tsx +160 -0
  354. package/src/datastore/__tests__/RecordFilterBuilder.test.tsx +155 -0
  355. package/src/datastore/__tests__/RecordFormPanel.test.tsx +227 -0
  356. package/src/datastore/__tests__/recordFilter.test.ts +169 -0
  357. package/src/datastore/__tests__/recordMutations.test.tsx +195 -0
  358. package/src/datastore/__tests__/recordValues.test.ts +359 -0
  359. package/src/datastore/__tests__/schemaAndSyncViews.test.tsx +142 -0
  360. package/src/datastore/__tests__/useDatastoreDescription.test.tsx +143 -0
  361. package/src/datastore/__tests__/useRecordCollection.test.tsx +250 -0
  362. package/src/datastore/__tests__/useRecordList.test.tsx +85 -0
  363. package/src/datastore/index.ts +111 -0
  364. package/src/datastore/recordFilter.ts +154 -0
  365. package/src/datastore/recordValues.ts +327 -0
  366. package/src/datastore/useDatastore.ts +67 -0
  367. package/src/datastore/useDatastoreCount.ts +67 -0
  368. package/src/datastore/useDatastoreDescription.ts +90 -0
  369. package/src/datastore/useDatastoreList.ts +79 -0
  370. package/src/datastore/useDatastoreSearch.ts +39 -0
  371. package/src/datastore/useDeleteDatastore.ts +87 -0
  372. package/src/datastore/useDeleteRecord.ts +77 -0
  373. package/src/datastore/useInsertRecord.ts +92 -0
  374. package/src/datastore/useRecordCollection.ts +256 -0
  375. package/src/datastore/useRecordList.ts +131 -0
  376. package/src/datastore/useUpdateRecord.ts +95 -0
  377. package/src/environment/EnvironmentListPanel.tsx +24 -0
  378. package/src/execution/ExecutionProgress.tsx +14 -4
  379. package/src/execution/MessageThread.tsx +10 -2
  380. package/src/execution/__tests__/ExecutionProgress.test.tsx +67 -0
  381. package/src/execution/__tests__/MessageThread.test.tsx +44 -0
  382. package/src/execution/__tests__/useArtifactInspection.test.tsx +12 -2
  383. package/src/execution/__tests__/useCreateAgentExecution.test.tsx +86 -0
  384. package/src/execution/useCreateAgentExecution.ts +41 -6
  385. package/src/iam-policy/__tests__/useCheckPermission.test.tsx +221 -0
  386. package/src/iam-policy/index.ts +1 -0
  387. package/src/iam-policy/useCheckPermission.ts +45 -19
  388. package/src/index.ts +172 -14
  389. package/src/internal/form-primitives.tsx +40 -0
  390. package/src/library/index.ts +0 -20
  391. package/src/library/useApplyResource.ts +27 -34
  392. package/src/library/useExportResource.ts +21 -40
  393. package/src/manifest/ApplyManifestDialog.tsx +315 -0
  394. package/src/manifest/EditResourceYamlDialog.tsx +265 -0
  395. package/src/manifest/RedactedSecretsNotice.tsx +30 -0
  396. package/src/manifest/YamlEditor.tsx +272 -0
  397. package/src/manifest/__tests__/EditResourceYamlDialog.test.tsx +118 -0
  398. package/src/manifest/__tests__/useApplyManifest.test.tsx +237 -0
  399. package/src/manifest/__tests__/useEditResourceYaml.test.tsx +252 -0
  400. package/src/manifest/index.ts +33 -0
  401. package/src/manifest/useApplyManifest.ts +270 -0
  402. package/src/manifest/useEditResourceYaml.ts +273 -0
  403. package/src/mcp-server/steps/ReviewStep.tsx +2 -3
  404. package/src/pricing-governance/BaselineEditor.tsx +652 -0
  405. package/src/pricing-governance/ModelCatalogPanel.tsx +283 -0
  406. package/src/pricing-governance/ModelGovernanceDetail.tsx +289 -0
  407. package/src/pricing-governance/OperatorAccessNotice.tsx +32 -0
  408. package/src/pricing-governance/PricingGovernanceConsole.tsx +465 -0
  409. package/src/pricing-governance/PricingGovernancePanel.tsx +166 -0
  410. package/src/pricing-governance/RetireConfirm.tsx +82 -0
  411. package/src/pricing-governance/__tests__/ModelCatalogPanel.test.tsx +253 -0
  412. package/src/pricing-governance/__tests__/PricingGovernanceConsole.test.tsx +410 -0
  413. package/src/pricing-governance/__tests__/useModelGovernanceView.test.tsx +308 -0
  414. package/src/pricing-governance/governance-primitives.tsx +133 -0
  415. package/src/pricing-governance/index.ts +50 -0
  416. package/src/pricing-governance/pricing-format.ts +53 -0
  417. package/src/pricing-governance/useDecidePricingOverride.ts +78 -0
  418. package/src/pricing-governance/useModelGovernanceView.ts +290 -0
  419. package/src/pricing-governance/useModelPricingBaselines.ts +69 -0
  420. package/src/pricing-governance/usePricingGovernance.ts +57 -0
  421. package/src/pricing-governance/useRetireModelPricingBaseline.ts +65 -0
  422. package/src/pricing-governance/useUpsertModelPricingBaseline.ts +72 -0
  423. package/src/resource-creation/templates/workflow-templates.ts +4 -4
  424. package/src/session/__tests__/useCreateSession.test.tsx +94 -0
  425. package/src/session/__tests__/useNewSessionFlow.test.tsx +33 -0
  426. package/src/session/useCreateSession.ts +30 -0
  427. package/src/session/useEditSessionPrep.ts +3 -3
  428. package/src/session/useNewSessionFlow.ts +45 -1
  429. package/src/session/useUpdateSession.ts +29 -10
  430. package/src/settings/__tests__/useSettingsNavGroups.test.tsx +138 -0
  431. package/src/settings/index.ts +5 -1
  432. package/src/settings/settings-nav.ts +43 -0
  433. package/src/settings/useSettingsNavGroups.ts +81 -0
  434. package/src/workflow/WorkflowYamlEditor.tsx +6 -270
  435. package/styles.css +1 -1
  436. package/workflow/CanvasTransitionEdge.d.ts +1 -1
  437. package/workflow/WorkflowYamlEditor.d.ts +2 -42
  438. package/workflow/WorkflowYamlEditor.d.ts.map +1 -1
  439. package/workflow/WorkflowYamlEditor.js +5 -214
  440. package/workflow/WorkflowYamlEditor.js.map +1 -1
  441. package/library/ImportResourceDialog.d.ts +0 -43
  442. package/library/ImportResourceDialog.d.ts.map +0 -1
  443. package/library/ImportResourceDialog.js +0 -90
  444. package/library/ImportResourceDialog.js.map +0 -1
  445. package/library/parse-resource-yaml.d.ts +0 -63
  446. package/library/parse-resource-yaml.d.ts.map +0 -1
  447. package/library/parse-resource-yaml.js +0 -407
  448. package/library/parse-resource-yaml.js.map +0 -1
  449. package/library/serialize-resource-yaml.d.ts +0 -103
  450. package/library/serialize-resource-yaml.d.ts.map +0 -1
  451. package/library/serialize-resource-yaml.js +0 -565
  452. package/library/serialize-resource-yaml.js.map +0 -1
  453. package/library/useImportResource.d.ts +0 -84
  454. package/library/useImportResource.d.ts.map +0 -1
  455. package/library/useImportResource.js +0 -188
  456. package/library/useImportResource.js.map +0 -1
  457. package/src/library/ImportResourceDialog.tsx +0 -227
  458. package/src/library/parse-resource-yaml.ts +0 -630
  459. package/src/library/serialize-resource-yaml.ts +0 -756
  460. package/src/library/useImportResource.ts +0 -253
@@ -1 +1 @@
1
- {"version":3,"file":"ReviewStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/ReviewStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,UAAU,EACV,KAAK,GACN,EAAE,eAAe,2CAmGjB;AAyCD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,eAAe,GACpB,UAAU,CAkCZ"}
1
+ {"version":3,"file":"ReviewStep.d.ts","sourceRoot":"","sources":["../../../src/agent/steps/ReviewStep.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,UAAU,EACV,KAAK,GACN,EAAE,eAAe,2CAmGjB;AAyCD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,eAAe,GACpB,UAAU,CAkCZ"}
@@ -2,8 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
- import { getUserMessage } from "@stigmer/sdk";
6
- import { serializeAgentInputYaml } from "../../library/serialize-resource-yaml.js";
5
+ import { buildAgentProto, getUserMessage, serializeManifest } from "@stigmer/sdk";
7
6
  /**
8
7
  * Wizard step 3: Review and create.
9
8
  *
@@ -13,7 +12,7 @@ import { serializeAgentInputYaml } from "../../library/serialize-resource-yaml.j
13
12
  */
14
13
  export function ReviewStep({ org, data, isCreating, error, }) {
15
14
  const agentInput = useMemo(() => buildAgentInput(org, data), [org, data]);
16
- const yamlPreview = useMemo(() => serializeAgentInputYaml(agentInput), [agentInput]);
15
+ const yamlPreview = useMemo(() => serializeManifest(buildAgentProto(agentInput)), [agentInput]);
17
16
  return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Review & Create" }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Review the agent configuration below, then create it." })] }), _jsx("div", { className: "rounded-lg border border-border p-4", children: _jsxs("dl", { className: "grid gap-x-6 gap-y-3 text-sm sm:grid-cols-2", children: [_jsx(SummaryItem, { label: "Name", value: data.name }), _jsx(SummaryItem, { label: "Slug", value: data.slug, mono: true }), _jsx(SummaryItem, { label: "Organization", value: org, mono: true }), _jsx(SummaryItem, { label: "Visibility", value: data.visibility === "public" ? "Public" : "Private" }), data.description && (_jsx(SummaryItem, { label: "Description", value: data.description, className: "sm:col-span-2" })), data.instructions && (_jsx(SummaryItem, { label: "Instructions", value: truncate(data.instructions, 120), className: "sm:col-span-2" })), _jsx(SummaryItem, { label: "MCP Servers", value: data.mcpServerUsages.length > 0
18
17
  ? `${data.mcpServerUsages.length} configured`
19
18
  : "None" }), _jsx(SummaryItem, { label: "Skills", value: data.skillRefs.length > 0
@@ -1 +1 @@
1
- {"version":3,"file":"ReviewStep.js","sourceRoot":"","sources":["../../../src/agent/steps/ReviewStep.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAWnF;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,UAAU,EACV,KAAK,GACW;IAChB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC,EACzC,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,aAClC,0BACE,aAAI,SAAS,EAAC,uCAAuC,gCAEhD,EACL,YAAG,SAAS,EAAC,oCAAoC,sEAE7C,IACA,EAGN,cAAK,SAAS,EAAC,qCAAqC,YAClD,cAAI,SAAS,EAAC,6CAA6C,aACzD,KAAC,WAAW,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,GAAI,EAC9C,KAAC,WAAW,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,SAAG,EACnD,KAAC,WAAW,IAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI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qB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
package/billing/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ // Billing — the customer-facing surface: subscription plans, credit
2
+ // balance and ledger, payment methods, usage reports, and customer model
3
+ // pricing. The platform-operator pricing surface (registry baseline
4
+ // authoring, override sign-offs) lives in ../pricing-governance.
1
5
  // Data hooks
2
6
  export { useBillingAccount } from "./useBillingAccount.js";
3
7
  export { useCreditLedger } from "./useCreditLedger.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,iBAAiB;AACjB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAMzE,oBAAoB;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,+CAA+C;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAErF,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,yEAAyE;AACzE,oEAAoE;AACpE,iEAAiE;AAEjE,aAAa;AACb,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CA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B,kBAAkB,CAAC,EACjC,KAAK,EACL,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,SAAS,GACV,EAAE,uBAAuB,2CA0QzB"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useCallback, useState } from "react";
4
- import { KeyRound, MessageSquare, MoreHorizontal, Trash2 } from "lucide-react";
4
+ import { FileCode2, KeyRound, MessageSquare, MoreHorizontal, Trash2 } from "lucide-react";
5
5
  import { cn } from "@stigmer/theme";
6
6
  import { getUserMessage } from "@stigmer/sdk";
7
7
  import { AgentChannelInstallState } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/status_pb";
@@ -14,6 +14,7 @@ import { useChannelAppList } from "../channel-app/useChannelAppList.js";
14
14
  import { useCheckPermission } from "../iam-policy/useCheckPermission.js";
15
15
  import { ConfirmDialog } from "../resource-detail/ConfirmDialog.js";
16
16
  import { useConfirmAction } from "../resource-detail/useConfirmAction.js";
17
+ import { EditResourceYamlDialog } from "../manifest/EditResourceYamlDialog.js";
17
18
  import { useDeploymentMode } from "../deployment-mode.js";
18
19
  import { CloudFeatureNotice } from "../internal/CloudFeatureNotice.js";
19
20
  import { ChannelConversationsDialog } from "./ChannelConversationsDialog.js";
@@ -75,6 +76,8 @@ export function AgentChannelsPanel({ agent, onConnectExternal, channelAppsHref,
75
76
  // The channel whose conversations are being viewed (DD-012: read-only
76
77
  // channel-session observability for the channel's viewers).
77
78
  const [viewingConversations, setViewingConversations] = useState(null);
79
+ // The channel being edited as YAML (the kind-agnostic manifest flow).
80
+ const [editingYaml, setEditingYaml] = useState(null);
78
81
  const handleConnect = useCallback((channel, provider) => {
79
82
  // Only redirect-style installs need the host hand-off (they open a
80
83
  // popup the desktop webview cannot); direct installs are a plain
@@ -137,7 +140,7 @@ export function AgentChannelsPanel({ agent, onConnectExternal, channelAppsHref,
137
140
  CHANNEL_PROVIDERS[0];
138
141
  return (_jsx(ChannelCard, { agent: agent, channel: channel, channelApps: channelApps, connectAvailable: installsAvailable ||
139
142
  (cardProvider.installStyle === "redirect" &&
140
- !!onConnectExternal), onConnectClick: () => handleConnect(channel, cardProvider), onDeleteClick: () => void handleDelete(channel), onEditCredentials: () => setEditingCredentials(channel), onViewConversations: () => setViewingConversations(channel), refetch: refetch }, channel.metadata?.id));
143
+ !!onConnectExternal), onConnectClick: () => handleConnect(channel, cardProvider), onDeleteClick: () => void handleDelete(channel), onEditCredentials: () => setEditingCredentials(channel), onViewConversations: () => setViewingConversations(channel), onEditYaml: () => setEditingYaml(channel), refetch: refetch }, channel.metadata?.id));
141
144
  }) })] })), connecting && connectingProvider?.id === "whatsapp" ? (_jsx(ConnectWhatsAppDialog, { open: true, onOpenChange: (open) => {
142
145
  if (!open)
143
146
  setConnecting(null);
@@ -150,9 +153,12 @@ export function AgentChannelsPanel({ agent, onConnectExternal, channelAppsHref,
150
153
  }, agent: agent, channel: editingCredentials, onSaved: refetch })), viewingConversations && (_jsx(ChannelConversationsDialog, { open: true, onOpenChange: (open) => {
151
154
  if (!open)
152
155
  setViewingConversations(null);
153
- }, channel: viewingConversations, sessionHref: sessionHref })), _jsx(ConfirmDialog, { state: confirmState, onConfirm: handleConfirm, onCancel: handleCancel })] }));
156
+ }, channel: viewingConversations, sessionHref: sessionHref })), editingYaml && (_jsx(EditResourceYamlDialog, { open: true, onOpenChange: (open) => {
157
+ if (!open)
158
+ setEditingYaml(null);
159
+ }, resource: editingYaml, onApplied: refetch })), _jsx(ConfirmDialog, { state: confirmState, onConfirm: handleConfirm, onCancel: handleCancel })] }));
154
160
  }
155
- function ChannelCard({ agent, channel, channelApps, connectAvailable, onConnectClick, onDeleteClick, onEditCredentials, onViewConversations, refetch, }) {
161
+ function ChannelCard({ agent, channel, channelApps, connectAvailable, onConnectClick, onDeleteClick, onEditCredentials, onViewConversations, onEditYaml, refetch, }) {
156
162
  const meta = channel.metadata;
157
163
  const id = meta?.id ?? "";
158
164
  const enabled = channel.spec?.enabled ?? false;
@@ -197,7 +203,7 @@ function ChannelCard({ agent, channel, channelApps, connectAvailable, onConnectC
197
203
  connectAvailable &&
198
204
  installState !== AgentChannelInstallState.installed && (_jsx(Button, { variant: "outline", size: "xs", onClick: onConnectClick, children: installState === AgentChannelInstallState.revoked
199
205
  ? "Reconnect"
200
- : "Connect" })), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Trigger, { "aria-label": `Actions for ${meta?.name || meta?.slug}`, children: _jsx(MoreHorizontal, { className: "size-4" }) }), _jsxs(ActionMenu.Content, { children: [_jsx(ActionMenu.Item, { icon: _jsx(MessageSquare, {}), onSelect: onViewConversations, "data-cursor-target": "channel-conversations", children: "Conversations" }), canEdit && (_jsx(ActionMenu.Item, { icon: _jsx(KeyRound, {}), onSelect: onEditCredentials, children: "Tool credentials" })), canDelete && (_jsx(ActionMenu.Item, { icon: _jsx(Trash2, {}), variant: "destructive", onSelect: onDeleteClick, children: "Disconnect" }))] })] })] })] }), _jsx(CardReadinessWarning, { agent: agent, channel: channel, canEdit: canEdit, onEditCredentials: onEditCredentials })] }));
206
+ : "Connect" })), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Trigger, { "aria-label": `Actions for ${meta?.name || meta?.slug}`, children: _jsx(MoreHorizontal, { className: "size-4" }) }), _jsxs(ActionMenu.Content, { children: [_jsx(ActionMenu.Item, { icon: _jsx(MessageSquare, {}), onSelect: onViewConversations, "data-cursor-target": "channel-conversations", children: "Conversations" }), canEdit && (_jsx(ActionMenu.Item, { icon: _jsx(KeyRound, {}), onSelect: onEditCredentials, children: "Tool credentials" })), canEdit && (_jsx(ActionMenu.Item, { icon: _jsx(FileCode2, {}), onSelect: onEditYaml, children: "Edit YAML" })), canDelete && (_jsx(ActionMenu.Item, { icon: _jsx(Trash2, {}), variant: "destructive", onSelect: onDeleteClick, children: "Disconnect" }))] })] })] })] }), _jsx(CardReadinessWarning, { agent: agent, channel: channel, canEdit: canEdit, onEditCredentials: onEditCredentials })] }));
201
207
  }
202
208
  /**
203
209
  * Serving-readiness warning for tool-using agents: channel executions
@@ -1 +1 @@
1
- {"version":3,"file":"AgentChannelsPanel.js","sourceRoot":"","sources":["../../src/channel/AgentChannelsPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,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AAC,CAAC,wBACZ,WAAW,CAAC,CAAC,EAAE,EAAE,4BAEzB,CAAC,CAAC,KAAK,KANd,CAAC,CAAC,EAAE,CAOF,CACV,CAAC,GACG,CACR,GACU,CACd,CAAC;AACJ,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CACL,cAAK,SAAS,EAAC,gBAAgB,YAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACjB,cAAa,SAAS,EAAC,8CAA8C,IAA3D,CAAC,CAA6D,CACzE,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -402,7 +402,7 @@ export interface SessionComposerProps {
402
402
  *
403
403
  * @example
404
404
  * ```tsx
405
- * const yaml = serializeAgentYaml(agent);
405
+ * const yaml = serializeManifest(agent);
406
406
  * const file = new File([yaml], "my-agent.yaml", { type: "text/yaml" });
407
407
  *
408
408
  * <SessionComposer
@@ -0,0 +1,34 @@
1
+ import { type CursorAccount } from "@stigmer/protos/ai/stigmer/platform/cursoraccount/v1/cursor_account_pb";
2
+ /** Props for {@link CursorAccountEditor}. */
3
+ export interface CursorAccountEditorProps {
4
+ /** The account to edit, or `null` to create a new one. */
5
+ readonly initial: CursorAccount | null;
6
+ /** `true` while the save is in flight. */
7
+ readonly isSubmitting: boolean;
8
+ /** Error from the last failed save, or `null`. */
9
+ readonly submitError: Error | null;
10
+ /** Called with the assembled account on submit. */
11
+ readonly onSubmit: (account: CursorAccount) => void;
12
+ /** Called when the operator cancels. */
13
+ readonly onCancel: () => void;
14
+ /** Additional CSS class names. */
15
+ readonly className?: string;
16
+ }
17
+ /**
18
+ * Create/edit form for one Cursor account: identity, team Admin API key,
19
+ * enablement, and dedicated-org assignments. The account's class is
20
+ * derived (DD-008): listed org ids make it DEDICATED to them, an empty
21
+ * list makes it a shared-pool account — there is no flag to manage.
22
+ *
23
+ * Admin-key semantics mirror the server contract: on edit the field
24
+ * shows the redaction marker and submitting it unchanged keeps the
25
+ * stored key; typing anything else rotates it (validated live against
26
+ * Cursor before persisting). Member keys are NOT edited here — they have
27
+ * their own panel with per-key add/remove/enable.
28
+ *
29
+ * The optional team invite link (Cursor dashboard → Invite Members →
30
+ * Copy Invite Link) round-trips readable — no marker — and powers the
31
+ * coverage table's "Copy invite" action for off-team key owners.
32
+ */
33
+ export declare function CursorAccountEditor({ initial, isSubmitting, submitError, onSubmit, onCancel, className, }: CursorAccountEditorProps): import("react/jsx-runtime").JSX.Element;
34
+ //# sourceMappingURL=CursorAccountEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorAccountEditor.d.ts","sourceRoot":"","sources":["../../src/cursor-accounts/CursorAccountEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,wEAAwE,CAAC;AAUhF,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IACvC,0CAA0C;IAC1C,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,WAAW,EAAE,KAAK,GAAG,IAAI,CAAC;IACnC,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IACpD,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,kCAAkC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,2CA0K1B"}
@@ -0,0 +1,67 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { create } from "@bufbuild/protobuf";
5
+ import { cn } from "@stigmer/theme";
6
+ import { getUserMessage } from "@stigmer/sdk";
7
+ import { CursorAccountSchema, } from "@stigmer/protos/ai/stigmer/platform/cursoraccount/v1/cursor_account_pb";
8
+ import { Button } from "../button/index.js";
9
+ import { Field, INPUT_CLASSES } from "../internal/form-primitives.js";
10
+ /**
11
+ * The redaction marker the server uses for stored secrets. Sending it
12
+ * back on update means "keep the stored admin key".
13
+ */
14
+ const REDACTED = "***REDACTED***";
15
+ /**
16
+ * Create/edit form for one Cursor account: identity, team Admin API key,
17
+ * enablement, and dedicated-org assignments. The account's class is
18
+ * derived (DD-008): listed org ids make it DEDICATED to them, an empty
19
+ * list makes it a shared-pool account — there is no flag to manage.
20
+ *
21
+ * Admin-key semantics mirror the server contract: on edit the field
22
+ * shows the redaction marker and submitting it unchanged keeps the
23
+ * stored key; typing anything else rotates it (validated live against
24
+ * Cursor before persisting). Member keys are NOT edited here — they have
25
+ * their own panel with per-key add/remove/enable.
26
+ *
27
+ * The optional team invite link (Cursor dashboard → Invite Members →
28
+ * Copy Invite Link) round-trips readable — no marker — and powers the
29
+ * coverage table's "Copy invite" action for off-team key owners.
30
+ */
31
+ export function CursorAccountEditor({ initial, isSubmitting, submitError, onSubmit, onCancel, className, }) {
32
+ const isCreate = initial === null;
33
+ const [displayName, setDisplayName] = useState(initial?.displayName ?? "");
34
+ const [adminApiKey, setAdminApiKey] = useState(isCreate ? "" : REDACTED);
35
+ const [enabled, setEnabled] = useState(initial?.enabled ?? true);
36
+ // UI state is the positive ("on-demand enabled", Cursor's own wording and
37
+ // team default); the proto field is the negative so absence means
38
+ // "assume Cursor's default" on documents that predate the field.
39
+ const [onDemandEnabled, setOnDemandEnabled] = useState(!(initial?.onDemandUsageDisabled ?? false));
40
+ const [orgIdsText, setOrgIdsText] = useState((initial?.orgIds ?? []).join("\n"));
41
+ // Unlike the admin key, the invite link round-trips readable (the
42
+ // server decrypts it on read — operators must be able to copy it), so
43
+ // there is no redaction-marker dance: edit the value directly.
44
+ const [teamInviteLink, setTeamInviteLink] = useState(initial?.teamInviteLink ?? "");
45
+ const canSubmit = displayName.trim() !== "" && adminApiKey.trim() !== "" && !isSubmitting;
46
+ const handleSubmit = (e) => {
47
+ e.preventDefault();
48
+ if (!canSubmit)
49
+ return;
50
+ onSubmit(create(CursorAccountSchema, {
51
+ accountId: initial?.accountId ?? "",
52
+ displayName: displayName.trim(),
53
+ adminApiKey: adminApiKey.trim(),
54
+ enabled,
55
+ // is_platform_default is deprecated (DD-008): the shared pool is
56
+ // derived from empty org_ids, so current clients never write it.
57
+ onDemandUsageDisabled: !onDemandEnabled,
58
+ teamInviteLink: teamInviteLink.trim(),
59
+ orgIds: orgIdsText
60
+ .split(/[\s,]+/)
61
+ .map((s) => s.trim())
62
+ .filter((s) => s !== ""),
63
+ }));
64
+ };
65
+ return (_jsxs("form", { className: cn("max-w-xl space-y-3", className), onSubmit: handleSubmit, children: [_jsx("h3", { className: "text-sm font-semibold text-foreground", children: isCreate ? "Add Cursor account" : `Edit ${initial.displayName}` }), _jsx(Field, { label: "Display name", required: true, children: _jsx("input", { className: INPUT_CLASSES, value: displayName, onChange: (e) => setDisplayName(e.target.value), placeholder: "e.g. scenar.ai team", disabled: isSubmitting }) }), _jsx(Field, { label: "Team Admin API key", required: true, children: _jsx("input", { className: INPUT_CLASSES, type: "password", value: adminApiKey, onChange: (e) => setAdminApiKey(e.target.value), placeholder: "key from Cursor dashboard \u2192 API \u2192 Team tab", disabled: isSubmitting, autoComplete: "off" }) }), !isCreate && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Leave the masked value untouched to keep the stored key; typing a new key rotates it (validated against Cursor before saving)." })), _jsx(Field, { label: "Team invite link", children: _jsx("input", { className: INPUT_CLASSES, type: "url", value: teamInviteLink, onChange: (e) => setTeamInviteLink(e.target.value), placeholder: "https://\u2026 (Cursor dashboard \u2192 Invite Members \u2192 Copy Invite Link)", disabled: isSubmitting, autoComplete: "off", spellCheck: false }) }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "Optional. Powers one-click \"Copy invite\" on coverage rows whose key owner is not on the team. The link is long-lived and joinable by anyone holding it (each join consumes a paid seat) \u2014 share it deliberately, and revoke or rotate it from the Cursor dashboard. Leave empty to clear." }), _jsx(Field, { label: "Dedicated organization ids", children: _jsx("textarea", { className: cn(INPUT_CLASSES, "min-h-16 font-mono"), value: orgIdsText, onChange: (e) => setOrgIdsText(e.target.value), placeholder: "one org id per line\n(leave empty for a shared-pool account)", disabled: isSubmitting }) }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "Listing org ids DEDICATES this account to them: their sessions use only this account's keys and fail with a clear message when it runs dry. Leaving this empty makes the account part of the shared pool that serves every other org \u2014 pool sessions may move between pool accounts when one is depleted. Each org may appear in at most one account." }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { children: [_jsxs("label", { className: "flex items-center gap-1.5 text-xs text-foreground", children: [_jsx("input", { type: "checkbox", checked: enabled, onChange: (e) => setEnabled(e.target.checked), disabled: isSubmitting }), "Enabled for key selection"] }), _jsx("p", { className: "mt-0.5 pl-[1.375rem] text-[11px] text-muted-foreground", children: "Leave checked for accounts that should serve traffic. Unchecking drains the account: new sessions stop routing here immediately, but sessions already pinned to one of its keys keep working." })] }), _jsxs("div", { children: [_jsxs("label", { className: "flex items-center gap-1.5 text-xs text-foreground", children: [_jsx("input", { type: "checkbox", checked: onDemandEnabled, onChange: (e) => setOnDemandEnabled(e.target.checked), disabled: isSubmitting }), "On-demand usage enabled (as configured in the Cursor dashboard)"] }), _jsx("p", { className: "mt-0.5 pl-[1.375rem] text-[11px] text-muted-foreground", children: "Declared here because Cursor's Admin API cannot report the team's on-demand setting. Uncheck only when the dashboard has on-demand usage OFF: new sessions then avoid member keys whose included third-party (API) pool is nearly spent, since such keys can no longer serve third-party models at all." })] })] }), submitError && (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: getUserMessage(submitError) })), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { type: "submit", size: "sm", disabled: !canSubmit, children: isSubmitting ? "Saving…" : isCreate ? "Create account" : "Save changes" }), _jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: onCancel, disabled: isSubmitting, children: "Cancel" })] })] }));
66
+ }
67
+ //# sourceMappingURL=CursorAccountEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorAccountEditor.js","sourceRoot":"","sources":["../../src/cursor-accounts/CursorAccountEditor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,mBAAmB,GAEpB,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;GAGG;AACH,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAkBlC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,GACgB;IACzB,MAAM,QAAQ,GAAG,OAAO,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,WAAW,IAAI,EAAE,CAAC,CAAC;IAC3E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,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AI,EAAC,IAAI,EAAC,QAAQ,EAAE,CAAC,SAAS,YACjD,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,GACjE,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,uBAElF,IACL,IACD,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The access-denied state for the Cursor-accounts operator surface.
3
+ * Server-side authorization (`can_manage_cursor_accounts` on
4
+ * `platform:stigmer`) is the real gate — this is the honest, designed
5
+ * face of that denial for anyone who navigates to the operator route
6
+ * without the permission, instead of a raw RPC error string.
7
+ */
8
+ export declare function CursorAccountsAccessNotice({ className, }: {
9
+ readonly className?: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=CursorAccountsAccessNotice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorAccountsAccessNotice.d.ts","sourceRoot":"","sources":["../../src/cursor-accounts/CursorAccountsAccessNotice.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,2CAoBA"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@stigmer/theme";
4
+ /**
5
+ * The access-denied state for the Cursor-accounts operator surface.
6
+ * Server-side authorization (`can_manage_cursor_accounts` on
7
+ * `platform:stigmer`) is the real gate — this is the honest, designed
8
+ * face of that denial for anyone who navigates to the operator route
9
+ * without the permission, instead of a raw RPC error string.
10
+ */
11
+ export function CursorAccountsAccessNotice({ className, }) {
12
+ return (_jsxs("div", { className: cn("rounded-lg border border-border bg-card px-4 py-6 text-center", className), role: "status", children: [_jsx("p", { className: "text-xs font-semibold text-foreground", children: "Platform operator access required" }), _jsx("p", { className: "mx-auto mt-1 max-w-md text-xs text-muted-foreground", children: "Cursor account management is a Stigmer-internal surface holding provider credentials and team spend. It needs the platform operator role \u2014 organization roles do not grant it. If you believe you should have access, contact a platform operator." })] }));
13
+ }
14
+ //# sourceMappingURL=CursorAccountsAccessNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorAccountsAccessNotice.js","sourceRoot":"","sources":["../../src/cursor-accounts/CursorAccountsAccessNotice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,SAAS,GAGV;IACC,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,EACD,IAAI,EAAC,QAAQ,aAEb,YAAG,SAAS,EAAC,uCAAuC,kDAEhD,EACJ,YAAG,SAAS,EAAC,qDAAqD,wQAK9D,IACA,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** Props for {@link CursorAccountsConsole}. */
2
+ export interface CursorAccountsConsoleProps {
3
+ /** Additional CSS class names. */
4
+ readonly className?: string;
5
+ }
6
+ /**
7
+ * The platform-operator console for managed Cursor accounts: the Cursor
8
+ * teams (admin keys, member execution keys, org assignments) that back
9
+ * the cursor harness, with roster coverage and per-member usage from
10
+ * the hourly sync.
11
+ *
12
+ * - **List** — every account with routability at a glance (an account
13
+ * with zero enabled member keys cannot serve executions).
14
+ * - **Detail** — org assignments, "Sync now", and the team-coverage
15
+ * table: every member and stored key classified into three explicit
16
+ * categories (on team with key / on team without key / key held but
17
+ * not on team), each row carrying Cursor's pool-usage percentages
18
+ * (first-party / API) and cycle spend dollars (included / on-demand).
19
+ * Off-team rows offer one-click copy of the account's Cursor team
20
+ * invite link when the operator has configured one.
21
+ *
22
+ * Requires `can_manage_cursor_accounts` on `platform:stigmer` —
23
+ * non-operators see the designed access notice. Key material never
24
+ * reaches this component; the server redacts it on every read.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <CursorAccountsConsole />
29
+ * ```
30
+ */
31
+ export declare function CursorAccountsConsole({ className }: CursorAccountsConsoleProps): import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=CursorAccountsConsole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CursorAccountsConsole.d.ts","sourceRoot":"","sources":["../../src/cursor-accounts/CursorAccountsConsole.tsx"],"names":[],"mappings":"AAqBA,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,kCAAkC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,EAAE,0BAA0B,2CA6G9E"}
@@ -0,0 +1,169 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useState } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ import { getUserMessage, isPermissionDenied } from "@stigmer/sdk";
6
+ import { Button } from "../button/index.js";
7
+ import { StateBadge } from "./badges.js";
8
+ import { CursorAccountEditor } from "./CursorAccountEditor.js";
9
+ import { CursorAccountsAccessNotice } from "./CursorAccountsAccessNotice.js";
10
+ import { deriveCoverage } from "./cursor-account-coverage.js";
11
+ import { formatSyncTime } from "./cursor-account-format.js";
12
+ import { MemberKeysPanel } from "./MemberKeysPanel.js";
13
+ import { useCursorAccounts } from "./useCursorAccounts.js";
14
+ import { useCursorAccountView } from "./useCursorAccountView.js";
15
+ import { useCursorMemberKeyActions } from "./useCursorMemberKeyActions.js";
16
+ import { useDeleteCursorAccount } from "./useDeleteCursorAccount.js";
17
+ import { useSyncCursorAccount } from "./useSyncCursorAccount.js";
18
+ import { useUpsertCursorAccount } from "./useUpsertCursorAccount.js";
19
+ /**
20
+ * The platform-operator console for managed Cursor accounts: the Cursor
21
+ * teams (admin keys, member execution keys, org assignments) that back
22
+ * the cursor harness, with roster coverage and per-member usage from
23
+ * the hourly sync.
24
+ *
25
+ * - **List** — every account with routability at a glance (an account
26
+ * with zero enabled member keys cannot serve executions).
27
+ * - **Detail** — org assignments, "Sync now", and the team-coverage
28
+ * table: every member and stored key classified into three explicit
29
+ * categories (on team with key / on team without key / key held but
30
+ * not on team), each row carrying Cursor's pool-usage percentages
31
+ * (first-party / API) and cycle spend dollars (included / on-demand).
32
+ * Off-team rows offer one-click copy of the account's Cursor team
33
+ * invite link when the operator has configured one.
34
+ *
35
+ * Requires `can_manage_cursor_accounts` on `platform:stigmer` —
36
+ * non-operators see the designed access notice. Key material never
37
+ * reaches this component; the server redacts it on every read.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <CursorAccountsConsole />
42
+ * ```
43
+ */
44
+ export function CursorAccountsConsole({ className }) {
45
+ const [flow, setFlow] = useState({ phase: "list" });
46
+ const list = useCursorAccounts();
47
+ const backToList = useCallback(() => setFlow({ phase: "list" }), []);
48
+ if (list.isLoading) {
49
+ return (_jsxs("div", { className: cn("space-y-2", className), "aria-busy": "true", children: [_jsx("div", { className: "h-4 w-40 animate-pulse rounded bg-muted-subtle" }), Array.from({ length: 3 }, (_, i) => (_jsx("div", { className: "h-10 animate-pulse rounded-lg bg-muted-subtle" }, i)))] }));
50
+ }
51
+ if (list.error) {
52
+ // A non-operator landing here is expected (the route is reachable by
53
+ // URL) — show the designed access notice, not a raw RPC error.
54
+ if (isPermissionDenied(list.error)) {
55
+ return _jsx(CursorAccountsAccessNotice, { className: className });
56
+ }
57
+ return (_jsx("p", { className: cn("text-destructive text-xs", className), role: "alert", children: getUserMessage(list.error) }));
58
+ }
59
+ if (flow.phase === "create") {
60
+ return (_jsx(CreatePane, { className: className, onSaved: () => {
61
+ list.refetch();
62
+ backToList();
63
+ }, onCancel: backToList }));
64
+ }
65
+ if (flow.phase === "detail") {
66
+ return (_jsx(AccountDetail, { className: className, accountId: flow.accountId, editing: flow.editing, onEditingChange: (editing) => setFlow({ phase: "detail", accountId: flow.accountId, editing }), onDeleted: () => {
67
+ list.refetch();
68
+ backToList();
69
+ }, onChanged: list.refetch, onBack: backToList }));
70
+ }
71
+ const accounts = list.accounts?.accounts ?? [];
72
+ return (_jsxs("div", { className: cn("space-y-3", className), children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Cursor accounts" }), _jsx(Button, { size: "sm", onClick: () => setFlow({ phase: "create" }), children: "Add account" })] }), _jsxs("div", { className: "rounded-lg border border-border bg-card", children: [_jsxs("div", { "aria-hidden": "true", className: "grid grid-cols-[2fr_1fr_1fr_1fr_1fr] gap-2 border-b border-border px-3 py-2 text-[11px] font-medium text-muted-foreground", children: [_jsx("span", { children: "Account" }), _jsx("span", { children: "Orgs" }), _jsx("span", { children: "Status" }), _jsx("span", { children: "Execution keys" }), _jsx("span", { className: "text-right", children: "Last synced" })] }), accounts.length === 0 ? (_jsx("p", { className: "px-3 py-2 text-xs text-muted-foreground", children: "No Cursor accounts yet. Add one with its team Admin API key, then add member execution keys to make it routable." })) : (_jsx("ul", { role: "list", "aria-label": "Cursor accounts", className: "m-0 list-none p-0", children: accounts.map((summary) => (_jsx(AccountRow, { summary: summary, onOpen: () => setFlow({
73
+ phase: "detail",
74
+ accountId: summary.account?.accountId ?? "",
75
+ editing: false,
76
+ }) }, summary.account?.accountId))) }))] })] }));
77
+ }
78
+ // ---------------------------------------------------------------------------
79
+ // List row (internal)
80
+ // ---------------------------------------------------------------------------
81
+ function AccountRow({ summary, onOpen, }) {
82
+ const account = summary.account;
83
+ if (!account)
84
+ return null;
85
+ return (_jsx("li", { className: "border-b border-border last:border-b-0", children: _jsxs("button", { type: "button", onClick: onOpen, className: cn("grid w-full grid-cols-[2fr_1fr_1fr_1fr_1fr] items-center gap-2 px-3 py-2 text-left text-xs", "transition-colors hover:bg-accent", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"), children: [_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate font-medium text-foreground", children: account.displayName }), account.orgIds.length === 0 && (_jsx("span", { className: "block text-[11px] text-muted-foreground", children: "shared pool" }))] }), _jsx("span", { className: "text-muted-foreground", children: account.orgIds.length > 0 ? account.orgIds.length : "—" }), _jsx("span", { children: _jsx(StateBadge, { tone: account.enabled ? "ok" : "muted", label: account.enabled ? "Enabled" : "Disabled" }) }), _jsx("span", { children: summary.enabledKeyCount > 0 ? (_jsx("span", { className: "text-muted-foreground", children: summary.enabledKeyCount })) : (_jsx(StateBadge, { tone: "warn", label: "Not routable" })) }), _jsx("span", { className: "text-right text-muted-foreground", children: formatSyncTime(summary.lastSyncedAt) })] }) }));
86
+ }
87
+ // ---------------------------------------------------------------------------
88
+ // Create pane (internal)
89
+ // ---------------------------------------------------------------------------
90
+ function CreatePane({ className, onSaved, onCancel, }) {
91
+ const { upsert, isSubmitting, error } = useUpsertCursorAccount();
92
+ return (_jsx("div", { className: className, children: _jsx(CursorAccountEditor, { initial: null, isSubmitting: isSubmitting, submitError: error, onSubmit: (account) => {
93
+ void upsert(account).then(onSaved, () => {
94
+ // Surfaced via submitError.
95
+ });
96
+ }, onCancel: onCancel }) }));
97
+ }
98
+ // ---------------------------------------------------------------------------
99
+ // Detail pane (internal)
100
+ // ---------------------------------------------------------------------------
101
+ function AccountDetail({ className, accountId, editing, onEditingChange, onDeleted, onChanged, onBack, }) {
102
+ const detail = useCursorAccountView(accountId);
103
+ const { upsert, isSubmitting: isSaving, error: saveError, clearError: clearSaveError } = useUpsertCursorAccount();
104
+ const { remove, isSubmitting: isDeleting, error: deleteError } = useDeleteCursorAccount();
105
+ const { sync, isSyncing, error: syncError } = useSyncCursorAccount();
106
+ const keyActions = useCursorMemberKeyActions();
107
+ const refreshAll = useCallback(() => {
108
+ detail.refetch();
109
+ onChanged();
110
+ }, [detail.refetch, onChanged]);
111
+ // After a bulk import, run the roster sync automatically so key badges
112
+ // (Active / Owner unknown / Owner left team) are current without a
113
+ // manual "Sync now". Sync failure still refreshes — the keys ARE added
114
+ // — and is surfaced via syncError.
115
+ const syncAfterImport = useCallback(() => {
116
+ void sync(accountId).then(refreshAll, refreshAll);
117
+ }, [sync, accountId, refreshAll]);
118
+ if (detail.isLoading) {
119
+ return (_jsxs("div", { className: cn("space-y-2", className), "aria-busy": "true", children: [_jsx("div", { className: "h-4 w-40 animate-pulse rounded bg-muted-subtle" }), _jsx("div", { className: "h-24 animate-pulse rounded-lg bg-muted-subtle" })] }));
120
+ }
121
+ if (detail.error || !detail.view?.account) {
122
+ return (_jsxs("div", { className: cn("space-y-2", className), children: [_jsx("p", { className: "text-destructive text-xs", role: "alert", children: detail.error ? getUserMessage(detail.error) : "Account not found." }), _jsx(Button, { size: "sm", variant: "outline", onClick: onBack, children: "Back to accounts" })] }));
123
+ }
124
+ const view = detail.view;
125
+ const account = view.account;
126
+ // Derived once here: the panel's table consumes the groups, the header
127
+ // line the member counts (active roster = covered + uncovered members —
128
+ // server-computed facts only, no role-string parsing in the client).
129
+ // The covered count is exactly one row per member because the server
130
+ // rejects a second key for an already-bound email, so the removed-seat
131
+ // count is plain list arithmetic: roster entries minus active members.
132
+ // It answers "where did my N members go?" when Cursor marks departed
133
+ // seats role:"removed" in place instead of dropping them.
134
+ const coverage = deriveCoverage(view);
135
+ const activeMemberCount = coverage.onTeamWithKey.length + coverage.onTeamWithoutKey.length;
136
+ const removedSeatCount = (view.snapshot?.members.length ?? 0) - activeMemberCount;
137
+ if (editing) {
138
+ return (_jsx("div", { className: className, children: _jsx(CursorAccountEditor, { initial: account, isSubmitting: isSaving, submitError: saveError, onSubmit: (edited) => {
139
+ void upsert(edited).then(() => {
140
+ refreshAll();
141
+ onEditingChange(false);
142
+ }, () => {
143
+ // Surfaced via submitError.
144
+ });
145
+ }, onCancel: () => {
146
+ clearSaveError();
147
+ onEditingChange(false);
148
+ } }) }));
149
+ }
150
+ return (_jsxs("div", { className: cn("space-y-4", className), children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-foreground", children: account.displayName }), _jsxs("p", { className: "text-[11px] text-muted-foreground", children: [account.orgIds.length > 0
151
+ ? `Dedicated to ${account.orgIds.length} org(s): ${account.orgIds.join(", ")}`
152
+ : "Shared pool — serves every org with no dedicated account", " · ", account.enabled ? "enabled" : "disabled", account.onDemandUsageDisabled
153
+ ? " · on-demand usage off (usage guard active)"
154
+ : "", " · synced ", formatSyncTime(view.snapshot?.syncedAt), coverage.hasRoster
155
+ ? ` · ${activeMemberCount} ${activeMemberCount === 1 ? "member" : "members"}`
156
+ : "", coverage.hasRoster && removedSeatCount > 0
157
+ ? ` · ${removedSeatCount} removed ${removedSeatCount === 1 ? "seat" : "seats"}`
158
+ : ""] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { size: "sm", variant: "outline", onClick: onBack, children: "Back" }), _jsx(Button, { size: "sm", variant: "outline", disabled: isSyncing, onClick: () => {
159
+ void sync(accountId).then(refreshAll, () => {
160
+ // Surfaced via syncError.
161
+ });
162
+ }, children: isSyncing ? "Syncing…" : "Sync now" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => onEditingChange(true), children: "Edit" }), _jsx(Button, { size: "sm", variant: "destructive", disabled: isDeleting, onClick: () => {
163
+ void remove({ accountId }).then(onDeleted, () => {
164
+ // Surfaced via deleteError (incl. the live-pin guard's
165
+ // "disable instead, or force" message).
166
+ });
167
+ }, children: isDeleting ? "Deleting…" : "Delete" })] })] }), syncError && (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: getUserMessage(syncError) })), deleteError && (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: getUserMessage(deleteError) })), view.snapshot?.syncError && (_jsxs("p", { className: "text-xs text-muted-foreground", role: "status", children: ["Last sync was partial: ", view.snapshot.syncError] })), _jsx(MemberKeysPanel, { accountId: accountId, view: view, coverage: coverage, actions: keyActions, onChanged: refreshAll, onImported: syncAfterImport })] }));
168
+ }
169
+ //# sourceMappingURL=CursorAccountsConsole.js.map