@hotmeshio/long-tail 0.19.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/build/api/workflows/config.d.ts +3 -0
  2. package/build/api/workflows/config.js +15 -0
  3. package/build/api/workflows/index.d.ts +1 -0
  4. package/build/api/workflows/index.js +3 -1
  5. package/build/api/workflows/input-lookups.d.ts +16 -0
  6. package/build/api/workflows/input-lookups.js +69 -0
  7. package/build/api/workflows/input-validation.d.ts +4 -3
  8. package/build/api/workflows/input-validation.js +7 -4
  9. package/build/api/workflows/invocable.js +1 -0
  10. package/build/api/workflows/invocation.js +1 -1
  11. package/build/lib/db/schemas/035_workflow_input_lookups.sql +9 -0
  12. package/build/routes/workflows/config.js +10 -0
  13. package/build/services/config/cache.js +1 -0
  14. package/build/services/config/read.js +2 -0
  15. package/build/services/config/sql.d.ts +2 -2
  16. package/build/services/config/sql.js +6 -5
  17. package/build/services/config/write.js +10 -1
  18. package/build/services/knowledge/index.d.ts +1 -0
  19. package/build/services/knowledge/index.js +1 -0
  20. package/build/services/knowledge/lookup-refs.d.ts +7 -0
  21. package/build/services/knowledge/lookup-refs.js +26 -0
  22. package/build/services/mcp/db-server/schemas.d.ts +2 -2
  23. package/build/shared/form-validation/field-validator.d.ts +1 -0
  24. package/build/shared/form-validation/field-validator.js +94 -6
  25. package/build/shared/form-validation/invoke-context.d.ts +4 -3
  26. package/build/shared/form-validation/invoke-context.js +5 -4
  27. package/build/shared/form-validation/x-lt-options.d.ts +3 -3
  28. package/build/shared/form-validation/x-lt-options.js +19 -5
  29. package/build/shared/form-validation/x-lt-show-if.d.ts +5 -0
  30. package/build/shared/form-validation/x-lt-show-if.js +10 -0
  31. package/build/start/workers.js +10 -0
  32. package/build/system/mcp-servers/admin/schemas.d.ts +64 -20
  33. package/build/system/mcp-servers/admin/schemas.js +19 -3
  34. package/build/system/mcp-servers/admin/workflow-config.js +54 -9
  35. package/build/system/mcp-servers/admin/workflows.js +9 -7
  36. package/build/system/mcp-servers/db-query/schemas.d.ts +2 -2
  37. package/build/system/seed/tool-manifests-admin.d.ts +517 -54
  38. package/build/system/seed/tool-manifests-admin.js +4 -3
  39. package/build/tsconfig.tsbuildinfo +1 -1
  40. package/build/types/config.d.ts +4 -0
  41. package/build/types/startup.d.ts +6 -0
  42. package/dashboard/dist/assets/{AdminDashboard-Drs-9TRM.js → AdminDashboard-DplvDBti.js} +2 -2
  43. package/dashboard/dist/assets/{AdminDashboard-Drs-9TRM.js.map → AdminDashboard-DplvDBti.js.map} +1 -1
  44. package/dashboard/dist/assets/{AgentConfigPage-BDPDZ7-v.js → AgentConfigPage-D8Bf6YxO.js} +2 -2
  45. package/dashboard/dist/assets/{AgentConfigPage-BDPDZ7-v.js.map → AgentConfigPage-D8Bf6YxO.js.map} +1 -1
  46. package/dashboard/dist/assets/{AgentDetailPage-CGBulM4_.js → AgentDetailPage-BN8g0Y2G.js} +2 -2
  47. package/dashboard/dist/assets/{AgentDetailPage-CGBulM4_.js.map → AgentDetailPage-BN8g0Y2G.js.map} +1 -1
  48. package/dashboard/dist/assets/{AgentsPage-D77JeViQ.js → AgentsPage-7JJBHku8.js} +2 -2
  49. package/dashboard/dist/assets/{AgentsPage-D77JeViQ.js.map → AgentsPage-7JJBHku8.js.map} +1 -1
  50. package/dashboard/dist/assets/{AvailableEscalationsPage-CqM_MOMy.js → AvailableEscalationsPage-lz5qwSjg.js} +2 -2
  51. package/dashboard/dist/assets/{AvailableEscalationsPage-CqM_MOMy.js.map → AvailableEscalationsPage-lz5qwSjg.js.map} +1 -1
  52. package/dashboard/dist/assets/{BotPicker-CC5vI_Sv.js → BotPicker-CGCnIz8I.js} +2 -2
  53. package/dashboard/dist/assets/{BotPicker-CC5vI_Sv.js.map → BotPicker-CGCnIz8I.js.map} +1 -1
  54. package/dashboard/dist/assets/{BulkAssignModal-BXiJnlqt.js → BulkAssignModal-NJBcoj-f.js} +2 -2
  55. package/dashboard/dist/assets/{BulkAssignModal-BXiJnlqt.js.map → BulkAssignModal-NJBcoj-f.js.map} +1 -1
  56. package/dashboard/dist/assets/{CapabilitiesPage-D9TC2iKy.js → CapabilitiesPage-F8dpNn9B.js} +2 -2
  57. package/dashboard/dist/assets/{CapabilitiesPage-D9TC2iKy.js.map → CapabilitiesPage-F8dpNn9B.js.map} +1 -1
  58. package/dashboard/dist/assets/{CollapsibleSection-D10lGw_u.js → CollapsibleSection-BZW6VpCU.js} +2 -2
  59. package/dashboard/dist/assets/{CollapsibleSection-D10lGw_u.js.map → CollapsibleSection-BZW6VpCU.js.map} +1 -1
  60. package/dashboard/dist/assets/{ConfirmDeleteModal-BJdLN6No.js → ConfirmDeleteModal-64adXLdq.js} +2 -2
  61. package/dashboard/dist/assets/{ConfirmDeleteModal-BJdLN6No.js.map → ConfirmDeleteModal-64adXLdq.js.map} +1 -1
  62. package/dashboard/dist/assets/{CountdownTimer-D9B-BjQ7.js → CountdownTimer-BxDub9d2.js} +2 -2
  63. package/dashboard/dist/assets/{CountdownTimer-D9B-BjQ7.js.map → CountdownTimer-BxDub9d2.js.map} +1 -1
  64. package/dashboard/dist/assets/{CredentialsPage-hniUAFBK.js → CredentialsPage-CnLzopLL.js} +2 -2
  65. package/dashboard/dist/assets/{CredentialsPage-hniUAFBK.js.map → CredentialsPage-CnLzopLL.js.map} +1 -1
  66. package/dashboard/dist/assets/{CronLabel-v9DCD2FX.js → CronLabel-CAD5UYDT.js} +2 -2
  67. package/dashboard/dist/assets/{CronLabel-v9DCD2FX.js.map → CronLabel-CAD5UYDT.js.map} +1 -1
  68. package/dashboard/dist/assets/{ElapsedCell-_xvVTK8N.js → ElapsedCell-CwO4ufd0.js} +2 -2
  69. package/dashboard/dist/assets/{ElapsedCell-_xvVTK8N.js.map → ElapsedCell-CwO4ufd0.js.map} +1 -1
  70. package/dashboard/dist/assets/{EntityTimelinePanel-1lT3jkCM.js → EntityTimelinePanel-CkF-oW-m.js} +2 -2
  71. package/dashboard/dist/assets/{EntityTimelinePanel-1lT3jkCM.js.map → EntityTimelinePanel-CkF-oW-m.js.map} +1 -1
  72. package/dashboard/dist/assets/{EscalationListSchemaPage-BeQUTUEO.js → EscalationListSchemaPage-h9JO_q5f.js} +2 -2
  73. package/dashboard/dist/assets/{EscalationListSchemaPage-BeQUTUEO.js.map → EscalationListSchemaPage-h9JO_q5f.js.map} +1 -1
  74. package/dashboard/dist/assets/{EscalationListView-uuZRMSLB.js → EscalationListView-AHW2xtlr.js} +2 -2
  75. package/dashboard/dist/assets/{EscalationListView-uuZRMSLB.js.map → EscalationListView-AHW2xtlr.js.map} +1 -1
  76. package/dashboard/dist/assets/{EscalationSchemaPage-D4VlEwyS.js → EscalationSchemaPage-mJFL5_Se.js} +2 -2
  77. package/dashboard/dist/assets/{EscalationSchemaPage-D4VlEwyS.js.map → EscalationSchemaPage-mJFL5_Se.js.map} +1 -1
  78. package/dashboard/dist/assets/{EscalationsOverview-Bx6Zrzm-.js → EscalationsOverview-DlXUFqWJ.js} +2 -2
  79. package/dashboard/dist/assets/{EscalationsOverview-Bx6Zrzm-.js.map → EscalationsOverview-DlXUFqWJ.js.map} +1 -1
  80. package/dashboard/dist/assets/{EventTable-KEC3YWBf.js → EventTable-Ike2xchn.js} +2 -2
  81. package/dashboard/dist/assets/{EventTable-KEC3YWBf.js.map → EventTable-Ike2xchn.js.map} +1 -1
  82. package/dashboard/dist/assets/{FilterBar-xwN_b5fj.js → FilterBar-DMOR-O1c.js} +2 -2
  83. package/dashboard/dist/assets/{FilterBar-xwN_b5fj.js.map → FilterBar-DMOR-O1c.js.map} +1 -1
  84. package/dashboard/dist/assets/{GraphInvokePage-DV7Y0fe2.js → GraphInvokePage-CKtvWowP.js} +2 -2
  85. package/dashboard/dist/assets/{GraphInvokePage-DV7Y0fe2.js.map → GraphInvokePage-CKtvWowP.js.map} +1 -1
  86. package/dashboard/dist/assets/{HomePage-G785SWcW.js → HomePage-BQ3Q791Q.js} +2 -2
  87. package/dashboard/dist/assets/{HomePage-G785SWcW.js.map → HomePage-BQ3Q791Q.js.map} +1 -1
  88. package/dashboard/dist/assets/{ListToolbar-zPVYPg3W.js → ListToolbar-DdJzj472.js} +2 -2
  89. package/dashboard/dist/assets/{ListToolbar-zPVYPg3W.js.map → ListToolbar-DdJzj472.js.map} +1 -1
  90. package/dashboard/dist/assets/{McpOverview-CMGUq8hx.js → McpOverview-BbtrduWn.js} +2 -2
  91. package/dashboard/dist/assets/{McpOverview-CMGUq8hx.js.map → McpOverview-BbtrduWn.js.map} +1 -1
  92. package/dashboard/dist/assets/{McpQueryDetailPage-CdhLhaKn.js → McpQueryDetailPage-C1L4T-Wt.js} +2 -2
  93. package/dashboard/dist/assets/{McpQueryDetailPage-CdhLhaKn.js.map → McpQueryDetailPage-C1L4T-Wt.js.map} +1 -1
  94. package/dashboard/dist/assets/{McpQueryPage-CNSNMagY.js → McpQueryPage-CfJy7HZ7.js} +2 -2
  95. package/dashboard/dist/assets/{McpQueryPage-CNSNMagY.js.map → McpQueryPage-CfJy7HZ7.js.map} +1 -1
  96. package/dashboard/dist/assets/{McpRunDetailPage-DBm8hUaW.js → McpRunDetailPage-CA9yv7he.js} +2 -2
  97. package/dashboard/dist/assets/{McpRunDetailPage-DBm8hUaW.js.map → McpRunDetailPage-CA9yv7he.js.map} +1 -1
  98. package/dashboard/dist/assets/{McpRunsPage-B6rb5QBf.js → McpRunsPage-D7QXjW9z.js} +2 -2
  99. package/dashboard/dist/assets/{McpRunsPage-B6rb5QBf.js.map → McpRunsPage-D7QXjW9z.js.map} +1 -1
  100. package/dashboard/dist/assets/{OperationsPage-Dxk1fAMg.js → OperationsPage-aLHHAP2X.js} +2 -2
  101. package/dashboard/dist/assets/{OperationsPage-Dxk1fAMg.js.map → OperationsPage-aLHHAP2X.js.map} +1 -1
  102. package/dashboard/dist/assets/{OperatorDashboard-DBOscDnf.js → OperatorDashboard-sXNDh1Ph.js} +2 -2
  103. package/dashboard/dist/assets/{OperatorDashboard-DBOscDnf.js.map → OperatorDashboard-sXNDh1Ph.js.map} +1 -1
  104. package/dashboard/dist/assets/{PersonaDetailPage-BGRdGpeR.js → PersonaDetailPage-NeHD-Gra.js} +2 -2
  105. package/dashboard/dist/assets/{PersonaDetailPage-BGRdGpeR.js.map → PersonaDetailPage-NeHD-Gra.js.map} +1 -1
  106. package/dashboard/dist/assets/{PersonasPage-DRzOZcVa.js → PersonasPage-DavKXRWX.js} +2 -2
  107. package/dashboard/dist/assets/{PersonasPage-DRzOZcVa.js.map → PersonasPage-DavKXRWX.js.map} +1 -1
  108. package/dashboard/dist/assets/{ProcessDetailPage-BLGjZXpM.js → ProcessDetailPage-DkdKJGe6.js} +2 -2
  109. package/dashboard/dist/assets/{ProcessDetailPage-BLGjZXpM.js.map → ProcessDetailPage-DkdKJGe6.js.map} +1 -1
  110. package/dashboard/dist/assets/{ProcessesListPage-5NnysKFC.js → ProcessesListPage-CjwVKe32.js} +2 -2
  111. package/dashboard/dist/assets/{ProcessesListPage-5NnysKFC.js.map → ProcessesListPage-CjwVKe32.js.map} +1 -1
  112. package/dashboard/dist/assets/ResolverForm-Bk-wDkN-.js +3 -0
  113. package/dashboard/dist/assets/ResolverForm-Bk-wDkN-.js.map +1 -0
  114. package/dashboard/dist/assets/{RoleDetailPage-C_LIoe1j.js → RoleDetailPage-WQt0y5l7.js} +3 -3
  115. package/dashboard/dist/assets/{RoleDetailPage-C_LIoe1j.js.map → RoleDetailPage-WQt0y5l7.js.map} +1 -1
  116. package/dashboard/dist/assets/{RolesPage-BmW1LzkU.js → RolesPage-OM9KM8Pg.js} +2 -2
  117. package/dashboard/dist/assets/{RolesPage-BmW1LzkU.js.map → RolesPage-OM9KM8Pg.js.map} +1 -1
  118. package/dashboard/dist/assets/{RunAsSelector-BwZTJ4Yj.js → RunAsSelector-fFMt1bGe.js} +2 -2
  119. package/dashboard/dist/assets/{RunAsSelector-BwZTJ4Yj.js.map → RunAsSelector-fFMt1bGe.js.map} +1 -1
  120. package/dashboard/dist/assets/ScanCodesPage-AujH-pPQ.js +2 -0
  121. package/dashboard/dist/assets/{ScanCodesPage-FiYIYB-m.js.map → ScanCodesPage-AujH-pPQ.js.map} +1 -1
  122. package/dashboard/dist/assets/{ScanSchemeDetailPage-BiAqtD-a.js → ScanSchemeDetailPage-eKQpmsC_.js} +2 -2
  123. package/dashboard/dist/assets/{ScanSchemeDetailPage-BiAqtD-a.js.map → ScanSchemeDetailPage-eKQpmsC_.js.map} +1 -1
  124. package/dashboard/dist/assets/{ScanStationPage-8CdOtbCD.js → ScanStationPage-C1_ppDoZ.js} +2 -2
  125. package/dashboard/dist/assets/{ScanStationPage-8CdOtbCD.js.map → ScanStationPage-C1_ppDoZ.js.map} +1 -1
  126. package/dashboard/dist/assets/{StickyPagination-DRuqKhZt.js → StickyPagination-B91Pk9xh.js} +2 -2
  127. package/dashboard/dist/assets/{StickyPagination-DRuqKhZt.js.map → StickyPagination-B91Pk9xh.js.map} +1 -1
  128. package/dashboard/dist/assets/{StreamMessageDetail-JwlbRiMn.js → StreamMessageDetail-C7SPqaJt.js} +2 -2
  129. package/dashboard/dist/assets/{StreamMessageDetail-JwlbRiMn.js.map → StreamMessageDetail-C7SPqaJt.js.map} +1 -1
  130. package/dashboard/dist/assets/{SwimlaneTimeline-hu3c4bCJ.js → SwimlaneTimeline-BcHR8ylf.js} +2 -2
  131. package/dashboard/dist/assets/{SwimlaneTimeline-hu3c4bCJ.js.map → SwimlaneTimeline-BcHR8ylf.js.map} +1 -1
  132. package/dashboard/dist/assets/{TaskDetailPage-NqVZF3jW.js → TaskDetailPage-Bqj0I_I0.js} +2 -2
  133. package/dashboard/dist/assets/{TaskDetailPage-NqVZF3jW.js.map → TaskDetailPage-Bqj0I_I0.js.map} +1 -1
  134. package/dashboard/dist/assets/{TasksListPage-BQNaSzCn.js → TasksListPage-BB1f79lL.js} +2 -2
  135. package/dashboard/dist/assets/{TasksListPage-BQNaSzCn.js.map → TasksListPage-BB1f79lL.js.map} +1 -1
  136. package/dashboard/dist/assets/{TimeAgo-Cv35DOiI.js → TimeAgo-BFnODmNe.js} +2 -2
  137. package/dashboard/dist/assets/{TimeAgo-Cv35DOiI.js.map → TimeAgo-BFnODmNe.js.map} +1 -1
  138. package/dashboard/dist/assets/{TimestampCell-DHUXey9s.js → TimestampCell-BXgLOBsr.js} +2 -2
  139. package/dashboard/dist/assets/{TimestampCell-DHUXey9s.js.map → TimestampCell-BXgLOBsr.js.map} +1 -1
  140. package/dashboard/dist/assets/{ToolTestPanel-DvuLFWqQ.js → ToolTestPanel-Bwe3J5lj.js} +2 -2
  141. package/dashboard/dist/assets/{ToolTestPanel-DvuLFWqQ.js.map → ToolTestPanel-Bwe3J5lj.js.map} +1 -1
  142. package/dashboard/dist/assets/{TopicDetailPage-TXX3QNSo.js → TopicDetailPage-DAF07vZ9.js} +2 -2
  143. package/dashboard/dist/assets/{TopicDetailPage-TXX3QNSo.js.map → TopicDetailPage-DAF07vZ9.js.map} +1 -1
  144. package/dashboard/dist/assets/{TopicsPage-h-oyTeEJ.js → TopicsPage-C1gxBUap.js} +2 -2
  145. package/dashboard/dist/assets/{TopicsPage-h-oyTeEJ.js.map → TopicsPage-C1gxBUap.js.map} +1 -1
  146. package/dashboard/dist/assets/{UserName-BceRCeDF.js → UserName-BzXJUE6q.js} +2 -2
  147. package/dashboard/dist/assets/{UserName-BceRCeDF.js.map → UserName-BzXJUE6q.js.map} +1 -1
  148. package/dashboard/dist/assets/{WorkflowExecutionPage-CmHGcaN9.js → WorkflowExecutionPage-SkRU5cRX.js} +2 -2
  149. package/dashboard/dist/assets/{WorkflowExecutionPage-CmHGcaN9.js.map → WorkflowExecutionPage-SkRU5cRX.js.map} +1 -1
  150. package/dashboard/dist/assets/{WorkflowsDashboard-B0r2lQXk.js → WorkflowsDashboard-CZAqRk1N.js} +2 -2
  151. package/dashboard/dist/assets/{WorkflowsDashboard-B0r2lQXk.js.map → WorkflowsDashboard-CZAqRk1N.js.map} +1 -1
  152. package/dashboard/dist/assets/{WorkflowsOverview-BTMc2PJ_.js → WorkflowsOverview-BoN44VTE.js} +2 -2
  153. package/dashboard/dist/assets/{WorkflowsOverview-BTMc2PJ_.js.map → WorkflowsOverview-BoN44VTE.js.map} +1 -1
  154. package/dashboard/dist/assets/{YamlWorkflowDetailPage-DUiCVnZp.js → YamlWorkflowDetailPage-CqjhtdJf.js} +2 -2
  155. package/dashboard/dist/assets/{YamlWorkflowDetailPage-DUiCVnZp.js.map → YamlWorkflowDetailPage-CqjhtdJf.js.map} +1 -1
  156. package/dashboard/dist/assets/{YamlWorkflowsPage-BAuXfwi0.js → YamlWorkflowsPage-CwnJkzyb.js} +2 -2
  157. package/dashboard/dist/assets/{YamlWorkflowsPage-BAuXfwi0.js.map → YamlWorkflowsPage-CwnJkzyb.js.map} +1 -1
  158. package/dashboard/dist/assets/{agents-BvmLCk4h.js → agents-gV0Ys-sY.js} +2 -2
  159. package/dashboard/dist/assets/{agents-BvmLCk4h.js.map → agents-gV0Ys-sY.js.map} +1 -1
  160. package/dashboard/dist/assets/{bots-f_tyhl4I.js → bots-B97itB3I.js} +2 -2
  161. package/dashboard/dist/assets/{bots-f_tyhl4I.js.map → bots-B97itB3I.js.map} +1 -1
  162. package/dashboard/dist/assets/{capabilities-DNo5bqLx.js → capabilities-CR9xZgGd.js} +2 -2
  163. package/dashboard/dist/assets/{capabilities-DNo5bqLx.js.map → capabilities-CR9xZgGd.js.map} +1 -1
  164. package/dashboard/dist/assets/{controlplane-Dyyj2Irb.js → controlplane-YxvP1KCa.js} +2 -2
  165. package/dashboard/dist/assets/{controlplane-Dyyj2Irb.js.map → controlplane-YxvP1KCa.js.map} +1 -1
  166. package/dashboard/dist/assets/{escalation-columns-DIigeTOK.js → escalation-columns-uq-IV2aj.js} +2 -2
  167. package/dashboard/dist/assets/{escalation-columns-DIigeTOK.js.map → escalation-columns-uq-IV2aj.js.map} +1 -1
  168. package/dashboard/dist/assets/index-3ezfWLkE.js +6 -0
  169. package/dashboard/dist/assets/index-3ezfWLkE.js.map +1 -0
  170. package/dashboard/dist/assets/{index-CsKiRyhy.js → index-B9BBCqLI.js} +2 -2
  171. package/dashboard/dist/assets/{index-CsKiRyhy.js.map → index-B9BBCqLI.js.map} +1 -1
  172. package/dashboard/dist/assets/{index-DL83W7Gu.js → index-BQpV-DTG.js} +2 -2
  173. package/dashboard/dist/assets/{index-DL83W7Gu.js.map → index-BQpV-DTG.js.map} +1 -1
  174. package/dashboard/dist/assets/index-Bp9KBLT5.js +2 -0
  175. package/dashboard/dist/assets/{index-D7ESqn22.js.map → index-Bp9KBLT5.js.map} +1 -1
  176. package/dashboard/dist/assets/{index-DvxxrFBo.js → index-CFbo9FU9.js} +2 -2
  177. package/dashboard/dist/assets/{index-DvxxrFBo.js.map → index-CFbo9FU9.js.map} +1 -1
  178. package/dashboard/dist/assets/{index-e2X-s0EQ.js → index-CIpHj4di.js} +2 -2
  179. package/dashboard/dist/assets/{index-e2X-s0EQ.js.map → index-CIpHj4di.js.map} +1 -1
  180. package/dashboard/dist/assets/{index-BMlQYOE1.js → index-CIwlVfvV.js} +10 -10
  181. package/dashboard/dist/assets/index-CIwlVfvV.js.map +1 -0
  182. package/dashboard/dist/assets/{index-BNZknxFY.js → index-CUZ6LYye.js} +2 -2
  183. package/dashboard/dist/assets/{index-BNZknxFY.js.map → index-CUZ6LYye.js.map} +1 -1
  184. package/dashboard/dist/assets/index-Cfvkl2J0.js +13 -0
  185. package/dashboard/dist/assets/index-Cfvkl2J0.js.map +1 -0
  186. package/dashboard/dist/assets/{index-DWse7ERF.js → index-DMeaiKgf.js} +2 -2
  187. package/dashboard/dist/assets/{index-DWse7ERF.js.map → index-DMeaiKgf.js.map} +1 -1
  188. package/dashboard/dist/assets/{index-C-Xr2V3F.js → index-DwOnWeu8.js} +2 -2
  189. package/dashboard/dist/assets/{index-C-Xr2V3F.js.map → index-DwOnWeu8.js.map} +1 -1
  190. package/dashboard/dist/assets/index-SGyrXGp8.js +3 -0
  191. package/dashboard/dist/assets/{index-CegPUKpc.js.map → index-SGyrXGp8.js.map} +1 -1
  192. package/dashboard/dist/assets/{index-PcyGjmBm.js → index-ipqwPavs.js} +2 -2
  193. package/dashboard/dist/assets/{index-PcyGjmBm.js.map → index-ipqwPavs.js.map} +1 -1
  194. package/dashboard/dist/assets/invoke-context-DrVyUEfs.js +2 -0
  195. package/dashboard/dist/assets/invoke-context-DrVyUEfs.js.map +1 -0
  196. package/dashboard/dist/assets/{knowledge-Coo6CKzo.js → knowledge-XX6cW4Ob.js} +2 -2
  197. package/dashboard/dist/assets/{knowledge-Coo6CKzo.js.map → knowledge-XX6cW4Ob.js.map} +1 -1
  198. package/dashboard/dist/assets/{mcp-Cz5eFnP_.js → mcp-CH13hNH2.js} +2 -2
  199. package/dashboard/dist/assets/{mcp-Cz5eFnP_.js.map → mcp-CH13hNH2.js.map} +1 -1
  200. package/dashboard/dist/assets/{mcp-query-BtnuO4LF.js → mcp-query-Duydd3JA.js} +2 -2
  201. package/dashboard/dist/assets/{mcp-query-BtnuO4LF.js.map → mcp-query-Duydd3JA.js.map} +1 -1
  202. package/dashboard/dist/assets/{personas-C2-LgpHQ.js → personas-mDk4lLQS.js} +2 -2
  203. package/dashboard/dist/assets/{personas-C2-LgpHQ.js.map → personas-mDk4lLQS.js.map} +1 -1
  204. package/dashboard/dist/assets/{pipelines-TuXQvUA-.js → pipelines-B5GcgCeF.js} +2 -2
  205. package/dashboard/dist/assets/{pipelines-TuXQvUA-.js.map → pipelines-B5GcgCeF.js.map} +1 -1
  206. package/dashboard/dist/assets/{resolver-payload-C1dXB3n6.js → resolver-payload-m9AGKZ3a.js} +2 -2
  207. package/dashboard/dist/assets/{resolver-payload-C1dXB3n6.js.map → resolver-payload-m9AGKZ3a.js.map} +1 -1
  208. package/dashboard/dist/assets/{tasks-OUzpu__z.js → tasks-CItmNsRp.js} +2 -2
  209. package/dashboard/dist/assets/{tasks-OUzpu__z.js.map → tasks-CItmNsRp.js.map} +1 -1
  210. package/dashboard/dist/assets/{topics-B8bdrBaW.js → topics-CJYG7BX5.js} +2 -2
  211. package/dashboard/dist/assets/{topics-B8bdrBaW.js.map → topics-CJYG7BX5.js.map} +1 -1
  212. package/dashboard/dist/assets/{useDebouncedValue-Cp5ZOtVE.js → useDebouncedValue-BrwgXcp8.js} +2 -2
  213. package/dashboard/dist/assets/{useDebouncedValue-Cp5ZOtVE.js.map → useDebouncedValue-BrwgXcp8.js.map} +1 -1
  214. package/dashboard/dist/assets/{useNamespace-DtQe3wZ5.js → useNamespace-CHty0HAS.js} +2 -2
  215. package/dashboard/dist/assets/{useNamespace-DtQe3wZ5.js.map → useNamespace-CHty0HAS.js.map} +1 -1
  216. package/dashboard/dist/assets/{useYamlActivityEvents-CS22c15X.js → useYamlActivityEvents-CoTsia7t.js} +2 -2
  217. package/dashboard/dist/assets/{useYamlActivityEvents-CS22c15X.js.map → useYamlActivityEvents-CoTsia7t.js.map} +1 -1
  218. package/dashboard/dist/assets/{yaml-workflows-HQIki3hI.js → yaml-workflows-CiWwx5rM.js} +2 -2
  219. package/dashboard/dist/assets/{yaml-workflows-HQIki3hI.js.map → yaml-workflows-CiWwx5rM.js.map} +1 -1
  220. package/dashboard/dist/index.html +1 -1
  221. package/docs/api/http/workflows.md +28 -1
  222. package/docs/api/mcp/admin.md +40 -4
  223. package/docs/code-owned-configuration.md +1 -1
  224. package/docs/dashboard.md +1 -1
  225. package/docs/design-principles.md +6 -5
  226. package/docs/hitl/form.md +12 -7
  227. package/docs/hitl/invoke-form.md +6 -3
  228. package/docs/hitl/lookups.md +21 -0
  229. package/docs/hitl/x-lt-validation.md +50 -3
  230. package/docs/hitl/x-lt-widget.md +21 -0
  231. package/docs/hitl-guide.md +5 -2
  232. package/package.json +1 -1
  233. package/dashboard/dist/assets/ResolverForm-Dy0yirtP.js +0 -2
  234. package/dashboard/dist/assets/ResolverForm-Dy0yirtP.js.map +0 -1
  235. package/dashboard/dist/assets/ScanCodesPage-FiYIYB-m.js +0 -2
  236. package/dashboard/dist/assets/index-BMlQYOE1.js.map +0 -1
  237. package/dashboard/dist/assets/index-CegPUKpc.js +0 -3
  238. package/dashboard/dist/assets/index-D7ESqn22.js +0 -2
  239. package/dashboard/dist/assets/index-DPLssnMW.js +0 -6
  240. package/dashboard/dist/assets/index-DPLssnMW.js.map +0 -1
  241. package/dashboard/dist/assets/index-DoETPlJP.js +0 -11
  242. package/dashboard/dist/assets/index-DoETPlJP.js.map +0 -1
  243. package/dashboard/dist/assets/seed-form-json-DvPsISxD.js +0 -2
  244. package/dashboard/dist/assets/seed-form-json-DvPsISxD.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import{j as e,a as u}from"./vendor-query-DvWWuNIB.js";import{ap as X,aP as ee,aQ as A,J as te,aR as se,w as ae,x as ne,_ as re}from"./index-BMlQYOE1.js";import{A as ie}from"./AutoGrowTextarea-7X3T9La8.js";import{C as le}from"./ConfirmDeleteModal-BJdLN6No.js";import{aP as J,y as oe,bB as V,G as I,bC as ce,$ as K,aD as de,n as q,an as xe,P as W,I as T,w as me,o as G,aa as he,bD as ue}from"./vendor-icons-DeBdvyKJ.js";import{u as pe,L as U,e as fe,f as be}from"./vendor-react-_9U4mKFr.js";function je({role:t}){const{data:a}=X({role:t,limit:100}),s=(a==null?void 0:a.users)??[];return s.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary",children:"Assign users to this role to staff its queue. Members see and resolve escalations here according to their read/write scope; admins manage the role itself."}):e.jsx("div",{className:"divide-y divide-surface-border/40",children:s.map(r=>{const c=r.roles.find(i=>i.role===t);return c?e.jsxs("div",{className:"flex items-center justify-between py-1.5 gap-2",children:[e.jsx("span",{className:"text-xs text-text-secondary truncate",children:r.display_name||r.external_id}),e.jsx("span",{className:"text-2xs text-text-quaternary font-mono shrink-0",children:ve(c)})]},r.id):null})})}function ve(t){return t.type==="superadmin"||t.type==="admin"?t.type:`member · read ${t.read_scope} · write ${t.write_scope}`}function M(t){return t==null?"":JSON.stringify(t,null,2)}function S(t){const a=t.trim();if(!a)return{ok:!0,value:void 0};try{const s=JSON.parse(a);return typeof s!="object"||Array.isArray(s)||s===null?{ok:!1}:{ok:!0,value:s}}catch{return{ok:!1}}}const O=/^[a-zA-Z0-9_]+$/;function ge(t){var s;const a=S(t);return a.ok&&((s=a.value)==null?void 0:s.kiosk)===!0}function ye(t){const a=S(t);if(!a.ok)return null;const s={...a.value??{}};return s.kiosk===!0?delete s.kiosk:s.kiosk=!0,JSON.stringify(s,null,2)}const _e={title:"",description:"",ops_visible:!1,ops_home_default:!1,enforce_schema:!1,parent_role:"",metadata_schema:"",properties:"{}",sla_minutes:"",target_per_hour:"",worker_count:"",priority_threshold_minutes:"",priority_facet:"",entity_facet:"",entity_state_source:"role"};function Ne(t){return{title:t.title??"",description:t.description??"",ops_visible:t.ops_visible,ops_home_default:t.ops_home_default,enforce_schema:t.enforce_schema,parent_role:t.parent_role??"",metadata_schema:M(t.metadata_schema),properties:M(t.properties)||"{}",sla_minutes:t.sla_minutes!=null?String(t.sla_minutes):"",target_per_hour:t.target_per_hour!=null?String(t.target_per_hour):"",worker_count:t.worker_count!=null?String(t.worker_count):"",priority_threshold_minutes:t.priority_threshold_minutes!=null?String(t.priority_threshold_minutes):"",priority_facet:t.priority_facet??"",entity_facet:t.entity_facet??"",entity_state_source:t.entity_state_source??"role"}}function j({icon:t,label:a,annotation:s,aside:r,accent:c=!1,children:i}){const l=c?"text-accent":"text-text-tertiary";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(t,{className:`w-3 h-3 ${l} shrink-0`,strokeWidth:1.5}),e.jsx("span",{className:`text-2xs font-semibold uppercase tracking-widest ${l}`,children:a}),s&&e.jsxs("span",{className:"text-2xs text-text-quaternary truncate",children:["— ",s]})]}),r]}),e.jsx("div",{className:`border-l-2 pl-5 ${c?"border-accent/15":"border-surface-border/60"}`,children:i})]})}function E(){return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full dot-ring bg-status-success"}),e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-widest text-status-success",children:"Live"})]})}function $({checked:t,onChange:a,title:s}){return e.jsx("button",{onClick:a,title:s,className:`w-9 h-5 rounded-full transition-colors relative shrink-0 ${t?"bg-accent":"bg-surface-border"}`,children:e.jsx("span",{className:`absolute top-[3px] left-0 w-3.5 h-3.5 rounded-full bg-text-inverse transition-transform shadow ${t?"translate-x-[18px]":"translate-x-[3px]"}`})})}function ke({items:t,empty:a,onRemove:s}){return t.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:a}):e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(r=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-2xs bg-accent/10 rounded-sm font-mono text-accent",children:[r,e.jsx("button",{onClick:()=>s(r),className:"text-accent/50 hover:text-status-error transition-colors leading-none ml-0.5",children:"×"})]},r))})}function we({role:t,draft:a,update:s}){const r=pe(),c=ee(),[i,l]=u.useState(!1),m=t.user_count>0||t.chain_count>0||t.workflow_count>0;return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:J,label:"Identity",annotation:"name and description",accent:!0,children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Display Name"}),e.jsx("input",{type:"text",value:a.title,onChange:o=>s({title:o.target.value}),placeholder:`e.g., ${t.role.charAt(0).toUpperCase()+t.role.slice(1)}`,className:"input text-sm w-full"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Description"}),e.jsx(ie,{value:a.description,onChange:o=>s({description:o}),placeholder:"A short description shown on role cards and in the operations view.",rows:2})]})]})}),e.jsx("div",{className:"border-t border-surface-border/40 pt-6",children:m?e.jsxs("p",{className:"text-2xs text-text-quaternary leading-relaxed",children:["This role is referenced by"," ",[t.user_count>0?`${t.user_count} member${t.user_count===1?"":"s"}`:null,t.workflow_count>0?`${t.workflow_count} workflow${t.workflow_count===1?"":"s"}`:null,t.chain_count>0?"routing config":null].filter(Boolean).join(", ")," ","and cannot be deleted."]}):e.jsxs("button",{onClick:()=>l(!0),className:"px-3 py-1.5 text-xs rounded-md text-status-error/60 hover:text-status-error hover:bg-status-error/10 transition-colors flex items-center gap-1",children:[e.jsx(oe,{className:"w-3 h-3"})," Delete this role"]})}),e.jsx(le,{open:i,onClose:()=>l(!1),onConfirm:()=>c.mutate(t.role,{onSuccess:()=>r("/admin/roles")}),title:"Delete Role",description:e.jsxs(e.Fragment,{children:["Delete role ",e.jsx("span",{className:"font-medium font-mono text-text-primary",children:t.role}),"? This cannot be undone."]}),isPending:c.isPending,error:c.error})]})}function Se({role:t,allRoles:a,draft:s,update:r,errors:c}){const i=parseFloat(s.sla_minutes),l=parseFloat(s.target_per_hour),m=parseFloat(s.worker_count),o=!isNaN(i)&&i>0,f=!isNaN(l)&&l>0,b=!isNaN(m)&&m>0,v=o&&b&&!f?`→ target ≈ ${(m/(i/60)).toFixed(1)}/h`:o&&f&&!b?`→ workers ≈ ${(l*(i/60)).toFixed(1)}`:f&&b&&!o?`→ SLA ≈ ${(m/l*60).toFixed(0)}m`:null,d=u.useMemo(()=>a.filter(n=>{if(n.role===t.role)return!1;let h=n;const p=new Set;for(;h!=null&&h.parent_role;){if(h.parent_role===t.role)return!1;if(p.has(h.parent_role))break;p.add(h.parent_role),h=a.find(y=>y.role===h.parent_role)}return!0}),[a,t]);return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:V,label:"Pace Board",annotation:"this role on the Pace Board",accent:!0,children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Show this role on the Pace Board"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"Roles appear on the Operations chart and table with live counts, pace, and the time-in-state mix."})]}),e.jsx($,{checked:s.ops_visible,onChange:()=>r({ops_visible:!s.ops_visible}),title:"Show this role on the Pace Board"})]})}),e.jsx(j,{icon:I,label:"Capacity",annotation:"throughput = workers / (sla / 60)",children:e.jsxs("div",{className:"flex items-end gap-6",children:[[{key:"sla_minutes",label:"SLA",unit:"min",placeholder:"30"},{key:"target_per_hour",label:"Target",unit:"/h",placeholder:"20"},{key:"worker_count",label:"Workers",unit:"",placeholder:"4"}].map(({key:n,label:h,unit:p,placeholder:y})=>e.jsxs("div",{children:[e.jsxs("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:[h,p&&e.jsx("span",{className:"normal-case font-normal ml-1",children:p})]}),e.jsx("input",{type:"number",min:"0",step:"any",value:s[n],onChange:L=>r({[n]:L.target.value}),placeholder:y,className:"input text-xs w-20 font-mono"})]},n)),v&&e.jsx("span",{className:"text-2xs text-accent font-mono whitespace-nowrap pb-2",children:v})]})}),e.jsxs(j,{icon:I,label:"Priority",annotation:"when a pending item counts as overdue",children:[e.jsxs("div",{className:"flex items-end gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:["Threshold",e.jsx("span",{className:"normal-case font-normal ml-1",children:"min"})]}),e.jsx("input",{type:"number",min:"0",step:"any",value:s.priority_threshold_minutes,onChange:n=>r({priority_threshold_minutes:n.target.value}),placeholder:s.sla_minutes||"60",className:"input text-xs w-20 font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:"Age Facet"}),e.jsx("input",{type:"text",value:s.priority_facet,onChange:n=>r({priority_facet:n.target.value}),placeholder:"created_at",className:"input text-xs w-36 font-mono"}),c.priority_facet&&e.jsx("p",{className:"text-2xs text-status-error mt-0.5",children:c.priority_facet})]})]}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-3",children:["Pending unclaimed items older than the threshold count as priority. Age is measured from the metadata facet (an ISO 8601 UTC timestamp, e.g. ",e.jsx("code",{className:"font-mono",children:"authorized_at"}),") or from"," ",e.jsx("code",{className:"font-mono",children:"created_at"})," when blank; the threshold falls back to SLA when blank."]})]}),e.jsxs(j,{icon:ce,label:"Entity",annotation:"what moves through this role",accent:!0,children:[e.jsx("input",{type:"text",value:s.entity_facet,onChange:n=>r({entity_facet:n.target.value}),placeholder:"serialNumber",className:"input text-xs w-44 font-mono"}),c.entity_facet&&e.jsx("p",{className:"text-2xs text-status-error mt-0.5",children:c.entity_facet}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-3",children:["The metadata key naming the entity that moves through this role —"," ",e.jsx("code",{className:"font-mono",children:"serialNumber"}),","," ",e.jsx("code",{className:"font-mono",children:"orderId"}),". Roles sharing a key form that entity's system: its state mix, per-entity dwell, and timelines all derive from it. Blank = the role has no entity notion."]}),s.entity_facet.trim()!==""&&e.jsxs("div",{className:"mt-5",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1.5",children:"States from"}),e.jsx("div",{className:"flex items-center gap-1",children:[{value:"role",label:"Role"},{value:"subtype",label:"Subtypes"}].map(({value:n,label:h})=>e.jsx("button",{onClick:()=>r({entity_state_source:n}),className:`px-2.5 py-1 text-2xs rounded transition-colors ${s.entity_state_source===n?"bg-accent/10 text-accent font-semibold":"icon-link"}`,children:h},n))}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:["How this role names the entity's state. ",e.jsx("strong",{children:"Role"}),": being here is one state (a servicing or harvesting queue)."," ",e.jsx("strong",{children:"Subtypes"}),": this one role holds several states, named by each escalation's subtype (a fleet role parking"," ",e.jsx("code",{className:"font-mono",children:"ready"})," /"," ",e.jsx("code",{className:"font-mono",children:"printing"}),")."]})]})]}),e.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-out ${s.ops_visible?"opacity-100 max-h-[900px]":"opacity-0 max-h-0 pointer-events-none"}`,"aria-hidden":!s.ops_visible,children:e.jsx(j,{icon:K,label:"Sequence",annotation:"where this role sits in its segment",children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Prior Step"}),e.jsxs("select",{value:s.parent_role,onChange:n=>r({parent_role:n.target.value}),className:"select text-sm w-full font-mono",children:[e.jsx("option",{value:"",children:"None — root process"}),d.map(n=>e.jsx("option",{value:n.role,children:n.title?`${n.role} — ${n.title}`:n.role},n.role))]}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:"Places this role in one Pace Board sequence. A role with no prior step starts its own sequence."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary",children:"Upstream Inputs"}),e.jsx(E,{})]}),e.jsx(Ce,{role:t,allRoles:a})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary",children:"Home Segment"}),e.jsx($,{checked:s.ops_home_default,onChange:()=>r({ops_home_default:!s.ops_home_default}),title:"Lead the home Pace Board with this role's sequence"})]}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:"Lead the home page's Pace Board with this role's sequence. One role holds this — saving it here releases the previous holder. Unset everywhere, the board opens on its first sequence."})]})]})})})]})}function Ce({role:t,allRoles:a}){const s=A(),[r,c]=u.useState(""),i=t.upstream_roles??[],l=u.useMemo(()=>a.map(o=>o.role).filter(o=>o!==t.role&&o!=="superadmin"&&!i.includes(o)),[a,t.role,i]),m=o=>s.mutate({role:t.role,upstream_roles:o},{onSuccess:()=>c("")});return e.jsxs("div",{className:"space-y-2",children:[l.length>0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("select",{value:r,onChange:o=>c(o.target.value),className:"select text-xs font-mono flex-1",children:[e.jsx("option",{value:"",children:"Add upstream input…"}),l.map(o=>e.jsx("option",{value:o,children:o},o))]}),e.jsx("button",{onClick:()=>{r&&m([...i,r])},disabled:!r||s.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:s.isPending?"…":"Add"})]}),e.jsx(ke,{items:i,empty:"Roles from other sequences this role draws input from. Add one above and it lands here.",onRemove:o=>m(i.filter(f=>f!==o))}),s.error&&e.jsx("p",{className:"text-2xs text-status-error",children:s.error.message})]})}function Pe({role:t,draft:a,update:s,errors:r,editingJson:c,startEditingJson:i,setMetadataSchemaError:l}){return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:de,label:"Enforcement",annotation:"server-side resolver validation",accent:!0,children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Enforce the escalation form schema"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"Every resolve surface — API, MCP, CLI — validates submitted payloads against this role's form schema and rejects violations with field-level errors before any state changes."})]}),e.jsx($,{checked:a.enforce_schema,onChange:()=>s({enforce_schema:!a.enforce_schema}),title:"Validate every resolve payload against this role's form schema"})]})}),e.jsxs(j,{icon:q,label:"Escalation Schema",annotation:"the resolve form",accent:!0,aside:t.current_schema_version!=null?e.jsxs("span",{className:"text-2xs font-mono text-text-quaternary",children:["v",t.current_schema_version," in use"]}):void 0,children:[e.jsxs("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:["The form a person completes to resolve this role's escalations. Versioned — each save adds one; workflows pin any version via"," ",e.jsx("code",{className:"font-mono",children:"schemaVersion"}),"."]}),e.jsx(U,{to:`/admin/roles/${encodeURIComponent(t.role)}/schema`,className:"text-xs text-accent hover:underline",children:t.form_schema?`Open schema editor — v${t.current_schema_version??1} in use →`:"Define the escalation form →"})]}),e.jsxs(j,{icon:xe,label:"Escalations List Schema",annotation:"rich list view",aside:t.current_list_schema_version!=null?e.jsxs("span",{className:"text-2xs font-mono text-text-quaternary",children:["v",t.current_list_schema_version," in use"]}):void 0,children:[e.jsx("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:"Richly formats the escalation list when it's scoped to just this role. Versioned on its own timeline — separate from the resolve form."}),e.jsx(U,{to:`/admin/roles/${encodeURIComponent(t.role)}/list-schema`,className:"text-xs text-accent hover:underline",children:t.list_schema?`Open list schema editor — v${t.current_list_schema_version??1} in use →`:"Define the list view →"})]}),e.jsxs(j,{icon:q,label:"Metadata Schema",annotation:"validates metadata at creation",aside:!c.has("metadata_schema")&&t.metadata_schema?e.jsx("button",{onClick:()=>i("metadata_schema"),className:"text-2xs text-accent hover:underline",children:"Edit"}):void 0,children:[e.jsxs("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:["Validates ",e.jsx("code",{className:"font-mono",children:"metadata"})," at creation time. Keys appear in faceted search autocomplete."]}),!c.has("metadata_schema")&&t.metadata_schema?e.jsx(te,{data:t.metadata_schema}):e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:a.metadata_schema,onChange:m=>{const o=m.target.value;s({metadata_schema:o}),l(S(o).ok?void 0:"Invalid JSON")},rows:10,spellCheck:!1,className:"input text-xs font-mono w-full resize-y",placeholder:`{
1
+ import{j as e,a as u}from"./vendor-query-DvWWuNIB.js";import{ap as X,aR as ee,aS as A,J as te,aT as se,w as ae,x as ne,_ as re}from"./index-CIwlVfvV.js";import{A as ie}from"./AutoGrowTextarea-7X3T9La8.js";import{C as le}from"./ConfirmDeleteModal-64adXLdq.js";import{aP as J,y as oe,bB as V,G as I,bC as ce,$ as K,aD as de,n as q,an as xe,P as W,I as T,w as me,o as G,aa as he,bD as ue}from"./vendor-icons-DeBdvyKJ.js";import{u as pe,L as U,e as fe,f as be}from"./vendor-react-_9U4mKFr.js";function je({role:t}){const{data:a}=X({role:t,limit:100}),s=(a==null?void 0:a.users)??[];return s.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary",children:"Assign users to this role to staff its queue. Members see and resolve escalations here according to their read/write scope; admins manage the role itself."}):e.jsx("div",{className:"divide-y divide-surface-border/40",children:s.map(r=>{const c=r.roles.find(i=>i.role===t);return c?e.jsxs("div",{className:"flex items-center justify-between py-1.5 gap-2",children:[e.jsx("span",{className:"text-xs text-text-secondary truncate",children:r.display_name||r.external_id}),e.jsx("span",{className:"text-2xs text-text-quaternary font-mono shrink-0",children:ve(c)})]},r.id):null})})}function ve(t){return t.type==="superadmin"||t.type==="admin"?t.type:`member · read ${t.read_scope} · write ${t.write_scope}`}function M(t){return t==null?"":JSON.stringify(t,null,2)}function S(t){const a=t.trim();if(!a)return{ok:!0,value:void 0};try{const s=JSON.parse(a);return typeof s!="object"||Array.isArray(s)||s===null?{ok:!1}:{ok:!0,value:s}}catch{return{ok:!1}}}const O=/^[a-zA-Z0-9_]+$/;function ge(t){var s;const a=S(t);return a.ok&&((s=a.value)==null?void 0:s.kiosk)===!0}function ye(t){const a=S(t);if(!a.ok)return null;const s={...a.value??{}};return s.kiosk===!0?delete s.kiosk:s.kiosk=!0,JSON.stringify(s,null,2)}const _e={title:"",description:"",ops_visible:!1,ops_home_default:!1,enforce_schema:!1,parent_role:"",metadata_schema:"",properties:"{}",sla_minutes:"",target_per_hour:"",worker_count:"",priority_threshold_minutes:"",priority_facet:"",entity_facet:"",entity_state_source:"role"};function Ne(t){return{title:t.title??"",description:t.description??"",ops_visible:t.ops_visible,ops_home_default:t.ops_home_default,enforce_schema:t.enforce_schema,parent_role:t.parent_role??"",metadata_schema:M(t.metadata_schema),properties:M(t.properties)||"{}",sla_minutes:t.sla_minutes!=null?String(t.sla_minutes):"",target_per_hour:t.target_per_hour!=null?String(t.target_per_hour):"",worker_count:t.worker_count!=null?String(t.worker_count):"",priority_threshold_minutes:t.priority_threshold_minutes!=null?String(t.priority_threshold_minutes):"",priority_facet:t.priority_facet??"",entity_facet:t.entity_facet??"",entity_state_source:t.entity_state_source??"role"}}function j({icon:t,label:a,annotation:s,aside:r,accent:c=!1,children:i}){const l=c?"text-accent":"text-text-tertiary";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(t,{className:`w-3 h-3 ${l} shrink-0`,strokeWidth:1.5}),e.jsx("span",{className:`text-2xs font-semibold uppercase tracking-widest ${l}`,children:a}),s&&e.jsxs("span",{className:"text-2xs text-text-quaternary truncate",children:["— ",s]})]}),r]}),e.jsx("div",{className:`border-l-2 pl-5 ${c?"border-accent/15":"border-surface-border/60"}`,children:i})]})}function E(){return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full dot-ring bg-status-success"}),e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-widest text-status-success",children:"Live"})]})}function $({checked:t,onChange:a,title:s}){return e.jsx("button",{onClick:a,title:s,className:`w-9 h-5 rounded-full transition-colors relative shrink-0 ${t?"bg-accent":"bg-surface-border"}`,children:e.jsx("span",{className:`absolute top-[3px] left-0 w-3.5 h-3.5 rounded-full bg-text-inverse transition-transform shadow ${t?"translate-x-[18px]":"translate-x-[3px]"}`})})}function ke({items:t,empty:a,onRemove:s}){return t.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:a}):e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(r=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-2xs bg-accent/10 rounded-sm font-mono text-accent",children:[r,e.jsx("button",{onClick:()=>s(r),className:"text-accent/50 hover:text-status-error transition-colors leading-none ml-0.5",children:"×"})]},r))})}function we({role:t,draft:a,update:s}){const r=pe(),c=ee(),[i,l]=u.useState(!1),m=t.user_count>0||t.chain_count>0||t.workflow_count>0;return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:J,label:"Identity",annotation:"name and description",accent:!0,children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Display Name"}),e.jsx("input",{type:"text",value:a.title,onChange:o=>s({title:o.target.value}),placeholder:`e.g., ${t.role.charAt(0).toUpperCase()+t.role.slice(1)}`,className:"input text-sm w-full"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Description"}),e.jsx(ie,{value:a.description,onChange:o=>s({description:o}),placeholder:"A short description shown on role cards and in the operations view.",rows:2})]})]})}),e.jsx("div",{className:"border-t border-surface-border/40 pt-6",children:m?e.jsxs("p",{className:"text-2xs text-text-quaternary leading-relaxed",children:["This role is referenced by"," ",[t.user_count>0?`${t.user_count} member${t.user_count===1?"":"s"}`:null,t.workflow_count>0?`${t.workflow_count} workflow${t.workflow_count===1?"":"s"}`:null,t.chain_count>0?"routing config":null].filter(Boolean).join(", ")," ","and cannot be deleted."]}):e.jsxs("button",{onClick:()=>l(!0),className:"px-3 py-1.5 text-xs rounded-md text-status-error/60 hover:text-status-error hover:bg-status-error/10 transition-colors flex items-center gap-1",children:[e.jsx(oe,{className:"w-3 h-3"})," Delete this role"]})}),e.jsx(le,{open:i,onClose:()=>l(!1),onConfirm:()=>c.mutate(t.role,{onSuccess:()=>r("/admin/roles")}),title:"Delete Role",description:e.jsxs(e.Fragment,{children:["Delete role ",e.jsx("span",{className:"font-medium font-mono text-text-primary",children:t.role}),"? This cannot be undone."]}),isPending:c.isPending,error:c.error})]})}function Se({role:t,allRoles:a,draft:s,update:r,errors:c}){const i=parseFloat(s.sla_minutes),l=parseFloat(s.target_per_hour),m=parseFloat(s.worker_count),o=!isNaN(i)&&i>0,f=!isNaN(l)&&l>0,b=!isNaN(m)&&m>0,v=o&&b&&!f?`→ target ≈ ${(m/(i/60)).toFixed(1)}/h`:o&&f&&!b?`→ workers ≈ ${(l*(i/60)).toFixed(1)}`:f&&b&&!o?`→ SLA ≈ ${(m/l*60).toFixed(0)}m`:null,d=u.useMemo(()=>a.filter(n=>{if(n.role===t.role)return!1;let h=n;const p=new Set;for(;h!=null&&h.parent_role;){if(h.parent_role===t.role)return!1;if(p.has(h.parent_role))break;p.add(h.parent_role),h=a.find(y=>y.role===h.parent_role)}return!0}),[a,t]);return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:V,label:"Pace Board",annotation:"this role on the Pace Board",accent:!0,children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Show this role on the Pace Board"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"Roles appear on the Operations chart and table with live counts, pace, and the time-in-state mix."})]}),e.jsx($,{checked:s.ops_visible,onChange:()=>r({ops_visible:!s.ops_visible}),title:"Show this role on the Pace Board"})]})}),e.jsx(j,{icon:I,label:"Capacity",annotation:"throughput = workers / (sla / 60)",children:e.jsxs("div",{className:"flex items-end gap-6",children:[[{key:"sla_minutes",label:"SLA",unit:"min",placeholder:"30"},{key:"target_per_hour",label:"Target",unit:"/h",placeholder:"20"},{key:"worker_count",label:"Workers",unit:"",placeholder:"4"}].map(({key:n,label:h,unit:p,placeholder:y})=>e.jsxs("div",{children:[e.jsxs("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:[h,p&&e.jsx("span",{className:"normal-case font-normal ml-1",children:p})]}),e.jsx("input",{type:"number",min:"0",step:"any",value:s[n],onChange:L=>r({[n]:L.target.value}),placeholder:y,className:"input text-xs w-20 font-mono"})]},n)),v&&e.jsx("span",{className:"text-2xs text-accent font-mono whitespace-nowrap pb-2",children:v})]})}),e.jsxs(j,{icon:I,label:"Priority",annotation:"when a pending item counts as overdue",children:[e.jsxs("div",{className:"flex items-end gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:["Threshold",e.jsx("span",{className:"normal-case font-normal ml-1",children:"min"})]}),e.jsx("input",{type:"number",min:"0",step:"any",value:s.priority_threshold_minutes,onChange:n=>r({priority_threshold_minutes:n.target.value}),placeholder:s.sla_minutes||"60",className:"input text-xs w-20 font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1",children:"Age Facet"}),e.jsx("input",{type:"text",value:s.priority_facet,onChange:n=>r({priority_facet:n.target.value}),placeholder:"created_at",className:"input text-xs w-36 font-mono"}),c.priority_facet&&e.jsx("p",{className:"text-2xs text-status-error mt-0.5",children:c.priority_facet})]})]}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-3",children:["Pending unclaimed items older than the threshold count as priority. Age is measured from the metadata facet (an ISO 8601 UTC timestamp, e.g. ",e.jsx("code",{className:"font-mono",children:"authorized_at"}),") or from"," ",e.jsx("code",{className:"font-mono",children:"created_at"})," when blank; the threshold falls back to SLA when blank."]})]}),e.jsxs(j,{icon:ce,label:"Entity",annotation:"what moves through this role",accent:!0,children:[e.jsx("input",{type:"text",value:s.entity_facet,onChange:n=>r({entity_facet:n.target.value}),placeholder:"serialNumber",className:"input text-xs w-44 font-mono"}),c.entity_facet&&e.jsx("p",{className:"text-2xs text-status-error mt-0.5",children:c.entity_facet}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-3",children:["The metadata key naming the entity that moves through this role —"," ",e.jsx("code",{className:"font-mono",children:"serialNumber"}),","," ",e.jsx("code",{className:"font-mono",children:"orderId"}),". Roles sharing a key form that entity's system: its state mix, per-entity dwell, and timelines all derive from it. Blank = the role has no entity notion."]}),s.entity_facet.trim()!==""&&e.jsxs("div",{className:"mt-5",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-quaternary mb-1.5",children:"States from"}),e.jsx("div",{className:"flex items-center gap-1",children:[{value:"role",label:"Role"},{value:"subtype",label:"Subtypes"}].map(({value:n,label:h})=>e.jsx("button",{onClick:()=>r({entity_state_source:n}),className:`px-2.5 py-1 text-2xs rounded transition-colors ${s.entity_state_source===n?"bg-accent/10 text-accent font-semibold":"icon-link"}`,children:h},n))}),e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:["How this role names the entity's state. ",e.jsx("strong",{children:"Role"}),": being here is one state (a servicing or harvesting queue)."," ",e.jsx("strong",{children:"Subtypes"}),": this one role holds several states, named by each escalation's subtype (a fleet role parking"," ",e.jsx("code",{className:"font-mono",children:"ready"})," /"," ",e.jsx("code",{className:"font-mono",children:"printing"}),")."]})]})]}),e.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-out ${s.ops_visible?"opacity-100 max-h-[900px]":"opacity-0 max-h-0 pointer-events-none"}`,"aria-hidden":!s.ops_visible,children:e.jsx(j,{icon:K,label:"Sequence",annotation:"where this role sits in its segment",children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Prior Step"}),e.jsxs("select",{value:s.parent_role,onChange:n=>r({parent_role:n.target.value}),className:"select text-sm w-full font-mono",children:[e.jsx("option",{value:"",children:"None — root process"}),d.map(n=>e.jsx("option",{value:n.role,children:n.title?`${n.role} — ${n.title}`:n.role},n.role))]}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:"Places this role in one Pace Board sequence. A role with no prior step starts its own sequence."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary",children:"Upstream Inputs"}),e.jsx(E,{})]}),e.jsx(Ce,{role:t,allRoles:a})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("label",{className:"block text-2xs font-semibold uppercase tracking-widest text-text-tertiary",children:"Home Segment"}),e.jsx($,{checked:s.ops_home_default,onChange:()=>r({ops_home_default:!s.ops_home_default}),title:"Lead the home Pace Board with this role's sequence"})]}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1.5",children:"Lead the home page's Pace Board with this role's sequence. One role holds this — saving it here releases the previous holder. Unset everywhere, the board opens on its first sequence."})]})]})})})]})}function Ce({role:t,allRoles:a}){const s=A(),[r,c]=u.useState(""),i=t.upstream_roles??[],l=u.useMemo(()=>a.map(o=>o.role).filter(o=>o!==t.role&&o!=="superadmin"&&!i.includes(o)),[a,t.role,i]),m=o=>s.mutate({role:t.role,upstream_roles:o},{onSuccess:()=>c("")});return e.jsxs("div",{className:"space-y-2",children:[l.length>0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("select",{value:r,onChange:o=>c(o.target.value),className:"select text-xs font-mono flex-1",children:[e.jsx("option",{value:"",children:"Add upstream input…"}),l.map(o=>e.jsx("option",{value:o,children:o},o))]}),e.jsx("button",{onClick:()=>{r&&m([...i,r])},disabled:!r||s.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:s.isPending?"…":"Add"})]}),e.jsx(ke,{items:i,empty:"Roles from other sequences this role draws input from. Add one above and it lands here.",onRemove:o=>m(i.filter(f=>f!==o))}),s.error&&e.jsx("p",{className:"text-2xs text-status-error",children:s.error.message})]})}function Pe({role:t,draft:a,update:s,errors:r,editingJson:c,startEditingJson:i,setMetadataSchemaError:l}){return e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:de,label:"Enforcement",annotation:"server-side resolver validation",accent:!0,children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Enforce the escalation form schema"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"Every resolve surface — API, MCP, CLI — validates submitted payloads against this role's form schema and rejects violations with field-level errors before any state changes."})]}),e.jsx($,{checked:a.enforce_schema,onChange:()=>s({enforce_schema:!a.enforce_schema}),title:"Validate every resolve payload against this role's form schema"})]})}),e.jsxs(j,{icon:q,label:"Escalation Schema",annotation:"the resolve form",accent:!0,aside:t.current_schema_version!=null?e.jsxs("span",{className:"text-2xs font-mono text-text-quaternary",children:["v",t.current_schema_version," in use"]}):void 0,children:[e.jsxs("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:["The form a person completes to resolve this role's escalations. Versioned — each save adds one; workflows pin any version via"," ",e.jsx("code",{className:"font-mono",children:"schemaVersion"}),"."]}),e.jsx(U,{to:`/admin/roles/${encodeURIComponent(t.role)}/schema`,className:"text-xs text-accent hover:underline",children:t.form_schema?`Open schema editor — v${t.current_schema_version??1} in use →`:"Define the escalation form →"})]}),e.jsxs(j,{icon:xe,label:"Escalations List Schema",annotation:"rich list view",aside:t.current_list_schema_version!=null?e.jsxs("span",{className:"text-2xs font-mono text-text-quaternary",children:["v",t.current_list_schema_version," in use"]}):void 0,children:[e.jsx("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:"Richly formats the escalation list when it's scoped to just this role. Versioned on its own timeline — separate from the resolve form."}),e.jsx(U,{to:`/admin/roles/${encodeURIComponent(t.role)}/list-schema`,className:"text-xs text-accent hover:underline",children:t.list_schema?`Open list schema editor — v${t.current_list_schema_version??1} in use →`:"Define the list view →"})]}),e.jsxs(j,{icon:q,label:"Metadata Schema",annotation:"validates metadata at creation",aside:!c.has("metadata_schema")&&t.metadata_schema?e.jsx("button",{onClick:()=>i("metadata_schema"),className:"text-2xs text-accent hover:underline",children:"Edit"}):void 0,children:[e.jsxs("p",{className:"text-2xs text-text-tertiary mb-3 leading-relaxed",children:["Validates ",e.jsx("code",{className:"font-mono",children:"metadata"})," at creation time. Keys appear in faceted search autocomplete."]}),!c.has("metadata_schema")&&t.metadata_schema?e.jsx(te,{data:t.metadata_schema}):e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:a.metadata_schema,onChange:m=>{const o=m.target.value;s({metadata_schema:o}),l(S(o).ok?void 0:"Invalid JSON")},rows:10,spellCheck:!1,className:"input text-xs font-mono w-full resize-y",placeholder:`{
2
2
  "type": "object",
3
3
  "properties": {
4
4
  "order_id": { "type": "string" }
5
5
  },
6
6
  "required": ["order_id"]
7
- }`}),r.metadata_schema&&e.jsx("p",{className:"text-2xs text-status-error mt-1",children:r.metadata_schema})]})]})]})}function qe({role:t}){return e.jsxs(e.Fragment,{children:[e.jsx(j,{icon:q,label:"Link Variables",annotation:"facet names members bind per device — pins reference them as {lt:name}",aside:e.jsx(E,{}),children:e.jsx(Ae,{role:t})}),e.jsx(j,{icon:W,label:"Default Pins",annotation:"pinned views every member starts with",aside:e.jsx(E,{}),accent:!0,children:e.jsx(Le,{role:t})})]})}function $e(t){var s;const a=(s=t.properties)==null?void 0:s.link_variables;return Array.isArray(a)?a.filter(r=>typeof(r==null?void 0:r.name)=="string"):[]}function Ae({role:t}){const a=A(),[s,r]=u.useState(""),[c,i]=u.useState(""),[l,m]=u.useState(""),o=$e(t),f=d=>a.mutate({role:t.role,properties:{...t.properties??{},link_variables:d.length?d:void 0}},{onSuccess:()=>{r(""),i(""),m("")}}),b=s.trim(),v=O.test(b)&&!o.some(d=>d.name===b);return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:s,onChange:d=>r(d.target.value),placeholder:"facet name — e.g. region",className:"input text-xs font-mono w-40 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:d=>i(d.target.value),placeholder:"label (optional)",className:"input text-xs flex-1"}),e.jsx("input",{type:"text",value:l,onChange:d=>m(d.target.value),placeholder:"default (optional)",className:"input text-xs font-mono w-36 shrink-0"}),e.jsx("button",{onClick:()=>{v&&f([...o,{name:b,...c.trim()?{label:c.trim()}:{},...l.trim()?{default:l.trim()}:{}}])},disabled:!v||a.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:a.isPending?"…":"Add"})]}),o.length===0?e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:["Facet names members bind per device. A pin below can then carry",e.jsxs("span",{className:"font-mono",children:[' facets={"region":"',"{lt:region}",'"} ']}),"and each device opens it scoped to its own value."]}):e.jsx("div",{className:"space-y-1",children:o.map(d=>e.jsxs("div",{className:"flex items-baseline gap-2 text-2xs","data-testid":"link-var-decl",children:[e.jsx("span",{className:"font-mono font-medium text-text-secondary shrink-0",children:d.name}),d.label&&e.jsx("span",{className:"text-text-quaternary truncate",children:d.label}),e.jsx("span",{className:"font-mono text-text-quaternary truncate flex-1",children:d.default?`default: ${d.default}`:"no default — unset drops the facet"}),e.jsx("span",{className:"font-mono text-text-quaternary shrink-0",title:"Reference in a pin URL",children:se(d.name)}),e.jsx("button",{onClick:()=>f(o.filter(n=>n.name!==d.name)),className:"text-text-quaternary hover:text-status-error transition-colors leading-none shrink-0","aria-label":`Remove variable ${d.name}`,children:"×"})]},d.name))}),a.error&&e.jsx("p",{className:"text-2xs text-status-error",children:a.error.message})]})}function Le({role:t}){const a=A(),[s,r]=u.useState(""),[c,i]=u.useState(""),[l,m]=u.useState(!0),{values:o,defaults:f}=ae(),b=t.default_pins??[],v=n=>a.mutate({role:t.role,default_pins:n.length?n:null},{onSuccess:()=>{r(""),i(""),m(!0)}}),d=s.trim()!==""&&c.trim().startsWith("/");return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:s,onChange:n=>r(n.target.value),placeholder:"Label — e.g. Needs harvesting",className:"input text-xs w-40 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:n=>i(n.target.value),placeholder:'/escalations/available?role=… or …facets={"region":"{lt:region}"}',className:"input text-xs font-mono flex-1"}),e.jsxs("label",{className:"flex items-center gap-1 text-2xs text-text-tertiary shrink-0",title:"Show a live count beside the label",children:[e.jsx("input",{type:"checkbox",checked:l,onChange:n=>m(n.target.checked),className:"w-3 h-3 accent-accent"}),"count"]}),e.jsx("button",{onClick:()=>{d&&v([...b,{label:s.trim(),url:c.trim(),badge:l}])},disabled:!d||a.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:a.isPending?"…":"Add"})]}),b.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:"Pinned views every member starts with — the persona's exact queries. Add one above and it lands here."}):e.jsx("div",{className:"space-y-1",children:b.map(n=>{const h=ne(n.url);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2 text-2xs",children:[e.jsx("span",{className:"font-medium text-text-secondary shrink-0",children:n.label}),n.badge&&e.jsx("span",{className:"text-2xs text-accent shrink-0",title:"Shows a live count",children:"count"}),e.jsx("span",{className:"font-mono text-text-quaternary truncate flex-1",title:n.url,children:n.url}),e.jsx("button",{onClick:()=>v(b.filter(p=>p.label!==n.label)),className:"text-text-quaternary hover:text-status-error transition-colors leading-none shrink-0","aria-label":`Remove pin ${n.label}`,children:"×"})]}),h.length>0&&e.jsxs("p",{className:"pl-2 font-mono text-2xs text-text-quaternary","data-testid":"pin-binding-caption",children:[h.map(p=>{const y=o[p]??f[p];return`${p} = ${y?`'${y}'`:"<empty>"}`}).join(", "),e.jsx("span",{className:"font-sans",children:" on this device"})]})]},n.label)})}),a.error&&e.jsx("p",{className:"text-2xs text-status-error",children:a.error.message})]})}const z=[{key:"identity",label:"Identity",icon:J},{key:"pace-board",label:"Pace Board",icon:V},{key:"schemas",label:"Schemas",icon:q},{key:"members",label:"Members",icon:G},{key:"pins",label:"Pins",icon:W}],Re=t=>z.some(a=>a.key===t);function Te(){const{role:t}=fe(),{data:a,isLoading:s}=re(),r=A(),c=(a==null?void 0:a.roles)??[],i=c.find(x=>x.role===t),[l,m]=u.useState(_e),[o,f]=u.useState(!1),[b,v]=u.useState(!1),[d,n]=u.useState({}),[h,p]=u.useState(new Set),y=x=>p(g=>new Set([...g,x])),[L,F]=be(),B=L.get("section"),N=Re(B)?B:"identity",H=u.useCallback(x=>{F(g=>{const _=new URLSearchParams(g);return _.set("section",x),_},{replace:!0})},[F]);u.useEffect(()=>{i&&(m(Ne(i)),f(!1),v(!1),n({}),p(new Set))},[t,i==null?void 0:i.role]);const C=x=>{m(g=>({...g,...x})),f(!0),v(!1)},Y=()=>{if(!i)return;const x=S(l.metadata_schema),g=S(l.properties),_=l.priority_facet.trim(),R=l.entity_facet.trim(),k={};if(x.ok||(k.metadata_schema="Invalid JSON"),g.ok||(k.properties="Invalid JSON"),_&&!O.test(_)&&(k.priority_facet="Letters, numbers, underscores only"),R&&!O.test(R)&&(k.entity_facet="Letters, numbers, underscores only"),n(k),Object.keys(k).length)return;const P=D=>{const w=parseFloat(D);return isNaN(w)?null:w},Z=D=>{const w=P(D);return w==null?null:Math.round(w)};r.mutate({role:i.role,title:l.title.trim()||null,description:l.description.trim()||null,ops_visible:l.ops_visible,ops_home_default:l.ops_home_default,enforce_schema:l.enforce_schema,parent_role:l.parent_role||null,metadata_schema:x.value??null,properties:g.value??{},sla_minutes:P(l.sla_minutes),target_per_hour:P(l.target_per_hour),worker_count:Z(l.worker_count),priority_threshold_minutes:P(l.priority_threshold_minutes),priority_facet:_||null,entity_facet:R||null,entity_state_source:l.entity_state_source},{onSuccess:()=>{f(!1),v(!0),p(new Set),window.setTimeout(()=>v(!1),2500)}})};if(s)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-64"}),e.jsx("div",{className:"h-64 bg-surface-sunken rounded"})]});if(!i)return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx(T,{className:"w-12 h-12 text-text-quaternary mb-4",strokeWidth:1}),e.jsx("h2",{className:"heading-3 mb-2",children:"Role not found"})]});const Q=o&&!Object.values(d).some(Boolean);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-10 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx(T,{className:"w-5 h-5 text-accent",strokeWidth:1.5}),e.jsx("h1",{className:"text-lg font-mono font-medium text-text-primary",children:i.role}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:role-detail"},className:"text-text-quaternary hover:text-accent transition-colors",title:"Open docs for this page",children:e.jsx(me,{className:"w-4 h-4",strokeWidth:1.5})}),i.parent_role&&e.jsxs("span",{className:"flex items-center gap-1 text-2xs text-text-quaternary font-mono",children:[e.jsx(K,{className:"w-3 h-3"})," ",i.parent_role]})]}),i.title&&e.jsx("p",{className:"text-sm text-text-secondary pl-8",children:i.title})]}),e.jsxs("div",{className:"flex gap-10",children:[e.jsxs("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsx("div",{className:"space-y-0.5",children:z.map(x=>{const g=x.icon,_=N===x.key;return e.jsxs("button",{onClick:()=>H(x.key),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${_?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(g,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:x.label})]},x.key)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:Y,disabled:!Q||r.isPending,className:"w-full px-3 py-1.5 text-xs rounded-md bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:r.isPending?"Saving…":o?"Save changes":"Save"}),b&&e.jsxs("span",{className:"flex items-center justify-center gap-1 text-xs text-status-success animate-page-enter",children:[e.jsx(he,{className:"w-3 h-3"})," Saved"]}),r.error&&e.jsx("p",{className:"text-2xs text-status-error leading-relaxed",children:r.error.message}),Object.values(d).some(Boolean)&&e.jsx("p",{className:"text-2xs text-status-error leading-relaxed",children:"Fix the highlighted fields before saving."})]})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2 max-w-3xl",children:[N==="identity"&&e.jsx(we,{role:i,draft:l,update:C,errors:d}),N==="pace-board"&&e.jsx(Se,{role:i,allRoles:c,draft:l,update:C,errors:d}),N==="schemas"&&e.jsx(Pe,{role:i,draft:l,update:C,errors:d,editingJson:h,startEditingJson:y,setMetadataSchemaError:x=>n(g=>({...g,metadata_schema:x}))}),N==="members"&&e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:G,label:"Members",annotation:"read = what appears · write = what they can act on",accent:!0,children:e.jsx(je,{role:i.role})}),e.jsx(j,{icon:ue,label:"Kiosk",annotation:"the locked viewport for single-role logins",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Lock single-role members to this queue"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"A member who holds only this role signs in to a locked viewport: no side navigation, this queue as home, held to the list, the item detail, and the scan screens. Members with other roles keep the full dashboard."})]}),e.jsx($,{checked:ge(l.properties),onChange:()=>{const x=ye(l.properties);x!==null&&C({properties:x})},title:"Kiosk viewport"})]})})]}),N==="pins"&&e.jsx(qe,{role:i})]})]})]})}export{Te as RoleDetailPage};
8
- //# sourceMappingURL=RoleDetailPage-C_LIoe1j.js.map
7
+ }`}),r.metadata_schema&&e.jsx("p",{className:"text-2xs text-status-error mt-1",children:r.metadata_schema})]})]})]})}function qe({role:t}){return e.jsxs(e.Fragment,{children:[e.jsx(j,{icon:q,label:"Link Variables",annotation:"facet names members bind per device — pins reference them as {lt:name}",aside:e.jsx(E,{}),children:e.jsx(Ae,{role:t})}),e.jsx(j,{icon:W,label:"Default Pins",annotation:"pinned views every member starts with",aside:e.jsx(E,{}),accent:!0,children:e.jsx(Le,{role:t})})]})}function $e(t){var s;const a=(s=t.properties)==null?void 0:s.link_variables;return Array.isArray(a)?a.filter(r=>typeof(r==null?void 0:r.name)=="string"):[]}function Ae({role:t}){const a=A(),[s,r]=u.useState(""),[c,i]=u.useState(""),[l,m]=u.useState(""),o=$e(t),f=d=>a.mutate({role:t.role,properties:{...t.properties??{},link_variables:d.length?d:void 0}},{onSuccess:()=>{r(""),i(""),m("")}}),b=s.trim(),v=O.test(b)&&!o.some(d=>d.name===b);return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:s,onChange:d=>r(d.target.value),placeholder:"facet name — e.g. region",className:"input text-xs font-mono w-40 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:d=>i(d.target.value),placeholder:"label (optional)",className:"input text-xs flex-1"}),e.jsx("input",{type:"text",value:l,onChange:d=>m(d.target.value),placeholder:"default (optional)",className:"input text-xs font-mono w-36 shrink-0"}),e.jsx("button",{onClick:()=>{v&&f([...o,{name:b,...c.trim()?{label:c.trim()}:{},...l.trim()?{default:l.trim()}:{}}])},disabled:!v||a.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:a.isPending?"…":"Add"})]}),o.length===0?e.jsxs("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:["Facet names members bind per device. A pin below can then carry",e.jsxs("span",{className:"font-mono",children:[' facets={"region":"',"{lt:region}",'"} ']}),"and each device opens it scoped to its own value."]}):e.jsx("div",{className:"space-y-1",children:o.map(d=>e.jsxs("div",{className:"flex items-baseline gap-2 text-2xs","data-testid":"link-var-decl",children:[e.jsx("span",{className:"font-mono font-medium text-text-secondary shrink-0",children:d.name}),d.label&&e.jsx("span",{className:"text-text-quaternary truncate",children:d.label}),e.jsx("span",{className:"font-mono text-text-quaternary truncate flex-1",children:d.default?`default: ${d.default}`:"no default — unset drops the facet"}),e.jsx("span",{className:"font-mono text-text-quaternary shrink-0",title:"Reference in a pin URL",children:se(d.name)}),e.jsx("button",{onClick:()=>f(o.filter(n=>n.name!==d.name)),className:"text-text-quaternary hover:text-status-error transition-colors leading-none shrink-0","aria-label":`Remove variable ${d.name}`,children:"×"})]},d.name))}),a.error&&e.jsx("p",{className:"text-2xs text-status-error",children:a.error.message})]})}function Le({role:t}){const a=A(),[s,r]=u.useState(""),[c,i]=u.useState(""),[l,m]=u.useState(!0),{values:o,defaults:f}=ae(),b=t.default_pins??[],v=n=>a.mutate({role:t.role,default_pins:n.length?n:null},{onSuccess:()=>{r(""),i(""),m(!0)}}),d=s.trim()!==""&&c.trim().startsWith("/");return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:s,onChange:n=>r(n.target.value),placeholder:"Label — e.g. Needs harvesting",className:"input text-xs w-40 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:n=>i(n.target.value),placeholder:'/escalations/available?role=… or …facets={"region":"{lt:region}"}',className:"input text-xs font-mono flex-1"}),e.jsxs("label",{className:"flex items-center gap-1 text-2xs text-text-tertiary shrink-0",title:"Show a live count beside the label",children:[e.jsx("input",{type:"checkbox",checked:l,onChange:n=>m(n.target.checked),className:"w-3 h-3 accent-accent"}),"count"]}),e.jsx("button",{onClick:()=>{d&&v([...b,{label:s.trim(),url:c.trim(),badge:l}])},disabled:!d||a.isPending,className:"px-2.5 py-1 text-xs rounded bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:a.isPending?"…":"Add"})]}),b.length===0?e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:"Pinned views every member starts with — the persona's exact queries. Add one above and it lands here."}):e.jsx("div",{className:"space-y-1",children:b.map(n=>{const h=ne(n.url);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2 text-2xs",children:[e.jsx("span",{className:"font-medium text-text-secondary shrink-0",children:n.label}),n.badge&&e.jsx("span",{className:"text-2xs text-accent shrink-0",title:"Shows a live count",children:"count"}),e.jsx("span",{className:"font-mono text-text-quaternary truncate flex-1",title:n.url,children:n.url}),e.jsx("button",{onClick:()=>v(b.filter(p=>p.label!==n.label)),className:"text-text-quaternary hover:text-status-error transition-colors leading-none shrink-0","aria-label":`Remove pin ${n.label}`,children:"×"})]}),h.length>0&&e.jsxs("p",{className:"pl-2 font-mono text-2xs text-text-quaternary","data-testid":"pin-binding-caption",children:[h.map(p=>{const y=o[p]??f[p];return`${p} = ${y?`'${y}'`:"<empty>"}`}).join(", "),e.jsx("span",{className:"font-sans",children:" on this device"})]})]},n.label)})}),a.error&&e.jsx("p",{className:"text-2xs text-status-error",children:a.error.message})]})}const z=[{key:"identity",label:"Identity",icon:J},{key:"pace-board",label:"Pace Board",icon:V},{key:"schemas",label:"Schemas",icon:q},{key:"members",label:"Members",icon:G},{key:"pins",label:"Pins",icon:W}],Re=t=>z.some(a=>a.key===t);function Te(){const{role:t}=fe(),{data:a,isLoading:s}=re(),r=A(),c=(a==null?void 0:a.roles)??[],i=c.find(x=>x.role===t),[l,m]=u.useState(_e),[o,f]=u.useState(!1),[b,v]=u.useState(!1),[d,n]=u.useState({}),[h,p]=u.useState(new Set),y=x=>p(g=>new Set([...g,x])),[L,F]=be(),B=L.get("section"),N=Re(B)?B:"identity",H=u.useCallback(x=>{F(g=>{const _=new URLSearchParams(g);return _.set("section",x),_},{replace:!0})},[F]);u.useEffect(()=>{i&&(m(Ne(i)),f(!1),v(!1),n({}),p(new Set))},[t,i==null?void 0:i.role]);const C=x=>{m(g=>({...g,...x})),f(!0),v(!1)},Y=()=>{if(!i)return;const x=S(l.metadata_schema),g=S(l.properties),_=l.priority_facet.trim(),R=l.entity_facet.trim(),k={};if(x.ok||(k.metadata_schema="Invalid JSON"),g.ok||(k.properties="Invalid JSON"),_&&!O.test(_)&&(k.priority_facet="Letters, numbers, underscores only"),R&&!O.test(R)&&(k.entity_facet="Letters, numbers, underscores only"),n(k),Object.keys(k).length)return;const P=D=>{const w=parseFloat(D);return isNaN(w)?null:w},Q=D=>{const w=P(D);return w==null?null:Math.round(w)};r.mutate({role:i.role,title:l.title.trim()||null,description:l.description.trim()||null,ops_visible:l.ops_visible,ops_home_default:l.ops_home_default,enforce_schema:l.enforce_schema,parent_role:l.parent_role||null,metadata_schema:x.value??null,properties:g.value??{},sla_minutes:P(l.sla_minutes),target_per_hour:P(l.target_per_hour),worker_count:Q(l.worker_count),priority_threshold_minutes:P(l.priority_threshold_minutes),priority_facet:_||null,entity_facet:R||null,entity_state_source:l.entity_state_source},{onSuccess:()=>{f(!1),v(!0),p(new Set),window.setTimeout(()=>v(!1),2500)}})};if(s)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-64"}),e.jsx("div",{className:"h-64 bg-surface-sunken rounded"})]});if(!i)return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx(T,{className:"w-12 h-12 text-text-quaternary mb-4",strokeWidth:1}),e.jsx("h2",{className:"heading-3 mb-2",children:"Role not found"})]});const Z=o&&!Object.values(d).some(Boolean);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-10 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx(T,{className:"w-5 h-5 text-accent",strokeWidth:1.5}),e.jsx("h1",{className:"text-lg font-mono font-medium text-text-primary",children:i.role}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:role-detail"},className:"text-text-quaternary hover:text-accent transition-colors",title:"Open docs for this page",children:e.jsx(me,{className:"w-4 h-4",strokeWidth:1.5})}),i.parent_role&&e.jsxs("span",{className:"flex items-center gap-1 text-2xs text-text-quaternary font-mono",children:[e.jsx(K,{className:"w-3 h-3"})," ",i.parent_role]})]}),i.title&&e.jsx("p",{className:"text-sm text-text-secondary pl-8",children:i.title})]}),e.jsxs("div",{className:"flex gap-10",children:[e.jsxs("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsx("div",{className:"space-y-0.5",children:z.map(x=>{const g=x.icon,_=N===x.key;return e.jsxs("button",{onClick:()=>H(x.key),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${_?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(g,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:x.label})]},x.key)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:Y,disabled:!Z||r.isPending,className:"w-full px-3 py-1.5 text-xs rounded-md bg-accent text-text-inverse hover:bg-accent-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:r.isPending?"Saving…":o?"Save changes":"Save"}),b&&e.jsxs("span",{className:"flex items-center justify-center gap-1 text-xs text-status-success animate-page-enter",children:[e.jsx(he,{className:"w-3 h-3"})," Saved"]}),r.error&&e.jsx("p",{className:"text-2xs text-status-error leading-relaxed",children:r.error.message}),Object.values(d).some(Boolean)&&e.jsx("p",{className:"text-2xs text-status-error leading-relaxed",children:"Fix the highlighted fields before saving."})]})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2 max-w-3xl",children:[N==="identity"&&e.jsx(we,{role:i,draft:l,update:C,errors:d}),N==="pace-board"&&e.jsx(Se,{role:i,allRoles:c,draft:l,update:C,errors:d}),N==="schemas"&&e.jsx(Pe,{role:i,draft:l,update:C,errors:d,editingJson:h,startEditingJson:y,setMetadataSchemaError:x=>n(g=>({...g,metadata_schema:x}))}),N==="members"&&e.jsxs("div",{className:"space-y-14",children:[e.jsx(j,{icon:G,label:"Members",annotation:"read = what appears · write = what they can act on",accent:!0,children:e.jsx(je,{role:i.role})}),e.jsx(j,{icon:ue,label:"Kiosk",annotation:"the locked viewport for single-role logins",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Lock single-role members to this queue"}),e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed mt-1",children:"A member who holds only this role signs in to a locked viewport: no side navigation, this queue as home, held to the list, the item detail, and the scan screens. Members with other roles keep the full dashboard."})]}),e.jsx($,{checked:ge(l.properties),onChange:()=>{const x=ye(l.properties);x!==null&&C({properties:x})},title:"Kiosk viewport"})]})})]}),N==="pins"&&e.jsx(qe,{role:i})]})]})]})}export{Te as RoleDetailPage};
8
+ //# sourceMappingURL=RoleDetailPage-WQt0y5l7.js.map