@minded-ai/mindedjs 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agent.d.ts +3 -9
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +46 -74
- package/dist/agent.js.map +1 -1
- package/dist/checkpointer/checkpointSaverFactory.d.ts +1 -3
- package/dist/checkpointer/checkpointSaverFactory.d.ts.map +1 -1
- package/dist/checkpointer/checkpointSaverFactory.js +38 -5
- package/dist/checkpointer/checkpointSaverFactory.js.map +1 -1
- package/dist/events/AgentEvents.d.ts +1 -8
- package/dist/events/AgentEvents.d.ts.map +1 -1
- package/dist/events/AgentEvents.js +0 -1
- package/dist/events/AgentEvents.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces/zendesk.d.ts.map +1 -1
- package/dist/interfaces/zendesk.js +70 -48
- package/dist/interfaces/zendesk.js.map +1 -1
- package/dist/internalTools/appActionRunnerTool.d.ts +1 -2
- package/dist/internalTools/appActionRunnerTool.d.ts.map +1 -1
- package/dist/internalTools/appActionRunnerTool.js +36 -2
- package/dist/internalTools/appActionRunnerTool.js.map +1 -1
- package/dist/internalTools/sendPlaceholderMessage.d.ts +14 -0
- package/dist/internalTools/sendPlaceholderMessage.d.ts.map +1 -0
- package/dist/internalTools/sendPlaceholderMessage.js +61 -0
- package/dist/internalTools/sendPlaceholderMessage.js.map +1 -0
- package/dist/internalTools/timer.d.ts +93 -0
- package/dist/internalTools/timer.d.ts.map +1 -0
- package/dist/internalTools/timer.js +152 -0
- package/dist/internalTools/timer.js.map +1 -0
- package/dist/nodes/addAppToolNode.d.ts.map +1 -1
- package/dist/nodes/addAppToolNode.js +2 -2
- package/dist/nodes/addAppToolNode.js.map +1 -1
- package/dist/nodes/addJumpToNode.d.ts.map +1 -1
- package/dist/nodes/addJumpToNode.js +2 -2
- package/dist/nodes/addJumpToNode.js.map +1 -1
- package/dist/nodes/addJunctionNode.d.ts +7 -0
- package/dist/nodes/addJunctionNode.d.ts.map +1 -0
- package/dist/nodes/addJunctionNode.js +20 -0
- package/dist/nodes/addJunctionNode.js.map +1 -0
- package/dist/nodes/addPromptNode.d.ts.map +1 -1
- package/dist/nodes/addPromptNode.js +2 -2
- package/dist/nodes/addPromptNode.js.map +1 -1
- package/dist/nodes/addToolNode.d.ts.map +1 -1
- package/dist/nodes/addToolNode.js +2 -2
- package/dist/nodes/addToolNode.js.map +1 -1
- package/dist/nodes/addToolRunNode.d.ts.map +1 -1
- package/dist/nodes/addToolRunNode.js +1 -2
- package/dist/nodes/addToolRunNode.js.map +1 -1
- package/dist/nodes/addTriggerNode.d.ts.map +1 -1
- package/dist/nodes/addTriggerNode.js +1 -2
- package/dist/nodes/addTriggerNode.js.map +1 -1
- package/dist/nodes/nodeFactory.d.ts.map +1 -1
- package/dist/nodes/nodeFactory.js +2 -5
- package/dist/nodes/nodeFactory.js.map +1 -1
- package/dist/platform/mindedCheckpointSaver.d.ts +1 -3
- package/dist/platform/mindedCheckpointSaver.d.ts.map +1 -1
- package/dist/platform/mindedCheckpointSaver.js +43 -10
- package/dist/platform/mindedCheckpointSaver.js.map +1 -1
- package/dist/platform/mindedConnection.d.ts +14 -14
- package/dist/platform/mindedConnection.d.ts.map +1 -1
- package/dist/platform/mindedConnection.js +152 -131
- package/dist/platform/mindedConnection.js.map +1 -1
- package/dist/platform/mindedConnectionTypes.d.ts +38 -38
- package/dist/platform/mindedConnectionTypes.js +24 -24
- package/dist/platform/piiGateway/gateway.d.ts +1 -3
- package/dist/platform/piiGateway/gateway.d.ts.map +1 -1
- package/dist/platform/piiGateway/gateway.js +39 -6
- package/dist/platform/piiGateway/gateway.js.map +1 -1
- package/dist/playbooks/playbooks.d.ts +1 -2
- package/dist/playbooks/playbooks.d.ts.map +1 -1
- package/dist/playbooks/playbooks.js +4 -3
- package/dist/playbooks/playbooks.js.map +1 -1
- package/dist/types/Agent.types.d.ts +9 -13
- package/dist/types/Agent.types.d.ts.map +1 -1
- package/dist/types/Agent.types.js +1 -10
- package/dist/types/Agent.types.js.map +1 -1
- package/dist/voice/voiceSession.d.ts.map +1 -1
- package/dist/voice/voiceSession.js +39 -5
- package/dist/voice/voiceSession.js.map +1 -1
- package/docs/SUMMARY.md +4 -0
- package/docs/tooling/timers.md +61 -0
- package/package.json +2 -3
- package/src/agent.ts +60 -91
- package/src/checkpointer/checkpointSaverFactory.ts +5 -6
- package/src/events/AgentEvents.ts +1 -8
- package/src/index.ts +3 -2
- package/src/interfaces/zendesk.ts +38 -37
- package/src/internalTools/appActionRunnerTool.ts +4 -4
- package/src/internalTools/sendPlaceholderMessage.ts +27 -0
- package/src/internalTools/timer.ts +137 -0
- package/src/nodes/addAppToolNode.ts +3 -3
- package/src/nodes/addJumpToNode.ts +3 -3
- package/src/nodes/addJunctionNode.ts +19 -0
- package/src/nodes/addPromptNode.ts +3 -3
- package/src/nodes/addToolNode.ts +2 -3
- package/src/nodes/addToolRunNode.ts +2 -3
- package/src/nodes/addTriggerNode.ts +3 -3
- package/src/nodes/nodeFactory.ts +2 -7
- package/src/platform/mindedCheckpointSaver.ts +27 -27
- package/src/platform/mindedConnection.ts +176 -147
- package/src/platform/mindedConnectionTypes.ts +38 -38
- package/src/platform/piiGateway/gateway.ts +8 -10
- package/src/playbooks/playbooks.ts +5 -5
- package/src/types/Agent.types.ts +10 -15
- package/src/voice/voiceSession.ts +6 -5
- package/docs-structure.md +0 -141
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
1
|
+
import { mindedConnectionSocketMessageType, mindedConnectionSocketMessageTypeMap } from './mindedConnectionTypes';
|
|
2
|
+
export declare const isConnected: () => boolean;
|
|
3
|
+
export declare const on: <E extends keyof mindedConnectionSocketMessageTypeMap>(event: E, callback: (message: mindedConnectionSocketMessageTypeMap[E], callback: (response: any) => void) => void) => void;
|
|
4
|
+
export declare const emit: <E extends keyof mindedConnectionSocketMessageTypeMap>(event: E, message: mindedConnectionSocketMessageTypeMap[E]) => void;
|
|
5
|
+
export declare const awaitEmit: <T, R>(event: mindedConnectionSocketMessageType, message: T, timeoutMs?: number) => Promise<R>;
|
|
6
|
+
export declare const start: () => Promise<void>;
|
|
7
|
+
export declare const disconnect: () => void;
|
|
8
|
+
export declare const mindedConnection: {
|
|
9
|
+
isConnected: () => boolean;
|
|
10
|
+
on: <E extends keyof mindedConnectionSocketMessageTypeMap>(event: E, callback: (message: mindedConnectionSocketMessageTypeMap[E], callback: (response: any) => void) => void) => void;
|
|
11
|
+
emit: <E extends keyof mindedConnectionSocketMessageTypeMap>(event: E, message: mindedConnectionSocketMessageTypeMap[E]) => void;
|
|
12
|
+
awaitEmit: <T, R>(event: mindedConnectionSocketMessageType, message: T, timeoutMs?: number) => Promise<R>;
|
|
13
|
+
start: () => Promise<void>;
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=mindedConnection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mindedConnection.d.ts","sourceRoot":"","sources":["../../src/platform/mindedConnection.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,
|
|
1
|
+
{"version":3,"file":"mindedConnection.d.ts","sourceRoot":"","sources":["../../src/platform/mindedConnection.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACrC,MAAM,yBAAyB,CAAC;AAYjC,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAC;AAEF,eAAO,MAAM,EAAE,GAAI,CAAC,SAAS,MAAM,oCAAoC,EACrE,OAAO,CAAC,EACR,UAAU,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,SAMxG,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,oCAAoC,EACvE,OAAO,CAAC,EACR,SAAS,oCAAoC,CAAC,CAAC,CAAC,SAKjD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,CAAC,EAAE,CAAC,EAClC,OAAO,iCAAiC,EACxC,SAAS,CAAC,EACV,YAAW,MAAa,KACvB,OAAO,CAAC,CAAC,CAyBX,CAAC;AAqGF,eAAO,MAAM,KAAK,QAAa,OAAO,CAAC,IAAI,CAM1C,CAAC;AAEF,eAAO,MAAM,UAAU,YAatB,CAAC;AAEF,eAAO,MAAM,gBAAgB;uBAhLE,OAAO;SAInB,CAAC,SAAS,MAAM,oCAAoC,SAC9D,CAAC,YACE,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI;WAQpF,CAAC,SAAS,MAAM,oCAAoC,SAChE,CAAC,WACC,oCAAoC,CAAC,CAAC,CAAC;gBAOlB,CAAC,EAAE,CAAC,SAC3B,iCAAiC,WAC/B,CAAC,cACC,MAAM,KAChB,OAAO,CAAC,CAAC,CAAC;iBA8HkB,OAAO,CAAC,IAAI,CAAC;CA6B3C,CAAC"}
|
|
@@ -1,147 +1,168 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mindedConnection = exports.disconnect = exports.start = exports.awaitEmit = exports.emit = exports.on = exports.isConnected = void 0;
|
|
4
4
|
const socket_io_client_1 = require("socket.io-client");
|
|
5
5
|
const flatted_1 = require("flatted");
|
|
6
6
|
const config_1 = require("./config");
|
|
7
7
|
const logger_1 = require("../utils/logger");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const wait_1 = require("../utils/wait");
|
|
9
|
+
// Module-level singleton state
|
|
10
|
+
let socket = null;
|
|
11
|
+
const listeners = {};
|
|
12
|
+
const isConnected = () => {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = socket === null || socket === void 0 ? void 0 : socket.connected) !== null && _a !== void 0 ? _a : false;
|
|
15
|
+
};
|
|
16
|
+
exports.isConnected = isConnected;
|
|
17
|
+
const on = (event, callback) => {
|
|
18
|
+
if (!listeners[event]) {
|
|
19
|
+
listeners[event] = [];
|
|
20
|
+
}
|
|
21
|
+
listeners[event].push(callback);
|
|
22
|
+
};
|
|
23
|
+
exports.on = on;
|
|
24
|
+
const emit = (event, message) => {
|
|
25
|
+
if (socket) {
|
|
26
|
+
socket.emit(event, message);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.emit = emit;
|
|
30
|
+
const awaitEmit = async (event, message, timeoutMs = 5000) => {
|
|
31
|
+
if (!socket) {
|
|
32
|
+
throw new Error('Socket is not connected');
|
|
33
|
+
}
|
|
34
|
+
await waitForConnection();
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
// Set up timeout
|
|
37
|
+
const timeout = setTimeout(() => {
|
|
38
|
+
reject(new Error(`Acknowledgement timeout after ${timeoutMs}ms; event type: ${event}}`));
|
|
39
|
+
}, timeoutMs);
|
|
40
|
+
// Emit with acknowledgement callback
|
|
41
|
+
socket.emit(event, (0, flatted_1.stringify)(message), (response) => {
|
|
42
|
+
clearTimeout(timeout);
|
|
43
|
+
// Check if the response indicates an error
|
|
44
|
+
if (response && response.error) {
|
|
45
|
+
reject(new Error(response.error));
|
|
15
46
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.emit = (event, message) => {
|
|
19
|
-
if (this.socket) {
|
|
20
|
-
this.socket.emit(event, message);
|
|
47
|
+
else {
|
|
48
|
+
resolve(response);
|
|
21
49
|
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
exports.awaitEmit = awaitEmit;
|
|
54
|
+
const waitForConnection = async () => {
|
|
55
|
+
const timeout = 10000;
|
|
56
|
+
const interval = 100;
|
|
57
|
+
let cnt = 0;
|
|
58
|
+
while (!(0, exports.isConnected)()) {
|
|
59
|
+
await (0, wait_1.wait)(interval);
|
|
60
|
+
cnt += interval;
|
|
61
|
+
if (cnt > timeout) {
|
|
62
|
+
throw new Error('Minded connection timeout');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const connect = async (token) => {
|
|
67
|
+
const { isDeployed, baseUrl } = (0, config_1.getConfig)();
|
|
68
|
+
return new Promise((resolve, reject) => {
|
|
69
|
+
socket = (0, socket_io_client_1.io)(baseUrl, {
|
|
70
|
+
path: '/minded-connect',
|
|
71
|
+
query: {
|
|
72
|
+
isDeployedAgent: isDeployed,
|
|
73
|
+
token,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
let connected = false;
|
|
77
|
+
let ready = false;
|
|
78
|
+
const checkReady = () => {
|
|
79
|
+
if (connected && ready) {
|
|
80
|
+
logger_1.logger.info('\x1b[32mConnection with Minded platform is ready!\x1b[0m');
|
|
81
|
+
logger_1.logger.info('\x1b[32mPress Ctrl+C to exit...');
|
|
82
|
+
resolve();
|
|
26
83
|
}
|
|
27
|
-
return new Promise((resolve, reject) => {
|
|
28
|
-
// Set up timeout
|
|
29
|
-
const timeout = setTimeout(() => {
|
|
30
|
-
reject(new Error(`Acknowledgement timeout after ${timeoutMs}ms; event type: ${event}}`));
|
|
31
|
-
}, timeoutMs);
|
|
32
|
-
// Emit with acknowledgement callback
|
|
33
|
-
this.socket.emit(event, (0, flatted_1.stringify)(message), (response) => {
|
|
34
|
-
clearTimeout(timeout);
|
|
35
|
-
// Check if the response indicates an error
|
|
36
|
-
if (response && response.error) {
|
|
37
|
-
reject(new Error(response.error));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
resolve(response);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
84
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
connected
|
|
73
|
-
|
|
74
|
-
});
|
|
75
|
-
// Listen for ready event from server
|
|
76
|
-
this.socket.on('sdk-socket-ready', (data) => {
|
|
77
|
-
logger_1.logger.info('Server ready signal received', data);
|
|
78
|
-
ready = true;
|
|
79
|
-
checkReady();
|
|
80
|
-
});
|
|
81
|
-
this.socket.on('connect_error', () => {
|
|
82
|
-
logger_1.logger.error('Failed to connect to minded platform');
|
|
83
|
-
reject(new Error('Failed to connect to minded platform'));
|
|
84
|
-
});
|
|
85
|
-
this.socket.on('disconnect', () => {
|
|
86
|
-
logger_1.logger.info('Disconnected from local debugging socket');
|
|
87
|
-
connected = false;
|
|
88
|
-
ready = false;
|
|
89
|
-
});
|
|
90
|
-
// Listen for error messages from the server
|
|
91
|
-
this.socket.on('error', async (error) => {
|
|
92
|
-
var _a;
|
|
93
|
-
logger_1.logger.error({ msg: 'Server error:', error });
|
|
94
|
-
if (error.message.includes('Invalid token')) {
|
|
95
|
-
logger_1.logger.info('Invalid token');
|
|
96
|
-
// Disconnect current socket
|
|
97
|
-
if ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.connected) {
|
|
98
|
-
this.socket.disconnect();
|
|
99
|
-
}
|
|
100
|
-
// Get new token and reconnect
|
|
101
|
-
await this.connect(token);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
// Listen for specific message types
|
|
105
|
-
this.socket.onAny((event, message, callback) => {
|
|
106
|
-
if (this.listeners[event]) {
|
|
107
|
-
this.listeners[event].forEach((listener) => {
|
|
108
|
-
listener(message, callback);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
console.warn({ message: 'No listeners found for event', event });
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
// Handle process termination
|
|
116
|
-
process.on('SIGINT', () => {
|
|
117
|
-
var _a;
|
|
118
|
-
if ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.connected) {
|
|
119
|
-
logger_1.logger.info('\nDisconnecting...');
|
|
120
|
-
this.socket.disconnect();
|
|
85
|
+
// Connection event handlers
|
|
86
|
+
socket.on('connect', () => {
|
|
87
|
+
logger_1.logger.info('Socket connected, waiting for server setup...');
|
|
88
|
+
connected = true;
|
|
89
|
+
checkReady();
|
|
90
|
+
});
|
|
91
|
+
// Listen for ready event from server
|
|
92
|
+
socket.on('sdk-socket-ready', (data) => {
|
|
93
|
+
logger_1.logger.info('Server ready signal received', data);
|
|
94
|
+
ready = true;
|
|
95
|
+
checkReady();
|
|
96
|
+
});
|
|
97
|
+
socket.on('connect_error', () => {
|
|
98
|
+
logger_1.logger.error('Failed to connect to minded platform');
|
|
99
|
+
reject(new Error('Failed to connect to minded platform'));
|
|
100
|
+
});
|
|
101
|
+
socket.on('disconnect', () => {
|
|
102
|
+
logger_1.logger.info('Disconnected from local debugging socket');
|
|
103
|
+
connected = false;
|
|
104
|
+
ready = false;
|
|
105
|
+
});
|
|
106
|
+
// Listen for error messages from the server
|
|
107
|
+
socket.on('error', async (error) => {
|
|
108
|
+
logger_1.logger.error({ msg: 'Server error:', error });
|
|
109
|
+
if (error.message.includes('Invalid token')) {
|
|
110
|
+
logger_1.logger.info('Invalid token');
|
|
111
|
+
// Disconnect current socket
|
|
112
|
+
if (socket === null || socket === void 0 ? void 0 : socket.connected) {
|
|
113
|
+
socket.disconnect();
|
|
121
114
|
}
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
// Get new token and reconnect
|
|
116
|
+
await connect(token);
|
|
117
|
+
}
|
|
124
118
|
});
|
|
119
|
+
// Listen for specific message types
|
|
120
|
+
socket.onAny((event, message, callback) => {
|
|
121
|
+
if (listeners[event]) {
|
|
122
|
+
listeners[event].forEach((listener) => {
|
|
123
|
+
listener(message, callback);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
console.warn({ message: 'No listeners found for event', event });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
// Handle process termination
|
|
131
|
+
process.on('SIGINT', () => {
|
|
132
|
+
if (socket === null || socket === void 0 ? void 0 : socket.connected) {
|
|
133
|
+
logger_1.logger.info('\nDisconnecting...');
|
|
134
|
+
socket.disconnect();
|
|
135
|
+
}
|
|
136
|
+
process.exit(0);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
const start = async () => {
|
|
141
|
+
const { token } = (0, config_1.getConfig)();
|
|
142
|
+
if (!token) {
|
|
143
|
+
throw new Error('Minded token not found');
|
|
125
144
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
145
|
+
await connect(token);
|
|
146
|
+
};
|
|
147
|
+
exports.start = start;
|
|
148
|
+
const disconnect = () => {
|
|
149
|
+
if (!socket) {
|
|
150
|
+
logger_1.logger.warn('No socket connection to disconnect');
|
|
151
|
+
return;
|
|
132
152
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
if (this.socket.connected) {
|
|
139
|
-
logger_1.logger.info('Disconnecting from Minded platform...');
|
|
140
|
-
this.socket.disconnect();
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
logger_1.logger.warn('Socket is already disconnected');
|
|
153
|
+
if (socket.connected) {
|
|
154
|
+
logger_1.logger.info('Disconnecting from Minded platform...');
|
|
155
|
+
socket.disconnect();
|
|
156
|
+
return;
|
|
144
157
|
}
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
logger_1.logger.warn('Socket is already disconnected');
|
|
159
|
+
};
|
|
160
|
+
exports.disconnect = disconnect;
|
|
161
|
+
exports.mindedConnection = {
|
|
162
|
+
isConnected: exports.isConnected,
|
|
163
|
+
on: exports.on,
|
|
164
|
+
emit: exports.emit,
|
|
165
|
+
awaitEmit: exports.awaitEmit,
|
|
166
|
+
start: exports.start,
|
|
167
|
+
};
|
|
147
168
|
//# sourceMappingURL=mindedConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mindedConnection.js","sourceRoot":"","sources":["../../src/platform/mindedConnection.ts"],"names":[],"mappings":";;;AAAA,uDAA8C;
|
|
1
|
+
{"version":3,"file":"mindedConnection.js","sourceRoot":"","sources":["../../src/platform/mindedConnection.ts"],"names":[],"mappings":";;;AAAA,uDAA8C;AAK9C,qCAAoC;AACpC,qCAAqC;AACrC,4CAAyC;AACzC,wCAAqC;AAErC,+BAA+B;AAC/B,IAAI,MAAM,GAAkB,IAAI,CAAC;AACjC,MAAM,SAAS,GAEX,EAAE,CAAC;AAEA,MAAM,WAAW,GAAG,GAAY,EAAE;;IACvC,OAAO,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,mCAAI,KAAK,CAAC;AACpC,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAEK,MAAM,EAAE,GAAG,CAChB,KAAQ,EACR,QAAuG,EACvG,EAAE;IACF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;IACxB,CAAC;IACD,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,C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C,CAAC,CAAC;QACrD,MAAM,CAAC,UAAU,EAAE,CAAC;QACpB,OAAO;IACT,CAAC;IAED,eAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;AAChD,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB;AAEW,QAAA,gBAAgB,GAAG;IAC9B,WAAW,EAAX,mBAAW;IACX,EAAE,EAAF,UAAE;IACF,IAAI,EAAJ,YAAI;IACJ,SAAS,EAAT,iBAAS;IACT,KAAK,EAAL,aAAK;CACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CheckpointListOptions, CheckpointMetadata, PendingWrite, Checkpoint, ChannelVersions, CheckpointTuple } from '@langchain/langgraph-checkpoint';
|
|
2
2
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
3
3
|
import { AgentInvokeParams } from '../types/Agent.types';
|
|
4
|
-
export declare enum
|
|
4
|
+
export declare enum mindedConnectionSocketMessageType {
|
|
5
5
|
OnAppAction = "on-app-action",
|
|
6
6
|
GET_SECRETS = "get-secrets",
|
|
7
7
|
GET_FLOWS = "get-flows",
|
|
@@ -23,35 +23,35 @@ export declare enum MindedConnectionSocketMessageType {
|
|
|
23
23
|
TIMER_CANCEL = "timer-cancel",
|
|
24
24
|
TIMER_TRIGGER = "timer-trigger"
|
|
25
25
|
}
|
|
26
|
-
export type
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
26
|
+
export type mindedConnectionSocketMessageTypeMap = {
|
|
27
|
+
[mindedConnectionSocketMessageType.OnAppAction]: BasemindedConnectionSocketMessage;
|
|
28
|
+
[mindedConnectionSocketMessageType.GET_SECRETS]: BasemindedConnectionSocketMessage;
|
|
29
|
+
[mindedConnectionSocketMessageType.GET_FLOWS]: BasemindedConnectionSocketMessage;
|
|
30
|
+
[mindedConnectionSocketMessageType.GET_PLAYBOOKS]: BasemindedConnectionSocketMessage;
|
|
31
|
+
[mindedConnectionSocketMessageType.INVOKE]: InvokeMessage;
|
|
32
|
+
[mindedConnectionSocketMessageType.CHECKPOINT_GET_TUPLE]: OnCheckpointGetTuple;
|
|
33
|
+
[mindedConnectionSocketMessageType.CHECKPOINT_PUT]: OnCheckpointPut;
|
|
34
|
+
[mindedConnectionSocketMessageType.CHECKPOINT_LIST]: OnCheckpointList;
|
|
35
|
+
[mindedConnectionSocketMessageType.CHECKPOINT_PUT_WRITES]: OnCheckpointPutWrites;
|
|
36
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_USER_AUDIO]: OnVoiceAudioIn;
|
|
37
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_AGENT_AUDIO]: OnVoiceAudioOut;
|
|
38
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_SESSION_START]: BaseVoiceMessage;
|
|
39
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_SESSION_END]: OnVoiceSessionEnd;
|
|
40
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_INTERRUPTION]: OnVoiceInterruption;
|
|
41
|
+
[mindedConnectionSocketMessageType.DASHBOARD_VOICE_PLACEHOLDER_MESSAGES]: VoicePlaceholderMessage;
|
|
42
|
+
[mindedConnectionSocketMessageType.PII_HTTP_REQUEST]: OnPiiHttpRequest;
|
|
43
|
+
[mindedConnectionSocketMessageType.INTERFACE_FUNCTION_CALL]: InterfaceFunctionCall;
|
|
44
|
+
[mindedConnectionSocketMessageType.TIMER_RESET]: TimerResetRequest;
|
|
45
|
+
[mindedConnectionSocketMessageType.TIMER_CANCEL]: TimerCancelRequest;
|
|
46
|
+
[mindedConnectionSocketMessageType.TIMER_TRIGGER]: TimerTriggerRequest;
|
|
47
47
|
};
|
|
48
|
-
export interface
|
|
49
|
-
type:
|
|
48
|
+
export interface BasemindedConnectionSocketMessage {
|
|
49
|
+
type: mindedConnectionSocketMessageType;
|
|
50
50
|
}
|
|
51
51
|
export interface BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
52
52
|
error?: string;
|
|
53
53
|
}
|
|
54
|
-
export interface OnCheckpointPut extends
|
|
54
|
+
export interface OnCheckpointPut extends BasemindedConnectionSocketMessage {
|
|
55
55
|
config: RunnableConfig;
|
|
56
56
|
checkpoint: Checkpoint;
|
|
57
57
|
metadata: CheckpointMetadata;
|
|
@@ -60,7 +60,7 @@ export interface OnCheckpointPut extends BaseMindedConnectionSocketMessage {
|
|
|
60
60
|
export interface OnCheckpointPutResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
61
61
|
config: RunnableConfig;
|
|
62
62
|
}
|
|
63
|
-
export interface OnCheckpointPutWrites extends
|
|
63
|
+
export interface OnCheckpointPutWrites extends BasemindedConnectionSocketMessage {
|
|
64
64
|
config: RunnableConfig;
|
|
65
65
|
writes: PendingWrite[];
|
|
66
66
|
taskId: string;
|
|
@@ -68,17 +68,17 @@ export interface OnCheckpointPutWrites extends BaseMindedConnectionSocketMessage
|
|
|
68
68
|
export interface OnCheckpointGetTupleResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
69
69
|
tuple?: CheckpointTuple | undefined;
|
|
70
70
|
}
|
|
71
|
-
export interface OnCheckpointGetTuple extends
|
|
71
|
+
export interface OnCheckpointGetTuple extends BasemindedConnectionSocketMessage {
|
|
72
72
|
config: RunnableConfig;
|
|
73
73
|
}
|
|
74
|
-
export interface OnCheckpointList extends
|
|
74
|
+
export interface OnCheckpointList extends BasemindedConnectionSocketMessage {
|
|
75
75
|
config: RunnableConfig;
|
|
76
76
|
options?: CheckpointListOptions;
|
|
77
77
|
}
|
|
78
78
|
export interface OnCheckpointListResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
79
79
|
checkpoints?: CheckpointTuple[];
|
|
80
80
|
}
|
|
81
|
-
export interface BaseVoiceMessage extends
|
|
81
|
+
export interface BaseVoiceMessage extends BasemindedConnectionSocketMessage {
|
|
82
82
|
sessionId: string;
|
|
83
83
|
timestamp: number;
|
|
84
84
|
}
|
|
@@ -91,18 +91,18 @@ export interface OnVoiceAudioOut extends BaseVoiceMessage {
|
|
|
91
91
|
export interface VoicePlaceholderMessage extends BaseVoiceMessage {
|
|
92
92
|
message: string;
|
|
93
93
|
}
|
|
94
|
-
export interface OnVoiceInterruption extends
|
|
94
|
+
export interface OnVoiceInterruption extends BasemindedConnectionSocketMessage {
|
|
95
95
|
sessionId: string;
|
|
96
96
|
timestamp: number;
|
|
97
97
|
}
|
|
98
|
-
export interface OnVoiceSessionEnd extends
|
|
98
|
+
export interface OnVoiceSessionEnd extends BasemindedConnectionSocketMessage {
|
|
99
99
|
sessionId: string;
|
|
100
100
|
timestamp: number;
|
|
101
101
|
}
|
|
102
|
-
export interface InvokeMessage extends
|
|
103
|
-
type:
|
|
102
|
+
export interface InvokeMessage extends BasemindedConnectionSocketMessage, AgentInvokeParams {
|
|
103
|
+
type: mindedConnectionSocketMessageType.INVOKE;
|
|
104
104
|
}
|
|
105
|
-
export interface OnPiiHttpRequest extends
|
|
105
|
+
export interface OnPiiHttpRequest extends BasemindedConnectionSocketMessage {
|
|
106
106
|
sessionId: string;
|
|
107
107
|
requestId: string;
|
|
108
108
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
@@ -118,13 +118,13 @@ export interface OnPiiHttpResponse extends BaseSdkConnectionSocketMessageRespons
|
|
|
118
118
|
statusText?: string;
|
|
119
119
|
headers?: Record<string, string>;
|
|
120
120
|
}
|
|
121
|
-
export interface InterfaceFunctionCall extends
|
|
121
|
+
export interface InterfaceFunctionCall extends BasemindedConnectionSocketMessage {
|
|
122
122
|
sessionId: string;
|
|
123
123
|
interfaceName: string;
|
|
124
124
|
functionName: string;
|
|
125
125
|
functionArgs: Record<string, any>;
|
|
126
126
|
}
|
|
127
|
-
export interface TimerResetRequest extends
|
|
127
|
+
export interface TimerResetRequest extends BasemindedConnectionSocketMessage {
|
|
128
128
|
sessionId: string;
|
|
129
129
|
seconds: number;
|
|
130
130
|
timerName: string;
|
|
@@ -133,14 +133,14 @@ export interface TimerResetRequest extends BaseMindedConnectionSocketMessage {
|
|
|
133
133
|
export interface TimerResetResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
134
134
|
success?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export interface TimerCancelRequest extends
|
|
136
|
+
export interface TimerCancelRequest extends BasemindedConnectionSocketMessage {
|
|
137
137
|
sessionId: string;
|
|
138
138
|
timerName: string;
|
|
139
139
|
}
|
|
140
140
|
export interface TimerCancelResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
141
141
|
success?: boolean;
|
|
142
142
|
}
|
|
143
|
-
export interface TimerTriggerRequest extends
|
|
143
|
+
export interface TimerTriggerRequest extends BasemindedConnectionSocketMessage {
|
|
144
144
|
sessionId: string;
|
|
145
145
|
timerName: string;
|
|
146
146
|
eventArgs: Record<string, any>;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
exports.mindedConnectionSocketMessageType = void 0;
|
|
4
|
+
var mindedConnectionSocketMessageType;
|
|
5
|
+
(function (mindedConnectionSocketMessageType) {
|
|
6
|
+
mindedConnectionSocketMessageType["OnAppAction"] = "on-app-action";
|
|
7
|
+
mindedConnectionSocketMessageType["GET_SECRETS"] = "get-secrets";
|
|
8
|
+
mindedConnectionSocketMessageType["GET_FLOWS"] = "get-flows";
|
|
9
|
+
mindedConnectionSocketMessageType["GET_PLAYBOOKS"] = "get-playbooks";
|
|
10
|
+
mindedConnectionSocketMessageType["INVOKE"] = "invoke";
|
|
11
|
+
mindedConnectionSocketMessageType["PII_HTTP_REQUEST"] = "pii-http-request";
|
|
12
12
|
// Checkpoints
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
mindedConnectionSocketMessageType["CHECKPOINT_GET_TUPLE"] = "checkpoint-get-tuple";
|
|
14
|
+
mindedConnectionSocketMessageType["CHECKPOINT_PUT"] = "checkpoint-put";
|
|
15
|
+
mindedConnectionSocketMessageType["CHECKPOINT_LIST"] = "checkpoint-list";
|
|
16
|
+
mindedConnectionSocketMessageType["CHECKPOINT_PUT_WRITES"] = "checkpoint-put-writes";
|
|
17
17
|
// Voice
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})(
|
|
18
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_USER_AUDIO"] = "dashboard-voice-user-audio";
|
|
19
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_AGENT_AUDIO"] = "dashboard-voice-agent-audio";
|
|
20
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_SESSION_START"] = "dashboard-voice-session-start";
|
|
21
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_SESSION_END"] = "dashboard-voice-session-end";
|
|
22
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_INTERRUPTION"] = "dashboard-voice-interruption";
|
|
23
|
+
mindedConnectionSocketMessageType["DASHBOARD_VOICE_PLACEHOLDER_MESSAGES"] = "dashboard-voice-placeholder-messages";
|
|
24
|
+
mindedConnectionSocketMessageType["INTERFACE_FUNCTION_CALL"] = "interface-function-call";
|
|
25
|
+
mindedConnectionSocketMessageType["TIMER_RESET"] = "timer-reset";
|
|
26
|
+
mindedConnectionSocketMessageType["TIMER_CANCEL"] = "timer-cancel";
|
|
27
|
+
mindedConnectionSocketMessageType["TIMER_TRIGGER"] = "timer-trigger";
|
|
28
|
+
})(mindedConnectionSocketMessageType || (exports.mindedConnectionSocketMessageType = mindedConnectionSocketMessageType = {}));
|
|
29
29
|
//# sourceMappingURL=mindedConnectionTypes.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { MindedConnection } from '../mindedConnection';
|
|
2
1
|
import { HttpRequestConfig, HttpResponse, PIIGatewayInstance } from './types';
|
|
3
2
|
export declare class PIIGateway implements PIIGatewayInstance {
|
|
4
|
-
|
|
5
|
-
constructor(mindedConnection: MindedConnection);
|
|
3
|
+
constructor();
|
|
6
4
|
private makeRequest;
|
|
7
5
|
get<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
8
6
|
post<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../../src/platform/piiGateway/gateway.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../../src/platform/piiGateway/gateway.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG9E,qBAAa,UAAW,YAAW,kBAAkB;;YAKrC,WAAW;IA2DnB,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAIlG,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,E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