@makaio/framework 1.0.0-dev-1789234461336 → 1.0.0-dev-1789404058608
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/dist/.makaio-build.json +2 -2
- package/dist/adapters/claude/index.d.mts +24 -24
- package/dist/authority-state-bootstrap-CvuWPywM.mjs +1 -0
- package/dist/bus/index.mjs +1 -1
- package/dist/{bus-BZB7jNes.mjs → bus-DlTN167w.mjs} +1 -1
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +2 -2
- package/dist/contracts/capabilities/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/index.d.mts +61 -61
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/worker/index.d.mts +1 -1
- package/dist/contracts/worker/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/drizzle/0039_m_mtyn7x1q.sql +1 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/{index-Cplq28EL.d.mts → index-BArnbdj6.d.mts} +84 -67
- package/dist/{index-De_oh9M-2.d.mts → index-BEi6nx1S2.d.mts} +1 -1
- package/dist/{index-iVisrVdC2.d.mts → index-BUC9P6Q12.d.mts} +6 -6
- package/dist/{index-B6WkHnCQ.d.mts → index-C1nSuiG0.d.mts} +1 -1
- package/dist/{index-CA3Uzki8.d.mts → index-CGxjX4fw.d.mts} +5 -5
- package/dist/{index-nkix3hP7.d.mts → index-CWlvL7GB.d.mts} +6 -6
- package/dist/{index-DXZImst_2.d.mts → index-DH0m01hJ2.d.mts} +15 -11
- package/dist/{index-BmCm9R8_.d.mts → index-DaAWCLe9.d.mts} +25 -25
- package/dist/{index-ClKwF6LE.d.mts → index-DjQebquc.d.mts} +287 -287
- package/dist/{index-DMkzJCjS.d.mts → index-Du4wUv9q.d.mts} +7 -7
- package/dist/{index-CzUUoexw.d.mts → index-HJkz7i4E.d.mts} +70 -1
- package/dist/{index-mTaFX2HH2.d.mts → index-HMb0RcTG2.d.mts} +12 -12
- package/dist/{index-Bg3WVL8n.d.mts → index-N3f65Z_S.d.mts} +8 -8
- package/dist/{index-xsaaa85T.d.mts → index-T-aAKybB.d.mts} +8 -8
- package/dist/{index-BpQX136X.d.mts → index-U--ajOHy.d.mts} +1 -1
- package/dist/{index-D_j_T3nS.d.mts → index-gu4mzfTr.d.mts} +1 -1
- package/dist/{index-C6e9cwAl2.d.mts → index-n1hV8uFw2.d.mts} +7 -7
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/{namespace-Phxf0Lep.d.mts → namespace-CPGTaFqO.d.mts} +2 -2
- package/dist/{namespace-UFcDEBJB.d.mts → namespace-D2RZfl0a.d.mts} +2 -2
- package/dist/{namespace-BsQPRiMd.d.mts → namespace-DM5vykb7.d.mts} +2 -2
- package/dist/{namespace-B5IFLQc-.d.mts → namespace-DQpBf2CK.d.mts} +6 -6
- package/dist/{namespace-rJ3ycPMg.d.mts → namespace-DSRoDmT6.d.mts} +2 -2
- package/dist/{package-CDj3F-L3.d.mts → package-D-oIvXJD.d.mts} +1 -1
- package/dist/{package-D2Erka-E.mjs → package-DYScYC0D.mjs} +2 -2
- package/dist/package.json +1 -1
- package/dist/runtime-node/index.d.mts +2 -2
- package/dist/runtime-node/index.mjs +22 -22
- package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schemas-COiUhOce.d.mts → schemas-BQsXr4FF.d.mts} +7 -7
- package/dist/{schemas-Cj6Gbqch.d.mts → schemas-BcynDWi-.d.mts} +7 -7
- package/dist/{schemas-CaBRbfhU.d.mts → schemas-CEJe8O6P.d.mts} +2 -2
- package/dist/{schemas-2_D4iVbb.d.mts → schemas-CJKDu4Kt.d.mts} +1 -1
- package/dist/{schemas-Cq1d5tid.d.mts → schemas-e8o4JGBu.d.mts} +2 -2
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/execution-target/index.d.mts +3 -3
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/index.d.mts +29 -29
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/index.d.mts +2 -2
- package/dist/services/settings/namespace.d.mts +4 -4
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tray-menu/index.d.mts +2 -2
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/{session-lineage-C3myyt5x.d.mts → session-lineage-BQimcKsh.d.mts} +1 -1
- package/dist/{transition-D-Lgbp1j.d.mts → transition-JmAdtcwW.d.mts} +1 -1
- package/dist/{types-DhbllltK.d.mts → types-C5MnkQv6.d.mts} +9 -9
- package/dist/{view-builder-CHUTXJDl.d.mts → view-builder-ByHQ4Oop.d.mts} +2 -2
- package/dist/{worker-4pqm147Q.mjs → worker-B72n8bse.mjs} +1 -1
- package/dist/workflow-D-X3rPsl.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +67 -34
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-ChrMIcKm.mjs +2 -0
- package/package.json +1 -1
- package/dist/authority-state-bootstrap-BkI-zYRx.mjs +0 -1
- package/dist/workflow-C5cS1mgK.mjs +0 -1
- package/dist/workflow-worker-l-wflI6V.mjs +0 -2
- package/dist/{index-Htfr-K5U2.d.mts → index-CCH0Dnty2.d.mts} +6 -6
- package/dist/{schemas-JjyFxrC0.d.mts → schemas-lAb9QH1A.d.mts} +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,o as r}from"./json-value-DM-EjTC1.mjs";import{a as i,d as a,f as o}from"./schemas-CHM0wMq4.mjs";import{u as s}from"./kind-registration-Dzfo6kyb.mjs";import"./artifact-CKz9YQPu.mjs";import{t as c}from"./zod-json-schema-ZUmGtQhT.mjs";import{a as l}from"./visibility-DCcfB817.mjs";import"./model-BPKGygMv.mjs";import{t as u}from"./provider-context-DFTB8rsU.mjs";import{a as d,o as f}from"./schemas-D-i0IAtA.mjs";import{A as ee,M as te,O as ne,k as p}from"./worker-Cgql5Xsm.mjs";import{r as re}from"./schemas-hTUdjOh7.mjs";import{z as m}from"zod";import{createBusNamespace as h,getFullSubjectForSubjectDefinition as ie,observability as g,splitSubjectKey as ae}from"@makaio/framework/core";const _=m.object({kind:m.string().min(1),id:m.string().min(1)});function oe(e){return`${ce(e.kind)}:${ce(e.id)}`}function se(e){let t=le(e);if(t<1)throw Error(`Invalid artifact ref key: ${e}`);let n=ue(e.slice(t+1));if(n.length===0)throw Error(`Invalid artifact ref key (empty id): ${e}`);return{kind:ue(e.slice(0,t)),id:n}}function ce(e){return e.replace(/\\/g,`\\\\`).replace(/:/g,`\\:`)}function le(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(t){t=!1;continue}if(r===`\\`){t=!0;continue}if(r===`:`)return n}return-1}function ue(e){let t=``,n=!1;for(let r of e){if(n){if(r!==`\\`&&r!==`:`)throw Error(`Invalid artifact ref key component: ${e}`);t+=r,n=!1;continue}if(r===`\\`){n=!0;continue}t+=r}if(n)throw Error(`Invalid artifact ref key component: ${e}`);return t}const de=m.enum([`completed`,`failed`,`cancelled`]),fe=m.object({status:de,completedAt:m.number().int().nonnegative(),error:m.string().min(1).optional(),reason:m.string().min(1).optional()}).strict(),pe=m.object({executionId:m.string().min(1),workflowId:m.string().min(1),finalizerId:m.string().min(1),transitionKey:m.string().min(1),claimToken:m.string().min(1),intent:fe,claimedAt:m.number().int().nonnegative()}).strict(),me=m.object({accepted:m.boolean()}).strict(),he=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/,v=m.string().regex(he,`Workflow finalizer IDs must be lowercase dot, dash, or underscore separated names.`),y=m.string().regex(he,`Workflow delegate result finalizer IDs must be lowercase dot, dash, or underscore separated names.`),ge=m.object({toolName:m.string().min(1),outcome:m.enum([`success`,`failure`]).optional(),artifact:m.object({kind:m.string().min(1),id:m.string().min(1),revision:m.string().min(1)}).strict().optional()}).strict().superRefine((e,t)=>{e.artifact!==void 0&&e.outcome!==`success`&&t.addIssue({code:`custom`,path:[`artifact`],message:`requires an explicit successful outcome`})}),_e=m.object({durationMs:m.number().int().nonnegative(),inputTokens:m.number().int().nonnegative().optional(),outputTokens:m.number().int().nonnegative().optional(),cachedInputTokens:m.number().int().nonnegative().optional(),toolCallCount:m.number().int().nonnegative().optional(),binding:m.object({adapterName:m.string().min(1),providerConfigId:m.string().min(1).optional(),providerDefinitionId:m.string().min(1).optional(),model:m.string().min(1).optional(),auth:m.object({mode:m.enum([`explicit`,`inferred`,`none`]),owner:m.enum([`provider`,`client`]),methodId:m.string().min(1)}).strict().optional()}).strict()}).strict(),b=m.object({executionId:m.string().min(1),workflowId:m.string().min(1),frameId:m.string().min(1),nodeId:m.string().min(1),nodeType:m.enum([`delegate-agent`,`delegate-role`]),rawResult:r,toolObservations:m.array(ge),economics:_e.optional()}).strict(),ve=b.extend({finalizerId:y}).strict(),x=m.object({output:r}).strict();function ye(e){if(!v.safeParse(e).success)throw Error(`Invalid workflow finalizer ID: "${e}"`);let t=`workflow-finalizer:${e}`,n=h(t,{finalize:{request:pe,response:me}});return{namespaceDomain:t,namespace:n,subjects:n.subjects}}function be(e){if(!y.safeParse(e).success)throw Error(`Invalid workflow delegate result finalizer ID: "${e}"`);let t=`workflow-delegate-finalizer:${e}`,n=h(t,{finalize:{request:b,response:x}});return{namespaceDomain:t,namespace:n,subjects:n.subjects}}const S=m.union([m.string(),m.number(),m.boolean(),m.null()]),xe=m.union([S,m.object({$in:m.array(S)}).strict(),m.object({$ne:S}).strict(),m.object({$exists:m.boolean()}).strict(),m.object({$startsWith:m.string()}).strict(),m.object({$endsWith:m.string()}).strict()]),Se=m.record(m.string(),xe),Ce=m.object({kind:re,params:t,filter:Se.optional(),filterExpression:m.string().optional()}),C=m.discriminatedUnion(`type`,[m.object({type:m.literal(`global`)}).strict(),m.object({type:m.literal(`workspace`),id:m.string().min(1)}).strict(),m.object({type:m.literal(`session`),id:m.string().min(1)}).strict(),m.object({type:m.literal(`external`),kind:m.string().min(1),id:m.string().min(1)}).strict()]),w=m.string().min(1),T=m.object({kind:m.string().min(1),schemaVersion:s,scope:o,resolve:m.string().min(1).optional(),create:m.string().min(1).optional(),statusPath:m.string().min(1).optional()}),we=m.object({kind:m.string().min(1),schemaVersion:s,scope:o,dataExpression:m.string().optional()}),Te=m.object({file:m.string().min(1),line:m.number().int().positive().optional(),column:m.number().int().positive().optional()}),E=m.enum([`station`,`delegate-agent`,`delegate-role`,`parallel`,`gate`,`iterate`,`iterate-chain`,`loop`,`sequence`]),Ee=m.enum([`all-settled`,`fail-fast`]),D=m.object({id:m.string().min(1),when:w.optional(),skip:w.optional(),writes:m.array(we).optional()}),O=m.lazy(()=>m.discriminatedUnion(`type`,[A,De,Oe,ke,Ae,je,Me,Pe,k])),k=D.extend({type:m.literal(`sequence`),nodes:m.lazy(()=>m.array(O))}),A=D.extend({type:m.literal(`station`),prompt:m.string().min(1),role:m.string().min(1).optional(),outputSchema:e.optional(),timeoutMs:m.number().int().positive().optional(),completion:d.optional()}),De=D.extend({type:m.literal(`delegate-agent`),agentId:m.string().min(1),inputExpression:m.string().optional(),outputSchema:e.optional(),allowedTools:m.array(m.string()).optional(),completion:d.optional(),resultFinalizerId:y.optional()}),Oe=D.extend({type:m.literal(`delegate-role`),role:m.string().min(1),prompt:m.string().min(1),outputSchema:e.optional(),allowedTools:m.array(m.string()).optional(),resultFinalizerId:y.optional(),timeoutMs:m.number().int().positive().optional(),completion:d.optional()}),ke=D.extend({type:m.literal(`parallel`),mode:Ee.optional(),branches:m.record(m.string().min(1),m.lazy(()=>k))}),Ae=D.extend({type:m.literal(`gate`),prompt:m.string().min(1),title:m.string().optional(),autoAction:m.enum([`approve`,`reject`]),timeoutMs:m.number().int().positive().nullable(),resumeSchema:e.optional()}),je=D.extend({type:m.literal(`iterate`),collection:m.string().min(1),body:m.lazy(()=>k),concurrency:m.number().int().nonnegative().optional()}),Me=D.extend({type:m.literal(`iterate-chain`),collection:m.string().min(1),body:m.lazy(()=>k)}),Ne=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`pass`)}).strict(),m.object({kind:m.literal(`loop`)}).strict(),m.object({kind:m.literal(`escalate`),reason:m.string().min(1)}).strict()]),Pe=D.extend({type:m.literal(`loop`),maxRounds:m.number().int().positive(),body:m.lazy(()=>k),gate:m.object({handler:m.string().min(1),input:m.string().min(1).optional(),config:r.optional(),escalation:m.object({title:m.string().optional(),prompt:m.string().min(1),resumeSchema:e.optional(),autoAction:m.enum([`approve`,`reject`]).default(`reject`),timeoutMs:m.number().int().positive().nullable().default(null)}).strict().optional()}).strict()}),Fe=m.object({factoryId:m.string().min(1),preview:m.array(m.lazy(()=>O)).optional(),sourceLocation:Te.optional()}),Ie=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`editor`)}).strict(),m.object({kind:m.literal(`extension`),extension:m.string().min(1),externalId:m.string().min(1).optional(),syncedAt:m.string().datetime().optional(),metadata:n.default({})}).strict()]),Le=m.object({schema:e,initial:r.optional()}),Re=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`path`),path:m.string().min(1)}).strict(),m.object({kind:m.literal(`source`),filename:m.string().min(1),source:m.string()}).strict(),m.object({kind:m.literal(`definition`),workflowId:m.string().min(1)}).strict()]),j=m.object({id:m.string().min(1),name:m.string().optional(),description:m.string().optional(),inputSchema:e.optional(),configSchema:e.optional(),outputSchema:e.optional(),state:Le.optional(),artifact:T.optional(),root:k,triggers:m.array(Ce).optional(),scope:C.default({type:`global`}),canvasLayout:m.record(m.string(),r).optional(),source:Ie.optional(),executableSource:Re.optional(),requirements:ee.optional(),successFinalizerId:v.optional()}),M=m.enum([`pending`,`running`,`paused`,`finalizing`,`completed`,`failed`,`cancelled`]),N=m.object({id:m.string(),workflowId:m.string(),coordinatorSessionId:m.string().optional(),status:M,inputs:r,config:n.optional(),startedAt:m.number(),completedAt:m.number().optional(),error:m.string().optional(),reason:m.string().optional(),triggerPayload:n.optional(),scope:C,artifactRef:_.optional()}),ze=m.object({frameId:m.string(),nodeId:m.string(),nodeType:E,path:m.array(m.string()),parentFrameId:m.string().optional(),status:m.enum([`pending`,`running`,`waiting`,`completed`,`failed`,`skipped`,`cancelled`]),attempt:m.number().int().nonnegative().default(0),iteration:m.number().int().nonnegative().optional(),branchKey:m.string().optional(),output:r.optional(),error:m.string().optional(),startedAt:m.number().optional(),completedAt:m.number().optional()}),P=m.enum([`waiting`,`resumed`,`rejected`,`timed-out`,`cancelled`]),Be=m.object({executionId:m.string(),executionAttemptId:m.string().optional(),nodeId:m.string(),frameId:m.string(),schema:e,prompt:m.string().optional(),status:P,autoAction:m.enum([`approve`,`reject`]),timeoutMs:m.number().int().positive().nullable(),resumeData:r.optional(),reason:m.string().optional(),createdAt:m.number(),resolvedAt:m.number().optional()}),F=m.object({adapterName:m.string().min(1),providerConfigId:m.string().min(1).optional(),model:m.string().optional(),reasoningEffort:l.optional(),harnessId:m.string().optional(),systemPrompt:m.string().optional(),contextMode:f.optional(),providerContext:u.optional(),adapterConfig:n.optional(),tools:m.array(m.string()).optional(),disallowedTools:m.array(m.string()).optional(),allowedDirectories:m.array(m.string()).optional(),completion:d.optional()}),Ve=F,He=m.object({scope:C.optional()}),Ue=m.object({startedAt:m.number(),id:m.string()}),We=1,Ge=500,Ke=50,qe=m.object({workflowId:m.string().min(1).optional(),scope:C.optional(),status:M.optional(),artifactRef:_.optional(),limit:m.number().int().min(1).max(500).default(50),cursor:Ue.optional()}).refine(e=>e.workflowId!==void 0||e.scope!==void 0||e.artifactRef!==void 0,{message:`Either workflowId, scope, or artifactRef is required.`}),Je=200,Ye=100,Xe=10,Ze=m.object({refs:m.array(_).min(1).max(200),limitPerRef:m.number().int().min(1).max(100).default(10)}),Qe=m.object({executionId:m.string().min(1).optional(),status:P.optional(),limit:m.number().int().min(1).max(500).default(50)}).refine(e=>e.executionId!==void 0||e.status!==void 0,{message:`Either executionId or status is required.`}),I=m.enum([`station`,`delegate-agent`,`delegate-role`,`gate`]),$e=m.enum([`station`]),et=m.object({input:m.number().int().nonnegative(),output:m.number().int().nonnegative(),cached:m.number().int().nonnegative().optional()}),tt=m.object({duration:m.number().nonnegative(),tokenUsage:et.optional(),estimatedCost:m.number().nonnegative().optional(),toolCalls:m.number().int().nonnegative().optional()}),nt=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`none`)}).strict(),m.object({kind:m.literal(`hmac`),secret:m.string().min(1)}).strict()]),rt=m.object({cwd:m.string().min(1),env:m.record(m.string(),m.string()).optional()}),it=m.object({executionId:m.string().min(1),stepId:m.string().min(1),reason:m.string().optional()});function at(e){let t=ae(e);if(t===void 0)throw Error(`Invalid step cancel subject: ${e}`);return{subject:t.subject,$meta:{namespace:t.namespace,isRequest:!1,payload:{},local:!1,channel:!1}}}const ot=m.object({executionId:m.string().min(1),reason:m.string().optional()});function st(e){let t=ae(e);if(t===void 0)throw Error(`Invalid workflow cancel subject: ${e}`);return{subject:t.subject,$meta:{namespace:t.namespace,isRequest:!1,payload:{},local:!1,channel:!1}}}const ct=m.object({stepId:m.string().min(1),executionId:m.string().min(1),workflowId:m.string().min(1),coordinatorSessionId:m.string().min(1),stepType:$e,stepDefinition:A,resolvedInputs:n,busUrl:m.string().optional(),busAuth:nt.default({kind:`none`}),platformDefaults:rt,cancelSubject:m.string().min(1)}).superRefine((e,t)=>{e.stepType!==e.stepDefinition.type&&t.addIssue({code:`custom`,path:[`stepDefinition`,`type`],message:`stepDefinition.type must match stepType (${e.stepType})`})}),lt=`Workflow cancelled`,ut=m.object({status:m.enum([`completed`,`failed`]),output:r.optional(),error:m.string().optional(),telemetry:tt}),dt=m.enum([`running`,`completed`,`failed`,`skipped`]),ft=m.object({executionId:m.string().min(1),frameId:m.string().min(1),stepId:m.string().min(1),stepType:I,status:dt,startedAt:m.number().optional(),completedAt:m.number().optional(),durationMs:m.number().nonnegative().optional(),inputTokens:m.number().int().nonnegative().optional(),outputTokens:m.number().int().nonnegative().optional(),estimatedCost:m.number().nonnegative().optional(),toolCallCount:m.number().int().nonnegative().optional(),input:m.string().optional(),output:m.string().optional()}),pt=m.enum([`triggered-by`,`feedback-loop`,`rerun-of`]),L=m.object({sourceExecutionId:m.string().min(1),targetExecutionId:m.string().min(1),linkType:pt,metadata:m.record(m.string(),m.unknown()).optional()}),mt=m.object({sourceExecutionId:m.string().min(1).optional(),targetExecutionId:m.string().min(1).optional()}).refine(e=>e.sourceExecutionId!==void 0||e.targetExecutionId!==void 0,{message:`Either sourceExecutionId or targetExecutionId is required.`}),ht={RUN_CONTEXT_NOT_FOUND:`WORKFLOW_RUN_CONTEXT_NOT_FOUND`,SNAPSHOT_UNAVAILABLE:`WORKFLOW_SNAPSHOT_UNAVAILABLE`,SOURCE_MISMATCH:`WORKFLOW_SOURCE_MISMATCH`,NOT_EXECUTABLE:`WORKFLOW_NOT_EXECUTABLE`,HANDLER_UNAVAILABLE:`WORKFLOW_HANDLER_UNAVAILABLE`};var gt=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`WorkflowError`}};const R=m.string().refine(e=>e===``||e.startsWith(`/`),{message:`JSON Patch paths must be empty or start with "/".`}),_t=m.object({op:m.enum([`add`,`replace`,`test`]),path:R,value:r}).strict(),vt=m.object({op:m.literal(`remove`),path:R}).strict(),yt=m.object({op:m.enum([`move`,`copy`]),path:R,from:R}).strict(),z=m.discriminatedUnion(`op`,[_t,vt,yt]),bt=m.object({type:m.literal(`artifact-query`),query:i,select:m.enum([`latest`,`all`]),optional:m.boolean().optional()}),xt=m.object({type:m.literal(`bus-request`),subject:m.string().min(1),payload:m.record(m.string(),m.unknown()).optional(),optional:m.boolean().optional()}),St=m.discriminatedUnion(`type`,[bt,xt]),Ct=m.object({type:m.literal(`artifact`),kind:m.string().min(1),schemaVersion:s,scope:o,metadata:m.record(m.string(),m.unknown()).optional()}),wt=m.object({type:m.literal(`bus-event`),subject:m.string().min(1),payload:m.record(m.string(),m.unknown()).optional()}),Tt=m.discriminatedUnion(`type`,[Ct,wt]),Et=m.object({content:m.string(),metadata:m.record(m.string(),m.unknown()).optional()}),Dt=m.object({sources:m.record(m.string(),Et)}),Ot=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`none`)}).strict(),m.object({kind:m.literal(`hmac`),secret:m.string().min(1)}).strict()]),kt=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`path`),path:m.string().min(1)}).strict(),m.object({kind:m.literal(`source`),filename:m.string().min(1),source:m.string()}).strict(),m.object({kind:m.literal(`definition`),workflowId:m.string().min(1)}).strict()]),B=m.enum([`immediate`,`await-trigger`]),At=m.object({source:kt,definition:j.optional(),executionId:m.string().min(1),executionAttemptId:m.string().min(1).optional(),workflowId:m.string().min(1),triggerPayload:n.default({}),triggerMode:B.optional(),inputs:r.default({}),config:n.optional(),artifactRef:_.optional(),scope:C.default({type:`global`}),busUrl:m.string().optional(),busAuth:Ot.default({kind:`none`}),env:m.record(m.string(),m.string()).default({}),coordinatorSessionId:m.string().min(1),cancelSubject:m.string().min(1),suspensionStrategy:te.default(`wait-in-process`),terminalAuthority:m.enum([`worker`,`authority`]).optional(),materializationSpec:p.optional()}),V=m.object({executionId:m.string().min(1),workflowId:m.string().min(1)}),jt=m.discriminatedUnion(`status`,[V.extend({status:m.literal(`completed`),artifact:a.optional()}).strict(),V.extend({status:m.literal(`failed`),error:m.string().min(1)}).strict(),V.extend({status:m.literal(`cancelled`),reason:m.string().min(1).optional()}).strict(),V.extend({status:m.literal(`paused`),pausedAtGateId:m.string().min(1),pausedAtFrameId:m.string().min(1)}).strict()]),Mt=m.object({contributionRefs:m.array(ne)}).strict(),Nt=m.discriminatedUnion(`kind`,[m.object({kind:m.literal(`path`),path:m.string().min(1).refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:[/\\]/.test(e),{message:`path must be workspace-relative (no leading / or drive letter)`})}).strict(),m.object({kind:m.literal(`source`),filename:m.string().min(1),source:m.string()}).strict(),m.object({kind:m.literal(`definition`),workflowId:m.string().min(1)}).strict()]),Pt=m.object({executionId:m.string().min(1),workflowId:m.string().min(1),source:Nt,definitionSnapshot:j.optional(),workerManifest:Mt.default({contributionRefs:[]}),inputs:r.default({}),config:n.optional(),scope:C.default({type:`global`}),triggerPayload:n.default({}),triggerMode:B.optional(),artifactRef:_.optional(),coordinatorSessionId:m.string().min(1),dispatchMetadata:n.optional(),cancelSubject:m.string().min(1),env:m.record(m.string(),m.string()).default({}),createdAt:m.number(),suspensionStrategy:te.default(`wait-in-process`),terminalAuthority:m.enum([`worker`,`authority`]).optional(),materializationSpec:p.optional()}).superRefine((e,t)=>{e.source.kind===`definition`&&e.definitionSnapshot===void 0&&t.addIssue({code:m.ZodIssueCode.custom,path:[`definitionSnapshot`],message:`definitionSnapshot is required when source.kind is "definition"`}),e.source.kind===`path`?e.materializationSpec===void 0?t.addIssue({code:m.ZodIssueCode.custom,path:[`materializationSpec`],message:`materializationSpec is required when source.kind is "path"`}):e.materializationSpec.sourcePath!==e.source.path&&t.addIssue({code:m.ZodIssueCode.custom,path:[`materializationSpec`,`sourcePath`],message:`materializationSpec.sourcePath must match source.path`}):e.materializationSpec!==void 0&&t.addIssue({code:m.ZodIssueCode.custom,path:[`materializationSpec`],message:`materializationSpec is only valid when source.kind is "path"`})}),H=m.object({executionId:m.string().min(1),workflowId:m.string().min(1),workflowName:m.string().optional(),status:m.enum([`pending`,`running`,`paused`,`finalizing`,`completed`,`failed`,`cancelled`]),startedAt:m.number(),completedAt:m.number().optional(),durationMs:m.number().nonnegative().optional(),totalInputTokens:m.number().int().nonnegative().optional(),totalOutputTokens:m.number().int().nonnegative().optional(),totalEstimatedCost:m.number().nonnegative().optional(),error:m.string().optional(),failedNodeId:m.string().optional()}),Ft=m.object({executionId:m.string().min(1),frameId:m.string().min(1),nodeId:m.string().min(1),nodeType:E,path:m.array(m.string()),status:m.enum([`pending`,`running`,`waiting`,`completed`,`failed`,`skipped`,`cancelled`]),attempt:m.number().int().nonnegative(),iteration:m.number().int().nonnegative().optional(),branchKey:m.string().optional(),startedAt:m.number().optional(),completedAt:m.number().optional(),durationMs:m.number().nonnegative().optional(),inputTokens:m.number().int().nonnegative().optional(),outputTokens:m.number().int().nonnegative().optional(),estimatedCost:m.number().nonnegative().optional(),error:m.string().optional()}),It=m.object({executionId:m.string().min(1),frameId:m.string().min(1),nodeId:m.string().min(1),artifact:T,revision:m.string().min(1).optional(),writtenAt:m.number()}),Lt=m.object({executionId:m.string().min(1),nodeId:m.string().min(1),frameId:m.string().min(1),status:m.enum([`waiting`,`resumed`,`rejected`,`timed-out`,`cancelled`]),prompt:m.string().optional(),openedAt:m.number(),resolvedAt:m.number().optional(),resumeData:r.optional()}),Rt=m.object({executionId:m.string().min(1),inputTokens:m.number().int().nonnegative(),outputTokens:m.number().int().nonnegative(),cachedTokens:m.number().int().nonnegative().optional(),estimatedCost:m.number().nonnegative(),byModel:m.record(m.string(),m.object({inputTokens:m.number().int().nonnegative(),outputTokens:m.number().int().nonnegative(),estimatedCost:m.number().nonnegative()})).optional()}),zt=m.object({total:m.number().int().nonnegative(),byStatus:m.object({pending:m.number().int().nonnegative(),running:m.number().int().nonnegative(),paused:m.number().int().nonnegative(),finalizing:m.number().int().nonnegative(),completed:m.number().int().nonnegative(),failed:m.number().int().nonnegative(),cancelled:m.number().int().nonnegative()}),totalDurationMs:m.number().nonnegative(),totalInputTokens:m.number().int().nonnegative(),totalOutputTokens:m.number().int().nonnegative(),totalEstimatedCost:m.number().nonnegative()}),Bt=m.object({executionId:m.string().min(1),frameId:m.string().min(1),factoryId:m.string().min(1),materializedNodeIds:m.array(m.string().min(1)),factoryInput:e.optional(),materializedAt:m.number()}),Vt=`wfx-ext-`,Ht=m.object({frameId:m.string().min(1).optional(),nodeId:m.string().min(1),nodeType:I,path:m.array(m.string().min(1)).optional(),attempt:m.number().int().nonnegative().default(0),iteration:m.number().int().nonnegative().optional(),branchKey:m.string().min(1).optional(),startedAt:m.number().int().nonnegative().optional()}).strict(),Ut=m.object({frameId:m.string().min(1),nodeId:m.string().min(1),nodeType:I,path:m.array(m.string().min(1)),attempt:m.number().int().nonnegative().default(0),iteration:m.number().int().nonnegative().optional(),branchKey:m.string().min(1).optional(),startedAt:m.number().int().nonnegative(),durationMs:m.number().int().nonnegative().optional()}).strict(),Wt=m.object({executionId:m.string().startsWith(Vt,{message:`executionId must use the wfx-ext- prefix`}).optional(),name:m.string().min(1),startedAt:m.number().int().nonnegative().optional(),scope:C.optional(),artifactRef:_.optional(),input:r.optional(),triggerPayload:n.optional(),frame:Ht.optional()}).superRefine((e,t)=>{e.executionId!==void 0&&e.startedAt===void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`startedAt is required when executionId is supplied`,path:[`startedAt`]})}),Gt=m.object({executionId:m.string().min(1),status:m.enum([`completed`,`failed`,`cancelled`]),error:m.string().min(1).optional(),reason:m.string().min(1).optional(),completedAt:m.number().nonnegative().overwrite(e=>Math.trunc(e)).optional(),frame:Ut.optional()}).superRefine((e,t)=>{if(e.status===`failed`&&e.error===void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`status 'failed' requires a non-empty 'error' message`,path:[`error`]}),e.status===`cancelled`&&e.reason===void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`status 'cancelled' requires a non-empty 'reason' string`,path:[`reason`]}),e.status===`completed`&&e.error!==void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`status 'completed' must not carry an 'error'`,path:[`error`]}),e.status===`completed`&&e.reason!==void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`status 'completed' must not carry a 'reason'`,path:[`reason`]}),e.frame!==void 0&&e.completedAt===void 0&&t.addIssue({code:m.ZodIssueCode.custom,message:`completedAt is required when frame metadata is supplied`,path:[`completedAt`]}),e.frame!==void 0&&e.completedAt!==void 0){let n=e.completedAt-e.frame.startedAt;n<0&&t.addIssue({code:m.ZodIssueCode.custom,message:`completedAt must not precede frame.startedAt`,path:[`completedAt`]}),e.frame.durationMs!==void 0&&e.frame.durationMs!==n&&t.addIssue({code:m.ZodIssueCode.custom,message:`frame.durationMs must equal completedAt - frame.startedAt`,path:[`frame`,`durationMs`]})}}),Kt=m.object({message:m.string().min(1),details:m.string().min(1).optional(),kind:m.string().min(1).optional(),metadata:r.optional()}).strict(),U=m.object({executionId:m.string(),stepId:m.string(),stepType:m.enum([`station`,`delegate-agent`,`delegate-role`,`gate`])}),W=U.extend({stepType:m.literal(`gate`)}),qt=m.discriminatedUnion(`source`,[W.extend({frameId:m.string(),action:m.enum([`approve`,`reject`]),source:m.literal(`user`),reason:m.string().optional()}),W.extend({frameId:m.string(),action:m.enum([`approve`,`reject`]),source:m.literal(`timeout`)}),W.extend({frameId:m.string(),source:m.literal(`cancelled`)})]),Jt=W.extend({executionAttemptId:m.string().optional(),workflowId:m.string(),workflowName:m.string(),title:m.string(),message:m.string(),autoAction:m.enum([`approve`,`reject`]),timeoutMs:m.number().nullable(),openedAt:m.number()}),Yt={getDefinition:{request:m.object({id:m.string()}),response:m.object({workflow:j.nullable()})},setDefinition:{request:m.object({workflow:j}),response:m.object({id:m.string()})},deleteDefinition:{request:m.object({id:m.string()}),response:m.object({deleted:m.boolean()})},listDefinitions:{request:He,response:m.object({workflows:m.array(j)})},"definition.created":j,"definition.updated":j,"definition.deleted":m.object({id:m.string()}),start:{request:m.object({workflowId:m.string(),input:r.optional(),config:r.optional(),artifactRef:_.optional(),scope:C.optional(),parentSessionId:m.string().optional(),triggerPayload:n.optional()}),response:m.object({executionId:m.string()})},rerun:{request:m.object({executionId:m.string().min(1),mode:m.enum([`snapshot`,`current`]),input:r.optional(),config:r.optional(),artifactRef:_.optional(),scope:C.optional(),parentSessionId:m.string().optional(),triggerPayload:n.optional(),reason:m.string().min(1).optional()}),response:m.object({executionId:m.string()})},cancel:{request:m.object({executionId:m.string(),reason:m.string().optional()}),response:m.object({cancelled:m.boolean()})},bootstrapAuthorityState:{request:m.object({executionId:m.string().min(1),terminalAuthority:m.literal(`authority`),definition:j}).strict(),response:m.object({persisted:m.boolean()})},acceptAuthorityRunnerResult:{request:m.object({executionId:m.string().min(1),result:jt.refine(e=>e.status!==`paused`,{message:`Authority runner results must be terminal`})}).strict().superRefine((e,t)=>{e.result.executionId!==e.executionId&&t.addIssue({code:m.ZodIssueCode.custom,path:[`result`,`executionId`],message:`result.executionId must match executionId`})}),response:m.object({accepted:m.boolean(),status:M})},finalizeDelegateResult:{request:ve,response:x},getExecution:{request:m.object({executionId:m.string()}),response:m.object({execution:N.nullable()})},listExecutions:{request:qe,response:m.object({executions:m.array(N)})},listExecutionsByArtifactRefs:{request:Ze,response:m.object({executionsByRef:m.record(m.string(),m.array(N))})},listSpans:{request:m.object({executionId:m.string()}),response:m.object({spans:m.array(ft)})},listGateInstances:{request:Qe,response:m.object({gates:m.array(Be)})},setExecutionLink:{request:m.object({link:L}),response:m.object({id:m.string()})},listExecutionLinks:{request:mt,response:m.object({links:m.array(L)})},listFrames:{request:m.object({executionId:m.string().min(1)}),response:m.object({frames:m.array(ze)})},runFile:{request:m.object({filePath:m.string().min(1),materializationSpec:p.optional(),triggerPayload:n.optional(),triggerMode:B.default(`immediate`),scope:C.optional()}),response:m.object({executionId:m.string()})},registerExternalExecution:{request:Wt,response:m.object({executionId:m.string(),frameId:m.string().optional()})},completeExternalExecution:{request:Gt,response:m.object({success:m.boolean()})},resolveRole:{request:m.object({roleId:m.string().min(1)}),response:F},resolveAgent:{request:m.object({agentId:m.string().min(1)}),response:Ve},getRunContext:{request:m.object({executionId:m.string().min(1)}),response:Pt},"execution.started":m.object({executionId:m.string(),workflowId:m.string(),coordinatorSessionId:m.string().optional(),startedAt:m.number().nonnegative().optional(),artifactRef:_.optional()}),"execution.completed":m.object({executionId:m.string(),workflowId:m.string(),totalDuration:m.number(),completedAt:m.number().nonnegative().optional(),transitionKey:m.string().min(1).optional()}),"execution.failed":m.object({executionId:m.string(),workflowId:m.string(),error:m.string(),failedStepId:m.string().optional(),completedAt:m.number().nonnegative().optional(),transitionKey:m.string().min(1).optional()}),"execution.cancelled":m.object({executionId:m.string(),workflowId:m.string(),reason:m.string().optional(),completedAt:m.number().nonnegative().optional(),transitionKey:m.string().min(1).optional()}),"execution.progress":m.object({executionId:m.string().min(1),workflowId:m.string().min(1),frameId:m.string().min(1),nodeId:m.string().min(1),progress:Kt,emittedAt:m.number().int().nonnegative()}),"execution.paused":g.schema(m.object({executionId:m.string(),workflowId:m.string(),pausedAtGateId:m.string().min(1),pausedAtFrameId:m.string().min(1)}),{traceAll:!0}),"step.beforeStart":U,"step.started":U.extend({sessionId:m.string().optional(),subagentId:m.string().optional()}),"step.completed":U.extend({result:r.optional(),duration:m.number()}),"step.failed":U.extend({error:m.string()}),"step.skipped":U.extend({reason:m.string().optional(),condition:m.string().optional()}),"gate.requested":Jt,"gate.awaitApproval":{request:Jt,response:m.object({action:m.enum([`approve`,`reject`]),source:m.enum([`user`,`timeout`]),reason:m.string().optional()})},"gate.respond":{request:m.object({executionId:m.string(),executionAttemptId:m.string().optional(),gateId:m.string(),action:m.enum([`approve`,`reject`]),frameId:m.string().optional(),resumeData:r,reason:m.string().optional()}),response:m.object({accepted:m.boolean()})},"gate.resolved":qt,"frame.started":m.object({executionId:m.string(),frameId:m.string(),nodeId:m.string(),nodeType:E,path:m.array(m.string()),parentFrameId:m.string().optional(),startedAt:m.number().nonnegative().optional()}),"frame.completed":m.object({executionId:m.string(),frameId:m.string(),nodeId:m.string(),output:r.optional(),duration:m.number().nonnegative().optional(),completedAt:m.number().nonnegative().optional()}),"frame.failed":m.object({executionId:m.string(),frameId:m.string(),nodeId:m.string(),error:m.string(),duration:m.number().nonnegative().optional(),completedAt:m.number().nonnegative().optional()}),"frame.sessionLinked":m.object({executionId:g.attribute(m.string(),`makaio.execution.id`),frameId:g.attribute(m.string(),`makaio.frame.id`),sessionId:g.attribute(m.string(),`makaio.session.id`)}).strict(),"gate.suspended":m.object({executionId:m.string(),executionAttemptId:m.string().optional(),frameId:m.string(),nodeId:m.string(),schema:e,prompt:m.string().optional(),title:m.string().optional(),autoAction:m.enum([`approve`,`reject`]),timeoutMs:m.number().nullable(),openedAt:m.number()}),"gate.resumed":m.object({executionId:m.string(),frameId:m.string(),nodeId:m.string(),resumeData:r}),"dynamic.materialized":m.object({executionId:m.string(),frameId:m.string(),factoryId:m.string().min(1),materializedNodes:m.number().int().nonnegative()}),"artifact.updated":m.object({executionId:m.string(),frameId:m.string(),artifactRef:m.object({kind:m.string().min(1),id:m.string().min(1)}),paths:m.array(m.string()),operation:m.string().min(1),revision:m.string().min(1).optional()}),"worklog.get":{request:m.object({executionId:m.string().min(1)}),response:m.object({summary:H.nullable()})},"worklog.frame.get":{request:m.object({frameId:m.string().min(1)}),response:m.object({frame:Ft.nullable()})},"worklog.list":{request:m.object({workflowId:m.string().min(1).optional(),status:M.optional(),limit:m.number().int().positive().optional(),offset:m.number().int().nonnegative().optional()}),response:m.object({items:m.array(H),total:m.number().int().nonnegative()})},"worklog.stats":{request:m.object({workflowId:m.string().min(1).optional(),since:m.number().int().nonnegative().optional(),until:m.number().int().nonnegative().optional()}),response:m.object({stats:zt})},"worklog.changed":m.object({executionId:m.string().min(1)}),"state.get":{request:m.object({executionId:m.string().min(1)}),response:m.object({executionId:m.string().min(1),sequence:m.number().int().nonnegative(),value:r})},"state.patch":{request:m.object({executionId:m.string().min(1),expectedSequence:m.number().int().nonnegative(),patch:m.array(z),nextValue:r}),response:m.object({executionId:m.string().min(1),sequence:m.number().int().positive(),value:r})},"state.updated":m.object({executionId:m.string().min(1),sequence:m.number().int().positive(),patch:m.array(z),value:r,updatedAt:m.number().int().positive()})},Xt=h(`workflow`,Yt),Zt=Xt.subjects;function Qt(e,t){G(e,t,void 0,0,[],`root`,void 0,void 0)}function G(e,t,n,r,i,a,o,s){let c={parent:n,depth:r,ancestors:i,relationship:a,...o!==void 0&&{index:o},...s!==void 0&&{branchKey:s}};if(t.enter?.(e,c)===!1)return;let l=[...i,e.id],u=r+1;switch(e.type){case`sequence`:{let n=e;for(let r=0;r<n.nodes.length;r++)G(n.nodes[r],t,e,u,l,`sequence-child`,r,void 0);break}case`parallel`:{let n=e;for(let[r,i]of Object.entries(n.branches))G(i,t,e,u,l,`parallel-branch`,void 0,r);break}case`iterate`:G(e.body,t,e,u,l,`iterate-body`,void 0,void 0);break;case`iterate-chain`:G(e.body,t,e,u,l,`iterate-chain-body`,void 0,void 0);break;case`loop`:G(e.body,t,e,u,l,`loop-body`,void 0,void 0);break}t.leave?.(e,c)}function $t(e){switch(e){case`station`:case`delegate-agent`:case`delegate-role`:case`gate`:return`leaf`;case`parallel`:case`iterate`:case`iterate-chain`:case`loop`:return`control`;case`sequence`:return`structural`}}function en(e,t,n){return e===`parallel-branch`&&t!==void 0?[{kind:`branch`,key:t}]:e===`sequence-child`&&n!==void 0?[{kind:`index`,value:n}]:e===`iterate-body`||e===`iterate-chain-body`||e===`loop-body`?[{kind:`body`}]:[]}function tn(e){return e.replace(/\\/g,`\\\\`).replace(/\//g,`\\/`)}function nn(e){return e.map(e=>{switch(e.kind){case`node`:return`n:${tn(e.id)}`;case`branch`:return`b:${tn(e.key)}`;case`index`:return`i:${e.value}`;case`body`:return`body`}}).join(`/`)}function rn(e){let t=[],n=[],r=new Map,i=[],a=[],o=[];return Qt(e.root,{enter(e,s){let c=en(s.relationship,s.branchKey,s.index),l={kind:`node`,id:e.id};i.push(...c,l),o.push(c.length+1);let u=[...i],d=nn(u),f=a.at(-1);if(t.push({key:d,nodeId:e.id,type:e.type,role:$t(e.type),path:u,parentKey:f,...s.branchKey!==void 0&&{branchKey:s.branchKey}}),f!==void 0&&s.parent!==void 0)switch(s.parent.type){case`sequence`:{n.push({sourceKey:f,targetKey:d,kind:`contains`});let e=r.get(f);e!==void 0&&n.push({sourceKey:e,targetKey:d,kind:`sequence`}),r.set(f,d);break}case`parallel`:n.push({sourceKey:f,targetKey:d,kind:`branch`});break;case`iterate`:case`iterate-chain`:case`loop`:n.push({sourceKey:f,targetKey:d,kind:`body`});break;default:n.push({sourceKey:f,targetKey:d,kind:`contains`});break}a.push(d)},leave(){let e=o.pop()??0;i.splice(i.length-e,e),a.pop()}}),{nodes:t,edges:n}}const an=`makaio.bus-event`,on=`makaio.cron`,sn=`UTC`;function K(e,t,n){return{kind:e,params:t,...n.filter!==void 0&&{filter:n.filter},...n.filterExpression!==void 0&&{filterExpression:n.filterExpression}}}function cn(e,n){let r=t.parse(n.params);return e.paramsSchema.parse(r),K(e.kind,r,n)}function ln(e){return K(an,{subject:ie(e.subject)},e)}const un=m.object({schedule:m.string().min(1),timezone:m.string().min(1).default(`UTC`)});function dn(e){return K(on,un.parse(e),{})}function q(e){return J(e.body.nodes,e.id)}function J(e,t){for(let n of e){if(n.type===`loop`)return`Nested loop '${n.id}' found inside loop '${t}' — V1 does not support nested loops`;if(n.type===`sequence`){let e=J(n.nodes,t);if(e)return e}if(n.type===`parallel`)for(let e of Object.values(n.branches)){let n=J(e.nodes,t);if(n)return n}if(n.type===`iterate`||n.type===`iterate-chain`){let e=n.body,r=J(e.nodes,t);if(r)return r}}}const Y=new WeakMap,fn=new WeakMap;function X(e,t,n){let r=Y.get(e);if(r!==void 0&&t.set(e.id,r),e.type===`sequence`)for(let r of e.nodes)X(r,t,n);else if(e.type===`parallel`)for(let r of Object.values(e.branches))X(r,t,n);else if(e.type===`iterate`)X(e.body,t,n);else if(e.type===`iterate-chain`)X(e.body,t,n);else if(e.type===`loop`){if(n!==void 0){let t=fn.get(e);t!==void 0&&n.set(e.gate.handler,t)}X(e.body,t,n)}}function pn(e,t,n){let r={id:e,type:`station`,prompt:e,...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip}};return Y.set(r,t),r}function mn(e,t,n){return{id:e,type:`delegate-agent`,agentId:t.agentId,...t.inputExpression!==void 0&&{inputExpression:t.inputExpression},...t.outputSchema!==void 0&&{outputSchema:t.outputSchema},...t.allowedTools!==void 0&&{allowedTools:t.allowedTools},...t.completion!==void 0&&{completion:t.completion},...t.resultFinalizerId!==void 0&&{resultFinalizerId:t.resultFinalizerId},...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip}}}function hn(e,t,n){return{id:e,type:`delegate-role`,role:t,prompt:n?.prompt??e,...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip},...n?.outputSchema!==void 0&&{outputSchema:n.outputSchema},...n?.timeoutMs!==void 0&&{timeoutMs:n.timeoutMs},...n?.completion!==void 0&&{completion:n.completion},...n?.allowedTools!==void 0&&{allowedTools:n.allowedTools},...n?.resultFinalizerId!==void 0&&{resultFinalizerId:n.resultFinalizerId}}}function gn(e,t){return{id:e,type:`gate`,prompt:t.prompt,autoAction:t.autoAction,timeoutMs:t.timeoutMs,...t.title!==void 0&&{title:t.title},...t.resume!==void 0&&{resumeSchema:c(t.resume)}}}function _n(e,t,n){let r=`${e}__item`,i={id:r,type:`station`,prompt:r},a={id:e,type:`iterate`,collection:n.collection,body:{id:`${e}__body`,type:`sequence`,nodes:[i]},...n.concurrency!==void 0&&{concurrency:n.concurrency},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}};return Y.set(i,t),a}function vn(e,t,n){return{id:e,type:`iterate-chain`,collection:n.collection,body:{id:`${e}__body`,type:`sequence`,nodes:t},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function yn(e,t,n){let r={id:e,type:`loop`,maxRounds:n.maxRounds,body:{id:`${e}__body`,type:`sequence`,nodes:t},gate:bn(n),...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}},i=q(r);if(i!==void 0)throw Error(i);return fn.set(r,n.gate.evaluate),r}function bn(e){let t=e.gate.escalation;return{handler:e.gate.handler,...e.gate.input!==void 0&&{input:e.gate.input},...e.gate.config!==void 0&&{config:e.gate.config},...t!==void 0&&{escalation:{prompt:t.prompt,autoAction:t.autoAction??`reject`,timeoutMs:t.timeoutMs??null,...t.title!==void 0&&{title:t.title},...t.resumeSchema!==void 0&&{resumeSchema:t.resumeSchema}}}}}function Z(e,t){if(e.has(t))throw Error(`Duplicate step ID: ${t}`);e.add(t)}function Q(e,t){if(Z(e,t.id),t.type===`sequence`)for(let n of t.nodes)Q(e,n);else if(t.type===`parallel`)for(let n of Object.values(t.branches))Q(e,n);else (t.type===`iterate`||t.type===`iterate-chain`||t.type===`loop`)&&Q(e,t.body)}function xn(e,t,n,r,i){let a={};return t.forEach((t,o)=>{if(t.id.length===0)throw Error(`parallel branch at index ${o} has an empty ID`);let s=t.id,c=`${e}__${s}`;Q(n,t),Z(n,c),X(t,r,i),a[s]={id:c,type:`sequence`,nodes:[t]}}),a}function Sn(e,t,n,r,i){let a=`${e}__body`,o=`${e}__item`;Z(r,a),Z(r,o),i.set(o,t);let s={id:o,type:`station`,prompt:o};return{id:e,type:`iterate`,collection:n.collection,body:{id:a,type:`sequence`,nodes:[s]},...n.concurrency!==void 0&&{concurrency:n.concurrency},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function Cn(e,t,n){return t.resume!==void 0&&(n[e]=t.resume),{id:e,type:`gate`,prompt:t.prompt,autoAction:t.autoAction,timeoutMs:t.timeoutMs,...t.title!==void 0&&{title:t.title},...t.resume!==void 0&&{resumeSchema:c(t.resume)}}}function wn(e,t,n,r,i,a){let o=`${e}__body`;Z(r,o);for(let e of t)Q(r,e),X(e,i,a);return{id:e,type:`iterate-chain`,collection:n.collection,body:{id:o,type:`sequence`,nodes:t},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function Tn(e,t,n,r,i,a){let o=`${e}__body`;Z(r,o);for(let e of t)Q(r,e),X(e,i,a);let s={id:e,type:`loop`,maxRounds:n.maxRounds,body:{id:o,type:`sequence`,nodes:t},gate:bn(n),...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}},c=q(s);if(c!==void 0)throw Error(c);return a.set(n.gate.handler,n.gate.evaluate),s}function En(e,t){e.input=n=>(t.zodSchemas.input=n,t.definition.inputSchema=c(n),e),e.config=n=>(t.zodSchemas.config=n,t.definition.configSchema=c(n),e),e.output=n=>(t.zodSchemas.output=n,t.definition.outputSchema=c(n),e),e.artifact=n=>(n.schema!==void 0&&(t.zodSchemas.artifact=n.schema),t.definition.artifact={kind:n.kind,schemaVersion:n.schemaVersion,scope:n.scope,...n.resolve!==void 0&&{resolve:n.resolve},...n.create!==void 0&&{create:n.create},...n.statusPath!==void 0&&{statusPath:n.statusPath}},e),e.state=e=>(t.definition.state={schema:e.schema,...e.initial!==void 0&&{initial:e.initial}},$(t))}function Dn(e,t){let{rootNodes:n,runtimeHandlers:r,runtimeLoopGates:i,registeredIds:a,zodGates:o}=t;e.station=(t,i,o)=>(Z(a,t),n.push({id:t,type:`station`,prompt:t,...o?.when!==void 0&&{when:o.when},...o?.skip!==void 0&&{skip:o.skip}}),r.set(t,i),e),e.delegateToAgent=(t,r,i)=>(Z(a,t),n.push(mn(t,r,i)),e),e.delegateToRole=(t,r,i)=>(Z(a,t),n.push(hn(t,r,i)),e),e.parallel=(t,o,s)=>(Z(a,t),n.push({id:t,type:`parallel`,mode:o.mode??`all-settled`,branches:xn(t,s,a,r,i),...o.when!==void 0&&{when:o.when},...o.skip!==void 0&&{skip:o.skip}}),e),e.gate=(t,r)=>(Z(a,t),n.push(Cn(t,r,o)),e),e.iterate=(t,i,o)=>(Z(a,t),n.push(Sn(t,i,o,a,r)),e),e.iterateChain=(t,o,s)=>(Z(a,t),n.push(wn(t,o,s,a,r,i)),e),e.loop=(t,o,s)=>(Z(a,t),n.push(Tn(t,o,s,a,r,i)),e),e.addNode=e=>On(e,a,r,i,n)}function On(e,t,n,r,i){Q(t,e),X(e,n,r),i.push(e)}function $(e){let t={id:e.definition.id,definition:e.definition,runtimeHandlers:e.runtimeHandlers,runtimeFactories:e.runtimeFactories,runtimeLoopGates:e.runtimeLoopGates,source:void 0,get zodSchemas(){return e.zodSchemas},addTrigger(t){return e.triggers.push(t),$(e)}};return En(t,e),Dn(t,e),t}function kn(e,t){let n=[],r=new Map,i=new Map,a=new Set,o={},s={gates:o},c=new Map,l=t?.triggers?[...t.triggers]:[];return $({rootNodes:n,runtimeHandlers:r,runtimeFactories:c,runtimeLoopGates:i,registeredIds:a,zodGates:o,zodSchemas:s,definition:{id:e,...t?.name!==void 0&&{name:t.name},...t?.description!==void 0&&{description:t.description},...t?.successFinalizerId!==void 0&&{successFinalizerId:v.parse(t.successFinalizerId)},root:{id:`${e}__root`,type:`sequence`,nodes:n},triggers:l,scope:{type:`global`}},triggers:l})}function An(e){if(e.workflows.length===0)throw Error(`defineWorkflowBundle: workflows must not be empty`);return{workflows:Object.freeze([...e.workflows])}}const jn=m.enum([`artifact.created`,`artifact.revised`,`artifact.status.changed`]),Mn=m.record(m.string(),r),Nn=m.object({type:m.string().min(1),input:m.record(m.string(),r).optional()}),Pn=m.object({id:m.string().min(1),description:m.string().optional(),on:jn,when:Mn.optional(),action:Nn,enabled:m.boolean().default(!0)});export{St as $,D as $t,Ut as A,M as At,Pt as B,De as Bt,Qt as C,_ as Cn,Ye as Ct,Zt as D,We as Dt,Yt as E,Ge as Et,H as F,we as Ft,At as G,ze as Gt,jt as H,Fe as Ht,Ft as I,Ce as It,bt as J,P as Jt,kt as K,Be as Kt,Lt as L,w as Lt,Wt as M,Qe as Mt,It as N,Ne as Nt,Gt as O,Ue as Ot,Bt as P,T as Pt,Tt as Q,Pe as Qt,zt as R,Ie as Rt,rn as S,ye as Sn,Xe as St,Kt as T,oe as Tn,Ke as Tt,B as U,N as Ut,Mt as V,Oe as Vt,Ot as W,C as Wt,xt as X,je as Xt,wt as Y,Me as Yt,Dt as Z,He as Zt,ln as _,me as _n,ot as _t,An as a,F as an,L as at,dn as b,de as bn,at as bt,hn as c,Le as cn,dt as ct,vn as d,ve as dn,ut as dt,O as en,Et as et,yn as f,b as fn,nt as ft,an as g,pe as gn,lt as gt,cn as h,ge as hn,et as ht,Pn as i,Ve as in,mt as it,Ht as j,Ze as jt,Vt as k,qe as kt,gn as l,A as ln,it as lt,q as m,y as mn,tt as mt,Mn as n,Ee as nn,gt as nt,kn as o,k as on,pt as ot,pn as p,x as pn,rt as pt,Ct as q,Ae as qt,jn as r,ke as rn,ht as rt,mn as s,Te as sn,ft as st,Nn as t,E as tn,z as tt,_n as u,_e as un,ct as ut,on as v,fe as vn,$e as vt,Xt as w,se as wn,Je as wt,sn as x,be as xn,st as xt,un as y,v as yn,I as yt,Rt as z,j as zt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as InitialProviderOperationClaimContextSource, $t as AttemptSettlementSnapshot, A as OperationReportDecision, At as evaluateRuntimeReadiness, B as RecordProvisioningAbsentInput, Bt as snapshotRequestExecutionCancellationInput, C as ExecutionAttemptStatus, Ct as RuntimeOutcomeFenceMismatchError, D as MarkRuntimeReadyInput, Dt as evaluateOperationCompletion, E as InfrastructureFailureDecision, Et as evaluateOperationAdmission, F as ReadBootstrapStartStateInput, Ft as RequestAttemptCancellationInput, G as RuntimeRegistrationDecision, Gt as ReadAttemptCancellationControlInput, H as RegisterRuntimeInput, Ht as AttemptControlEvidence, I as RecordAllocationInput, It as RequestExecutionCancellationInput, J as sameAllocationRef, Jt as evaluateAttemptControlReceipt, K as decodeDurableOutcome, Kt as RecordAttemptControlReceiptInput, L as RecordAllocationTerminatedInput, Lt as evaluateAttemptCancellation, M as PendingAttemptAbandonmentDecision, Mt as AttemptOutcomeControlObservation, Nt as ExecutionAttemptCancellationDecision, O as OperationAdmissionDecision, Ot as evaluatePreparationReport, P as ProvisioningClaimDecision, Pt as ExecutionAttemptCancellationIntent, Q as InitialProviderOperationClaimContext, Qt as AttemptSettlementRead, R as RecordInfrastructureFailureInput, Rt as snapshotAttemptOutcomeControl, S as ExecutionAttemptSettlementKind, St as RuntimeOutcomeFence, T as GetInstructionInput, Tt as evaluateAttemptReachability, U as ReportOperationInput, Ut as AttemptControlEvidenceDecision, V as RecoverableAttemptRecord, Vt as AttemptCancellationControlState, W as RuntimeReadinessDecision, Wt as AttemptControlEvidenceRepository, X as CompleteProviderOperationInput, Xt as snapshotAttemptControlReceipt, Y as sameDurableOutcome, Yt as evaluateAttemptControlReport, Z as HandoffProviderOperationInput, Zt as snapshotAttemptControlReport, _ as EXECUTION_ATTEMPT_STATUSES, _t as isProviderOperationResolved, a as AllocationRefEvolutionDecision, an as replayEnsuredAttempt, at as ProviderOperationClaimDecision, b as ExecutionAttemptRecoveryOperations, bt as AttemptReachability, cn as snapshotReadAttemptSettlementInput, ct as ProviderOperationLeaseRenewal, d as BootstrapStartState, dt as ProviderOperationOwnershipRecord, en as EnsureExecutionAttemptDecision, et as ListOpenProviderOperationsInput, f as CompleteOperationInput, ft as ProvisionerIncarnationLossDecision, g as EXECUTION_ATTEMPT_SETTLEMENT_KINDS, gt as TakeOverProviderOperationInput, h as DurableOutcome, ht as RenewProviderOperationClaimInput, i as AllocationRefEvolution, in as readAttemptSettlementSnapshot, it as ProviderOperationClaim, j as OutcomeCodec, jt as evaluateRuntimeRegistration, k as OperationCompletionDecision, kt as evaluateProvisionerIncarnationLoss, l as AttemptOperationStartGate, lt as ProviderOperationMutationDecision, m as DuplicateExecutionAttemptError, mt as RecordProviderOperationUncertaintyInput, n as AdmitOperationInput, nn as EnsureExecutionAttemptPersistenceInput, nt as PROVIDER_OPERATION_OBLIGATIONS, o as AllocationTerminationDecision, on as snapshotEnsureExecutionAttemptInput, ot as ProviderOperationCompletionDecision, p as DiscoveredAllocationDecision, pt as ProvisioningAbsenceDecision, q as durableOutcome, qt as ReportAttemptControlInput, r as AllocationRecordingDecision, rn as ReadAttemptSettlementInput, rt as ProcessBoundProvisionerLossProof, s as AttemptControlState, sn as snapshotEnsureExecutionAttemptPersistenceInput, st as ProviderOperationLeasePolicy, t as ATTEMPT_OPERATION_START_GATES, tn as EnsureExecutionAttemptInput, tt as OpenProviderOperationRecord, u as BeginProvisioningInput, ut as ProviderOperationObligation, v as ExecutionAttemptCreate, vt as ExecutionAttemptOutcomeCommit, w as ExecutionOwnerId, wt as assertRuntimeOutcomeFence, x as ExecutionAttemptRepository, xt as AttemptReachabilityDecision, y as ExecutionAttemptRecord, yt as ExecutionAttemptOutcomeDecision, z as RecordProvisionerIncarnationLostInput, zt as snapshotRequestAttemptCancellationInput } from "../execution-attempt-repository-BUah8hma.mjs";
|
|
2
|
-
import { A as BootstrapStartOptions, C as OutcomeAcceptance, D as submitAttemptOutcome, E as OutcomePreCommitValidation, M as WorkflowMaterializationSpecResolver, N as WorkflowWorkspaceRootResolver, O as ExecutionAttemptAuthority, P as registerDrizzleWorkflowStorage, S as AttemptOutcomeSubmissionDeps, T as OutcomeConvergenceInput, _ as AttemptOutcomeDecodingInput, a as WorkflowEngineServiceOptions, b as AcceptedAttemptOutcome, c as CommittedWorkflowOutcomeIdentity, d as WorkflowAttemptOutcomeSchema, f as WorkflowAttemptTechnicalFailure, g as workflowAttemptOutcomeCodec, h as toCommittedWorkflowRunnerResult, i as WorkflowEngineService, j as WorkflowMaterializationSpecResolution, k as BootstrapStartAuthority, l as WorkflowAttemptCancellation, m as toCommittedWorkflowRunnerCompletion, n as createWorkflowEnginePackage, o as WorkflowTriggerReconciler, p as decodeWorkflowAttemptOutcome, r as workflowEnginePackage, s as WorkflowExecutor, t as WorkflowEngineToken, u as WorkflowAttemptOutcome, v as ExecutionAttemptHandlersDeps, w as OutcomeConvergence, x as AttemptOutcomeSubmission, y as registerExecutionAttemptHandlers } from "../package-
|
|
2
|
+
import { A as BootstrapStartOptions, C as OutcomeAcceptance, D as submitAttemptOutcome, E as OutcomePreCommitValidation, M as WorkflowMaterializationSpecResolver, N as WorkflowWorkspaceRootResolver, O as ExecutionAttemptAuthority, P as registerDrizzleWorkflowStorage, S as AttemptOutcomeSubmissionDeps, T as OutcomeConvergenceInput, _ as AttemptOutcomeDecodingInput, a as WorkflowEngineServiceOptions, b as AcceptedAttemptOutcome, c as CommittedWorkflowOutcomeIdentity, d as WorkflowAttemptOutcomeSchema, f as WorkflowAttemptTechnicalFailure, g as workflowAttemptOutcomeCodec, h as toCommittedWorkflowRunnerResult, i as WorkflowEngineService, j as WorkflowMaterializationSpecResolution, k as BootstrapStartAuthority, l as WorkflowAttemptCancellation, m as toCommittedWorkflowRunnerCompletion, n as createWorkflowEnginePackage, o as WorkflowTriggerReconciler, p as decodeWorkflowAttemptOutcome, r as workflowEnginePackage, s as WorkflowExecutor, t as WorkflowEngineToken, u as WorkflowAttemptOutcome, v as ExecutionAttemptHandlersDeps, w as OutcomeConvergence, x as AttemptOutcomeSubmission, y as registerExecutionAttemptHandlers } from "../package-D-oIvXJD.mjs";
|
|
3
3
|
import { WorkflowTriggerPayloadPredicate, assertWorkflowTriggerPayload, compileWorkflowTriggerBindingFilter } from "./workflow-trigger-binding-consumer.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
@@ -835,8 +835,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
835
835
|
pending: "pending";
|
|
836
836
|
completed: "completed";
|
|
837
837
|
cancelled: "cancelled";
|
|
838
|
-
failed: "failed";
|
|
839
838
|
running: "running";
|
|
839
|
+
failed: "failed";
|
|
840
840
|
paused: "paused";
|
|
841
841
|
finalizing: "finalizing";
|
|
842
842
|
}>;
|
|
@@ -877,8 +877,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
877
877
|
pending: "pending";
|
|
878
878
|
completed: "completed";
|
|
879
879
|
cancelled: "cancelled";
|
|
880
|
-
failed: "failed";
|
|
881
880
|
running: "running";
|
|
881
|
+
failed: "failed";
|
|
882
882
|
paused: "paused";
|
|
883
883
|
finalizing: "finalizing";
|
|
884
884
|
}>;
|
|
@@ -926,8 +926,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
926
926
|
pending: "pending";
|
|
927
927
|
completed: "completed";
|
|
928
928
|
cancelled: "cancelled";
|
|
929
|
-
failed: "failed";
|
|
930
929
|
running: "running";
|
|
930
|
+
failed: "failed";
|
|
931
931
|
paused: "paused";
|
|
932
932
|
finalizing: "finalizing";
|
|
933
933
|
}>;
|
|
@@ -1266,8 +1266,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1266
1266
|
pending: "pending";
|
|
1267
1267
|
completed: "completed";
|
|
1268
1268
|
cancelled: "cancelled";
|
|
1269
|
-
failed: "failed";
|
|
1270
1269
|
running: "running";
|
|
1270
|
+
failed: "failed";
|
|
1271
1271
|
paused: "paused";
|
|
1272
1272
|
finalizing: "finalizing";
|
|
1273
1273
|
}>>;
|
|
@@ -1420,6 +1420,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1420
1420
|
cancelled: z.ZodBoolean;
|
|
1421
1421
|
gates: z.ZodArray<z.ZodObject<{
|
|
1422
1422
|
executionId: z.ZodString;
|
|
1423
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1423
1424
|
nodeId: z.ZodString;
|
|
1424
1425
|
frameId: z.ZodString;
|
|
1425
1426
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1463,8 +1464,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1463
1464
|
pending: "pending";
|
|
1464
1465
|
completed: "completed";
|
|
1465
1466
|
cancelled: "cancelled";
|
|
1466
|
-
failed: "failed";
|
|
1467
1467
|
running: "running";
|
|
1468
|
+
failed: "failed";
|
|
1468
1469
|
paused: "paused";
|
|
1469
1470
|
finalizing: "finalizing";
|
|
1470
1471
|
}>>;
|
|
@@ -1487,8 +1488,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1487
1488
|
pending: "pending";
|
|
1488
1489
|
completed: "completed";
|
|
1489
1490
|
cancelled: "cancelled";
|
|
1490
|
-
failed: "failed";
|
|
1491
1491
|
running: "running";
|
|
1492
|
+
failed: "failed";
|
|
1492
1493
|
paused: "paused";
|
|
1493
1494
|
finalizing: "finalizing";
|
|
1494
1495
|
}>;
|
|
@@ -1540,8 +1541,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1540
1541
|
pending: "pending";
|
|
1541
1542
|
completed: "completed";
|
|
1542
1543
|
cancelled: "cancelled";
|
|
1543
|
-
failed: "failed";
|
|
1544
1544
|
running: "running";
|
|
1545
|
+
failed: "failed";
|
|
1545
1546
|
paused: "paused";
|
|
1546
1547
|
finalizing: "finalizing";
|
|
1547
1548
|
}>;
|
|
@@ -1601,8 +1602,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1601
1602
|
pending: "pending";
|
|
1602
1603
|
completed: "completed";
|
|
1603
1604
|
cancelled: "cancelled";
|
|
1604
|
-
failed: "failed";
|
|
1605
1605
|
running: "running";
|
|
1606
|
+
failed: "failed";
|
|
1606
1607
|
skipped: "skipped";
|
|
1607
1608
|
waiting: "waiting";
|
|
1608
1609
|
}>;
|
|
@@ -1647,8 +1648,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1647
1648
|
pending: "pending";
|
|
1648
1649
|
completed: "completed";
|
|
1649
1650
|
cancelled: "cancelled";
|
|
1650
|
-
failed: "failed";
|
|
1651
1651
|
running: "running";
|
|
1652
|
+
failed: "failed";
|
|
1652
1653
|
skipped: "skipped";
|
|
1653
1654
|
waiting: "waiting";
|
|
1654
1655
|
}>;
|
|
@@ -1690,8 +1691,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1690
1691
|
pending: "pending";
|
|
1691
1692
|
completed: "completed";
|
|
1692
1693
|
cancelled: "cancelled";
|
|
1693
|
-
failed: "failed";
|
|
1694
1694
|
running: "running";
|
|
1695
|
+
failed: "failed";
|
|
1695
1696
|
skipped: "skipped";
|
|
1696
1697
|
waiting: "waiting";
|
|
1697
1698
|
}>;
|
|
@@ -1713,6 +1714,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1713
1714
|
request: z.ZodObject<{
|
|
1714
1715
|
gate: z.ZodObject<{
|
|
1715
1716
|
executionId: z.ZodString;
|
|
1717
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1716
1718
|
nodeId: z.ZodString;
|
|
1717
1719
|
frameId: z.ZodString;
|
|
1718
1720
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1750,6 +1752,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1750
1752
|
request: z.ZodObject<{
|
|
1751
1753
|
gate: z.ZodObject<{
|
|
1752
1754
|
executionId: z.ZodString;
|
|
1755
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1753
1756
|
nodeId: z.ZodString;
|
|
1754
1757
|
frameId: z.ZodString;
|
|
1755
1758
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1811,6 +1814,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1811
1814
|
}, z.core.$strip>;
|
|
1812
1815
|
gate: z.ZodObject<{
|
|
1813
1816
|
executionId: z.ZodString;
|
|
1817
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1814
1818
|
nodeId: z.ZodString;
|
|
1815
1819
|
frameId: z.ZodString;
|
|
1816
1820
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1845,6 +1849,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1845
1849
|
response: z.ZodObject<{
|
|
1846
1850
|
gate: z.ZodNullable<z.ZodObject<{
|
|
1847
1851
|
executionId: z.ZodString;
|
|
1852
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1848
1853
|
nodeId: z.ZodString;
|
|
1849
1854
|
frameId: z.ZodString;
|
|
1850
1855
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1886,6 +1891,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1886
1891
|
response: z.ZodObject<{
|
|
1887
1892
|
gates: z.ZodArray<z.ZodObject<{
|
|
1888
1893
|
executionId: z.ZodString;
|
|
1894
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1889
1895
|
nodeId: z.ZodString;
|
|
1890
1896
|
frameId: z.ZodString;
|
|
1891
1897
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1921,6 +1927,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1921
1927
|
response: z.ZodObject<{
|
|
1922
1928
|
gates: z.ZodArray<z.ZodObject<{
|
|
1923
1929
|
executionId: z.ZodString;
|
|
1930
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
1924
1931
|
nodeId: z.ZodString;
|
|
1925
1932
|
frameId: z.ZodString;
|
|
1926
1933
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -1958,8 +1965,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1958
1965
|
}>;
|
|
1959
1966
|
status: z.ZodEnum<{
|
|
1960
1967
|
completed: "completed";
|
|
1961
|
-
failed: "failed";
|
|
1962
1968
|
running: "running";
|
|
1969
|
+
failed: "failed";
|
|
1963
1970
|
skipped: "skipped";
|
|
1964
1971
|
}>;
|
|
1965
1972
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1994,8 +2001,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1994
2001
|
}>;
|
|
1995
2002
|
status: z.ZodEnum<{
|
|
1996
2003
|
completed: "completed";
|
|
1997
|
-
failed: "failed";
|
|
1998
2004
|
running: "running";
|
|
2005
|
+
failed: "failed";
|
|
1999
2006
|
skipped: "skipped";
|
|
2000
2007
|
}>;
|
|
2001
2008
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3058,7 +3065,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3058
3065
|
tableName: "workflow_executions";
|
|
3059
3066
|
dataType: "string";
|
|
3060
3067
|
columnType: "SQLiteText";
|
|
3061
|
-
data: "pending" | "completed" | "cancelled" | "
|
|
3068
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "paused" | "finalizing";
|
|
3062
3069
|
driverParam: string;
|
|
3063
3070
|
notNull: true;
|
|
3064
3071
|
hasDefault: false;
|
|
@@ -3385,7 +3392,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3385
3392
|
tableName: "workflow_execution_frames";
|
|
3386
3393
|
dataType: "string";
|
|
3387
3394
|
columnType: "SQLiteText";
|
|
3388
|
-
data: "pending" | "completed" | "cancelled" | "
|
|
3395
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "skipped" | "waiting";
|
|
3389
3396
|
driverParam: string;
|
|
3390
3397
|
notNull: true;
|
|
3391
3398
|
hasDefault: true;
|
|
@@ -3398,7 +3405,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3398
3405
|
generated: undefined;
|
|
3399
3406
|
}, {}, {
|
|
3400
3407
|
length: number | undefined;
|
|
3401
|
-
$type: "pending" | "completed" | "cancelled" | "
|
|
3408
|
+
$type: "pending" | "completed" | "cancelled" | "running" | "failed" | "skipped" | "waiting";
|
|
3402
3409
|
}>;
|
|
3403
3410
|
attempt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3404
3411
|
name: string;
|
|
@@ -3587,6 +3594,25 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3587
3594
|
}, {}, {
|
|
3588
3595
|
length: number | undefined;
|
|
3589
3596
|
}>;
|
|
3597
|
+
executionAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3598
|
+
name: "execution_attempt_id";
|
|
3599
|
+
tableName: "workflow_gate_instances";
|
|
3600
|
+
dataType: "string";
|
|
3601
|
+
columnType: "SQLiteText";
|
|
3602
|
+
data: string;
|
|
3603
|
+
driverParam: string;
|
|
3604
|
+
notNull: false;
|
|
3605
|
+
hasDefault: false;
|
|
3606
|
+
isPrimaryKey: false;
|
|
3607
|
+
isAutoincrement: false;
|
|
3608
|
+
hasRuntimeDefault: false;
|
|
3609
|
+
enumValues: [string, ...string[]];
|
|
3610
|
+
baseColumn: never;
|
|
3611
|
+
identity: undefined;
|
|
3612
|
+
generated: undefined;
|
|
3613
|
+
}, {}, {
|
|
3614
|
+
length: number | undefined;
|
|
3615
|
+
}>;
|
|
3590
3616
|
nodeId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3591
3617
|
name: "node_id";
|
|
3592
3618
|
tableName: "workflow_gate_instances";
|
|
@@ -3896,7 +3922,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3896
3922
|
tableName: "workflow_step_spans";
|
|
3897
3923
|
dataType: "string";
|
|
3898
3924
|
columnType: "SQLiteText";
|
|
3899
|
-
data: "completed" | "
|
|
3925
|
+
data: "completed" | "running" | "failed" | "skipped";
|
|
3900
3926
|
driverParam: string;
|
|
3901
3927
|
notNull: true;
|
|
3902
3928
|
hasDefault: false;
|
|
@@ -3909,7 +3935,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3909
3935
|
generated: undefined;
|
|
3910
3936
|
}, {}, {
|
|
3911
3937
|
length: number | undefined;
|
|
3912
|
-
$type: "completed" | "
|
|
3938
|
+
$type: "completed" | "running" | "failed" | "skipped";
|
|
3913
3939
|
}>;
|
|
3914
3940
|
startedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3915
3941
|
name: string;
|
|
@@ -4918,7 +4944,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
4918
4944
|
tableName: "worklog_summaries";
|
|
4919
4945
|
dataType: "string";
|
|
4920
4946
|
columnType: "SQLiteText";
|
|
4921
|
-
data: "pending" | "completed" | "cancelled" | "
|
|
4947
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "paused" | "finalizing";
|
|
4922
4948
|
driverParam: string;
|
|
4923
4949
|
notNull: true;
|
|
4924
4950
|
hasDefault: false;
|
|
@@ -5180,7 +5206,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
5180
5206
|
tableName: "worklog_frame_entries";
|
|
5181
5207
|
dataType: "string";
|
|
5182
5208
|
columnType: "SQLiteText";
|
|
5183
|
-
data: "pending" | "completed" | "cancelled" | "
|
|
5209
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "skipped" | "waiting";
|
|
5184
5210
|
driverParam: string;
|
|
5185
5211
|
notNull: true;
|
|
5186
5212
|
hasDefault: false;
|
|
@@ -6014,7 +6040,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
6014
6040
|
tableName: "workflow_finalizations";
|
|
6015
6041
|
dataType: "string";
|
|
6016
6042
|
columnType: "SQLiteText";
|
|
6017
|
-
data: "
|
|
6043
|
+
data: "failed" | "acknowledged" | "claimed";
|
|
6018
6044
|
driverParam: string;
|
|
6019
6045
|
notNull: true;
|
|
6020
6046
|
hasDefault: false;
|
|
@@ -6458,8 +6484,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6458
6484
|
pending: "pending";
|
|
6459
6485
|
completed: "completed";
|
|
6460
6486
|
cancelled: "cancelled";
|
|
6461
|
-
failed: "failed";
|
|
6462
6487
|
running: "running";
|
|
6488
|
+
failed: "failed";
|
|
6463
6489
|
paused: "paused";
|
|
6464
6490
|
finalizing: "finalizing";
|
|
6465
6491
|
}>;
|
|
@@ -6500,8 +6526,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6500
6526
|
pending: "pending";
|
|
6501
6527
|
completed: "completed";
|
|
6502
6528
|
cancelled: "cancelled";
|
|
6503
|
-
failed: "failed";
|
|
6504
6529
|
running: "running";
|
|
6530
|
+
failed: "failed";
|
|
6505
6531
|
paused: "paused";
|
|
6506
6532
|
finalizing: "finalizing";
|
|
6507
6533
|
}>;
|
|
@@ -6549,8 +6575,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6549
6575
|
pending: "pending";
|
|
6550
6576
|
completed: "completed";
|
|
6551
6577
|
cancelled: "cancelled";
|
|
6552
|
-
failed: "failed";
|
|
6553
6578
|
running: "running";
|
|
6579
|
+
failed: "failed";
|
|
6554
6580
|
paused: "paused";
|
|
6555
6581
|
finalizing: "finalizing";
|
|
6556
6582
|
}>;
|
|
@@ -6889,8 +6915,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6889
6915
|
pending: "pending";
|
|
6890
6916
|
completed: "completed";
|
|
6891
6917
|
cancelled: "cancelled";
|
|
6892
|
-
failed: "failed";
|
|
6893
6918
|
running: "running";
|
|
6919
|
+
failed: "failed";
|
|
6894
6920
|
paused: "paused";
|
|
6895
6921
|
finalizing: "finalizing";
|
|
6896
6922
|
}>>;
|
|
@@ -7043,6 +7069,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7043
7069
|
cancelled: z.ZodBoolean;
|
|
7044
7070
|
gates: z.ZodArray<z.ZodObject<{
|
|
7045
7071
|
executionId: z.ZodString;
|
|
7072
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7046
7073
|
nodeId: z.ZodString;
|
|
7047
7074
|
frameId: z.ZodString;
|
|
7048
7075
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7086,8 +7113,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7086
7113
|
pending: "pending";
|
|
7087
7114
|
completed: "completed";
|
|
7088
7115
|
cancelled: "cancelled";
|
|
7089
|
-
failed: "failed";
|
|
7090
7116
|
running: "running";
|
|
7117
|
+
failed: "failed";
|
|
7091
7118
|
paused: "paused";
|
|
7092
7119
|
finalizing: "finalizing";
|
|
7093
7120
|
}>>;
|
|
@@ -7110,8 +7137,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7110
7137
|
pending: "pending";
|
|
7111
7138
|
completed: "completed";
|
|
7112
7139
|
cancelled: "cancelled";
|
|
7113
|
-
failed: "failed";
|
|
7114
7140
|
running: "running";
|
|
7141
|
+
failed: "failed";
|
|
7115
7142
|
paused: "paused";
|
|
7116
7143
|
finalizing: "finalizing";
|
|
7117
7144
|
}>;
|
|
@@ -7163,8 +7190,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7163
7190
|
pending: "pending";
|
|
7164
7191
|
completed: "completed";
|
|
7165
7192
|
cancelled: "cancelled";
|
|
7166
|
-
failed: "failed";
|
|
7167
7193
|
running: "running";
|
|
7194
|
+
failed: "failed";
|
|
7168
7195
|
paused: "paused";
|
|
7169
7196
|
finalizing: "finalizing";
|
|
7170
7197
|
}>;
|
|
@@ -7224,8 +7251,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7224
7251
|
pending: "pending";
|
|
7225
7252
|
completed: "completed";
|
|
7226
7253
|
cancelled: "cancelled";
|
|
7227
|
-
failed: "failed";
|
|
7228
7254
|
running: "running";
|
|
7255
|
+
failed: "failed";
|
|
7229
7256
|
skipped: "skipped";
|
|
7230
7257
|
waiting: "waiting";
|
|
7231
7258
|
}>;
|
|
@@ -7270,8 +7297,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7270
7297
|
pending: "pending";
|
|
7271
7298
|
completed: "completed";
|
|
7272
7299
|
cancelled: "cancelled";
|
|
7273
|
-
failed: "failed";
|
|
7274
7300
|
running: "running";
|
|
7301
|
+
failed: "failed";
|
|
7275
7302
|
skipped: "skipped";
|
|
7276
7303
|
waiting: "waiting";
|
|
7277
7304
|
}>;
|
|
@@ -7313,8 +7340,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7313
7340
|
pending: "pending";
|
|
7314
7341
|
completed: "completed";
|
|
7315
7342
|
cancelled: "cancelled";
|
|
7316
|
-
failed: "failed";
|
|
7317
7343
|
running: "running";
|
|
7344
|
+
failed: "failed";
|
|
7318
7345
|
skipped: "skipped";
|
|
7319
7346
|
waiting: "waiting";
|
|
7320
7347
|
}>;
|
|
@@ -7336,6 +7363,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7336
7363
|
request: z.ZodObject<{
|
|
7337
7364
|
gate: z.ZodObject<{
|
|
7338
7365
|
executionId: z.ZodString;
|
|
7366
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7339
7367
|
nodeId: z.ZodString;
|
|
7340
7368
|
frameId: z.ZodString;
|
|
7341
7369
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7373,6 +7401,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7373
7401
|
request: z.ZodObject<{
|
|
7374
7402
|
gate: z.ZodObject<{
|
|
7375
7403
|
executionId: z.ZodString;
|
|
7404
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7376
7405
|
nodeId: z.ZodString;
|
|
7377
7406
|
frameId: z.ZodString;
|
|
7378
7407
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7434,6 +7463,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7434
7463
|
}, z.core.$strip>;
|
|
7435
7464
|
gate: z.ZodObject<{
|
|
7436
7465
|
executionId: z.ZodString;
|
|
7466
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7437
7467
|
nodeId: z.ZodString;
|
|
7438
7468
|
frameId: z.ZodString;
|
|
7439
7469
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7468,6 +7498,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7468
7498
|
response: z.ZodObject<{
|
|
7469
7499
|
gate: z.ZodNullable<z.ZodObject<{
|
|
7470
7500
|
executionId: z.ZodString;
|
|
7501
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7471
7502
|
nodeId: z.ZodString;
|
|
7472
7503
|
frameId: z.ZodString;
|
|
7473
7504
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7509,6 +7540,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7509
7540
|
response: z.ZodObject<{
|
|
7510
7541
|
gates: z.ZodArray<z.ZodObject<{
|
|
7511
7542
|
executionId: z.ZodString;
|
|
7543
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7512
7544
|
nodeId: z.ZodString;
|
|
7513
7545
|
frameId: z.ZodString;
|
|
7514
7546
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7544,6 +7576,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7544
7576
|
response: z.ZodObject<{
|
|
7545
7577
|
gates: z.ZodArray<z.ZodObject<{
|
|
7546
7578
|
executionId: z.ZodString;
|
|
7579
|
+
executionAttemptId: z.ZodOptional<z.ZodString>;
|
|
7547
7580
|
nodeId: z.ZodString;
|
|
7548
7581
|
frameId: z.ZodString;
|
|
7549
7582
|
schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
@@ -7581,8 +7614,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7581
7614
|
}>;
|
|
7582
7615
|
status: z.ZodEnum<{
|
|
7583
7616
|
completed: "completed";
|
|
7584
|
-
failed: "failed";
|
|
7585
7617
|
running: "running";
|
|
7618
|
+
failed: "failed";
|
|
7586
7619
|
skipped: "skipped";
|
|
7587
7620
|
}>;
|
|
7588
7621
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -7617,8 +7650,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
7617
7650
|
}>;
|
|
7618
7651
|
status: z.ZodEnum<{
|
|
7619
7652
|
completed: "completed";
|
|
7620
|
-
failed: "failed";
|
|
7621
7653
|
running: "running";
|
|
7654
|
+
failed: "failed";
|
|
7622
7655
|
skipped: "skipped";
|
|
7623
7656
|
}>;
|
|
7624
7657
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -8408,7 +8441,7 @@ declare const workflowStepSpansDual: _$_makaio_storage_drizzle0.DualTable<"workf
|
|
|
8408
8441
|
frameId: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"frame_id", [string, ...string[]], number | undefined>>, _$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"frame_id", [string, ...string[]]>>>; /** Step identifier within the workflow definition. */
|
|
8409
8442
|
stepId: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"step_id", [string, ...string[]], number | undefined>>, _$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"step_id", [string, ...string[]]>>>; /** Step type discriminant. */
|
|
8410
8443
|
stepType: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"step_type", [string, ...string[]], number | undefined>>, _$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"step_type", [string, ...string[]]>>>; /** Current span status. */
|
|
8411
|
-
status: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm0.$Type<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"status", [string, ...string[]], number | undefined>, "completed" | "
|
|
8444
|
+
status: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm0.$Type<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"status", [string, ...string[]], number | undefined>, "completed" | "running" | "failed" | "skipped">>, _$drizzle_orm0.NotNull<_$drizzle_orm0.$Type<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"status", [string, ...string[]]>, "completed" | "running" | "failed" | "skipped">>>; /** Step start timestamp (epoch ms). */
|
|
8412
8445
|
startedAt: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm_sqlite_core0.SQLiteIntegerBuilderInitial<string>, _$drizzle_orm_pg_core0.PgBigInt53BuilderInitial<string>>; /** Step completion timestamp (epoch ms). */
|
|
8413
8446
|
completedAt: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm_sqlite_core0.SQLiteIntegerBuilderInitial<string>, _$drizzle_orm_pg_core0.PgBigInt53BuilderInitial<string>>; /** Wall-clock duration in milliseconds. */
|
|
8414
8447
|
durationMs: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm_sqlite_core0.SQLiteIntegerBuilderInitial<string>, _$drizzle_orm_pg_core0.PgIntegerBuilderInitial<string>>; /** Input tokens consumed (agent steps). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t,Ct as n,D as r,Dt as i,E as a,G as o,K as s,Nt as c,O as l,S as u,T as d,Tt as ee,Y as te,at as ne,b as re,dt as f,ht as p,jt as m,kt as h,q as g,rt as _,tt as v,v as y,w as b,x,xt as S,y as C,yt as w}from"../authority-state-bootstrap-
|
|
1
|
+
import{B as e,C as t,Ct as n,D as r,Dt as i,E as a,G as o,K as s,Nt as c,O as l,S as u,T as d,Tt as ee,Y as te,at as ne,b as re,dt as f,ht as p,jt as m,kt as h,q as g,rt as _,tt as v,v as y,w as b,x,xt as S,y as C,yt as w}from"../authority-state-bootstrap-CvuWPywM.mjs";import{_ as T,a as E,c as D,d as O,f as k,g as A,h as j,i as M,l as N,m as P,n as F,o as I,p as L,r as R,s as z,t as B,u as V}from"../package-DYScYC0D.mjs";import{_ as H,a as U,b as W,c as G,d as K,f as q,g as J,h as Y,i as X,l as ie,m as ae,n as oe,o as se,p as ce,r as le,s as ue,t as de,u as fe,v as pe,x as me,y as he}from"../execution-attempt-repository-aabFKcXN.mjs";import{assertWorkflowTriggerPayload as ge,compileWorkflowTriggerBindingFilter as _e}from"./workflow-trigger-binding-consumer.mjs";import{a as ve,i as ye,n as be,r as xe,t as Se}from"../execution-attempt-owner-recovery-CE_rvHKE.mjs";import{i as Ce,n as we,r as Te,t as Ee}from"../attempt-control-evidence-7lwRG73Y.mjs";import{PROVIDER_OPERATION_OBLIGATIONS as De,isProviderOperationResolved as Oe}from"./provider-operation.mjs";import{ExecutionAttemptControlDeliveryResponseSchema as ke,ExecutionAttemptSubjects as Z,JsonValueSchema as Q,WorkflowFrameStateSchema as Ae}from"@makaio/framework/contracts";function je(e,t){return t.executionAttemptId===e.executionAttemptId&&t.runtimeIncarnationId===e.runtimeIncarnationId&&t.runtimeGeneration===e.runtimeGeneration&&t.controlRevision===e.cancellation.controlRevision&&t.requestKey===e.cancellation.requestKey}async function Me(e,t){let{executionId:n,executionAttemptId:r,timeoutMs:i,signal:a}=t;if(!Number.isSafeInteger(i)||i<=0)throw TypeError(`timeoutMs must be a positive safe integer`);if(a?.aborted)return{kind:`aborted`};let o=await e.authority.readAttemptCancellationControl({executionId:n,executionAttemptId:r});if(a?.aborted)return{kind:`aborted`};if(o===null)return{kind:`not-found`};if(o.cancellation===null)return{kind:`not-requested`};let{runtimeGeneration:s,runtimeIncarnationId:c}=o.control;if(c===null||s===0)return{kind:`runtime-unregistered`};let l=o.evidence.find(e=>e.controlRevision===o.cancellation?.controlRevision&&e.runtimeGeneration===s);if(l?.receipt&&l.report)return{kind:`evidence-complete`};let u={executionAttemptId:r,runtimeIncarnationId:c,runtimeGeneration:s,cancellation:o.cancellation},d;try{d=ke.parse(await e.bus.request(Z.control.deliver,u,{timeout:i,signal:a}))}catch{return{kind:a?.aborted?`aborted`:`unavailable`}}return d.decision===`refused`?{kind:`refused`,reason:d.reason}:je(u,d.receipt)?{kind:`received`,persistence:await e.authority.recordAttemptControlReceipt({...d.receipt,executionId:n})}:{kind:`invalid-receipt`}}const Ne=new Set([...Ae.shape.status.options]);function $(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pe(e){if(!$(e))return!1;for(let t of Object.values(e))if(!$(t)||typeof t.status!=`string`||!Ne.has(t.status)||`result`in t&&t.result!==void 0&&!Q.safeParse(t.result).success)return!1;return!0}function Fe(e){let t={trigger:$(e.trigger)?e.trigger:{},steps:Pe(e.steps)?e.steps:{},inputs:Q.safeParse(e.inputs).success?e.inputs:{}};return`item`in e&&(t.item=e.item),typeof e.index==`number`&&(t.index=e.index),t}export{de as ATTEMPT_OPERATION_START_GATES,oe as DuplicateExecutionAttemptError,le as EXECUTION_ATTEMPT_SETTLEMENT_KINDS,X as EXECUTION_ATTEMPT_STATUSES,E as ExecutionAttemptAuthority,De as PROVIDER_OPERATION_OBLIGATIONS,N as RUNTIME_PROBE_DELIVERY_TIMEOUT_MS,ce as RuntimeOutcomeFenceMismatchError,t as WORKFLOW_WORKLOAD_KIND,b as WORKFLOW_WORKLOAD_VERSION,y as WorkflowAttemptOutcomeSchema,M as WorkflowEngineService,B as WorkflowEngineToken,z as WorkflowExecutor,d as WorkflowInvocationInputSchema,s as WorkflowStorageNamespace,g as WorkflowStorageSubjects,I as WorkflowTriggerReconciler,S as activeExecutionAttemptsDual,ae as assertRuntimeOutcomeFence,ge as assertWorkflowTriggerPayload,a as buildWorkflowAttemptInstruction,Fe as buildWorkflowExpressionContextFromResolvedInputs,_e as compileWorkflowTriggerBindingFilter,F as createWorkflowEnginePackage,U as decodeDurableOutcome,C as decodeWorkflowAttemptOutcome,se as durableOutcome,ie as evaluateAttemptCancellation,Ee as evaluateAttemptControlReceipt,we as evaluateAttemptControlReport,Y as evaluateAttemptReachability,J as evaluateOperationAdmission,H as evaluateOperationCompletion,pe as evaluatePreparationReport,he as evaluateProvisionerIncarnationLoss,W as evaluateRuntimeReadiness,me as evaluateRuntimeRegistration,n as executionAttemptCancellationsDual,ee as executionAttemptControlEvidenceDual,i as executionAttemptRequestsDual,h as executionAttemptsDual,j as getWorkflowState,A as initializeWorkflowState,Oe as isProviderOperationResolved,r as parseWorkflowAttemptInstruction,T as patchWorkflowState,m as providerOperationsDual,Se as readAttemptSettlementSnapshot,Me as reconcileAttemptCancellation,D as registerBootstrapStartHandler,P as registerDrizzleWorkflowStorage,k as registerExecutionAttemptHandlers,O as registerOperationAdmissionHandler,V as registerRuntimeRegistrationHandler,be as replayEnsuredAttempt,o as resolveExecutionAttemptPeer,l as runAuthorityDispatchedAttempt,e as runShellStep,ue as sameAllocationRef,G as sameDurableOutcome,Te as snapshotAttemptControlReceipt,Ce as snapshotAttemptControlReport,fe as snapshotAttemptOutcomeControl,xe as snapshotEnsureExecutionAttemptInput,ye as snapshotEnsureExecutionAttemptPersistenceInput,ve as snapshotReadAttemptSettlementInput,K as snapshotRequestAttemptCancellationInput,q as snapshotRequestExecutionCancellationInput,L as submitAttemptOutcome,re as toCommittedWorkflowRunnerCompletion,x as toCommittedWorkflowRunnerResult,u as workflowAttemptOutcomeCodec,te as workflowDefinitionsDual,R as workflowEnginePackage,v as workflowExecutionStateDual,_ as workflowExecutionStateEventsDual,ne as workflowExecutionsDual,c as workflowFinalizationsDual,f as workflowStepSpansDual,p as worklogFrameEntriesDual,w as worklogSummariesDual};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createWorkflowEnginePackage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-
|
|
1
|
+
import { n as createWorkflowEnginePackage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-D-oIvXJD.mjs";
|
|
2
2
|
export { WorkflowEngineToken, createWorkflowEnginePackage, workflowEnginePackage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../package-
|
|
1
|
+
import{n as e,r as t,t as n}from"../package-DYScYC0D.mjs";export{n as WorkflowEngineToken,e as createWorkflowEnginePackage,t as workflowEnginePackage};
|