@stigmer/react 3.12.3 → 3.12.5

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 (493) hide show
  1. package/agent/steps/IdentityStep.d.ts.map +1 -1
  2. package/agent/steps/IdentityStep.js +2 -1
  3. package/agent/steps/IdentityStep.js.map +1 -1
  4. package/agent-instance/AgentInstanceDetailPanel.d.ts.map +1 -1
  5. package/agent-instance/AgentInstanceDetailPanel.js +2 -1
  6. package/agent-instance/AgentInstanceDetailPanel.js.map +1 -1
  7. package/api-key/CreateApiKeyForm.d.ts.map +1 -1
  8. package/api-key/CreateApiKeyForm.js +2 -1
  9. package/api-key/CreateApiKeyForm.js.map +1 -1
  10. package/attachment/AttachmentChipList.js +16 -6
  11. package/attachment/AttachmentChipList.js.map +1 -1
  12. package/attachment/index.d.ts +1 -1
  13. package/attachment/index.d.ts.map +1 -1
  14. package/attachment/index.js.map +1 -1
  15. package/attachment/useAttachments.d.ts +51 -8
  16. package/attachment/useAttachments.d.ts.map +1 -1
  17. package/attachment/useAttachments.js +74 -3
  18. package/attachment/useAttachments.js.map +1 -1
  19. package/channel/ChannelConversationsDialog.d.ts.map +1 -1
  20. package/channel/ChannelConversationsDialog.js +2 -1
  21. package/channel/ChannelConversationsDialog.js.map +1 -1
  22. package/channel/ChannelTemplatesDialog.d.ts.map +1 -1
  23. package/channel/ChannelTemplatesDialog.js +2 -1
  24. package/channel/ChannelTemplatesDialog.js.map +1 -1
  25. package/channel/ConnectSlackDialog.d.ts.map +1 -1
  26. package/channel/ConnectSlackDialog.js +2 -1
  27. package/channel/ConnectSlackDialog.js.map +1 -1
  28. package/channel/connect/ServingAppSection.d.ts.map +1 -1
  29. package/channel/connect/ServingAppSection.js +2 -1
  30. package/channel/connect/ServingAppSection.js.map +1 -1
  31. package/channel-app/CreateChannelAppForm.d.ts.map +1 -1
  32. package/channel-app/CreateChannelAppForm.js +2 -1
  33. package/channel-app/CreateChannelAppForm.js.map +1 -1
  34. package/composer/SessionComposer.d.ts.map +1 -1
  35. package/composer/SessionComposer.js +17 -10
  36. package/composer/SessionComposer.js.map +1 -1
  37. package/conversation/ConversationComposer.d.ts +19 -3
  38. package/conversation/ConversationComposer.d.ts.map +1 -1
  39. package/conversation/ConversationComposer.js +4 -4
  40. package/conversation/ConversationComposer.js.map +1 -1
  41. package/conversation/ConversationListPane.d.ts.map +1 -1
  42. package/conversation/ConversationListPane.js +2 -1
  43. package/conversation/ConversationListPane.js.map +1 -1
  44. package/conversation/ConversationTemplatePickerDialog.d.ts +63 -0
  45. package/conversation/ConversationTemplatePickerDialog.d.ts.map +1 -0
  46. package/conversation/ConversationTemplatePickerDialog.js +151 -0
  47. package/conversation/ConversationTemplatePickerDialog.js.map +1 -0
  48. package/conversation/ConversationTimelineView.d.ts.map +1 -1
  49. package/conversation/ConversationTimelineView.js +2 -1
  50. package/conversation/ConversationTimelineView.js.map +1 -1
  51. package/conversation/ConversationsWorkbench.d.ts.map +1 -1
  52. package/conversation/ConversationsWorkbench.js +16 -5
  53. package/conversation/ConversationsWorkbench.js.map +1 -1
  54. package/conversation/index.d.ts +3 -1
  55. package/conversation/index.d.ts.map +1 -1
  56. package/conversation/index.js +1 -0
  57. package/conversation/index.js.map +1 -1
  58. package/conversation/useConversationParticipation.d.ts +41 -4
  59. package/conversation/useConversationParticipation.d.ts.map +1 -1
  60. package/conversation/useConversationParticipation.js +13 -2
  61. package/conversation/useConversationParticipation.js.map +1 -1
  62. package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -1
  63. package/cursor-accounts/CursorAccountsConsole.js +2 -1
  64. package/cursor-accounts/CursorAccountsConsole.js.map +1 -1
  65. package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -1
  66. package/cursor-accounts/MemberKeysPanel.js +2 -1
  67. package/cursor-accounts/MemberKeysPanel.js.map +1 -1
  68. package/dashboard/DashboardFailedRuns.d.ts.map +1 -1
  69. package/dashboard/DashboardFailedRuns.js +2 -1
  70. package/dashboard/DashboardFailedRuns.js.map +1 -1
  71. package/dependency-graph/DependencyGraph.d.ts.map +1 -1
  72. package/dependency-graph/DependencyGraph.js +2 -1
  73. package/dependency-graph/DependencyGraph.js.map +1 -1
  74. package/dependency-graph/DependencyTreeNode.d.ts.map +1 -1
  75. package/dependency-graph/DependencyTreeNode.js +2 -1
  76. package/dependency-graph/DependencyTreeNode.js.map +1 -1
  77. package/environment/EnvironmentPicker.d.ts.map +1 -1
  78. package/environment/EnvironmentPicker.js +2 -1
  79. package/environment/EnvironmentPicker.js.map +1 -1
  80. package/error/SecretFlowErrorGuide.d.ts.map +1 -1
  81. package/error/SecretFlowErrorGuide.js +2 -1
  82. package/error/SecretFlowErrorGuide.js.map +1 -1
  83. package/execution/ArtifactContentBody.d.ts.map +1 -1
  84. package/execution/ArtifactContentBody.js +2 -1
  85. package/execution/ArtifactContentBody.js.map +1 -1
  86. package/execution/ArtifactsWidget.d.ts.map +1 -1
  87. package/execution/ArtifactsWidget.js +2 -1
  88. package/execution/ArtifactsWidget.js.map +1 -1
  89. package/execution/FileChangeProgressBar.d.ts.map +1 -1
  90. package/execution/FileChangeProgressBar.js +2 -1
  91. package/execution/FileChangeProgressBar.js.map +1 -1
  92. package/execution/TodoList.d.ts.map +1 -1
  93. package/execution/TodoList.js +2 -1
  94. package/execution/TodoList.js.map +1 -1
  95. package/execution/WriteBacksWidget.d.ts.map +1 -1
  96. package/execution/WriteBacksWidget.js +2 -1
  97. package/execution/WriteBacksWidget.js.map +1 -1
  98. package/execution/tool-categories.d.ts +5 -22
  99. package/execution/tool-categories.d.ts.map +1 -1
  100. package/execution/tool-categories.js +8 -38
  101. package/execution/tool-categories.js.map +1 -1
  102. package/iam-policy/PeopleWithAccess.d.ts.map +1 -1
  103. package/iam-policy/PeopleWithAccess.js +2 -1
  104. package/iam-policy/PeopleWithAccess.js.map +1 -1
  105. package/iam-policy/PrincipalPicker.d.ts.map +1 -1
  106. package/iam-policy/PrincipalPicker.js +2 -1
  107. package/iam-policy/PrincipalPicker.js.map +1 -1
  108. package/iam-policy/RoleSelector.d.ts.map +1 -1
  109. package/iam-policy/RoleSelector.js +2 -1
  110. package/iam-policy/RoleSelector.js.map +1 -1
  111. package/identity-account/AccountPreferencesPanel.d.ts +35 -0
  112. package/identity-account/AccountPreferencesPanel.d.ts.map +1 -0
  113. package/identity-account/AccountPreferencesPanel.js +187 -0
  114. package/identity-account/AccountPreferencesPanel.js.map +1 -0
  115. package/identity-account/index.d.ts +8 -0
  116. package/identity-account/index.d.ts.map +1 -1
  117. package/identity-account/index.js +4 -0
  118. package/identity-account/index.js.map +1 -1
  119. package/identity-account/useAccountExecutionDefaults.d.ts +36 -0
  120. package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -0
  121. package/identity-account/useAccountExecutionDefaults.js +46 -0
  122. package/identity-account/useAccountExecutionDefaults.js.map +1 -0
  123. package/identity-account/useMyIdentityAccount.d.ts +55 -0
  124. package/identity-account/useMyIdentityAccount.d.ts.map +1 -0
  125. package/identity-account/useMyIdentityAccount.js +37 -0
  126. package/identity-account/useMyIdentityAccount.js.map +1 -0
  127. package/identity-account/useUpdateIdentityAccount.d.ts +42 -0
  128. package/identity-account/useUpdateIdentityAccount.d.ts.map +1 -0
  129. package/identity-account/useUpdateIdentityAccount.js +53 -0
  130. package/identity-account/useUpdateIdentityAccount.js.map +1 -0
  131. package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -1
  132. package/identity-provider/CreateIdentityProviderForm.js +2 -1
  133. package/identity-provider/CreateIdentityProviderForm.js.map +1 -1
  134. package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -1
  135. package/identity-provider/IdentityProviderDetailPanel.js +2 -1
  136. package/identity-provider/IdentityProviderDetailPanel.js.map +1 -1
  137. package/identity-provider/IdentityProviderWizard.d.ts.map +1 -1
  138. package/identity-provider/IdentityProviderWizard.js +2 -1
  139. package/identity-provider/IdentityProviderWizard.js.map +1 -1
  140. package/index.d.ts +14 -10
  141. package/index.d.ts.map +1 -1
  142. package/index.js +11 -5
  143. package/index.js.map +1 -1
  144. package/internal/StandingContextField.d.ts +37 -0
  145. package/internal/StandingContextField.d.ts.map +1 -0
  146. package/internal/StandingContextField.js +24 -0
  147. package/internal/StandingContextField.js.map +1 -0
  148. package/internal/element-resets.d.ts +17 -0
  149. package/internal/element-resets.d.ts.map +1 -0
  150. package/internal/element-resets.js +32 -0
  151. package/internal/element-resets.js.map +1 -0
  152. package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
  153. package/internal/file-tree/FileTreeNode.js +2 -1
  154. package/internal/file-tree/FileTreeNode.js.map +1 -1
  155. package/internal/markdown-components.d.ts +7 -0
  156. package/internal/markdown-components.d.ts.map +1 -1
  157. package/internal/markdown-components.js +15 -5
  158. package/internal/markdown-components.js.map +1 -1
  159. package/invitation/InvitationManager.d.ts.map +1 -1
  160. package/invitation/InvitationManager.js +2 -1
  161. package/invitation/InvitationManager.js.map +1 -1
  162. package/library/InstanceVisibilitySelector.d.ts.map +1 -1
  163. package/library/InstanceVisibilitySelector.js +9 -2
  164. package/library/InstanceVisibilitySelector.js.map +1 -1
  165. package/library/ResourceVisibilityControl.d.ts +13 -3
  166. package/library/ResourceVisibilityControl.d.ts.map +1 -1
  167. package/library/ResourceVisibilityControl.js +33 -5
  168. package/library/ResourceVisibilityControl.js.map +1 -1
  169. package/library/VisibilityOptionRow.d.ts +6 -0
  170. package/library/VisibilityOptionRow.d.ts.map +1 -1
  171. package/library/VisibilityOptionRow.js +11 -1
  172. package/library/VisibilityOptionRow.js.map +1 -1
  173. package/library/VisibilitySelector.d.ts.map +1 -1
  174. package/library/VisibilitySelector.js +14 -2
  175. package/library/VisibilitySelector.js.map +1 -1
  176. package/library/index.d.ts +4 -2
  177. package/library/index.d.ts.map +1 -1
  178. package/library/index.js +2 -1
  179. package/library/index.js.map +1 -1
  180. package/library/useCanSetPublicVisibility.d.ts +30 -0
  181. package/library/useCanSetPublicVisibility.d.ts.map +1 -0
  182. package/library/useCanSetPublicVisibility.js +41 -0
  183. package/library/useCanSetPublicVisibility.js.map +1 -0
  184. package/library/visibilityLevels.d.ts +32 -1
  185. package/library/visibilityLevels.d.ts.map +1 -1
  186. package/library/visibilityLevels.js +34 -14
  187. package/library/visibilityLevels.js.map +1 -1
  188. package/manifest/ApplyManifestDialog.d.ts.map +1 -1
  189. package/manifest/ApplyManifestDialog.js +2 -1
  190. package/manifest/ApplyManifestDialog.js.map +1 -1
  191. package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -1
  192. package/mcp-server/steps/IdentityTransportStep.js +2 -1
  193. package/mcp-server/steps/IdentityTransportStep.js.map +1 -1
  194. package/mcp-server/useMcpServerConnect.d.ts +8 -5
  195. package/mcp-server/useMcpServerConnect.d.ts.map +1 -1
  196. package/mcp-server/useMcpServerConnect.js +2 -1
  197. package/mcp-server/useMcpServerConnect.js.map +1 -1
  198. package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
  199. package/mcp-server/useMcpServerOAuthConnect.js +7 -2
  200. package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
  201. package/oauth-app/CreateOAuthAppForm.d.ts +2 -2
  202. package/oauth-app/CreateOAuthAppForm.d.ts.map +1 -1
  203. package/oauth-app/CreateOAuthAppForm.js +13 -4
  204. package/oauth-app/CreateOAuthAppForm.js.map +1 -1
  205. package/oauth-app/OAuthAppDetailPanel.d.ts.map +1 -1
  206. package/oauth-app/OAuthAppDetailPanel.js +32 -5
  207. package/oauth-app/OAuthAppDetailPanel.js.map +1 -1
  208. package/organization/OrgPreferencesPanel.d.ts +32 -0
  209. package/organization/OrgPreferencesPanel.d.ts.map +1 -0
  210. package/organization/OrgPreferencesPanel.js +90 -0
  211. package/organization/OrgPreferencesPanel.js.map +1 -0
  212. package/organization/OrgProfilePanel.d.ts.map +1 -1
  213. package/organization/OrgProfilePanel.js +5 -4
  214. package/organization/OrgProfilePanel.js.map +1 -1
  215. package/organization/index.d.ts +2 -0
  216. package/organization/index.d.ts.map +1 -1
  217. package/organization/index.js +1 -0
  218. package/organization/index.js.map +1 -1
  219. package/package.json +4 -4
  220. package/platform-client/CreatePlatformClientForm.d.ts.map +1 -1
  221. package/platform-client/CreatePlatformClientForm.js +2 -1
  222. package/platform-client/CreatePlatformClientForm.js.map +1 -1
  223. package/platform-client/PlatformClientDetailPanel.d.ts.map +1 -1
  224. package/platform-client/PlatformClientDetailPanel.js +2 -1
  225. package/platform-client/PlatformClientDetailPanel.js.map +1 -1
  226. package/pricing-governance/BaselineEditor.d.ts.map +1 -1
  227. package/pricing-governance/BaselineEditor.js +2 -1
  228. package/pricing-governance/BaselineEditor.js.map +1 -1
  229. package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -1
  230. package/pricing-governance/PricingGovernanceConsole.js +2 -1
  231. package/pricing-governance/PricingGovernanceConsole.js.map +1 -1
  232. package/provider-standing/ProviderStandingAccessNotice.d.ts +11 -0
  233. package/provider-standing/ProviderStandingAccessNotice.d.ts.map +1 -0
  234. package/provider-standing/ProviderStandingAccessNotice.js +14 -0
  235. package/provider-standing/ProviderStandingAccessNotice.js.map +1 -0
  236. package/provider-standing/ProviderStandingConsole.d.ts +24 -0
  237. package/provider-standing/ProviderStandingConsole.d.ts.map +1 -0
  238. package/provider-standing/ProviderStandingConsole.js +98 -0
  239. package/provider-standing/ProviderStandingConsole.js.map +1 -0
  240. package/provider-standing/index.d.ts +6 -0
  241. package/provider-standing/index.d.ts.map +1 -0
  242. package/provider-standing/index.js +6 -0
  243. package/provider-standing/index.js.map +1 -0
  244. package/provider-standing/useProviderStanding.d.ts +34 -0
  245. package/provider-standing/useProviderStanding.d.ts.map +1 -0
  246. package/provider-standing/useProviderStanding.js +26 -0
  247. package/provider-standing/useProviderStanding.js.map +1 -0
  248. package/provider.d.ts +12 -0
  249. package/provider.d.ts.map +1 -1
  250. package/provider.js +12 -0
  251. package/provider.js.map +1 -1
  252. package/resource-creation/StepIndicator.d.ts.map +1 -1
  253. package/resource-creation/StepIndicator.js +2 -1
  254. package/resource-creation/StepIndicator.js.map +1 -1
  255. package/schedule/ScheduleDetailView.d.ts.map +1 -1
  256. package/schedule/ScheduleDetailView.js +3 -2
  257. package/schedule/ScheduleDetailView.js.map +1 -1
  258. package/schedule/ScheduleRunsTable.d.ts.map +1 -1
  259. package/schedule/ScheduleRunsTable.js +2 -1
  260. package/schedule/ScheduleRunsTable.js.map +1 -1
  261. package/session/NewSessionViewer.d.ts +10 -1
  262. package/session/NewSessionViewer.d.ts.map +1 -1
  263. package/session/NewSessionViewer.js +2 -1
  264. package/session/NewSessionViewer.js.map +1 -1
  265. package/session/facets/ArtifactsTab.d.ts.map +1 -1
  266. package/session/facets/ArtifactsTab.js +2 -1
  267. package/session/facets/ArtifactsTab.js.map +1 -1
  268. package/session/facets/ChangesTab.d.ts.map +1 -1
  269. package/session/facets/ChangesTab.js +2 -1
  270. package/session/facets/ChangesTab.js.map +1 -1
  271. package/session/facets/UsageTab.d.ts +10 -3
  272. package/session/facets/UsageTab.d.ts.map +1 -1
  273. package/session/facets/UsageTab.js +42 -6
  274. package/session/facets/UsageTab.js.map +1 -1
  275. package/session/index.d.ts +1 -1
  276. package/session/index.d.ts.map +1 -1
  277. package/session/index.js.map +1 -1
  278. package/session/useNewSessionFlow.d.ts +27 -1
  279. package/session/useNewSessionFlow.d.ts.map +1 -1
  280. package/session/useNewSessionFlow.js +45 -8
  281. package/session/useNewSessionFlow.js.map +1 -1
  282. package/session/useSessionUsage.d.ts +25 -0
  283. package/session/useSessionUsage.d.ts.map +1 -1
  284. package/session/useSessionUsage.js +11 -0
  285. package/session/useSessionUsage.js.map +1 -1
  286. package/settings/AccountPreferencesSection.d.ts +3 -0
  287. package/settings/AccountPreferencesSection.d.ts.map +1 -0
  288. package/settings/AccountPreferencesSection.js +10 -0
  289. package/settings/AccountPreferencesSection.js.map +1 -0
  290. package/settings/OrgPreferencesSection.d.ts +3 -0
  291. package/settings/OrgPreferencesSection.d.ts.map +1 -0
  292. package/settings/OrgPreferencesSection.js +13 -0
  293. package/settings/OrgPreferencesSection.js.map +1 -0
  294. package/settings/index.d.ts +2 -0
  295. package/settings/index.d.ts.map +1 -1
  296. package/settings/index.js +2 -0
  297. package/settings/index.js.map +1 -1
  298. package/settings/settings-nav.d.ts.map +1 -1
  299. package/settings/settings-nav.js +23 -1
  300. package/settings/settings-nav.js.map +1 -1
  301. package/settings/useSettingsNavGroups.d.ts.map +1 -1
  302. package/settings/useSettingsNavGroups.js +4 -1
  303. package/settings/useSettingsNavGroups.js.map +1 -1
  304. package/sharing/ShareAgentDialog.d.ts.map +1 -1
  305. package/sharing/ShareAgentDialog.js +2 -1
  306. package/sharing/ShareAgentDialog.js.map +1 -1
  307. package/sidebar/WorkspaceSidebar.d.ts.map +1 -1
  308. package/sidebar/WorkspaceSidebar.js +2 -1
  309. package/sidebar/WorkspaceSidebar.js.map +1 -1
  310. package/skill/SkillFileBrowser.d.ts.map +1 -1
  311. package/skill/SkillFileBrowser.js +2 -1
  312. package/skill/SkillFileBrowser.js.map +1 -1
  313. package/skill/internal/fetchAndUnpackArtifact.d.ts +1 -1
  314. package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -1
  315. package/skill/internal/fetchAndUnpackArtifact.js +47 -3
  316. package/skill/internal/fetchAndUnpackArtifact.js.map +1 -1
  317. package/skill/useSkillDiff.d.ts.map +1 -1
  318. package/skill/useSkillDiff.js +7 -1
  319. package/skill/useSkillDiff.js.map +1 -1
  320. package/skill/useSkillUpload.d.ts.map +1 -1
  321. package/skill/useSkillUpload.js +22 -4
  322. package/skill/useSkillUpload.js.map +1 -1
  323. package/src/__tests__/bare-host-resets.layout.test.tsx +184 -0
  324. package/src/agent/steps/IdentityStep.tsx +2 -1
  325. package/src/agent-instance/AgentInstanceDetailPanel.tsx +2 -1
  326. package/src/api-key/CreateApiKeyForm.tsx +2 -1
  327. package/src/attachment/AttachmentChipList.tsx +19 -8
  328. package/src/attachment/__tests__/AttachmentChipList.test.tsx +12 -0
  329. package/src/attachment/__tests__/useAttachments.test.ts +293 -0
  330. package/src/attachment/index.ts +1 -0
  331. package/src/attachment/useAttachments.ts +143 -11
  332. package/src/channel/ChannelConversationsDialog.tsx +2 -1
  333. package/src/channel/ChannelTemplatesDialog.tsx +2 -1
  334. package/src/channel/ConnectSlackDialog.tsx +2 -1
  335. package/src/channel/connect/ServingAppSection.tsx +2 -1
  336. package/src/channel-app/CreateChannelAppForm.tsx +2 -1
  337. package/src/composer/SessionComposer.tsx +23 -14
  338. package/src/conversation/ConversationComposer.tsx +38 -4
  339. package/src/conversation/ConversationListPane.tsx +2 -5
  340. package/src/conversation/ConversationTemplatePickerDialog.tsx +441 -0
  341. package/src/conversation/ConversationTimelineView.tsx +2 -1
  342. package/src/conversation/ConversationsWorkbench.tsx +40 -4
  343. package/src/conversation/__tests__/ConversationComposer.test.tsx +56 -1
  344. package/src/conversation/__tests__/ConversationTemplatePickerDialog.test.tsx +224 -0
  345. package/src/conversation/__tests__/useConversationParticipation.test.tsx +45 -4
  346. package/src/conversation/index.ts +4 -0
  347. package/src/conversation/useConversationParticipation.ts +58 -6
  348. package/src/cursor-accounts/CursorAccountsConsole.tsx +2 -1
  349. package/src/cursor-accounts/MemberKeysPanel.tsx +2 -1
  350. package/src/dashboard/DashboardFailedRuns.tsx +2 -1
  351. package/src/dependency-graph/DependencyGraph.tsx +2 -1
  352. package/src/dependency-graph/DependencyTreeNode.tsx +2 -1
  353. package/src/environment/EnvironmentPicker.tsx +2 -1
  354. package/src/error/SecretFlowErrorGuide.tsx +3 -2
  355. package/src/execution/ArtifactContentBody.tsx +2 -1
  356. package/src/execution/ArtifactsWidget.tsx +2 -1
  357. package/src/execution/FileChangeProgressBar.tsx +2 -1
  358. package/src/execution/TodoList.tsx +2 -1
  359. package/src/execution/WriteBacksWidget.tsx +2 -1
  360. package/src/execution/tool-categories.ts +17 -41
  361. package/src/iam-policy/PeopleWithAccess.tsx +2 -1
  362. package/src/iam-policy/PrincipalPicker.tsx +2 -0
  363. package/src/iam-policy/RoleSelector.tsx +2 -1
  364. package/src/identity-account/AccountPreferencesPanel.tsx +446 -0
  365. package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +233 -0
  366. package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +116 -0
  367. package/src/identity-account/__tests__/useMyIdentityAccount.test.tsx +121 -0
  368. package/src/identity-account/index.ts +11 -0
  369. package/src/identity-account/useAccountExecutionDefaults.ts +63 -0
  370. package/src/identity-account/useMyIdentityAccount.ts +75 -0
  371. package/src/identity-account/useUpdateIdentityAccount.ts +73 -0
  372. package/src/identity-provider/CreateIdentityProviderForm.tsx +2 -1
  373. package/src/identity-provider/IdentityProviderDetailPanel.tsx +2 -1
  374. package/src/identity-provider/IdentityProviderWizard.tsx +2 -1
  375. package/src/index.ts +37 -2
  376. package/src/internal/StandingContextField.tsx +92 -0
  377. package/src/internal/element-resets.ts +33 -0
  378. package/src/internal/file-tree/FileTreeNode.tsx +2 -1
  379. package/src/internal/markdown-components.tsx +15 -5
  380. package/src/invitation/InvitationManager.tsx +3 -2
  381. package/src/library/InstanceVisibilitySelector.tsx +9 -2
  382. package/src/library/ResourceVisibilityControl.tsx +46 -13
  383. package/src/library/VisibilityOptionRow.tsx +28 -6
  384. package/src/library/VisibilitySelector.tsx +14 -2
  385. package/src/library/__tests__/VisibilitySelector.test.tsx +48 -1
  386. package/src/library/__tests__/visibilityLevels.test.ts +67 -1
  387. package/src/library/index.ts +6 -1
  388. package/src/library/useCanSetPublicVisibility.ts +56 -0
  389. package/src/library/visibilityLevels.ts +65 -14
  390. package/src/manifest/ApplyManifestDialog.tsx +2 -1
  391. package/src/mcp-server/__tests__/useMcpServerConnect.asyncLane.test.tsx +117 -0
  392. package/src/mcp-server/steps/IdentityTransportStep.tsx +3 -2
  393. package/src/mcp-server/useMcpServerConnect.ts +9 -6
  394. package/src/mcp-server/useMcpServerOAuthConnect.ts +7 -2
  395. package/src/oauth-app/CreateOAuthAppForm.tsx +58 -3
  396. package/src/oauth-app/OAuthAppDetailPanel.tsx +84 -3
  397. package/src/organization/OrgPreferencesPanel.tsx +221 -0
  398. package/src/organization/OrgProfilePanel.tsx +5 -4
  399. package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +145 -0
  400. package/src/organization/__tests__/OrgProfilePanel.test.tsx +108 -0
  401. package/src/organization/index.ts +2 -0
  402. package/src/platform-client/CreatePlatformClientForm.tsx +4 -3
  403. package/src/platform-client/PlatformClientDetailPanel.tsx +4 -3
  404. package/src/pricing-governance/BaselineEditor.tsx +3 -2
  405. package/src/pricing-governance/PricingGovernanceConsole.tsx +2 -1
  406. package/src/provider-standing/ProviderStandingAccessNotice.tsx +36 -0
  407. package/src/provider-standing/ProviderStandingConsole.tsx +216 -0
  408. package/src/provider-standing/__tests__/ProviderStandingConsole.test.tsx +143 -0
  409. package/src/provider-standing/index.ts +8 -0
  410. package/src/provider-standing/useProviderStanding.ts +50 -0
  411. package/src/provider.tsx +12 -0
  412. package/src/resource-creation/StepIndicator.tsx +2 -1
  413. package/src/schedule/ScheduleDetailView.tsx +3 -2
  414. package/src/schedule/ScheduleRunsTable.tsx +2 -1
  415. package/src/session/NewSessionViewer.tsx +12 -0
  416. package/src/session/__tests__/UsageTab.test.tsx +136 -0
  417. package/src/session/__tests__/useNewSessionFlow.test.tsx +151 -0
  418. package/src/session/__tests__/useSessionUsage.test.ts +19 -0
  419. package/src/session/facets/ArtifactsTab.tsx +2 -1
  420. package/src/session/facets/ChangesTab.tsx +2 -1
  421. package/src/session/facets/UsageTab.tsx +98 -6
  422. package/src/session/index.ts +1 -0
  423. package/src/session/useNewSessionFlow.ts +76 -9
  424. package/src/session/useSessionUsage.ts +37 -0
  425. package/src/settings/AccountPreferencesSection.tsx +25 -0
  426. package/src/settings/OrgPreferencesSection.tsx +35 -0
  427. package/src/settings/__tests__/settings-nav.test.ts +27 -0
  428. package/src/settings/__tests__/useSettingsNavGroups.test.tsx +11 -1
  429. package/src/settings/index.ts +2 -0
  430. package/src/settings/settings-nav.ts +25 -0
  431. package/src/settings/useSettingsNavGroups.ts +8 -1
  432. package/src/sharing/ShareAgentDialog.tsx +2 -1
  433. package/src/sidebar/WorkspaceSidebar.tsx +2 -1
  434. package/src/skill/SkillFileBrowser.tsx +2 -1
  435. package/src/skill/__tests__/SkillFileBrowser.test.tsx +10 -2
  436. package/src/skill/__tests__/fetchAndUnpackArtifact.test.ts +90 -0
  437. package/src/skill/__tests__/useSkillUpload.test.ts +69 -0
  438. package/src/skill/internal/fetchAndUnpackArtifact.ts +54 -4
  439. package/src/skill/useSkillDiff.ts +7 -1
  440. package/src/skill/useSkillUpload.ts +25 -6
  441. package/src/workflow/ApprovalFormBuilder.tsx +5 -27
  442. package/src/workflow/FailedRunsWidget.tsx +2 -1
  443. package/src/workflow/PendingApprovalsWidget.tsx +2 -1
  444. package/src/workflow/facets/WorkflowArtifactsTab.tsx +2 -1
  445. package/src/workflow/facets/WorkflowUsageTab.tsx +2 -1
  446. package/src/workflow/inspector/WorkflowSummaryPanel.tsx +2 -1
  447. package/src/workflow/inspector/tabs/BranchesTab.tsx +2 -1
  448. package/src/workflow/inspector/tabs/IterationTab.tsx +2 -1
  449. package/src/workflow/instance/WorkflowInstanceDetailPanel.tsx +2 -1
  450. package/src/workspace/ExplorerTree.tsx +2 -1
  451. package/src/workspace/WorkspaceContentSearch.tsx +2 -1
  452. package/src/workspace/WorkspaceFileSearch.tsx +2 -1
  453. package/src/workspace/WorkspaceSummary.tsx +2 -1
  454. package/styles.css +1 -1
  455. package/workflow/ApprovalFormBuilder.d.ts.map +1 -1
  456. package/workflow/ApprovalFormBuilder.js +8 -5
  457. package/workflow/ApprovalFormBuilder.js.map +1 -1
  458. package/workflow/FailedRunsWidget.d.ts.map +1 -1
  459. package/workflow/FailedRunsWidget.js +2 -1
  460. package/workflow/FailedRunsWidget.js.map +1 -1
  461. package/workflow/PendingApprovalsWidget.d.ts.map +1 -1
  462. package/workflow/PendingApprovalsWidget.js +2 -1
  463. package/workflow/PendingApprovalsWidget.js.map +1 -1
  464. package/workflow/facets/WorkflowArtifactsTab.d.ts.map +1 -1
  465. package/workflow/facets/WorkflowArtifactsTab.js +2 -1
  466. package/workflow/facets/WorkflowArtifactsTab.js.map +1 -1
  467. package/workflow/facets/WorkflowUsageTab.d.ts.map +1 -1
  468. package/workflow/facets/WorkflowUsageTab.js +2 -1
  469. package/workflow/facets/WorkflowUsageTab.js.map +1 -1
  470. package/workflow/inspector/WorkflowSummaryPanel.d.ts.map +1 -1
  471. package/workflow/inspector/WorkflowSummaryPanel.js +2 -1
  472. package/workflow/inspector/WorkflowSummaryPanel.js.map +1 -1
  473. package/workflow/inspector/tabs/BranchesTab.d.ts.map +1 -1
  474. package/workflow/inspector/tabs/BranchesTab.js +2 -1
  475. package/workflow/inspector/tabs/BranchesTab.js.map +1 -1
  476. package/workflow/inspector/tabs/IterationTab.d.ts.map +1 -1
  477. package/workflow/inspector/tabs/IterationTab.js +2 -1
  478. package/workflow/inspector/tabs/IterationTab.js.map +1 -1
  479. package/workflow/instance/WorkflowInstanceDetailPanel.d.ts.map +1 -1
  480. package/workflow/instance/WorkflowInstanceDetailPanel.js +2 -1
  481. package/workflow/instance/WorkflowInstanceDetailPanel.js.map +1 -1
  482. package/workspace/ExplorerTree.d.ts.map +1 -1
  483. package/workspace/ExplorerTree.js +2 -1
  484. package/workspace/ExplorerTree.js.map +1 -1
  485. package/workspace/WorkspaceContentSearch.d.ts.map +1 -1
  486. package/workspace/WorkspaceContentSearch.js +2 -1
  487. package/workspace/WorkspaceContentSearch.js.map +1 -1
  488. package/workspace/WorkspaceFileSearch.d.ts.map +1 -1
  489. package/workspace/WorkspaceFileSearch.js +2 -1
  490. package/workspace/WorkspaceFileSearch.js.map +1 -1
  491. package/workspace/WorkspaceSummary.d.ts.map +1 -1
  492. package/workspace/WorkspaceSummary.js +2 -1
  493. package/workspace/WorkspaceSummary.js.map +1 -1
@@ -0,0 +1,50 @@
1
+ "use client";
2
+
3
+ import type { ProviderStandingView } from "@stigmer/protos/ai/stigmer/platform/providerstanding/v1/io_pb";
4
+ import { useStigmer } from "../hooks.js";
5
+ import { useFetch } from "../internal/useFetch.js";
6
+
7
+ /** Return value of {@link useProviderStanding}. */
8
+ export interface UseProviderStandingReturn {
9
+ /** The standing view, or `null` before the first successful fetch. */
10
+ readonly standing: ProviderStandingView | null;
11
+ /** `true` while the initial fetch is in flight. */
12
+ readonly isLoading: boolean;
13
+ /** `true` while a background refetch is in flight and stale data is shown. */
14
+ readonly isRefetching: boolean;
15
+ /** Error from the last failed request, or `null` when healthy. */
16
+ readonly error: Error | null;
17
+ /** Discard cached data and re-fetch from the server. */
18
+ readonly refetch: () => void;
19
+ }
20
+
21
+ /**
22
+ * Data hook for platform provider standing: the latest canary-probe
23
+ * verdict per platform LLM provider account (status, latency, bounded
24
+ * error summary, probe time), recorded hourly by the standing probe.
25
+ *
26
+ * Platform-operator surface: the caller needs
27
+ * `can_view_provider_standing` on `platform:stigmer`. Cloud-only — the
28
+ * OSS Go server does not implement the controller.
29
+ *
30
+ * Pass `enabled: false` to skip fetching (stable no-op).
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * const { standing, isLoading, refetch } = useProviderStanding();
35
+ * ```
36
+ */
37
+ export function useProviderStanding(
38
+ options?: { readonly enabled?: boolean },
39
+ ): UseProviderStandingReturn {
40
+ const stigmer = useStigmer();
41
+ const enabled = options?.enabled ?? true;
42
+
43
+ const { data: standing, isLoading, isRefetching, error, refetch } = useFetch(
44
+ enabled ? () => stigmer.providerStanding.getStandingView() : null,
45
+ [enabled, stigmer],
46
+ null as ProviderStandingView | null,
47
+ );
48
+
49
+ return { standing, isLoading, isRefetching, error, refetch };
50
+ }
package/src/provider.tsx CHANGED
@@ -240,6 +240,18 @@ const EMPTY_REVIEW_RENDERERS: ReviewRenderers = {};
240
240
  * column makes it balloon even in a content-sized page), so only
241
241
  * the host — which knows its layout — can apply it safely.
242
242
  *
243
+ * **Hosts without a global CSS reset.** SDK components carry their
244
+ * own per-element resets (lists, fieldsets, form controls) and the
245
+ * markdown surfaces declare their margins explicitly, so they render
246
+ * correctly with no Tailwind-preflight-style reset in the host page
247
+ * (#695). Two deliberate boundaries remain the host's: font-family
248
+ * inherits from the host (an embedded widget adopting host typography
249
+ * is correct — set `--stgm-font-sans` to override), and the host's
250
+ * OWN content inside the provider keeps its user-agent styling — the
251
+ * SDK never resets elements it did not render. If your reset-less
252
+ * page composes its own `<p>`/`<h*>` content between SDK components,
253
+ * their user-agent margins are yours to manage.
254
+ *
243
255
  * Two stable selector hooks are part of the public contract:
244
256
  * `data-stgm-root` marks the in-tree container (and only it);
245
257
  * `data-stgm-portal` marks the portal container appended to
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { cn } from "@stigmer/theme";
4
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
4
5
 
5
6
  /** Props for {@link StepIndicator}. */
6
7
  export interface StepIndicatorProps {
@@ -37,7 +38,7 @@ export function StepIndicator({
37
38
  aria-label="Wizard progress"
38
39
  className={cn("stg:flex stg:flex-col stg:gap-1", className)}
39
40
  >
40
- <ol className="stg:flex stg:flex-col stg:gap-1" role="list">
41
+ <ol className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-1")} role="list">
41
42
  {steps.map((step, index) => {
42
43
  const state = getStepState(index, currentStepIndex);
43
44
  const isClickable = state === "completed" && onStepClick != null;
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { useCallback, useEffect, useMemo, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
5
6
  import { create } from "@bufbuild/protobuf";
6
7
  import { timestampDate } from "@bufbuild/protobuf/wkt";
7
8
  import type { Schedule } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
@@ -1356,7 +1357,7 @@ function EnvironmentRefList({
1356
1357
  return <span className="stg:text-sm stg:text-muted-foreground">—</span>;
1357
1358
  }
1358
1359
  return (
1359
- <ul className="stg:flex stg:flex-col stg:gap-0.5">
1360
+ <ul className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-0.5")}>
1360
1361
  {refs.map((ref, i) => (
1361
1362
  <li
1362
1363
  key={`${ref.org}/${ref.slug}-${i}`}
@@ -1470,7 +1471,7 @@ function WorkspaceSummary({
1470
1471
  return <span className="stg:text-sm stg:text-muted-foreground">—</span>;
1471
1472
  }
1472
1473
  return (
1473
- <ul className="stg:flex stg:flex-col stg:gap-0.5">
1474
+ <ul className={cn(UNSTYLED_LIST, "stg:flex stg:flex-col stg:gap-0.5")}>
1474
1475
  {entries.map((entry, i) => {
1475
1476
  const git =
1476
1477
  entry.source?.source?.case === "gitRepo"
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
5
6
  import { timestampDate } from "@bufbuild/protobuf/wkt";
6
7
  import {
7
8
  ScheduleRunOrigin,
@@ -277,7 +278,7 @@ export function ScheduleRunsCompactList({
277
278
  return <EmptyRuns />;
278
279
  }
279
280
  return (
280
- <ul className="stg:divide-y stg:divide-border">
281
+ <ul className={cn(UNSTYLED_LIST, "stg:divide-y stg:divide-border")}>
281
282
  {runs.map((run, i) => (
282
283
  <CompactRunRow
283
284
  key={runKey(run, i)}
@@ -9,6 +9,7 @@ import type { WorkspaceContentSearcher } from "../workspace/WorkspaceContentSear
9
9
  import type { InteractionModeOption } from "../composer/index.js";
10
10
  import { SessionComposer } from "../composer/index.js";
11
11
  import type { HarnessOption } from "../models/harness.js";
12
+ import type { AccountExecutionDefaults } from "../identity-account/useAccountExecutionDefaults.js";
12
13
  import { SessionViewerLayout } from "./SessionViewerLayout.js";
13
14
  import { useWorkspaceEditors } from "../internal/store/index.js";
14
15
  import { WorkspaceSurface } from "../workspace/WorkspaceSurface.js";
@@ -163,6 +164,15 @@ export interface NewSessionViewerProps {
163
164
  */
164
165
  readonly defaultHarness?: HarnessOption;
165
166
 
167
+ /**
168
+ * The user's account-level execution defaults, typically from
169
+ * `useAccountExecutionDefaults()`. Seeds the harness and model pickers
170
+ * under the layered precedence documented on
171
+ * {@link UseNewSessionFlowOptions.accountDefaults}; explicit device
172
+ * picks always win. Ignored for the `"guest"` audience.
173
+ */
174
+ readonly accountDefaults?: AccountExecutionDefaults;
175
+
166
176
  /** Agent to auto-select on mount (used for draft flows). */
167
177
  readonly initialAgentRef?: ResourceRef;
168
178
  /**
@@ -253,6 +263,7 @@ export function NewSessionViewer({
253
263
  panelOpen,
254
264
  onPanelOpenChange,
255
265
  defaultHarness,
266
+ accountDefaults,
256
267
  initialAgentRef,
257
268
  initialInstanceId,
258
269
  initialAttachments,
@@ -269,6 +280,7 @@ export function NewSessionViewer({
269
280
  onError,
270
281
  getRuntimeEnv,
271
282
  defaultHarness,
283
+ accountDefaults,
272
284
  audience,
273
285
  runConfig,
274
286
  });
@@ -0,0 +1,136 @@
1
+ // The #362 console surface: the Usage tab pairs billing's RESOLVED
2
+ // per-execution model (the after-the-fact truth for Cursor Auto runs)
3
+ // with the tier the runner REQUESTED (the streaming summary's audit
4
+ // record that the account default was never left in control).
5
+
6
+ import { describe, it, expect, afterEach, vi } from "vitest";
7
+ import { render, screen, cleanup } from "@testing-library/react";
8
+ import { create } from "@bufbuild/protobuf";
9
+ import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
10
+ import { ServiceTier } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
11
+ import type { UseSessionUsageReturn } from "../useSessionUsage.js";
12
+
13
+ // UsageTab's render contract is what this suite pins; the aggregation
14
+ // itself (billing-report-wins, streaming fallback, breakdown mapping) is
15
+ // useSessionUsage's own suite. Mocking the hook also spares the RPC
16
+ // provider plumbing.
17
+ const usageMock = vi.hoisted(() => vi.fn<() => UseSessionUsageReturn>());
18
+ vi.mock("../useSessionUsage.js", async (importOriginal) => ({
19
+ ...(await importOriginal<object>()),
20
+ useSessionUsage: () => usageMock(),
21
+ }));
22
+
23
+ import { UsageTab } from "../facets/UsageTab.js";
24
+
25
+ // UsageWidget re-aggregates via the real hook internally — with the module
26
+ // mocked above it sees the same mocked value, which is exactly the intent.
27
+
28
+ const EMPTY_USAGE: UseSessionUsageReturn = {
29
+ totalCostUsd: 0,
30
+ totalTokens: 0,
31
+ inputTokens: 0,
32
+ outputTokens: 0,
33
+ cacheReadTokens: 0,
34
+ cacheCreationTokens: 0,
35
+ llmCallCount: 0,
36
+ modelBreakdown: [],
37
+ executionBreakdown: [],
38
+ primaryModel: "",
39
+ primaryProvider: "",
40
+ hasUsage: false,
41
+ isEstimated: false,
42
+ };
43
+
44
+ function usageWith(overrides: Partial<UseSessionUsageReturn>): UseSessionUsageReturn {
45
+ return {
46
+ ...EMPTY_USAGE,
47
+ hasUsage: true,
48
+ totalCostUsd: 0.0123,
49
+ totalTokens: 100,
50
+ llmCallCount: 1,
51
+ primaryModel: "composer-2.5",
52
+ primaryProvider: "cursor",
53
+ ...overrides,
54
+ };
55
+ }
56
+
57
+ function executionWithTier(id: string, tier?: ServiceTier) {
58
+ return create(AgentExecutionSchema, {
59
+ metadata: { id },
60
+ spec: { sessionId: "ses_1" },
61
+ status: {
62
+ streamingUsage: {
63
+ totalTokens: 100n,
64
+ turnCount: 1,
65
+ estimatedCostUsd: 0.01,
66
+ model: "default",
67
+ ...(tier !== undefined ? { requestedServiceTier: tier } : {}),
68
+ },
69
+ },
70
+ });
71
+ }
72
+
73
+ afterEach(cleanup);
74
+
75
+ describe("UsageTab (#362 model provenance)", () => {
76
+ it("shows the empty state when no usage exists", () => {
77
+ usageMock.mockReturnValue(EMPTY_USAGE);
78
+ render(<UsageTab executions={[]} />);
79
+ expect(screen.getByText(/No usage data yet/)).toBeTruthy();
80
+ });
81
+
82
+ it("renders the billing-resolved model per run with its cost — the Auto forensics view", () => {
83
+ usageMock.mockReturnValue(usageWith({
84
+ executionBreakdown: [{
85
+ executionId: "exe_1",
86
+ resolvedModel: "cursor-grok-4.5-high-fast",
87
+ billableCostUsd: 0.0123,
88
+ isEstimated: false,
89
+ }],
90
+ }));
91
+
92
+ render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.STANDARD)]} />);
93
+
94
+ expect(screen.getByText(/cursor-grok-4\.5-high-fast/)).toBeTruthy();
95
+ expect(screen.getByRole("list", { name: "Per-execution model and tier" })).toBeTruthy();
96
+ });
97
+
98
+ it("pairs the run with the tier the runner requested", () => {
99
+ usageMock.mockReturnValue(usageWith({
100
+ executionBreakdown: [{
101
+ executionId: "exe_1",
102
+ resolvedModel: "composer-2.5",
103
+ billableCostUsd: 0.0123,
104
+ isEstimated: false,
105
+ }],
106
+ }));
107
+
108
+ render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.FAST)]} />);
109
+
110
+ expect(screen.getByText("fast requested")).toBeTruthy();
111
+ });
112
+
113
+ it("omits the tier chip for executions that predate the tier attribute", () => {
114
+ usageMock.mockReturnValue(usageWith({
115
+ executionBreakdown: [{
116
+ executionId: "exe_0",
117
+ resolvedModel: "claude-haiku-4.5",
118
+ billableCostUsd: 0.0042,
119
+ isEstimated: false,
120
+ }],
121
+ }));
122
+
123
+ render(<UsageTab executions={[executionWithTier("exe_0")]} />);
124
+
125
+ expect(screen.getByText(/claude-haiku-4\.5/)).toBeTruthy();
126
+ expect(screen.queryByText(/requested/)).toBeNull();
127
+ });
128
+
129
+ it("renders no provenance list before any billing record lands", () => {
130
+ usageMock.mockReturnValue(usageWith({ executionBreakdown: [] }));
131
+
132
+ render(<UsageTab executions={[executionWithTier("exe_1", ServiceTier.STANDARD)]} />);
133
+
134
+ expect(screen.queryByRole("list", { name: "Per-execution model and tier" })).toBeNull();
135
+ });
136
+ });
@@ -805,6 +805,157 @@ describe("useNewSessionFlow", () => {
805
805
  });
806
806
  });
807
807
 
808
+ describe("accountDefaults (oss#293 Phase 1.5 layered seed)", () => {
809
+ // Two native models so "stored pick outranks account default" is
810
+ // distinguishable; the shared TEST_MODELS carries one per harness.
811
+ const SEED_MODELS = parseRegistryJson({
812
+ models: [
813
+ { id: "claude-sonnet-4.6", displayName: "Claude Sonnet 4.6", shortDescription: "", speedTier: "fast", provider: "anthropic", harness: "native", costTier: "standard", featured: true, pricing: { inputPricePerMillion: 3, outputPricePerMillion: 15, cacheWritePricePerMillion: 3.75, cacheReadPricePerMillion: 0.3 } },
814
+ { id: "gpt-5.3", displayName: "GPT 5.3", shortDescription: "", speedTier: "fast", provider: "openai", harness: "native", costTier: "standard", featured: false, pricing: { inputPricePerMillion: 2, outputPricePerMillion: 8, cacheWritePricePerMillion: 2, cacheReadPricePerMillion: 0.2 } },
815
+ { id: "default", displayName: "Cursor Auto", shortDescription: "", speedTier: "fast", provider: "cursor", harness: "cursor", costTier: "standard", featured: true, pricing: { inputPricePerMillion: 1.25, outputPricePerMillion: 6, cacheWritePricePerMillion: 1.25, cacheReadPricePerMillion: 0.25 } },
816
+ { id: "composer-2.5", displayName: "Composer 2.5", shortDescription: "", speedTier: "fast", provider: "cursor", harness: "cursor", costTier: "standard", featured: false, pricing: { inputPricePerMillion: 1, outputPricePerMillion: 5, cacheWritePricePerMillion: 1, cacheReadPricePerMillion: 0.1 } },
817
+ ],
818
+ });
819
+
820
+ function seedWrapper() {
821
+ const state: ModelRegistryState = { models: SEED_MODELS, isLoading: false, error: null, refetch: () => {} };
822
+ return function Wrapper({ children }: { children: ReactNode }) {
823
+ return (
824
+ <ModelRegistryContext.Provider value={state}>
825
+ {children}
826
+ </ModelRegistryContext.Provider>
827
+ );
828
+ };
829
+ }
830
+
831
+ it("seeds the harness when nothing is stored", () => {
832
+ const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
833
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
834
+
835
+ expect(result.current.harness).toBe("cursor");
836
+ });
837
+
838
+ it("a stored harness choice outranks the account default", () => {
839
+ localStorage.setItem(STORAGE_KEY_HARNESS, "native");
840
+ const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
841
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
842
+
843
+ expect(result.current.harness).toBe("native");
844
+ });
845
+
846
+ it("the account harness outranks the embedder defaultHarness", () => {
847
+ const opts = {
848
+ ...defaultOptions(),
849
+ defaultHarness: "native" as const,
850
+ accountDefaults: { harness: "cursor" as const },
851
+ };
852
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
853
+
854
+ expect(result.current.harness).toBe("cursor");
855
+ });
856
+
857
+ it("never persists the seeded harness — only explicit choices", () => {
858
+ const opts = { ...defaultOptions(), accountDefaults: { harness: "cursor" as const } };
859
+ renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
860
+
861
+ expect(localStorage.getItem(STORAGE_KEY_HARNESS)).toBeNull();
862
+ });
863
+
864
+ it("a late-arriving harness seed applies when the user has not picked (whoAmI resolves after mount)", () => {
865
+ const base: Parameters<typeof useNewSessionFlow>[0] = defaultOptions();
866
+ const { result, rerender } = renderHook(
867
+ (opts: Parameters<typeof useNewSessionFlow>[0]) => useNewSessionFlow(opts),
868
+ { wrapper: seedWrapper(), initialProps: base },
869
+ );
870
+ expect(result.current.harness).toBe("native");
871
+
872
+ rerender({ ...base, accountDefaults: { harness: "cursor" as const } });
873
+
874
+ expect(result.current.harness).toBe("cursor");
875
+ expect(localStorage.getItem(STORAGE_KEY_HARNESS)).toBeNull();
876
+ });
877
+
878
+ it("a late-arriving harness seed never overrides an explicit pick this mount", () => {
879
+ const base: Parameters<typeof useNewSessionFlow>[0] = defaultOptions();
880
+ const { result, rerender } = renderHook(
881
+ (opts: Parameters<typeof useNewSessionFlow>[0]) => useNewSessionFlow(opts),
882
+ { wrapper: seedWrapper(), initialProps: base },
883
+ );
884
+ act(() => result.current.setHarness("native"));
885
+
886
+ rerender({ ...base, accountDefaults: { harness: "cursor" as const } });
887
+
888
+ expect(result.current.harness).toBe("native");
889
+ });
890
+
891
+ it("seeds the model for the active harness when nothing is stored", () => {
892
+ const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
893
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
894
+
895
+ expect(result.current.modelId).toBe("gpt-5.3");
896
+ });
897
+
898
+ it("a stored model pick outranks the account default", async () => {
899
+ localStorage.setItem(STORAGE_KEY_MODEL_NATIVE, "claude-sonnet-4.6");
900
+ const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
901
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
902
+
903
+ // The stored restore lands in a passive effect once the registry is
904
+ // ready; the account seed must not win the race before it.
905
+ await act(async () => {});
906
+ expect(result.current.modelId).toBe("claude-sonnet-4.6");
907
+ });
908
+
909
+ it("self-heals a stale account model to the platform default (undefined)", () => {
910
+ const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "retired-model" } };
911
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
912
+
913
+ expect(result.current.modelId).toBeUndefined();
914
+ });
915
+
916
+ it("never persists the seeded model — only explicit choices", () => {
917
+ const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
918
+ renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
919
+
920
+ expect(localStorage.getItem(STORAGE_KEY_MODEL_NATIVE)).toBeNull();
921
+ });
922
+
923
+ it("follows the active harness: cursorModel seeds cursor sessions", () => {
924
+ const opts = {
925
+ ...defaultOptions(),
926
+ accountDefaults: { harness: "cursor" as const, nativeModel: "gpt-5.3", cursorModel: "composer-2.5" },
927
+ };
928
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
929
+
930
+ expect(result.current.harness).toBe("cursor");
931
+ expect(result.current.modelId).toBe("composer-2.5");
932
+ });
933
+
934
+ it("submits the seeded model explicitly — the pill promise (#663) and the DD-003 seed rule", async () => {
935
+ const opts = { ...defaultOptions(), accountDefaults: { nativeModel: "gpt-5.3" } };
936
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
937
+
938
+ await act(async () => {
939
+ await result.current.submit("Hello");
940
+ });
941
+
942
+ expect(mockCreateExecution.mock.calls[0][0].modelName).toBe("gpt-5.3");
943
+ });
944
+
945
+ it("guest audience ignores accountDefaults entirely", () => {
946
+ const opts = {
947
+ ...defaultOptions(),
948
+ audience: "guest" as const,
949
+ accountDefaults: { harness: "native" as const, nativeModel: "gpt-5.3", cursorModel: "composer-2.5" },
950
+ };
951
+ const { result } = renderHook(() => useNewSessionFlow(opts), { wrapper: seedWrapper() });
952
+
953
+ // Platform share policy: cursor harness, no client model.
954
+ expect(result.current.harness).toBe("cursor");
955
+ expect(result.current.modelId).toBeUndefined();
956
+ });
957
+ });
958
+
808
959
  describe("submit while default agent is loading", () => {
809
960
  it("awaits default agent and creates session when fetch resolves", async () => {
810
961
  const resolvedAgent = { status: { defaultInstanceId: "awaited-inst" } };
@@ -53,6 +53,14 @@ function authoritativeReport(billableMicros: bigint): GetSessionUsageReportOutpu
53
53
  primaryProvider: "cursor",
54
54
  },
55
55
  modelBreakdown: [],
56
+ executions: [
57
+ {
58
+ executionId: "exe_1",
59
+ primaryModel: "claude-sonnet-4-6",
60
+ billableCostMicros: billableMicros,
61
+ isEstimated: false,
62
+ },
63
+ ],
56
64
  isEstimated: false,
57
65
  } as unknown as GetSessionUsageReportOutput;
58
66
  }
@@ -71,6 +79,7 @@ function emptyReport(): GetSessionUsageReportOutput {
71
79
  primaryProvider: "",
72
80
  },
73
81
  modelBreakdown: [],
82
+ executions: [],
74
83
  isEstimated: true,
75
84
  } as unknown as GetSessionUsageReportOutput;
76
85
  }
@@ -122,6 +131,16 @@ describe("useSessionUsage", () => {
122
131
  // 60_000 micros = $0.06 billable, replacing the $0.05 estimate.
123
132
  expect(result.current.totalCostUsd).toBeCloseTo(0.06);
124
133
  expect(result.current.llmCallCount).toBe(2);
134
+ // The #362 provenance rows ride the same report: billing-RESOLVED
135
+ // model per execution, never the runner's requested echo.
136
+ expect(result.current.executionBreakdown).toEqual([
137
+ {
138
+ executionId: "exe_1",
139
+ resolvedModel: "claude-sonnet-4-6",
140
+ billableCostUsd: 0.06,
141
+ isEstimated: false,
142
+ },
143
+ ]);
125
144
  });
126
145
 
127
146
  it("polls the usage report while an execution is in progress", async () => {
@@ -7,6 +7,7 @@ import {
7
7
  artifactKey,
8
8
  type SessionArtifactEntry,
9
9
  } from "../useSessionArtifacts.js";
10
+ import { UNSTYLED_LIST } from "../../internal/element-resets.js";
10
11
  import { ArtifactPreviewModal } from "../../execution/ArtifactPreviewModal.js";
11
12
  import { ArtifactRow } from "../../execution/ArtifactRow.js";
12
13
  import { isPlanArtifact } from "../../library/detect-plan-artifact.js";
@@ -123,7 +124,7 @@ export function ArtifactsTab({
123
124
 
124
125
  return (
125
126
  <>
126
- <ul role="list" className="stg:flex stg:flex-col">
127
+ <ul role="list" className={`${UNSTYLED_LIST} stg:flex stg:flex-col`}>
127
128
  {artifacts.map((entry) => (
128
129
  <ArtifactRow
129
130
  key={artifactKey(entry.artifact)}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
4
+ import { UNSTYLED_LIST } from "../../internal/element-resets.js";
4
5
  import { useSessionWriteBacks } from "../useSessionWriteBacks.js";
5
6
  import { WriteBackCard } from "../../execution/WriteBackCard.js";
6
7
 
@@ -48,7 +49,7 @@ export function ChangesTab({
48
49
  // Dense row groups matching the Artifacts facet's list — gap separates
49
50
  // entries only in multi-repo sessions (single-entry lists stay seamless).
50
51
  return (
51
- <ul role="list" className="stg:flex stg:flex-col stg:gap-3">
52
+ <ul role="list" className={`${UNSTYLED_LIST} stg:flex stg:flex-col stg:gap-3`}>
52
53
  {writeBacks.map((entry) => (
53
54
  <li key={entry.writeBack.workspaceEntryName}>
54
55
  <WriteBackCard writeBack={entry.writeBack} />
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
4
- import { useSessionUsage } from "../useSessionUsage.js";
5
- import { UsageWidget } from "../../execution/UsageWidget.js";
4
+ import { ServiceTier } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
5
+ import { useSessionUsage, type ExecutionUsageEntry } from "../useSessionUsage.js";
6
+ import { UsageWidget, formatCost } from "../../execution/UsageWidget.js";
6
7
 
7
8
  export interface UsageTabProps {
8
9
  readonly executions: readonly AgentExecution[];
@@ -11,9 +12,16 @@ export interface UsageTabProps {
11
12
  /**
12
13
  * Usage facet for the session panel (a `useSessionRailViews` rail view).
13
14
  *
14
- * Uses `useSessionUsage` to determine if data exists, then delegates
15
- * rendering to the existing `UsageWidget`. Shows an empty state when
16
- * no usage data is available.
15
+ * Renders the session totals ({@link UsageWidget}) plus the #362 model
16
+ * provenance list: per execution, the billing-RESOLVED model with its
17
+ * cost for a Cursor Auto run, the only honest answer to "which model
18
+ * actually ran and what did it cost", since the requested model is empty
19
+ * by definition there — paired with the tier the runner REQUESTED (the
20
+ * streaming summary's audit record that the account default was never
21
+ * left in control). Requested-vs-billed divergence is a platform alarm
22
+ * (`stigmer.billing.service_tier.mismatch`), not a per-row UI concern.
23
+ *
24
+ * Shows an empty state when no usage data is available.
17
25
  */
18
26
  export function UsageTab({ executions }: UsageTabProps) {
19
27
  const usage = useSessionUsage(executions);
@@ -28,5 +36,89 @@ export function UsageTab({ executions }: UsageTabProps) {
28
36
  );
29
37
  }
30
38
 
31
- return <UsageWidget executions={executions} />;
39
+ return (
40
+ <div className="stg:flex stg:flex-col stg:gap-4">
41
+ <UsageWidget executions={executions} />
42
+ {usage.executionBreakdown.length > 0 && (
43
+ <ExecutionModelList
44
+ entries={usage.executionBreakdown}
45
+ executions={executions}
46
+ />
47
+ )}
48
+ </div>
49
+ );
50
+ }
51
+
52
+ /**
53
+ * Per-execution model provenance rows, in the report's chronological
54
+ * order: `#N resolved-model [tier requested] [Estimated] $cost`.
55
+ */
56
+ function ExecutionModelList({
57
+ entries,
58
+ executions,
59
+ }: {
60
+ readonly entries: readonly ExecutionUsageEntry[];
61
+ readonly executions: readonly AgentExecution[];
62
+ }) {
63
+ return (
64
+ <div
65
+ className="stg:flex stg:flex-col stg:gap-1"
66
+ role="list"
67
+ aria-label="Per-execution model and tier"
68
+ >
69
+ <div className="stg:text-xs stg:font-medium stg:text-foreground">
70
+ Models per run
71
+ </div>
72
+ {entries.map((entry, index) => {
73
+ const requestedTier = requestedTierLabel(executions, entry.executionId);
74
+ return (
75
+ <div
76
+ key={entry.executionId}
77
+ className="stg:flex stg:items-baseline stg:justify-between stg:gap-2 stg:text-xs stg:text-muted-foreground"
78
+ role="listitem"
79
+ >
80
+ <span className="stg:truncate">
81
+ <span className="stg:tabular-nums">#{index + 1}</span>{" "}
82
+ {entry.resolvedModel || "—"}
83
+ {requestedTier && (
84
+ <span className="stg:ml-1 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none">
85
+ {requestedTier} requested
86
+ </span>
87
+ )}
88
+ {entry.isEstimated && (
89
+ <span className="stg:ml-1 stg:rounded stg:bg-muted stg:px-1 stg:py-0.5 stg:text-[10px] stg:font-medium stg:leading-none">
90
+ Estimated
91
+ </span>
92
+ )}
93
+ </span>
94
+ <span className="stg:shrink-0 stg:tabular-nums">
95
+ {formatCost(entry.billableCostUsd)}
96
+ </span>
97
+ </div>
98
+ );
99
+ })}
100
+ </div>
101
+ );
102
+ }
103
+
104
+ /**
105
+ * The tier the runner requested for one execution, from its streaming
106
+ * usage summary — present once the runner has translated the execution
107
+ * config, absent for executions that predate the tier attribute. Never
108
+ * "unspecified": the runner records the RESOLVED tier (#357's audit
109
+ * contract).
110
+ */
111
+ function requestedTierLabel(
112
+ executions: readonly AgentExecution[],
113
+ executionId: string,
114
+ ): string | null {
115
+ const match = executions.find((e) => e.metadata?.id === executionId);
116
+ switch (match?.status?.streamingUsage?.requestedServiceTier) {
117
+ case ServiceTier.FAST:
118
+ return "fast";
119
+ case ServiceTier.STANDARD:
120
+ return "standard";
121
+ default:
122
+ return null;
123
+ }
32
124
  }
@@ -58,6 +58,7 @@ export type { UseSessionFileChangesReturn } from "./useSessionFileChanges.js";
58
58
 
59
59
  export { useSessionUsage } from "./useSessionUsage.js";
60
60
  export type {
61
+ ExecutionUsageEntry,
61
62
  ModelCostEntry,
62
63
  UseSessionUsageReturn,
63
64
  } from "./useSessionUsage.js";