@hotmeshio/long-tail 0.9.4 → 0.9.6
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/dashboard/dist/assets/{AdminDashboard-DmQG0fUK.js → AdminDashboard-DXFIKXO3.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-DmQG0fUK.js.map → AdminDashboard-DXFIKXO3.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-BZ8g7Ml8.js → AgentConfigPage-CQE1mfjk.js} +2 -2
- package/dashboard/dist/assets/{AgentConfigPage-BZ8g7Ml8.js.map → AgentConfigPage-CQE1mfjk.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-Cdinl7bx.js → AgentDetailPage-DM59ozP_.js} +2 -2
- package/dashboard/dist/assets/{AgentDetailPage-Cdinl7bx.js.map → AgentDetailPage-DM59ozP_.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-GEYMgmez.js → AgentsPage-DSK2uXI5.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-GEYMgmez.js.map → AgentsPage-DSK2uXI5.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-BVgMtftp.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-BVgMtftp.js.map +1 -0
- package/dashboard/dist/assets/{BotPicker-Bpglj7RE.js → BotPicker-DJ0YYKZA.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-Bpglj7RE.js.map → BotPicker-DJ0YYKZA.js.map} +1 -1
- package/dashboard/dist/assets/{CapabilitiesPage-ARIQzRiq.js → CapabilitiesPage-DFQryGBj.js} +2 -2
- package/dashboard/dist/assets/{CapabilitiesPage-ARIQzRiq.js.map → CapabilitiesPage-DFQryGBj.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-BuZl37uS.js → CollapsibleSection-B7-d5O_x.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-BuZl37uS.js.map → CollapsibleSection-B7-d5O_x.js.map} +1 -1
- package/dashboard/dist/assets/CountdownTimer-BTJmh4Xw.js +2 -0
- package/dashboard/dist/assets/CountdownTimer-BTJmh4Xw.js.map +1 -0
- package/dashboard/dist/assets/{CredentialsPage-CjBiPahB.js → CredentialsPage-BWVgxRpZ.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-CjBiPahB.js.map → CredentialsPage-BWVgxRpZ.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-DTXl2Rgj.js → CronLabel-DNnyNqXH.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-DTXl2Rgj.js.map → CronLabel-DNnyNqXH.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-qhb23E3p.js → CustomDurationPicker-SNsQZL_U.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-qhb23E3p.js.map → CustomDurationPicker-SNsQZL_U.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-BMhamzj3.js → ElapsedCell-C4r0IvUt.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-BMhamzj3.js.map → ElapsedCell-C4r0IvUt.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListSchemaPage-BEi89A7y.js → EscalationListSchemaPage-D8Ec8Zhj.js} +2 -2
- package/dashboard/dist/assets/{EscalationListSchemaPage-BEi89A7y.js.map → EscalationListSchemaPage-D8Ec8Zhj.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-9NY4Q4ku.js → EscalationSchemaPage-BmEv7qU2.js} +2 -2
- package/dashboard/dist/assets/{EscalationSchemaPage-9NY4Q4ku.js.map → EscalationSchemaPage-BmEv7qU2.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-2VRjFxPV.js → EscalationsOverview-DkIy025e.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-2VRjFxPV.js.map → EscalationsOverview-DkIy025e.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-hHPNI3Yq.js → EventTable-Co4RYeKO.js} +2 -2
- package/dashboard/dist/assets/{EventTable-hHPNI3Yq.js.map → EventTable-Co4RYeKO.js.map} +1 -1
- package/dashboard/dist/assets/{GraphInvokePage-B6qAC8zt.js → GraphInvokePage-b7ukMy0z.js} +2 -2
- package/dashboard/dist/assets/{GraphInvokePage-B6qAC8zt.js.map → GraphInvokePage-b7ukMy0z.js.map} +1 -1
- package/dashboard/dist/assets/{HomePage-DDyQOu57.js → HomePage-K0U3yMdU.js} +2 -2
- package/dashboard/dist/assets/{HomePage-DDyQOu57.js.map → HomePage-K0U3yMdU.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-BUgEY8Oc.js → ListToolbar-DDG6DXVF.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-BUgEY8Oc.js.map → ListToolbar-DDG6DXVF.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-DIenRt0e.js → McpOverview-P2o3b3mi.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-DIenRt0e.js.map → McpOverview-P2o3b3mi.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-CxAR4Bpw.js → McpQueryDetailPage-C2CeBLb0.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-CxAR4Bpw.js.map → McpQueryDetailPage-C2CeBLb0.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-CkT4A2c5.js → McpQueryPage-D_N-3lp0.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-CkT4A2c5.js.map → McpQueryPage-D_N-3lp0.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-DDiOtG5r.js → McpRunDetailPage-uDw3MWR_.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-DDiOtG5r.js.map → McpRunDetailPage-uDw3MWR_.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-BWe6WVzw.js → McpRunsPage-CDTUxghb.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-BWe6WVzw.js.map → McpRunsPage-CDTUxghb.js.map} +1 -1
- package/dashboard/dist/assets/{OperationsPage-CzJx-zxj.js → OperationsPage-Daah4pNk.js} +2 -2
- package/dashboard/dist/assets/{OperationsPage-CzJx-zxj.js.map → OperationsPage-Daah4pNk.js.map} +1 -1
- package/dashboard/dist/assets/{OperatorDashboard-CVq7V7hE.js → OperatorDashboard-CVRD8nQH.js} +2 -2
- package/dashboard/dist/assets/{OperatorDashboard-CVq7V7hE.js.map → OperatorDashboard-CVRD8nQH.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-BWVFB-nL.js → ProcessDetailPage-Dt6PAK04.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-BWVFB-nL.js.map → ProcessDetailPage-Dt6PAK04.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-kyRO3E9d.js → ProcessesListPage-CMkjASgs.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-kyRO3E9d.js.map → ProcessesListPage-CMkjASgs.js.map} +1 -1
- package/dashboard/dist/assets/{RoleDetailPage-DrSlAQUQ.js → RoleDetailPage-6H1AY6sK.js} +2 -2
- package/dashboard/dist/assets/{RoleDetailPage-DrSlAQUQ.js.map → RoleDetailPage-6H1AY6sK.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-tT21PIEb.js → RolesPage-DtHIjDss.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-tT21PIEb.js.map → RolesPage-DtHIjDss.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-BqhOzi2p.js → RunAsSelector-C198CpFs.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-BqhOzi2p.js.map → RunAsSelector-C198CpFs.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-BTDj99Vb.js → StickyPagination-eZ6WhMrL.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-BTDj99Vb.js.map → StickyPagination-eZ6WhMrL.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-DjjnJ31Q.js → StreamMessageDetail-7xq_dddO.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-DjjnJ31Q.js.map → StreamMessageDetail-7xq_dddO.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-Db7ATobq.js → SwimlaneTimeline-Yg5QT0nI.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-Db7ATobq.js.map → SwimlaneTimeline-Yg5QT0nI.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-BVlCa-PR.js → TaskDetailPage-Wc3AFnqs.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-BVlCa-PR.js.map → TaskDetailPage-Wc3AFnqs.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-PKscNTJs.js → TasksListPage-V-1J_B_L.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-PKscNTJs.js.map → TasksListPage-V-1J_B_L.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-CGx_Ffwq.js → TimeAgo-XdHghs5F.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-CGx_Ffwq.js.map → TimeAgo-XdHghs5F.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-CdD5hp9o.js → TimestampCell-BrzctPWT.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-CdD5hp9o.js.map → TimestampCell-BrzctPWT.js.map} +1 -1
- package/dashboard/dist/assets/{ToolTestPanel-DWs0DNGB.js → ToolTestPanel-CGfGUsaq.js} +2 -2
- package/dashboard/dist/assets/{ToolTestPanel-DWs0DNGB.js.map → ToolTestPanel-CGfGUsaq.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-BaL3m3yb.js → TopicDetailPage-CcAgD2k5.js} +2 -2
- package/dashboard/dist/assets/{TopicDetailPage-BaL3m3yb.js.map → TopicDetailPage-CcAgD2k5.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-bFjJUYmO.js → TopicsPage-BOQG7s4P.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-bFjJUYmO.js.map → TopicsPage-BOQG7s4P.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-IdFyeFle.js → UserName-BzxR0Ihp.js} +2 -2
- package/dashboard/dist/assets/{UserName-IdFyeFle.js.map → UserName-BzxR0Ihp.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-DtC-71vO.js → WorkflowExecutionPage-hRsDMByj.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DtC-71vO.js.map → WorkflowExecutionPage-hRsDMByj.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-DGtMG5vL.js → WorkflowsDashboard-ky0ulsUe.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-DGtMG5vL.js.map → WorkflowsDashboard-ky0ulsUe.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-BFs-ZSTn.js → WorkflowsOverview-CzRJUV58.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-BFs-ZSTn.js.map → WorkflowsOverview-CzRJUV58.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-6FTLoVfO.js → YamlWorkflowDetailPage-Beqzy9Ph.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-6FTLoVfO.js.map → YamlWorkflowDetailPage-Beqzy9Ph.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-0Moxrj_c.js → YamlWorkflowsPage-BzBUU2ug.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-0Moxrj_c.js.map → YamlWorkflowsPage-BzBUU2ug.js.map} +1 -1
- package/dashboard/dist/assets/{agents-Dpg829fG.js → agents-Dlu4m6jy.js} +2 -2
- package/dashboard/dist/assets/{agents-Dpg829fG.js.map → agents-Dlu4m6jy.js.map} +1 -1
- package/dashboard/dist/assets/{bots-BiS_mYcH.js → bots-C4G5U-6Q.js} +2 -2
- package/dashboard/dist/assets/{bots-BiS_mYcH.js.map → bots-C4G5U-6Q.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-Cpe3amV5.js → capabilities-BSFP_boq.js} +2 -2
- package/dashboard/dist/assets/{capabilities-Cpe3amV5.js.map → capabilities-BSFP_boq.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-CjK2cXaD.js → controlplane-qCqoP2ZV.js} +2 -2
- package/dashboard/dist/assets/{controlplane-CjK2cXaD.js.map → controlplane-qCqoP2ZV.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-Ck7ZOd7Z.js +2 -0
- package/dashboard/dist/assets/escalation-columns-Ck7ZOd7Z.js.map +1 -0
- package/dashboard/dist/assets/{index-Be9bw5cd.js → index-BObWYPxd.js} +2 -2
- package/dashboard/dist/assets/{index-Be9bw5cd.js.map → index-BObWYPxd.js.map} +1 -1
- package/dashboard/dist/assets/{index-IHOuIqlt.js → index-BtEWQNcP.js} +2 -2
- package/dashboard/dist/assets/{index-IHOuIqlt.js.map → index-BtEWQNcP.js.map} +1 -1
- package/dashboard/dist/assets/{index-JQCy1mnu.js → index-C0KklOM4.js} +2 -2
- package/dashboard/dist/assets/{index-JQCy1mnu.js.map → index-C0KklOM4.js.map} +1 -1
- package/dashboard/dist/assets/{index-C42kzl9D.js → index-CGVqW6MI.js} +2 -2
- package/dashboard/dist/assets/{index-C42kzl9D.js.map → index-CGVqW6MI.js.map} +1 -1
- package/dashboard/dist/assets/index-CY3hpJR-.js +5 -0
- package/dashboard/dist/assets/index-CY3hpJR-.js.map +1 -0
- package/dashboard/dist/assets/{index-BYpOpKoM.js → index-CuC_mNNA.js} +2 -2
- package/dashboard/dist/assets/{index-BYpOpKoM.js.map → index-CuC_mNNA.js.map} +1 -1
- package/dashboard/dist/assets/{index-BFh7zbQF.js → index-DCTWUswT.js} +2 -2
- package/dashboard/dist/assets/{index-BFh7zbQF.js.map → index-DCTWUswT.js.map} +1 -1
- package/dashboard/dist/assets/{index-Fc1qNrqI.js → index-DUhettdV.js} +2 -2
- package/dashboard/dist/assets/{index-Fc1qNrqI.js.map → index-DUhettdV.js.map} +1 -1
- package/dashboard/dist/assets/{index-3ewF-RsR.js → index-DWSNtg28.js} +2 -2
- package/dashboard/dist/assets/{index-3ewF-RsR.js.map → index-DWSNtg28.js.map} +1 -1
- package/dashboard/dist/assets/{index-Dq5RU7sm.js → index-D_FNaSoe.js} +2 -2
- package/dashboard/dist/assets/{index-Dq5RU7sm.js.map → index-D_FNaSoe.js.map} +1 -1
- package/dashboard/dist/assets/{index-DYcP4jyl.js → index-DcQiD6OF.js} +3 -3
- package/dashboard/dist/assets/{index-DYcP4jyl.js.map → index-DcQiD6OF.js.map} +1 -1
- package/dashboard/dist/assets/{index-p85Oqfqc.js → index-Dzhn5MDY.js} +2 -2
- package/dashboard/dist/assets/{index-p85Oqfqc.js.map → index-Dzhn5MDY.js.map} +1 -1
- package/dashboard/dist/assets/{index-CTTxpoEl.js → index-QL26JxBF.js} +2 -2
- package/dashboard/dist/assets/{index-CTTxpoEl.js.map → index-QL26JxBF.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-Bed_1toa.js → knowledge-CTdgLX5j.js} +2 -2
- package/dashboard/dist/assets/{knowledge-Bed_1toa.js.map → knowledge-CTdgLX5j.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-LRVvEX8W.js → mcp-BEsMr678.js} +2 -2
- package/dashboard/dist/assets/{mcp-LRVvEX8W.js.map → mcp-BEsMr678.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-k2J65UbP.js → mcp-query-CmamHKIR.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-k2J65UbP.js.map → mcp-query-CmamHKIR.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-C9fpHxJR.js → pipelines-taOXA2-y.js} +2 -2
- package/dashboard/dist/assets/{pipelines-C9fpHxJR.js.map → pipelines-taOXA2-y.js.map} +1 -1
- package/dashboard/dist/assets/{roles-BO-4Ieun.js → roles-BiUJAsVM.js} +2 -2
- package/dashboard/dist/assets/{roles-BO-4Ieun.js.map → roles-BiUJAsVM.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BiyBXdk7.js → tasks-DEaDdyBh.js} +2 -2
- package/dashboard/dist/assets/{tasks-BiyBXdk7.js.map → tasks-DEaDdyBh.js.map} +1 -1
- package/dashboard/dist/assets/{topics-m_BXjCFf.js → topics-2qRx68Ft.js} +2 -2
- package/dashboard/dist/assets/{topics-m_BXjCFf.js.map → topics-2qRx68Ft.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-CtkD_tnd.js → useEventHooks-oXjfKrbI.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-CtkD_tnd.js.map → useEventHooks-oXjfKrbI.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-Dt2COnsG.js → useNamespace-YdT1Zouk.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-Dt2COnsG.js.map → useNamespace-YdT1Zouk.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents--i7p1Ta9.js → useYamlActivityEvents-Bt-RZ7Zl.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents--i7p1Ta9.js.map → useYamlActivityEvents-Bt-RZ7Zl.js.map} +1 -1
- package/dashboard/dist/assets/{users-BsRZkm9v.js → users-DbX5JZ_w.js} +2 -2
- package/dashboard/dist/assets/{users-BsRZkm9v.js.map → users-DbX5JZ_w.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-B0djSSvg.js → workflows-acMcPTC5.js} +2 -2
- package/dashboard/dist/assets/{workflows-B0djSSvg.js.map → workflows-acMcPTC5.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-CupO7vvi.js → yaml-workflows-D6kzrMYx.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-CupO7vvi.js.map → yaml-workflows-D6kzrMYx.js.map} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/docs/hitl-guide.md +291 -72
- package/package.json +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js.map +0 -1
- package/dashboard/dist/assets/CountdownTimer-CRK-E2UF.js +0 -2
- package/dashboard/dist/assets/CountdownTimer-CRK-E2UF.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-_KrFogWG.js +0 -2
- package/dashboard/dist/assets/escalation-columns-_KrFogWG.js.map +0 -1
- package/dashboard/dist/assets/index-DWXhbO4b.js +0 -5
- package/dashboard/dist/assets/index-DWXhbO4b.js.map +0 -1
package/dashboard/dist/assets/{yaml-workflows-CupO7vvi.js.map → yaml-workflows-D6kzrMYx.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-workflows-CupO7vvi.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,EAAQ,MAAM,EACnDA,EAAQ,OAAOC,EAAO,IAAI,QAAS,OAAOD,EAAQ,KAAK,CAAC,EACxDA,EAAQ,SAAW,QAAWC,EAAO,IAAI,SAAU,OAAOD,EAAQ,MAAM,CAAC,EAEtEE,EAAmC,CACxC,SAAU,CAAC,gBAAiBF,CAAO,EACnC,QAAS,IAAMG,EAAS,mBAAmBF,CAAM,EAAE,CAAA,CACpD,CACH,CAEO,SAASG,GAAwB,CACtC,OAAOF,EAAgC,CACrC,SAAU,CAAC,oBAAoB,EAC/B,QAAS,IAAMC,EAAS,yBAAyB,CAAA,CAClD,CACH,CAcO,SAASE,EAAgBC,EAAY,CAC1C,OAAOJ,EAA+B,CACpC,SAAU,CAAC,gBAAiBI,CAAE,EAC9B,QAAS,IAAMH,EAAS,mBAAmBG,CAAE,EA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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-D6kzrMYx.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,EAAQ,MAAM,EACnDA,EAAQ,OAAOC,EAAO,IAAI,QAAS,OAAOD,EAAQ,KAAK,CAAC,EACxDA,EAAQ,SAAW,QAAWC,EAAO,IAAI,SAAU,OAAOD,EAAQ,MAAM,CAAC,EAEtEE,EAAmC,CACxC,SAAU,CAAC,gBAAiBF,CAAO,EACnC,QAAS,IAAMG,EAAS,mBAAmBF,CAAM,EAAE,CAAA,CACpD,CACH,CAEO,SAASG,GAAwB,CACtC,OAAOF,EAAgC,CACrC,SAAU,CAAC,oBAAoB,EAC/B,QAAS,IAAMC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,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"}
|
|
@@ -8,7 +8,7 @@
|
|
|
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-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DcQiD6OF.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/vendor-query-B2UbickB.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="./assets/vendor-react-CXumBFUA.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="./assets/vendor-icons-DPmIjhZB.js">
|
package/docs/hitl-guide.md
CHANGED
|
@@ -181,7 +181,7 @@ The resolver form resolves in order, most specific first:
|
|
|
181
181
|
|
|
182
182
|
1. **`metadata.form_schema`** — a full JSON Schema embedded on the escalation row. Use when different escalation points in the same workflow need different forms.
|
|
183
183
|
2. **The role's `form_schema`** — the versioned form every role provides. When the row carries a `metadata.schema_version` pin (set via `schemaVersion` in the `conditionLT` config), the form renders exactly that snapshot even after the role's schema changes; without a pin, the role's latest applies.
|
|
184
|
-
3. **Workflow config `resolver_schema`** —
|
|
184
|
+
3. **Workflow config `resolver_schema`** — lowest-priority fallback, used only when no role `form_schema` is available.
|
|
185
185
|
|
|
186
186
|
### Versioned Role Schemas
|
|
187
187
|
|
|
@@ -245,7 +245,8 @@ The full custom vocabulary at a glance — every `x-lt-*` keyword and extension
|
|
|
245
245
|
|
|
246
246
|
| Keyword | Level | Purpose |
|
|
247
247
|
|---------|-------|---------|
|
|
248
|
-
| `x-lt-widget` | field | Rich control: `file-upload`, `code-editor`, `signature`, `rich-text`, `markdown` |
|
|
248
|
+
| `x-lt-widget` | field | Rich control: `file-upload`, `code-editor`, `signature`, `rich-text`, `markdown`, `checklist` |
|
|
249
|
+
| `x-lt-source` | field | Data path for context-driven widgets: `"domain.path"` (e.g. `"envelope.checklist_items"`) |
|
|
249
250
|
| `x-lt-language` | field | Syntax hint shown by the `code-editor` widget |
|
|
250
251
|
| `accept` | field | File-type filter for the `file-upload` widget (e.g. `".pdf,.png"`) |
|
|
251
252
|
| `x-lt-bind` | field | Path this field's value occupies in the resolver payload (e.g. `"customer.email"`) |
|
|
@@ -264,11 +265,10 @@ The full custom vocabulary at a glance — every `x-lt-*` keyword and extension
|
|
|
264
265
|
| `required` | schema | Fields that must be filled before submit |
|
|
265
266
|
| `title` / `description` | both | Section header / helper text |
|
|
266
267
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
upload, spans, required fields, and `x-lt-bind` mapping into a nested payload.
|
|
268
|
+
Two working references ship as example workflows:
|
|
269
|
+
|
|
270
|
+
- `examples/workflows/rich-form/` — the `intake-reviewer` role exercises the whole vocabulary: side-panel help, two-column layout, ordering, date and email formats, enum, file upload, spans, required fields, and `x-lt-bind`.
|
|
271
|
+
- `examples/workflows/checklist-confirmation/` — the `checklist-operator` role demonstrates the `checklist` widget with `x-lt-source` driving a dynamic list of checkboxes from `envelope.checklist_items`.
|
|
272
272
|
|
|
273
273
|
### Supported Field Types
|
|
274
274
|
|
|
@@ -316,6 +316,7 @@ For rich inputs beyond standard HTML types:
|
|
|
316
316
|
| `"signature"` | HTML5 Canvas drawing pad. Outputs PNG data URL. |
|
|
317
317
|
| `"rich-text"` | Tall textarea for formatted text input. |
|
|
318
318
|
| `"markdown"` | Markdown source, rendered with the same engine as the docs drawer (headings, tables, lists, code blocks, callouts). Editable fields get a Write/Preview toggle; with `readOnly: true` the field is a pure content block — see below. |
|
|
319
|
+
| `"checklist"` | Dynamic list of labeled checkboxes. Item definitions come from any context domain at runtime via `x-lt-source`. Stores `Record<string, boolean>` keyed by item id. |
|
|
319
320
|
|
|
320
321
|
```json
|
|
321
322
|
{
|
|
@@ -366,6 +367,57 @@ source rides along in the resolver payload like any read-only field.
|
|
|
366
367
|
Without `readOnly`, the field is a markdown *editor* — the resolver writes source in
|
|
367
368
|
a Write/Preview toggle and the submitted value is the markdown text.
|
|
368
369
|
|
|
370
|
+
#### Checklist widget (`x-lt-widget: "checklist"`)
|
|
371
|
+
|
|
372
|
+
A dynamic list of labeled checkboxes driven by runtime data in the escalation context. The item definitions come from a domain path declared in `x-lt-source` — the form schema itself never changes as item count or labels vary across escalations.
|
|
373
|
+
|
|
374
|
+
The field type must be `"object"`. The submitted value is `Record<string, boolean>` keyed by item id (e.g. `{ "item_0": true, "item_1": false }`).
|
|
375
|
+
|
|
376
|
+
```json
|
|
377
|
+
{
|
|
378
|
+
"properties": {
|
|
379
|
+
"items": {
|
|
380
|
+
"type": "object",
|
|
381
|
+
"description": "Work through each step and check it off.",
|
|
382
|
+
"x-lt-widget": "checklist",
|
|
383
|
+
"x-lt-source": "envelope.checklist_items"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"required": ["items"]
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
The `x-lt-source` value is `"domain.path"` — the same domain/path convention used by `x-lt-showIf` and `x-lt-help` tokens. The dashboard resolves the path at render time and expects an array of `{ id: string; label: string }` objects.
|
|
391
|
+
|
|
392
|
+
**Domain choice:**
|
|
393
|
+
- `envelope` — for item definitions that are render data only (no query cost). The workflow puts them in `conditionLT`'s `envelope` parameter.
|
|
394
|
+
- `metadata` — only when items need to be GIN-indexed and searchable as facets. Adds index cost.
|
|
395
|
+
|
|
396
|
+
**Workflow side:**
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
const checklistItems = [
|
|
400
|
+
{ id: 'item_0', label: 'Step 1: Verify patient ID' },
|
|
401
|
+
{ id: 'item_1', label: 'Step 2: Confirm dosage' },
|
|
402
|
+
];
|
|
403
|
+
|
|
404
|
+
const decision = await conditionLT<{ items: Record<string, boolean> }>(signalId, {
|
|
405
|
+
role: 'checklist-operator',
|
|
406
|
+
envelope: {
|
|
407
|
+
checklist_items: checklistItems,
|
|
408
|
+
formDefaults: {
|
|
409
|
+
items: Object.fromEntries(checklistItems.map((i) => [i.id, false])),
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
const allConfirmed = Object.values(decision.items).every(Boolean);
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Pre-populating `formDefaults.items` with `false` for each id opens the form with every checkbox unchecked rather than indeterminate.
|
|
418
|
+
|
|
419
|
+
The `examples/workflows/checklist-confirmation/` workflow is the reference: it accepts a `count` input (1–20), generates that many items, suspends for a human to check them off, and returns a summary including `confirmed`, `unconfirmed`, and `allConfirmed`.
|
|
420
|
+
|
|
369
421
|
### Help Panel (`x-lt-help`)
|
|
370
422
|
|
|
371
423
|
Schema-level `x-lt-help` carries the form's guidance — checklists, tier tables,
|
|
@@ -521,7 +573,54 @@ A role where the queue receives both regular work items and crew-pill shutdown s
|
|
|
521
573
|
|
|
522
574
|
When `escalation_payload` contains `{ "crew_pill": true }`, only `shutdown_ack` renders. When the payload carries a regular item (no `crew_pill` key), only `action_taken` and `notes` render.
|
|
523
575
|
|
|
524
|
-
`x-lt-showIf` is evaluated against the escalation record
|
|
576
|
+
`x-lt-showIf` is evaluated against the escalation record and the **live form state** (via the `resolver` domain). Conditions based on `metadata`, `payload`, `envelope`, and `escalation` are static (from the stored row); conditions based on `resolver` react in real time as the user edits the form. Hidden fields are not rendered but their values (if any) remain in form state and are submitted only if they were filled before being hidden.
|
|
577
|
+
|
|
578
|
+
**Example — approval/rejection conditional fields:**
|
|
579
|
+
|
|
580
|
+
The employee sets `approved`. When they uncheck it, `rejection_reason` and `rejection_notes` appear immediately — no page reload, no submit required. The workflow receives the full payload and branches on `approved`:
|
|
581
|
+
|
|
582
|
+
```json
|
|
583
|
+
{
|
|
584
|
+
"title": "Rejection Review",
|
|
585
|
+
"x-lt-layout": "two-column",
|
|
586
|
+
"x-lt-order": ["order_id", "rejection_type", "approved", "rejection_reason", "rejection_notes"],
|
|
587
|
+
"required": ["approved"],
|
|
588
|
+
"properties": {
|
|
589
|
+
"order_id": { "type": "string", "readOnly": true, "x-lt-section": "The Report" },
|
|
590
|
+
"rejection_type": { "type": "string", "readOnly": true, "x-lt-section": "The Report" },
|
|
591
|
+
"approved": { "type": "boolean", "x-lt-section": "The Verdict" },
|
|
592
|
+
"rejection_reason": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"enum": ["Quality", "Quantity", "Routing", "Other"],
|
|
595
|
+
"x-lt-showIf": "!resolver.approved",
|
|
596
|
+
"x-lt-section": "The Verdict"
|
|
597
|
+
},
|
|
598
|
+
"rejection_notes": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"format": "textarea",
|
|
601
|
+
"x-lt-span": 2,
|
|
602
|
+
"x-lt-showIf": "!resolver.approved",
|
|
603
|
+
"x-lt-section": "The Verdict"
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
In the workflow, branch on `approved` from the resolver payload:
|
|
610
|
+
|
|
611
|
+
```typescript
|
|
612
|
+
const decision = await conditionLT<{
|
|
613
|
+
approved: boolean;
|
|
614
|
+
rejection_reason?: string;
|
|
615
|
+
rejection_notes?: string;
|
|
616
|
+
}>(signalId, { role: 'quality-reviewer', /* ... */ });
|
|
617
|
+
|
|
618
|
+
if (!decision.approved) {
|
|
619
|
+
await sendForRework({ reason: decision.rejection_reason, notes: decision.rejection_notes });
|
|
620
|
+
} else {
|
|
621
|
+
await advanceOrder();
|
|
622
|
+
}
|
|
623
|
+
```
|
|
525
624
|
|
|
526
625
|
### Suppressing Empty Fields (`x-lt-hide-if-empty`)
|
|
527
626
|
|
|
@@ -560,7 +659,7 @@ Group related fields under a labeled section by adding `"x-lt-section": "Label"`
|
|
|
560
659
|
}
|
|
561
660
|
```
|
|
562
661
|
|
|
563
|
-
Sections are ordered by the first field that carries the section name (
|
|
662
|
+
Sections are ordered by the first field that carries the section name (respects `x-lt-order`). A field without `x-lt-section` belongs to an unnamed group rendered without a header. Named sections render with a left accent line that spans the full section height, a small icon, and the label in uppercase — spatially grouping the header and its fields without a card or border box.
|
|
564
663
|
|
|
565
664
|
### Validation (`required`)
|
|
566
665
|
|
|
@@ -919,75 +1018,167 @@ if (result.confidence < 0.8) {
|
|
|
919
1018
|
|
|
920
1019
|
## Worked Examples
|
|
921
1020
|
|
|
1021
|
+
Each example is a complete `conditionLT` call. The form schema lives in `metadata.form_schema` inside the config; the signal key is the first argument and is never duplicated in metadata.
|
|
1022
|
+
|
|
922
1023
|
### Simple Approval
|
|
923
1024
|
|
|
924
|
-
A workflow
|
|
1025
|
+
A workflow pauses for a yes/no decision. The resolver's payload shape is declared as the generic type parameter so the workflow is fully typed after resume.
|
|
925
1026
|
|
|
926
1027
|
```typescript
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1028
|
+
import { conditionLT } from '@hotmeshio/long-tail';
|
|
1029
|
+
|
|
1030
|
+
export async function approveSpendWorkflow(envelope: LTEnvelope) {
|
|
1031
|
+
const ctx = Durable.workflow.workflowInfo();
|
|
1032
|
+
|
|
1033
|
+
const decision = await conditionLT<{ approved: boolean; notes?: string }>(
|
|
1034
|
+
`spend-approval-${ctx.workflowId}`,
|
|
1035
|
+
{
|
|
1036
|
+
role: 'finance-reviewer',
|
|
1037
|
+
type: 'approval',
|
|
1038
|
+
description: `Approve spend of $${envelope.data.amount} for ${envelope.data.vendor}`,
|
|
1039
|
+
priority: 2,
|
|
1040
|
+
metadata: {
|
|
1041
|
+
form_schema: {
|
|
1042
|
+
title: 'Spend Approval',
|
|
1043
|
+
description: 'Review and approve or reject this spend request.',
|
|
1044
|
+
required: ['approved'],
|
|
1045
|
+
properties: {
|
|
1046
|
+
approved: { type: 'boolean', description: 'Check to approve' },
|
|
1047
|
+
notes: { type: 'string', format: 'textarea', description: 'Optional comments' },
|
|
1048
|
+
},
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
timeout: '48h',
|
|
936
1052
|
},
|
|
937
|
-
|
|
1053
|
+
);
|
|
1054
|
+
|
|
1055
|
+
if (decision === null) return { type: 'return' as const, data: { cancelled: true } };
|
|
1056
|
+
if (decision === false) return { type: 'return' as const, data: { timedOut: true } };
|
|
1057
|
+
|
|
1058
|
+
if (decision.approved) {
|
|
1059
|
+
await releasePayment(envelope.data);
|
|
1060
|
+
} else {
|
|
1061
|
+
await notifyRejection(envelope.data, decision.notes);
|
|
1062
|
+
}
|
|
938
1063
|
}
|
|
939
1064
|
```
|
|
940
1065
|
|
|
941
|
-
###
|
|
1066
|
+
### Multi-Field Intake with Layout
|
|
942
1067
|
|
|
943
|
-
|
|
1068
|
+
A structured intake form — two-column layout, ordered fields, required validation, and `x-lt-help` guidance in the side panel.
|
|
944
1069
|
|
|
945
1070
|
```typescript
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1071
|
+
import { conditionLT } from '@hotmeshio/long-tail';
|
|
1072
|
+
|
|
1073
|
+
export async function customerIntakeWorkflow(envelope: LTEnvelope) {
|
|
1074
|
+
const ctx = Durable.workflow.workflowInfo();
|
|
1075
|
+
|
|
1076
|
+
const intake = await conditionLT<{
|
|
1077
|
+
first_name: string;
|
|
1078
|
+
last_name: string;
|
|
1079
|
+
email: string;
|
|
1080
|
+
tier: 'free' | 'pro' | 'enterprise';
|
|
1081
|
+
notes?: string;
|
|
1082
|
+
}>(
|
|
1083
|
+
`intake-${ctx.workflowId}`,
|
|
1084
|
+
{
|
|
1085
|
+
role: 'intake-reviewer',
|
|
1086
|
+
type: 'intake',
|
|
1087
|
+
description: 'New customer intake',
|
|
1088
|
+
priority: 2,
|
|
1089
|
+
envelope: { data: envelope.data },
|
|
1090
|
+
metadata: {
|
|
1091
|
+
form_schema: {
|
|
1092
|
+
title: 'Customer Intake',
|
|
1093
|
+
description: 'Complete all required fields then submit.',
|
|
1094
|
+
'x-lt-layout': 'two-column',
|
|
1095
|
+
'x-lt-order': ['first_name', 'last_name', 'email', 'phone', 'tier', 'notes'],
|
|
1096
|
+
'x-lt-help': '### Intake checklist\n\n1. Confirm the **legal name** matches the ID on file.\n2. Verify the email is reachable — send a test message.\n3. Select tier based on the sales order.\n\n> Escalate non-standard contract language to legal.',
|
|
1097
|
+
required: ['first_name', 'last_name', 'email', 'tier'],
|
|
1098
|
+
properties: {
|
|
1099
|
+
first_name: { type: 'string' },
|
|
1100
|
+
last_name: { type: 'string' },
|
|
1101
|
+
email: { type: 'string', format: 'email' },
|
|
1102
|
+
phone: { type: 'string' },
|
|
1103
|
+
tier: {
|
|
1104
|
+
type: 'string',
|
|
1105
|
+
enum: ['free', 'pro', 'enterprise'],
|
|
1106
|
+
description: 'Select the customer tier',
|
|
1107
|
+
},
|
|
1108
|
+
notes: {
|
|
1109
|
+
type: 'string',
|
|
1110
|
+
format: 'textarea',
|
|
1111
|
+
'x-lt-span': 2,
|
|
1112
|
+
description: 'Additional notes',
|
|
1113
|
+
},
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
953
1117
|
},
|
|
954
|
-
|
|
1118
|
+
);
|
|
1119
|
+
|
|
1120
|
+
if (!intake) return { type: 'return' as const, data: { cancelled: true } };
|
|
1121
|
+
|
|
1122
|
+
await provisionAccount({ ...intake });
|
|
955
1123
|
}
|
|
956
1124
|
```
|
|
957
1125
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
### Multi-Field Data Entry
|
|
1126
|
+
### Checklist Confirmation
|
|
961
1127
|
|
|
962
|
-
A
|
|
1128
|
+
A dynamic checklist where item labels come from the workflow's envelope, not the static schema. Item count and wording can vary per escalation without ever touching the form schema.
|
|
963
1129
|
|
|
964
1130
|
```typescript
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1131
|
+
import { conditionLT } from '@hotmeshio/long-tail';
|
|
1132
|
+
|
|
1133
|
+
export async function stationCheckWorkflow(envelope: LTEnvelope) {
|
|
1134
|
+
const ctx = Durable.workflow.workflowInfo();
|
|
1135
|
+
|
|
1136
|
+
const steps = [
|
|
1137
|
+
{ id: 'step_0', label: 'Verify patient ID matches the order' },
|
|
1138
|
+
{ id: 'step_1', label: 'Confirm dosage and route of administration' },
|
|
1139
|
+
{ id: 'step_2', label: 'Sign the dispensing log' },
|
|
1140
|
+
];
|
|
1141
|
+
|
|
1142
|
+
const result = await conditionLT<{ checks: Record<string, boolean> }>(
|
|
1143
|
+
`station-check-${ctx.workflowId}`,
|
|
1144
|
+
{
|
|
1145
|
+
role: 'station-operator',
|
|
1146
|
+
type: 'station-check',
|
|
1147
|
+
description: 'Complete all station checks before releasing',
|
|
1148
|
+
priority: 1,
|
|
1149
|
+
envelope: {
|
|
1150
|
+
checklist_items: steps,
|
|
1151
|
+
formDefaults: {
|
|
1152
|
+
// Pre-populate all checkboxes as unchecked
|
|
1153
|
+
checks: Object.fromEntries(steps.map((s) => [s.id, false])),
|
|
1154
|
+
},
|
|
982
1155
|
},
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1156
|
+
metadata: {
|
|
1157
|
+
form_schema: {
|
|
1158
|
+
title: 'Station Check',
|
|
1159
|
+
description: 'Work through each step and confirm completion.',
|
|
1160
|
+
required: ['checks'],
|
|
1161
|
+
properties: {
|
|
1162
|
+
checks: {
|
|
1163
|
+
type: 'object',
|
|
1164
|
+
'x-lt-widget': 'checklist',
|
|
1165
|
+
'x-lt-source': 'envelope.checklist_items',
|
|
1166
|
+
description: 'Check each step when complete',
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
},
|
|
988
1170
|
},
|
|
989
1171
|
},
|
|
990
|
-
|
|
1172
|
+
);
|
|
1173
|
+
|
|
1174
|
+
if (!result) return { type: 'return' as const, data: { cancelled: true } };
|
|
1175
|
+
|
|
1176
|
+
const allClear = Object.values(result.checks).every(Boolean);
|
|
1177
|
+
const failed = steps.filter((s) => !result.checks[s.id]).map((s) => s.label);
|
|
1178
|
+
|
|
1179
|
+
if (!allClear) {
|
|
1180
|
+
await flagIncomplete({ failed });
|
|
1181
|
+
}
|
|
991
1182
|
}
|
|
992
1183
|
```
|
|
993
1184
|
|
|
@@ -996,22 +1187,50 @@ metadata: {
|
|
|
996
1187
|
Password fields are automatically redacted and replaced with ephemeral tokens (15-min TTL) before being sent back to the workflow.
|
|
997
1188
|
|
|
998
1189
|
```typescript
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1190
|
+
import { conditionLT } from '@hotmeshio/long-tail';
|
|
1191
|
+
|
|
1192
|
+
export async function credentialProvisionWorkflow(envelope: LTEnvelope) {
|
|
1193
|
+
const ctx = Durable.workflow.workflowInfo();
|
|
1194
|
+
|
|
1195
|
+
const creds = await conditionLT<{
|
|
1196
|
+
api_key: string;
|
|
1197
|
+
api_secret: string; // arrives as eph:v1:* token, never plain text
|
|
1198
|
+
environment: 'sandbox' | 'production';
|
|
1199
|
+
}>(
|
|
1200
|
+
`creds-${ctx.workflowId}`,
|
|
1201
|
+
{
|
|
1202
|
+
role: 'integration-admin',
|
|
1203
|
+
type: 'credential-provision',
|
|
1204
|
+
description: `Provide API credentials for ${envelope.data.integration}`,
|
|
1205
|
+
priority: 1,
|
|
1206
|
+
metadata: {
|
|
1207
|
+
form_schema: {
|
|
1208
|
+
title: 'Provide Credentials',
|
|
1209
|
+
description: 'Enter the API credentials. Secrets are encrypted in transit and stored as ephemeral tokens.',
|
|
1210
|
+
required: ['api_key', 'api_secret', 'environment'],
|
|
1211
|
+
properties: {
|
|
1212
|
+
api_key: { type: 'string', description: 'API Key' },
|
|
1213
|
+
api_secret: {
|
|
1214
|
+
type: 'string',
|
|
1215
|
+
format: 'password',
|
|
1216
|
+
description: 'API Secret — redacted before storage, returned as an ephemeral token',
|
|
1217
|
+
},
|
|
1218
|
+
environment: {
|
|
1219
|
+
type: 'string',
|
|
1220
|
+
enum: ['sandbox', 'production'],
|
|
1221
|
+
description: 'Target environment',
|
|
1222
|
+
},
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1012
1225
|
},
|
|
1226
|
+
timeout: '24h',
|
|
1013
1227
|
},
|
|
1014
|
-
|
|
1228
|
+
);
|
|
1229
|
+
|
|
1230
|
+
if (!creds) return { type: 'return' as const, data: { cancelled: true } };
|
|
1231
|
+
|
|
1232
|
+
// creds.api_secret is an eph:v1:* token — pass it to the integration layer for redemption
|
|
1233
|
+
await configureIntegration(envelope.data.integration, creds);
|
|
1015
1234
|
}
|
|
1016
1235
|
```
|
|
1017
1236
|
|
|
@@ -1032,7 +1251,7 @@ const result = await lt.escalations.resolve({
|
|
|
1032
1251
|
});
|
|
1033
1252
|
```
|
|
1034
1253
|
|
|
1035
|
-
This routes through the full resolution path and works for all escalation types — atomic `conditionLT` (signal_key),
|
|
1254
|
+
This routes through the full resolution path and works for all escalation types — atomic `conditionLT` (signal_key), two-step `conditionLT` (signal_id), and re-run-style escalations.
|
|
1036
1255
|
|
|
1037
1256
|
### By metadata key-value pair
|
|
1038
1257
|
|
package/package.json
CHANGED