@hotmeshio/long-tail 0.30.5 → 0.31.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 (367) hide show
  1. package/build/api/labels/errors.d.ts +3 -0
  2. package/build/api/labels/errors.js +15 -0
  3. package/build/api/labels/index.d.ts +2 -0
  4. package/build/api/labels/index.js +17 -0
  5. package/build/api/labels/issue.d.ts +54 -0
  6. package/build/api/labels/issue.js +144 -0
  7. package/build/api/labels/templates.d.ts +29 -0
  8. package/build/api/labels/templates.js +98 -0
  9. package/build/api/users.d.ts +8 -4
  10. package/build/api/users.js +51 -13
  11. package/build/index.d.ts +1 -0
  12. package/build/index.js +4 -2
  13. package/build/lib/db/schemas/044_label_sheets.sql +65 -0
  14. package/build/lib/db/schemas/045_label_job_delivery.sql +14 -0
  15. package/build/lib/labels/transports.d.ts +23 -0
  16. package/build/lib/labels/transports.js +39 -0
  17. package/build/modules/auth.d.ts +2 -0
  18. package/build/modules/auth.js +3 -1
  19. package/build/modules/capabilities.d.ts +5 -1
  20. package/build/modules/capabilities.js +38 -8
  21. package/build/modules/config.d.ts +10 -0
  22. package/build/modules/config.js +10 -0
  23. package/build/routes/index.js +2 -0
  24. package/build/routes/labels.d.ts +2 -0
  25. package/build/routes/labels.js +135 -0
  26. package/build/routes/users.js +1 -1
  27. package/build/services/labels/content.d.ts +13 -0
  28. package/build/services/labels/content.js +81 -0
  29. package/build/services/labels/errors.d.ts +5 -0
  30. package/build/services/labels/errors.js +12 -0
  31. package/build/services/labels/index.d.ts +11 -0
  32. package/build/services/labels/index.js +52 -0
  33. package/build/services/labels/issue.d.ts +38 -0
  34. package/build/services/labels/issue.js +181 -0
  35. package/build/services/labels/jobs.d.ts +37 -0
  36. package/build/services/labels/jobs.js +75 -0
  37. package/build/services/labels/media.d.ts +11 -0
  38. package/build/services/labels/media.js +44 -0
  39. package/build/services/labels/reissue.d.ts +13 -0
  40. package/build/services/labels/reissue.js +65 -0
  41. package/build/services/labels/render-pdf.d.ts +11 -0
  42. package/build/services/labels/render-pdf.js +138 -0
  43. package/build/services/labels/targets.d.ts +18 -0
  44. package/build/services/labels/targets.js +216 -0
  45. package/build/services/labels/templates/index.d.ts +3 -0
  46. package/build/services/labels/templates/index.js +18 -0
  47. package/build/services/labels/templates/read.d.ts +4 -0
  48. package/build/services/labels/templates/read.js +36 -0
  49. package/build/services/labels/templates/sql.d.ts +8 -0
  50. package/build/services/labels/templates/sql.js +50 -0
  51. package/build/services/labels/templates/validate.d.ts +19 -0
  52. package/build/services/labels/templates/validate.js +93 -0
  53. package/build/services/labels/templates/write.d.ts +16 -0
  54. package/build/services/labels/templates/write.js +75 -0
  55. package/build/services/labels/token.d.ts +9 -0
  56. package/build/services/labels/token.js +28 -0
  57. package/build/services/labels/verify.d.ts +4 -0
  58. package/build/services/labels/verify.js +38 -0
  59. package/build/services/scan-code/validate.d.ts +3 -0
  60. package/build/services/scan-code/validate.js +10 -0
  61. package/build/services/user/crud.d.ts +13 -1
  62. package/build/services/user/crud.js +42 -11
  63. package/build/services/user/index.d.ts +3 -2
  64. package/build/services/user/index.js +7 -1
  65. package/build/services/user/redact.d.ts +17 -0
  66. package/build/services/user/redact.js +32 -0
  67. package/build/services/user/sql.d.ts +8 -15
  68. package/build/services/user/sql.js +27 -3
  69. package/build/services/user/types.d.ts +21 -1
  70. package/build/shared/labels/compose.d.ts +12 -0
  71. package/build/shared/labels/compose.js +43 -0
  72. package/build/shared/labels/index.d.ts +9 -0
  73. package/build/shared/labels/index.js +54 -0
  74. package/build/shared/labels/label-content.d.ts +17 -0
  75. package/build/shared/labels/label-content.js +137 -0
  76. package/build/shared/labels/layout.d.ts +23 -0
  77. package/build/shared/labels/layout.js +81 -0
  78. package/build/shared/labels/media.d.ts +22 -0
  79. package/build/shared/labels/media.js +116 -0
  80. package/build/shared/labels/render-svg.d.ts +10 -0
  81. package/build/shared/labels/render-svg.js +58 -0
  82. package/build/shared/labels/render-zpl.d.ts +9 -0
  83. package/build/shared/labels/render-zpl.js +63 -0
  84. package/build/shared/labels/symbol.d.ts +18 -0
  85. package/build/shared/labels/symbol.js +74 -0
  86. package/build/shared/labels/tokens.d.ts +18 -0
  87. package/build/shared/labels/tokens.js +43 -0
  88. package/build/shared/labels/types.d.ts +105 -0
  89. package/build/shared/labels/types.js +11 -0
  90. package/build/start/adapters.js +16 -0
  91. package/build/start/workers.js +18 -2
  92. package/build/system/mcp-servers/admin/index.js +2 -0
  93. package/build/system/mcp-servers/admin/labels-schemas.d.ts +192 -0
  94. package/build/system/mcp-servers/admin/labels-schemas.js +46 -0
  95. package/build/system/mcp-servers/admin/labels.d.ts +9 -0
  96. package/build/system/mcp-servers/admin/labels.js +101 -0
  97. package/build/system/mcp-servers/admin/schemas.d.ts +30 -30
  98. package/build/system/mcp-servers/admin/users.js +1 -1
  99. package/build/system/seed/tool-manifests-admin.js +5 -0
  100. package/build/tsconfig.tsbuildinfo +1 -1
  101. package/build/types/capability.d.ts +2 -1
  102. package/build/types/index.d.ts +2 -1
  103. package/build/types/labels/index.d.ts +4 -0
  104. package/build/types/labels/index.js +2 -0
  105. package/build/types/labels/job.d.ts +51 -0
  106. package/build/types/labels/job.js +2 -0
  107. package/build/types/labels/source.d.ts +44 -0
  108. package/build/types/labels/source.js +2 -0
  109. package/build/types/labels/template.d.ts +46 -0
  110. package/build/types/labels/template.js +2 -0
  111. package/build/types/labels/transport.d.ts +24 -0
  112. package/build/types/labels/transport.js +2 -0
  113. package/build/types/scan-code/rule.d.ts +5 -0
  114. package/build/types/startup.d.ts +37 -0
  115. package/build/types/user.d.ts +2 -0
  116. package/dashboard/dist/assets/{AdminDashboard-D12QiMM5.js → AdminDashboard-BafKaq50.js} +2 -2
  117. package/dashboard/dist/assets/{AdminDashboard-D12QiMM5.js.map → AdminDashboard-BafKaq50.js.map} +1 -1
  118. package/dashboard/dist/assets/{AgentConfigPage-BKQd9b8m.js → AgentConfigPage-CFHf31DT.js} +6 -6
  119. package/dashboard/dist/assets/{AgentConfigPage-BKQd9b8m.js.map → AgentConfigPage-CFHf31DT.js.map} +1 -1
  120. package/dashboard/dist/assets/{AgentDetailPage-ie-DxsIj.js → AgentDetailPage-CEvz5rJr.js} +3 -3
  121. package/dashboard/dist/assets/{AgentDetailPage-ie-DxsIj.js.map → AgentDetailPage-CEvz5rJr.js.map} +1 -1
  122. package/dashboard/dist/assets/{AgentsPage-Nqm2DxCP.js → AgentsPage-DjQaio0O.js} +2 -2
  123. package/dashboard/dist/assets/{AgentsPage-Nqm2DxCP.js.map → AgentsPage-DjQaio0O.js.map} +1 -1
  124. package/dashboard/dist/assets/AvailableEscalationsPage-UB03VTJx.js +2 -0
  125. package/dashboard/dist/assets/AvailableEscalationsPage-UB03VTJx.js.map +1 -0
  126. package/dashboard/dist/assets/{BotPicker-BizdmeJp.js → BotPicker-C7MNWOF7.js} +2 -2
  127. package/dashboard/dist/assets/{BotPicker-BizdmeJp.js.map → BotPicker-C7MNWOF7.js.map} +1 -1
  128. package/dashboard/dist/assets/BulkAssignModal-h5fX-_cV.js +2 -0
  129. package/dashboard/dist/assets/{BulkAssignModal-BWfzPrRk.js.map → BulkAssignModal-h5fX-_cV.js.map} +1 -1
  130. package/dashboard/dist/assets/{CapabilitiesPage-DT8q7Zlh.js → CapabilitiesPage-BIzDl-ZT.js} +2 -2
  131. package/dashboard/dist/assets/{CapabilitiesPage-DT8q7Zlh.js.map → CapabilitiesPage-BIzDl-ZT.js.map} +1 -1
  132. package/dashboard/dist/assets/{CollapsibleSection-al5mqR4O.js → CollapsibleSection-B5TivtEg.js} +2 -2
  133. package/dashboard/dist/assets/{CollapsibleSection-al5mqR4O.js.map → CollapsibleSection-B5TivtEg.js.map} +1 -1
  134. package/dashboard/dist/assets/{ConfirmDeleteModal-BrlVktv2.js → ConfirmDeleteModal-CB4nKePb.js} +2 -2
  135. package/dashboard/dist/assets/{ConfirmDeleteModal-BrlVktv2.js.map → ConfirmDeleteModal-CB4nKePb.js.map} +1 -1
  136. package/dashboard/dist/assets/{ConnectedAppsPage-CLAsJ2yQ.js → ConnectedAppsPage-B3S5gVWw.js} +2 -2
  137. package/dashboard/dist/assets/{ConnectedAppsPage-CLAsJ2yQ.js.map → ConnectedAppsPage-B3S5gVWw.js.map} +1 -1
  138. package/dashboard/dist/assets/{CountdownTimer-D2D68exl.js → CountdownTimer-BHVIq3kA.js} +2 -2
  139. package/dashboard/dist/assets/{CountdownTimer-D2D68exl.js.map → CountdownTimer-BHVIq3kA.js.map} +1 -1
  140. package/dashboard/dist/assets/CredentialConfirmModal-w0AGmCIe.js +2 -0
  141. package/dashboard/dist/assets/CredentialConfirmModal-w0AGmCIe.js.map +1 -0
  142. package/dashboard/dist/assets/{CredentialsPage-DWrZbEI0.js → CredentialsPage-BtCGBJrT.js} +2 -2
  143. package/dashboard/dist/assets/{CredentialsPage-DWrZbEI0.js.map → CredentialsPage-BtCGBJrT.js.map} +1 -1
  144. package/dashboard/dist/assets/{CronLabel-DuXR8iWq.js → CronLabel-BG1rZK-5.js} +2 -2
  145. package/dashboard/dist/assets/{CronLabel-DuXR8iWq.js.map → CronLabel-BG1rZK-5.js.map} +1 -1
  146. package/dashboard/dist/assets/{DropZone-DefYTYQy.js → DropZone-D8ZVdEb5.js} +2 -2
  147. package/dashboard/dist/assets/{DropZone-DefYTYQy.js.map → DropZone-D8ZVdEb5.js.map} +1 -1
  148. package/dashboard/dist/assets/{ElapsedCell-ronqG5-E.js → ElapsedCell-l4m8Yvfv.js} +2 -2
  149. package/dashboard/dist/assets/{ElapsedCell-ronqG5-E.js.map → ElapsedCell-l4m8Yvfv.js.map} +1 -1
  150. package/dashboard/dist/assets/{EntityTimelinePanel-CKsktd84.js → EntityTimelinePanel-BOHlIaxF.js} +2 -2
  151. package/dashboard/dist/assets/{EntityTimelinePanel-CKsktd84.js.map → EntityTimelinePanel-BOHlIaxF.js.map} +1 -1
  152. package/dashboard/dist/assets/{EscalationListSchemaPage-C954ngy3.js → EscalationListSchemaPage-BotlwlX3.js} +3 -3
  153. package/dashboard/dist/assets/{EscalationListSchemaPage-C954ngy3.js.map → EscalationListSchemaPage-BotlwlX3.js.map} +1 -1
  154. package/dashboard/dist/assets/{EscalationSchemaPage-Dij9K0ON.js → EscalationSchemaPage-CfZSVOSD.js} +3 -3
  155. package/dashboard/dist/assets/{EscalationSchemaPage-Dij9K0ON.js.map → EscalationSchemaPage-CfZSVOSD.js.map} +1 -1
  156. package/dashboard/dist/assets/{EscalationTimeline-DT2Owdl0.js → EscalationTimeline-CCKpuRBU.js} +2 -2
  157. package/dashboard/dist/assets/{EscalationTimeline-DT2Owdl0.js.map → EscalationTimeline-CCKpuRBU.js.map} +1 -1
  158. package/dashboard/dist/assets/{EscalationTitleSelect-BdbfMA98.js → EscalationTitleSelect-cpTzPHiW.js} +2 -2
  159. package/dashboard/dist/assets/{EscalationTitleSelect-BdbfMA98.js.map → EscalationTitleSelect-cpTzPHiW.js.map} +1 -1
  160. package/dashboard/dist/assets/{EscalationsOverview-niahs84P.js → EscalationsOverview-DS-nK0qV.js} +2 -2
  161. package/dashboard/dist/assets/{EscalationsOverview-niahs84P.js.map → EscalationsOverview-DS-nK0qV.js.map} +1 -1
  162. package/dashboard/dist/assets/{EventTable-DuLMBrSx.js → EventTable-UfebhJf0.js} +2 -2
  163. package/dashboard/dist/assets/{EventTable-DuLMBrSx.js.map → EventTable-UfebhJf0.js.map} +1 -1
  164. package/dashboard/dist/assets/{FilterBar-jtY6KNpL.js → FilterBar-newA5l-X.js} +2 -2
  165. package/dashboard/dist/assets/{FilterBar-jtY6KNpL.js.map → FilterBar-newA5l-X.js.map} +1 -1
  166. package/dashboard/dist/assets/{GraphInvokePage-DSRAI0Zt.js → GraphInvokePage-6SCDyQcK.js} +2 -2
  167. package/dashboard/dist/assets/{GraphInvokePage-DSRAI0Zt.js.map → GraphInvokePage-6SCDyQcK.js.map} +1 -1
  168. package/dashboard/dist/assets/HomePage-BEc-XdKj.js +2 -0
  169. package/dashboard/dist/assets/{HomePage-BUlSnCg8.js.map → HomePage-BEc-XdKj.js.map} +1 -1
  170. package/dashboard/dist/assets/LabelJobsPage-BO50zXT5.js +2 -0
  171. package/dashboard/dist/assets/LabelJobsPage-BO50zXT5.js.map +1 -0
  172. package/dashboard/dist/assets/{LinePage-BJKhVM9Y.js → LinePage-NYxJQ-ex.js} +3 -3
  173. package/dashboard/dist/assets/{LinePage-BJKhVM9Y.js.map → LinePage-NYxJQ-ex.js.map} +1 -1
  174. package/dashboard/dist/assets/{LinesPage-CrpJua3_.js → LinesPage-RbWTaQRh.js} +3 -3
  175. package/dashboard/dist/assets/{LinesPage-CrpJua3_.js.map → LinesPage-RbWTaQRh.js.map} +1 -1
  176. package/dashboard/dist/assets/{ListToolbar-BN0UPt0L.js → ListToolbar-B-E9-toh.js} +2 -2
  177. package/dashboard/dist/assets/{ListToolbar-BN0UPt0L.js.map → ListToolbar-B-E9-toh.js.map} +1 -1
  178. package/dashboard/dist/assets/{McpOverview-BgbJXYPh.js → McpOverview-Shcf9QhZ.js} +2 -2
  179. package/dashboard/dist/assets/{McpOverview-BgbJXYPh.js.map → McpOverview-Shcf9QhZ.js.map} +1 -1
  180. package/dashboard/dist/assets/{McpQueryDetailPage-BNjm2nrc.js → McpQueryDetailPage-D8kmjy2v.js} +3 -3
  181. package/dashboard/dist/assets/{McpQueryDetailPage-BNjm2nrc.js.map → McpQueryDetailPage-D8kmjy2v.js.map} +1 -1
  182. package/dashboard/dist/assets/{McpQueryPage-DplR8wP9.js → McpQueryPage-ck-o5m8A.js} +2 -2
  183. package/dashboard/dist/assets/{McpQueryPage-DplR8wP9.js.map → McpQueryPage-ck-o5m8A.js.map} +1 -1
  184. package/dashboard/dist/assets/McpRunDetailPage-BJKkM9-3.js +2 -0
  185. package/dashboard/dist/assets/{McpRunDetailPage-BHVEcKV5.js.map → McpRunDetailPage-BJKkM9-3.js.map} +1 -1
  186. package/dashboard/dist/assets/{McpRunsPage-CtlLagcs.js → McpRunsPage-DqhHfD5G.js} +2 -2
  187. package/dashboard/dist/assets/{McpRunsPage-CtlLagcs.js.map → McpRunsPage-DqhHfD5G.js.map} +1 -1
  188. package/dashboard/dist/assets/{NamespacePill-CeSfHH-j.js → NamespacePill--uIaGtrN.js} +2 -2
  189. package/dashboard/dist/assets/{NamespacePill-CeSfHH-j.js.map → NamespacePill--uIaGtrN.js.map} +1 -1
  190. package/dashboard/dist/assets/{OperationsPage-DH67bcW9.js → OperationsPage-D6B9Vv__.js} +3 -3
  191. package/dashboard/dist/assets/{OperationsPage-DH67bcW9.js.map → OperationsPage-D6B9Vv__.js.map} +1 -1
  192. package/dashboard/dist/assets/OperatorDashboard-CIH1cxjQ.js +2 -0
  193. package/dashboard/dist/assets/{OperatorDashboard-CMkgMewd.js.map → OperatorDashboard-CIH1cxjQ.js.map} +1 -1
  194. package/dashboard/dist/assets/{PageHeader-DiGWAQlR.js → PageHeader-DClJ33fV.js} +2 -2
  195. package/dashboard/dist/assets/{PageHeader-DiGWAQlR.js.map → PageHeader-DClJ33fV.js.map} +1 -1
  196. package/dashboard/dist/assets/{PageHeaderWithStats-DwnKQ06j.js → PageHeaderWithStats-C-TrbKQL.js} +2 -2
  197. package/dashboard/dist/assets/{PageHeaderWithStats-DwnKQ06j.js.map → PageHeaderWithStats-C-TrbKQL.js.map} +1 -1
  198. package/dashboard/dist/assets/PersonaDetailPage-DjvfyIph.js +2 -0
  199. package/dashboard/dist/assets/{PersonaDetailPage-Cs1FFdNq.js.map → PersonaDetailPage-DjvfyIph.js.map} +1 -1
  200. package/dashboard/dist/assets/{PersonasPage-CHTRdneF.js → PersonasPage-D7ryA8Vc.js} +2 -2
  201. package/dashboard/dist/assets/{PersonasPage-CHTRdneF.js.map → PersonasPage-D7ryA8Vc.js.map} +1 -1
  202. package/dashboard/dist/assets/{PortalPage-ChB5pBTZ.js → PortalPage-D3ybr0mo.js} +2 -2
  203. package/dashboard/dist/assets/{PortalPage-ChB5pBTZ.js.map → PortalPage-D3ybr0mo.js.map} +1 -1
  204. package/dashboard/dist/assets/PrintLabelsPanel-D0HF5x8b.js +2 -0
  205. package/dashboard/dist/assets/PrintLabelsPanel-D0HF5x8b.js.map +1 -0
  206. package/dashboard/dist/assets/{ProcessDetailPage-CzyqSfal.js → ProcessDetailPage-0xS9EdHe.js} +2 -2
  207. package/dashboard/dist/assets/{ProcessDetailPage-CzyqSfal.js.map → ProcessDetailPage-0xS9EdHe.js.map} +1 -1
  208. package/dashboard/dist/assets/{ProcessesListPage-rOwNkaU9.js → ProcessesListPage-93SMj1Fd.js} +2 -2
  209. package/dashboard/dist/assets/{ProcessesListPage-rOwNkaU9.js.map → ProcessesListPage-93SMj1Fd.js.map} +1 -1
  210. package/dashboard/dist/assets/{ResolverForm-DibnlZ-A.js → ResolverForm-DfogHDzl.js} +5 -5
  211. package/dashboard/dist/assets/{ResolverForm-DibnlZ-A.js.map → ResolverForm-DfogHDzl.js.map} +1 -1
  212. package/dashboard/dist/assets/{RoleDetailPage-Bv9R7iQC.js → RoleDetailPage-DlUOJWSB.js} +3 -3
  213. package/dashboard/dist/assets/{RoleDetailPage-Bv9R7iQC.js.map → RoleDetailPage-DlUOJWSB.js.map} +1 -1
  214. package/dashboard/dist/assets/{RolePill-D3hkAdKf.js → RolePill-BjD1Qw5y.js} +2 -2
  215. package/dashboard/dist/assets/{RolePill-D3hkAdKf.js.map → RolePill-BjD1Qw5y.js.map} +1 -1
  216. package/dashboard/dist/assets/RolesPage-DqhHSvaw.js +2 -0
  217. package/dashboard/dist/assets/{RolesPage-CUP7EH5U.js.map → RolesPage-DqhHSvaw.js.map} +1 -1
  218. package/dashboard/dist/assets/{RosterWidget-DZtmQcjU.js → RosterWidget-BrIq61HR.js} +2 -2
  219. package/dashboard/dist/assets/{RosterWidget-DZtmQcjU.js.map → RosterWidget-BrIq61HR.js.map} +1 -1
  220. package/dashboard/dist/assets/RunAsSelector-D6zQrCNr.js +2 -0
  221. package/dashboard/dist/assets/{RunAsSelector-B9-1vgZr.js.map → RunAsSelector-D6zQrCNr.js.map} +1 -1
  222. package/dashboard/dist/assets/ScanCodesPage-B2S9DR2f.js +2 -0
  223. package/dashboard/dist/assets/{ScanCodesPage-KN_e2rJl.js.map → ScanCodesPage-B2S9DR2f.js.map} +1 -1
  224. package/dashboard/dist/assets/ScanSchemeDetailPage-gpxKN-pL.js +5 -0
  225. package/dashboard/dist/assets/ScanSchemeDetailPage-gpxKN-pL.js.map +1 -0
  226. package/dashboard/dist/assets/ScanStationPage-B-UTgXsG.js +2 -0
  227. package/dashboard/dist/assets/{ScanStationPage-B0qbUOwc.js.map → ScanStationPage-B-UTgXsG.js.map} +1 -1
  228. package/dashboard/dist/assets/{SchemeMatchFields-CL7TKnw3.js → SchemeMatchFields-BK24aa7K.js} +2 -2
  229. package/dashboard/dist/assets/{SchemeMatchFields-CL7TKnw3.js.map → SchemeMatchFields-BK24aa7K.js.map} +1 -1
  230. package/dashboard/dist/assets/{ScopeBadge-DGz79rmG.js → ScopeBadge-ofLQ6HW-.js} +2 -2
  231. package/dashboard/dist/assets/{ScopeBadge-DGz79rmG.js.map → ScopeBadge-ofLQ6HW-.js.map} +1 -1
  232. package/dashboard/dist/assets/{StickyPagination-CUwxfBQH.js → StickyPagination-CgVv7vc_.js} +2 -2
  233. package/dashboard/dist/assets/{StickyPagination-CUwxfBQH.js.map → StickyPagination-CgVv7vc_.js.map} +1 -1
  234. package/dashboard/dist/assets/{StreamMessageDetail-DOjcO7d2.js → StreamMessageDetail-B9sxDVw4.js} +2 -2
  235. package/dashboard/dist/assets/{StreamMessageDetail-DOjcO7d2.js.map → StreamMessageDetail-B9sxDVw4.js.map} +1 -1
  236. package/dashboard/dist/assets/{SwimlaneTimeline-SPMpoLHP.js → SwimlaneTimeline-DQc0CYSL.js} +2 -2
  237. package/dashboard/dist/assets/{SwimlaneTimeline-SPMpoLHP.js.map → SwimlaneTimeline-DQc0CYSL.js.map} +1 -1
  238. package/dashboard/dist/assets/{TagInput-DaIdhv3h.js → TagInput-47qVYzke.js} +2 -2
  239. package/dashboard/dist/assets/{TagInput-DaIdhv3h.js.map → TagInput-47qVYzke.js.map} +1 -1
  240. package/dashboard/dist/assets/{TaskDetailPage-DvfzR2IQ.js → TaskDetailPage-D6VOsA1f.js} +2 -2
  241. package/dashboard/dist/assets/{TaskDetailPage-DvfzR2IQ.js.map → TaskDetailPage-D6VOsA1f.js.map} +1 -1
  242. package/dashboard/dist/assets/{TaskQueuePill-sUA1nZe-.js → TaskQueuePill-C5KmdXAl.js} +2 -2
  243. package/dashboard/dist/assets/{TaskQueuePill-sUA1nZe-.js.map → TaskQueuePill-C5KmdXAl.js.map} +1 -1
  244. package/dashboard/dist/assets/{TasksListPage-Jp6wmL7t.js → TasksListPage-DG8hvO8G.js} +2 -2
  245. package/dashboard/dist/assets/{TasksListPage-Jp6wmL7t.js.map → TasksListPage-DG8hvO8G.js.map} +1 -1
  246. package/dashboard/dist/assets/{TimeAgo-BCQA0Gb_.js → TimeAgo-CL02EhFi.js} +2 -2
  247. package/dashboard/dist/assets/{TimeAgo-BCQA0Gb_.js.map → TimeAgo-CL02EhFi.js.map} +1 -1
  248. package/dashboard/dist/assets/{TimestampCell-xhdMHDQt.js → TimestampCell-BE7oKVJg.js} +2 -2
  249. package/dashboard/dist/assets/{TimestampCell-xhdMHDQt.js.map → TimestampCell-BE7oKVJg.js.map} +1 -1
  250. package/dashboard/dist/assets/{ToolPill-CpBAFdEX.js → ToolPill-Cp9Drk1s.js} +2 -2
  251. package/dashboard/dist/assets/{ToolPill-CpBAFdEX.js.map → ToolPill-Cp9Drk1s.js.map} +1 -1
  252. package/dashboard/dist/assets/{ToolTestPanel-D8M3ITrJ.js → ToolTestPanel-CRecLh6S.js} +2 -2
  253. package/dashboard/dist/assets/{ToolTestPanel-D8M3ITrJ.js.map → ToolTestPanel-CRecLh6S.js.map} +1 -1
  254. package/dashboard/dist/assets/{TopicDetailPage-DdBJQp31.js → TopicDetailPage-QzkinTfN.js} +3 -3
  255. package/dashboard/dist/assets/{TopicDetailPage-DdBJQp31.js.map → TopicDetailPage-QzkinTfN.js.map} +1 -1
  256. package/dashboard/dist/assets/{TopicsPage-vpvsynD9.js → TopicsPage-D8dW6J65.js} +2 -2
  257. package/dashboard/dist/assets/{TopicsPage-vpvsynD9.js.map → TopicsPage-D8dW6J65.js.map} +1 -1
  258. package/dashboard/dist/assets/{UserName-BK6Lzsdw.js → UserName-Dw3R_zrl.js} +2 -2
  259. package/dashboard/dist/assets/{UserName-BK6Lzsdw.js.map → UserName-Dw3R_zrl.js.map} +1 -1
  260. package/dashboard/dist/assets/WorkflowExecutionPage-BTocv8or.js +2 -0
  261. package/dashboard/dist/assets/{WorkflowExecutionPage-DkM1TS4I.js.map → WorkflowExecutionPage-BTocv8or.js.map} +1 -1
  262. package/dashboard/dist/assets/{WorkflowPill-CKHip3hH.js → WorkflowPill-BiLYq__w.js} +2 -2
  263. package/dashboard/dist/assets/{WorkflowPill-CKHip3hH.js.map → WorkflowPill-BiLYq__w.js.map} +1 -1
  264. package/dashboard/dist/assets/WorkflowsDashboard-CIPEt3et.js +2 -0
  265. package/dashboard/dist/assets/{WorkflowsDashboard-g_N4y3QS.js.map → WorkflowsDashboard-CIPEt3et.js.map} +1 -1
  266. package/dashboard/dist/assets/{WorkflowsOverview-Drjo-Lu-.js → WorkflowsOverview-Bj4MJIE-.js} +2 -2
  267. package/dashboard/dist/assets/{WorkflowsOverview-Drjo-Lu-.js.map → WorkflowsOverview-Bj4MJIE-.js.map} +1 -1
  268. package/dashboard/dist/assets/{YamlWorkflowDetailPage-CLltNHjZ.js → YamlWorkflowDetailPage-DMEk5k9-.js} +2 -2
  269. package/dashboard/dist/assets/{YamlWorkflowDetailPage-CLltNHjZ.js.map → YamlWorkflowDetailPage-DMEk5k9-.js.map} +1 -1
  270. package/dashboard/dist/assets/{YamlWorkflowsPage-CxQCB-Zi.js → YamlWorkflowsPage-F2yyyoiB.js} +2 -2
  271. package/dashboard/dist/assets/{YamlWorkflowsPage-CxQCB-Zi.js.map → YamlWorkflowsPage-F2yyyoiB.js.map} +1 -1
  272. package/dashboard/dist/assets/{agents-Dk25jjhj.js → agents-mSgxEPpI.js} +2 -2
  273. package/dashboard/dist/assets/{agents-Dk25jjhj.js.map → agents-mSgxEPpI.js.map} +1 -1
  274. package/dashboard/dist/assets/{bots-bRkCqhlq.js → bots-p4Hp0CV6.js} +2 -2
  275. package/dashboard/dist/assets/{bots-bRkCqhlq.js.map → bots-p4Hp0CV6.js.map} +1 -1
  276. package/dashboard/dist/assets/{capabilities-DARawLry.js → capabilities-D_-I_SXR.js} +2 -2
  277. package/dashboard/dist/assets/{capabilities-DARawLry.js.map → capabilities-D_-I_SXR.js.map} +1 -1
  278. package/dashboard/dist/assets/{controlplane-DKccxxs6.js → controlplane-DjdoQnRU.js} +2 -2
  279. package/dashboard/dist/assets/{controlplane-DKccxxs6.js.map → controlplane-DjdoQnRU.js.map} +1 -1
  280. package/dashboard/dist/assets/{escalation-columns-BaYuzMYf.js → escalation-columns-R_IEVQjQ.js} +2 -2
  281. package/dashboard/dist/assets/{escalation-columns-BaYuzMYf.js.map → escalation-columns-R_IEVQjQ.js.map} +1 -1
  282. package/dashboard/dist/assets/{escalation-items-CwbNFnsH.js → escalation-items-BGZlJMpk.js} +2 -2
  283. package/dashboard/dist/assets/{escalation-items-CwbNFnsH.js.map → escalation-items-BGZlJMpk.js.map} +1 -1
  284. package/dashboard/dist/assets/{index-Cf6qCgTf.js → index-BEMdD58x.js} +2 -2
  285. package/dashboard/dist/assets/{index-Cf6qCgTf.js.map → index-BEMdD58x.js.map} +1 -1
  286. package/dashboard/dist/assets/index-BUmz0NMg.css +1 -0
  287. package/dashboard/dist/assets/{index-hKOlahpE.js → index-BuCEhhnl.js} +2 -2
  288. package/dashboard/dist/assets/{index-hKOlahpE.js.map → index-BuCEhhnl.js.map} +1 -1
  289. package/dashboard/dist/assets/{index-D1uliPqS.js → index-BxbQmeqh.js} +2 -2
  290. package/dashboard/dist/assets/{index-D1uliPqS.js.map → index-BxbQmeqh.js.map} +1 -1
  291. package/dashboard/dist/assets/index-C5osluV3.js +2 -0
  292. package/dashboard/dist/assets/{index-CtrSYqmL.js.map → index-C5osluV3.js.map} +1 -1
  293. package/dashboard/dist/assets/{index-CU2UW2y6.js → index-C_dAJUzh.js} +25 -25
  294. package/dashboard/dist/assets/index-C_dAJUzh.js.map +1 -0
  295. package/dashboard/dist/assets/{index-Bx9HVzuT.js → index-D-FYj9jT.js} +2 -2
  296. package/dashboard/dist/assets/{index-Bx9HVzuT.js.map → index-D-FYj9jT.js.map} +1 -1
  297. package/dashboard/dist/assets/{index-BZgtzkkG.js → index-D6K_IgCz.js} +2 -2
  298. package/dashboard/dist/assets/{index-BZgtzkkG.js.map → index-D6K_IgCz.js.map} +1 -1
  299. package/dashboard/dist/assets/index-D7L_VoBD.js +2 -0
  300. package/dashboard/dist/assets/index-D7L_VoBD.js.map +1 -0
  301. package/dashboard/dist/assets/{index-DgpL_Lgc.js → index-D9RAN9sA.js} +2 -2
  302. package/dashboard/dist/assets/{index-DgpL_Lgc.js.map → index-D9RAN9sA.js.map} +1 -1
  303. package/dashboard/dist/assets/{index-dShcvdg3.js → index-DUYAGxwc.js} +2 -2
  304. package/dashboard/dist/assets/{index-dShcvdg3.js.map → index-DUYAGxwc.js.map} +1 -1
  305. package/dashboard/dist/assets/{index-E_hJ7vtX.js → index-Dk2KKo0z.js} +2 -2
  306. package/dashboard/dist/assets/{index-E_hJ7vtX.js.map → index-Dk2KKo0z.js.map} +1 -1
  307. package/dashboard/dist/assets/{index-DU2QCbgH.js → index-DlJkZ12b.js} +2 -2
  308. package/dashboard/dist/assets/{index-DU2QCbgH.js.map → index-DlJkZ12b.js.map} +1 -1
  309. package/dashboard/dist/assets/{index-kzifJWbM.js → index-FiNThtNU.js} +3 -3
  310. package/dashboard/dist/assets/{index-kzifJWbM.js.map → index-FiNThtNU.js.map} +1 -1
  311. package/dashboard/dist/assets/{knowledge-DOe5ks-E.js → knowledge-DSsPTqkK.js} +2 -2
  312. package/dashboard/dist/assets/{knowledge-DOe5ks-E.js.map → knowledge-DSsPTqkK.js.map} +1 -1
  313. package/dashboard/dist/assets/{machines-Zq_00v7k.js → machines-DSgGtqqr.js} +2 -2
  314. package/dashboard/dist/assets/{machines-Zq_00v7k.js.map → machines-DSgGtqqr.js.map} +1 -1
  315. package/dashboard/dist/assets/{mcp-BL8kD0oh.js → mcp-Cg-_uLw8.js} +2 -2
  316. package/dashboard/dist/assets/{mcp-BL8kD0oh.js.map → mcp-Cg-_uLw8.js.map} +1 -1
  317. package/dashboard/dist/assets/{mcp-query-BpokmJWi.js → mcp-query-DQombEK_.js} +2 -2
  318. package/dashboard/dist/assets/{mcp-query-BpokmJWi.js.map → mcp-query-DQombEK_.js.map} +1 -1
  319. package/dashboard/dist/assets/{personas-BubCnQZ8.js → personas-DYrcoVBu.js} +2 -2
  320. package/dashboard/dist/assets/{personas-BubCnQZ8.js.map → personas-DYrcoVBu.js.map} +1 -1
  321. package/dashboard/dist/assets/{pipelines--DUoMx7K.js → pipelines-wdb4xsey.js} +2 -2
  322. package/dashboard/dist/assets/{pipelines--DUoMx7K.js.map → pipelines-wdb4xsey.js.map} +1 -1
  323. package/dashboard/dist/assets/{tasks-CJXN4OB4.js → tasks-Bil7gvm9.js} +2 -2
  324. package/dashboard/dist/assets/{tasks-CJXN4OB4.js.map → tasks-Bil7gvm9.js.map} +1 -1
  325. package/dashboard/dist/assets/{topics-CAG08Ruo.js → topics-wBqaVhRR.js} +2 -2
  326. package/dashboard/dist/assets/{topics-CAG08Ruo.js.map → topics-wBqaVhRR.js.map} +1 -1
  327. package/dashboard/dist/assets/{useDebouncedValue-DQ2D8cm2.js → useDebouncedValue-CwrY8TpV.js} +2 -2
  328. package/dashboard/dist/assets/{useDebouncedValue-DQ2D8cm2.js.map → useDebouncedValue-CwrY8TpV.js.map} +1 -1
  329. package/dashboard/dist/assets/{useNamespace-DjEVAlJQ.js → useNamespace-Sod_xApz.js} +2 -2
  330. package/dashboard/dist/assets/{useNamespace-DjEVAlJQ.js.map → useNamespace-Sod_xApz.js.map} +1 -1
  331. package/dashboard/dist/assets/{useYamlActivityEvents-etcpfIwo.js → useYamlActivityEvents-CKLInV3C.js} +2 -2
  332. package/dashboard/dist/assets/{useYamlActivityEvents-etcpfIwo.js.map → useYamlActivityEvents-CKLInV3C.js.map} +1 -1
  333. package/dashboard/dist/assets/{validate-YJK_6a7m.js → validate-CYhW1xMJ.js} +2 -2
  334. package/dashboard/dist/assets/{validate-YJK_6a7m.js.map → validate-CYhW1xMJ.js.map} +1 -1
  335. package/dashboard/dist/assets/{vendor-icons-en0_uSRD.js → vendor-icons-ed7mYQw4.js} +2 -2
  336. package/dashboard/dist/assets/{vendor-icons-en0_uSRD.js.map → vendor-icons-ed7mYQw4.js.map} +1 -1
  337. package/dashboard/dist/assets/{yaml-workflows-D97Bz6li.js → yaml-workflows-C20qHo3L.js} +2 -2
  338. package/dashboard/dist/assets/{yaml-workflows-D97Bz6li.js.map → yaml-workflows-C20qHo3L.js.map} +1 -1
  339. package/dashboard/dist/index.html +3 -3
  340. package/docs/api/http/labels.md +115 -0
  341. package/docs/api/http/users.md +2 -0
  342. package/docs/api/mcp/admin.md +76 -1
  343. package/docs/code-owned-configuration.md +1 -1
  344. package/docs/iam.md +12 -0
  345. package/docs/label-sheets.md +267 -0
  346. package/docs/scan-codes.md +11 -5
  347. package/package.json +4 -1
  348. package/dashboard/dist/assets/AvailableEscalationsPage-BRKyG5qZ.js +0 -2
  349. package/dashboard/dist/assets/AvailableEscalationsPage-BRKyG5qZ.js.map +0 -1
  350. package/dashboard/dist/assets/BulkAssignModal-BWfzPrRk.js +0 -2
  351. package/dashboard/dist/assets/HomePage-BUlSnCg8.js +0 -2
  352. package/dashboard/dist/assets/McpRunDetailPage-BHVEcKV5.js +0 -2
  353. package/dashboard/dist/assets/OperatorDashboard-CMkgMewd.js +0 -2
  354. package/dashboard/dist/assets/PersonaDetailPage-Cs1FFdNq.js +0 -2
  355. package/dashboard/dist/assets/RolesPage-CUP7EH5U.js +0 -2
  356. package/dashboard/dist/assets/RunAsSelector-B9-1vgZr.js +0 -2
  357. package/dashboard/dist/assets/ScanCodesPage-KN_e2rJl.js +0 -2
  358. package/dashboard/dist/assets/ScanSchemeDetailPage-CqItQ67Y.js +0 -5
  359. package/dashboard/dist/assets/ScanSchemeDetailPage-CqItQ67Y.js.map +0 -1
  360. package/dashboard/dist/assets/ScanStationPage-B0qbUOwc.js +0 -2
  361. package/dashboard/dist/assets/WorkflowExecutionPage-DkM1TS4I.js +0 -2
  362. package/dashboard/dist/assets/WorkflowsDashboard-g_N4y3QS.js +0 -2
  363. package/dashboard/dist/assets/index-BmzscsXK.css +0 -1
  364. package/dashboard/dist/assets/index-CU2UW2y6.js.map +0 -1
  365. package/dashboard/dist/assets/index-CtrSYqmL.js +0 -2
  366. package/dashboard/dist/assets/index-DU-1gMks.js +0 -2
  367. package/dashboard/dist/assets/index-DU-1gMks.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{u as l,b as a,c as s}from"./vendor-query-DvWWuNIB.js";import{m as r}from"./index-CU2UW2y6.js";function f(e={}){const o=new URLSearchParams;return e.status&&o.set("status",e.status),e.graph_topic&&o.set("graph_topic",e.graph_topic),e.app_id&&o.set("app_id",e.app_id),e.search&&o.set("search",e.search),e.set_id&&o.set("set_id",e.set_id),e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows?${o}`)})}function m(){return l({queryKey:["yamlWorkflowAppIds"],queryFn:()=>r("/yaml-workflows/app-ids")})}function c(e){return l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows/${e}`),enabled:!!e})}function w(){const e=a();return s({mutationFn:o=>r("/yaml-workflows",{method:"POST",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function k(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/deploy`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function p(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/activate`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function d(){const e=a();return s({mutationFn:({id:o,data:t,sync:n,execute_as:u})=>r(`/yaml-workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,sync:n,...u?{execute_as:u}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function h(){const e=a();return s({mutationFn:({id:o,task_queue:t,compilation_feedback:n})=>r(`/yaml-workflows/${o}/regenerate`,{method:"POST",body:JSON.stringify({task_queue:t,compilation_feedback:n})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function q(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/archive`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function W(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/restore`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"}),e.invalidateQueries({queryKey:["yamlWorkflow"],refetchType:"all"})}})}function S(){const e=a();return s({mutationFn:({id:o,...t})=>r(`/yaml-workflows/${o}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function v(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function T(e){return l({queryKey:["yamlWorkflows",e,"versions"],queryFn:()=>r(`/yaml-workflows/${e}/versions`),enabled:!!e})}function F(e,o){return l({queryKey:["yamlWorkflows",e,"versions",o],queryFn:()=>r(`/yaml-workflows/${e}/versions/${o}`),enabled:!!e&&o!==null})}export{m as a,S as b,c,T as d,k as e,p as f,q as g,W as h,v as i,h as j,F as k,d as l,w as m,f as u};
2
- //# sourceMappingURL=yaml-workflows-D97Bz6li.js.map
1
+ import{u as l,b as a,c as s}from"./vendor-query-DvWWuNIB.js";import{m as r}from"./index-C_dAJUzh.js";function f(e={}){const o=new URLSearchParams;return e.status&&o.set("status",e.status),e.graph_topic&&o.set("graph_topic",e.graph_topic),e.app_id&&o.set("app_id",e.app_id),e.search&&o.set("search",e.search),e.set_id&&o.set("set_id",e.set_id),e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows?${o}`)})}function m(){return l({queryKey:["yamlWorkflowAppIds"],queryFn:()=>r("/yaml-workflows/app-ids")})}function c(e){return l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows/${e}`),enabled:!!e})}function w(){const e=a();return s({mutationFn:o=>r("/yaml-workflows",{method:"POST",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function k(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/deploy`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function p(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/activate`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function d(){const e=a();return s({mutationFn:({id:o,data:t,sync:n,execute_as:u})=>r(`/yaml-workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,sync:n,...u?{execute_as:u}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function h(){const e=a();return s({mutationFn:({id:o,task_queue:t,compilation_feedback:n})=>r(`/yaml-workflows/${o}/regenerate`,{method:"POST",body:JSON.stringify({task_queue:t,compilation_feedback:n})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function q(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/archive`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function W(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/restore`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"}),e.invalidateQueries({queryKey:["yamlWorkflow"],refetchType:"all"})}})}function S(){const e=a();return s({mutationFn:({id:o,...t})=>r(`/yaml-workflows/${o}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function v(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function T(e){return l({queryKey:["yamlWorkflows",e,"versions"],queryFn:()=>r(`/yaml-workflows/${e}/versions`),enabled:!!e})}function F(e,o){return l({queryKey:["yamlWorkflows",e,"versions",o],queryFn:()=>r(`/yaml-workflows/${e}/versions/${o}`),enabled:!!e&&o!==null})}export{m as a,S as b,c,T as d,k as e,p as f,q as g,W as h,v as i,h as j,F as k,d as l,w as m,f as u};
2
+ //# sourceMappingURL=yaml-workflows-C20qHo3L.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"yaml-workflows-D97Bz6li.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"qGAmBO,SAASA,EAAiBC,EAA+B,GAAI,CAClE,MAAMC,EAAS,IAAI,gBACnB,OAAID,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,aAAaC,EAAO,IAAI,cAAeD,EAAQ,WAAW,EAClEA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EA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kB,CAAE,SAAU,CAAC,eAAe,EAAG,YAAa,MAAO,EACjFA,EAAY,kBAAkB,CAAE,SAAU,CAAC,cAAc,EAAG,YAAa,MAAO,CAClF,CAAA,CACD,CACH,CAEO,SAASe,GAAwB,CACtC,MAAMf,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAY,CAAC,CAAE,GAAAJ,EAAI,GAAGkB,KACpBrB,EAA+B,mBAAmBG,CAAE,GAAI,CACtD,OAAQ,MACR,KAAM,KAAK,UAAUkB,CAAO,CAAA,CAC7B,EACH,UAAW,IAAM,CACfhB,EAAY,kBAAkB,CAAE,SAAU,CAAC,eAAe,EAAG,YAAa,MAAO,CACnF,CAAA,CACD,CACH,CAEO,SAASiB,GAAwB,CACtC,MAAMjB,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAaJ,GACXH,EAA+B,mBAAmBG,CAAE,GAAI,CACtD,OAAQ,QAAA,CACT,EACH,UAAW,IAAM,CACfE,EAAY,kBAAkB,CAAE,SAAU,CAAC,eAAe,EAAG,YAAa,MAAO,CACnF,CAAA,CACD,CACH,CAsCO,SAASkB,EAAwBpB,EAAY,CAClD,OAAOJ,EAA+D,CACpE,SAAU,CAAC,gBAAiBI,EAAI,UAAU,EAC1C,QAAS,IAAMH,EAAS,mBAAmBG,CAAE,WAAW,EACxD,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAEO,SAASqB,EAAuBrB,EAAYsB,EAAwB,CACzE,OAAO1B,EAAgC,CACrC,SAAU,CAAC,gBAAiBI,EAAI,WAAYsB,CAAO,EACnD,QAAS,IAAMzB,EAAS,mBAAmBG,CAAE,aAAasB,CAAO,EAAE,EACnE,QAAS,CAAC,CAACtB,GAAMsB,IAAY,IAAA,CAC9B,CACH"}
1
+ {"version":3,"file":"yaml-workflows-C20qHo3L.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"qGAmBO,SAASA,EAAiBC,EAA+B,GAAI,CAClE,MAAMC,EAAS,IAAI,gBACnB,OAAID,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,aAAaC,EAAO,IAAI,cAAeD,EAAQ,WAAW,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C9B,CACH"}
@@ -8,11 +8,11 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
11
- <script type="module" crossorigin src="./assets/index-CU2UW2y6.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-C_dAJUzh.js"></script>
12
12
  <link rel="modulepreload" crossorigin href="./assets/vendor-query-DvWWuNIB.js">
13
13
  <link rel="modulepreload" crossorigin href="./assets/vendor-react-_9U4mKFr.js">
14
- <link rel="modulepreload" crossorigin href="./assets/vendor-icons-en0_uSRD.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-BmzscsXK.css">
14
+ <link rel="modulepreload" crossorigin href="./assets/vendor-icons-ed7mYQw4.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-BUmz0NMg.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
@@ -0,0 +1,115 @@
1
+ # Labels API
2
+
3
+ Label templates, label sheets, badge reissue and the label ledger. All
4
+ endpoints require authentication. See [label-sheets.md](../../label-sheets.md)
5
+ for templates, sources, media and the credential rules.
6
+
7
+ | Endpoint | Access |
8
+ |---|---|
9
+ | `GET /api/labels/templates[?scheme=]`, `GET /api/labels/templates/:name` | Any signed-in user |
10
+ | `PUT /api/labels/templates/:name`, `DELETE /api/labels/templates/:name` | Role management |
11
+ | `GET /api/labels/media`, `GET /api/labels/transports` | Any signed-in user |
12
+ | `POST /api/labels/preview`, `POST /api/labels/issue`, `POST /api/labels/jobs/:id/reprint` | Item templates: admin or role management. Identity templates: `credentialIssuer`. |
13
+ | `POST /api/labels/badges/reissue` | `credentialIssuer` |
14
+ | `GET /api/labels/jobs`, `GET /api/labels/jobs/:id` | Any signed-in user; badge jobs only for credential issuers and their requester |
15
+
16
+ ## Upsert a template
17
+
18
+ ```
19
+ PUT /api/labels/templates/:name
20
+ ```
21
+
22
+ ```json
23
+ {
24
+ "scheme_version": 14,
25
+ "title": "Container",
26
+ "codes": [
27
+ { "category": "0", "tone": "solid" },
28
+ { "category": "1", "caption": "Check out", "tone": "outline" }
29
+ ],
30
+ "text": { "title": "{target}", "lines": ["{item.subtitle}"] },
31
+ "symbology": "code128",
32
+ "media": "a4-l7160",
33
+ "expected_revision": 3
34
+ }
35
+ ```
36
+
37
+ **Response 200:** the stored template with its new `revision`. **400** names
38
+ the first problem (unknown token, a category with no rule, a credential token).
39
+ **409** when `expected_revision` is stale.
40
+
41
+ ## Preview
42
+
43
+ ```
44
+ POST /api/labels/preview
45
+ ```
46
+
47
+ ```json
48
+ {
49
+ "template": "container",
50
+ "source": { "kind": "range", "prefix": "A-", "from": 1, "to": 40 },
51
+ "layout": { "media": "a4-l7160", "startPosition": 7 }
52
+ }
53
+ ```
54
+
55
+ **Response 200:** `{ template, sheet, warnings, labelCount }`. `sheet` holds
56
+ pages of placed labels in millimetres. Sensitive templates come back masked.
57
+ Nothing is recorded.
58
+
59
+ ## Issue
60
+
61
+ ```
62
+ POST /api/labels/issue
63
+ ```
64
+
65
+ ```json
66
+ {
67
+ "template": "associate-badge",
68
+ "source": { "kind": "users", "userIds": ["2f0c…"] },
69
+ "layout": { "media": "a4-cr80", "cutMarks": true },
70
+ "output": "pdf",
71
+ "confirm": true,
72
+ "idempotencyKey": "optional-key",
73
+ "destination": "optional, passed to a transport"
74
+ }
75
+ ```
76
+
77
+ | `output` | Response |
78
+ |---|---|
79
+ | `sheet` | JSON `{ job, replay, warnings, sheet }` |
80
+ | `pdf` | `application/pdf` attachment |
81
+ | `zpl` | `application/vnd.zebra-zpl` attachment (thermal media only) |
82
+ | `transport:<name>` | JSON `{ job, replay, warnings, receipt }` |
83
+
84
+ Every response carries `Cache-Control: no-store` and `X-LT-Label-Job: <job id>`.
85
+
86
+ | Status | Meaning |
87
+ |---|---|
88
+ | 400 | Bad source, layout or output (ZPL on sheet stock, a pasted badge list) |
89
+ | 403 | No print access for this template |
90
+ | 404 | Unknown or disabled template |
91
+ | 428 | A sensitive template without `confirm: true` |
92
+ | 502 | The transport failed; the job is recorded |
93
+
94
+ ## Reissue a badge
95
+
96
+ ```
97
+ POST /api/labels/badges/reissue
98
+ ```
99
+
100
+ ```json
101
+ { "userId": "2f0c…", "template": "associate-badge", "output": "sheet", "confirm": true }
102
+ ```
103
+
104
+ Rotates the user's credential and prints the new badge. The response is an
105
+ issue response with `reissueJobId`, the ledger row of the rotation.
106
+
107
+ ## History
108
+
109
+ ```
110
+ GET /api/labels/jobs?template=&subjectUserId=&limit=&offset=
111
+ POST /api/labels/jobs/:id/reprint { "indices": [0, 3], "output": "sheet", "confirm": true }
112
+ ```
113
+
114
+ A reprint prints the job's source again with the template as it is now, the
115
+ whole job or the labels at `indices`, and records a new job.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Users represent the humans who claim and resolve escalations. Each user has a unique `external_id` that maps to your application's identity system. All endpoints require authentication. Creating, updating, patching, and deleting users require builder access (superadmin or the `engineer` role). Adding and removing roles require admin access and follow the assignment rules in the [Roles API](roles.md#scoped-role-assignment). Only a superadmin may grant the `superadmin` type or change a superadmin account.
4
4
 
5
+ User records leave identity keys (the target facets of identity scan schemes, such as `badge_id`) out of `metadata` and list the ones a user carries in `identity_bound`. A wholesale `metadata` write refuses identity keys and keeps the ones it leaves out; setting or removing one through `PATCH /api/users/:id/properties` needs the `credentialIssuer` capability and is recorded in the label ledger. These protections are on by default; `labels.protectIdentityKeys: false` keeps the earlier behavior. See [label-sheets.md](../../label-sheets.md#badges-are-credentials).
6
+
5
7
  For service identities (CI bots, schedulers, automated agents), use the [Service Accounts API](service-accounts.md) instead. Service accounts share the same RBAC system but authenticate with API keys rather than passwords or OAuth.
6
8
 
7
9
  ## List users
@@ -1,6 +1,6 @@
1
1
  # Admin
2
2
 
3
- Unified system management: tasks, escalations, workflows, diagnostics, agents, bot accounts, control plane, pipelines, topics, users, roles, personas, scan codes, announcements, and settings.
3
+ Unified system management: tasks, escalations, workflows, diagnostics, agents, bot accounts, control plane, pipelines, topics, users, roles, personas, scan codes, label sheets, announcements, and settings.
4
4
 
5
5
  | Property | Value |
6
6
  |----------|-------|
@@ -2055,6 +2055,81 @@ Delete one scan rule by scheme version and category.
2055
2055
  | scheme_version | integer | Yes | Scheme version |
2056
2056
  | category | string | Yes | Rule category |
2057
2057
 
2058
+ ## Label Sheets
2059
+
2060
+ Label templates say what one printed label of a scan scheme shows. See [label-sheets.md](../../label-sheets.md).
2061
+
2062
+ ### list_label_templates
2063
+
2064
+ List label templates: the scheme each prints, its codes with captions, text, symbology and default media.
2065
+
2066
+ | | |
2067
+ |---|---|
2068
+ | Read-safe | Yes |
2069
+
2070
+ **Parameters:**
2071
+
2072
+ | Field | Type | Required | Description |
2073
+ |-------|------|----------|-------------|
2074
+ | scheme | integer | No | Only templates for this scheme version |
2075
+
2076
+ ### upsert_label_template
2077
+
2078
+ Create or replace a label template. Codes are 1 to 4 of the scheme's rules, each beside a caption in a `solid`, `outline` or `plain` band; the title and up to two lines are written in label tokens.
2079
+
2080
+ | | |
2081
+ |---|---|
2082
+ | Read-safe | No |
2083
+
2084
+ **Parameters:**
2085
+
2086
+ | Field | Type | Required | Description |
2087
+ |-------|------|----------|-------------|
2088
+ | name | string | Yes | Template id: lowercase letters, digits and dashes |
2089
+ | scheme_version | integer | Yes | The scheme whose codes the label prints |
2090
+ | title | string | Yes | Display name |
2091
+ | codes | array | Yes | `{ category, caption?, tone }` |
2092
+ | text | object | No | `{ title?, lines? }` in label tokens |
2093
+ | symbology | string | No | `code128`, `qrcode` or `datamatrix` |
2094
+ | human_readable | boolean | No | Print the code as text under the symbol |
2095
+ | media | string | No | Default media preset id |
2096
+ | sensitive | boolean | No | Confirm and record subjects when printing |
2097
+ | enabled | boolean | No | |
2098
+ | expected_revision | integer | No | Write only if the stored revision matches |
2099
+
2100
+ ### delete_label_template
2101
+
2102
+ Delete one label template by name.
2103
+
2104
+ | | |
2105
+ |---|---|
2106
+ | Read-safe | No |
2107
+
2108
+ **Parameters:**
2109
+
2110
+ | Field | Type | Required | Description |
2111
+ |-------|------|----------|-------------|
2112
+ | name | string | Yes | Template name |
2113
+
2114
+ ### render_label_sheet
2115
+
2116
+ Issue a sheet of item labels as the caller and store it as a PDF (sheet stock) or ZPL (thermal media). Returns the job id, the file ref, a link valid for ten minutes, and warnings for codes that would fail on the floor. Sensitive and identity (badge) templates are refused.
2117
+
2118
+ | | |
2119
+ |---|---|
2120
+ | Read-safe | No |
2121
+
2122
+ **Parameters:**
2123
+
2124
+ | Field | Type | Required | Description |
2125
+ |-------|------|----------|-------------|
2126
+ | template | string | Yes | Template name |
2127
+ | source | object | Yes | `list`, `range`, `escalations` or `facets` source |
2128
+ | format | string | Yes | `pdf` or `zpl` |
2129
+ | media | string | No | Media preset id |
2130
+ | startPosition | integer | No | First label to print on the first sheet |
2131
+ | copies | integer | No | Copies of each label |
2132
+
2058
2133
  ## Announcements
2059
2134
 
2060
2135
  ### publish_announcement
@@ -63,7 +63,7 @@ The domain dictionary's override lives beside its declaration:
63
63
  | MCP servers | `mcp.serverFactories[].config` | description, tags, category, compile hints, credential providers | tool manifest, connection status |
64
64
  | Agents | `agents[]` | description, status, goals, rules, domain, schedules | capabilities, metadata, run history |
65
65
  | Agent subscriptions | `agents[].subscriptions` | reaction fields on (agent, topic) | `enabled` — the admin kill-switch |
66
- | Scan schemes | `scanSchemes[]` | whole scheme + its rules (one ownership unit; `enabled` is declarative here) | — |
66
+ | Scan schemes | `scanSchemes[]` | whole scheme + its rules + its label templates (one ownership unit; `enabled` is declarative here) | the label ledger |
67
67
  | Domain dictionary | `mcp.domainDictionary` (inline) or `mcp.domainDictionaryPath` | whole document (version bumps once per change) | — |
68
68
  | Graph workflows | `graphWorkflows[]` | always compare-and-apply: description/schema sync, redeploy on YAML version bump | run history |
69
69
  | Machine lines | `machines.lines[]` | the whole line definition (`lt_machine_lines`; version bumps once per change) | lines declared through the API, their bot accounts, their rows |
package/docs/iam.md CHANGED
@@ -251,6 +251,18 @@ The same keystore carries **acting-identity grants** for shared station devices.
251
251
 
252
252
  The grant rides scan requests as `actingToken` and is exchanged server-side before anything reads or writes: the verbs run **as the badged person under their own live RBAC**. The grant confers attribution, never privilege — a badged user without write scope on the queue is still denied. Mutations attribute to the person (`assigned_to`, `resolved_by`) with the device recorded beside them (`scanStation` provenance). A dead grant is a loud `not_primed` outcome, never a silent execution as the device. See [scan-codes.md](scan-codes.md#identity-schemes-and-acting-identity).
253
253
 
254
+ ### Printed credentials
255
+
256
+ Badge tokens are credentials, so the platform treats printing one as issuing
257
+ one. The `credentialIssuer` capability (superadmin, or the `credential-issuer`
258
+ role; admin type alone does not grant it) gates printing, reissuing, and
259
+ binding identity keys by hand. User reads leave identity keys out of
260
+ `metadata` and name them in `identity_bound`. Every print, reissue, and binding
261
+ writes a row to the label ledger (`lt_label_jobs`) naming the requester and the
262
+ holders before any code is composed. The users API protections are on by
263
+ default; `labels.protectIdentityKeys: false` (or `LT_PROTECT_IDENTITY_KEYS=false`)
264
+ keeps the earlier behavior. See [label-sheets.md](label-sheets.md#badges-are-credentials).
265
+
254
266
  ## Dashboard
255
267
 
256
268
  The dashboard surfaces IAM across four pages:
@@ -0,0 +1,267 @@
1
+ # Label Sheets
2
+
3
+ Every physical thing a floor acts on carries a printed scan code: locations,
4
+ containers, stations, machines, and the badges people scan to act. Label sheets print
5
+ those codes from the scan schemes that read them, on office printers (A4 and
6
+ Letter label stock, ID card stock) and thermal printers (ZPL).
7
+
8
+ A label is a heading, up to two lines of text, and one to four codes for one
9
+ target, each printed beside the act it names. A container label can print
10
+ **Check in** and **Check out** side by side; the person scanning chooses the
11
+ act by choosing which code to scan. The text is whatever the target's facts
12
+ say: the platform has no notion of what a target is.
13
+
14
+ ## Contents
15
+
16
+ - [Templates](#templates)
17
+ - [Targets](#targets)
18
+ - [Media and layout](#media-and-layout)
19
+ - [Output](#output)
20
+ - [Checking codes before printing](#checking-codes-before-printing)
21
+ - [Badges are credentials](#badges-are-credentials)
22
+ - [Who may print](#who-may-print)
23
+ - [The label ledger](#the-label-ledger)
24
+ - [Printer transports](#printer-transports)
25
+ - [Declaring templates in code](#declaring-templates-in-code)
26
+ - [Agents](#agents)
27
+
28
+ ## Templates
29
+
30
+ A template says what one label shows, for one scan scheme. Templates print
31
+ codes the platform mints: schemes with `fixed` or `delimited` encoding.
32
+
33
+ | Field | Meaning |
34
+ |---|---|
35
+ | `codes` | 1 to 4 of the scheme's rules, in print order. Each has a `caption` (default: the rule's name) and a `tone`: `solid` (white text on a black band), `outline`, or `plain`. Tones tell neighbouring codes apart on black-only stock. |
36
+ | `text.title`, `text.lines` | A heading and up to two lines, written in label tokens. |
37
+ | `symbology` | `code128` (default; shelves scanned from a distance), `qrcode`, or `datamatrix` (small labels). |
38
+ | `human_readable` | Print the code as text under its symbol. |
39
+ | `media` | The default media preset for this template. |
40
+ | `sensitive` | Printing confirms first and records who and what the labels name. Always true on an identity scheme. |
41
+
42
+ Label tokens:
43
+
44
+ | Token | Value |
45
+ |---|---|
46
+ | `{target}` | The code's target (action schemes). |
47
+ | `{item.<facet>}` | A facet of the row the target came from, or a column of a pasted list. |
48
+ | `{user.display_name}`, `{user.name}`, `{user.email}`, `{user.roles}`, `{user.<property>}` | The badge holder (identity schemes). |
49
+ | `{scheme.name}` | The scheme's name. |
50
+
51
+ A token with no value prints empty, and the preview warns about it
52
+ (`missing_token`, naming the facts the label does have). Captions take tokens
53
+ too; a caption left blank prints the rule's name as written. Identity
54
+ credentials never print as text:
55
+ `{target}` and `{user.<identity key>}` are refused on identity templates.
56
+
57
+ Manage templates on **Admin → Scan Codes → (scheme) → Labels**, through
58
+ `PUT /api/labels/templates/:name`, or with the `upsert_label_template` MCP
59
+ tool. Every write bumps the template's `revision`; an edit that names
60
+ `expected_revision` is refused when someone else saved first.
61
+
62
+ ## Targets
63
+
64
+ A print job is a template plus a source of targets:
65
+
66
+ | Source | Targets |
67
+ |---|---|
68
+ | `{ kind: 'range', prefix, from, to, pad, suffix }` | A numbered run: `A-01` to `A-40`. Targets can be printed before anything else is known about them. |
69
+ | `{ kind: 'list', text }` | One target per line. A header row starting with `target` names the other columns, which fill `{item.<column>}`. |
70
+ | `{ kind: 'escalations', ids }` | Rows selected in a list. Each row is read as the caller; its metadata fills `{item.*}`. |
71
+ | `{ kind: 'facets', query }` | Every row a faceted search returns, searched as the caller. The newest row per target wins. |
72
+ | `{ kind: 'users', userIds, role }` | Users carrying the identity scheme's key: the ids given, everyone in `role`, or with neither, every badge holder. The only source an identity template accepts. On **Accounts**, **Print badges** prints the selected users, or with none selected, everyone or everyone in a role. |
73
+
74
+ A job holds at most `LT_LABELS_MAX_PER_JOB` labels (default 1000) and at most
75
+ `LT_LABELS_MAX_CREDENTIALS_PER_JOB` badges (default 200).
76
+
77
+ ## Media and layout
78
+
79
+ Shipped presets (`GET /api/labels/media`):
80
+
81
+ | Family | Presets |
82
+ |---|---|
83
+ | A4 | `a4-l7160` (21 per sheet), `a4-l7163` (14), `a4-l7165` (8), `a4-l7173` (10), `a4-l7651` (65), `a4-a6` (4), `a4-placard` (1), `a4-cr80` (10 ID cards) |
84
+ | Letter | `letter-5160` (30), `letter-5163` (10), `letter-22805` (24 squares), `letter-placard` (1), `letter-cr80` (8 ID cards) |
85
+ | Thermal | `thermal-4x6`, `thermal-4x2`, `thermal-2x1` at 203 dpi |
86
+
87
+ A job prints on the media it names, then the template's media, then the
88
+ deployment default (`LT_LABELS_DEFAULT_MEDIA`, `a4-l7160` unless set). A job
89
+ can also pass a custom grid: page size, rows and columns, label size,
90
+ margins and gutters, all in millimetres.
91
+
92
+ Per job:
93
+
94
+ - `startPosition` skips used labels on the first sheet (counted from 1).
95
+ - `copies` prints each label several times, together.
96
+ - `onePerPage` puts each label on its own page (placards).
97
+ - `cutMarks` prints trim marks for card stock.
98
+
99
+ Labels lay out to fit their box. When a code would print below the stock's
100
+ minimum bar width (`minModuleMm`, 0.25 mm on the presets) or without its blank
101
+ margin, the job reports a `scale` or `quiet_zone` warning.
102
+
103
+ ## Output
104
+
105
+ `POST /api/labels/issue` delivers a job as:
106
+
107
+ | `output` | Result |
108
+ |---|---|
109
+ | `sheet` | The laid-out sheet as JSON. The dashboard prints it through the browser at exact size. |
110
+ | `pdf` | A PDF at the media's exact page size. |
111
+ | `zpl` | ZPL for thermal media, using the printer's own barcode commands. |
112
+ | `transport:<name>` | Sent through a registered [printer transport](#printer-transports). |
113
+
114
+ PDF text uses Helvetica, which covers Latin names with accents. A deployment
115
+ that prints names in other scripts registers a font with
116
+ `start({ labels: { font: { regular, bold } } })`.
117
+
118
+ ## Checking codes before printing
119
+
120
+ A preview (`POST /api/labels/preview`) lays out the job without printing or
121
+ recording it, and lists a warning for every label that would fail on the floor:
122
+
123
+ - `unparseable`: the code does not read back as its scheme, or the scheme is disabled.
124
+ - `rule_disabled`: the code's rule is disabled; scanning it does nothing.
125
+ - `unresolved`: the target names no row today, or the badge holder is not an active user.
126
+ - `missing_token`: the heading, a line or a caption reads `{item.<facet>}` or `{user.<key>}`, and the label's data has no such value.
127
+ - `scale`, `quiet_zone`, `overflow`, `unencodable`: the code or text does not fit the label.
128
+
129
+ The dashboard prints only after a preview of the same choice. In Chrome, the
130
+ preview can also decode every code on screen and report any it cannot read
131
+ back.
132
+
133
+ ## Badges are credentials
134
+
135
+ An identity scheme's code acts as a person, so printing one follows its own
136
+ rules:
137
+
138
+ - Only a credential issuer may print or reissue a badge (see [Who may print](#who-may-print)).
139
+ - A badge preview is masked: it shows where each code goes, never the code.
140
+ - Printing asks for confirmation (`confirm: true`), and the ledger row naming the requester and every holder is written before any code is composed.
141
+ - Badge codes travel in response bodies with `Cache-Control: no-store`, never in URLs, and never in logs or the ledger.
142
+ - User reads (`GET /api/users`, `GET /api/users/:id`, user writes' responses) leave identity keys out of `metadata` and list them in `identity_bound`.
143
+ - Setting or removing an identity key by hand (`PATCH /api/users/:id/properties`) needs the same access and is recorded as a `bind`.
144
+ - Badge scans are unchanged: a scanned token resolves against `lt_users.metadata` on the server, as before.
145
+
146
+ The user API protections (the last two points, and the refusal of identity keys
147
+ in wholesale `metadata` writes) are on by default.
148
+ `start({ labels: { protectIdentityKeys: false } })` or
149
+ `LT_PROTECT_IDENTITY_KEYS=false` keeps the earlier users API behavior; badge
150
+ printing and reissue still need `credentialIssuer`. Either way, a `metadata`
151
+ replace keeps the identity keys it leaves out.
152
+
153
+ **Reissue** (`POST /api/labels/badges/reissue`) mints a new credential that
154
+ fits the scheme's encoding, writes it and its ledger row in one statement, and
155
+ prints the new badge. On a delimited identity scheme the credential is
156
+ `target_length` random characters (8 to 64, default 10; **Badge length** on
157
+ the scheme page), and the badge encodes it with its prefix, for example
158
+ `14:0:7KQ2M9XW4H`. On a fixed scheme it is `target_length` digits. Badges of
159
+ any length keep scanning; the length only shapes new ones. Ten characters keep
160
+ a Code 128 badge on an ID card comfortably above the minimum bar width. The old code resolves to no one from that moment. An
161
+ acting grant minted from the old badge before the reissue lasts until its
162
+ `grant_ttl_seconds` runs out.
163
+
164
+ ## Who may print
165
+
166
+ | Labels | Access |
167
+ |---|---|
168
+ | Item labels (action schemes) | Admin access or role management (admin, superadmin, the `engineer` role). |
169
+ | Badges (identity schemes) | The `credentialIssuer` capability: superadmin, or a holder of the `credential-issuer` role. Admin type alone does not grant it. |
170
+ | Templates | Role management to write; any signed-in user to read. |
171
+
172
+ ## The label ledger
173
+
174
+ Every print, reissue and binding is a row in `lt_label_jobs`: who asked, when,
175
+ the template and its revision (with a snapshot), the media and output, and
176
+ what the labels name: targets for item labels, user ids for badges. Rows are
177
+ never deleted by the platform; the only columns it updates are the delivery
178
+ stamps of a transport job.
179
+
180
+ **Admin → Label History** (`GET /api/labels/jobs`) lists the ledger.
181
+ Credential issuers see every row; other readers see item jobs and their own.
182
+ **Print again** (`POST /api/labels/jobs/:id/reprint`) prints a job, or chosen
183
+ labels of it, again from its source with the template as it is now, and
184
+ records a new job. A badge reprint confirms again.
185
+
186
+ An `idempotencyKey` on an issue request makes it safe to repeat, which is what
187
+ a workflow activity retry does. The repeat records nothing new and prints only
188
+ the labels the first request recorded:
189
+
190
+ - A sheet, PDF or ZPL output renders those labels again.
191
+ - A transport output is sent under a delivery lease. Claiming the lease is one
192
+ statement, so concurrent repeats send once. A job already delivered is not
193
+ sent again. A job whose send failed, or whose sender stopped before the
194
+ transport accepted, is sent by the next repeat once its lease
195
+ (`LT_LABELS_DELIVERY_LEASE_SECONDS`, default 120) lapses.
196
+ - A key used before for a different template or output answers `409`.
197
+
198
+ Workflow activities pass their workflow id as the key.
199
+
200
+ ## Printer transports
201
+
202
+ A transport routes issued labels to a printer: a thermal printer on the
203
+ network, a print server, a watched folder. Hosts register transports by name:
204
+
205
+ ```typescript
206
+ import type { LTLabelTransport } from '@hotmeshio/long-tail';
207
+
208
+ const thermal: LTLabelTransport = {
209
+ formats: ['zpl'],
210
+ async send({ jobId, payload, destination }) {
211
+ await sendToPrinter(destination, payload as string);
212
+ return { accepted: true, detail: jobId };
213
+ },
214
+ };
215
+
216
+ start({ labels: { transports: { thermal }, defaultMedia: 'a4-l7160' } });
217
+ ```
218
+
219
+ A job sends with `output: 'transport:thermal'`; `destination` on the request
220
+ passes through to `send` as given, and the transport decides what it names. A name with no registered transport is refused
221
+ before anything is recorded. `GET /api/labels/transports` lists the registered
222
+ names, and the dashboard offers **Send** when one accepts the job's format.
223
+
224
+ The examples register `storage-drop`, which writes each job to file storage at
225
+ `labels/<jobId>.<format>`.
226
+
227
+ ## Declaring templates in code
228
+
229
+ Templates declare with their scheme and follow the
230
+ [code-owned configuration](code-owned-configuration.md) contract as one unit
231
+ with it:
232
+
233
+ ```typescript
234
+ scanSchemes: [
235
+ {
236
+ version: 14,
237
+ name: 'Container',
238
+ target_facet: 'containerId',
239
+ encoding: 'delimited',
240
+ rules: [
241
+ { category: '0', name: 'Check in', steps: [/* … */] },
242
+ { category: '1', name: 'Check out', steps: [/* … */] },
243
+ ],
244
+ labels: [
245
+ {
246
+ name: 'container',
247
+ title: 'Container',
248
+ codes: [{ category: '0', tone: 'solid' }, { category: '1', tone: 'outline' }],
249
+ text: { title: '{target}', lines: ['{item.subtitle}'] },
250
+ media: 'a4-l7160',
251
+ },
252
+ ],
253
+ },
254
+ ],
255
+ ```
256
+
257
+ ## Agents
258
+
259
+ The admin MCP server carries `list_label_templates`, `upsert_label_template`,
260
+ `delete_label_template`, and `render_label_sheet`. `render_label_sheet` issues
261
+ item labels as the caller, stores the PDF or ZPL in file storage, and returns
262
+ the job id, the file ref, a link valid for ten minutes, and the warnings.
263
+ It refuses sensitive and identity templates: people print badges.
264
+
265
+ The `relabel` example workflow shows labels printed from a workflow: it asks a
266
+ person for a label's second line, then prints the label with it through a
267
+ transport, keyed by its workflow id.
@@ -31,6 +31,7 @@ canonical action surface. A scan is an **ECA rule** over that surface:
31
31
  - [Capture on the dashboard](#capture-on-the-dashboard)
32
32
  - [Scanner setup](#scanner-setup)
33
33
  - [Admin configuration](#admin-configuration)
34
+ - [Printing labels](label-sheets.md)
34
35
  - [The printer demo](#the-printer-demo)
35
36
  - [The bag and bin demo](#the-bag-and-bin-demo)
36
37
 
@@ -788,10 +789,14 @@ checks its entries off the same way: a scan of an accepted scheme, with nothing
788
789
  focused, fills the row's first open entry for that code on the server, as the
789
790
  person acting. A scan no field accepts runs globally as usual.
790
791
 
791
- Badge tokens are printed credentials: seed them as long random strings,
792
- bind them server-side (`lt_users.metadata`), and treat badge possession
793
- with the same physical policy as any badge system. Unknown badges answer
794
- `identity_unknown` and are auditable.
792
+ Badge tokens are printed credentials: bind them server-side
793
+ (`lt_users.metadata`) as random strings (generated badges are `target_length`
794
+ characters, default 10), and treat badge possession with
795
+ the same physical policy as any badge system. User reads leave identity keys
796
+ out of `metadata` and list them in `identity_bound`. Printing, reissuing and
797
+ binding a badge needs the `credentialIssuer` capability and is recorded in
798
+ the label ledger; see [label-sheets.md](label-sheets.md#badges-are-credentials).
799
+ Unknown badges answer `identity_unknown`.
795
800
 
796
801
  ## The fallback screen
797
802
 
@@ -917,7 +922,8 @@ UPC-A where numeric-only labels are already in circulation.
917
922
  at a target facet — its two-digit index is assigned for you. A scheme's detail
918
923
  page lists its actions; **Add an action** opens the rule editor:
919
924
 
920
- 1. **Name it** — the friendly label printed beside the physical code.
925
+ 1. **Name it** — the friendly label printed beside the physical code. Label
926
+ templates print it there; see [label-sheets.md](label-sheets.md).
921
927
  2. **Order the conditions** — each step picks a queue, a held-by filter,
922
928
  and its action; steps reorder with arrows. First match wins.
923
929
  3. **Set the fallback** — markdown for the no-match screen.