@stigmer/react 3.3.0 → 3.4.1

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 (344) hide show
  1. package/agent/useAgentCount.d.ts +2 -0
  2. package/agent/useAgentCount.d.ts.map +1 -1
  3. package/agent/useAgentCount.js.map +1 -1
  4. package/api-key/CreateApiKeyForm.d.ts +7 -1
  5. package/api-key/CreateApiKeyForm.d.ts.map +1 -1
  6. package/api-key/CreateApiKeyForm.js +2 -2
  7. package/api-key/CreateApiKeyForm.js.map +1 -1
  8. package/billing/index.d.ts +0 -18
  9. package/billing/index.d.ts.map +1 -1
  10. package/billing/index.js +4 -9
  11. package/billing/index.js.map +1 -1
  12. package/cursor-accounts/CursorAccountEditor.d.ts +7 -1
  13. package/cursor-accounts/CursorAccountEditor.d.ts.map +1 -1
  14. package/cursor-accounts/CursorAccountEditor.js +21 -5
  15. package/cursor-accounts/CursorAccountEditor.js.map +1 -1
  16. package/cursor-accounts/CursorAccountsConsole.d.ts +9 -5
  17. package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -1
  18. package/cursor-accounts/CursorAccountsConsole.js +34 -140
  19. package/cursor-accounts/CursorAccountsConsole.js.map +1 -1
  20. package/cursor-accounts/MemberCoverageTable.d.ts +29 -0
  21. package/cursor-accounts/MemberCoverageTable.d.ts.map +1 -0
  22. package/cursor-accounts/MemberCoverageTable.js +150 -0
  23. package/cursor-accounts/MemberCoverageTable.js.map +1 -0
  24. package/cursor-accounts/MemberKeysPanel.d.ts +25 -0
  25. package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -0
  26. package/cursor-accounts/MemberKeysPanel.js +115 -0
  27. package/cursor-accounts/MemberKeysPanel.js.map +1 -0
  28. package/cursor-accounts/badges.d.ts +9 -0
  29. package/cursor-accounts/badges.d.ts.map +1 -0
  30. package/cursor-accounts/badges.js +10 -0
  31. package/cursor-accounts/badges.js.map +1 -0
  32. package/cursor-accounts/cursor-account-coverage.d.ts +41 -0
  33. package/cursor-accounts/cursor-account-coverage.d.ts.map +1 -0
  34. package/cursor-accounts/cursor-account-coverage.js +26 -0
  35. package/cursor-accounts/cursor-account-coverage.js.map +1 -0
  36. package/cursor-accounts/cursor-account-format.d.ts +13 -0
  37. package/cursor-accounts/cursor-account-format.d.ts.map +1 -1
  38. package/cursor-accounts/cursor-account-format.js +16 -1
  39. package/cursor-accounts/cursor-account-format.js.map +1 -1
  40. package/datastore/CollectionRecordsBrowser.js +18 -4
  41. package/datastore/CollectionRecordsBrowser.js.map +1 -1
  42. package/datastore/RecordFilterBuilder.d.ts +8 -1
  43. package/datastore/RecordFilterBuilder.d.ts.map +1 -1
  44. package/datastore/RecordFilterBuilder.js +2 -2
  45. package/datastore/RecordFilterBuilder.js.map +1 -1
  46. package/datastore/recordFilter.d.ts +9 -1
  47. package/datastore/recordFilter.d.ts.map +1 -1
  48. package/datastore/recordFilter.js +12 -1
  49. package/datastore/recordFilter.js.map +1 -1
  50. package/datastore/useDatastoreCount.d.ts +2 -0
  51. package/datastore/useDatastoreCount.d.ts.map +1 -1
  52. package/datastore/useDatastoreCount.js.map +1 -1
  53. package/execution/ExecutionProgress.d.ts.map +1 -1
  54. package/execution/ExecutionProgress.js +13 -4
  55. package/execution/ExecutionProgress.js.map +1 -1
  56. package/execution/MessageThread.d.ts.map +1 -1
  57. package/execution/MessageThread.js +10 -2
  58. package/execution/MessageThread.js.map +1 -1
  59. package/execution/useCreateAgentExecution.d.ts +31 -1
  60. package/execution/useCreateAgentExecution.d.ts.map +1 -1
  61. package/execution/useCreateAgentExecution.js +2 -0
  62. package/execution/useCreateAgentExecution.js.map +1 -1
  63. package/index.d.ts +8 -6
  64. package/index.d.ts.map +1 -1
  65. package/index.js +8 -4
  66. package/index.js.map +1 -1
  67. package/internal/form-primitives.d.ts +10 -0
  68. package/internal/form-primitives.d.ts.map +1 -0
  69. package/{billing → internal}/form-primitives.js +5 -9
  70. package/internal/form-primitives.js.map +1 -0
  71. package/manifest/ApplyManifestDialog.d.ts +10 -5
  72. package/manifest/ApplyManifestDialog.d.ts.map +1 -1
  73. package/manifest/ApplyManifestDialog.js +30 -13
  74. package/manifest/ApplyManifestDialog.js.map +1 -1
  75. package/manifest/useApplyManifest.d.ts +6 -2
  76. package/manifest/useApplyManifest.d.ts.map +1 -1
  77. package/manifest/useApplyManifest.js +5 -5
  78. package/manifest/useApplyManifest.js.map +1 -1
  79. package/mcp-server/McpServerDetailView.d.ts +38 -2
  80. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  81. package/mcp-server/McpServerDetailView.js +21 -5
  82. package/mcp-server/McpServerDetailView.js.map +1 -1
  83. package/mcp-server/index.d.ts +7 -0
  84. package/mcp-server/index.d.ts.map +1 -1
  85. package/mcp-server/index.js +9 -0
  86. package/mcp-server/index.js.map +1 -1
  87. package/mcp-server/steps/EnvironmentAuthStep.d.ts +4 -0
  88. package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -1
  89. package/mcp-server/steps/EnvironmentAuthStep.js +4 -0
  90. package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -1
  91. package/mcp-server/steps/IdentityTransportStep.d.ts +6 -0
  92. package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -1
  93. package/mcp-server/steps/IdentityTransportStep.js +7 -1
  94. package/mcp-server/steps/IdentityTransportStep.js.map +1 -1
  95. package/mcp-server/steps/ReviewStep.d.ts +5 -0
  96. package/mcp-server/steps/ReviewStep.d.ts.map +1 -1
  97. package/mcp-server/steps/ReviewStep.js +16 -2
  98. package/mcp-server/steps/ReviewStep.js.map +1 -1
  99. package/mcp-server/useMcpServerCount.d.ts +2 -0
  100. package/mcp-server/useMcpServerCount.d.ts.map +1 -1
  101. package/mcp-server/useMcpServerCount.js.map +1 -1
  102. package/package.json +4 -4
  103. package/pricing-governance/BaselineEditor.d.ts.map +1 -0
  104. package/{billing → pricing-governance}/BaselineEditor.js +19 -2
  105. package/pricing-governance/BaselineEditor.js.map +1 -0
  106. package/pricing-governance/ModelCatalogPanel.d.ts.map +1 -0
  107. package/pricing-governance/ModelCatalogPanel.js.map +1 -0
  108. package/pricing-governance/ModelGovernanceDetail.d.ts.map +1 -0
  109. package/pricing-governance/ModelGovernanceDetail.js.map +1 -0
  110. package/pricing-governance/OperatorAccessNotice.d.ts.map +1 -0
  111. package/pricing-governance/OperatorAccessNotice.js.map +1 -0
  112. package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -0
  113. package/{billing → pricing-governance}/PricingGovernanceConsole.js +1 -1
  114. package/pricing-governance/PricingGovernanceConsole.js.map +1 -0
  115. package/pricing-governance/PricingGovernancePanel.d.ts.map +1 -0
  116. package/pricing-governance/PricingGovernancePanel.js.map +1 -0
  117. package/pricing-governance/RetireConfirm.d.ts.map +1 -0
  118. package/{billing → pricing-governance}/RetireConfirm.js +1 -1
  119. package/pricing-governance/RetireConfirm.js.map +1 -0
  120. package/pricing-governance/governance-primitives.d.ts.map +1 -0
  121. package/pricing-governance/governance-primitives.js.map +1 -0
  122. package/pricing-governance/index.d.ts +19 -0
  123. package/pricing-governance/index.d.ts.map +1 -0
  124. package/pricing-governance/index.js +20 -0
  125. package/pricing-governance/index.js.map +1 -0
  126. package/pricing-governance/pricing-format.d.ts.map +1 -0
  127. package/pricing-governance/pricing-format.js.map +1 -0
  128. package/pricing-governance/useDecidePricingOverride.d.ts.map +1 -0
  129. package/pricing-governance/useDecidePricingOverride.js.map +1 -0
  130. package/pricing-governance/useModelGovernanceView.d.ts.map +1 -0
  131. package/pricing-governance/useModelGovernanceView.js.map +1 -0
  132. package/pricing-governance/useModelPricingBaselines.d.ts.map +1 -0
  133. package/pricing-governance/useModelPricingBaselines.js.map +1 -0
  134. package/pricing-governance/usePricingGovernance.d.ts.map +1 -0
  135. package/pricing-governance/usePricingGovernance.js.map +1 -0
  136. package/pricing-governance/useRetireModelPricingBaseline.d.ts.map +1 -0
  137. package/pricing-governance/useRetireModelPricingBaseline.js.map +1 -0
  138. package/pricing-governance/useUpsertModelPricingBaseline.d.ts.map +1 -0
  139. package/pricing-governance/useUpsertModelPricingBaseline.js.map +1 -0
  140. package/resource-creation/CreationPicker.d.ts.map +1 -1
  141. package/resource-creation/CreationPicker.js +3 -3
  142. package/resource-creation/CreationPicker.js.map +1 -1
  143. package/resource-creation/WizardNav.d.ts.map +1 -1
  144. package/resource-creation/WizardNav.js +1 -1
  145. package/resource-creation/WizardNav.js.map +1 -1
  146. package/resource-detail/Section.d.ts +8 -1
  147. package/resource-detail/Section.d.ts.map +1 -1
  148. package/resource-detail/Section.js +2 -2
  149. package/resource-detail/Section.js.map +1 -1
  150. package/resource-workbench/components/ResourceWorkbench.d.ts +9 -1
  151. package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -1
  152. package/resource-workbench/components/ResourceWorkbench.js +2 -1
  153. package/resource-workbench/components/ResourceWorkbench.js.map +1 -1
  154. package/resource-workbench/hooks/useResourceCollection.d.ts +9 -0
  155. package/resource-workbench/hooks/useResourceCollection.d.ts.map +1 -1
  156. package/resource-workbench/hooks/useResourceCollection.js +2 -2
  157. package/resource-workbench/hooks/useResourceCollection.js.map +1 -1
  158. package/search/useResourceCount.d.ts +7 -0
  159. package/search/useResourceCount.d.ts.map +1 -1
  160. package/search/useResourceCount.js +2 -1
  161. package/search/useResourceCount.js.map +1 -1
  162. package/session/NewSessionViewer.d.ts.map +1 -1
  163. package/session/NewSessionViewer.js +17 -3
  164. package/session/NewSessionViewer.js.map +1 -1
  165. package/session/SessionViewer.d.ts +2 -1
  166. package/session/SessionViewer.d.ts.map +1 -1
  167. package/session/SessionViewer.js +19 -11
  168. package/session/SessionViewer.js.map +1 -1
  169. package/session/SessionViewerLayout.d.ts +90 -0
  170. package/session/SessionViewerLayout.d.ts.map +1 -0
  171. package/session/SessionViewerLayout.js +32 -0
  172. package/session/SessionViewerLayout.js.map +1 -0
  173. package/session/index.d.ts +4 -0
  174. package/session/index.d.ts.map +1 -1
  175. package/session/index.js +10 -0
  176. package/session/index.js.map +1 -1
  177. package/session/useCreateSession.d.ts +28 -0
  178. package/session/useCreateSession.d.ts.map +1 -1
  179. package/session/useCreateSession.js +2 -1
  180. package/session/useCreateSession.js.map +1 -1
  181. package/session/useNewSessionFlow.d.ts +30 -0
  182. package/session/useNewSessionFlow.d.ts.map +1 -1
  183. package/session/useNewSessionFlow.js +7 -1
  184. package/session/useNewSessionFlow.js.map +1 -1
  185. package/session/useSessionRailViews.d.ts +2 -2
  186. package/session/useUpdateSession.d.ts +29 -10
  187. package/session/useUpdateSession.d.ts.map +1 -1
  188. package/session/useUpdateSession.js +29 -10
  189. package/session/useUpdateSession.js.map +1 -1
  190. package/skill/useSkillCount.d.ts +2 -0
  191. package/skill/useSkillCount.d.ts.map +1 -1
  192. package/skill/useSkillCount.js.map +1 -1
  193. package/src/agent/useAgentCount.ts +2 -0
  194. package/src/api-key/CreateApiKeyForm.tsx +8 -1
  195. package/src/api-key/__tests__/CreateApiKeyForm.test.tsx +58 -0
  196. package/src/billing/index.ts +5 -37
  197. package/src/cursor-accounts/CursorAccountEditor.tsx +61 -13
  198. package/src/cursor-accounts/CursorAccountsConsole.tsx +44 -400
  199. package/src/cursor-accounts/MemberCoverageTable.tsx +439 -0
  200. package/src/cursor-accounts/MemberKeysPanel.tsx +278 -0
  201. package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +306 -10
  202. package/src/cursor-accounts/__tests__/cursor-account-coverage.test.ts +73 -0
  203. package/src/cursor-accounts/badges.tsx +26 -0
  204. package/src/cursor-accounts/cursor-account-coverage.ts +71 -0
  205. package/src/cursor-accounts/cursor-account-format.ts +17 -1
  206. package/src/datastore/CollectionRecordsBrowser.tsx +29 -3
  207. package/src/datastore/RecordFilterBuilder.tsx +12 -1
  208. package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +38 -0
  209. package/src/datastore/__tests__/RecordFilterBuilder.test.tsx +14 -0
  210. package/src/datastore/__tests__/recordFilter.test.ts +13 -0
  211. package/src/datastore/recordFilter.ts +15 -1
  212. package/src/datastore/useDatastoreCount.ts +2 -0
  213. package/src/execution/ExecutionProgress.tsx +14 -4
  214. package/src/execution/MessageThread.tsx +10 -2
  215. package/src/execution/__tests__/ExecutionProgress.test.tsx +67 -0
  216. package/src/execution/__tests__/MessageThread.test.tsx +44 -0
  217. package/src/execution/__tests__/useCreateAgentExecution.test.tsx +86 -0
  218. package/src/execution/useCreateAgentExecution.ts +41 -6
  219. package/src/index.ts +43 -24
  220. package/src/{billing → internal}/form-primitives.tsx +4 -32
  221. package/src/manifest/ApplyManifestDialog.tsx +40 -16
  222. package/src/manifest/__tests__/ApplyManifestDialog.test.tsx +147 -0
  223. package/src/manifest/__tests__/useApplyManifest.test.tsx +6 -6
  224. package/src/manifest/useApplyManifest.ts +12 -8
  225. package/src/mcp-server/McpServerDetailView.tsx +52 -4
  226. package/src/mcp-server/__tests__/McpServerDetailView.test.tsx +345 -0
  227. package/src/mcp-server/index.ts +13 -0
  228. package/src/mcp-server/steps/EnvironmentAuthStep.tsx +4 -0
  229. package/src/mcp-server/steps/IdentityTransportStep.tsx +9 -1
  230. package/src/mcp-server/steps/ReviewStep.tsx +18 -1
  231. package/src/mcp-server/useMcpServerCount.ts +2 -0
  232. package/src/{billing → pricing-governance}/BaselineEditor.tsx +36 -3
  233. package/src/{billing → pricing-governance}/PricingGovernanceConsole.tsx +1 -1
  234. package/src/{billing → pricing-governance}/RetireConfirm.tsx +1 -1
  235. package/src/pricing-governance/index.ts +50 -0
  236. package/src/resource-creation/CreationPicker.tsx +7 -0
  237. package/src/resource-creation/WizardNav.tsx +1 -0
  238. package/src/resource-detail/Section.tsx +9 -1
  239. package/src/resource-workbench/components/ResourceWorkbench.tsx +13 -0
  240. package/src/resource-workbench/hooks/useResourceCollection.ts +11 -1
  241. package/src/search/useResourceCount.ts +9 -1
  242. package/src/session/NewSessionViewer.tsx +48 -61
  243. package/src/session/SessionViewer.tsx +71 -86
  244. package/src/session/SessionViewerLayout.tsx +131 -0
  245. package/src/session/__tests__/SessionViewerLayout.test.tsx +140 -0
  246. package/src/session/__tests__/useCreateSession.test.tsx +94 -0
  247. package/src/session/__tests__/useNewSessionFlow.test.tsx +33 -0
  248. package/src/session/index.ts +14 -0
  249. package/src/session/useCreateSession.ts +30 -0
  250. package/src/session/useNewSessionFlow.ts +45 -1
  251. package/src/session/useSessionRailViews.tsx +2 -2
  252. package/src/session/useUpdateSession.ts +29 -10
  253. package/src/skill/useSkillCount.ts +2 -0
  254. package/src/test/__tests__/samples.test.ts +159 -2
  255. package/src/test/index.ts +1 -1
  256. package/src/test/samples.ts +109 -14
  257. package/src/workflow/useWorkflowCount.ts +2 -0
  258. package/styles.css +1 -1
  259. package/test/index.d.ts +1 -1
  260. package/test/index.d.ts.map +1 -1
  261. package/test/index.js +1 -1
  262. package/test/index.js.map +1 -1
  263. package/test/samples.d.ts +79 -7
  264. package/test/samples.d.ts.map +1 -1
  265. package/test/samples.js +101 -14
  266. package/test/samples.js.map +1 -1
  267. package/workflow/useWorkflowCount.d.ts +2 -0
  268. package/workflow/useWorkflowCount.d.ts.map +1 -1
  269. package/workflow/useWorkflowCount.js.map +1 -1
  270. package/billing/BaselineEditor.d.ts.map +0 -1
  271. package/billing/BaselineEditor.js.map +0 -1
  272. package/billing/ModelCatalogPanel.d.ts.map +0 -1
  273. package/billing/ModelCatalogPanel.js.map +0 -1
  274. package/billing/ModelGovernanceDetail.d.ts.map +0 -1
  275. package/billing/ModelGovernanceDetail.js.map +0 -1
  276. package/billing/OperatorAccessNotice.d.ts.map +0 -1
  277. package/billing/OperatorAccessNotice.js.map +0 -1
  278. package/billing/PricingGovernanceConsole.d.ts.map +0 -1
  279. package/billing/PricingGovernanceConsole.js.map +0 -1
  280. package/billing/PricingGovernancePanel.d.ts.map +0 -1
  281. package/billing/PricingGovernancePanel.js.map +0 -1
  282. package/billing/RetireConfirm.d.ts.map +0 -1
  283. package/billing/RetireConfirm.js.map +0 -1
  284. package/billing/form-primitives.d.ts +0 -18
  285. package/billing/form-primitives.d.ts.map +0 -1
  286. package/billing/form-primitives.js.map +0 -1
  287. package/billing/governance-primitives.d.ts.map +0 -1
  288. package/billing/governance-primitives.js.map +0 -1
  289. package/billing/pricing-format.d.ts.map +0 -1
  290. package/billing/pricing-format.js.map +0 -1
  291. package/billing/useDecidePricingOverride.d.ts.map +0 -1
  292. package/billing/useDecidePricingOverride.js.map +0 -1
  293. package/billing/useModelGovernanceView.d.ts.map +0 -1
  294. package/billing/useModelGovernanceView.js.map +0 -1
  295. package/billing/useModelPricingBaselines.d.ts.map +0 -1
  296. package/billing/useModelPricingBaselines.js.map +0 -1
  297. package/billing/usePricingGovernance.d.ts.map +0 -1
  298. package/billing/usePricingGovernance.js.map +0 -1
  299. package/billing/useRetireModelPricingBaseline.d.ts.map +0 -1
  300. package/billing/useRetireModelPricingBaseline.js.map +0 -1
  301. package/billing/useUpsertModelPricingBaseline.d.ts.map +0 -1
  302. package/billing/useUpsertModelPricingBaseline.js.map +0 -1
  303. /package/{billing → pricing-governance}/BaselineEditor.d.ts +0 -0
  304. /package/{billing → pricing-governance}/ModelCatalogPanel.d.ts +0 -0
  305. /package/{billing → pricing-governance}/ModelCatalogPanel.js +0 -0
  306. /package/{billing → pricing-governance}/ModelGovernanceDetail.d.ts +0 -0
  307. /package/{billing → pricing-governance}/ModelGovernanceDetail.js +0 -0
  308. /package/{billing → pricing-governance}/OperatorAccessNotice.d.ts +0 -0
  309. /package/{billing → pricing-governance}/OperatorAccessNotice.js +0 -0
  310. /package/{billing → pricing-governance}/PricingGovernanceConsole.d.ts +0 -0
  311. /package/{billing → pricing-governance}/PricingGovernancePanel.d.ts +0 -0
  312. /package/{billing → pricing-governance}/PricingGovernancePanel.js +0 -0
  313. /package/{billing → pricing-governance}/RetireConfirm.d.ts +0 -0
  314. /package/{billing → pricing-governance}/governance-primitives.d.ts +0 -0
  315. /package/{billing → pricing-governance}/governance-primitives.js +0 -0
  316. /package/{billing → pricing-governance}/pricing-format.d.ts +0 -0
  317. /package/{billing → pricing-governance}/pricing-format.js +0 -0
  318. /package/{billing → pricing-governance}/useDecidePricingOverride.d.ts +0 -0
  319. /package/{billing → pricing-governance}/useDecidePricingOverride.js +0 -0
  320. /package/{billing → pricing-governance}/useModelGovernanceView.d.ts +0 -0
  321. /package/{billing → pricing-governance}/useModelGovernanceView.js +0 -0
  322. /package/{billing → pricing-governance}/useModelPricingBaselines.d.ts +0 -0
  323. /package/{billing → pricing-governance}/useModelPricingBaselines.js +0 -0
  324. /package/{billing → pricing-governance}/usePricingGovernance.d.ts +0 -0
  325. /package/{billing → pricing-governance}/usePricingGovernance.js +0 -0
  326. /package/{billing → pricing-governance}/useRetireModelPricingBaseline.d.ts +0 -0
  327. /package/{billing → pricing-governance}/useRetireModelPricingBaseline.js +0 -0
  328. /package/{billing → pricing-governance}/useUpsertModelPricingBaseline.d.ts +0 -0
  329. /package/{billing → pricing-governance}/useUpsertModelPricingBaseline.js +0 -0
  330. /package/src/{billing → pricing-governance}/ModelCatalogPanel.tsx +0 -0
  331. /package/src/{billing → pricing-governance}/ModelGovernanceDetail.tsx +0 -0
  332. /package/src/{billing → pricing-governance}/OperatorAccessNotice.tsx +0 -0
  333. /package/src/{billing → pricing-governance}/PricingGovernancePanel.tsx +0 -0
  334. /package/src/{billing → pricing-governance}/__tests__/ModelCatalogPanel.test.tsx +0 -0
  335. /package/src/{billing → pricing-governance}/__tests__/PricingGovernanceConsole.test.tsx +0 -0
  336. /package/src/{billing → pricing-governance}/__tests__/useModelGovernanceView.test.tsx +0 -0
  337. /package/src/{billing → pricing-governance}/governance-primitives.tsx +0 -0
  338. /package/src/{billing → pricing-governance}/pricing-format.ts +0 -0
  339. /package/src/{billing → pricing-governance}/useDecidePricingOverride.ts +0 -0
  340. /package/src/{billing → pricing-governance}/useModelGovernanceView.ts +0 -0
  341. /package/src/{billing → pricing-governance}/useModelPricingBaselines.ts +0 -0
  342. /package/src/{billing → pricing-governance}/usePricingGovernance.ts +0 -0
  343. /package/src/{billing → pricing-governance}/useRetireModelPricingBaseline.ts +0 -0
  344. /package/src/{billing → pricing-governance}/useUpsertModelPricingBaseline.ts +0 -0
@@ -18,28 +18,47 @@ export interface UseUpdateSessionReturn {
18
18
  * {@link SessionInput} including the session's `name` and `org` (used
19
19
  * by the backend to identify the resource) and all spec fields.
20
20
  *
21
+ * **Full-replace semantics.** The backend replaces the entire spec with
22
+ * what you send — there is no field mask. Round-trip every spec field
23
+ * you do not intend to change, *including `metadata`*: an update built
24
+ * from a reconstructed partial spec silently wipes the fields it omits
25
+ * (workspace entries, MCP servers, and `stigmer.ai/*` metadata keys such
26
+ * as the embedder session context). To change only the subject, prefer
27
+ * the field-level `session.updateSubject()` RPC instead of this hook.
28
+ *
21
29
  * Typically composed into higher-level hooks like
22
- * {@link useSessionConversation} rather than used directly. Platform
23
- * builders who need direct session mutation can use this hook
24
- * standalone.
30
+ * {@link useSessionConversation} (whose update path round-trips the
31
+ * fetched spec) rather than used directly. Platform builders who need
32
+ * direct session mutation can use this hook standalone.
25
33
  *
26
34
  * @example
27
35
  * ```tsx
28
- * function RenameSession({ session }: { session: Session }) {
29
- * const { update, isUpdating, error } = useUpdateSession();
36
+ * function TagSession({ session }: { session: Session }) {
37
+ * const { update, isUpdating } = useUpdateSession();
30
38
  *
31
- * async function handleRename(newSubject: string) {
39
+ * async function handleTag() {
40
+ * const spec = session.spec;
32
41
  * await update({
33
42
  * name: session.metadata!.name,
34
43
  * org: session.metadata!.org,
35
- * agentInstanceId: session.spec?.agentInstanceId,
36
- * subject: newSubject,
44
+ * // Full replace: carry over every fetched spec field...
45
+ * agentInstanceId: spec?.agentInstanceId,
46
+ * subject: spec?.subject,
47
+ * harnessStateId: spec?.harnessStateId,
48
+ * harness: spec?.harness,
49
+ * cursorMode: spec?.cursorMode,
50
+ * executionTarget: spec?.executionTarget,
51
+ * // ...including the spec lists (workspaceEntries, mcpServerUsages,
52
+ * // skillRefs), converted from the fetched proto exactly as
53
+ * // useSessionConversation's update path does...
54
+ * // ...then apply the one change on top of the carried metadata.
55
+ * metadata: { ...spec?.metadata, "acme/reviewed": "true" },
37
56
  * });
38
57
  * }
39
58
  *
40
59
  * return (
41
- * <button onClick={() => handleRename("New subject")} disabled={isUpdating}>
42
- * Rename
60
+ * <button onClick={handleTag} disabled={isUpdating}>
61
+ * Mark reviewed
43
62
  * </button>
44
63
  * );
45
64
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateSession.d.ts","sourceRoot":"","sources":["../../src/session/useUpdateSession.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sDAAsD,CAAC;AAGpF,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CA2BzD"}
1
+ {"version":3,"file":"useUpdateSession.d.ts","sourceRoot":"","sources":["../../src/session/useUpdateSession.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sDAAsD,CAAC;AAGpF,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CA2BzD"}
@@ -8,28 +8,47 @@ import { useStigmer } from "../hooks.js";
8
8
  * {@link SessionInput} including the session's `name` and `org` (used
9
9
  * by the backend to identify the resource) and all spec fields.
10
10
  *
11
+ * **Full-replace semantics.** The backend replaces the entire spec with
12
+ * what you send — there is no field mask. Round-trip every spec field
13
+ * you do not intend to change, *including `metadata`*: an update built
14
+ * from a reconstructed partial spec silently wipes the fields it omits
15
+ * (workspace entries, MCP servers, and `stigmer.ai/*` metadata keys such
16
+ * as the embedder session context). To change only the subject, prefer
17
+ * the field-level `session.updateSubject()` RPC instead of this hook.
18
+ *
11
19
  * Typically composed into higher-level hooks like
12
- * {@link useSessionConversation} rather than used directly. Platform
13
- * builders who need direct session mutation can use this hook
14
- * standalone.
20
+ * {@link useSessionConversation} (whose update path round-trips the
21
+ * fetched spec) rather than used directly. Platform builders who need
22
+ * direct session mutation can use this hook standalone.
15
23
  *
16
24
  * @example
17
25
  * ```tsx
18
- * function RenameSession({ session }: { session: Session }) {
19
- * const { update, isUpdating, error } = useUpdateSession();
26
+ * function TagSession({ session }: { session: Session }) {
27
+ * const { update, isUpdating } = useUpdateSession();
20
28
  *
21
- * async function handleRename(newSubject: string) {
29
+ * async function handleTag() {
30
+ * const spec = session.spec;
22
31
  * await update({
23
32
  * name: session.metadata!.name,
24
33
  * org: session.metadata!.org,
25
- * agentInstanceId: session.spec?.agentInstanceId,
26
- * subject: newSubject,
34
+ * // Full replace: carry over every fetched spec field...
35
+ * agentInstanceId: spec?.agentInstanceId,
36
+ * subject: spec?.subject,
37
+ * harnessStateId: spec?.harnessStateId,
38
+ * harness: spec?.harness,
39
+ * cursorMode: spec?.cursorMode,
40
+ * executionTarget: spec?.executionTarget,
41
+ * // ...including the spec lists (workspaceEntries, mcpServerUsages,
42
+ * // skillRefs), converted from the fetched proto exactly as
43
+ * // useSessionConversation's update path does...
44
+ * // ...then apply the one change on top of the carried metadata.
45
+ * metadata: { ...spec?.metadata, "acme/reviewed": "true" },
27
46
  * });
28
47
  * }
29
48
  *
30
49
  * return (
31
- * <button onClick={() => handleRename("New subject")} disabled={isUpdating}>
32
- * Rename
50
+ * <button onClick={handleTag} disabled={isUpdating}>
51
+ * Mark reviewed
33
52
  * </button>
34
53
  * );
35
54
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateSession.js","sourceRoot":"","sources":["../../src/session/useUpdateSession.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAczC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,KAAmB,EAAoB,EAAE;QAC9C,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GACX,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;YAClE,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"useUpdateSession.js","sourceRoot":"","sources":["../../src/session/useUpdateSession.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAczC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,KAAmB,EAAoB,EAAE;QAC9C,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GACX,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;YAClE,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
@@ -12,6 +12,8 @@ export interface UseSkillCountOptions {
12
12
  * @default "org"
13
13
  */
14
14
  readonly scope?: ResourceListScope;
15
+ /** Opaque token that forces a recount when its value changes. */
16
+ readonly refetchToken?: unknown;
15
17
  }
16
18
  /** Return value of {@link useSkillCount}. */
17
19
  export interface UseSkillCountReturn {
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillCount.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillCount.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;CACpC;AAED,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CAUrB"}
1
+ {"version":3,"file":"useSkillCount.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillCount.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CAUrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillCount.js","sourceRoot":"","sources":["../../src/skill/useSkillCount.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AAgC9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAkB,EAClB,OAA8B;IAE9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,MAAgD,EAAE,EAAE,CACnD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAC5B,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
1
+ {"version":3,"file":"useSkillCount.js","sourceRoot":"","sources":["../../src/skill/useSkillCount.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AAkC9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAkB,EAClB,OAA8B;IAE9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,MAAgD,EAAE,EAAE,CACnD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAC5B,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
@@ -17,6 +17,8 @@ export interface UseAgentCountOptions {
17
17
  * @default "org"
18
18
  */
19
19
  readonly scope?: ResourceListScope;
20
+ /** Opaque token that forces a recount when its value changes. */
21
+ readonly refetchToken?: unknown;
20
22
  }
21
23
 
22
24
  /** Return value of {@link useAgentCount}. */
@@ -22,6 +22,12 @@ export interface CreateApiKeyFormProps {
22
22
  readonly onCreated?: (apiKey: ApiKey) => void;
23
23
  /** Fired when the user cancels creation. */
24
24
  readonly onCancel?: () => void;
25
+ /**
26
+ * Seeds the name field on mount (e.g. a suggested key name, or a demo
27
+ * scenario depicting the form mid-fill). One-time: consumed on mount;
28
+ * subsequent changes are ignored. The field stays fully editable.
29
+ */
30
+ readonly initialName?: string;
25
31
  /** Additional CSS class names for the root container. */
26
32
  readonly className?: string;
27
33
  }
@@ -51,11 +57,12 @@ export function CreateApiKeyForm({
51
57
  org,
52
58
  onCreated,
53
59
  onCancel,
60
+ initialName = "",
54
61
  className,
55
62
  }: CreateApiKeyFormProps) {
56
63
  const { create, isCreating, error, clearError } = useCreateApiKey();
57
64
 
58
- const [name, setName] = useState("");
65
+ const [name, setName] = useState(initialName);
59
66
  const [expiry, setExpiry] = useState<ExpiryOption>("never");
60
67
 
61
68
  const trimmedName = name.trim();
@@ -0,0 +1,58 @@
1
+ import { describe, it, expect, vi, afterEach } from "vitest";
2
+ import { render, screen, fireEvent, cleanup } from "@testing-library/react";
3
+ import type { ReactNode } from "react";
4
+ import type { Stigmer } from "@stigmer/sdk";
5
+ import { StigmerContext } from "../../context";
6
+ import { CreateApiKeyForm } from "../CreateApiKeyForm";
7
+
8
+ afterEach(cleanup);
9
+
10
+ function createWrapper() {
11
+ const mockClient = {
12
+ apiKey: { create: vi.fn() },
13
+ } as unknown as Stigmer;
14
+
15
+ return ({ children }: { children: ReactNode }) => (
16
+ <StigmerContext.Provider value={mockClient}>
17
+ {children}
18
+ </StigmerContext.Provider>
19
+ );
20
+ }
21
+
22
+ function nameInput(): HTMLInputElement {
23
+ return screen.getByLabelText("Name") as HTMLInputElement;
24
+ }
25
+
26
+ function submitButton(): HTMLButtonElement {
27
+ return screen.getByRole("button", {
28
+ name: "Create API key",
29
+ }) as HTMLButtonElement;
30
+ }
31
+
32
+ describe("CreateApiKeyForm initialName", () => {
33
+ it("starts with an empty name and a disabled submit by default", () => {
34
+ render(<CreateApiKeyForm org="acme" />, { wrapper: createWrapper() });
35
+
36
+ expect(nameInput().value).toBe("");
37
+ expect(submitButton().disabled).toBe(true);
38
+ });
39
+
40
+ it("seeds the name field and enables submit when initialName is set", () => {
41
+ render(<CreateApiKeyForm org="acme" initialName="quickstart-key" />, {
42
+ wrapper: createWrapper(),
43
+ });
44
+
45
+ expect(nameInput().value).toBe("quickstart-key");
46
+ expect(submitButton().disabled).toBe(false);
47
+ });
48
+
49
+ it("keeps the seeded field editable — initialName is a seed, not a lock", () => {
50
+ render(<CreateApiKeyForm org="acme" initialName="quickstart-key" />, {
51
+ wrapper: createWrapper(),
52
+ });
53
+
54
+ fireEvent.change(nameInput(), { target: { value: "renamed-key" } });
55
+
56
+ expect(nameInput().value).toBe("renamed-key");
57
+ });
58
+ });
@@ -1,3 +1,8 @@
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.
5
+
1
6
  // Data hooks
2
7
  export { useBillingAccount } from "./useBillingAccount.js";
3
8
  export type { UseBillingAccountReturn } from "./useBillingAccount.js";
@@ -7,19 +12,6 @@ export { useBillingUsageReport } from "./useBillingUsageReport.js";
7
12
  export type { UseBillingUsageReportReturn } from "./useBillingUsageReport.js";
8
13
  export { useCustomerModelPricing } from "./useCustomerModelPricing.js";
9
14
  export type { UseCustomerModelPricingReturn } from "./useCustomerModelPricing.js";
10
- export { usePricingGovernance } from "./usePricingGovernance.js";
11
- export type { UsePricingGovernanceReturn } from "./usePricingGovernance.js";
12
- export { useModelPricingBaselines } from "./useModelPricingBaselines.js";
13
- export type {
14
- UseModelPricingBaselinesOptions,
15
- UseModelPricingBaselinesReturn,
16
- } from "./useModelPricingBaselines.js";
17
- export { useModelGovernanceView } from "./useModelGovernanceView.js";
18
- export type {
19
- GovernanceFlow,
20
- ModelGovernanceRow,
21
- UseModelGovernanceViewReturn,
22
- } from "./useModelGovernanceView.js";
23
15
 
24
16
  // Behavior hooks
25
17
  export { useCreateCheckoutSession } from "./useCreateCheckoutSession.js";
@@ -34,21 +26,6 @@ export type {
34
26
  SetAutoRechargeConfigInput,
35
27
  UseSetAutoRechargeConfigReturn,
36
28
  } from "./useSetAutoRechargeConfig.js";
37
- export { useDecidePricingOverride } from "./useDecidePricingOverride.js";
38
- export type {
39
- DecidePricingOverrideInput,
40
- UseDecidePricingOverrideReturn,
41
- } from "./useDecidePricingOverride.js";
42
- export { useUpsertModelPricingBaseline } from "./useUpsertModelPricingBaseline.js";
43
- export type {
44
- UpsertModelPricingBaselineInput,
45
- UseUpsertModelPricingBaselineReturn,
46
- } from "./useUpsertModelPricingBaseline.js";
47
- export { useRetireModelPricingBaseline } from "./useRetireModelPricingBaseline.js";
48
- export type {
49
- RetireModelPricingBaselineInput,
50
- UseRetireModelPricingBaselineReturn,
51
- } from "./useRetireModelPricingBaseline.js";
52
29
 
53
30
  // Styled components
54
31
  export { BillingSection } from "./BillingSection.js";
@@ -65,15 +42,6 @@ export { CreditLedgerTable } from "./CreditLedgerTable.js";
65
42
  export type { CreditLedgerTableProps } from "./CreditLedgerTable.js";
66
43
  export { LowBalanceBanner } from "./LowBalanceBanner.js";
67
44
  export type { LowBalanceBannerProps } from "./LowBalanceBanner.js";
68
- export { PricingGovernancePanel } from "./PricingGovernancePanel.js";
69
- export type { PricingGovernancePanelProps } from "./PricingGovernancePanel.js";
70
- export { ModelCatalogPanel } from "./ModelCatalogPanel.js";
71
- export type { ModelCatalogPanelProps } from "./ModelCatalogPanel.js";
72
- export { PricingGovernanceConsole } from "./PricingGovernanceConsole.js";
73
- export type {
74
- PricingGovernanceConsoleProps,
75
- PricingGovernanceTab,
76
- } from "./PricingGovernanceConsole.js";
77
45
 
78
46
  // Credit pack catalog and formatting utilities
79
47
  export { CREDIT_PACKS, formatPackPrice, formatCreditCount } from "./credit-packs.js";
@@ -9,7 +9,7 @@ import {
9
9
  type CursorAccount,
10
10
  } from "@stigmer/protos/ai/stigmer/platform/cursoraccount/v1/cursor_account_pb";
11
11
  import { Button } from "../button/index.js";
12
- import { Field, INPUT_CLASSES } from "../billing/form-primitives.js";
12
+ import { Field, INPUT_CLASSES } from "../internal/form-primitives.js";
13
13
 
14
14
  /**
15
15
  * The redaction marker the server uses for stored secrets. Sending it
@@ -35,13 +35,19 @@ export interface CursorAccountEditorProps {
35
35
 
36
36
  /**
37
37
  * Create/edit form for one Cursor account: identity, team Admin API key,
38
- * enablement, platform-default flag, and org assignments.
38
+ * enablement, and dedicated-org assignments. The account's class is
39
+ * derived (DD-008): listed org ids make it DEDICATED to them, an empty
40
+ * list makes it a shared-pool account — there is no flag to manage.
39
41
  *
40
42
  * Admin-key semantics mirror the server contract: on edit the field
41
43
  * shows the redaction marker and submitting it unchanged keeps the
42
44
  * stored key; typing anything else rotates it (validated live against
43
45
  * Cursor before persisting). Member keys are NOT edited here — they have
44
46
  * their own panel with per-key add/remove/enable.
47
+ *
48
+ * The optional team invite link (Cursor dashboard → Invite Members →
49
+ * Copy Invite Link) round-trips readable — no marker — and powers the
50
+ * coverage table's "Copy invite" action for off-team key owners.
45
51
  */
46
52
  export function CursorAccountEditor({
47
53
  initial,
@@ -55,12 +61,21 @@ export function CursorAccountEditor({
55
61
  const [displayName, setDisplayName] = useState(initial?.displayName ?? "");
56
62
  const [adminApiKey, setAdminApiKey] = useState(isCreate ? "" : REDACTED);
57
63
  const [enabled, setEnabled] = useState(initial?.enabled ?? true);
58
- const [isPlatformDefault, setIsPlatformDefault] = useState(
59
- initial?.isPlatformDefault ?? false,
64
+ // UI state is the positive ("on-demand enabled", Cursor's own wording and
65
+ // team default); the proto field is the negative so absence means
66
+ // "assume Cursor's default" on documents that predate the field.
67
+ const [onDemandEnabled, setOnDemandEnabled] = useState(
68
+ !(initial?.onDemandUsageDisabled ?? false),
60
69
  );
61
70
  const [orgIdsText, setOrgIdsText] = useState(
62
71
  (initial?.orgIds ?? []).join("\n"),
63
72
  );
73
+ // Unlike the admin key, the invite link round-trips readable (the
74
+ // server decrypts it on read — operators must be able to copy it), so
75
+ // there is no redaction-marker dance: edit the value directly.
76
+ const [teamInviteLink, setTeamInviteLink] = useState(
77
+ initial?.teamInviteLink ?? "",
78
+ );
64
79
 
65
80
  const canSubmit =
66
81
  displayName.trim() !== "" && adminApiKey.trim() !== "" && !isSubmitting;
@@ -74,7 +89,10 @@ export function CursorAccountEditor({
74
89
  displayName: displayName.trim(),
75
90
  adminApiKey: adminApiKey.trim(),
76
91
  enabled,
77
- isPlatformDefault,
92
+ // is_platform_default is deprecated (DD-008): the shared pool is
93
+ // derived from empty org_ids, so current clients never write it.
94
+ onDemandUsageDisabled: !onDemandEnabled,
95
+ teamInviteLink: teamInviteLink.trim(),
78
96
  orgIds: orgIdsText
79
97
  .split(/[\s,]+/)
80
98
  .map((s) => s.trim())
@@ -117,15 +135,43 @@ export function CursorAccountEditor({
117
135
  </p>
118
136
  )}
119
137
 
120
- <Field label="Assigned organization ids">
138
+ <Field label="Team invite link">
139
+ <input
140
+ className={INPUT_CLASSES}
141
+ type="url"
142
+ value={teamInviteLink}
143
+ onChange={(e) => setTeamInviteLink(e.target.value)}
144
+ placeholder="https://… (Cursor dashboard → Invite Members → Copy Invite Link)"
145
+ disabled={isSubmitting}
146
+ autoComplete="off"
147
+ spellCheck={false}
148
+ />
149
+ </Field>
150
+ <p className="text-[11px] text-muted-foreground">
151
+ Optional. Powers one-click &quot;Copy invite&quot; on coverage rows
152
+ whose key owner is not on the team. The link is long-lived and
153
+ joinable by anyone holding it (each join consumes a paid seat) —
154
+ share it deliberately, and revoke or rotate it from the Cursor
155
+ dashboard. Leave empty to clear.
156
+ </p>
157
+
158
+ <Field label="Dedicated organization ids">
121
159
  <textarea
122
160
  className={cn(INPUT_CLASSES, "min-h-16 font-mono")}
123
161
  value={orgIdsText}
124
162
  onChange={(e) => setOrgIdsText(e.target.value)}
125
- placeholder={"one org id per line\n(each org may belong to only one account)"}
163
+ placeholder={"one org id per line\n(leave empty for a shared-pool account)"}
126
164
  disabled={isSubmitting}
127
165
  />
128
166
  </Field>
167
+ <p className="text-[11px] text-muted-foreground">
168
+ Listing org ids DEDICATES this account to them: their sessions use
169
+ only this account&apos;s keys and fail with a clear message when it
170
+ runs dry. Leaving this empty makes the account part of the shared
171
+ pool that serves every other org — pool sessions may move between
172
+ pool accounts when one is depleted. Each org may appear in at most
173
+ one account.
174
+ </p>
129
175
 
130
176
  <div className="space-y-2">
131
177
  <div>
@@ -148,16 +194,18 @@ export function CursorAccountEditor({
148
194
  <label className="flex items-center gap-1.5 text-xs text-foreground">
149
195
  <input
150
196
  type="checkbox"
151
- checked={isPlatformDefault}
152
- onChange={(e) => setIsPlatformDefault(e.target.checked)}
197
+ checked={onDemandEnabled}
198
+ onChange={(e) => setOnDemandEnabled(e.target.checked)}
153
199
  disabled={isSubmitting}
154
200
  />
155
- Platform default (serves unassigned orgs)
201
+ On-demand usage enabled (as configured in the Cursor dashboard)
156
202
  </label>
157
203
  <p className="mt-0.5 pl-[1.375rem] text-[11px] text-muted-foreground">
158
- Check on exactly one account. Orgs not listed in any account&apos;s
159
- assigned ids resolve to the platform default; at most one account
160
- may hold this flag.
204
+ Declared here because Cursor&apos;s Admin API cannot report the
205
+ team&apos;s on-demand setting. Uncheck only when the dashboard has
206
+ on-demand usage OFF: new sessions then avoid member keys whose
207
+ included third-party (API) pool is nearly spent, since such keys
208
+ can no longer serve third-party models at all.
161
209
  </p>
162
210
  </div>
163
211
  </div>