@ajna-inc/workflow 0.6.8 → 0.6.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.npmvc/attestations.jsonld +8 -8
  2. package/.npmvc/sbom.cdx.json +3 -3
  3. package/build/WorkflowModule.mjs +6 -1
  4. package/build/WorkflowModule.mjs.map +1 -1
  5. package/build/protocol/handlers/AdvanceHandler.d.mts +1 -1
  6. package/build/protocol/handlers/AdvanceHandler.d.mts.map +1 -1
  7. package/build/protocol/handlers/CancelHandler.d.mts +1 -1
  8. package/build/protocol/handlers/CancelHandler.d.mts.map +1 -1
  9. package/build/protocol/handlers/CompleteHandler.d.mts +1 -1
  10. package/build/protocol/handlers/CompleteHandler.d.mts.map +1 -1
  11. package/build/protocol/handlers/PauseHandler.d.mts +1 -1
  12. package/build/protocol/handlers/PauseHandler.d.mts.map +1 -1
  13. package/build/protocol/handlers/ResumeHandler.d.mts +1 -1
  14. package/build/protocol/handlers/ResumeHandler.d.mts.map +1 -1
  15. package/build/protocol/handlers/StartHandler.d.mts +1 -1
  16. package/build/protocol/handlers/StartHandler.d.mts.map +1 -1
  17. package/build/protocol/handlers/StatusHandler.d.mts +1 -1
  18. package/build/protocol/handlers/StatusHandler.d.mts.map +1 -1
  19. package/build/protocol/messages/AdvanceMessage.d.mts +2 -2
  20. package/build/protocol/messages/CancelMessage.d.mts +2 -2
  21. package/build/protocol/messages/CompleteMessage.d.mts +2 -2
  22. package/build/protocol/messages/DiscoverMessage.d.mts +2 -2
  23. package/build/protocol/messages/DiscoverMessage.d.mts.map +1 -1
  24. package/build/protocol/messages/FetchTemplateMessage.d.mts +2 -2
  25. package/build/protocol/messages/PauseMessage.d.mts +2 -2
  26. package/build/protocol/messages/ProblemReportMessage.d.mts +2 -2
  27. package/build/protocol/messages/PublishTemplateMessage.d.mts +2 -2
  28. package/build/protocol/messages/ResumeMessage.d.mts +2 -2
  29. package/build/protocol/messages/StartMessage.d.mts +2 -2
  30. package/build/protocol/messages/StatusMessage.d.mts +2 -2
  31. package/build/protocol/messages/StatusRequestMessage.d.mts +2 -2
  32. package/build/protocol/messages/TemplateMessage.d.mts +2 -2
  33. package/build/protocol/messages/TemplateMessage.d.mts.map +1 -1
  34. package/build/protocol/messages/WorkflowsMessage.d.mts +2 -2
  35. package/package.json +1 -1
@@ -2,40 +2,40 @@
2
2
  "schema": "https://npmvc.com/schemas/attestation-bundle/v1",
3
3
  "package": {
4
4
  "name": "@ajna-inc/workflow",
5
- "version": "0.6.8"
5
+ "version": "0.6.82"
6
6
  },
7
- "bundledAt": "2026-05-01T18:25:01.146Z",
7
+ "bundledAt": "2026-05-01T20:26:10.908Z",
8
8
  "envelopes": [
9
9
  {
10
10
  "payloadType": "application/vc+json",
11
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImJ1aWxkQ29tbWFuZCI6InRzZG93biAtLWNvbmZpZy1sb2FkZXIgdW5jb25maWciLCJidWlsZGVyIjp7ImlkIjoiZGlkOmtleTp6Nk1raEo1WUJTZEJMSEhKYmppNDVraUpuUmRMVURQdVRWaTdkUDg0TWpTdUV1Y28iLCJraW5kIjoibG9jYWwifSwiaWQiOiJwa2c6bnBtL0Bham5hLWluYy93b3JrZmxvd0AwLjYuOCIsInJlcHJvZHVjaWJsZSI6ZmFsc2UsInNsc2FMZXZlbCI6Miwic291cmNlUmVwbyI6eyJjb21taXQiOiI0N2E5ZTU2NGE3MGI2M2NiYmI4MzkwOTNjZDBiODAxNDY1Y2I1NzM0IiwidHlwZSI6ImdpdCIsInVybCI6InVua25vd24ifSwidGFyYmFsbCI6eyJkaWdlc3QiOnt9LCJuYW1lIjoiQGFqbmEtaW5jL3dvcmtmbG93IiwidmVyc2lvbiI6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iMTAuMjIuMCJ9fSwiaWQiOiJ1cm46dXVpZDpmNzM3NDc1My1hOWYzLTRjNmUtODEzNy1mOWRjYTg3Y2QwY2MiLCJpc3N1ZXIiOiJkaWQ6a2V5Ono2TWtoSjVZQlNkQkxISEpiamk0NWtpSm5SZExVRFB1VFZpN2RQODRNalN1RXVjbyIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQcm92ZW5hbmNlQ3JlZGVudGlhbCJdLCJ2YWxpZEZyb20iOiIyMDI2LTA1LTAxVDIwOjI2OjEwLjY0NVoifQ==",
12
12
  "signatures": [
13
13
  {
14
14
  "keyid": "did:key:z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
15
15
  "alg": "Ed25519",
16
- "sig": "Yg098Q4cTJ8mTfFCrHNhUctLOiDKn/mdgPjSgvfRLXa4jkYElII0Db2AyXkqg+ID39yl8XoA04CaAtElXZr2DA=="
16
+ "sig": "ZAy+EYWwdX1Tr/K+D9qDiQbaWOCD4lI1Z7KCSm25QHGotdsm1M8GX5CssNSDCVMobNkfj6voLnL3Ab+ECeVwDg=="
17
17
  }
18
18
  ]
19
19
  },
20
20
  {
21
21
  "payloadType": "application/vc+json",
22
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImRlY2xhcmVkU2NyaXB0cyI6WyJidWlsZCIsInByZXB1Ymxpc2hPbmx5IiwiY2xlYW4iLCJwcmVwYWNrIl0sImlkIjoicGtnOm5wbS9AYWpuYS1pbmMvd29ya2Zsb3dAMC42LjgiLCJwb3N0SW5zdGFsbFBvbGljeSI6ImZvcmJpZGRlbiIsInRhcmJhbGwiOnsiZ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YmxlQ3JlZGVudGlhbCIsIkxpZmVjeWNsZVBvbGljeUNyZWRlbnRpYWwiXSwidmFsaWRGcm9tIjoiMjAyNi0wNS0wMVQyMDoyNjoxMC42NjRaIn0=",
23
23
  "signatures": [
24
24
  {
25
25
  "keyid": "did:key:z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
26
26
  "alg": "Ed25519",
27
- "sig": "tyThCSr59cJ3GLwK63Ko4goI/DI5GiLQcukiLOp4vkYa/dT/fHUwl70rv9AYNzcgmKQfcflBgvCoSdjNqe7DCQ=="
27
+ "sig": "qV2nOgOicHi8Hj5Rliosmsnz6sdGhvQzWxVK47QE2OBNZe8032Kqabr3qY81F67zKbhuC4fDqiUmzLIkDhdcBg=="
28
28
  }
29
29
  ]
30
30
  },
31
31
  {
32
32
  "payloadType": "application/vc+json",
33
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZvcm1hdCI6ImN5Y2xvbmVkeC0xLjYiLCJpZCI6InBrZzpucG0vQGFqbmEtaW5jL3dvcmtmbG93QDAuNi44Iiwic2JvbURpZ2VzdCI6eyJhbGciOiJzaGEyNTYiLCJoZXgiOiJkNDJlOTY4ZDFkZTVkNGM0MjE4ZDc2OGJkMGZjYjE5OWQzOTJiMzY3ZmE0ZjJmMzQ5NTZiYzg3MDRiMWVjZmZhIn0sInNib21VcmwiOiIuLy5ucG12Yy9zYm9tLmNkeC5qc29uIiwidGFyYmFsbCI6eyJkaWdlc3QiOnt9LCJuYW1lIjoiQGFqbmEtaW5jL3dvcmtmbG93IiwidmVyc2lvbiI6IjAuNi44In19LCJpZCI6InVybjp1dWlkOjg5MmFhOTU2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34
  "signatures": [
35
35
  {
36
36
  "keyid": "did:key:z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
37
37
  "alg": "Ed25519",
38
- "sig": "nt3v86E6irAhMnDgRPWlo6EMIjAhMq3Ej+3I5hByjD9P+Utm91tGBtXdA6GgVwVRcZsTzSuOjGtqsdOgZB2EAw=="
38
+ "sig": "Ppk7fybYRAoqcVJF3LeWsmBrrtEmLzVRJfD/y5Vv89oz2XUFkIWml1lwC8ua1OwFl2rm5lc1yEZWNO8+m2XzCA=="
39
39
  }
40
40
  ]
41
41
  }
@@ -3,12 +3,12 @@
3
3
  "specVersion": "1.6",
4
4
  "version": 1,
5
5
  "metadata": {
6
- "timestamp": "2026-05-01T18:25:01.141Z",
6
+ "timestamp": "2026-05-01T20:26:10.901Z",
7
7
  "component": {
8
8
  "type": "application",
9
9
  "name": "@ajna-inc/workflow",
10
- "version": "0.6.8",
11
- "purl": "pkg:npm/%40ajna-inc/workflow@0.6.8"
10
+ "version": "0.6.82",
11
+ "purl": "pkg:npm/%40ajna-inc/workflow@0.6.82"
12
12
  },
13
13
  "tools": [
14
14
  {
@@ -142,7 +142,12 @@ var WorkflowModule = class {
142
142
  const scoped = await resolveEventContext(e.metadata);
143
143
  if (!scoped) return;
144
144
  try {
145
- if (rec.state === DidCommProofState.PresentationReceived) await service.autoAdvanceByConnection(scoped.context, connId, "presentation_received");
145
+ if (rec.state === DidCommProofState.ProposalSent) await service.autoAdvanceByConnection(scoped.context, connId, "proposal_sent");
146
+ else if (rec.state === DidCommProofState.ProposalReceived) await service.autoAdvanceByConnection(scoped.context, connId, "proposal_received");
147
+ else if (rec.state === DidCommProofState.RequestSent) await service.autoAdvanceByConnection(scoped.context, connId, "request_sent");
148
+ else if (rec.state === DidCommProofState.RequestReceived) await service.autoAdvanceByConnection(scoped.context, connId, "request_received");
149
+ else if (rec.state === DidCommProofState.PresentationSent) await service.autoAdvanceByConnection(scoped.context, connId, "presentation_sent");
150
+ else if (rec.state === DidCommProofState.PresentationReceived) await service.autoAdvanceByConnection(scoped.context, connId, "presentation_received");
146
151
  else if (rec.state === DidCommProofState.Done) await service.autoAdvanceByConnection(scoped.context, connId, "verified_ack");
147
152
  } finally {
148
153
  await scoped.release();
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowModule.mjs","names":["createPaymentsV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)","PaymentsEventTypes: Partial<Record<PaymentEvtKeys, string>> | undefined","createPoeV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)","PoeEventTypes: Partial<Record<PoeEvtKeys, string>> | undefined","PoeState: { [key: string]: string } | undefined","workflowEvent: string | undefined","g: any","metadata: EventMetadata"],"sources":["../src/WorkflowModule.ts"],"sourcesContent":["import type { WorkflowModuleConfigOptions } from './WorkflowModuleConfig'\nimport type { AgentContext, DependencyManager, Module, AgentContextProvider, EventMetadata } from '@credo-ts/core'\nimport type { DidCommCredentialStateChangedEvent, DidCommProofStateChangedEvent } from '@credo-ts/didcomm'\n\nimport { AgentConfig, EventEmitter, InjectionSymbols } from '@credo-ts/core'\n\nimport { DidCommCredentialEventTypes, DidCommProofEventTypes, DidCommProtocol } from '@credo-ts/didcomm'\n\nimport { DidCommCredentialState, DidCommProofState } from '@credo-ts/didcomm'\n\nimport { DidCommFeatureRegistry, DidCommMessageHandlerRegistry, DidCommMessageSender, DidCommOutboundMessageContext, ReturnRouteTypes } from '@credo-ts/didcomm'\n\nimport { WorkflowModuleConfig } from './WorkflowModuleConfig'\nimport { CommandQueueService } from './queue/CommandQueue'\nimport { PersistentCommandQueue } from './queue/PersistentCommandQueue'\nimport { WorkflowApi } from './api/WorkflowApi'\nimport { WorkflowCommandRepository } from './repository/WorkflowCommandRepository'\nimport { AdvanceHandler } from './protocol/handlers/AdvanceHandler'\nimport { CancelHandler } from './protocol/handlers/CancelHandler'\nimport { CompleteHandler } from './protocol/handlers/CompleteHandler'\nimport { DiscoverHandler } from './protocol/handlers/DiscoverHandler'\nimport { FetchTemplateHandler } from './protocol/handlers/FetchTemplateHandler'\nimport { TemplateHandler } from './protocol/handlers/TemplateHandler'\nimport { PauseHandler } from './protocol/handlers/PauseHandler'\nimport { ProblemReportHandler } from './protocol/handlers/ProblemReportHandler'\nimport { PublishTemplateHandler } from './protocol/handlers/PublishTemplateHandler'\nimport { ResumeHandler } from './protocol/handlers/ResumeHandler'\nimport { StartHandler } from './protocol/handlers/StartHandler'\nimport { StatusHandler } from './protocol/handlers/StatusHandler'\nimport { WorkflowInstanceRepository } from './repository/WorkflowInstanceRepository'\nimport { WorkflowTemplateRepository } from './repository/WorkflowTemplateRepository'\nimport { WorkflowService } from './services/WorkflowService'\nimport { DidCommConnectionService } from '@credo-ts/didcomm'\n\nexport const WORKFLOW_PROTOCOL_URI = 'https://didcomm.org/workflow/1.0'\nexport const WORKFLOW_ROLES = ['processor', 'coordinator'] as const\n\nexport class WorkflowModule implements Module {\n public readonly api = WorkflowApi\n public readonly config: WorkflowModuleConfig\n\n public constructor(options?: WorkflowModuleConfigOptions) {\n this.config = new WorkflowModuleConfig(options)\n }\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.resolve(AgentConfig).logger.info('Registering WorkflowModule')\n dependencyManager.registerInstance(WorkflowModuleConfig, this.config)\n\n dependencyManager.registerSingleton(WorkflowTemplateRepository)\n dependencyManager.registerSingleton(WorkflowInstanceRepository)\n dependencyManager.registerSingleton(WorkflowCommandRepository)\n dependencyManager.registerSingleton(WorkflowService)\n // IMPORTANT: Do not register WorkflowApi as a singleton here.\n // The DependencyManager will register `module.api` (WorkflowApi) as context-scoped\n // via `registerModules`, ensuring a fresh API instance per AgentContext (tenant-safe).\n\n dependencyManager.registerSingleton(PublishTemplateHandler)\n dependencyManager.registerSingleton(StartHandler)\n dependencyManager.registerSingleton(AdvanceHandler)\n dependencyManager.registerSingleton(StatusHandler)\n dependencyManager.registerSingleton(ProblemReportHandler)\n dependencyManager.registerSingleton(PauseHandler)\n dependencyManager.registerSingleton(ResumeHandler)\n dependencyManager.registerSingleton(CancelHandler)\n dependencyManager.registerSingleton(CompleteHandler)\n dependencyManager.registerSingleton(DiscoverHandler)\n dependencyManager.registerSingleton(FetchTemplateHandler)\n dependencyManager.registerSingleton(TemplateHandler)\n }\n\n public async initialize(agentContext: AgentContext): Promise<void> {\n const dm = agentContext.dependencyManager\n const logger = dm.resolve(AgentConfig).logger\n const features = dm.resolve(DidCommFeatureRegistry)\n const handlers = dm.resolve(DidCommMessageHandlerRegistry)\n logger.info('Initializing WorkflowModule - registering workflow/1.0 protocol')\n try {\n features.register(new DidCommProtocol({ id: WORKFLOW_PROTOCOL_URI, roles: [...WORKFLOW_ROLES] }))\n } catch (_e) {\n void 0\n }\n handlers.registerMessageHandler(dm.resolve(PublishTemplateHandler))\n handlers.registerMessageHandler(dm.resolve(StartHandler))\n handlers.registerMessageHandler(dm.resolve(AdvanceHandler))\n handlers.registerMessageHandler(dm.resolve(StatusHandler))\n handlers.registerMessageHandler(dm.resolve(ProblemReportHandler))\n handlers.registerMessageHandler(dm.resolve(PauseHandler))\n handlers.registerMessageHandler(dm.resolve(ResumeHandler))\n handlers.registerMessageHandler(dm.resolve(CancelHandler))\n handlers.registerMessageHandler(dm.resolve(CompleteHandler))\n // discovery/fetch extension\n handlers.registerMessageHandler(dm.resolve(DiscoverHandler))\n handlers.registerMessageHandler(dm.resolve(FetchTemplateHandler))\n handlers.registerMessageHandler(dm.resolve(TemplateHandler))\n // Inbound mapping: credentials/proofs → workflow events\n const events = dm.resolve(EventEmitter)\n const service = dm.resolve(WorkflowService)\n const contextProvider = dm.resolve<AgentContextProvider>(InjectionSymbols.AgentContextProvider)\n const rootContextId = agentContext.contextCorrelationId\n\n const resolveEventContext = async (\n metadata: EventMetadata | undefined\n ): Promise<{ context: AgentContext; release: () => Promise<void> } | null> => {\n const correlationId = metadata?.contextCorrelationId\n if (!correlationId || correlationId === rootContextId) {\n return { context: agentContext, release: async () => {} }\n }\n\n try {\n const scopedContext = await contextProvider.getAgentContextForContextCorrelationId(correlationId)\n return {\n context: scopedContext,\n release: async () => {\n try {\n await contextProvider.endSessionForAgentContext(scopedContext)\n } catch (error) {\n logger.debug('WorkflowModule - failed to end tenant session after event', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n }\n },\n }\n } catch (error) {\n logger.warn('WorkflowModule - unable to resolve context for event', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n return null\n }\n }\n\n events.on<DidCommCredentialStateChangedEvent>(DidCommCredentialEventTypes.DidCommCredentialStateChanged, async (e) => {\n const rec = e.payload.credentialExchangeRecord\n const connId = rec.connectionId\n logger.info(`[WorkflowModule] Credential state changed: ${rec.state}, connectionId=${connId}, contextCorrelationId=${e.metadata?.contextCorrelationId}`)\n if (!connId) { logger.warn('[WorkflowModule] No connectionId on credential record, skipping auto-advance'); return }\n const scoped = await resolveEventContext(e.metadata)\n if (!scoped) { logger.warn('[WorkflowModule] Failed to resolve event context, skipping auto-advance'); return }\n try {\n // Map both sent and received states so the workflow advances\n // regardless of whether this agent is the issuer or holder\n if (rec.state === DidCommCredentialState.ProposalReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_received')\n } else if (rec.state === DidCommCredentialState.ProposalSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_sent')\n } else if (rec.state === DidCommCredentialState.OfferReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'offer_received')\n } else if (rec.state === DidCommCredentialState.OfferSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'offer_sent')\n } else if (rec.state === DidCommCredentialState.RequestReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_received')\n } else if (rec.state === DidCommCredentialState.RequestSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_sent')\n } else if (rec.state === DidCommCredentialState.CredentialIssued) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'credential_issued')\n } else if (rec.state === DidCommCredentialState.CredentialReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'credential_received')\n } else if (rec.state === DidCommCredentialState.Done) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'issued_ack')\n }\n } finally {\n await scoped.release()\n }\n })\n events.on<DidCommProofStateChangedEvent>(DidCommProofEventTypes.ProofStateChanged, async (e) => {\n const rec = e.payload.proofRecord\n const connId = rec.connectionId\n if (!connId) return\n const scoped = await resolveEventContext(e.metadata)\n if (!scoped) return\n try {\n if (rec.state === DidCommProofState.PresentationReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'presentation_received')\n } else if (rec.state === DidCommProofState.Done) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'verified_ack')\n }\n } finally {\n await scoped.release()\n }\n })\n\n // Optional: register payments v1 actions when payments module is available\n try {\n let createPaymentsV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments'))\n } catch {\n /* optional dependency */\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n // Try @ajna-inc/payments (static require for React Native compatibility)\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@ajna-inc/payments'))\n } catch {\n /* optional dependency */\n }\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@ajna-inc/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (createPaymentsV1Actions) {\n const actions = createPaymentsV1Actions()\n try {\n // Prefer explicit API if available\n const svcAny = service as unknown as {\n registerActions?: (actions: unknown[]) => void\n actions?: { register: (h: unknown) => void }\n }\n if (typeof svcAny.registerActions === 'function') {\n svcAny.registerActions(actions)\n } else if (svcAny.actions && typeof svcAny.actions.register === 'function') {\n for (const a of actions) svcAny.actions.register(a)\n } else {\n throw new Error('no action registry available')\n }\n logger.info('WorkflowModule - registered PaymentsV1 actions')\n } catch (_e) {\n // swallow\n }\n }\n } catch {\n /* optional dependency */\n }\n\n // Optional: map payments events → workflow events (guarded if payments not installed)\n if (this.config.enablePaymentsEventMapping)\n try {\n type PaymentEvtKeys =\n | 'IntroResponded'\n | 'HandshakeAccepted'\n | 'ComplianceRequired'\n | 'ComplianceSatisfied'\n | 'ComplianceRejected'\n | 'SettlementUpdated'\n let PaymentsEventTypes: Partial<Record<PaymentEvtKeys, string>> | undefined\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments'))\n } catch {\n /* optional dependency */\n }\n if (!PaymentsEventTypes) {\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments/events/PaymentEvents'))\n } catch {\n /* optional dependency */\n }\n }\n if (!PaymentsEventTypes) {\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments/events/PaymentEvents'))\n } catch {\n /* optional dependency */\n }\n }\n if (!PaymentsEventTypes) throw new Error('payments not available')\n\n const adv = async (threadId: string, event: string, metadata?: EventMetadata) => {\n const scoped = await resolveEventContext(metadata)\n if (!scoped) return\n try {\n await service.advance(scoped.context, {\n instance_id: threadId,\n event,\n idempotency_key: `auto:payments:${event}:${threadId}`,\n })\n } catch (e) {\n logger.debug(`[Workflow] payments event advance error: ${(e as Error).message}`)\n } finally {\n await scoped.release()\n }\n }\n type PaymentListener = (e: {\n payload?: { threadId?: string; status?: string }\n metadata?: EventMetadata\n }) => void\n const on = (evt: string, cb: PaymentListener) =>\n (events as unknown as { on?: (evt: string, cb: PaymentListener) => void }).on?.(evt, cb)\n if (PaymentsEventTypes.IntroResponded)\n on(PaymentsEventTypes.IntroResponded, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.methods_received', e?.metadata)\n })\n if (PaymentsEventTypes.HandshakeAccepted)\n on(PaymentsEventTypes.HandshakeAccepted, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.handshake_accepted', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceRequired)\n on(PaymentsEventTypes.ComplianceRequired, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_required', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceSatisfied)\n on(PaymentsEventTypes.ComplianceSatisfied, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_satisfied', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceRejected)\n on(PaymentsEventTypes.ComplianceRejected, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_rejected', e?.metadata)\n })\n if (PaymentsEventTypes.SettlementUpdated)\n on(PaymentsEventTypes.SettlementUpdated, async (e) => {\n const p = e?.payload\n const th = p?.threadId\n const status = p?.status\n if (!status) return\n const map: Record<string, string> = {\n received: 'payments.receipt_received',\n pending: 'payments.settlement_pending',\n settled: 'payments.settled',\n failed: 'payments.failed',\n }\n const ev = map[status]\n if (ev && th) await adv(th, ev, e?.metadata)\n })\n logger.info('WorkflowModule - registered Payments event listeners')\n } catch {\n /* optional dependency */\n }\n\n // Optional: register POE v1 actions when POE module is available\n try {\n let createPoeV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)\n try {\n ;({ createPoeV1Actions } = require('@ajna-inc/poe'))\n } catch {\n /* optional dependency */\n }\n if (!createPoeV1Actions) {\n try {\n ;({ createPoeV1Actions } = require('@ajna-inc/poe/workflow/PoeV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (createPoeV1Actions) {\n const actions = createPoeV1Actions()\n try {\n const svcAny = service as unknown as {\n registerActions?: (actions: unknown[]) => void\n actions?: { register: (h: unknown) => void }\n }\n if (typeof svcAny.registerActions === 'function') {\n svcAny.registerActions(actions)\n } else if (svcAny.actions && typeof svcAny.actions.register === 'function') {\n for (const a of actions) svcAny.actions.register(a)\n } else {\n throw new Error('no action registry available')\n }\n logger.info('WorkflowModule - registered PoeV1 actions')\n } catch (_e) {\n // swallow\n }\n }\n } catch {\n /* optional dependency */\n }\n\n // Optional: map POE events → workflow events (guarded if POE not installed)\n if (this.config.enablePoeEventMapping)\n try {\n type PoeEvtKeys = 'PoeStateChanged'\n let PoeEventTypes: Partial<Record<PoeEvtKeys, string>> | undefined\n let PoeState: { [key: string]: string } | undefined\n try {\n ;({ PoeEventTypes, PoeState } = require('@ajna-inc/poe'))\n } catch {\n /* optional dependency */\n }\n if (!PoeEventTypes || !PoeState) throw new Error('poe not available')\n\n type PoeListener = (e: {\n payload?: {\n poeRecord?: {\n id?: string\n connectionId?: string\n sessionId?: string\n state?: string\n programId?: string\n verificationResult?: { verified?: boolean; errors?: string[] }\n finalProof?: { result?: unknown }\n }\n previousState?: string\n }\n metadata?: EventMetadata\n }) => void\n const on = (evt: string, cb: PoeListener) =>\n (events as unknown as { on?: (evt: string, cb: PoeListener) => void }).on?.(evt, cb)\n\n if (PoeEventTypes.PoeStateChanged)\n on(PoeEventTypes.PoeStateChanged, async (e) => {\n const poeRecord = e?.payload?.poeRecord\n const connectionId = poeRecord?.connectionId\n if (!connectionId) return\n\n const scoped = await resolveEventContext(e?.metadata)\n if (!scoped) return\n try {\n let workflowEvent: string | undefined\n\n switch (poeRecord.state) {\n case PoeState?.RequestReceived:\n workflowEvent = 'poe.request_received'\n break\n case PoeState?.SubmitReceived:\n workflowEvent = poeRecord.verificationResult?.verified\n ? 'poe.verified'\n : 'poe.verification_failed'\n break\n case PoeState?.ProposalReceived:\n workflowEvent = 'poe.proposal_received'\n break\n case PoeState?.Accepted:\n workflowEvent = 'poe.accepted'\n break\n case PoeState?.Declined:\n workflowEvent = 'poe.declined'\n break\n case PoeState?.Complete:\n workflowEvent = 'poe.completed'\n break\n case PoeState?.Problem:\n workflowEvent = 'poe.problem'\n break\n case PoeState?.ChallengeReceived:\n workflowEvent = 'poe.challenge_received'\n break\n }\n\n if (workflowEvent) {\n await service.autoAdvanceByConnection(\n scoped.context,\n connectionId,\n workflowEvent\n )\n }\n } catch (err) {\n logger.debug(`[Workflow] POE event advance error: ${(err as Error).message}`)\n } finally {\n await scoped.release()\n }\n })\n logger.info('WorkflowModule - registered POE event listeners')\n } catch {\n /* optional dependency */\n }\n\n // Initialize persistent command queue (always enabled, no Redis needed)\n logger.info('WorkflowModule - initializing persistent command queue')\n const commandRepo = dm.resolve(WorkflowCommandRepository)\n const queue = new PersistentCommandQueue(commandRepo, contextProvider, agentContext, {\n pollIntervalMs: this.config.asyncQueue?.pollIntervalMs,\n concurrency: this.config.asyncQueue?.concurrency,\n processingTimeoutMs: this.config.asyncQueue?.processingTimeoutMs,\n staleCheckIntervalMs: this.config.asyncQueue?.staleCheckIntervalMs,\n cleanupIntervalMs: this.config.asyncQueue?.cleanupIntervalMs,\n commandRetentionMs: this.config.asyncQueue?.commandRetentionMs,\n failedRetentionMs: this.config.asyncQueue?.failedRetentionMs,\n maxAttempts: this.config.asyncQueue?.maxAttempts,\n })\n\n // Test-time helper: register queue instance globally for best-effort shutdown in afterAll\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const g: any = globalThis as unknown\n g.__WF_QUEUES = g.__WF_QUEUES || new Set()\n g.__WF_QUEUES.add(queue)\n } catch {\n /* noop */\n }\n\n // In tests or minimal environments, dependencyManager may not expose registerInstance\n try {\n const anyDm = dm as unknown as { registerInstance?: (ctor: unknown, instance: unknown) => void }\n anyDm.registerInstance?.(CommandQueueService, queue)\n } catch {\n // no-op if DI container doesn't support instance registration in this context\n }\n\n // Start worker: processes commands and sends follow-up status messages\n await queue.startWorker(async (job) => {\n // Context resolution handled inside PersistentCommandQueue\n // Worker receives job with already-resolved context\n\n // This worker callback is called from PersistentCommandQueue.processCommand\n // which already resolves the context, so we need to get it here\n const metadata: EventMetadata = { contextCorrelationId: job.contextCorrelationId }\n const scoped = await (async () => {\n const correlationId = metadata.contextCorrelationId\n if (!correlationId || correlationId === rootContextId) {\n return { context: agentContext, release: async () => {} }\n }\n try {\n const scopedContext = await contextProvider.getAgentContextForContextCorrelationId(correlationId)\n return {\n context: scopedContext,\n release: async () => {\n try {\n await contextProvider.endSessionForAgentContext(scopedContext)\n } catch (error) {\n logger.debug('WorkflowModule - failed to end tenant session after queue job', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n }\n },\n }\n } catch (error) {\n logger.debug('WorkflowModule - unable to resolve context for queue job', {\n error: (error as Error).message,\n })\n return null\n }\n })()\n if (!scoped) return\n try {\n const ctx = scoped.context\n try {\n logger.info('[WorkflowWorker] handling job', {\n cmd: (job as { cmd?: string }).cmd,\n thid: (job as { thid?: string }).thid,\n connectionId: (job as { connectionId?: string }).connectionId,\n contextCorrelationId: (job as { contextCorrelationId?: string }).contextCorrelationId,\n })\n } catch {}\n switch (job.cmd) {\n case 'start': {\n // Ensure template exists before starting. If missing, attempt auto-discover and defer.\n try {\n const templateRepo = dm.resolve(WorkflowTemplateRepository)\n const p = (job.payload || {}) as unknown as {\n template_id?: string\n template_version?: string\n template_hash?: string\n allow_discover?: boolean\n }\n const templateRec = p.template_id\n ? await templateRepo.findByTemplateIdAndVersion(ctx, p.template_id, p.template_version)\n : null\n if (!templateRec) {\n const allowDiscover = p.allow_discover ?? true\n if (allowDiscover && this.config.enableAutoDiscoverOnStart && job.connectionId) {\n try {\n const sender = dm.resolve(DidCommMessageSender)\n const connectionSvc = dm.resolve(DidCommConnectionService)\n const connection = await connectionSvc.getById(ctx, job.connectionId)\n const { FetchTemplateMessage } = require('./protocol/messages/FetchTemplateMessage')\n const fetch = new FetchTemplateMessage({\n thid: job.thid,\n body: {\n template_id: p.template_id,\n template_version: p.template_version,\n prefer_hash: p.template_hash,\n },\n })\n try {\n fetch.setReturnRouting(ReturnRouteTypes.thread, job.thid)\n } catch {}\n const outbound = new DidCommOutboundMessageContext(fetch, { agentContext: ctx, connection })\n await sender.sendMessage(outbound)\n try {\n logger.info('[WorkflowWorker] fetch-template sent from worker', {\n thid: job.thid,\n template_id: p.template_id,\n template_version: p.template_version,\n })\n } catch {}\n } catch (e) {\n logger.debug('WorkflowModule - fetch-template send failed in worker', {\n error: (e as Error).message,\n })\n }\n }\n // Defer start by signaling invalid_template so queue will retry later\n const err = new Error('template not found for start') as Error & { code?: string }\n err.code = 'invalid_template'\n throw err\n }\n } catch (precheckErr) {\n // Rethrow to queue-level handler for unified deferral behavior\n throw precheckErr\n }\n await service.start(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] start completed', { thid: job.thid }) } catch {}\n break\n }\n case 'advance':\n await service.advance(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] advance completed', { thid: job.thid }) } catch {}\n break\n case 'pause':\n await service.pause(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] pause completed', { thid: job.thid }) } catch {}\n break\n case 'resume':\n await service.resume(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] resume completed', { thid: job.thid }) } catch {}\n break\n case 'cancel':\n await service.cancel(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] cancel completed', { thid: job.thid }) } catch {}\n break\n case 'complete':\n await service.complete(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] complete completed', { thid: job.thid }) } catch {}\n break\n }\n\n // Note: Per Workflow 1.0 spec §11.6 and §3.4, status is provided on-demand (pull-based).\n // The spec defines status as a request/response pattern where Coordinators explicitly\n // request status via StatusRequestMessage, and Processors respond with StatusMessage.\n //\n // Unsolicited push notifications are not part of the base protocol and cause issues:\n // - Tenant context mismatches in multi-tenant deployments\n // - Receivers interpret unsolicited StatusMessage as a request (same @type)\n // - HTTP transport timeouts (fire-and-forget over request/response transport)\n //\n // For real-time UI updates, use the existing WebSocket event system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() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)","PaymentsEventTypes: Partial<Record<PaymentEvtKeys, string>> | undefined","createPoeV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)","PoeEventTypes: Partial<Record<PoeEvtKeys, string>> | undefined","PoeState: { [key: string]: string } | undefined","workflowEvent: string | undefined","g: any","metadata: EventMetadata"],"sources":["../src/WorkflowModule.ts"],"sourcesContent":["import type { WorkflowModuleConfigOptions } from './WorkflowModuleConfig'\nimport type { AgentContext, DependencyManager, Module, AgentContextProvider, EventMetadata } from '@credo-ts/core'\nimport type { DidCommCredentialStateChangedEvent, DidCommProofStateChangedEvent } from '@credo-ts/didcomm'\n\nimport { AgentConfig, EventEmitter, InjectionSymbols } from '@credo-ts/core'\n\nimport { DidCommCredentialEventTypes, DidCommProofEventTypes, DidCommProtocol } from '@credo-ts/didcomm'\n\nimport { DidCommCredentialState, DidCommProofState } from '@credo-ts/didcomm'\n\nimport { DidCommFeatureRegistry, DidCommMessageHandlerRegistry, DidCommMessageSender, DidCommOutboundMessageContext, ReturnRouteTypes } from '@credo-ts/didcomm'\n\nimport { WorkflowModuleConfig } from './WorkflowModuleConfig'\nimport { CommandQueueService } from './queue/CommandQueue'\nimport { PersistentCommandQueue } from './queue/PersistentCommandQueue'\nimport { WorkflowApi } from './api/WorkflowApi'\nimport { WorkflowCommandRepository } from './repository/WorkflowCommandRepository'\nimport { AdvanceHandler } from './protocol/handlers/AdvanceHandler'\nimport { CancelHandler } from './protocol/handlers/CancelHandler'\nimport { CompleteHandler } from './protocol/handlers/CompleteHandler'\nimport { DiscoverHandler } from './protocol/handlers/DiscoverHandler'\nimport { FetchTemplateHandler } from './protocol/handlers/FetchTemplateHandler'\nimport { TemplateHandler } from './protocol/handlers/TemplateHandler'\nimport { PauseHandler } from './protocol/handlers/PauseHandler'\nimport { ProblemReportHandler } from './protocol/handlers/ProblemReportHandler'\nimport { PublishTemplateHandler } from './protocol/handlers/PublishTemplateHandler'\nimport { ResumeHandler } from './protocol/handlers/ResumeHandler'\nimport { StartHandler } from './protocol/handlers/StartHandler'\nimport { StatusHandler } from './protocol/handlers/StatusHandler'\nimport { WorkflowInstanceRepository } from './repository/WorkflowInstanceRepository'\nimport { WorkflowTemplateRepository } from './repository/WorkflowTemplateRepository'\nimport { WorkflowService } from './services/WorkflowService'\nimport { DidCommConnectionService } from '@credo-ts/didcomm'\n\nexport const WORKFLOW_PROTOCOL_URI = 'https://didcomm.org/workflow/1.0'\nexport const WORKFLOW_ROLES = ['processor', 'coordinator'] as const\n\nexport class WorkflowModule implements Module {\n public readonly api = WorkflowApi\n public readonly config: WorkflowModuleConfig\n\n public constructor(options?: WorkflowModuleConfigOptions) {\n this.config = new WorkflowModuleConfig(options)\n }\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.resolve(AgentConfig).logger.info('Registering WorkflowModule')\n dependencyManager.registerInstance(WorkflowModuleConfig, this.config)\n\n dependencyManager.registerSingleton(WorkflowTemplateRepository)\n dependencyManager.registerSingleton(WorkflowInstanceRepository)\n dependencyManager.registerSingleton(WorkflowCommandRepository)\n dependencyManager.registerSingleton(WorkflowService)\n // IMPORTANT: Do not register WorkflowApi as a singleton here.\n // The DependencyManager will register `module.api` (WorkflowApi) as context-scoped\n // via `registerModules`, ensuring a fresh API instance per AgentContext (tenant-safe).\n\n dependencyManager.registerSingleton(PublishTemplateHandler)\n dependencyManager.registerSingleton(StartHandler)\n dependencyManager.registerSingleton(AdvanceHandler)\n dependencyManager.registerSingleton(StatusHandler)\n dependencyManager.registerSingleton(ProblemReportHandler)\n dependencyManager.registerSingleton(PauseHandler)\n dependencyManager.registerSingleton(ResumeHandler)\n dependencyManager.registerSingleton(CancelHandler)\n dependencyManager.registerSingleton(CompleteHandler)\n dependencyManager.registerSingleton(DiscoverHandler)\n dependencyManager.registerSingleton(FetchTemplateHandler)\n dependencyManager.registerSingleton(TemplateHandler)\n }\n\n public async initialize(agentContext: AgentContext): Promise<void> {\n const dm = agentContext.dependencyManager\n const logger = dm.resolve(AgentConfig).logger\n const features = dm.resolve(DidCommFeatureRegistry)\n const handlers = dm.resolve(DidCommMessageHandlerRegistry)\n logger.info('Initializing WorkflowModule - registering workflow/1.0 protocol')\n try {\n features.register(new DidCommProtocol({ id: WORKFLOW_PROTOCOL_URI, roles: [...WORKFLOW_ROLES] }))\n } catch (_e) {\n void 0\n }\n handlers.registerMessageHandler(dm.resolve(PublishTemplateHandler))\n handlers.registerMessageHandler(dm.resolve(StartHandler))\n handlers.registerMessageHandler(dm.resolve(AdvanceHandler))\n handlers.registerMessageHandler(dm.resolve(StatusHandler))\n handlers.registerMessageHandler(dm.resolve(ProblemReportHandler))\n handlers.registerMessageHandler(dm.resolve(PauseHandler))\n handlers.registerMessageHandler(dm.resolve(ResumeHandler))\n handlers.registerMessageHandler(dm.resolve(CancelHandler))\n handlers.registerMessageHandler(dm.resolve(CompleteHandler))\n // discovery/fetch extension\n handlers.registerMessageHandler(dm.resolve(DiscoverHandler))\n handlers.registerMessageHandler(dm.resolve(FetchTemplateHandler))\n handlers.registerMessageHandler(dm.resolve(TemplateHandler))\n // Inbound mapping: credentials/proofs → workflow events\n const events = dm.resolve(EventEmitter)\n const service = dm.resolve(WorkflowService)\n const contextProvider = dm.resolve<AgentContextProvider>(InjectionSymbols.AgentContextProvider)\n const rootContextId = agentContext.contextCorrelationId\n\n const resolveEventContext = async (\n metadata: EventMetadata | undefined\n ): Promise<{ context: AgentContext; release: () => Promise<void> } | null> => {\n const correlationId = metadata?.contextCorrelationId\n if (!correlationId || correlationId === rootContextId) {\n return { context: agentContext, release: async () => {} }\n }\n\n try {\n const scopedContext = await contextProvider.getAgentContextForContextCorrelationId(correlationId)\n return {\n context: scopedContext,\n release: async () => {\n try {\n await contextProvider.endSessionForAgentContext(scopedContext)\n } catch (error) {\n logger.debug('WorkflowModule - failed to end tenant session after event', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n }\n },\n }\n } catch (error) {\n logger.warn('WorkflowModule - unable to resolve context for event', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n return null\n }\n }\n\n events.on<DidCommCredentialStateChangedEvent>(DidCommCredentialEventTypes.DidCommCredentialStateChanged, async (e) => {\n const rec = e.payload.credentialExchangeRecord\n const connId = rec.connectionId\n logger.info(`[WorkflowModule] Credential state changed: ${rec.state}, connectionId=${connId}, contextCorrelationId=${e.metadata?.contextCorrelationId}`)\n if (!connId) { logger.warn('[WorkflowModule] No connectionId on credential record, skipping auto-advance'); return }\n const scoped = await resolveEventContext(e.metadata)\n if (!scoped) { logger.warn('[WorkflowModule] Failed to resolve event context, skipping auto-advance'); return }\n try {\n // Map both sent and received states so the workflow advances\n // regardless of whether this agent is the issuer or holder\n if (rec.state === DidCommCredentialState.ProposalReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_received')\n } else if (rec.state === DidCommCredentialState.ProposalSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_sent')\n } else if (rec.state === DidCommCredentialState.OfferReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'offer_received')\n } else if (rec.state === DidCommCredentialState.OfferSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'offer_sent')\n } else if (rec.state === DidCommCredentialState.RequestReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_received')\n } else if (rec.state === DidCommCredentialState.RequestSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_sent')\n } else if (rec.state === DidCommCredentialState.CredentialIssued) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'credential_issued')\n } else if (rec.state === DidCommCredentialState.CredentialReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'credential_received')\n } else if (rec.state === DidCommCredentialState.Done) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'issued_ack')\n }\n } finally {\n await scoped.release()\n }\n })\n events.on<DidCommProofStateChangedEvent>(DidCommProofEventTypes.ProofStateChanged, async (e) => {\n const rec = e.payload.proofRecord\n const connId = rec.connectionId\n if (!connId) return\n const scoped = await resolveEventContext(e.metadata)\n if (!scoped) return\n try {\n // Map both sent and received states for proof protocol\n if (rec.state === DidCommProofState.ProposalSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_sent')\n } else if (rec.state === DidCommProofState.ProposalReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_received')\n } else if (rec.state === DidCommProofState.RequestSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_sent')\n } else if (rec.state === DidCommProofState.RequestReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_received')\n } else if (rec.state === DidCommProofState.PresentationSent) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'presentation_sent')\n } else if (rec.state === DidCommProofState.PresentationReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'presentation_received')\n } else if (rec.state === DidCommProofState.Done) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'verified_ack')\n }\n } finally {\n await scoped.release()\n }\n })\n\n // Optional: register payments v1 actions when payments module is available\n try {\n let createPaymentsV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments'))\n } catch {\n /* optional dependency */\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@credo-ts/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n // Try @ajna-inc/payments (static require for React Native compatibility)\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@ajna-inc/payments'))\n } catch {\n /* optional dependency */\n }\n }\n if (!createPaymentsV1Actions) {\n try {\n ;({ createPaymentsV1Actions } = require('@ajna-inc/payments/workflow/PaymentsV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (createPaymentsV1Actions) {\n const actions = createPaymentsV1Actions()\n try {\n // Prefer explicit API if available\n const svcAny = service as unknown as {\n registerActions?: (actions: unknown[]) => void\n actions?: { register: (h: unknown) => void }\n }\n if (typeof svcAny.registerActions === 'function') {\n svcAny.registerActions(actions)\n } else if (svcAny.actions && typeof svcAny.actions.register === 'function') {\n for (const a of actions) svcAny.actions.register(a)\n } else {\n throw new Error('no action registry available')\n }\n logger.info('WorkflowModule - registered PaymentsV1 actions')\n } catch (_e) {\n // swallow\n }\n }\n } catch {\n /* optional dependency */\n }\n\n // Optional: map payments events → workflow events (guarded if payments not installed)\n if (this.config.enablePaymentsEventMapping)\n try {\n type PaymentEvtKeys =\n | 'IntroResponded'\n | 'HandshakeAccepted'\n | 'ComplianceRequired'\n | 'ComplianceSatisfied'\n | 'ComplianceRejected'\n | 'SettlementUpdated'\n let PaymentsEventTypes: Partial<Record<PaymentEvtKeys, string>> | undefined\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments'))\n } catch {\n /* optional dependency */\n }\n if (!PaymentsEventTypes) {\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments/events/PaymentEvents'))\n } catch {\n /* optional dependency */\n }\n }\n if (!PaymentsEventTypes) {\n try {\n ;({ PaymentsEventTypes } = require('@credo-ts/payments/events/PaymentEvents'))\n } catch {\n /* optional dependency */\n }\n }\n if (!PaymentsEventTypes) throw new Error('payments not available')\n\n const adv = async (threadId: string, event: string, metadata?: EventMetadata) => {\n const scoped = await resolveEventContext(metadata)\n if (!scoped) return\n try {\n await service.advance(scoped.context, {\n instance_id: threadId,\n event,\n idempotency_key: `auto:payments:${event}:${threadId}`,\n })\n } catch (e) {\n logger.debug(`[Workflow] payments event advance error: ${(e as Error).message}`)\n } finally {\n await scoped.release()\n }\n }\n type PaymentListener = (e: {\n payload?: { threadId?: string; status?: string }\n metadata?: EventMetadata\n }) => void\n const on = (evt: string, cb: PaymentListener) =>\n (events as unknown as { on?: (evt: string, cb: PaymentListener) => void }).on?.(evt, cb)\n if (PaymentsEventTypes.IntroResponded)\n on(PaymentsEventTypes.IntroResponded, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.methods_received', e?.metadata)\n })\n if (PaymentsEventTypes.HandshakeAccepted)\n on(PaymentsEventTypes.HandshakeAccepted, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.handshake_accepted', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceRequired)\n on(PaymentsEventTypes.ComplianceRequired, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_required', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceSatisfied)\n on(PaymentsEventTypes.ComplianceSatisfied, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_satisfied', e?.metadata)\n })\n if (PaymentsEventTypes.ComplianceRejected)\n on(PaymentsEventTypes.ComplianceRejected, async (e) => {\n const th = e?.payload?.threadId\n if (th) await adv(th, 'payments.compliance_rejected', e?.metadata)\n })\n if (PaymentsEventTypes.SettlementUpdated)\n on(PaymentsEventTypes.SettlementUpdated, async (e) => {\n const p = e?.payload\n const th = p?.threadId\n const status = p?.status\n if (!status) return\n const map: Record<string, string> = {\n received: 'payments.receipt_received',\n pending: 'payments.settlement_pending',\n settled: 'payments.settled',\n failed: 'payments.failed',\n }\n const ev = map[status]\n if (ev && th) await adv(th, ev, e?.metadata)\n })\n logger.info('WorkflowModule - registered Payments event listeners')\n } catch {\n /* optional dependency */\n }\n\n // Optional: register POE v1 actions when POE module is available\n try {\n let createPoeV1Actions:\n | undefined\n | (() => Array<{ typeUri: string; execute: (...args: unknown[]) => Promise<unknown> }>)\n try {\n ;({ createPoeV1Actions } = require('@ajna-inc/poe'))\n } catch {\n /* optional dependency */\n }\n if (!createPoeV1Actions) {\n try {\n ;({ createPoeV1Actions } = require('@ajna-inc/poe/workflow/PoeV1Actions'))\n } catch {\n /* optional dependency */\n }\n }\n if (createPoeV1Actions) {\n const actions = createPoeV1Actions()\n try {\n const svcAny = service as unknown as {\n registerActions?: (actions: unknown[]) => void\n actions?: { register: (h: unknown) => void }\n }\n if (typeof svcAny.registerActions === 'function') {\n svcAny.registerActions(actions)\n } else if (svcAny.actions && typeof svcAny.actions.register === 'function') {\n for (const a of actions) svcAny.actions.register(a)\n } else {\n throw new Error('no action registry available')\n }\n logger.info('WorkflowModule - registered PoeV1 actions')\n } catch (_e) {\n // swallow\n }\n }\n } catch {\n /* optional dependency */\n }\n\n // Optional: map POE events → workflow events (guarded if POE not installed)\n if (this.config.enablePoeEventMapping)\n try {\n type PoeEvtKeys = 'PoeStateChanged'\n let PoeEventTypes: Partial<Record<PoeEvtKeys, string>> | undefined\n let PoeState: { [key: string]: string } | undefined\n try {\n ;({ PoeEventTypes, PoeState } = require('@ajna-inc/poe'))\n } catch {\n /* optional dependency */\n }\n if (!PoeEventTypes || !PoeState) throw new Error('poe not available')\n\n type PoeListener = (e: {\n payload?: {\n poeRecord?: {\n id?: string\n connectionId?: string\n sessionId?: string\n state?: string\n programId?: string\n verificationResult?: { verified?: boolean; errors?: string[] }\n finalProof?: { result?: unknown }\n }\n previousState?: string\n }\n metadata?: EventMetadata\n }) => void\n const on = (evt: string, cb: PoeListener) =>\n (events as unknown as { on?: (evt: string, cb: PoeListener) => void }).on?.(evt, cb)\n\n if (PoeEventTypes.PoeStateChanged)\n on(PoeEventTypes.PoeStateChanged, async (e) => {\n const poeRecord = e?.payload?.poeRecord\n const connectionId = poeRecord?.connectionId\n if (!connectionId) return\n\n const scoped = await resolveEventContext(e?.metadata)\n if (!scoped) return\n try {\n let workflowEvent: string | undefined\n\n switch (poeRecord.state) {\n case PoeState?.RequestReceived:\n workflowEvent = 'poe.request_received'\n break\n case PoeState?.SubmitReceived:\n workflowEvent = poeRecord.verificationResult?.verified\n ? 'poe.verified'\n : 'poe.verification_failed'\n break\n case PoeState?.ProposalReceived:\n workflowEvent = 'poe.proposal_received'\n break\n case PoeState?.Accepted:\n workflowEvent = 'poe.accepted'\n break\n case PoeState?.Declined:\n workflowEvent = 'poe.declined'\n break\n case PoeState?.Complete:\n workflowEvent = 'poe.completed'\n break\n case PoeState?.Problem:\n workflowEvent = 'poe.problem'\n break\n case PoeState?.ChallengeReceived:\n workflowEvent = 'poe.challenge_received'\n break\n }\n\n if (workflowEvent) {\n await service.autoAdvanceByConnection(\n scoped.context,\n connectionId,\n workflowEvent\n )\n }\n } catch (err) {\n logger.debug(`[Workflow] POE event advance error: ${(err as Error).message}`)\n } finally {\n await scoped.release()\n }\n })\n logger.info('WorkflowModule - registered POE event listeners')\n } catch {\n /* optional dependency */\n }\n\n // Initialize persistent command queue (always enabled, no Redis needed)\n logger.info('WorkflowModule - initializing persistent command queue')\n const commandRepo = dm.resolve(WorkflowCommandRepository)\n const queue = new PersistentCommandQueue(commandRepo, contextProvider, agentContext, {\n pollIntervalMs: this.config.asyncQueue?.pollIntervalMs,\n concurrency: this.config.asyncQueue?.concurrency,\n processingTimeoutMs: this.config.asyncQueue?.processingTimeoutMs,\n staleCheckIntervalMs: this.config.asyncQueue?.staleCheckIntervalMs,\n cleanupIntervalMs: this.config.asyncQueue?.cleanupIntervalMs,\n commandRetentionMs: this.config.asyncQueue?.commandRetentionMs,\n failedRetentionMs: this.config.asyncQueue?.failedRetentionMs,\n maxAttempts: this.config.asyncQueue?.maxAttempts,\n })\n\n // Test-time helper: register queue instance globally for best-effort shutdown in afterAll\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const g: any = globalThis as unknown\n g.__WF_QUEUES = g.__WF_QUEUES || new Set()\n g.__WF_QUEUES.add(queue)\n } catch {\n /* noop */\n }\n\n // In tests or minimal environments, dependencyManager may not expose registerInstance\n try {\n const anyDm = dm as unknown as { registerInstance?: (ctor: unknown, instance: unknown) => void }\n anyDm.registerInstance?.(CommandQueueService, queue)\n } catch {\n // no-op if DI container doesn't support instance registration in this context\n }\n\n // Start worker: processes commands and sends follow-up status messages\n await queue.startWorker(async (job) => {\n // Context resolution handled inside PersistentCommandQueue\n // Worker receives job with already-resolved context\n\n // This worker callback is called from PersistentCommandQueue.processCommand\n // which already resolves the context, so we need to get it here\n const metadata: EventMetadata = { contextCorrelationId: job.contextCorrelationId }\n const scoped = await (async () => {\n const correlationId = metadata.contextCorrelationId\n if (!correlationId || correlationId === rootContextId) {\n return { context: agentContext, release: async () => {} }\n }\n try {\n const scopedContext = await contextProvider.getAgentContextForContextCorrelationId(correlationId)\n return {\n context: scopedContext,\n release: async () => {\n try {\n await contextProvider.endSessionForAgentContext(scopedContext)\n } catch (error) {\n logger.debug('WorkflowModule - failed to end tenant session after queue job', {\n contextCorrelationId: correlationId,\n error: (error as Error).message,\n })\n }\n },\n }\n } catch (error) {\n logger.debug('WorkflowModule - unable to resolve context for queue job', {\n error: (error as Error).message,\n })\n return null\n }\n })()\n if (!scoped) return\n try {\n const ctx = scoped.context\n try {\n logger.info('[WorkflowWorker] handling job', {\n cmd: (job as { cmd?: string }).cmd,\n thid: (job as { thid?: string }).thid,\n connectionId: (job as { connectionId?: string }).connectionId,\n contextCorrelationId: (job as { contextCorrelationId?: string }).contextCorrelationId,\n })\n } catch {}\n switch (job.cmd) {\n case 'start': {\n // Ensure template exists before starting. If missing, attempt auto-discover and defer.\n try {\n const templateRepo = dm.resolve(WorkflowTemplateRepository)\n const p = (job.payload || {}) as unknown as {\n template_id?: string\n template_version?: string\n template_hash?: string\n allow_discover?: boolean\n }\n const templateRec = p.template_id\n ? await templateRepo.findByTemplateIdAndVersion(ctx, p.template_id, p.template_version)\n : null\n if (!templateRec) {\n const allowDiscover = p.allow_discover ?? true\n if (allowDiscover && this.config.enableAutoDiscoverOnStart && job.connectionId) {\n try {\n const sender = dm.resolve(DidCommMessageSender)\n const connectionSvc = dm.resolve(DidCommConnectionService)\n const connection = await connectionSvc.getById(ctx, job.connectionId)\n const { FetchTemplateMessage } = require('./protocol/messages/FetchTemplateMessage')\n const fetch = new FetchTemplateMessage({\n thid: job.thid,\n body: {\n template_id: p.template_id,\n template_version: p.template_version,\n prefer_hash: p.template_hash,\n },\n })\n try {\n fetch.setReturnRouting(ReturnRouteTypes.thread, job.thid)\n } catch {}\n const outbound = new DidCommOutboundMessageContext(fetch, { agentContext: ctx, connection })\n await sender.sendMessage(outbound)\n try {\n logger.info('[WorkflowWorker] fetch-template sent from worker', {\n thid: job.thid,\n template_id: p.template_id,\n template_version: p.template_version,\n })\n } catch {}\n } catch (e) {\n logger.debug('WorkflowModule - fetch-template send failed in worker', {\n error: (e as Error).message,\n })\n }\n }\n // Defer start by signaling invalid_template so queue will retry later\n const err = new Error('template not found for start') as Error & { code?: string }\n err.code = 'invalid_template'\n throw err\n }\n } catch (precheckErr) {\n // Rethrow to queue-level handler for unified deferral behavior\n throw precheckErr\n }\n await service.start(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] start completed', { thid: job.thid }) } catch {}\n break\n }\n case 'advance':\n await service.advance(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] advance completed', { thid: job.thid }) } catch {}\n break\n case 'pause':\n await service.pause(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] pause completed', { thid: job.thid }) } catch {}\n break\n case 'resume':\n await service.resume(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] resume completed', { thid: job.thid }) } catch {}\n break\n case 'cancel':\n await service.cancel(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] cancel completed', { thid: job.thid }) } catch {}\n break\n case 'complete':\n await service.complete(ctx, job.payload as never)\n try { logger.info('[WorkflowWorker] complete completed', { thid: job.thid }) } catch {}\n break\n }\n\n // Note: Per Workflow 1.0 spec §11.6 and §3.4, status is provided on-demand (pull-based).\n // The spec defines status as a request/response pattern where Coordinators explicitly\n // request status via StatusRequestMessage, and Processors respond with StatusMessage.\n //\n // Unsolicited push notifications are not part of the base protocol and cause issues:\n // - Tenant context mismatches in multi-tenant deployments\n // - Receivers interpret unsolicited StatusMessage as a request (same @type)\n // - HTTP transport timeouts (fire-and-forget over request/response transport)\n //\n // For real-time UI updates, use the existing WebSocket event system which emits\n // WorkflowInstanceStateChanged events to connected clients.\n } finally {\n await scoped.release()\n }\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,wBAAwB;AACrC,MAAa,iBAAiB,CAAC,aAAa,cAAc;AAE1D,IAAa,iBAAb,MAA8C;CAI5C,AAAO,YAAY,SAAuC;OAH1C,MAAM;AAIpB,OAAK,SAAS,IAAI,qBAAqB,QAAQ;;CAGjD,AAAO,SAAS,mBAAsC;AACpD,oBAAkB,QAAQ,YAAY,CAAC,OAAO,KAAK,6BAA6B;AAChF,oBAAkB,iBAAiB,sBAAsB,KAAK,OAAO;AAErE,oBAAkB,kBAAkB,2BAA2B;AAC/D,oBAAkB,kBAAkB,2BAA2B;AAC/D,oBAAkB,kBAAkB,0BAA0B;AAC9D,oBAAkB,kBAAkB,gBAAgB;AAKpD,oBAAkB,kBAAkB,uBAAuB;AAC3D,oBAAkB,kBAAkB,aAAa;AACjD,oBAAkB,kBAAkB,eAAe;AACnD,oBAAkB,kBAAkB,cAAc;AAClD,oBAAkB,kBAAkB,qBAAqB;AACzD,oBAAkB,kBAAkB,aAAa;AACjD,oBAAkB,kBAAkB,cAAc;AAClD,oBAAkB,kBAAkB,cAAc;AAClD,oBAAkB,kBAAkB,gBAAgB;AACpD,oBAAkB,kBAAkB,gBAAgB;AACpD,oBAAkB,kBAAkB,qBAAqB;AACzD,oBAAkB,kBAAkB,gBAAgB;;CAGtD,MAAa,WAAW,cAA2C;EACjE,MAAM,KAAK,aAAa;EACxB,MAAM,SAAS,GAAG,QAAQ,YAAY,CAAC;EACvC,MAAM,WAAW,GAAG,QAAQ,uBAAuB;EACnD,MAAM,WAAW,GAAG,QAAQ,8BAA8B;AAC1D,SAAO,KAAK,kEAAkE;AAC9E,MAAI;AACF,YAAS,SAAS,IAAI,gBAAg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F,KAAK;AACH,YAAM,QAAQ,OAAO,KAAK,IAAI,QAAiB;AAC/C,UAAI;AAAE,cAAO,KAAK,qCAAqC,EAAE,MAAM,IAAI,MAAM,CAAC;cAAS;AACnF;KACF,KAAK;AACH,YAAM,QAAQ,OAAO,KAAK,IAAI,QAAiB;AAC/C,UAAI;AAAE,cAAO,KAAK,qCAAqC,EAAE,MAAM,IAAI,MAAM,CAAC;cAAS;AACnF;KACF,KAAK;AACH,YAAM,QAAQ,SAAS,KAAK,IAAI,QAAiB;AACjD,UAAI;AAAE,cAAO,KAAK,uCAAuC,EAAE,MAAM,IAAI,MAAM,CAAC;cAAS;AACrF;;aAcI;AACR,UAAM,OAAO,SAAS;;IAExB"}
@@ -9,7 +9,7 @@ declare class AdvanceHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof AdvanceMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<AdvanceHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage>>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<AdvanceHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage>>;
13
13
  }
14
14
  //#endregion
15
15
  export { AdvanceHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"AdvanceHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/AdvanceHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,cAAA,YAA0B;EAA1B,iBAAe,OAAA;EACF,iBAAA,EAAA,CAAA,OAAA,cAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,cAAA,CAAA,CAAA,EAAe,OAAf,CAAe,6BAAf,CAAe,oBAAf,CAAA,GAAe,6BAAf,CAAe,aAAf,CAAA,CAAA"}
1
+ {"version":3,"file":"AdvanceHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/AdvanceHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,cAAA,YAA0B;EAA1B,iBAAe,OAAA;EACF,iBAAA,EAAA,CAAA,OAAA,cAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,cAAA,CAAA,CAAA,EAAe,OAAf,CAAe,6BAAf,CAAe,aAAf,CAAA,GAAe,6BAAf,CAAe,oBAAf,CAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class CancelHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof CancelMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<CancelHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<CancelHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
13
13
  }
14
14
  //#endregion
15
15
  export { CancelHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"CancelHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/CancelHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,aAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,CAAA,GAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"CancelHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/CancelHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,aAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,CAAA,GAAA,SAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class CompleteHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof CompleteMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<CompleteHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<CompleteHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
13
13
  }
14
14
  //#endregion
15
15
  export { CompleteHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"CompleteHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/CompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,eAAA,YAA2B;EAA3B,iBAAA,OAAgB;EACH,iBAAA,EAAA,CAAA,OAAA,eAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,eAAA,CAAA,CAAA,EAAgB,OAAhB,CAAgB,6BAAhB,CAAgB,oBAAhB,CAAA,GAAgB,6BAAhB,CAAgB,aAAhB,CAAA,GAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"CompleteHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/CompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,eAAA,YAA2B;EAA3B,iBAAA,OAAgB;EACH,iBAAA,EAAA,CAAA,OAAA,eAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,eAAA,CAAA,CAAA,EAAgB,OAAhB,CAAgB,6BAAhB,CAAgB,aAAhB,CAAA,GAAgB,6BAAhB,CAAgB,oBAAhB,CAAA,GAAA,SAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class PauseHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof PauseMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<PauseHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<PauseHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
13
13
  }
14
14
  //#endregion
15
15
  export { PauseHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"PauseHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/PauseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,YAAA,YAAwB;EAAxB,iBAAa,OAAA;EACA,iBAAA,EAAA,CAAA,OAAA,YAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,YAAA,CAAA,CAAA,EAAa,OAAb,CAAa,6BAAb,CAAa,oBAAb,CAAA,GAAa,6BAAb,CAAa,aAAb,CAAA,GAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"PauseHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/PauseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,YAAA,YAAwB;EAAxB,iBAAa,OAAA;EACA,iBAAA,EAAA,CAAA,OAAA,YAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,YAAA,CAAA,CAAA,EAAa,OAAb,CAAa,6BAAb,CAAa,aAAb,CAAA,GAAa,6BAAb,CAAa,oBAAb,CAAA,GAAA,SAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class ResumeHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof ResumeMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<ResumeHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<ResumeHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
13
13
  }
14
14
  //#endregion
15
15
  export { ResumeHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"ResumeHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/ResumeHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,aAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,CAAA,GAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"ResumeHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/ResumeHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,aAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,CAAA,GAAA,SAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class StartHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof StartMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<StartHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage>>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<StartHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage>>;
13
13
  }
14
14
  //#endregion
15
15
  export { StartHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"StartHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/StartHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAkBa,YAAA,YAAwB;EAAxB,iBAAa,OAAA;EACA,iBAAA,EAAA,CAAA,OAAA,YAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,YAAA,CAAA,CAAA,EAAa,OAAb,CAAa,6BAAb,CAAa,oBAAb,CAAA,GAAa,6BAAb,CAAa,aAAb,CAAA,CAAA"}
1
+ {"version":3,"file":"StartHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/StartHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAkBa,YAAA,YAAwB;EAAxB,iBAAa,OAAA;EACA,iBAAA,EAAA,CAAA,OAAA,YAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,YAAA,CAAA,CAAA,EAAa,OAAb,CAAa,6BAAb,CAAa,aAAb,CAAA,GAAa,6BAAb,CAAa,oBAAb,CAAA,CAAA"}
@@ -9,7 +9,7 @@ declare class StatusHandler implements DidCommMessageHandler {
9
9
  private readonly service;
10
10
  supportedMessages: (typeof StatusRequestMessage)[];
11
11
  constructor(service: WorkflowService);
12
- handle(messageContext: DidCommMessageHandlerInboundMessage<StatusHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<StatusHandler>): Promise<DidCommOutboundMessageContext<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
13
13
  }
14
14
  //#endregion
15
15
  export { StatusHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"StatusHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/StatusHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,oBAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,CAAA,GAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"StatusHandler.d.mts","names":[],"sources":["../../../src/protocol/handlers/StatusHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;cAea,aAAA,YAAyB;EAAzB,iBAAc,OAAA;EACD,iBAAA,EAAA,CAAA,OAAA,oBAAA,CAAA,EAAA;EACqB,WAAA,CAAA,OAAA,EAAA,eAAA;EAC2B,MAAA,CAAA,cAAA,EAApC,mCAAoC,CAAA,aAAA,CAAA,CAAA,EAAc,OAAd,CAAc,6BAAd,CAAc,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,CAAA,GAAA,SAAA,CAAA"}
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm0 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm2 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/AdvanceMessage.d.ts
5
5
  declare class AdvanceMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm0.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm2.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm5 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm6 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/CancelMessage.d.ts
5
5
  declare class CancelMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm5.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm6.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm8 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm9 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/CompleteMessage.d.ts
5
5
  declare class CompleteMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm8.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm9.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm9 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm10 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/DiscoverMessage.d.ts
5
5
  declare class DiscoverMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm9.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm10.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  filters?: {
@@ -1 +1 @@
1
- {"version":3,"file":"DiscoverMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/DiscoverMessage.ts"],"sourcesContent":[],"mappings":";;;;cAEa,eAAA,SAAwB,cAAA;wBAAR,kBAAA,CACA;;EADhB,IAAA,EAAA;IAAgB,OAAA,CAAA,EAAA;MAYuB,WAAA,CAAA,EAAA,MAAA;MAZf,OAAA,CAAA,EAAA,MAAA;MAAc,GAAA,CAAA,EAAA,MAAA;;;;;;;;;;;UAYC"}
1
+ {"version":3,"file":"DiscoverMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/DiscoverMessage.ts"],"sourcesContent":[],"mappings":";;;;cAEa,eAAA,SAAwB,cAAA;wBAAR,mBAAA,CACA;;EADhB,IAAA,EAAA;IAAgB,OAAA,CAAA,EAAA;MAYuB,WAAA,CAAA,EAAA,MAAA;MAZf,OAAA,CAAA,EAAA,MAAA;MAAc,GAAA,CAAA,EAAA,MAAA;;;;;;;;;;;UAYC"}
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm11 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm12 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/FetchTemplateMessage.d.ts
5
5
  declare class FetchTemplateMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm11.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm12.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  template_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm6 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm7 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/PauseMessage.d.ts
5
5
  declare class PauseMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm6.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm7.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm4 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm5 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/ProblemReportMessage.d.ts
5
5
  declare class ProblemReportMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm4.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm5.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  code: string;
@@ -1,10 +1,10 @@
1
1
  import { WorkflowTemplate } from "../../model/types.mjs";
2
- import * as _credo_ts_didcomm2 from "@credo-ts/didcomm";
2
+ import * as _credo_ts_didcomm0 from "@credo-ts/didcomm";
3
3
  import { DidCommMessage } from "@credo-ts/didcomm";
4
4
 
5
5
  //#region src/protocol/messages/PublishTemplateMessage.d.ts
6
6
  declare class PublishTemplateMessage extends DidCommMessage {
7
- static readonly type: _credo_ts_didcomm2.ParsedMessageType;
7
+ static readonly type: _credo_ts_didcomm0.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  template: WorkflowTemplate;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm7 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm8 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/ResumeMessage.d.ts
5
5
  declare class ResumeMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm7.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm8.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,10 +1,10 @@
1
1
  import { Participants } from "../../model/types.mjs";
2
- import * as _credo_ts_didcomm0 from "@credo-ts/didcomm";
2
+ import * as _credo_ts_didcomm1 from "@credo-ts/didcomm";
3
3
  import { DidCommMessage } from "@credo-ts/didcomm";
4
4
 
5
5
  //#region src/protocol/messages/StartMessage.d.ts
6
6
  declare class StartMessage extends DidCommMessage {
7
- static readonly type: _credo_ts_didcomm0.ParsedMessageType;
7
+ static readonly type: _credo_ts_didcomm1.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  template_id: string;
@@ -1,10 +1,10 @@
1
1
  import { UiItem } from "../../model/types.mjs";
2
- import * as _credo_ts_didcomm3 from "@credo-ts/didcomm";
2
+ import * as _credo_ts_didcomm0 from "@credo-ts/didcomm";
3
3
  import { DidCommMessage } from "@credo-ts/didcomm";
4
4
 
5
5
  //#region src/protocol/messages/StatusMessage.d.ts
6
6
  declare class StatusMessage extends DidCommMessage {
7
- static readonly type: _credo_ts_didcomm3.ParsedMessageType;
7
+ static readonly type: _credo_ts_didcomm0.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm1 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm3 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/StatusRequestMessage.d.ts
5
5
  declare class StatusRequestMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm1.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm3.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  instance_id: string;
@@ -1,10 +1,10 @@
1
1
  import { WorkflowTemplate } from "../../model/types.mjs";
2
- import * as _credo_ts_didcomm12 from "@credo-ts/didcomm";
2
+ import * as _credo_ts_didcomm4 from "@credo-ts/didcomm";
3
3
  import { DidCommMessage } from "@credo-ts/didcomm";
4
4
 
5
5
  //#region src/protocol/messages/TemplateMessage.d.ts
6
6
  declare class TemplateMessage extends DidCommMessage {
7
- static readonly type: _credo_ts_didcomm12.ParsedMessageType;
7
+ static readonly type: _credo_ts_didcomm4.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  template: WorkflowTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/TemplateMessage.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,eAAA,SAAwB,cAAA;wBAAR,mBAAA,CACA;;EADhB,IAAA,EAAA;IAAgB,QAAA,EAMD,gBALC;EAKD,CAAA;EAEwB,WAAA,CAAA,QAAA,EAAA;IARf,EAAA,CAAA,EAAA,MAAA;IAAc,IAAA,EAQC,eARD,CAAA,MAAA,CAAA"}
1
+ {"version":3,"file":"TemplateMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/TemplateMessage.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,eAAA,SAAwB,cAAA;wBAAR,kBAAA,CACA;;EADhB,IAAA,EAAA;IAAgB,QAAA,EAMD,gBALC;EAKD,CAAA;EAEwB,WAAA,CAAA,QAAA,EAAA;IARf,EAAA,CAAA,EAAA,MAAA;IAAc,IAAA,EAQC,eARD,CAAA,MAAA,CAAA"}
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm10 from "@credo-ts/didcomm";
1
+ import * as _credo_ts_didcomm11 from "@credo-ts/didcomm";
2
2
  import { DidCommMessage } from "@credo-ts/didcomm";
3
3
 
4
4
  //#region src/protocol/messages/WorkflowsMessage.d.ts
5
5
  declare class WorkflowsMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm10.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm11.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  workflows: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajna-inc/workflow",
3
- "version": "0.6.8",
3
+ "version": "0.6.82",
4
4
  "files": [
5
5
  "build",
6
6
  ".npmvc"