@minded-ai/mindedjs 1.0.53-patch6 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +12 -17
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +21 -78
- package/dist/agent.js.map +1 -1
- package/dist/edges/edgeFactory.d.ts +3 -1
- package/dist/edges/edgeFactory.d.ts.map +1 -1
- package/dist/edges/edgeFactory.js +2 -2
- package/dist/edges/edgeFactory.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internalTools/appActionRunnerTool.d.ts.map +1 -1
- package/dist/internalTools/appActionRunnerTool.js +1 -1
- package/dist/internalTools/appActionRunnerTool.js.map +1 -1
- package/dist/nodes/addAppToolNode.d.ts +3 -1
- 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/addPromptNode.d.ts +3 -1
- package/dist/nodes/addPromptNode.d.ts.map +1 -1
- package/dist/nodes/addPromptNode.js +2 -3
- package/dist/nodes/addPromptNode.js.map +1 -1
- package/dist/nodes/addToolRunNode.d.ts +3 -1
- package/dist/nodes/addToolRunNode.d.ts.map +1 -1
- package/dist/nodes/addToolRunNode.js +2 -2
- package/dist/nodes/addToolRunNode.js.map +1 -1
- package/dist/nodes/nodeFactory.d.ts +3 -1
- package/dist/nodes/nodeFactory.d.ts.map +1 -1
- package/dist/nodes/nodeFactory.js +3 -3
- package/dist/nodes/nodeFactory.js.map +1 -1
- package/dist/pii-gateway/gateway.d.ts +17 -0
- package/dist/pii-gateway/gateway.d.ts.map +1 -0
- package/dist/pii-gateway/gateway.js +77 -0
- package/dist/pii-gateway/gateway.js.map +1 -0
- package/dist/pii-gateway/index.d.ts +4 -0
- package/dist/pii-gateway/index.d.ts.map +1 -0
- package/dist/pii-gateway/index.js +14 -0
- package/dist/pii-gateway/index.js.map +1 -0
- package/dist/pii-gateway/proxy.d.ts +80 -0
- package/dist/pii-gateway/proxy.d.ts.map +1 -0
- package/dist/pii-gateway/proxy.js +106 -0
- package/dist/pii-gateway/proxy.js.map +1 -0
- package/dist/pii-gateway/types.d.ts +27 -0
- package/dist/pii-gateway/types.d.ts.map +1 -0
- package/dist/{types/Voice.types.js → pii-gateway/types.js} +1 -1
- package/dist/pii-gateway/types.js.map +1 -0
- package/dist/platform/config.d.ts +0 -3
- package/dist/platform/config.d.ts.map +1 -1
- package/dist/platform/config.js +1 -18
- package/dist/platform/config.js.map +1 -1
- package/dist/platform/mindedConnection.d.ts +4 -4
- package/dist/platform/mindedConnection.d.ts.map +1 -1
- package/dist/platform/mindedConnection.js +5 -8
- package/dist/platform/mindedConnection.js.map +1 -1
- package/dist/platform/mindedConnectionTypes.d.ts +17 -53
- package/dist/platform/mindedConnectionTypes.d.ts.map +1 -1
- package/dist/platform/mindedConnectionTypes.js +3 -11
- package/dist/platform/mindedConnectionTypes.js.map +1 -1
- package/dist/platform/piiGateway/gateway.d.ts +16 -0
- package/dist/platform/piiGateway/gateway.d.ts.map +1 -0
- package/dist/platform/piiGateway/gateway.js +76 -0
- package/dist/platform/piiGateway/gateway.js.map +1 -0
- package/dist/platform/piiGateway/index.d.ts +3 -0
- package/dist/platform/piiGateway/index.d.ts.map +1 -0
- package/dist/platform/piiGateway/index.js +7 -0
- package/dist/platform/piiGateway/index.js.map +1 -0
- package/dist/platform/piiGateway/proxy.d.ts +20 -0
- package/dist/platform/piiGateway/proxy.d.ts.map +1 -0
- package/dist/platform/piiGateway/proxy.js +24 -0
- package/dist/platform/piiGateway/proxy.js.map +1 -0
- package/dist/platform/piiGateway/types.d.ts +27 -0
- package/dist/platform/piiGateway/types.d.ts.map +1 -0
- package/dist/platform/piiGateway/types.js +3 -0
- package/dist/platform/piiGateway/types.js.map +1 -0
- package/dist/types/Agent.types.d.ts +0 -13
- package/dist/types/Agent.types.d.ts.map +1 -1
- package/dist/types/Agent.types.js.map +1 -1
- package/dist/types/Flows.types.d.ts +2 -15
- package/dist/types/Flows.types.d.ts.map +1 -1
- package/dist/types/Flows.types.js +0 -1
- package/dist/types/Flows.types.js.map +1 -1
- package/dist/types/LangGraph.types.d.ts +1 -0
- package/dist/types/LangGraph.types.d.ts.map +1 -1
- package/dist/types/LangGraph.types.js +1 -0
- package/dist/types/LangGraph.types.js.map +1 -1
- package/dist/types/Tools.types.d.ts +8 -6
- package/dist/types/Tools.types.d.ts.map +1 -1
- package/package.json +2 -5
- package/src/agent.ts +42 -97
- package/src/edges/edgeFactory.ts +4 -1
- package/src/index.ts +14 -7
- package/src/internalTools/appActionRunnerTool.ts +53 -50
- package/src/nodes/addAppToolNode.ts +4 -1
- package/src/nodes/addPromptNode.ts +5 -4
- package/src/nodes/addToolRunNode.ts +4 -2
- package/src/nodes/nodeFactory.ts +7 -4
- package/src/platform/config.ts +1 -21
- package/src/platform/mindedConnection.ts +9 -15
- package/src/platform/mindedConnectionTypes.ts +16 -61
- package/src/platform/piiGateway/gateway.ts +97 -0
- package/src/platform/piiGateway/index.ts +5 -0
- package/src/platform/piiGateway/types.ts +29 -0
- package/src/types/Agent.types.ts +0 -14
- package/src/types/Flows.types.ts +1 -15
- package/src/types/LangGraph.types.ts +1 -0
- package/src/types/Tools.types.ts +9 -3
- package/dist/types/Voice.types.d.ts +0 -5
- package/dist/types/Voice.types.d.ts.map +0 -1
- package/dist/types/Voice.types.js.map +0 -1
- package/dist/voice/elevenLabsUtils.d.ts +0 -70
- package/dist/voice/elevenLabsUtils.d.ts.map +0 -1
- package/dist/voice/elevenLabsUtils.js +0 -20
- package/dist/voice/elevenLabsUtils.js.map +0 -1
- package/dist/voice/voiceSession.d.ts +0 -47
- package/dist/voice/voiceSession.d.ts.map +0 -1
- package/dist/voice/voiceSession.js +0 -214
- package/dist/voice/voiceSession.js.map +0 -1
- package/src/types/Voice.types.ts +0 -4
- package/src/voice/elevenLabsUtils.ts +0 -101
- package/src/voice/voiceSession.ts +0 -257
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
import type { CheckpointListOptions, CheckpointMetadata, PendingWrite, Checkpoint, ChannelVersions, CheckpointTuple } from '@langchain/langgraph-checkpoint';
|
|
2
2
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
3
|
-
import { AgentInvokeParams } from '../types/Agent.types';
|
|
4
3
|
export declare enum MindedConnectionSocketMessageType {
|
|
5
4
|
OnAppTrigger = "on-app-trigger",
|
|
6
5
|
OnAppAction = "on-app-action",
|
|
7
|
-
GET_SECRETS = "get-secrets",
|
|
8
|
-
GET_FLOWS = "get-flows",
|
|
9
|
-
INVOKE = "invoke",
|
|
10
6
|
CHECKPOINT_GET_TUPLE = "checkpoint-get-tuple",
|
|
11
7
|
CHECKPOINT_PUT = "checkpoint-put",
|
|
12
8
|
CHECKPOINT_LIST = "checkpoint-list",
|
|
13
9
|
CHECKPOINT_PUT_WRITES = "checkpoint-put-writes",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DASHBOARD_VOICE_SESSION_END = "dashboard-voice-session-end",
|
|
18
|
-
DASHBOARD_VOICE_INTERRUPTION = "dashboard-voice-interruption",
|
|
19
|
-
DASHBOARD_VOICE_AGENT_RESPONSE_CORRECTION = "dashboard-voice-agent-response-correction"
|
|
10
|
+
GET_SECRETS = "get-secrets",
|
|
11
|
+
GET_FLOWS = "get-flows",
|
|
12
|
+
PII_HTTP_REQUEST = "pii-http-request"
|
|
20
13
|
}
|
|
21
|
-
export type MindedConnectionSocketMessageTypeMap = {
|
|
22
|
-
[MindedConnectionSocketMessageType.OnAppTrigger]: OnAppTrigger;
|
|
23
|
-
[MindedConnectionSocketMessageType.OnAppAction]: BaseMindedConnectionSocketMessage;
|
|
24
|
-
[MindedConnectionSocketMessageType.GET_SECRETS]: BaseMindedConnectionSocketMessage;
|
|
25
|
-
[MindedConnectionSocketMessageType.GET_FLOWS]: BaseMindedConnectionSocketMessage;
|
|
26
|
-
[MindedConnectionSocketMessageType.INVOKE]: InvokeMessage;
|
|
27
|
-
[MindedConnectionSocketMessageType.CHECKPOINT_GET_TUPLE]: OnCheckpointGetTuple;
|
|
28
|
-
[MindedConnectionSocketMessageType.CHECKPOINT_PUT]: OnCheckpointPut;
|
|
29
|
-
[MindedConnectionSocketMessageType.CHECKPOINT_LIST]: OnCheckpointList;
|
|
30
|
-
[MindedConnectionSocketMessageType.CHECKPOINT_PUT_WRITES]: OnCheckpointPutWrites;
|
|
31
|
-
[MindedConnectionSocketMessageType.DASHBOARD_VOICE_USER_AUDIO]: OnVoiceAudioIn;
|
|
32
|
-
[MindedConnectionSocketMessageType.DASHBOARD_VOICE_AGENT_AUDIO]: OnVoiceAudioOut;
|
|
33
|
-
[MindedConnectionSocketMessageType.DASHBOARD_VOICE_SESSION_START]: BaseVoiceMessage;
|
|
34
|
-
[MindedConnectionSocketMessageType.DASHBOARD_VOICE_SESSION_END]: OnVoiceSessionEnd;
|
|
35
|
-
[MindedConnectionSocketMessageType.DASHBOARD_VOICE_INTERRUPTION]: OnVoiceInterruption;
|
|
36
|
-
};
|
|
37
14
|
export interface BaseMindedConnectionSocketMessage {
|
|
38
15
|
type: MindedConnectionSocketMessageType;
|
|
39
16
|
}
|
|
@@ -74,33 +51,20 @@ export interface OnCheckpointList extends BaseMindedConnectionSocketMessage {
|
|
|
74
51
|
export interface OnCheckpointListResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
75
52
|
checkpoints?: CheckpointTuple[];
|
|
76
53
|
}
|
|
77
|
-
export interface
|
|
78
|
-
sessionId: string;
|
|
79
|
-
timestamp: number;
|
|
80
|
-
}
|
|
81
|
-
export interface OnVoiceAudioIn extends BaseVoiceMessage {
|
|
82
|
-
audioData: string;
|
|
83
|
-
}
|
|
84
|
-
export interface OnVoiceAudioOut extends BaseVoiceMessage {
|
|
85
|
-
audioData: string;
|
|
86
|
-
}
|
|
87
|
-
export interface OnVoiceMessageIn extends BaseVoiceMessage {
|
|
88
|
-
text: string;
|
|
89
|
-
}
|
|
90
|
-
export interface OnVoiceMessageOut extends BaseMindedConnectionSocketMessage {
|
|
91
|
-
sessionId: string;
|
|
92
|
-
text: string;
|
|
93
|
-
timestamp: number;
|
|
94
|
-
}
|
|
95
|
-
export interface OnVoiceInterruption extends BaseMindedConnectionSocketMessage {
|
|
54
|
+
export interface OnPiiHttpRequest extends BaseMindedConnectionSocketMessage {
|
|
96
55
|
sessionId: string;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
56
|
+
requestId: string;
|
|
57
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
58
|
+
url: string;
|
|
59
|
+
headers?: Record<string, string>;
|
|
60
|
+
params?: Record<string, any>;
|
|
61
|
+
data?: any;
|
|
62
|
+
}
|
|
63
|
+
export interface OnPiiHttpResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
64
|
+
requestId: string;
|
|
65
|
+
data?: any;
|
|
66
|
+
status?: number;
|
|
67
|
+
statusText?: string;
|
|
68
|
+
headers?: Record<string, string>;
|
|
105
69
|
}
|
|
106
70
|
//# sourceMappingURL=mindedConnectionTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mindedConnectionTypes.d.ts","sourceRoot":"","sources":["../../src/platform/mindedConnectionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"mindedConnectionTypes.d.ts","sourceRoot":"","sources":["../../src/platform/mindedConnectionTypes.ts"],"names":[],"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GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,oBAAqB,SAAQ,iCAAiC;IAC7E,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iCAAiC;IACzE,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACjC;AAED,MAAM,WAAW,wBAAyB,SAAQ,iDAAiD;IACjG,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAiB,SAAQ,iCAAiC;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,iBAAkB,SAAQ,iDAAiD;IAC1F,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -5,20 +5,12 @@ var MindedConnectionSocketMessageType;
|
|
|
5
5
|
(function (MindedConnectionSocketMessageType) {
|
|
6
6
|
MindedConnectionSocketMessageType["OnAppTrigger"] = "on-app-trigger";
|
|
7
7
|
MindedConnectionSocketMessageType["OnAppAction"] = "on-app-action";
|
|
8
|
-
MindedConnectionSocketMessageType["GET_SECRETS"] = "get-secrets";
|
|
9
|
-
MindedConnectionSocketMessageType["GET_FLOWS"] = "get-flows";
|
|
10
|
-
MindedConnectionSocketMessageType["INVOKE"] = "invoke";
|
|
11
|
-
// Checkpoints
|
|
12
8
|
MindedConnectionSocketMessageType["CHECKPOINT_GET_TUPLE"] = "checkpoint-get-tuple";
|
|
13
9
|
MindedConnectionSocketMessageType["CHECKPOINT_PUT"] = "checkpoint-put";
|
|
14
10
|
MindedConnectionSocketMessageType["CHECKPOINT_LIST"] = "checkpoint-list";
|
|
15
11
|
MindedConnectionSocketMessageType["CHECKPOINT_PUT_WRITES"] = "checkpoint-put-writes";
|
|
16
|
-
|
|
17
|
-
MindedConnectionSocketMessageType["
|
|
18
|
-
MindedConnectionSocketMessageType["
|
|
19
|
-
MindedConnectionSocketMessageType["DASHBOARD_VOICE_SESSION_START"] = "dashboard-voice-session-start";
|
|
20
|
-
MindedConnectionSocketMessageType["DASHBOARD_VOICE_SESSION_END"] = "dashboard-voice-session-end";
|
|
21
|
-
MindedConnectionSocketMessageType["DASHBOARD_VOICE_INTERRUPTION"] = "dashboard-voice-interruption";
|
|
22
|
-
MindedConnectionSocketMessageType["DASHBOARD_VOICE_AGENT_RESPONSE_CORRECTION"] = "dashboard-voice-agent-response-correction";
|
|
12
|
+
MindedConnectionSocketMessageType["GET_SECRETS"] = "get-secrets";
|
|
13
|
+
MindedConnectionSocketMessageType["GET_FLOWS"] = "get-flows";
|
|
14
|
+
MindedConnectionSocketMessageType["PII_HTTP_REQUEST"] = "pii-http-request";
|
|
23
15
|
})(MindedConnectionSocketMessageType || (exports.MindedConnectionSocketMessageType = MindedConnectionSocketMessageType = {}));
|
|
24
16
|
//# sourceMappingURL=mindedConnectionTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mindedConnectionTypes.js","sourceRoot":"","sources":["../../src/platform/mindedConnectionTypes.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mindedConnectionTypes.js","sourceRoot":"","sources":["../../src/platform/mindedConnectionTypes.ts"],"names":[],"mappings":";;;AAUA,IAAY,iCAUX;AAVD,WAAY,iCAAiC;IAC3C,oEAA+B,CAAA;IAC/B,kEAA6B,CAAA;IAC7B,kFAA6C,CAAA;IAC7C,sEAAiC,CAAA;IACjC,wEAAmC,CAAA;IACnC,oFAA+C,CAAA;IAC/C,gEAA2B,CAAA;IAC3B,4DAAuB,CAAA;IACvB,0EAAqC,CAAA;AACvC,CAAC,EAVW,iCAAiC,iDAAjC,iCAAiC,QAU5C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MindedConnection } from '../mindedConnection';
|
|
2
|
+
import { HttpRequestConfig, HttpResponse, PIIGatewayInstance } from './types';
|
|
3
|
+
export declare class PIIGateway implements PIIGatewayInstance {
|
|
4
|
+
private mindedConnection;
|
|
5
|
+
constructor(mindedConnection: MindedConnection);
|
|
6
|
+
private makeRequest;
|
|
7
|
+
get<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
8
|
+
post<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
9
|
+
put<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
10
|
+
delete<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
11
|
+
patch<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
12
|
+
head<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
13
|
+
options<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
14
|
+
request<T = any>(sessionId: string, config: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","s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,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAInG,OAAO,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;IAItG,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAI/F"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PIIGateway = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const mindedConnectionTypes_1 = require("../mindedConnectionTypes");
|
|
6
|
+
class PIIGateway {
|
|
7
|
+
constructor(mindedConnection) {
|
|
8
|
+
this.mindedConnection = mindedConnection;
|
|
9
|
+
}
|
|
10
|
+
async makeRequest(sessionId, method, url, data, config) {
|
|
11
|
+
var _a;
|
|
12
|
+
if (!((_a = this.mindedConnection) === null || _a === void 0 ? void 0 : _a.isConnected)) {
|
|
13
|
+
throw new Error('Minded connection is not established. PII-secured HTTP requests require a connection to the Minded platform.');
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const requestId = (0, uuid_1.v4)();
|
|
17
|
+
const requestPayload = {
|
|
18
|
+
type: mindedConnectionTypes_1.MindedConnectionSocketMessageType.PII_HTTP_REQUEST,
|
|
19
|
+
requestId,
|
|
20
|
+
method,
|
|
21
|
+
url,
|
|
22
|
+
headers: config === null || config === void 0 ? void 0 : config.headers,
|
|
23
|
+
params: config === null || config === void 0 ? void 0 : config.params,
|
|
24
|
+
data,
|
|
25
|
+
sessionId,
|
|
26
|
+
};
|
|
27
|
+
const response = await this.mindedConnection.awaitEmit(mindedConnectionTypes_1.MindedConnectionSocketMessageType.PII_HTTP_REQUEST, requestPayload, 30000);
|
|
28
|
+
if (response.error) {
|
|
29
|
+
throw new Error(`HTTP request failed: ${response.error}`);
|
|
30
|
+
}
|
|
31
|
+
// Verify that the response requestId matches our request
|
|
32
|
+
if (response.requestId && response.requestId !== requestId) {
|
|
33
|
+
console.warn(`Response requestId (${response.requestId}) does not match request requestId (${requestId})`);
|
|
34
|
+
}
|
|
35
|
+
// Return generic HttpResponse format
|
|
36
|
+
return {
|
|
37
|
+
data: response.data,
|
|
38
|
+
status: response.status || 200,
|
|
39
|
+
statusText: response.statusText || 'OK',
|
|
40
|
+
headers: response.headers || {},
|
|
41
|
+
config: config || {},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
throw new Error(`Secure HTTP request failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async get(sessionId, url, config) {
|
|
49
|
+
return this.makeRequest(sessionId, 'GET', url, undefined, config);
|
|
50
|
+
}
|
|
51
|
+
async post(sessionId, url, data, config) {
|
|
52
|
+
return this.makeRequest(sessionId, 'POST', url, data, config);
|
|
53
|
+
}
|
|
54
|
+
async put(sessionId, url, data, config) {
|
|
55
|
+
return this.makeRequest(sessionId, 'PUT', url, data, config);
|
|
56
|
+
}
|
|
57
|
+
async delete(sessionId, url, config) {
|
|
58
|
+
return this.makeRequest(sessionId, 'DELETE', url, undefined, config);
|
|
59
|
+
}
|
|
60
|
+
async patch(sessionId, url, data, config) {
|
|
61
|
+
return this.makeRequest(sessionId, 'PATCH', url, data, config);
|
|
62
|
+
}
|
|
63
|
+
async head(sessionId, url, config) {
|
|
64
|
+
return this.makeRequest(sessionId, 'HEAD', url, undefined, config);
|
|
65
|
+
}
|
|
66
|
+
async options(sessionId, url, config) {
|
|
67
|
+
return this.makeRequest(sessionId, 'OPTIONS', url, undefined, config);
|
|
68
|
+
}
|
|
69
|
+
async request(sessionId, config) {
|
|
70
|
+
var _a;
|
|
71
|
+
const method = (((_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || 'GET');
|
|
72
|
+
return this.makeRequest(sessionId, method, config.url || '', config.data, config);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.PIIGateway = PIIGateway;
|
|
76
|
+
//# sourceMappingURL=gateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../../src/platform/piiGateway/gateway.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAEpC,oEAAkH;AAGlH,MAAa,UAAU;IAGrB,YAAY,gBAAkC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAEO,KAAK,CAAC,WAAW,CACvB,SAAiB,EACjB,MAAwE,EACxE,GAAW,EACX,IAAU,EACV,MAA0B;;QAE1B,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,WAAW,CAAA,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,8GAA8G,CAAC,CAAC;QAClI,CAAC;QAED,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAA,SAAM,GAAE,CAAC;YAC3B,MAAM,cAAc,GAAqB;gBACvC,IAAI,EAAE,yDAAiC,CAAC,gBAAgB;gBACxD,SAAS;gBACT,MAAM;gBACN,GAAG;gBACH,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAiC;gBAClD,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM;gBACtB,IAAI;gBACJ,SAAS;aACV,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACpD,yDAAiC,CAAC,gBAAgB,EAClD,cAAc,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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/piiGateway/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGnF,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PIIGateway = void 0;
|
|
4
|
+
// Export core gateway class and creation function
|
|
5
|
+
var gateway_1 = require("./gateway");
|
|
6
|
+
Object.defineProperty(exports, "PIIGateway", { enumerable: true, get: function () { return gateway_1.PIIGateway; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/piiGateway/index.ts"],"names":[],"mappings":";;;AAGA,kDAAkD;AAClD,qCAAuC;AAA9B,qGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MindedConnection } from '../mindedConnection';
|
|
2
|
+
import { PIIGatewayInstance } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Create a PII Gateway instance with a specific Minded connection and session ID.
|
|
5
|
+
* This is used internally by the Agent and for advanced use cases.
|
|
6
|
+
*
|
|
7
|
+
* @param mindedConnection - The Minded connection to use for the requests
|
|
8
|
+
* @param sessionId - Session ID for PII context (required for proper masking)
|
|
9
|
+
* @returns A PII Gateway instance
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { createPIIGateway } from '@minded-ai/mindedjs';
|
|
14
|
+
*
|
|
15
|
+
* const piiGateway = createPIIGateway(mindedConnection, 'session-123');
|
|
16
|
+
* const response = await piiGateway.get('/api/data');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function createPIIGateway(mindedConnection: MindedConnection, sessionId: string): PIIGatewayInstance;
|
|
20
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/platform/piiGateway/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAE1G"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPIIGateway = createPIIGateway;
|
|
4
|
+
const gateway_1 = require("./gateway");
|
|
5
|
+
/**
|
|
6
|
+
* Create a PII Gateway instance with a specific Minded connection and session ID.
|
|
7
|
+
* This is used internally by the Agent and for advanced use cases.
|
|
8
|
+
*
|
|
9
|
+
* @param mindedConnection - The Minded connection to use for the requests
|
|
10
|
+
* @param sessionId - Session ID for PII context (required for proper masking)
|
|
11
|
+
* @returns A PII Gateway instance
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { createPIIGateway } from '@minded-ai/mindedjs';
|
|
16
|
+
*
|
|
17
|
+
* const piiGateway = createPIIGateway(mindedConnection, 'session-123');
|
|
18
|
+
* const response = await piiGateway.get('/api/data');
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function createPIIGateway(mindedConnection, sessionId) {
|
|
22
|
+
return new gateway_1.PIIGateway(mindedConnection, sessionId);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../src/platform/piiGateway/proxy.ts"],"names":[],"mappings":";;AAoBA,4CAEC;AApBD,uCAAuC;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,gBAAgB,CAAC,gBAAkC,EAAE,SAAiB;IACpF,OAAO,IAAI,oBAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface HttpRequestConfig {
|
|
2
|
+
method?: string;
|
|
3
|
+
url?: string;
|
|
4
|
+
headers?: Record<string, string>;
|
|
5
|
+
params?: Record<string, any>;
|
|
6
|
+
data?: any;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface HttpResponse<T = any> {
|
|
11
|
+
data: T;
|
|
12
|
+
status: number;
|
|
13
|
+
statusText: string;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
config: HttpRequestConfig;
|
|
16
|
+
}
|
|
17
|
+
export interface PIIGatewayInstance {
|
|
18
|
+
get<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
19
|
+
post<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
20
|
+
put<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
21
|
+
delete<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
22
|
+
patch<T = any>(sessionId: string, url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
23
|
+
head<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
24
|
+
options<T = any>(sessionId: string, url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
25
|
+
request<T = any>(sessionId: string, config: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=types.d.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,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/G,MAAM,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,CAAC;IACtG,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACjH,IAAI,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,CAAC;IACpG,OAAO,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,CAAC;IACvG,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/platform/piiGateway/types.ts"],"names":[],"mappings":""}
|
|
@@ -6,19 +6,6 @@ export type MindedSDKConfig = {
|
|
|
6
6
|
llm: LLMConfig;
|
|
7
7
|
tools: string[];
|
|
8
8
|
};
|
|
9
|
-
/**
|
|
10
|
-
* Parameters for the Agent invoke method
|
|
11
|
-
*/
|
|
12
|
-
export interface AgentInvokeParams {
|
|
13
|
-
/** The payload/data associated with the trigger */
|
|
14
|
-
triggerBody: any;
|
|
15
|
-
/** The name/type of the trigger being invoked */
|
|
16
|
-
triggerName: string;
|
|
17
|
-
/** Optional session identifier for conversation continuity */
|
|
18
|
-
sessionId?: string;
|
|
19
|
-
/** Optional name of the application triggering the agent in case of an app trigger */
|
|
20
|
-
appName?: string;
|
|
21
|
-
}
|
|
22
9
|
export declare enum FlowHistoryType {
|
|
23
10
|
TRIGGER_INVOCATION = "triggerInvocation",
|
|
24
11
|
APP_ACTION_INVOCATION = "appActionInvocation"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.types.d.ts","sourceRoot":"","sources":["../../src/types/Agent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC,SAAS,MAAM,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEvM,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,SAAS,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"Agent.types.d.ts","sourceRoot":"","sources":["../../src/types/Agent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC,SAAS,MAAM,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEvM,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,SAAS,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAA;AAED,oBAAY,eAAe;IACzB,kBAAkB,sBAAsB;IACxC,qBAAqB,wBAAwB;CAC9C;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,IAAI,EAAE,eAAe,CAAC,kBAAkB,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,IAAI,EAAE,eAAe,CAAC,qBAAqB,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.types.js","sourceRoot":"","sources":["../../src/types/Agent.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Agent.types.js","sourceRoot":"","sources":["../../src/types/Agent.types.ts"],"names":[],"mappings":";;;AAWA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,2DAAwC,CAAA;IACxC,gEAA6C,CAAA;AAC/C,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAWA,CAAC;AAKD,CAAC"}
|
|
@@ -25,12 +25,10 @@ export interface BaseNode {
|
|
|
25
25
|
export declare enum TriggerType {
|
|
26
26
|
APP = "app",
|
|
27
27
|
WEBHOOK = "webhook",
|
|
28
|
-
MANUAL = "manual"
|
|
29
|
-
VOICE = "voice"
|
|
28
|
+
MANUAL = "manual"
|
|
30
29
|
}
|
|
31
30
|
export interface BaseTriggerNode extends BaseNode {
|
|
32
31
|
type: NodeType.TRIGGER;
|
|
33
|
-
triggerType: TriggerType;
|
|
34
32
|
}
|
|
35
33
|
export interface BaseAppNode {
|
|
36
34
|
appName: string;
|
|
@@ -49,17 +47,6 @@ export interface AppTriggerNode extends BaseTriggerNode, BaseAppNode {
|
|
|
49
47
|
export interface WebhookTriggerNode extends BaseTriggerNode {
|
|
50
48
|
triggerType: TriggerType.WEBHOOK;
|
|
51
49
|
}
|
|
52
|
-
export interface VoiceTriggerNode extends BaseTriggerNode {
|
|
53
|
-
triggerType: TriggerType.VOICE;
|
|
54
|
-
/**
|
|
55
|
-
* Text that will be spoken as the very first message in a voice interaction.
|
|
56
|
-
*/
|
|
57
|
-
firstMessage: string;
|
|
58
|
-
/**
|
|
59
|
-
* Optional ElevenLabs voice ID to be used for TTS.
|
|
60
|
-
*/
|
|
61
|
-
voiceId?: string;
|
|
62
|
-
}
|
|
63
50
|
export interface ManualTriggerNode extends BaseTriggerNode {
|
|
64
51
|
triggerType: TriggerType.MANUAL;
|
|
65
52
|
}
|
|
@@ -68,7 +55,7 @@ export interface PromptNode extends BaseNode {
|
|
|
68
55
|
prompt: string;
|
|
69
56
|
llmConfig?: LLMConfig;
|
|
70
57
|
}
|
|
71
|
-
export type TriggerNode = AppTriggerNode | WebhookTriggerNode | ManualTriggerNode
|
|
58
|
+
export type TriggerNode = AppTriggerNode | WebhookTriggerNode | ManualTriggerNode;
|
|
72
59
|
export interface JunctionNode extends BaseNode {
|
|
73
60
|
type: NodeType.JUNCTION;
|
|
74
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.types.d.ts","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],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AM,CAAC;IACb,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,oBAAoB,CAAC;QAC3B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;KACjC,CAAC;CACH,CAAC;AAEF,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;CAChC"}
|
|
@@ -20,7 +20,6 @@ var TriggerType;
|
|
|
20
20
|
TriggerType["APP"] = "app";
|
|
21
21
|
TriggerType["WEBHOOK"] = "webhook";
|
|
22
22
|
TriggerType["MANUAL"] = "manual";
|
|
23
|
-
TriggerType["VOICE"] = "voice";
|
|
24
23
|
})(TriggerType || (exports.TriggerType = TriggerType = {}));
|
|
25
24
|
var AppNodeMetadataType;
|
|
26
25
|
(function (AppNodeMetadataType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.types.js","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],"names":[],"mappings":";;;AAMA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,gCAAoB,CAAA;IACpB,sCAA0B,CAAA;AAC5B,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,gDAAoC,CAAA;IACpC,wCAA4B,CAAA;AAC9B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAUD,IAAY,
|
|
1
|
+
{"version":3,"file":"Flows.types.js","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],"names":[],"mappings":";;;AAMA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,gCAAoB,CAAA;IACpB,sCAA0B,CAAA;AAC5B,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,gDAAoC,CAAA;IACpC,wCAA4B,CAAA;AAC9B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAUD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAiFD,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,2CAAoB,CAAA;AACtB,CAAC,EAFW,mBAAmB,mCAAnB,mBAAmB,QAE9B;AAsBD,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,yCAAiB,CAAA;IACjB,mCAAW,CAAA;AACb,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B;AAQD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,4DAAuC,CAAA;IACvC,oDAA+B,CAAA;AACjC,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
|
|
@@ -26,6 +26,7 @@ export declare const stateAnnotation: import("@langchain/langgraph").AnnotationR
|
|
|
26
26
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
27
27
|
};
|
|
28
28
|
history: import("@langchain/langgraph").BinaryOperatorAggregate<FlowHistory[], FlowHistory[]>;
|
|
29
|
+
sessionId: import("@langchain/langgraph").LastValue<string>;
|
|
29
30
|
}>;
|
|
30
31
|
export type CompiledGraph = CompiledStateGraph<any, any, string>;
|
|
31
32
|
export type PreCompiledGraph = StateGraph<any, any, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LangGraph.types.d.ts","sourceRoot":"","sources":["../../src/types/LangGraph.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAc,kBAAkB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;kBAclB,MAAM;yBACC,GAAG;;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG
|
|
1
|
+
{"version":3,"file":"LangGraph.types.d.ts","sourceRoot":"","sources":["../../src/types/LangGraph.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAc,kBAAkB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;kBAclB,MAAM;yBACC,GAAG;;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG;;kBADV,MAAM;yBACC,GAAG;;;;;;EAOlB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LangGraph.types.js","sourceRoot":"","sources":["../../src/types/LangGraph.types.ts"],"names":[],"mappings":";;;AACA,oDAAkF;AAGrE,QAAA,eAAe,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC7C,QAAQ,EAAE,IAAA,sBAAU,EAAqB;QACvC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;IACF,MAAM,EAAE,IAAA,sBAAU,EAAM;QACtB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;KACpC,CAAC;IACF,kBAAkB,EAAE,IAAA,sBAAU,EAAkC;QAC9D,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;IACF,eAAe,EAAE,CAAA,sBAGR,CAAA;IACT,OAAO,EAAE,IAAA,sBAAU,EAAqB;QACtC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"LangGraph.types.js","sourceRoot":"","sources":["../../src/types/LangGraph.types.ts"],"names":[],"mappings":";;;AACA,oDAAkF;AAGrE,QAAA,eAAe,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC7C,QAAQ,EAAE,IAAA,sBAAU,EAAqB;QACvC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;IACF,MAAM,EAAE,IAAA,sBAAU,EAAM;QACtB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;KACpC,CAAC;IACF,kBAAkB,EAAE,IAAA,sBAAU,EAAkC;QAC9D,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;IACF,eAAe,EAAE,CAAA,sBAGR,CAAA;IACT,OAAO,EAAE,IAAA,sBAAU,EAAqB;QACtC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KAC/B,CAAC;IACF,SAAS,EAAE,IAAA,sBAAU,GAAU;CAChC,CAAC,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { Agent } from '../';
|
|
3
|
+
import { stateAnnotation } from './LangGraph.types';
|
|
3
4
|
export interface Tool<Input extends z.ZodSchema, Memory> {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
input: Input;
|
|
7
8
|
isGlobal?: boolean;
|
|
8
|
-
execute: (
|
|
9
|
-
input: z.infer<Input>;
|
|
10
|
-
memory: Memory;
|
|
11
|
-
triggerInvocations?: Array<FlowHistory>;
|
|
12
|
-
}) => Promise<{
|
|
9
|
+
execute: (input: ToolExecuteInput<Input>) => Promise<{
|
|
13
10
|
memory?: Partial<Memory>;
|
|
14
11
|
result?: any;
|
|
15
12
|
} | void>;
|
|
16
13
|
}
|
|
14
|
+
export interface ToolExecuteInput<Input extends z.ZodSchema> {
|
|
15
|
+
input: z.infer<Input>;
|
|
16
|
+
state: typeof stateAnnotation.State;
|
|
17
|
+
agent: Agent;
|
|
18
|
+
}
|
|
17
19
|
export interface AppActionRunnerInput {
|
|
18
20
|
appName: string;
|
|
19
21
|
actionName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tools.types.d.ts","sourceRoot":"","sources":["../../src/types/Tools.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Tools.types.d.ts","sourceRoot":"","sources":["../../src/types/Tools.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,SAAS,EAAE,MAAM;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CACzG;AAED,MAAM,WAAW,gBAAgB,CAAC,KAAK,SAAS,CAAC,CAAC,SAAS;IACzD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,KAAK,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC;IACpC,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minded-ai/mindedjs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"description": "MindedJS is a TypeScript library for building agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"test": "NODE_ENV=test mocha --parallel --jobs auto --retries 1 -r ts-node/register -r ./test/setup.ts \"test/**/*.test.ts\"",
|
|
18
18
|
"testFile": "NODE_ENV=test mocha -r ts-node/register -r ./test/setup.ts",
|
|
19
19
|
"order-refund": "cd examples/orderRefundAgent && nodemon --watch '**/*.ts' --exec 'ts-node' orderRefundAgent.ts",
|
|
20
|
-
"example-voice": "cd examples/voice && nodemon --watch '**/*.ts' --exec 'ts-node' voiceAgent.ts",
|
|
21
20
|
"lint": "eslint .",
|
|
22
21
|
"lintFix": "eslint --fix .",
|
|
23
22
|
"generateApiDocs": "typedoc src --out docs/api-reference ./src"
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
"@types/mocha": "^10.0.6",
|
|
31
30
|
"@types/node": "^20.11.19",
|
|
32
31
|
"@types/sinon": "^17.0.4",
|
|
33
|
-
"@types/ws": "^8.18.1",
|
|
34
32
|
"chai": "^4.3.10",
|
|
35
33
|
"dotenv": "^16.4.5",
|
|
36
34
|
"eslint": "^9.27.0",
|
|
@@ -53,7 +51,6 @@
|
|
|
53
51
|
"langchain": "^0.3.25",
|
|
54
52
|
"socket.io-client": "^4.8.1",
|
|
55
53
|
"uuid": "^11.1.0",
|
|
56
|
-
"ws": "^8.15.1",
|
|
57
54
|
"zod": "^3.24.4"
|
|
58
55
|
}
|
|
59
|
-
}
|
|
56
|
+
}
|