@verana-labs/vs-agent-sdk 2.0.0-dev.44 → 2.0.0-dev.45
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.
|
@@ -4,30 +4,13 @@ exports.vtFlowEvents = void 0;
|
|
|
4
4
|
const credo_ts_didcomm_vt_flow_1 = require("@verana-labs/credo-ts-didcomm-vt-flow");
|
|
5
5
|
const vs_agent_model_1 = require("@verana-labs/vs-agent-model");
|
|
6
6
|
const VsAgentEvents_1 = require("./VsAgentEvents");
|
|
7
|
-
const vtFlowEvents =
|
|
8
|
-
agent.events.on(credo_ts_didcomm_vt_flow_1.VtFlowEventTypes.VtFlowStateChanged,
|
|
7
|
+
const vtFlowEvents = (agent, logger) => {
|
|
8
|
+
agent.events.on(credo_ts_didcomm_vt_flow_1.VtFlowEventTypes.VtFlowStateChanged, ({ payload }) => {
|
|
9
9
|
logger.debug(`Incoming vtFlow state change: ${payload.vtFlowRecordId}`);
|
|
10
|
-
const record = await agent.modules.vtFlow.findById(payload.vtFlowRecordId);
|
|
11
|
-
if (!record)
|
|
12
|
-
return;
|
|
13
10
|
(0, VsAgentEvents_1.emitVsAgentEvent)(agent, VsAgentEvents_1.VsAgentEventTypes.VtFlowStateUpdated, new vs_agent_model_1.VtFlowStateUpdated({
|
|
14
11
|
vtFlowRecordId: payload.vtFlowRecordId,
|
|
15
|
-
threadId: payload.threadId,
|
|
16
|
-
participantSessionId: payload.participantSessionId,
|
|
17
|
-
connectionId: record.connectionId,
|
|
18
|
-
role: record.role,
|
|
19
|
-
variant: record.variant,
|
|
20
12
|
state: payload.state,
|
|
21
13
|
previousState: payload.previousState,
|
|
22
|
-
participantId: record.participantId,
|
|
23
|
-
schemaId: record.schemaId,
|
|
24
|
-
claims: record.claims,
|
|
25
|
-
credentialExchangeRecordId: record.credentialExchangeRecordId,
|
|
26
|
-
errorMessage: record.errorMessage,
|
|
27
|
-
subprotocolThid: record.subprotocolThid,
|
|
28
|
-
agentParticipantId: record.agentParticipantId,
|
|
29
|
-
walletAgentParticipantId: record.walletAgentParticipantId,
|
|
30
|
-
timestamp: record.updatedAt,
|
|
31
14
|
}));
|
|
32
15
|
});
|
|
33
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowEvents.js","sourceRoot":"","sources":["../../src/events/VtFlowEvents.ts"],"names":[],"mappings":";;;AAGA,oFAAsG;AACtG,gEAAgE;AAEhE,mDAAqE;AAE9D,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"VtFlowEvents.js","sourceRoot":"","sources":["../../src/events/VtFlowEvents.ts"],"names":[],"mappings":";;;AAGA,oFAAsG;AACtG,gEAAgE;AAEhE,mDAAqE;AAE9D,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,MAAkB,EAAE,EAAE;IACjE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,2CAAgB,CAAC,kBAAkB,EAAE,CAAC,EAAE,OAAO,EAA2B,EAAE,EAAE;QAC5F,MAAM,CAAC,KAAK,CAAC,iCAAiC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;QACvE,IAAA,gCAAgB,EACd,KAAK,EACL,iCAAiB,CAAC,kBAAkB,EACpC,IAAI,mCAAkB,CAAC;YACrB,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAbY,QAAA,YAAY,gBAaxB"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"default": "./build/index.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
-
"version": "2.0.0-dev.
|
|
12
|
+
"version": "2.0.0-dev.45",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/verana-labs/vs-agent"
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"didwebvh-ts": "^2.8.0",
|
|
46
46
|
"express": "^4.18.1",
|
|
47
47
|
"tsyringe": "4.8.0",
|
|
48
|
-
"@verana-labs/credo-ts-didcomm-vt-flow": "2.0.0-dev.
|
|
49
|
-
"@verana-labs/vs-agent-model": "2.0.0-dev.
|
|
48
|
+
"@verana-labs/credo-ts-didcomm-vt-flow": "2.0.0-dev.45",
|
|
49
|
+
"@verana-labs/vs-agent-model": "2.0.0-dev.45"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@credo-ts/core": "0.7.1-pr-2704-20260901064803",
|