@ajna-inc/workflow 0.6.5 → 0.6.7

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 (34) hide show
  1. package/.npmvc/attestations.jsonld +8 -8
  2. package/.npmvc/sbom.cdx.json +3 -3
  3. package/build/WorkflowModule.mjs +5 -0
  4. package/build/WorkflowModule.mjs.map +1 -1
  5. package/build/actions/ActionRegistry.d.mts.map +1 -1
  6. package/build/actions/ActionRegistry.mjs +54 -11
  7. package/build/actions/ActionRegistry.mjs.map +1 -1
  8. package/build/protocol/handlers/AdvanceHandler.d.mts +1 -1
  9. package/build/protocol/handlers/AdvanceHandler.d.mts.map +1 -1
  10. package/build/protocol/handlers/CancelHandler.d.mts +1 -1
  11. package/build/protocol/handlers/CancelHandler.d.mts.map +1 -1
  12. package/build/protocol/handlers/CompleteHandler.d.mts +1 -1
  13. package/build/protocol/handlers/CompleteHandler.d.mts.map +1 -1
  14. package/build/protocol/handlers/PauseHandler.d.mts +1 -1
  15. package/build/protocol/handlers/PauseHandler.d.mts.map +1 -1
  16. package/build/protocol/handlers/ResumeHandler.d.mts +1 -1
  17. package/build/protocol/handlers/ResumeHandler.d.mts.map +1 -1
  18. package/build/protocol/handlers/StartHandler.d.mts +1 -1
  19. package/build/protocol/handlers/StartHandler.d.mts.map +1 -1
  20. package/build/protocol/handlers/StatusHandler.d.mts +1 -1
  21. package/build/protocol/handlers/StatusHandler.d.mts.map +1 -1
  22. package/build/protocol/messages/CancelMessage.d.mts +2 -2
  23. package/build/protocol/messages/CompleteMessage.d.mts +2 -2
  24. package/build/protocol/messages/DiscoverMessage.d.mts +2 -2
  25. package/build/protocol/messages/DiscoverMessage.d.mts.map +1 -1
  26. package/build/protocol/messages/FetchTemplateMessage.d.mts +2 -2
  27. package/build/protocol/messages/PauseMessage.d.mts +2 -2
  28. package/build/protocol/messages/ProblemReportMessage.d.mts +2 -2
  29. package/build/protocol/messages/StatusMessage.d.mts +2 -2
  30. package/build/protocol/messages/StatusRequestMessage.d.mts +2 -2
  31. package/build/protocol/messages/TemplateMessage.d.mts +2 -2
  32. package/build/protocol/messages/WorkflowsMessage.d.mts +2 -2
  33. package/build/protocol/messages/WorkflowsMessage.d.mts.map +1 -1
  34. 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.5"
5
+ "version": "0.6.7"
6
6
  },
7
- "bundledAt": "2026-05-01T13:15:36.707Z",
7
+ "bundledAt": "2026-05-01T17:09:14.577Z",
8
8
  "envelopes": [
9
9
  {
10
10
  "payloadType": "application/vc+json",
11
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImJ1aWxkQ29tbWFuZCI6InRzZG93biAtLWNvbmZpZy1sb2FkZXIgdW5jb25maWciLCJidWlsZGVyIjp7ImlkIjoiZGlkOmtleTp6Nk1raEo1WUJTZEJMSEhKYmppNDVraUpuUmRMVURQdVRWaTdkUDg0TWpTdUV1Y28iLCJraW5kIjoibG9jYWwifSwiaWQiOiJwa2c6bnBtL0Bham5hLWluYy93b3JrZmxvd0AwLjYuNSIsInJlcHJvZHVjaWJsZSI6ZmFsc2UsInNsc2FMZXZlbCI6Miwic291cmNlUmVwbyI6eyJjb21taXQiOiI0N2E5ZTU2NGE3MGI2M2NiYmI4MzkwOTNjZDBiODAxNDY1Y2I1NzM0IiwidHlwZSI6ImdpdCIsInVybCI6InVua25vd24ifSwidGFyYmFsbCI6eyJkaWdlc3QiOnt9LCJuYW1lIjoiQGFqbmEtaW5jL3dvcmtmbG93IiwidmVyc2lvbiI6IjAuNi41In0sInRvb2xjaGFpbiI6eyJub2RlIjoiMjAuMT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ZDgtYWY1Ny00ZTdiLTk0ZTUtYmYzZTI5MjNkYmY4IiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1raEo1WUJTZEJMSEhKYmppNDVraUpuUmRMVURQdVRWaTdkUDg0TWpTdUV1Y28iLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvdmVuYW5jZUNyZWRlbnRpYWwiXSwidmFsaWRGcm9tIjoiMjAyNi0wNS0wMVQxNzowOToxNC4zMTBaIn0=",
12
12
  "signatures": [
13
13
  {
14
14
  "keyid": "did:key:z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
15
15
  "alg": "Ed25519",
16
- "sig": "qaZkB7kCctlf7hN8GLcy66CiAyuWj8Q+vnXweRtYeLQllxAy3EGzlmbQWx+w0tAGayETGe0AYAPTwVJrMfboBQ=="
16
+ "sig": "9Sv9k7LJOuNOKawZEWsrOQMgmks9ZqSTBNR+QjgYgyvsYYLi6JSwa3/rlnEEtb0Lo1E54R8qWxq9al/xj2L6Ag=="
17
17
  }
18
18
  ]
19
19
  },
20
20
  {
21
21
  "payloadType": "application/vc+json",
22
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImRlY2xhcmVkU2NyaXB0cyI6WyJidWlsZCIsInByZXB1Ymxpc2hPbmx5IiwiY2xlYW4iLCJwcmVwYWNrIl0sImlkIjoicGtnOm5wbS9AYWpuYS1pbmMvd29ya2Zsb3dAMC42LjUiLCJwb3N0SW5zdGFsbFBvbGljeSI6ImZvcmJpZGRlbiIsInRhcmJhbGwiOnsiZGlnZXN0Ijp7fSwibmFtZSI6IkBham5hLWluYy93b3JrZmxvdy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cmVkZW50aWFsIl0sInZhbGlkRnJvbSI6IjIwMjYtMDUtMDFUMTc6MDk6MTQuMzM4WiJ9",
23
23
  "signatures": [
24
24
  {
25
25
  "keyid": "did:key:z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
26
26
  "alg": "Ed25519",
27
- "sig": "cgfmd3JnIAn/rfyZYzeKs1fVAYMY5DOzarBPR/Qr4x4TfPaoa+bvOUCS8k6uTDgHq1309tOVvRuC0J9GnXEKAA=="
27
+ "sig": "tfNhZMKKj1ImG8E3PfzNI226HXh1Qc18K4Uuwae1CIDP7HWK83l9gUlQnmeJPCWzor72pAlnah0JluPZsZszAg=="
28
28
  }
29
29
  ]
30
30
  },
31
31
  {
32
32
  "payloadType": "application/vc+json",
33
- "payload": "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvbnMvY3JlZGVudGlhbHMvdjIiLCJodHRwczovL25wbXZjLmNvbS9zY2hlbWFzL3N1cHBseWNoYWluL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZvcm1hdCI6ImN5Y2xvbmVkeC0xLjYiLCJpZCI6InBrZzpucG0vQGFqbmEtaW5jL3dvcmtmbG93QDAuNi41Iiwic2JvbURpZ2VzdCI6eyJhbGciOiJzaGEyNTYiLCJoZXgiOiIxNmYxMjhiZTM5ZjdlMTRlYWYxZDZmOTliMmRiNDJlMzhiZGY3MzMxYzkyYmQxM2YyYWY3MTM4MTExNTVjYzczIn0sInNib21VcmwiOiIuLy5ucG12Yy9zYm9tLmNkeC5qc29uIiwidGFyYmFsbCI6eyJkaWdlc3QiOnt9LCJuYW1lIjoiQGFqbmEtaW5jL3dvcmtmbG93IiwidmVyc2lvbiI6IjAuNi41In19LCJpZCI6InVybjp1dWlkOjI0NzYzMzI4LTY4MTYtNGE5Ni04MTRiLWYwMjhhM2FlZjk3YiIsImlzc3VlciI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nRdLUDPuTVi7dP84MjSuEuco#z6MkhJ5YBSdBLHHJbji45kiJnRdLUDPuTVi7dP84MjSuEuco",
37
37
  "alg": "Ed25519",
38
- "sig": "h49MUZpK9ahdL3H2IqizIWEkNKo/kQ36qeHhX9mTV6/yvLGNNQkgGjbvAWrQ1Yi10HndDTQ4hgxFt+ZwILPUDA=="
38
+ "sig": "voT48chNuyRcl1H9tvsMJGbFugBVpvH0r1guS2bhT0+Nch5vHxnHmzRyNVGLt8XidFcTxyb0sbMm9wAQ40SjDw=="
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-01T13:15:36.701Z",
6
+ "timestamp": "2026-05-01T17:09:14.571Z",
7
7
  "component": {
8
8
  "type": "application",
9
9
  "name": "@ajna-inc/workflow",
10
- "version": "0.6.5",
11
- "purl": "pkg:npm/%40ajna-inc/workflow@0.6.5"
10
+ "version": "0.6.7",
11
+ "purl": "pkg:npm/%40ajna-inc/workflow@0.6.7"
12
12
  },
13
13
  "tools": [
14
14
  {
@@ -123,8 +123,13 @@ var WorkflowModule = class {
123
123
  }
124
124
  try {
125
125
  if (rec.state === DidCommCredentialState.ProposalReceived) await service.autoAdvanceByConnection(scoped.context, connId, "proposal_received");
126
+ else if (rec.state === DidCommCredentialState.ProposalSent) await service.autoAdvanceByConnection(scoped.context, connId, "proposal_sent");
126
127
  else if (rec.state === DidCommCredentialState.OfferReceived) await service.autoAdvanceByConnection(scoped.context, connId, "offer_received");
128
+ else if (rec.state === DidCommCredentialState.OfferSent) await service.autoAdvanceByConnection(scoped.context, connId, "offer_sent");
127
129
  else if (rec.state === DidCommCredentialState.RequestReceived) await service.autoAdvanceByConnection(scoped.context, connId, "request_received");
130
+ else if (rec.state === DidCommCredentialState.RequestSent) await service.autoAdvanceByConnection(scoped.context, connId, "request_sent");
131
+ else if (rec.state === DidCommCredentialState.CredentialIssued) await service.autoAdvanceByConnection(scoped.context, connId, "credential_issued");
132
+ else if (rec.state === DidCommCredentialState.CredentialReceived) await service.autoAdvanceByConnection(scoped.context, connId, "credential_received");
128
133
  else if (rec.state === DidCommCredentialState.Done) await service.autoAdvanceByConnection(scoped.context, connId, "issued_ack");
129
134
  } finally {
130
135
  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 if (rec.state === DidCommCredentialState.ProposalReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'proposal_received')\n } else if (rec.state === DidCommCredentialState.OfferReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'offer_received')\n } else if (rec.state === DidCommCredentialState.RequestReceived) {\n await service.autoAdvanceByConnection(scoped.context, connId, 'request_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 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,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ACnF;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"}
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 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,gBAAgB;IAAE,I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DAAwB;EAET,OAAA,CAAA,GAAA,EAhDA,SAgDA,CAAA,EAhDY,OAgDZ,CAhDoB,YAgDpB,CAAA;;AAAY,cAF3B,uBAAA,YAAmC,qBAER,CAAA;EAFQ,SAAA,OAAA,GAAA,2DAAA;EAAqB,OAAA,CAAA,GAAA,EAEzC,SAFyC,CAAA,EAE7B,OAF6B,CAErB,YAFqB,CAAA;AA2DrE;;;;;AAAuE,cAA1D,yBAAA,YAAqC,qBAAqB,CAAA;EAkE1D,SAAA,OAAA,GAAA,6DAA0B;EAGX,OAAA,CAAA,GAAA,EAlEA,SAkEA,CAAA,EAlEY,OAkEZ,CAlEoB,YAkEpB,CAAA;;;;;AA4D5B;AAG4B,cAlEf,yBAAA,YAAqC,qBAkEtB,CAAA;EAAoB,SAAA,OAAA,GAAA,6DAAA;EAAR,OAAA,CAAA,GAAA,EA/DZ,SA+DY,CAAA,EA/DA,OA+DA,CA/DQ,YA+DR,CAAA;;;AAsDxC;;;AAEwC,cA3D3B,8BAAA,YAA0C,qBA2Df,CAAA;EAFK,SAAA,OAAA,GAAA,2DAAA;EAAqB,OAAA,CAAA,GAAA,EAtDtC,SAsDsC,CAAA,EAtD1B,OAsD0B,CAtDlB,YAsDkB,CAAA;;cAArD,oBAAA,YAAgC;;eAEjB,YAAY,QAAQ"}
@@ -13,22 +13,65 @@ var ActionRegistry = class {
13
13
  return this.handlers.get(typeUri);
14
14
  }
15
15
  };
16
+ const TPL_RE = /\{\{\s*([^}]+?)\s*\}\}/g;
17
+ const resolvePath = (env, expr) => {
18
+ const parts = expr.trim().split(".");
19
+ let cur = env;
20
+ for (const p of parts) {
21
+ if (cur == null || typeof cur !== "object") return void 0;
22
+ cur = cur[p];
23
+ }
24
+ return cur;
25
+ };
26
+ const interpolateString = (s, env) => {
27
+ TPL_RE.lastIndex = 0;
28
+ if (!TPL_RE.test(s)) return s;
29
+ TPL_RE.lastIndex = 0;
30
+ return s.replace(TPL_RE, (_, expr) => {
31
+ const v = resolvePath(env, expr);
32
+ return v == null ? "" : String(v);
33
+ });
34
+ };
35
+ const substituteTemplates = (node, env) => {
36
+ if (typeof node === "string") return interpolateString(node, env);
37
+ if (Array.isArray(node)) return node.map((x) => substituteTemplates(x, env));
38
+ if (node && typeof node === "object") {
39
+ const out = {};
40
+ for (const [k, v] of Object.entries(node)) {
41
+ const newKey = typeof k === "string" ? interpolateString(k, env) : k;
42
+ out[newKey] = substituteTemplates(v, env);
43
+ }
44
+ return out;
45
+ }
46
+ return node;
47
+ };
16
48
  var LocalStateSetAction = class {
17
49
  constructor() {
18
50
  this.typeUri = "https://didcomm.org/workflow/actions/state:set@1";
19
51
  }
20
52
  async execute(ctx) {
21
- const mergeObj = ctx.action?.staticInput;
22
- const mergeValue = typeof mergeObj === "object" && mergeObj ? mergeObj.merge : mergeObj;
23
- if (mergeValue && typeof mergeValue === "object") return { contextMerge: deepMerge({ ...ctx.instance.context || {} }, mergeValue) };
24
- if (typeof mergeValue === "string" && ctx.input && mergeValue.includes("input.")) try {
25
- const value = mergeValue.replace(/\{\{|\}\}/g, "").trim().replace(/^input\./, "").split(".").reduce((acc, p) => {
26
- if (acc === null || acc === void 0) return void 0;
27
- if (typeof acc !== "object") return void 0;
28
- return acc[p];
29
- }, ctx.input);
30
- if (value && typeof value === "object") return { contextMerge: deepMerge({ ...ctx.instance.context || {} }, value) };
31
- } catch (_e) {}
53
+ const raw = ctx.action?.staticInput;
54
+ let merge = raw;
55
+ if (raw && typeof raw === "object" && !Array.isArray(raw) && "merge" in raw) merge = raw.merge;
56
+ const env = {
57
+ input: ctx.input || {},
58
+ context: ctx.instance.context || {},
59
+ context_data: ctx.instance.context || {},
60
+ participants: ctx.instance.participants || {},
61
+ artifacts: ctx.instance.artifacts || {}
62
+ };
63
+ if (merge !== void 0) merge = substituteTemplates(merge, env);
64
+ if (typeof merge === "string") {
65
+ const trimmed = merge.replace(/\{\{|\}\}/g, "").trim();
66
+ if (trimmed.includes(".")) {
67
+ const resolved = resolvePath(env, trimmed);
68
+ if (resolved && typeof resolved === "object") merge = resolved;
69
+ }
70
+ }
71
+ let mergeObj;
72
+ if (merge && typeof merge === "object" && !Array.isArray(merge)) mergeObj = merge;
73
+ if (ctx.input && typeof ctx.input === "object" && !Array.isArray(ctx.input)) mergeObj = deepMerge({ ...mergeObj || {} }, ctx.input);
74
+ if (mergeObj && Object.keys(mergeObj).length > 0) return { contextMerge: deepMerge({ ...ctx.instance.context || {} }, mergeObj) };
32
75
  return {};
33
76
  }
34
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ActionRegistry.mjs","names":["ref: string","messageId: string | undefined"],"sources":["../../src/actions/ActionRegistry.ts"],"sourcesContent":["import type { ActionDef, WorkflowInstanceData, WorkflowTemplate } from '../model/types'\nimport type { AgentContext } from '@credo-ts/core'\n\nimport { DidCommCredentialsApi, DidCommProofsApi } from '@credo-ts/didcomm'\n\nimport { DidCommConnectionService } from '@credo-ts/didcomm'\n\nimport { AttributePlanner, deepMerge } from '../engine/AttributePlanner'\n\nexport type ActionCtx = {\n agentContext: AgentContext\n template: WorkflowTemplate\n instance: WorkflowInstanceData\n action: ActionDef\n input?: Record<string, unknown>\n}\n\nexport type ActionResult = {\n artifacts?: Record<string, unknown>\n contextMerge?: Record<string, unknown>\n messageId?: string\n}\n\nexport interface WorkflowActionHandler {\n readonly typeUri: string\n execute(ctx: ActionCtx): Promise<ActionResult>\n}\n\nexport class ActionRegistry {\n private handlers = new Map<string, WorkflowActionHandler>()\n public register(handler: WorkflowActionHandler) {\n this.handlers.set(handler.typeUri, handler)\n }\n public get(typeUri: string): WorkflowActionHandler | undefined {\n return this.handlers.get(typeUri)\n }\n}\n\nexport class LocalStateSetAction implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/workflow/actions/state:set@1'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const mergeObj = (ctx.action as { staticInput?: unknown })?.staticInput as { merge?: unknown } | undefined | string\n const mergeValue = typeof mergeObj === 'object' && mergeObj ? (mergeObj as { merge?: unknown }).merge : mergeObj\n if (mergeValue && typeof mergeValue === 'object') {\n const next = deepMerge({ ...(ctx.instance.context || {}) }, mergeValue as Record<string, unknown>)\n return { contextMerge: next }\n }\n // if string with template, try basic input resolution: '{{ input.form }}'\n if (typeof mergeValue === 'string' && ctx.input && mergeValue.includes('input.')) {\n try {\n const path = mergeValue\n .replace(/\\{\\{|\\}\\}/g, '')\n .trim()\n .replace(/^input\\./, '')\n const value = path.split('.').reduce<unknown>((acc, p) => {\n if (acc === null || acc === undefined) return undefined\n if (typeof acc !== 'object') return undefined\n return (acc as Record<string, unknown>)[p]\n }, ctx.input)\n if (value && typeof value === 'object') {\n const next = deepMerge({ ...(ctx.instance.context || {}) }, value as Record<string, unknown>)\n return { contextMerge: next }\n }\n } catch (_e) {\n void 0\n }\n }\n return {}\n }\n}\n\nexport class IssueCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/offer-credential'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('cp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.credential_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n const attrs = AttributePlanner.materialize(profile.attribute_plan || {}, ctx.instance)\n const attributes = Object.entries(attrs).map(([name, value]) => ({ name, value: String(value) }))\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n // Enforce to_ref recipient DID against connection counterparty DID (if available)\n {\n const toRef = profile.to_ref\n const expectedDid = toRef ? ctx.instance.participants?.[toRef]?.did : undefined\n if (expectedDid && ctx.instance.connection_id) {\n const connSvc = ctx.agentContext.dependencyManager.resolve(DidCommConnectionService)\n const conn = await connSvc.getById(ctx.agentContext, ctx.instance.connection_id)\n const theirDid = (conn as unknown as { theirDid?: string })?.theirDid\n if (theirDid && theirDid !== expectedDid)\n throw Object.assign(new Error('to_ref DID mismatch'), { code: 'forbidden' })\n }\n }\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n offerCredential: (options: unknown) => Promise<{ id: string; credentialRecord?: { id?: string } }>\n findOfferMessage: (id: string) => Promise<unknown>\n }\n const record = await credsApi.offerCredential({\n connectionId,\n protocolVersion: 'v2',\n credentialFormats: { anoncreds: { credentialDefinitionId: profile.cred_def_id, attributes } },\n comment: profile.options?.comment,\n })\n let messageId: string | undefined = record?.id || record?.credentialRecord?.id\n try {\n if (messageId) {\n const found = (await credsApi.findOfferMessage(messageId)) as unknown\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n return { artifacts: { issueRecordId: record?.id || record?.credentialRecord?.id }, messageId }\n } catch (e) {\n throw Object.assign(new Error(`issue action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * ProposeCredentialV2Action - Holder proposes a credential to the issuer\n * Used when holder initiates the credential issuance flow\n */\nexport class ProposeCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/propose-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('cp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.credential_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n\n // Materialize attributes from context using attribute_plan\n const attrs = AttributePlanner.materialize(profile.attribute_plan || {}, ctx.instance)\n const attributes = Object.entries(attrs).map(([name, value]) => ({ name, value: String(value) }))\n\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n proposeCredential: (options: unknown) => Promise<{ id: string; credentialRecord?: { id?: string } }>\n findProposalMessage: (id: string) => Promise<unknown>\n }\n\n const record = await credsApi.proposeCredential({\n connectionId,\n protocolVersion: 'v2',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: profile.cred_def_id,\n attributes,\n },\n },\n comment: profile.options?.comment,\n })\n\n // Extract message ID for correlation\n let messageId: string | undefined = record?.id || record?.credentialRecord?.id\n try {\n if (messageId) {\n const found = await credsApi.findProposalMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n // Store record ID in artifacts for later actions to find\n return {\n artifacts: { credentialRecordId: record?.id || record?.credentialRecord?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`propose action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * RequestCredentialV2Action - Holder accepts a credential offer\n * Used when holder receives an offer and wants to request the credential\n */\nexport class RequestCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/request-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n acceptOffer: (options: { credentialRecordId: string }) => Promise<{ id: string }>\n getAll: () => Promise<Array<{ id: string; connectionId?: string; state: string; updatedAt?: Date }>>\n findRequestMessage: (id: string) => Promise<unknown>\n }\n\n // Find the credential record with OfferReceived state for this connection\n // Option 1: Check artifacts for stored credentialRecordId\n let credentialRecordId = ctx.instance.artifacts?.credentialRecordId as string | undefined\n\n // Option 2: Query by connection + state if not in artifacts\n if (!credentialRecordId) {\n const all = await credsApi.getAll()\n const matches = all\n .filter((r) => r.connectionId === connectionId && r.state === 'offer-received')\n .sort((a, b) => {\n const dateA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0\n const dateB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0\n return dateB - dateA // Most recent first\n })\n if (matches.length === 0) {\n throw Object.assign(new Error('no offer found to accept'), { code: 'action_error' })\n }\n credentialRecordId = matches[0].id\n }\n\n const record = await credsApi.acceptOffer({ credentialRecordId })\n\n let messageId: string | undefined = record?.id\n try {\n if (messageId) {\n const found = await credsApi.findRequestMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n return {\n artifacts: { credentialRecordId: record?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`request action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * IssueCredentialMessageV2Action - Issuer issues the credential after receiving a request\n * Used when issuer receives a credential request and wants to issue the credential\n */\nexport class IssueCredentialMessageV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/issue-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n acceptRequest: (options: { credentialRecordId: string }) => Promise<{ id: string }>\n getAll: () => Promise<Array<{ id: string; connectionId?: string; state: string; updatedAt?: Date }>>\n findCredentialMessage: (id: string) => Promise<unknown>\n }\n\n // Find the credential record with RequestReceived state for this connection\n let credentialRecordId = ctx.instance.artifacts?.credentialRecordId as string | undefined\n\n if (!credentialRecordId) {\n const all = await credsApi.getAll()\n const matches = all\n .filter((r) => r.connectionId === connectionId && r.state === 'request-received')\n .sort((a, b) => {\n const dateA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0\n const dateB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0\n return dateB - dateA // Most recent first\n })\n if (matches.length === 0) {\n throw Object.assign(new Error('no request found to issue'), { code: 'action_error' })\n }\n credentialRecordId = matches[0].id\n }\n\n const record = await credsApi.acceptRequest({ credentialRecordId })\n\n let messageId: string | undefined = record?.id\n try {\n if (messageId) {\n const found = await credsApi.findCredentialMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n return {\n artifacts: { issuedCredentialRecordId: record?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`issue action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\nexport class PresentProofV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/present-proof/2.0/request-presentation'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('pp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.proof_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n // Enforce to_ref recipient DID against connection counterparty DID (if available)\n {\n const toRef2 = profile.to_ref\n const expectedDid2 = toRef2 ? ctx.instance.participants?.[toRef2]?.did : undefined\n if (expectedDid2 && ctx.instance.connection_id) {\n const connSvc = ctx.agentContext.dependencyManager.resolve(DidCommConnectionService)\n const conn = await connSvc.getById(ctx.agentContext, ctx.instance.connection_id)\n const theirDid = (conn as unknown as { theirDid?: string })?.theirDid\n if (theirDid && theirDid !== expectedDid2)\n throw Object.assign(new Error('to_ref DID mismatch'), { code: 'forbidden' })\n }\n }\n try {\n const proofsApi = ctx.agentContext.dependencyManager.resolve(DidCommProofsApi) as unknown as {\n requestProof: (options: unknown) => Promise<{ id: string; proofRecord?: { id?: string } }>\n findRequestMessage: (id: string) => Promise<unknown>\n }\n const credDefId = (profile as { cred_def_id?: string }).cred_def_id\n const schemaId = (profile as { schema_id?: string }).schema_id\n const restriction = credDefId ? { cred_def_id: credDefId } : schemaId ? { schema_id: schemaId } : undefined\n\n const reqAttrs = (profile.requested_attributes || []).reduce<Record<string, unknown>>(\n (acc, name: string, idx: number) => {\n acc[`attr${idx + 1}`] = restriction ? { name, restrictions: [restriction] } : { name }\n return acc\n },\n {}\n )\n const reqPreds = (profile.requested_predicates || []).reduce<Record<string, unknown>>(\n (acc, p: { name: string; p_type: string; p_value: number }, idx: number) => {\n acc[`pred${idx + 1}`] = restriction\n ? { name: p.name, p_type: p.p_type, p_value: p.p_value, restrictions: [restriction] }\n : { name: p.name, p_type: p.p_type, p_value: p.p_value }\n return acc\n },\n {}\n )\n const record = await proofsApi.requestProof({\n connectionId,\n protocolVersion: 'v2',\n proofFormats: {\n anoncreds: {\n name: 'Workflow Proof Request',\n version: '1.0',\n requested_attributes: reqAttrs,\n requested_predicates: reqPreds,\n },\n },\n willConfirm: true,\n comment: profile.options?.comment,\n })\n let messageId: string | undefined = record?.id || record?.proofRecord?.id\n try {\n if (messageId) {\n const found = (await proofsApi.findRequestMessage(messageId)) as unknown\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n return { artifacts: { proofRecordId: record?.id || record?.proofRecord?.id }, messageId }\n } catch (e) {\n throw Object.assign(new Error(`proof action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n"],"mappings":";;;;AA4BA,IAAa,iBAAb,MAA4B;;OAClB,2BAAW,IAAI,KAAoC;;CAC3D,AAAO,SAAS,SAAgC;AAC9C,OAAK,SAAS,IAAI,QAAQ,SAAS,QAA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,MAAM,OAAO,cAAc;KAAE;KAAM,cAAc,CAAC,YAAY;KAAE,GAAG,EAAE,MAAM;AACtF,WAAO;MAET,EAAE,CACH;GACD,MAAM,YAAY,QAAQ,wBAAwB,EAAE,EAAE,QACnD,KAAK,GAAsD,QAAgB;AAC1E,QAAI,OAAO,MAAM,OAAO,cACpB;KAAE,MAAM,EAAE;KAAM,QAAQ,EAAE;KAAQ,SAAS,EAAE;KAAS,cAAc,CAAC,YAAY;KAAE,GACnF;KAAE,MAAM,EAAE;KAAM,QAAQ,EAAE;KAAQ,SAAS,EAAE;KAAS;AAC1D,WAAO;MAET,EAAE,CACH;GACD,MAAM,SAAS,MAAM,UAAU,aAAa;IAC1C;IACA,iBAAiB;IACjB,cAAc,EACZ,WAAW;KACT,MAAM;KACN,SAAS;KACT,sBAAsB;KACtB,sBAAsB;KACvB,EACF;IACD,aAAa;IACb,SAAS,QAAQ,SAAS;IAC3B,CAAC;GACF,IAAIC,YAAgC,QAAQ,MAAM,QAAQ,aAAa;AACvE,OAAI;AACF,QAAI,WAAW;KACb,MAAM,QAAS,MAAM,UAAU,mBAAmB,UAAU;AAC5D,SAAI,SAAS,OAAO,UAAU,UAAU;MACtC,MAAM,IAAI;AACV,kBAAY,EAAE,SAAS,MAAM,EAAE,MAAM;;;YAGlC,IAAI;AAGb,UAAO;IAAE,WAAW,EAAE,eAAe,QAAQ,MAAM,QAAQ,aAAa,IAAI;IAAE;IAAW;WAClF,GAAG;AACV,SAAM,OAAO,uBAAO,IAAI,MAAM,uBAAwB,EAAY,UAAU,EAAE,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ActionRegistry.mjs","names":["cur: unknown","out: Record<string, unknown>","merge: unknown","env: Record<string, unknown>","mergeObj: Record<string, unknown> | undefined","ref: string","messageId: string | undefined"],"sources":["../../src/actions/ActionRegistry.ts"],"sourcesContent":["import type { ActionDef, WorkflowInstanceData, WorkflowTemplate } from '../model/types'\nimport type { AgentContext } from '@credo-ts/core'\n\nimport { DidCommCredentialsApi, DidCommProofsApi } from '@credo-ts/didcomm'\n\nimport { DidCommConnectionService } from '@credo-ts/didcomm'\n\nimport { AttributePlanner, deepMerge } from '../engine/AttributePlanner'\n\nexport type ActionCtx = {\n agentContext: AgentContext\n template: WorkflowTemplate\n instance: WorkflowInstanceData\n action: ActionDef\n input?: Record<string, unknown>\n}\n\nexport type ActionResult = {\n artifacts?: Record<string, unknown>\n contextMerge?: Record<string, unknown>\n messageId?: string\n}\n\nexport interface WorkflowActionHandler {\n readonly typeUri: string\n execute(ctx: ActionCtx): Promise<ActionResult>\n}\n\nexport class ActionRegistry {\n private handlers = new Map<string, WorkflowActionHandler>()\n public register(handler: WorkflowActionHandler) {\n this.handlers.set(handler.typeUri, handler)\n }\n public get(typeUri: string): WorkflowActionHandler | undefined {\n return this.handlers.get(typeUri)\n }\n}\n\n// Template interpolation helpers (ported from Credo 5)\nconst TPL_RE = /\\{\\{\\s*([^}]+?)\\s*\\}\\}/g\n\nconst resolvePath = (env: Record<string, unknown>, expr: string): unknown => {\n const parts = expr.trim().split('.')\n let cur: unknown = env\n for (const p of parts) {\n if (cur == null || typeof cur !== 'object') return undefined\n cur = (cur as Record<string, unknown>)[p]\n }\n return cur\n}\n\nconst interpolateString = (s: string, env: Record<string, unknown>): string => {\n TPL_RE.lastIndex = 0\n if (!TPL_RE.test(s)) return s\n TPL_RE.lastIndex = 0\n return s.replace(TPL_RE, (_, expr: string) => {\n const v = resolvePath(env, expr)\n return v == null ? '' : String(v)\n })\n}\n\nconst substituteTemplates = (node: unknown, env: Record<string, unknown>): unknown => {\n if (typeof node === 'string') return interpolateString(node, env)\n if (Array.isArray(node)) return node.map((x) => substituteTemplates(x, env))\n if (node && typeof node === 'object') {\n const out: Record<string, unknown> = {}\n for (const [k, v] of Object.entries(node as Record<string, unknown>)) {\n const newKey = typeof k === 'string' ? interpolateString(k, env) : k\n out[newKey] = substituteTemplates(v, env)\n }\n return out\n }\n return node\n}\n\nexport class LocalStateSetAction implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/workflow/actions/state:set@1'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const raw = (ctx.action as { staticInput?: unknown })?.staticInput\n // Accept {merge:{...}} (legacy) or a plain object/string (preferred).\n let merge: unknown = raw\n if (raw && typeof raw === 'object' && !Array.isArray(raw) && 'merge' in (raw as object)) {\n merge = (raw as { merge?: unknown }).merge\n }\n\n const env: Record<string, unknown> = {\n input: (ctx.input as Record<string, unknown>) || {},\n context: (ctx.instance.context as Record<string, unknown>) || {},\n context_data: (ctx.instance.context as Record<string, unknown>) || {},\n participants: (ctx.instance.participants as Record<string, unknown>) || {},\n artifacts: (ctx.instance.artifacts as Record<string, unknown>) || {},\n }\n\n // Substitute {{...}} in keys + values throughout the merge tree.\n if (merge !== undefined) merge = substituteTemplates(merge, env)\n\n // String fallback: '{{ input.form }}' resolves to an object subtree.\n if (typeof merge === 'string') {\n const trimmed = merge.replace(/\\{\\{|\\}\\}/g, '').trim()\n if (trimmed.includes('.')) {\n const resolved = resolvePath(env, trimmed)\n if (resolved && typeof resolved === 'object') merge = resolved\n }\n }\n\n let mergeObj: Record<string, unknown> | undefined\n if (merge && typeof merge === 'object' && !Array.isArray(merge)) {\n mergeObj = merge as Record<string, unknown>\n }\n\n // Match the Python plugin: advance input merges on top of staticInput.\n if (ctx.input && typeof ctx.input === 'object' && !Array.isArray(ctx.input)) {\n mergeObj = deepMerge({ ...(mergeObj || {}) }, ctx.input as Record<string, unknown>)\n }\n\n if (mergeObj && Object.keys(mergeObj).length > 0) {\n const next = deepMerge({ ...(ctx.instance.context || {}) }, mergeObj)\n return { contextMerge: next }\n }\n return {}\n }\n}\n\nexport class IssueCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/offer-credential'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('cp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.credential_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n const attrs = AttributePlanner.materialize(profile.attribute_plan || {}, ctx.instance)\n const attributes = Object.entries(attrs).map(([name, value]) => ({ name, value: String(value) }))\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n // Enforce to_ref recipient DID against connection counterparty DID (if available)\n {\n const toRef = profile.to_ref\n const expectedDid = toRef ? ctx.instance.participants?.[toRef]?.did : undefined\n if (expectedDid && ctx.instance.connection_id) {\n const connSvc = ctx.agentContext.dependencyManager.resolve(DidCommConnectionService)\n const conn = await connSvc.getById(ctx.agentContext, ctx.instance.connection_id)\n const theirDid = (conn as unknown as { theirDid?: string })?.theirDid\n if (theirDid && theirDid !== expectedDid)\n throw Object.assign(new Error('to_ref DID mismatch'), { code: 'forbidden' })\n }\n }\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n offerCredential: (options: unknown) => Promise<{ id: string; credentialRecord?: { id?: string } }>\n findOfferMessage: (id: string) => Promise<unknown>\n }\n const record = await credsApi.offerCredential({\n connectionId,\n protocolVersion: 'v2',\n credentialFormats: { anoncreds: { credentialDefinitionId: profile.cred_def_id, attributes } },\n comment: profile.options?.comment,\n })\n let messageId: string | undefined = record?.id || record?.credentialRecord?.id\n try {\n if (messageId) {\n const found = (await credsApi.findOfferMessage(messageId)) as unknown\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n return { artifacts: { issueRecordId: record?.id || record?.credentialRecord?.id }, messageId }\n } catch (e) {\n throw Object.assign(new Error(`issue action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * ProposeCredentialV2Action - Holder proposes a credential to the issuer\n * Used when holder initiates the credential issuance flow\n */\nexport class ProposeCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/propose-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('cp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.credential_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n\n // Materialize attributes from context using attribute_plan\n const attrs = AttributePlanner.materialize(profile.attribute_plan || {}, ctx.instance)\n const attributes = Object.entries(attrs).map(([name, value]) => ({ name, value: String(value) }))\n\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n proposeCredential: (options: unknown) => Promise<{ id: string; credentialRecord?: { id?: string } }>\n findProposalMessage: (id: string) => Promise<unknown>\n }\n\n const record = await credsApi.proposeCredential({\n connectionId,\n protocolVersion: 'v2',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: profile.cred_def_id,\n attributes,\n },\n },\n comment: profile.options?.comment,\n })\n\n // Extract message ID for correlation\n let messageId: string | undefined = record?.id || record?.credentialRecord?.id\n try {\n if (messageId) {\n const found = await credsApi.findProposalMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n // Store record ID in artifacts for later actions to find\n return {\n artifacts: { credentialRecordId: record?.id || record?.credentialRecord?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`propose action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * RequestCredentialV2Action - Holder accepts a credential offer\n * Used when holder receives an offer and wants to request the credential\n */\nexport class RequestCredentialV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/request-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n acceptOffer: (options: { credentialRecordId: string }) => Promise<{ id: string }>\n getAll: () => Promise<Array<{ id: string; connectionId?: string; state: string; updatedAt?: Date }>>\n findRequestMessage: (id: string) => Promise<unknown>\n }\n\n // Find the credential record with OfferReceived state for this connection\n // Option 1: Check artifacts for stored credentialRecordId\n let credentialRecordId = ctx.instance.artifacts?.credentialRecordId as string | undefined\n\n // Option 2: Query by connection + state if not in artifacts\n if (!credentialRecordId) {\n const all = await credsApi.getAll()\n const matches = all\n .filter((r) => r.connectionId === connectionId && r.state === 'offer-received')\n .sort((a, b) => {\n const dateA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0\n const dateB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0\n return dateB - dateA // Most recent first\n })\n if (matches.length === 0) {\n throw Object.assign(new Error('no offer found to accept'), { code: 'action_error' })\n }\n credentialRecordId = matches[0].id\n }\n\n const record = await credsApi.acceptOffer({ credentialRecordId })\n\n let messageId: string | undefined = record?.id\n try {\n if (messageId) {\n const found = await credsApi.findRequestMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n return {\n artifacts: { credentialRecordId: record?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`request action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\n/**\n * IssueCredentialMessageV2Action - Issuer issues the credential after receiving a request\n * Used when issuer receives a credential request and wants to issue the credential\n */\nexport class IssueCredentialMessageV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/issue-credential/2.0/issue-credential'\n\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n\n try {\n const credsApi = ctx.agentContext.dependencyManager.resolve(DidCommCredentialsApi) as unknown as {\n acceptRequest: (options: { credentialRecordId: string }) => Promise<{ id: string }>\n getAll: () => Promise<Array<{ id: string; connectionId?: string; state: string; updatedAt?: Date }>>\n findCredentialMessage: (id: string) => Promise<unknown>\n }\n\n // Find the credential record with RequestReceived state for this connection\n let credentialRecordId = ctx.instance.artifacts?.credentialRecordId as string | undefined\n\n if (!credentialRecordId) {\n const all = await credsApi.getAll()\n const matches = all\n .filter((r) => r.connectionId === connectionId && r.state === 'request-received')\n .sort((a, b) => {\n const dateA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0\n const dateB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0\n return dateB - dateA // Most recent first\n })\n if (matches.length === 0) {\n throw Object.assign(new Error('no request found to issue'), { code: 'action_error' })\n }\n credentialRecordId = matches[0].id\n }\n\n const record = await credsApi.acceptRequest({ credentialRecordId })\n\n let messageId: string | undefined = record?.id\n try {\n if (messageId) {\n const found = await credsApi.findCredentialMessage(messageId)\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n\n return {\n artifacts: { issuedCredentialRecordId: record?.id },\n messageId,\n }\n } catch (e) {\n throw Object.assign(new Error(`issue action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n\nexport class PresentProofV2Action implements WorkflowActionHandler {\n public readonly typeUri = 'https://didcomm.org/present-proof/2.0/request-presentation'\n public async execute(ctx: ActionCtx): Promise<ActionResult> {\n const act = ctx.action as { profile_ref: string }\n const ref: string = act.profile_ref\n if (!ref?.startsWith('pp.')) throw Object.assign(new Error('invalid profile_ref'), { code: 'action_error' })\n const key = ref.slice(3)\n const profile = ctx.template.catalog?.proof_profiles?.[key]\n if (!profile) throw Object.assign(new Error('missing catalog profile'), { code: 'action_error' })\n const connectionId = ctx.instance.connection_id\n if (!connectionId) throw Object.assign(new Error('connectionId required'), { code: 'action_error' })\n // Enforce to_ref recipient DID against connection counterparty DID (if available)\n {\n const toRef2 = profile.to_ref\n const expectedDid2 = toRef2 ? ctx.instance.participants?.[toRef2]?.did : undefined\n if (expectedDid2 && ctx.instance.connection_id) {\n const connSvc = ctx.agentContext.dependencyManager.resolve(DidCommConnectionService)\n const conn = await connSvc.getById(ctx.agentContext, ctx.instance.connection_id)\n const theirDid = (conn as unknown as { theirDid?: string })?.theirDid\n if (theirDid && theirDid !== expectedDid2)\n throw Object.assign(new Error('to_ref DID mismatch'), { code: 'forbidden' })\n }\n }\n try {\n const proofsApi = ctx.agentContext.dependencyManager.resolve(DidCommProofsApi) as unknown as {\n requestProof: (options: unknown) => Promise<{ id: string; proofRecord?: { id?: string } }>\n findRequestMessage: (id: string) => Promise<unknown>\n }\n const credDefId = (profile as { cred_def_id?: string }).cred_def_id\n const schemaId = (profile as { schema_id?: string }).schema_id\n const restriction = credDefId ? { cred_def_id: credDefId } : schemaId ? { schema_id: schemaId } : undefined\n\n const reqAttrs = (profile.requested_attributes || []).reduce<Record<string, unknown>>(\n (acc, name: string, idx: number) => {\n acc[`attr${idx + 1}`] = restriction ? { name, restrictions: [restriction] } : { name }\n return acc\n },\n {}\n )\n const reqPreds = (profile.requested_predicates || []).reduce<Record<string, unknown>>(\n (acc, p: { name: string; p_type: string; p_value: number }, idx: number) => {\n acc[`pred${idx + 1}`] = restriction\n ? { name: p.name, p_type: p.p_type, p_value: p.p_value, restrictions: [restriction] }\n : { name: p.name, p_type: p.p_type, p_value: p.p_value }\n return acc\n },\n {}\n )\n const record = await proofsApi.requestProof({\n connectionId,\n protocolVersion: 'v2',\n proofFormats: {\n anoncreds: {\n name: 'Workflow Proof Request',\n version: '1.0',\n requested_attributes: reqAttrs,\n requested_predicates: reqPreds,\n },\n },\n willConfirm: true,\n comment: profile.options?.comment,\n })\n let messageId: string | undefined = record?.id || record?.proofRecord?.id\n try {\n if (messageId) {\n const found = (await proofsApi.findRequestMessage(messageId)) as unknown\n if (found && typeof found === 'object') {\n const f = found as { id?: string; message?: { id?: string } }\n messageId = f.message?.id || f.id || messageId\n }\n }\n } catch (_e) {\n void 0\n }\n return { artifacts: { proofRecordId: record?.id || record?.proofRecord?.id }, messageId }\n } catch (e) {\n throw Object.assign(new Error(`proof action error: ${(e as Error).message}`), { code: 'action_error' })\n }\n }\n}\n"],"mappings":";;;;AA4BA,IAAa,iBAAb,MAA4B;;OAClB,2BAAW,IAAI,KAAoC;;CAC3D,AAAO,SAAS,SAAgC;AAC9C,OAAK,SAAS,IAAI,QAAQ,SAAS,QAAQ;;CAE7C,AAAO,IAAI,SAAoD;AAC7D,SAAO,KAAK,SAAS,IAAI,QAAQ;;;AAKrC,MAAM,SAAS;AAEf,MAAM,eAAe,KAA8B,SAA0B;CAC3E,MAAM,QAAQ,KAAK,MAAM,CAAC,MAAM,IAAI;CACpC,IAAIA,MAAe;AACnB,MAAK,MAAM,KAAK,OAAO;AACrB,MAAI,OAAO,QAAQ,OAAO,QAAQ,SAAU,QAAO;AACnD,QAAO,IAAgC;;AAEzC,QAAO;;AAGT,MAAM,qBAAqB,GAAW,QAAyC;AAC7E,QAAO,YAAY;AACnB,KAAI,CAAC,OAAO,KAAK,EAAE,CAAE,QAAO;AAC5B,QAAO,YAAY;AACnB,QAAO,EAAE,QAAQ,SAAS,GAAG,SAAiB;EAC5C,MAAM,IAAI,YAAY,KAAK,KAAK;AAChC,SAAO,KAAK,OAAO,KAAK,OAAO,EAAE;GACjC;;AAGJ,MAAM,uBAAuB,MAAe,QAA0C;AACpF,KAAI,OAAO,SAAS,SAAU,QAAO,kBAAkB,MAAM,IAAI;AACjE,KAAI,MAAM,QAAQ,KAAK,CAAE,QAAO,KA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,MAAM,UAAU,mBAAmB,UAAU;AAC5D,SAAI,SAAS,OAAO,UAAU,UAAU;MACtC,MAAM,IAAI;AACV,kBAAY,EAAE,SAAS,MAAM,EAAE,MAAM;;;YAGlC,IAAI;AAGb,UAAO;IAAE,WAAW,EAAE,eAAe,QAAQ,MAAM,QAAQ,aAAa,IAAI;IAAE;IAAW;WAClF,GAAG;AACV,SAAM,OAAO,uBAAO,IAAI,MAAM,uBAAwB,EAAY,UAAU,EAAE,EAAE,MAAM,gBAAgB,CAAC"}
@@ -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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage>>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<AdvanceHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage>>;
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,aAAf,CAAA,GAAe,6BAAf,CAAe,oBAAf,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,oBAAf,CAAA,GAAe,6BAAf,CAAe,aAAf,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<CancelHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | 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,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,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,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<CompleteHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | 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,aAAhB,CAAA,GAAgB,6BAAhB,CAAgB,oBAAhB,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,oBAAhB,CAAA,GAAgB,6BAAhB,CAAgB,aAAhB,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<PauseHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | 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,aAAb,CAAA,GAAa,6BAAb,CAAa,oBAAb,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,oBAAb,CAAA,GAAa,6BAAb,CAAa,aAAb,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<ResumeHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | 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,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,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,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage>>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<StartHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage>>;
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,aAAb,CAAA,GAAa,6BAAb,CAAa,oBAAb,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,oBAAb,CAAA,GAAa,6BAAb,CAAa,aAAb,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<StatusMessage> | DidCommOutboundMessageContext<ProblemReportMessage> | undefined>;
12
+ handle(messageContext: DidCommMessageHandlerInboundMessage<StatusHandler>): Promise<DidCommOutboundMessageContext<ProblemReportMessage> | DidCommOutboundMessageContext<StatusMessage> | 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,aAAd,CAAA,GAAc,6BAAd,CAAc,oBAAd,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,oBAAd,CAAA,GAAc,6BAAd,CAAc,aAAd,CAAA,GAAA,SAAA,CAAA"}
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm5 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/CancelMessage.d.ts
5
5
  declare class CancelMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm5.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm8.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_didcomm6 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_didcomm6.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_didcomm12 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/FetchTemplateMessage.d.ts
5
5
  declare class FetchTemplateMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm12.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm11.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_didcomm5 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_didcomm5.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_didcomm2 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_didcomm2.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  code: 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_didcomm4 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_didcomm4.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  instance_id: string;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm2 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_didcomm2.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_didcomm11 from "@credo-ts/didcomm";
2
+ import * as _credo_ts_didcomm12 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_didcomm11.ParsedMessageType;
7
+ static readonly type: _credo_ts_didcomm12.ParsedMessageType;
8
8
  type: string;
9
9
  body: {
10
10
  template: WorkflowTemplate;
@@ -1,9 +1,9 @@
1
- import * as _credo_ts_didcomm10 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/WorkflowsMessage.d.ts
5
5
  declare class WorkflowsMessage extends DidCommMessage {
6
- static readonly type: _credo_ts_didcomm10.ParsedMessageType;
6
+ static readonly type: _credo_ts_didcomm9.ParsedMessageType;
7
7
  type: string;
8
8
  body: {
9
9
  workflows: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowsMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/WorkflowsMessage.ts"],"sourcesContent":[],"mappings":";;;;cAEa,gBAAA,SAAyB,cAAA;wBAAR,mBAAA,CACD;;EADhB,IAAA,EAAA;IAAiB,SAAA,EAOf,KANc,CAAA;MAMd,WAAA,EAAA,MAAA;MAIqC,QAAA,EAAA,MAAA,EAAA;MAXd,KAAA,CAAA,EAAA,MAAA;MAAc,IAAA,CAAA,EAAA,MAAA;;;;;;;;;UAWA"}
1
+ {"version":3,"file":"WorkflowsMessage.d.mts","names":[],"sources":["../../../src/protocol/messages/WorkflowsMessage.ts"],"sourcesContent":[],"mappings":";;;;cAEa,gBAAA,SAAyB,cAAA;wBAAR,kBAAA,CACD;;EADhB,IAAA,EAAA;IAAiB,SAAA,EAOf,KANc,CAAA;MAMd,WAAA,EAAA,MAAA;MAIqC,QAAA,EAAA,MAAA,EAAA;MAXd,KAAA,CAAA,EAAA,MAAA;MAAc,IAAA,CAAA,EAAA,MAAA;;;;;;;;;UAWA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajna-inc/workflow",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "files": [
5
5
  "build",
6
6
  ".npmvc"