@hotmeshio/long-tail 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/escalations/accumulate.d.ts +8 -0
- package/build/api/escalations/accumulate.js +25 -0
- package/build/api/escalations/index.d.ts +1 -1
- package/build/api/escalations/index.js +2 -1
- package/build/api/scan-codes/context.d.ts +14 -1
- package/build/api/scan-codes/context.js +30 -2
- package/build/api/scan-codes/identity.js +1 -0
- package/build/api/scan-codes/verbs.d.ts +9 -3
- package/build/api/scan-codes/verbs.js +77 -23
- package/build/index.d.ts +2 -1
- package/build/index.js +3 -2
- package/build/routes/escalations/accumulate.js +8 -0
- package/build/sdk/index.d.ts +3 -0
- package/build/sdk/index.js +1 -0
- package/build/services/scan-code/index.d.ts +1 -1
- package/build/services/scan-code/index.js +3 -1
- package/build/services/scan-code/parse.d.ts +17 -3
- package/build/services/scan-code/parse.js +37 -4
- package/build/services/scan-code/validate.js +19 -0
- package/build/system/mcp-servers/admin/escalations.js +6 -1
- package/build/system/mcp-servers/admin/schemas.d.ts +6 -3
- package/build/system/mcp-servers/admin/schemas.js +2 -1
- package/build/system/seed/tool-manifests-admin.d.ts +189 -0
- package/build/system/seed/tool-manifests-admin.js +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.js +2 -1
- package/build/types/scan-code.d.ts +31 -1
- package/build/types/scan-code.js +20 -2
- package/dashboard/dist/assets/{AdminDashboard-uarpHB88.js → AdminDashboard-Covdam48.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-uarpHB88.js.map → AdminDashboard-Covdam48.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-BcUaDD5E.js → AgentConfigPage-CE1k6J5r.js} +2 -2
- package/dashboard/dist/assets/{AgentConfigPage-BcUaDD5E.js.map → AgentConfigPage-CE1k6J5r.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-BaZBhK6i.js → AgentDetailPage-CWJZIZP1.js} +2 -2
- package/dashboard/dist/assets/{AgentDetailPage-BaZBhK6i.js.map → AgentDetailPage-CWJZIZP1.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-CuVFSDc4.js → AgentsPage---Dg5ufF.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-CuVFSDc4.js.map → AgentsPage---Dg5ufF.js.map} +1 -1
- package/dashboard/dist/assets/{AvailableEscalationsPage-iO5NyyIK.js → AvailableEscalationsPage-CpbC8oTN.js} +2 -2
- package/dashboard/dist/assets/{AvailableEscalationsPage-iO5NyyIK.js.map → AvailableEscalationsPage-CpbC8oTN.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-CClMby6B.js → BotPicker-D3drO3-T.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-CClMby6B.js.map → BotPicker-D3drO3-T.js.map} +1 -1
- package/dashboard/dist/assets/{BulkAssignModal-BL8FRgkN.js → BulkAssignModal-BOAWsViq.js} +2 -2
- package/dashboard/dist/assets/{BulkAssignModal-BL8FRgkN.js.map → BulkAssignModal-BOAWsViq.js.map} +1 -1
- package/dashboard/dist/assets/{CapabilitiesPage-D53ogPor.js → CapabilitiesPage-RGgD3YZO.js} +2 -2
- package/dashboard/dist/assets/{CapabilitiesPage-D53ogPor.js.map → CapabilitiesPage-RGgD3YZO.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-ow8jpbtD.js → CollapsibleSection-DNkZn87n.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-ow8jpbtD.js.map → CollapsibleSection-DNkZn87n.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-CeEDt9iJ.js → ConfirmDeleteModal-BqzOwhPr.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-CeEDt9iJ.js.map → ConfirmDeleteModal-BqzOwhPr.js.map} +1 -1
- package/dashboard/dist/assets/{CountdownTimer-CSqyZMCG.js → CountdownTimer-BaexQMK6.js} +2 -2
- package/dashboard/dist/assets/{CountdownTimer-CSqyZMCG.js.map → CountdownTimer-BaexQMK6.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-Dx7SxA23.js → CredentialsPage-D7abp0aS.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-Dx7SxA23.js.map → CredentialsPage-D7abp0aS.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-LYPxpvNN.js → CronLabel-DZiWmTwJ.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-LYPxpvNN.js.map → CronLabel-DZiWmTwJ.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-BZJTSm9N.js → ElapsedCell-BdGO_w4v.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-BZJTSm9N.js.map → ElapsedCell-BdGO_w4v.js.map} +1 -1
- package/dashboard/dist/assets/{EntityTimelinePanel-0wIIW2en.js → EntityTimelinePanel-DIDcF5Yu.js} +2 -2
- package/dashboard/dist/assets/{EntityTimelinePanel-0wIIW2en.js.map → EntityTimelinePanel-DIDcF5Yu.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListSchemaPage-CoYvtMzj.js → EscalationListSchemaPage-C28rn9XC.js} +2 -2
- package/dashboard/dist/assets/{EscalationListSchemaPage-CoYvtMzj.js.map → EscalationListSchemaPage-C28rn9XC.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListView-DWFHPufv.js → EscalationListView-CkBnkpDJ.js} +2 -2
- package/dashboard/dist/assets/{EscalationListView-DWFHPufv.js.map → EscalationListView-CkBnkpDJ.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-C9Xu_A25.js → EscalationSchemaPage-W5r0A1kj.js} +2 -2
- package/dashboard/dist/assets/{EscalationSchemaPage-C9Xu_A25.js.map → EscalationSchemaPage-W5r0A1kj.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationTimeline-D8W2LNNk.js → EscalationTimeline-DKyTz6sM.js} +2 -2
- package/dashboard/dist/assets/{EscalationTimeline-D8W2LNNk.js.map → EscalationTimeline-DKyTz6sM.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationTitleSelect-DLK8NWMp.js → EscalationTitleSelect-CzKfavri.js} +2 -2
- package/dashboard/dist/assets/{EscalationTitleSelect-DLK8NWMp.js.map → EscalationTitleSelect-CzKfavri.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-CW57FaP9.js → EscalationsOverview-Tdu3Yx2c.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-CW57FaP9.js.map → EscalationsOverview-Tdu3Yx2c.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-D1ctWhKf.js → EventTable-DiIxOJwO.js} +2 -2
- package/dashboard/dist/assets/{EventTable-D1ctWhKf.js.map → EventTable-DiIxOJwO.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-C-iur-Nj.js → FilterBar-CvMBCVIo.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-C-iur-Nj.js.map → FilterBar-CvMBCVIo.js.map} +1 -1
- package/dashboard/dist/assets/{GraphInvokePage-CcA_44M4.js → GraphInvokePage-DO-yyhi6.js} +2 -2
- package/dashboard/dist/assets/{GraphInvokePage-CcA_44M4.js.map → GraphInvokePage-DO-yyhi6.js.map} +1 -1
- package/dashboard/dist/assets/{HomePage-Dc085ghJ.js → HomePage-DSS3eHR2.js} +2 -2
- package/dashboard/dist/assets/{HomePage-Dc085ghJ.js.map → HomePage-DSS3eHR2.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-h_ziBt4O.js → ListToolbar-C3-Tqqub.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-h_ziBt4O.js.map → ListToolbar-C3-Tqqub.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-qXXhbNWV.js → McpOverview-DEJmsdVi.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-qXXhbNWV.js.map → McpOverview-DEJmsdVi.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-SEzSbZrd.js → McpQueryDetailPage-DYJr16l7.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-SEzSbZrd.js.map → McpQueryDetailPage-DYJr16l7.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-Cy0V0kv9.js → McpQueryPage-BBcG_UuU.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-Cy0V0kv9.js.map → McpQueryPage-BBcG_UuU.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-DjJO5vSb.js → McpRunDetailPage-C6xw0kBg.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-DjJO5vSb.js.map → McpRunDetailPage-C6xw0kBg.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-BfjiJ8mM.js → McpRunsPage-CRQqrF4Q.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-BfjiJ8mM.js.map → McpRunsPage-CRQqrF4Q.js.map} +1 -1
- package/dashboard/dist/assets/{OperationsPage-dJcER0T_.js → OperationsPage-Dlfwzf-0.js} +2 -2
- package/dashboard/dist/assets/{OperationsPage-dJcER0T_.js.map → OperationsPage-Dlfwzf-0.js.map} +1 -1
- package/dashboard/dist/assets/{OperatorDashboard-zCkW4eqk.js → OperatorDashboard-DoiDGZ9R.js} +2 -2
- package/dashboard/dist/assets/{OperatorDashboard-zCkW4eqk.js.map → OperatorDashboard-DoiDGZ9R.js.map} +1 -1
- package/dashboard/dist/assets/{PersonaDetailPage-Cx6L3Jvu.js → PersonaDetailPage-BzbA4Prr.js} +2 -2
- package/dashboard/dist/assets/{PersonaDetailPage-Cx6L3Jvu.js.map → PersonaDetailPage-BzbA4Prr.js.map} +1 -1
- package/dashboard/dist/assets/{PersonasPage-DOgGUlJl.js → PersonasPage-B36yn4hU.js} +2 -2
- package/dashboard/dist/assets/{PersonasPage-DOgGUlJl.js.map → PersonasPage-B36yn4hU.js.map} +1 -1
- package/dashboard/dist/assets/{PortalPage-BKuL1BeJ.js → PortalPage-BkD4YfDf.js} +2 -2
- package/dashboard/dist/assets/{PortalPage-BKuL1BeJ.js.map → PortalPage-BkD4YfDf.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-BFcFSDUv.js → ProcessDetailPage-BT0eiBWY.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-BFcFSDUv.js.map → ProcessDetailPage-BT0eiBWY.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-BaHV2cXp.js → ProcessesListPage-BEqeeNae.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-BaHV2cXp.js.map → ProcessesListPage-BEqeeNae.js.map} +1 -1
- package/dashboard/dist/assets/{ResolverForm-Bgc0Zrya.js → ResolverForm-BwgjIX97.js} +2 -2
- package/dashboard/dist/assets/{ResolverForm-Bgc0Zrya.js.map → ResolverForm-BwgjIX97.js.map} +1 -1
- package/dashboard/dist/assets/{RoleDetailPage-BPY6i3CU.js → RoleDetailPage-BFuLNJXa.js} +2 -2
- package/dashboard/dist/assets/{RoleDetailPage-BPY6i3CU.js.map → RoleDetailPage-BFuLNJXa.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-DSqqKPbv.js → RolesPage-80quJU5-.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-DSqqKPbv.js.map → RolesPage-80quJU5-.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-B29iWwel.js → RunAsSelector-BoePhWVD.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-B29iWwel.js.map → RunAsSelector-BoePhWVD.js.map} +1 -1
- package/dashboard/dist/assets/{ScanCodesPage-S8aAJfnC.js → ScanCodesPage-Cu1bKEix.js} +2 -2
- package/dashboard/dist/assets/{ScanCodesPage-S8aAJfnC.js.map → ScanCodesPage-Cu1bKEix.js.map} +1 -1
- package/dashboard/dist/assets/ScanSchemeDetailPage-D9AbS6UY.js +2 -0
- package/dashboard/dist/assets/ScanSchemeDetailPage-D9AbS6UY.js.map +1 -0
- package/dashboard/dist/assets/{ScanStationPage-R9t1-CeQ.js → ScanStationPage-gcZGefvT.js} +2 -2
- package/dashboard/dist/assets/{ScanStationPage-R9t1-CeQ.js.map → ScanStationPage-gcZGefvT.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-CkW_A507.js → StickyPagination-9ITrei_d.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-CkW_A507.js.map → StickyPagination-9ITrei_d.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-yzWX0wac.js → StreamMessageDetail-BkYvEHFY.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-yzWX0wac.js.map → StreamMessageDetail-BkYvEHFY.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-Cf4DXFxj.js → SwimlaneTimeline-B1rotFix.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-Cf4DXFxj.js.map → SwimlaneTimeline-B1rotFix.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-DCDcEps9.js → TaskDetailPage-zhn_U_eC.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-DCDcEps9.js.map → TaskDetailPage-zhn_U_eC.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-BBATgpf7.js → TasksListPage-CNbNeagx.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-BBATgpf7.js.map → TasksListPage-CNbNeagx.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-CSNVEjch.js → TimeAgo-0YVMBwls.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-CSNVEjch.js.map → TimeAgo-0YVMBwls.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-Du1nBrPn.js → TimestampCell-DB7r3np8.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-Du1nBrPn.js.map → TimestampCell-DB7r3np8.js.map} +1 -1
- package/dashboard/dist/assets/{ToolTestPanel-CF-h_5Rg.js → ToolTestPanel-BLfA02wv.js} +2 -2
- package/dashboard/dist/assets/{ToolTestPanel-CF-h_5Rg.js.map → ToolTestPanel-BLfA02wv.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-Dr1UmWcp.js → TopicDetailPage-eAqPKShq.js} +2 -2
- package/dashboard/dist/assets/{TopicDetailPage-Dr1UmWcp.js.map → TopicDetailPage-eAqPKShq.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-CUUo-Ylf.js → TopicsPage-BNNWD-zl.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-CUUo-Ylf.js.map → TopicsPage-BNNWD-zl.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-kBh1dc39.js → UserName-Pw46tO_k.js} +2 -2
- package/dashboard/dist/assets/{UserName-kBh1dc39.js.map → UserName-Pw46tO_k.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-CCRSbnDx.js → WorkflowExecutionPage-DvA51lT3.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-CCRSbnDx.js.map → WorkflowExecutionPage-DvA51lT3.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-BNQVvyek.js → WorkflowsDashboard-DFDTwnhn.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-BNQVvyek.js.map → WorkflowsDashboard-DFDTwnhn.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-DswubNJN.js → WorkflowsOverview-5i2Tcy-p.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-DswubNJN.js.map → WorkflowsOverview-5i2Tcy-p.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Cw9Dlmup.js → YamlWorkflowDetailPage-p4VEYZS0.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Cw9Dlmup.js.map → YamlWorkflowDetailPage-p4VEYZS0.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-DB8xnIXy.js → YamlWorkflowsPage-Cq-hMVxl.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-DB8xnIXy.js.map → YamlWorkflowsPage-Cq-hMVxl.js.map} +1 -1
- package/dashboard/dist/assets/{agents-BwEnf6N9.js → agents-EyBPJMYa.js} +2 -2
- package/dashboard/dist/assets/{agents-BwEnf6N9.js.map → agents-EyBPJMYa.js.map} +1 -1
- package/dashboard/dist/assets/{bots-CCmJTT2u.js → bots-DX6jjqtF.js} +2 -2
- package/dashboard/dist/assets/{bots-CCmJTT2u.js.map → bots-DX6jjqtF.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-BZHgp_nh.js → capabilities-ZdLv9xBQ.js} +2 -2
- package/dashboard/dist/assets/{capabilities-BZHgp_nh.js.map → capabilities-ZdLv9xBQ.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-CyfwUlFA.js → controlplane-CpvZaJuw.js} +2 -2
- package/dashboard/dist/assets/{controlplane-CyfwUlFA.js.map → controlplane-CpvZaJuw.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-columns-BJPTNmLW.js → escalation-columns-Mvsze5eV.js} +2 -2
- package/dashboard/dist/assets/{escalation-columns-BJPTNmLW.js.map → escalation-columns-Mvsze5eV.js.map} +1 -1
- package/dashboard/dist/assets/{index-CDrqqbSR.js → index-B_GT23TE.js} +3 -3
- package/dashboard/dist/assets/{index-CDrqqbSR.js.map → index-B_GT23TE.js.map} +1 -1
- package/dashboard/dist/assets/{index-CVwzCZ43.js → index-BbCjGO3M.js} +2 -2
- package/dashboard/dist/assets/{index-CVwzCZ43.js.map → index-BbCjGO3M.js.map} +1 -1
- package/dashboard/dist/assets/{index-CuVkSmj5.js → index-Bhb89oHH.js} +2 -2
- package/dashboard/dist/assets/{index-CuVkSmj5.js.map → index-Bhb89oHH.js.map} +1 -1
- package/dashboard/dist/assets/{index-3gbd5neL.js → index-CgUcYveM.js} +33 -33
- package/dashboard/dist/assets/index-CgUcYveM.js.map +1 -0
- package/dashboard/dist/assets/{index-BAAVTyZ-.js → index-Cn8uJsd7.js} +2 -2
- package/dashboard/dist/assets/{index-BAAVTyZ-.js.map → index-Cn8uJsd7.js.map} +1 -1
- package/dashboard/dist/assets/{index-C7KHqOTQ.js → index-D-Xs4rAW.js} +2 -2
- package/dashboard/dist/assets/{index-C7KHqOTQ.js.map → index-D-Xs4rAW.js.map} +1 -1
- package/dashboard/dist/assets/{index-DZ8X_Gp4.js → index-DGmzBY9D.js} +2 -2
- package/dashboard/dist/assets/{index-DZ8X_Gp4.js.map → index-DGmzBY9D.js.map} +1 -1
- package/dashboard/dist/assets/{index-DBWS5QL8.js → index-DZhtP2Ok.js} +2 -2
- package/dashboard/dist/assets/{index-DBWS5QL8.js.map → index-DZhtP2Ok.js.map} +1 -1
- package/dashboard/dist/assets/{index-ClVbfe4z.js → index-DkrBFFSO.js} +2 -2
- package/dashboard/dist/assets/{index-ClVbfe4z.js.map → index-DkrBFFSO.js.map} +1 -1
- package/dashboard/dist/assets/{index-BC6Jenlo.js → index-Eo-l3Lqo.js} +2 -2
- package/dashboard/dist/assets/{index-BC6Jenlo.js.map → index-Eo-l3Lqo.js.map} +1 -1
- package/dashboard/dist/assets/{index-DIWCI6HC.js → index-PfSRKerc.js} +2 -2
- package/dashboard/dist/assets/{index-DIWCI6HC.js.map → index-PfSRKerc.js.map} +1 -1
- package/dashboard/dist/assets/{index-DAuX_PlL.js → index-oFKUFGQL.js} +2 -2
- package/dashboard/dist/assets/{index-DAuX_PlL.js.map → index-oFKUFGQL.js.map} +1 -1
- package/dashboard/dist/assets/{index-CaGF6TCC.js → index-z5Hpeidu.js} +2 -2
- package/dashboard/dist/assets/{index-CaGF6TCC.js.map → index-z5Hpeidu.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-CqyLhUMg.js → knowledge-CgloEkaf.js} +2 -2
- package/dashboard/dist/assets/{knowledge-CqyLhUMg.js.map → knowledge-CgloEkaf.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-Cvu6bFYH.js → mcp-Bix7QYO7.js} +2 -2
- package/dashboard/dist/assets/{mcp-Cvu6bFYH.js.map → mcp-Bix7QYO7.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-qC6A3e9l.js → mcp-query-o-sGX2ST.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-qC6A3e9l.js.map → mcp-query-o-sGX2ST.js.map} +1 -1
- package/dashboard/dist/assets/{personas-BKN_lJuV.js → personas-30azkJ_s.js} +2 -2
- package/dashboard/dist/assets/{personas-BKN_lJuV.js.map → personas-30azkJ_s.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-BldIfv85.js → pipelines-Bfk2GFK7.js} +2 -2
- package/dashboard/dist/assets/{pipelines-BldIfv85.js.map → pipelines-Bfk2GFK7.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-B-Uay8uL.js → tasks-CpdopewW.js} +2 -2
- package/dashboard/dist/assets/{tasks-B-Uay8uL.js.map → tasks-CpdopewW.js.map} +1 -1
- package/dashboard/dist/assets/{topics-438EQogt.js → topics--bvCV9Yp.js} +2 -2
- package/dashboard/dist/assets/{topics-438EQogt.js.map → topics--bvCV9Yp.js.map} +1 -1
- package/dashboard/dist/assets/{useDebouncedValue-Cw8hYZ8y.js → useDebouncedValue-Da0lPmj3.js} +2 -2
- package/dashboard/dist/assets/{useDebouncedValue-Cw8hYZ8y.js.map → useDebouncedValue-Da0lPmj3.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-D1218GQ8.js → useNamespace-DD_Esl6n.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-D1218GQ8.js.map → useNamespace-DD_Esl6n.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-BAQf_y_U.js → useYamlActivityEvents-AeAhZJJk.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-BAQf_y_U.js.map → useYamlActivityEvents-AeAhZJJk.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-CN01gEB0.js → yaml-workflows-BHAOOGvn.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-CN01gEB0.js.map → yaml-workflows-BHAOOGvn.js.map} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/docs/accumulator.md +3 -3
- package/docs/api/http/escalations.md +2 -1
- package/docs/api/sdk/escalations.md +3 -2
- package/docs/scan-codes.md +20 -9
- package/package.json +1 -1
- package/dashboard/dist/assets/ScanSchemeDetailPage-CUBRAtmJ.js +0 -2
- package/dashboard/dist/assets/ScanSchemeDetailPage-CUBRAtmJ.js.map +0 -1
- package/dashboard/dist/assets/index-3gbd5neL.js.map +0 -1
|
@@ -2142,6 +2142,195 @@ export declare const ADMIN_TOOLS: ({
|
|
|
2142
2142
|
};
|
|
2143
2143
|
required: string[];
|
|
2144
2144
|
};
|
|
2145
|
+
} | {
|
|
2146
|
+
name: string;
|
|
2147
|
+
description: string;
|
|
2148
|
+
read_safe: boolean;
|
|
2149
|
+
inputSchema: {
|
|
2150
|
+
type: string;
|
|
2151
|
+
properties: {
|
|
2152
|
+
id: {
|
|
2153
|
+
type: string;
|
|
2154
|
+
};
|
|
2155
|
+
signalKey: {
|
|
2156
|
+
type: string;
|
|
2157
|
+
};
|
|
2158
|
+
status?: undefined;
|
|
2159
|
+
workflow_type?: undefined;
|
|
2160
|
+
workflow_id?: undefined;
|
|
2161
|
+
origin_id?: undefined;
|
|
2162
|
+
limit?: undefined;
|
|
2163
|
+
offset?: undefined;
|
|
2164
|
+
role?: undefined;
|
|
2165
|
+
type?: undefined;
|
|
2166
|
+
subtype?: undefined;
|
|
2167
|
+
assigned_to?: undefined;
|
|
2168
|
+
search?: undefined;
|
|
2169
|
+
priority?: undefined;
|
|
2170
|
+
sort_by?: undefined;
|
|
2171
|
+
order?: undefined;
|
|
2172
|
+
period?: undefined;
|
|
2173
|
+
duration_minutes?: undefined;
|
|
2174
|
+
resolverPayload?: undefined;
|
|
2175
|
+
itemKey?: undefined;
|
|
2176
|
+
payload?: undefined;
|
|
2177
|
+
metadata?: undefined;
|
|
2178
|
+
reciprocal?: undefined;
|
|
2179
|
+
targetRole?: undefined;
|
|
2180
|
+
ids?: undefined;
|
|
2181
|
+
hint?: undefined;
|
|
2182
|
+
available?: undefined;
|
|
2183
|
+
facets?: undefined;
|
|
2184
|
+
orderBy?: undefined;
|
|
2185
|
+
query?: undefined;
|
|
2186
|
+
durationMinutes?: undefined;
|
|
2187
|
+
sizeFacet?: undefined;
|
|
2188
|
+
allOrNone?: undefined;
|
|
2189
|
+
groupBy?: undefined;
|
|
2190
|
+
measure?: undefined;
|
|
2191
|
+
distinctBy?: undefined;
|
|
2192
|
+
states?: undefined;
|
|
2193
|
+
liveStatuses?: undefined;
|
|
2194
|
+
facet?: undefined;
|
|
2195
|
+
window?: undefined;
|
|
2196
|
+
select?: undefined;
|
|
2197
|
+
key?: undefined;
|
|
2198
|
+
value?: undefined;
|
|
2199
|
+
assignee?: undefined;
|
|
2200
|
+
provisionIfAbsent?: undefined;
|
|
2201
|
+
targetUserId?: undefined;
|
|
2202
|
+
reassign?: undefined;
|
|
2203
|
+
invocable?: undefined;
|
|
2204
|
+
task_queue?: undefined;
|
|
2205
|
+
default_role?: undefined;
|
|
2206
|
+
description?: undefined;
|
|
2207
|
+
execute_as?: undefined;
|
|
2208
|
+
roles?: undefined;
|
|
2209
|
+
invocation_roles?: undefined;
|
|
2210
|
+
consumes?: undefined;
|
|
2211
|
+
tool_tags?: undefined;
|
|
2212
|
+
cron_schedule?: undefined;
|
|
2213
|
+
envelope_schema?: undefined;
|
|
2214
|
+
input_schema?: undefined;
|
|
2215
|
+
input_lookups?: undefined;
|
|
2216
|
+
icon?: undefined;
|
|
2217
|
+
read_safe?: undefined;
|
|
2218
|
+
include_system?: undefined;
|
|
2219
|
+
data?: undefined;
|
|
2220
|
+
options?: undefined;
|
|
2221
|
+
app_id?: undefined;
|
|
2222
|
+
tags?: undefined;
|
|
2223
|
+
name?: undefined;
|
|
2224
|
+
auto_connect?: undefined;
|
|
2225
|
+
source_workflow_id?: undefined;
|
|
2226
|
+
workflow_name?: undefined;
|
|
2227
|
+
compilation_feedback?: undefined;
|
|
2228
|
+
sync?: undefined;
|
|
2229
|
+
timeout?: undefined;
|
|
2230
|
+
external_id?: undefined;
|
|
2231
|
+
display_name?: undefined;
|
|
2232
|
+
email?: undefined;
|
|
2233
|
+
user_id?: undefined;
|
|
2234
|
+
set?: undefined;
|
|
2235
|
+
remove?: undefined;
|
|
2236
|
+
rename?: undefined;
|
|
2237
|
+
source_role?: undefined;
|
|
2238
|
+
target_role?: undefined;
|
|
2239
|
+
title?: undefined;
|
|
2240
|
+
form_schema?: undefined;
|
|
2241
|
+
metadata_schema?: undefined;
|
|
2242
|
+
properties?: undefined;
|
|
2243
|
+
ops_visible?: undefined;
|
|
2244
|
+
ops_home_default?: undefined;
|
|
2245
|
+
parent_role?: undefined;
|
|
2246
|
+
sla_minutes?: undefined;
|
|
2247
|
+
target_per_hour?: undefined;
|
|
2248
|
+
worker_count?: undefined;
|
|
2249
|
+
priority_threshold_minutes?: undefined;
|
|
2250
|
+
priority_facet?: undefined;
|
|
2251
|
+
entity_facet?: undefined;
|
|
2252
|
+
entity_state_source?: undefined;
|
|
2253
|
+
upstream_roles?: undefined;
|
|
2254
|
+
list_schema?: undefined;
|
|
2255
|
+
default_pins?: undefined;
|
|
2256
|
+
portals?: undefined;
|
|
2257
|
+
change_summary?: undefined;
|
|
2258
|
+
version?: undefined;
|
|
2259
|
+
relationship?: undefined;
|
|
2260
|
+
max_events?: undefined;
|
|
2261
|
+
include?: undefined;
|
|
2262
|
+
verbosity?: undefined;
|
|
2263
|
+
idle_minutes?: undefined;
|
|
2264
|
+
within_hours?: undefined;
|
|
2265
|
+
expire?: undefined;
|
|
2266
|
+
jobs?: undefined;
|
|
2267
|
+
streams?: undefined;
|
|
2268
|
+
entities?: undefined;
|
|
2269
|
+
prune_transient?: undefined;
|
|
2270
|
+
knowledge_domain?: undefined;
|
|
2271
|
+
goals?: undefined;
|
|
2272
|
+
rules?: undefined;
|
|
2273
|
+
schedules?: undefined;
|
|
2274
|
+
subscriptions?: undefined;
|
|
2275
|
+
agent_id?: undefined;
|
|
2276
|
+
topic?: undefined;
|
|
2277
|
+
reaction_type?: undefined;
|
|
2278
|
+
pipeline_id?: undefined;
|
|
2279
|
+
mcp_prompt?: undefined;
|
|
2280
|
+
input_mapping?: undefined;
|
|
2281
|
+
filter?: undefined;
|
|
2282
|
+
scopes?: undefined;
|
|
2283
|
+
expires_at?: undefined;
|
|
2284
|
+
key_id?: undefined;
|
|
2285
|
+
delay?: undefined;
|
|
2286
|
+
appId?: undefined;
|
|
2287
|
+
throttle?: undefined;
|
|
2288
|
+
guid?: undefined;
|
|
2289
|
+
scope?: undefined;
|
|
2290
|
+
duration?: undefined;
|
|
2291
|
+
stream?: undefined;
|
|
2292
|
+
namespace?: undefined;
|
|
2293
|
+
source?: undefined;
|
|
2294
|
+
stream_name?: undefined;
|
|
2295
|
+
msg_type?: undefined;
|
|
2296
|
+
jid?: undefined;
|
|
2297
|
+
aid?: undefined;
|
|
2298
|
+
entity?: undefined;
|
|
2299
|
+
job_id?: undefined;
|
|
2300
|
+
category?: undefined;
|
|
2301
|
+
payload_schema?: undefined;
|
|
2302
|
+
example_payload?: undefined;
|
|
2303
|
+
allow?: undefined;
|
|
2304
|
+
block?: undefined;
|
|
2305
|
+
values?: undefined;
|
|
2306
|
+
excludeSystem?: undefined;
|
|
2307
|
+
omitResults?: undefined;
|
|
2308
|
+
mode?: undefined;
|
|
2309
|
+
maxDepth?: undefined;
|
|
2310
|
+
code?: undefined;
|
|
2311
|
+
actingToken?: undefined;
|
|
2312
|
+
previousActingToken?: undefined;
|
|
2313
|
+
schemeVersion?: undefined;
|
|
2314
|
+
stepIndex?: undefined;
|
|
2315
|
+
choiceIndex?: undefined;
|
|
2316
|
+
escalationId?: undefined;
|
|
2317
|
+
target_facet?: undefined;
|
|
2318
|
+
encoding?: undefined;
|
|
2319
|
+
delimiter?: undefined;
|
|
2320
|
+
target_length?: undefined;
|
|
2321
|
+
kind?: undefined;
|
|
2322
|
+
grant_ttl_seconds?: undefined;
|
|
2323
|
+
grant_max_uses?: undefined;
|
|
2324
|
+
enabled?: undefined;
|
|
2325
|
+
scheme_version?: undefined;
|
|
2326
|
+
steps?: undefined;
|
|
2327
|
+
fallback?: undefined;
|
|
2328
|
+
notPrimed?: undefined;
|
|
2329
|
+
body?: undefined;
|
|
2330
|
+
layout?: undefined;
|
|
2331
|
+
};
|
|
2332
|
+
required?: undefined;
|
|
2333
|
+
};
|
|
2145
2334
|
} | {
|
|
2146
2335
|
name: string;
|
|
2147
2336
|
description: string;
|
|
@@ -18,7 +18,7 @@ exports.ADMIN_TOOLS = [
|
|
|
18
18
|
{ name: 'resolve_by_signal_key', description: 'Resolve an efficient (atomic) escalation directly by its signal_key and resume the waiting workflow in place.', read_safe: false, inputSchema: { type: 'object', properties: { signalKey: { type: 'string' }, resolverPayload: { type: 'object' } }, required: ['signalKey', 'resolverPayload'] } },
|
|
19
19
|
{ name: 'accumulate_item', description: 'Add ONE item to an open accumulator escalation; the add that reaches max completes the row and wakes the waiting workflow with the ordered collection. A reciprocal row is written in the same statement, both or neither.', read_safe: false, inputSchema: { type: 'object', properties: { id: { type: 'string' }, itemKey: { type: 'string' }, payload: { type: 'object' }, metadata: { type: 'object' }, reciprocal: { type: 'object', properties: { id: { type: 'string' }, signalKey: { type: 'string' }, key: { type: 'string' }, value: { type: 'string' }, payload: { type: 'object' } } } }, required: ['id', 'itemKey'] } },
|
|
20
20
|
{ name: 'remove_item', description: 'Remove ONE held item from a pending open accumulator escalation without waking the workflow.', read_safe: false, inputSchema: { type: 'object', properties: { id: { type: 'string' }, itemKey: { type: 'string' }, reciprocal: { type: 'object', properties: { id: { type: 'string' }, signalKey: { type: 'string' }, key: { type: 'string' }, value: { type: 'string' } } } }, required: ['id', 'itemKey'] } },
|
|
21
|
-
{ name: 'get_escalation_items', description: 'The held items of an accumulator or batch escalation in arrival order, with the count and max.', read_safe: true, inputSchema: { type: 'object', properties: { id: { type: 'string' }
|
|
21
|
+
{ name: 'get_escalation_items', description: 'The held items of an accumulator or batch escalation in arrival order, with the count and max. Select by id or by signalKey.', read_safe: true, inputSchema: { type: 'object', properties: { id: { type: 'string' }, signalKey: { type: 'string' } } } },
|
|
22
22
|
{ name: 'escalate_escalation', description: 'Route a pending escalation to a different role per the escalation chain.', read_safe: false, inputSchema: { type: 'object', properties: { id: { type: 'string' }, targetRole: { type: 'string' } }, required: ['id', 'targetRole'] } },
|
|
23
23
|
{ name: 'cancel_escalation', description: 'Permanently cancel a pending escalation (e.g. its workflow has terminated). Preserved for audit.', read_safe: false, inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } },
|
|
24
24
|
{ name: 'bulk_cancel', description: 'Cancel multiple pending escalations in a single operation.', read_safe: false, inputSchema: { type: 'object', properties: { ids: { type: 'array', items: { type: 'string' } } }, required: ['ids'] } },
|
package/build/types/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ export type { DelegationTokenPayload, ToolAuthContext, ServiceTokenRecord, } fro
|
|
|
25
25
|
export type { ToolContext, ToolPrincipal, ToolCredentials, ToolTrace, } from './tool-context';
|
|
26
26
|
export type { LTOAuthProviderConfig, LTOAuthStartConfig, LTOAuthUserInfo, LTDecryptedToken, LTOAuthTokenRecord, } from './oauth';
|
|
27
27
|
export type { LTApiResult, LTApiAuth, } from './sdk';
|
|
28
|
-
export type { ScanEncoding, ScanSchemeKind, ScanVerb, ScanOutcome, ScanAvailability, ScanCardinality, ScanScheme, ScanStepQuery, ScanStepParams, ScanStep, ScanRuleFallback, ScanRule, ParsedScanCode, ScanExecuteRequest, ScanPendingAction, ScanExecuteResponse, } from './scan-code';
|
|
28
|
+
export type { ScanEncoding, ScanSchemeKind, ScanVerb, ScanTemplateBag, ScanOutcome, ScanAvailability, ScanCardinality, ScanScheme, ScanStepQuery, ScanStepParams, ScanStep, ScanRuleFallback, ScanRule, ParsedScanCode, ScanExecuteRequest, ScanPendingAction, ScanExecuteResponse, } from './scan-code';
|
|
29
29
|
export type { ScanChoice, ScanChoiceExecuteRequest, ScanPresentedChoice, } from './scan-choice';
|
|
30
|
-
export { SCAN_ENCODINGS, SCAN_SCHEME_KINDS, SCAN_VERBS, SCAN_MUTATING_VERBS, SCAN_OUTCOMES, SCAN_AVAILABILITY, SCAN_CARDINALITY, SCAN_PROVENANCE_KEYS, SCAN_TEMPLATE_TOKENS, ACTING_IDENTITY_LABEL, } from './scan-code';
|
|
30
|
+
export { SCAN_ENCODINGS, SCAN_SCHEME_KINDS, SCAN_VERBS, SCAN_MUTATING_VERBS, SCAN_OUTCOMES, SCAN_AVAILABILITY, SCAN_CARDINALITY, SCAN_PROVENANCE_KEYS, SCAN_TEMPLATE_TOKENS, SCAN_TEMPLATE_BAGS, ACTING_IDENTITY_LABEL, } from './scan-code';
|
|
31
31
|
export type { LTAgent, LTAgentStatus, LTAgentStats, AgentCapability, AgentBehaviors, AgentSchedule, AgentTrigger, } from './agent';
|
|
32
32
|
export { WORKFLOW_ICONS, isWorkflowIcon } from './workflow-icons';
|
|
33
33
|
export type { WorkflowIconName } from './workflow-icons';
|
package/build/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWorkflowIcon = exports.WORKFLOW_ICONS = exports.ACTING_IDENTITY_LABEL = exports.SCAN_TEMPLATE_TOKENS = exports.SCAN_PROVENANCE_KEYS = exports.SCAN_CARDINALITY = exports.SCAN_AVAILABILITY = exports.SCAN_OUTCOMES = exports.SCAN_MUTATING_VERBS = exports.SCAN_VERBS = exports.SCAN_SCHEME_KINDS = exports.SCAN_ENCODINGS = exports.GROUPABLE_COLUMNS = exports.ACCUMULATOR_RESULT_KEYS = exports.ESCALATION_ACCUMULATE_KEYS = exports.ESCALATION_BATCH_KEYS = exports.ESCALATION_METADATA_KEYS = exports.isAvailable = exports.isEffectivelyClaimed = void 0;
|
|
3
|
+
exports.isWorkflowIcon = exports.WORKFLOW_ICONS = exports.ACTING_IDENTITY_LABEL = exports.SCAN_TEMPLATE_BAGS = exports.SCAN_TEMPLATE_TOKENS = exports.SCAN_PROVENANCE_KEYS = exports.SCAN_CARDINALITY = exports.SCAN_AVAILABILITY = exports.SCAN_OUTCOMES = exports.SCAN_MUTATING_VERBS = exports.SCAN_VERBS = exports.SCAN_SCHEME_KINDS = exports.SCAN_ENCODINGS = exports.GROUPABLE_COLUMNS = exports.ACCUMULATOR_RESULT_KEYS = exports.ESCALATION_ACCUMULATE_KEYS = exports.ESCALATION_BATCH_KEYS = exports.ESCALATION_METADATA_KEYS = exports.isAvailable = exports.isEffectivelyClaimed = void 0;
|
|
4
4
|
var escalation_1 = require("./escalation");
|
|
5
5
|
Object.defineProperty(exports, "isEffectivelyClaimed", { enumerable: true, get: function () { return escalation_1.isEffectivelyClaimed; } });
|
|
6
6
|
Object.defineProperty(exports, "isAvailable", { enumerable: true, get: function () { return escalation_1.isAvailable; } });
|
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "SCAN_AVAILABILITY", { enumerable: true, get: fun
|
|
|
20
20
|
Object.defineProperty(exports, "SCAN_CARDINALITY", { enumerable: true, get: function () { return scan_code_1.SCAN_CARDINALITY; } });
|
|
21
21
|
Object.defineProperty(exports, "SCAN_PROVENANCE_KEYS", { enumerable: true, get: function () { return scan_code_1.SCAN_PROVENANCE_KEYS; } });
|
|
22
22
|
Object.defineProperty(exports, "SCAN_TEMPLATE_TOKENS", { enumerable: true, get: function () { return scan_code_1.SCAN_TEMPLATE_TOKENS; } });
|
|
23
|
+
Object.defineProperty(exports, "SCAN_TEMPLATE_BAGS", { enumerable: true, get: function () { return scan_code_1.SCAN_TEMPLATE_BAGS; } });
|
|
23
24
|
Object.defineProperty(exports, "ACTING_IDENTITY_LABEL", { enumerable: true, get: function () { return scan_code_1.ACTING_IDENTITY_LABEL; } });
|
|
24
25
|
var workflow_icons_1 = require("./workflow-icons");
|
|
25
26
|
Object.defineProperty(exports, "WORKFLOW_ICONS", { enumerable: true, get: function () { return workflow_icons_1.WORKFLOW_ICONS; } });
|
|
@@ -81,6 +81,13 @@ export declare const SCAN_OUTCOMES: {
|
|
|
81
81
|
readonly NOT_PRIMED: "not_primed";
|
|
82
82
|
/** A PRESENT step located its row; the response carries reality + choices. */
|
|
83
83
|
readonly CHOICES: "choices";
|
|
84
|
+
/**
|
|
85
|
+
* An accumulate step in item mode located the item's row, but no pending
|
|
86
|
+
* container carries its facet: the previous container closed and its
|
|
87
|
+
* successor has not parked yet. The response carries the item row and the
|
|
88
|
+
* facet so the station can say "container closing, scan again".
|
|
89
|
+
*/
|
|
90
|
+
readonly NO_OPEN_CONTAINER: "no_open_container";
|
|
84
91
|
};
|
|
85
92
|
export type ScanOutcome = (typeof SCAN_OUTCOMES)[keyof typeof SCAN_OUTCOMES];
|
|
86
93
|
export declare const SCAN_AVAILABILITY: {
|
|
@@ -106,12 +113,24 @@ export declare const SCAN_PROVENANCE_KEYS: {
|
|
|
106
113
|
};
|
|
107
114
|
/** The ephemeral-keystore label acting-identity grants are minted under. */
|
|
108
115
|
export declare const ACTING_IDENTITY_LABEL = "acting_identity";
|
|
109
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Template tokens usable inside step params (item key, resolver payload,
|
|
118
|
+
* metadata). Beyond the three scan tokens, `{claim.<facet>}` reads the
|
|
119
|
+
* acting user's single live claim and `{item.<facet>}` reads the row an
|
|
120
|
+
* item-mode accumulate step located; a token that cannot resolve fails the
|
|
121
|
+
* step instead of writing the literal.
|
|
122
|
+
*/
|
|
110
123
|
export declare const SCAN_TEMPLATE_TOKENS: {
|
|
111
124
|
readonly TARGET: "{scan.target}";
|
|
112
125
|
readonly CATEGORY: "{scan.category}";
|
|
113
126
|
readonly SCANNED_AT: "{scan.scannedAt}";
|
|
114
127
|
};
|
|
128
|
+
/** Facet-bag token prefixes: `{claim.orderId}`, `{item.binKey}`. */
|
|
129
|
+
export declare const SCAN_TEMPLATE_BAGS: {
|
|
130
|
+
readonly CLAIM: "claim";
|
|
131
|
+
readonly ITEM: "item";
|
|
132
|
+
};
|
|
133
|
+
export type ScanTemplateBag = (typeof SCAN_TEMPLATE_BAGS)[keyof typeof SCAN_TEMPLATE_BAGS];
|
|
115
134
|
export interface ScanScheme {
|
|
116
135
|
version: number;
|
|
117
136
|
name: string;
|
|
@@ -263,6 +282,11 @@ export interface ScanExecuteResponse {
|
|
|
263
282
|
notPrimed?: ScanRuleFallback;
|
|
264
283
|
/** The labeled choice set (CHOICES). */
|
|
265
284
|
choices?: ScanPresentedChoice[];
|
|
285
|
+
/** NO_OPEN_CONTAINER: the facet the located item names and no pending container carries. */
|
|
286
|
+
container?: {
|
|
287
|
+
facet: string;
|
|
288
|
+
value: string;
|
|
289
|
+
};
|
|
266
290
|
/** CHOICES: the step would auto-execute its single choice — only identity stopped it. */
|
|
267
291
|
autoSelect?: boolean;
|
|
268
292
|
/** The badged person (IDENTITY_PRIMED) — id lets the client recognize its own claims. */
|
|
@@ -274,5 +298,11 @@ export interface ScanExecuteResponse {
|
|
|
274
298
|
actingToken?: string;
|
|
275
299
|
/** Display copy of the grant's expiry (the keystore enforces it). */
|
|
276
300
|
expiresAt?: string;
|
|
301
|
+
/**
|
|
302
|
+
* IDENTITY_PRIMED: the scheme's `grant_max_uses`. `1` is a single-shot
|
|
303
|
+
* grant the client drops after the first request that carries it; `0`
|
|
304
|
+
* lives until its TTL.
|
|
305
|
+
*/
|
|
306
|
+
maxUses?: number;
|
|
277
307
|
error?: string;
|
|
278
308
|
}
|
package/build/types/scan-code.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Both indices are assigned automatically; operators name entries, not numbers.
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.SCAN_TEMPLATE_TOKENS = exports.ACTING_IDENTITY_LABEL = exports.SCAN_PROVENANCE_KEYS = exports.SCAN_CARDINALITY = exports.SCAN_AVAILABILITY = exports.SCAN_OUTCOMES = exports.SCAN_MUTATING_VERBS = exports.SCAN_VERBS = exports.SCAN_SCHEME_KINDS = exports.SCAN_ENCODINGS = void 0;
|
|
14
|
+
exports.SCAN_TEMPLATE_BAGS = exports.SCAN_TEMPLATE_TOKENS = exports.ACTING_IDENTITY_LABEL = exports.SCAN_PROVENANCE_KEYS = exports.SCAN_CARDINALITY = exports.SCAN_AVAILABILITY = exports.SCAN_OUTCOMES = exports.SCAN_MUTATING_VERBS = exports.SCAN_VERBS = exports.SCAN_SCHEME_KINDS = exports.SCAN_ENCODINGS = void 0;
|
|
15
15
|
exports.SCAN_ENCODINGS = {
|
|
16
16
|
/** Digits only, fixed widths — fits UPC-A/EAN/ITF labels. */
|
|
17
17
|
FIXED: 'fixed',
|
|
@@ -88,6 +88,13 @@ exports.SCAN_OUTCOMES = {
|
|
|
88
88
|
NOT_PRIMED: 'not_primed',
|
|
89
89
|
/** A PRESENT step located its row; the response carries reality + choices. */
|
|
90
90
|
CHOICES: 'choices',
|
|
91
|
+
/**
|
|
92
|
+
* An accumulate step in item mode located the item's row, but no pending
|
|
93
|
+
* container carries its facet: the previous container closed and its
|
|
94
|
+
* successor has not parked yet. The response carries the item row and the
|
|
95
|
+
* facet so the station can say "container closing, scan again".
|
|
96
|
+
*/
|
|
97
|
+
NO_OPEN_CONTAINER: 'no_open_container',
|
|
91
98
|
};
|
|
92
99
|
exports.SCAN_AVAILABILITY = {
|
|
93
100
|
AVAILABLE: 'available',
|
|
@@ -110,9 +117,20 @@ exports.SCAN_PROVENANCE_KEYS = {
|
|
|
110
117
|
};
|
|
111
118
|
/** The ephemeral-keystore label acting-identity grants are minted under. */
|
|
112
119
|
exports.ACTING_IDENTITY_LABEL = 'acting_identity';
|
|
113
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Template tokens usable inside step params (item key, resolver payload,
|
|
122
|
+
* metadata). Beyond the three scan tokens, `{claim.<facet>}` reads the
|
|
123
|
+
* acting user's single live claim and `{item.<facet>}` reads the row an
|
|
124
|
+
* item-mode accumulate step located; a token that cannot resolve fails the
|
|
125
|
+
* step instead of writing the literal.
|
|
126
|
+
*/
|
|
114
127
|
exports.SCAN_TEMPLATE_TOKENS = {
|
|
115
128
|
TARGET: '{scan.target}',
|
|
116
129
|
CATEGORY: '{scan.category}',
|
|
117
130
|
SCANNED_AT: '{scan.scannedAt}',
|
|
118
131
|
};
|
|
132
|
+
/** Facet-bag token prefixes: `{claim.orderId}`, `{item.binKey}`. */
|
|
133
|
+
exports.SCAN_TEMPLATE_BAGS = {
|
|
134
|
+
CLAIM: 'claim',
|
|
135
|
+
ITEM: 'item',
|
|
136
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as o}from"./vendor-query-DvWWuNIB.js";import{c as n}from"./tasks-
|
|
2
|
-
//# sourceMappingURL=AdminDashboard-
|
|
1
|
+
import{j as o}from"./vendor-query-DvWWuNIB.js";import{c as n}from"./tasks-CpdopewW.js";import{z as m,a9 as c}from"./index-CgUcYveM.js";import{u}from"./mcp-Bix7QYO7.js";import{P as d}from"./PageHeaderWithStats-CSnk1p5A.js";import"./vendor-react-_9U4mKFr.js";import"./vendor-icons-B7OcUM6b.js";function S(){var e;m();const{data:t}=n({limit:1}),{data:a}=c({status:"pending",limit:1}),{data:s}=u(),l=((e=s==null?void 0:s.servers)==null?void 0:e.filter(i=>i.status==="connected").length)??0,r=s?`${l}/${s.total}`:"—";return o.jsx("div",{children:o.jsx(d,{title:"Admin",stats:[{label:"Tasks",value:(t==null?void 0:t.total)??"—"},{label:"Pending Escalations",value:(a==null?void 0:a.total)??"—",dotClass:"bg-status-pending"},{label:"MCP Servers",value:r},{label:"System",value:"Healthy",dotClass:"bg-status-success"}]})})}export{S as AdminDashboard};
|
|
2
|
+
//# sourceMappingURL=AdminDashboard-Covdam48.js.map
|
package/dashboard/dist/assets/{AdminDashboard-uarpHB88.js.map → AdminDashboard-Covdam48.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminDashboard-
|
|
1
|
+
{"version":3,"file":"AdminDashboard-Covdam48.js","sources":["../../src/pages/admin/AdminDashboard.tsx"],"sourcesContent":["import { useTasks } from '../../api/tasks';\nimport { useEscalations } from '../../api/escalations';\nimport { useEscalationListEvents } from '../../hooks/useEventHooks';\nimport { useMcpServers } from '../../api/mcp';\nimport { PageHeaderWithStats } from '../../components/common/layout/PageHeaderWithStats';\n\nexport function AdminDashboard() {\n useEscalationListEvents();\n const { data: taskData } = useTasks({ limit: 1 });\n const { data: pendingEsc } = useEscalations({ status: 'pending', limit: 1 });\n const { data: mcpData } = useMcpServers();\n\n const connectedServers =\n mcpData?.servers?.filter((s) => s.status === 'connected').length ?? 0;\n const mcpLabel = mcpData ? `${connectedServers}/${mcpData.total}` : '—';\n\n return (\n <div>\n <PageHeaderWithStats\n title=\"Admin\"\n stats={[\n { label: 'Tasks', value: taskData?.total ?? '—' },\n { label: 'Pending Escalations', value: pendingEsc?.total ?? '—', dotClass: 'bg-status-pending' },\n { label: 'MCP Servers', value: mcpLabel },\n { label: 'System', value: 'Healthy', dotClass: 'bg-status-success' },\n ]}\n />\n </div>\n );\n}\n"],"names":["AdminDashboard","useEscalationListEvents","taskData","useTasks","pendingEsc","useEscalations","mcpData","useMcpServers","connectedServers","_a","s","mcpLabel","jsx","PageHeaderWithStats"],"mappings":"oSAMO,SAASA,GAAiB,OAC/BC,EAAA,EACA,KAAM,CAAE,KAAMC,CAAA,EAAaC,EAAS,CAAE,MAAO,EAAG,EAC1C,CAAE,KAAMC,CAAA,EAAeC,EAAe,CAAE,OAAQ,UAAW,MAAO,EAAG,EACrE,CAAE,KAAMC,CAAA,EAAYC,EAAA,EAEpBC,IACJC,EAAAH,GAAA,YAAAA,EAAS,UAAT,YAAAG,EAAkB,OAAQC,GAAMA,EAAE,SAAW,aAAa,SAAU,EAChEC,EAAWL,EAAU,GAAGE,CAAgB,IAAIF,EAAQ,KAAK,GAAK,IAEpE,aACG,MAAA,CACC,SAAAM,EAAAA,IAACC,EAAA,CACC,MAAM,QACN,MAAO,CACL,CAAE,MAAO,QAAS,OAAOX,GAAA,YAAAA,EAAU,QAAS,GAAA,EAC5C,CAAE,MAAO,sBAAuB,OAAOE,GAAA,YAAAA,EAAY,QAAS,IAAK,SAAU,mBAAA,EAC3E,CAAE,MAAO,cAAe,MAAOO,CAAA,EAC/B,CAAE,MAAO,SAAU,MAAO,UAAW,SAAU,mBAAA,CAAoB,CACrE,CAAA,EAEJ,CAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,a as f}from"./vendor-query-DvWWuNIB.js";import{a as ce,d as le,b as oe}from"./agents-BwEnf6N9.js";import{E as de,C as xe,u as pe,a as ue,b as me,c as he}from"./CronLabel-LYPxpvNN.js";import{g as fe,a as ve,c as be,y as ye}from"./index-3gbd5neL.js";import{P as ge}from"./PageHeader-Csq434-v.js";import{x as E,o as K,K as je,R as U,g as M,z as Z,ax as Y,f as V,bX as ee,ab as we}from"./vendor-icons-B7OcUM6b.js";import{g as Ne}from"./knowledge-CqyLhUMg.js";import{R as te}from"./RunAsSelector-B29iWwel.js";import{u as _e}from"./yaml-workflows-CN01gEB0.js";import{u as se}from"./capabilities-BZHgp_nh.js";import{u as ke}from"./topics-438EQogt.js";import{W as Q}from"./WorkflowPill-ZepbO_ny.js";import{e as Ce,u as Se,f as qe}from"./vendor-react-_9U4mKFr.js";import"./BotPicker-CClMby6B.js";import"./bots-CCmJTT2u.js";const X={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},Oe={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",server_id:"",tool_name:"",input_mapping:"{}",execute_as:"",enabled:!0},Ae={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""};function Re(s,a){var o,x,m;const r=(x=(o=s.behaviors)==null?void 0:o.schedules)!=null&&x.length?s.behaviors.schedules.map(i=>({cron:i.cron||"",reaction_type:i.reaction_type||"durable",workflow_type:i.workflow_type||"",pipeline_id:i.pipeline_id||"",server_id:i.server_id||"",tool_name:i.tool_name||"",envelope:i.envelope?JSON.stringify(i.envelope,null,2):"{}",execute_as:i.execute_as||""})):(m=s.behaviors)!=null&&m.cron?[{cron:s.behaviors.cron,reaction_type:"durable",workflow_type:s.workflow_type??"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""}]:[];return{name:s.id,description:s.description??"",goals:s.goals??"",rules:s.rules??"",user_id:s.user_id??"",knowledge_domain:s.knowledge_domain??"",subscriptions:a.map(i=>({id:i.id,topic:i.topic,filter:i.filter?JSON.stringify(i.filter,null,2):"",reaction_type:i.reaction_type,workflow_type:i.workflow_type??"",pipeline_id:i.pipeline_id??"",mcp_prompt:i.mcp_prompt??"",server_id:i.server_id??"",tool_name:i.tool_name??"",input_mapping:JSON.stringify(i.input_mapping??{},null,2),execute_as:i.execute_as??"",enabled:i.enabled})),schedules:r}}function Ee(s){var r;const a={};return s.schedules.length>0&&(a.schedules=s.schedules.map(o=>({cron:o.cron,reaction_type:o.reaction_type||"durable",workflow_type:o.reaction_type==="pipeline"?void 0:o.workflow_type,pipeline_id:o.reaction_type==="pipeline"?o.pipeline_id:void 0,envelope:B(o.envelope)??{},execute_as:o.execute_as||void 0})),a.cron=s.schedules[0].cron),{id:s.name,description:s.description||void 0,goals:s.goals||void 0,rules:s.rules||void 0,user_id:s.user_id||void 0,knowledge_domain:s.knowledge_domain||void 0,behaviors:a,workflow_type:((r=s.schedules[0])==null?void 0:r.workflow_type)||void 0,pipeline_id:void 0}}function $e(s){return s.subscriptions.map(a=>({id:a.id,topic:a.topic,filter:a.filter?B(a.filter):void 0,reaction_type:a.reaction_type,workflow_type:a.workflow_type||void 0,pipeline_id:a.pipeline_id||void 0,mcp_prompt:a.mcp_prompt||void 0,server_id:a.server_id||void 0,tool_name:a.tool_name||void 0,input_mapping:B(a.input_mapping)??{},execute_as:a.execute_as||void 0,enabled:a.enabled}))}function B(s){if(s.trim())try{return JSON.parse(s)}catch{return}}function Pe(s,a,r,o){let x;try{x=JSON.parse(s)}catch{x={}}const m=o.includes(a),i=r===""||r===void 0||r===null||Array.isArray(r)&&r.length===0||r==="[]";if(!m&&i){const{[a]:p,...l}=x;return JSON.stringify(l,null,2)}let u=r;if(typeof r=="string")try{const p=JSON.parse(r);Array.isArray(p)&&(u=p)}catch{}return JSON.stringify({...x,[a]:u},null,2)}const S="section-header mt-[3em] first:mt-0",P="label",_="hint",A="input",L="input-json w-full";function Ie({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Give your automation a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:identity"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Identity",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Name *"}),e.jsx("input",{type:"text",value:s.name,onChange:r=>a("name",r.target.value),placeholder:"health-monitor",className:A}),e.jsx("p",{className:_,children:"Lowercase, kebab-case. This appears everywhere."})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Description"}),e.jsx("input",{type:"text",value:s.description,onChange:r=>a("description",r.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:A}),e.jsx("p",{className:_,children:"One sentence that explains what this automation does."})]})]})}function We({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Goals define what drives the automation. Rules define what constrains it."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:motivation"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Motivation",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Goals"}),e.jsx("textarea",{value:s.goals,onChange:r=>a("goals",r.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${A} resize-none`}),e.jsx("p",{className:_,children:"Primary motivation. What the automation is trying to achieve."})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Rules"}),e.jsx("textarea",{value:s.rules,onChange:r=>a("rules",r.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${A} resize-none`}),e.jsx("p",{className:_,children:"Guardrails. What it must never do, even when goals suggest it should."})]})]})]})}function Te({form:s,set:a}){const{data:r}=Ne(),o=(r==null?void 0:r.domains)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the automation's memory. It stores context here over time."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:knowledge"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Knowledge",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Knowledge Domain"}),e.jsx("input",{type:"text",value:s.knowledge_domain,onChange:x=>a("knowledge_domain",x.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:A,list:"domain-suggestions"}),e.jsx("datalist",{id:"domain-suggestions",children:o.map(x=>e.jsx("option",{value:x.domain},x.domain))}),e.jsx("p",{className:_,children:"Choose an existing domain to share memory, or type a new name to create one."})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Existing Domains"}),e.jsx("div",{className:"space-y-0.5 mt-2",children:o.map(x=>e.jsxs("button",{type:"button",onClick:()=>a("knowledge_domain",x.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${s.knowledge_domain===x.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsx(K,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary flex-1",children:x.domain}),e.jsxs("span",{className:"text-2xs text-text-quaternary",children:[x.count," entries"]}),e.jsx("span",{className:"text-2xs text-text-quaternary",children:e.jsx(fe,{date:x.latest})})]},x.domain))})]})]})}function Me({serverId:s,toolName:a,onChange:r}){const{data:o}=se(),x=f.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(n=>n.tools))??[]},[o]),[m,i]=f.useState(!1),[u,p]=f.useState(""),l=f.useRef(null),h=f.useRef(null);f.useEffect(()=>{if(!m)return;function t(n){h.current&&!h.current.contains(n.target)&&i(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[m]);const c=a?`${a}`:"",d=m?u:c,y=f.useMemo(()=>{const t=(m?u:"").toLowerCase();return t?x.filter(n=>n.name.toLowerCase().includes(t)||n.serverName.toLowerCase().includes(t)||(n.description??"").toLowerCase().includes(t)):x},[x,u,m]),v=a?x.find(t=>t.serverId===s&&t.name===a):void 0;return e.jsxs("div",{ref:h,className:"relative",children:[e.jsx("input",{ref:l,type:"text",value:d,onFocus:()=>{i(!0),p(c)},onChange:t=>{const n=t.target.value;p(n),n||r("",""),m||i(!0)},placeholder:"Search capabilities...",className:"input font-mono text-sm w-full"}),!m&&(v==null?void 0:v.description)&&e.jsx("p",{className:"text-2xs text-text-tertiary mt-1 italic",children:v.description}),m&&y.length>0&&e.jsx("div",{className:"absolute z-[100] left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:y.map(t=>e.jsxs("button",{type:"button",onClick:()=>{r(t.serverId,t.name),p(t.name),i(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===t.serverId&&a===t.name?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-2xs font-mono text-text-primary shrink-0",children:t.name}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-2xs font-medium shrink-0 bg-accent/10 text-accent",children:[e.jsx(je,{className:"w-2 h-2",strokeWidth:1.5}),t.serverName]}),t.description&&e.jsx("span",{className:"text-2xs text-text-quaternary truncate",children:t.description})]},`${t.serverId}:${t.name}`))}),m&&y.length===0&&u&&e.jsx("div",{className:"absolute z-[100] left-0 right-0 mt-1 rounded-md border border-surface-border bg-surface shadow-lg px-3 py-4 text-center",children:e.jsxs("p",{className:"text-2xs text-text-quaternary",children:['No capabilities match "',u,'"']})})]})}const Le={durable:"Workflow",pipeline:"Pipeline",capability:"Capability",mcp_query:"MCP Query"},Je=["durable","pipeline","capability","mcp_query"];function ae({reactionType:s,onReactionTypeChange:a,workflowType:r,onWorkflowTypeChange:o,pipelineId:x,onPipelineIdChange:m,serverId:i,toolName:u,onCapabilityChange:p,mcpPrompt:l,onMcpPromptChange:h,availableTypes:c=[...Je]}){const{data:d}=ve(),y=(d??[]).filter(n=>n.invocable).map(n=>n.workflow_type),{data:v}=_e({status:"active"}),t=((v==null?void 0:v.workflows)??[]).map(n=>({id:n.id,name:n.graph_topic||n.id}));return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-1",children:c.map(n=>{const b=s===n;return e.jsx("button",{type:"button",onClick:()=>a(n),className:`px-3 py-1.5 text-2xs font-medium rounded-md transition-colors ${b?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:Le[n]},n)})}),s==="durable"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Workflow *"}),e.jsxs("select",{value:r,onChange:n=>o(n.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select workflow..."}),y.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),s==="pipeline"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Pipeline *"}),e.jsxs("select",{value:x,onChange:n=>m(n.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select pipeline..."}),t.map(n=>e.jsx("option",{value:n.id,children:n.name},n.id))]})]}),s==="capability"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Capability *"}),e.jsx(Me,{serverId:i,toolName:u,onChange:p})]}),s==="mcp_query"&&h&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Prompt *"}),e.jsx("textarea",{value:l??"",onChange:n=>h(n.target.value),placeholder:"Analyze the error and suggest remediation...",rows:3,className:"input resize-none"})]})]})}const Fe={task:"bg-status-active/10 text-status-active",workflow:"bg-accent/15 text-accent",escalation:"bg-status-warning/10 text-status-warning",activity:"bg-status-active/10 text-status-active",knowledge:"bg-accent/10 text-accent",file:"bg-status-draft/10 text-status-draft",agent:"bg-status-success/10 text-status-success",app:"bg-status-error/10 text-status-error",milestone:"bg-accent/10 text-accent"};function De({form:s,set:a}){const{data:r}=ke({limit:200}),{data:o}=se(),x=(r==null?void 0:r.topics)??[],m=f.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(n=>n.tools))??[]},[o]),[i,u]=f.useState(0),p=(t,n,b)=>{const g=[...s.subscriptions];g[t]={...g[t],[n]:b},a("subscriptions",g)},l=()=>{a("subscriptions",[...s.subscriptions,{...Oe}]),u(s.subscriptions.length)},h=t=>{a("subscriptions",s.subscriptions.filter((n,b)=>b!==t)),i>=s.subscriptions.length-1&&u(Math.max(0,s.subscriptions.length-2))},c=s.subscriptions,d=c[i],y=t=>t.topic?t.reaction_type==="durable"?!!t.workflow_type:t.reaction_type==="pipeline"?!!t.pipeline_id:t.reaction_type==="mcp_query"?!!t.mcp_prompt:t.reaction_type==="capability"?!!t.server_id&&!!t.tool_name:!1:!1,v=d?x.find(t=>t.topic===d.topic):void 0;return c.length===0?e.jsxs("div",{className:"max-w-xl",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(U,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"}),e.jsx("p",{className:"text-2xs text-text-quaternary max-w-sm mb-6",children:"Each subscription listens for a topic pattern and runs a workflow when it matches."}),e.jsxs("button",{onClick:l,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(M,{className:"w-3.5 h-3.5"})," Add first subscription"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-52 shrink-0 space-y-0.5",children:[c.map((t,n)=>e.jsxs("div",{className:`group/sub flex items-center rounded-md transition-colors ${i===n?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>u(n),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-2.5 h-2.5 rounded-full dot-ring shrink-0 ${y(t)?"bg-status-success":"bg-surface-border"}`}),e.jsx("span",{className:"text-2xs font-mono truncate",children:t.topic||"new subscription"})]}),e.jsxs("span",{className:"text-2xs text-text-quaternary ml-3",children:["→ ",t.workflow_type||t.tool_name||t.reaction_type]})]}),e.jsx("button",{onClick:b=>{b.stopPropagation(),confirm(`Remove subscription "${t.topic||"new"}"?
|
|
1
|
+
import{j as e,a as f}from"./vendor-query-DvWWuNIB.js";import{a as ce,d as le,b as oe}from"./agents-EyBPJMYa.js";import{E as de,C as xe,u as pe,a as ue,b as me,c as he}from"./CronLabel-DZiWmTwJ.js";import{g as fe,a as ve,c as be,y as ye}from"./index-CgUcYveM.js";import{P as ge}from"./PageHeader-Csq434-v.js";import{x as E,o as K,K as je,R as U,g as M,z as Z,ax as Y,f as V,bX as ee,ab as we}from"./vendor-icons-B7OcUM6b.js";import{g as Ne}from"./knowledge-CgloEkaf.js";import{R as te}from"./RunAsSelector-BoePhWVD.js";import{u as _e}from"./yaml-workflows-BHAOOGvn.js";import{u as se}from"./capabilities-ZdLv9xBQ.js";import{u as ke}from"./topics--bvCV9Yp.js";import{W as Q}from"./WorkflowPill-ZepbO_ny.js";import{e as Ce,u as Se,f as qe}from"./vendor-react-_9U4mKFr.js";import"./BotPicker-D3drO3-T.js";import"./bots-DX6jjqtF.js";const X={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},Oe={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",server_id:"",tool_name:"",input_mapping:"{}",execute_as:"",enabled:!0},Ae={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""};function Re(s,a){var o,x,m;const r=(x=(o=s.behaviors)==null?void 0:o.schedules)!=null&&x.length?s.behaviors.schedules.map(i=>({cron:i.cron||"",reaction_type:i.reaction_type||"durable",workflow_type:i.workflow_type||"",pipeline_id:i.pipeline_id||"",server_id:i.server_id||"",tool_name:i.tool_name||"",envelope:i.envelope?JSON.stringify(i.envelope,null,2):"{}",execute_as:i.execute_as||""})):(m=s.behaviors)!=null&&m.cron?[{cron:s.behaviors.cron,reaction_type:"durable",workflow_type:s.workflow_type??"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""}]:[];return{name:s.id,description:s.description??"",goals:s.goals??"",rules:s.rules??"",user_id:s.user_id??"",knowledge_domain:s.knowledge_domain??"",subscriptions:a.map(i=>({id:i.id,topic:i.topic,filter:i.filter?JSON.stringify(i.filter,null,2):"",reaction_type:i.reaction_type,workflow_type:i.workflow_type??"",pipeline_id:i.pipeline_id??"",mcp_prompt:i.mcp_prompt??"",server_id:i.server_id??"",tool_name:i.tool_name??"",input_mapping:JSON.stringify(i.input_mapping??{},null,2),execute_as:i.execute_as??"",enabled:i.enabled})),schedules:r}}function Ee(s){var r;const a={};return s.schedules.length>0&&(a.schedules=s.schedules.map(o=>({cron:o.cron,reaction_type:o.reaction_type||"durable",workflow_type:o.reaction_type==="pipeline"?void 0:o.workflow_type,pipeline_id:o.reaction_type==="pipeline"?o.pipeline_id:void 0,envelope:B(o.envelope)??{},execute_as:o.execute_as||void 0})),a.cron=s.schedules[0].cron),{id:s.name,description:s.description||void 0,goals:s.goals||void 0,rules:s.rules||void 0,user_id:s.user_id||void 0,knowledge_domain:s.knowledge_domain||void 0,behaviors:a,workflow_type:((r=s.schedules[0])==null?void 0:r.workflow_type)||void 0,pipeline_id:void 0}}function $e(s){return s.subscriptions.map(a=>({id:a.id,topic:a.topic,filter:a.filter?B(a.filter):void 0,reaction_type:a.reaction_type,workflow_type:a.workflow_type||void 0,pipeline_id:a.pipeline_id||void 0,mcp_prompt:a.mcp_prompt||void 0,server_id:a.server_id||void 0,tool_name:a.tool_name||void 0,input_mapping:B(a.input_mapping)??{},execute_as:a.execute_as||void 0,enabled:a.enabled}))}function B(s){if(s.trim())try{return JSON.parse(s)}catch{return}}function Pe(s,a,r,o){let x;try{x=JSON.parse(s)}catch{x={}}const m=o.includes(a),i=r===""||r===void 0||r===null||Array.isArray(r)&&r.length===0||r==="[]";if(!m&&i){const{[a]:p,...l}=x;return JSON.stringify(l,null,2)}let u=r;if(typeof r=="string")try{const p=JSON.parse(r);Array.isArray(p)&&(u=p)}catch{}return JSON.stringify({...x,[a]:u},null,2)}const S="section-header mt-[3em] first:mt-0",P="label",_="hint",A="input",L="input-json w-full";function Ie({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Give your automation a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:identity"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Identity",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Name *"}),e.jsx("input",{type:"text",value:s.name,onChange:r=>a("name",r.target.value),placeholder:"health-monitor",className:A}),e.jsx("p",{className:_,children:"Lowercase, kebab-case. This appears everywhere."})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Description"}),e.jsx("input",{type:"text",value:s.description,onChange:r=>a("description",r.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:A}),e.jsx("p",{className:_,children:"One sentence that explains what this automation does."})]})]})}function We({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Goals define what drives the automation. Rules define what constrains it."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:motivation"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Motivation",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Goals"}),e.jsx("textarea",{value:s.goals,onChange:r=>a("goals",r.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${A} resize-none`}),e.jsx("p",{className:_,children:"Primary motivation. What the automation is trying to achieve."})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Rules"}),e.jsx("textarea",{value:s.rules,onChange:r=>a("rules",r.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${A} resize-none`}),e.jsx("p",{className:_,children:"Guardrails. What it must never do, even when goals suggest it should."})]})]})]})}function Te({form:s,set:a}){const{data:r}=Ne(),o=(r==null?void 0:r.domains)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the automation's memory. It stores context here over time."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:knowledge"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Knowledge",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Knowledge Domain"}),e.jsx("input",{type:"text",value:s.knowledge_domain,onChange:x=>a("knowledge_domain",x.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:A,list:"domain-suggestions"}),e.jsx("datalist",{id:"domain-suggestions",children:o.map(x=>e.jsx("option",{value:x.domain},x.domain))}),e.jsx("p",{className:_,children:"Choose an existing domain to share memory, or type a new name to create one."})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:P,children:"Existing Domains"}),e.jsx("div",{className:"space-y-0.5 mt-2",children:o.map(x=>e.jsxs("button",{type:"button",onClick:()=>a("knowledge_domain",x.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${s.knowledge_domain===x.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsx(K,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary flex-1",children:x.domain}),e.jsxs("span",{className:"text-2xs text-text-quaternary",children:[x.count," entries"]}),e.jsx("span",{className:"text-2xs text-text-quaternary",children:e.jsx(fe,{date:x.latest})})]},x.domain))})]})]})}function Me({serverId:s,toolName:a,onChange:r}){const{data:o}=se(),x=f.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(n=>n.tools))??[]},[o]),[m,i]=f.useState(!1),[u,p]=f.useState(""),l=f.useRef(null),h=f.useRef(null);f.useEffect(()=>{if(!m)return;function t(n){h.current&&!h.current.contains(n.target)&&i(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[m]);const c=a?`${a}`:"",d=m?u:c,y=f.useMemo(()=>{const t=(m?u:"").toLowerCase();return t?x.filter(n=>n.name.toLowerCase().includes(t)||n.serverName.toLowerCase().includes(t)||(n.description??"").toLowerCase().includes(t)):x},[x,u,m]),v=a?x.find(t=>t.serverId===s&&t.name===a):void 0;return e.jsxs("div",{ref:h,className:"relative",children:[e.jsx("input",{ref:l,type:"text",value:d,onFocus:()=>{i(!0),p(c)},onChange:t=>{const n=t.target.value;p(n),n||r("",""),m||i(!0)},placeholder:"Search capabilities...",className:"input font-mono text-sm w-full"}),!m&&(v==null?void 0:v.description)&&e.jsx("p",{className:"text-2xs text-text-tertiary mt-1 italic",children:v.description}),m&&y.length>0&&e.jsx("div",{className:"absolute z-[100] left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:y.map(t=>e.jsxs("button",{type:"button",onClick:()=>{r(t.serverId,t.name),p(t.name),i(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===t.serverId&&a===t.name?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-2xs font-mono text-text-primary shrink-0",children:t.name}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-2xs font-medium shrink-0 bg-accent/10 text-accent",children:[e.jsx(je,{className:"w-2 h-2",strokeWidth:1.5}),t.serverName]}),t.description&&e.jsx("span",{className:"text-2xs text-text-quaternary truncate",children:t.description})]},`${t.serverId}:${t.name}`))}),m&&y.length===0&&u&&e.jsx("div",{className:"absolute z-[100] left-0 right-0 mt-1 rounded-md border border-surface-border bg-surface shadow-lg px-3 py-4 text-center",children:e.jsxs("p",{className:"text-2xs text-text-quaternary",children:['No capabilities match "',u,'"']})})]})}const Le={durable:"Workflow",pipeline:"Pipeline",capability:"Capability",mcp_query:"MCP Query"},Je=["durable","pipeline","capability","mcp_query"];function ae({reactionType:s,onReactionTypeChange:a,workflowType:r,onWorkflowTypeChange:o,pipelineId:x,onPipelineIdChange:m,serverId:i,toolName:u,onCapabilityChange:p,mcpPrompt:l,onMcpPromptChange:h,availableTypes:c=[...Je]}){const{data:d}=ve(),y=(d??[]).filter(n=>n.invocable).map(n=>n.workflow_type),{data:v}=_e({status:"active"}),t=((v==null?void 0:v.workflows)??[]).map(n=>({id:n.id,name:n.graph_topic||n.id}));return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-1",children:c.map(n=>{const b=s===n;return e.jsx("button",{type:"button",onClick:()=>a(n),className:`px-3 py-1.5 text-2xs font-medium rounded-md transition-colors ${b?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:Le[n]},n)})}),s==="durable"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Workflow *"}),e.jsxs("select",{value:r,onChange:n=>o(n.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select workflow..."}),y.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),s==="pipeline"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Pipeline *"}),e.jsxs("select",{value:x,onChange:n=>m(n.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select pipeline..."}),t.map(n=>e.jsx("option",{value:n.id,children:n.name},n.id))]})]}),s==="capability"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Capability *"}),e.jsx(Me,{serverId:i,toolName:u,onChange:p})]}),s==="mcp_query"&&h&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Prompt *"}),e.jsx("textarea",{value:l??"",onChange:n=>h(n.target.value),placeholder:"Analyze the error and suggest remediation...",rows:3,className:"input resize-none"})]})]})}const Fe={task:"bg-status-active/10 text-status-active",workflow:"bg-accent/15 text-accent",escalation:"bg-status-warning/10 text-status-warning",activity:"bg-status-active/10 text-status-active",knowledge:"bg-accent/10 text-accent",file:"bg-status-draft/10 text-status-draft",agent:"bg-status-success/10 text-status-success",app:"bg-status-error/10 text-status-error",milestone:"bg-accent/10 text-accent"};function De({form:s,set:a}){const{data:r}=ke({limit:200}),{data:o}=se(),x=(r==null?void 0:r.topics)??[],m=f.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(n=>n.tools))??[]},[o]),[i,u]=f.useState(0),p=(t,n,b)=>{const g=[...s.subscriptions];g[t]={...g[t],[n]:b},a("subscriptions",g)},l=()=>{a("subscriptions",[...s.subscriptions,{...Oe}]),u(s.subscriptions.length)},h=t=>{a("subscriptions",s.subscriptions.filter((n,b)=>b!==t)),i>=s.subscriptions.length-1&&u(Math.max(0,s.subscriptions.length-2))},c=s.subscriptions,d=c[i],y=t=>t.topic?t.reaction_type==="durable"?!!t.workflow_type:t.reaction_type==="pipeline"?!!t.pipeline_id:t.reaction_type==="mcp_query"?!!t.mcp_prompt:t.reaction_type==="capability"?!!t.server_id&&!!t.tool_name:!1:!1,v=d?x.find(t=>t.topic===d.topic):void 0;return c.length===0?e.jsxs("div",{className:"max-w-xl",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(U,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"}),e.jsx("p",{className:"text-2xs text-text-quaternary max-w-sm mb-6",children:"Each subscription listens for a topic pattern and runs a workflow when it matches."}),e.jsxs("button",{onClick:l,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(M,{className:"w-3.5 h-3.5"})," Add first subscription"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsx("p",{className:"text-xs text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(E,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-52 shrink-0 space-y-0.5",children:[c.map((t,n)=>e.jsxs("div",{className:`group/sub flex items-center rounded-md transition-colors ${i===n?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>u(n),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-2.5 h-2.5 rounded-full dot-ring shrink-0 ${y(t)?"bg-status-success":"bg-surface-border"}`}),e.jsx("span",{className:"text-2xs font-mono truncate",children:t.topic||"new subscription"})]}),e.jsxs("span",{className:"text-2xs text-text-quaternary ml-3",children:["→ ",t.workflow_type||t.tool_name||t.reaction_type]})]}),e.jsx("button",{onClick:b=>{b.stopPropagation(),confirm(`Remove subscription "${t.topic||"new"}"?
|
|
2
2
|
|
|
3
3
|
This takes effect when you save.`)&&h(n)},className:"opacity-0 group-hover/sub:opacity-100 px-2 text-text-quaternary hover:text-status-error transition-all",title:"Remove",children:e.jsx(Z,{className:"w-3 h-3"})})]},n)),e.jsxs("button",{onClick:l,className:"w-full flex items-center gap-1.5 px-3 py-2 text-2xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(M,{className:"w-3 h-3"})," Add"]})]}),d&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"When this event fires"}),e.jsx(Ke,{value:d.topic,onChange:t=>p(i,"topic",t),topics:x}),(v==null?void 0:v.payload_schema)&&e.jsxs("div",{className:"mt-3 p-3 rounded-md bg-surface-sunken border border-surface-border",children:[e.jsx("p",{className:"text-2xs text-text-quaternary mb-1 uppercase tracking-wider font-medium",children:"Payload Schema"}),e.jsx("pre",{className:"text-2xs font-mono text-text-secondary whitespace-pre-wrap overflow-x-auto max-h-40",children:JSON.stringify(v.payload_schema.properties??v.payload_schema,null,2)}),v.description&&e.jsx("p",{className:"text-2xs text-text-tertiary mt-2 italic",children:v.description})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run this reaction"}),e.jsx(ae,{reactionType:d.reaction_type,onReactionTypeChange:t=>p(i,"reaction_type",t),workflowType:d.workflow_type,onWorkflowTypeChange:t=>p(i,"workflow_type",t),pipelineId:d.pipeline_id,onPipelineIdChange:t=>p(i,"pipeline_id",t),serverId:d.server_id,toolName:d.tool_name,onCapabilityChange:(t,n)=>{var $;const b=[...s.subscriptions],g={...b[i],server_id:t,tool_name:n},k=m.find(q=>q.serverId===t&&q.name===n),R=($=k==null?void 0:k.inputSchema)==null?void 0:$.properties;if(R&&n){const q={};for(const w of Object.keys(R))w.startsWith("_")||(q[w]=`{event.data.${w}}`);g.input_mapping=JSON.stringify(q,null,2)}b[i]=g,a("subscriptions",b)},mcpPrompt:d.mcp_prompt,onMcpPromptChange:t=>p(i,"mcp_prompt",t)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"As identity"}),e.jsx(te,{selected:d.execute_as,onChange:t=>p(i,"execute_as",t)}),e.jsx("p",{className:_,children:"Identity used when invoking the workflow."})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"But only if"}),e.jsx("input",{type:"text",value:d.filter,onChange:t=>p(i,"filter",t.target.value),placeholder:'{"extension": "png"}',className:`${A} font-mono text-xs`}),e.jsx("p",{className:_,children:"JSON filter against event.data. Click an operator to insert:"}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:[{label:"equals",value:'{"key": "val"}'},{label:"not equal",value:'{"key": {"$ne": "val"}}'},{label:"in list",value:'{"key": {"$in": ["a", "b"]}}'},{label:"exists",value:'{"key": {"$exists": true}}'}].map(t=>e.jsx("button",{type:"button",onClick:()=>p(i,"filter",t.value),className:"px-2 py-0.5 text-2xs font-mono rounded bg-accent/8 text-accent hover:bg-accent/15 transition-colors",children:t.label},t.label))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"With this data"}),d.reaction_type==="capability"&&d.tool_name?e.jsx(ze,{tool:m.find(t=>t.serverId===d.server_id&&t.name===d.tool_name),value:d.input_mapping,onChange:t=>p(i,"input_mapping",t),eventSchema:v==null?void 0:v.payload_schema}):e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:d.input_mapping,onChange:t=>p(i,"input_mapping",t.target.value),rows:10,className:L,placeholder:`{
|
|
4
4
|
"data": {
|
|
@@ -13,4 +13,4 @@ This takes effect when you save.`)&&h(n)},className:"opacity-0 group-hover/sub:o
|
|
|
13
13
|
This takes effect when you save.`)&&i(h)},className:"opacity-0 group-hover/sched:opacity-100 px-2 text-text-quaternary hover:text-status-error transition-all",title:"Remove",children:e.jsx(Z,{className:"w-3 h-3"})})]},h)),e.jsxs("button",{onClick:m,className:"w-full flex items-center gap-1.5 px-3 py-2 text-2xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(M,{className:"w-3 h-3"})," Add"]})]}),p&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run every"}),e.jsx("input",{type:"text",value:p.cron,onChange:l=>x(r,"cron",l.target.value),placeholder:"0 * * * *",className:`${A} font-mono`}),p.cron&&e.jsx("p",{className:"text-2xs text-accent/80 mt-1",children:z(p.cron)}),e.jsx("div",{className:"flex gap-3 mt-2 overflow-x-auto",children:Ue.map(l=>e.jsx("button",{type:"button",onClick:()=>x(r,"cron",l),className:`text-2xs font-mono whitespace-nowrap transition-colors ${p.cron===l?"text-accent font-medium":"text-accent/50 hover:text-accent"}`,children:z(l)},l))})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run this reaction"}),e.jsx(ae,{reactionType:p.reaction_type,onReactionTypeChange:l=>x(r,"reaction_type",l),workflowType:p.workflow_type,onWorkflowTypeChange:l=>x(r,"workflow_type",l),pipelineId:p.pipeline_id,onPipelineIdChange:l=>x(r,"pipeline_id",l),serverId:p.server_id,toolName:p.tool_name,onCapabilityChange:(l,h)=>{x(r,"server_id",l),x(r,"tool_name",h)},availableTypes:["durable","pipeline","capability"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"As identity"}),e.jsx(te,{selected:p.execute_as,onChange:l=>x(r,"execute_as",l)}),e.jsx("p",{className:_,children:"Identity used when invoking."})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"With this data"}),e.jsx("textarea",{value:p.envelope,onChange:l=>x(r,"envelope",l.target.value),rows:10,className:L,placeholder:`{
|
|
14
14
|
"data": { "source": "cron" }
|
|
15
15
|
}`}),e.jsx("p",{className:_,children:"Static payload passed to the workflow on each invocation."})]})]})]})]})}function W({icon:s,color:a,title:r,children:o}){return e.jsxs("div",{className:"mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1.5 border-b border-surface-border/40",children:[e.jsx(s,{className:`w-3.5 h-3.5 ${a}`,strokeWidth:1.5}),e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:r})]}),e.jsx("div",{className:"pl-5.5",children:o})]})}function T({label:s,children:a}){return e.jsxs("div",{className:"flex gap-3 py-0.5",children:[e.jsx("span",{className:"text-2xs text-text-quaternary w-20 shrink-0",children:s}),e.jsx("span",{className:"text-xs text-text-primary",children:a})]})}function Ge({form:s}){return e.jsxs("div",{children:[e.jsxs(W,{icon:V,color:"text-accent",title:"Identity",children:[e.jsx(T,{label:"Name",children:s.name||"—"}),s.description&&e.jsx(T,{label:"Description",children:s.description})]}),(s.goals||s.rules)&&e.jsxs(W,{icon:ee,color:"text-accent",title:"Motivation",children:[s.goals&&e.jsx(T,{label:"Goals",children:s.goals}),s.rules&&e.jsx(T,{label:"Rules",children:s.rules})]}),e.jsx(W,{icon:K,color:"text-accent",title:"Knowledge",children:e.jsx(T,{label:"Domain",children:s.knowledge_domain||"None"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-10",children:[e.jsx(W,{icon:U,color:"text-accent",title:`Subscriptions (${s.subscriptions.length})`,children:s.subscriptions.length===0?e.jsx("span",{className:"text-2xs text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.subscriptions.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(de,{topic:a.topic||"unset"})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-2xs",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-2xs text-text-quaternary",children:a.reaction_type})]})]},r))})}),e.jsx(W,{icon:Y,color:"text-accent",title:`Schedules (${s.schedules.length})`,children:s.schedules.length===0?e.jsx("span",{className:"text-2xs text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.schedules.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(xe,{cron:a.cron})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-2xs",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-2xs text-text-quaternary",children:"no workflow"})]})]},r))})})]}),e.jsx("div",{className:"border-l-2 border-status-success/30 pl-3 py-2 mt-6",children:e.jsx("p",{className:"text-2xs text-text-tertiary leading-relaxed",children:"After saving, subscriptions and schedules activate immediately. You can pause the automation anytime."})})]})}const He=[{id:1,label:"Identity",icon:V},{id:2,label:"Motivation",icon:ee},{id:3,label:"Knowledge",icon:K},{id:4,label:"Subscriptions",icon:U},{id:5,label:"Schedules",icon:Y},{id:6,label:"Review",icon:we}];function xt(){var H;const{id:s}=Ce(),a=!s,r=Se(),{data:o}=be(),x=ye(),i=(x!==null?x:!!((H=o==null?void 0:o.ai)!=null&&H.enabled))?"Agent":"Automation",{data:u,isLoading:p}=ce(a?null:s),{data:l}=pe(a?null:s),h=le(),c=oe(),d=ue(),y=me(),v=he(),[t,n]=f.useState(X),[b,g]=f.useState(!1),[k,R]=f.useState(""),[$,q]=qe(),w=parseInt($.get("step")||"1",10),ne=f.useCallback(j=>{q(N=>{const O=new URLSearchParams(N);return O.set("step",String(j)),O},{replace:!0})},[q]);f.useEffect(()=>{if(!b){if(a){n(X),g(!0);return}u&&l&&(n(Re(u,l.subscriptions??[])),g(!0))}},[u,l,a,b]);const I=(j,N)=>n(O=>({...O,[j]:N})),ie=async()=>{R("");try{const j=Ee(t);let N=s;a?N=(await h.mutateAsync(j)).id:await c.mutateAsync({id:s,...j});const O=$e(t),re=(l==null?void 0:l.subscriptions)??[],J=new Set(re.map(C=>C.id));for(const C of O)if(C.id&&J.has(C.id)){const{id:F,...D}=C;await y.mutateAsync({agentId:N,subId:F,...D}),J.delete(F)}else{const{id:F,...D}=C;await d.mutateAsync({agentId:N,...D})}for(const C of J)await v.mutateAsync({agentId:N,subId:C});r(`/agents/${N}`)}catch(j){R(j.message)}};if(!a&&p)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-60 bg-surface-sunken rounded"})]});const G=h.isPending||c.isPending;return e.jsxs("div",{children:[e.jsx(ge,{title:a?`New ${i}`:`${i}: ${(u==null?void 0:u.id)??""}`,docsHash:"#docs:agents.md"}),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:He.map(j=>{const N=j.icon,O=w===j.id;return e.jsxs("button",{onClick:()=>ne(j.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${O?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(N,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:j.label})]},j.id)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:ie,disabled:!t.name.trim()||G,className:"w-full btn-primary text-xs disabled:opacity-50",children:G?"Saving...":a?`Create ${i}`:"Save"}),e.jsx("button",{onClick:()=>r(a?"/agents":`/agents/${s}`),className:"w-full btn-ghost text-xs",children:"Cancel"})]}),k&&e.jsx("p",{className:"text-xs text-status-error mt-3",children:k})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[w===1&&e.jsx(Ie,{form:t,set:I}),w===2&&e.jsx(We,{form:t,set:I}),w===3&&e.jsx(Te,{form:t,set:I}),w===4&&e.jsx(De,{form:t,set:I}),w===5&&e.jsx(Ye,{form:t,set:I}),w===6&&e.jsx(Ge,{form:t})]})]})]})}export{xt as AgentConfigPage};
|
|
16
|
-
//# sourceMappingURL=AgentConfigPage-
|
|
16
|
+
//# sourceMappingURL=AgentConfigPage-CE1k6J5r.js.map
|