@minded-ai/mindedjs 1.0.53 → 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 +3 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +18 -4
- 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 +3 -2
- 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 -2
- 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/pii-gateway/types.js +3 -0
- package/dist/pii-gateway/types.js.map +1 -0
- package/dist/platform/mindedConnectionTypes.d.ts +18 -1
- package/dist/platform/mindedConnectionTypes.d.ts.map +1 -1
- package/dist/platform/mindedConnectionTypes.js +1 -0
- 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/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 -2
- package/src/agent.ts +27 -5
- package/src/edges/edgeFactory.ts +4 -1
- package/src/index.ts +14 -3
- package/src/internalTools/appActionRunnerTool.ts +53 -50
- package/src/nodes/addAppToolNode.ts +4 -1
- package/src/nodes/addPromptNode.ts +5 -3
- package/src/nodes/addToolRunNode.ts +4 -2
- package/src/nodes/nodeFactory.ts +7 -4
- package/src/platform/mindedConnectionTypes.ts +19 -0
- 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/LangGraph.types.ts +1 -0
- package/src/types/Tools.types.ts +9 -3
|
@@ -0,0 +1,77 @@
|
|
|
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("../platform/mindedConnectionTypes");
|
|
6
|
+
class PIIGateway {
|
|
7
|
+
constructor(mindedConnection, sessionId) {
|
|
8
|
+
this.mindedConnection = mindedConnection;
|
|
9
|
+
this.sessionId = sessionId;
|
|
10
|
+
}
|
|
11
|
+
async makeRequest(method, url, data, config) {
|
|
12
|
+
var _a;
|
|
13
|
+
if (!((_a = this.mindedConnection) === null || _a === void 0 ? void 0 : _a.isConnected)) {
|
|
14
|
+
throw new Error('Minded connection is not established. PII-secured HTTP requests require a connection to the Minded platform.');
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const requestId = (0, uuid_1.v4)();
|
|
18
|
+
const requestPayload = {
|
|
19
|
+
type: mindedConnectionTypes_1.MindedConnectionSocketMessageType.PII_HTTP_REQUEST,
|
|
20
|
+
requestId,
|
|
21
|
+
method,
|
|
22
|
+
url,
|
|
23
|
+
headers: config === null || config === void 0 ? void 0 : config.headers,
|
|
24
|
+
params: config === null || config === void 0 ? void 0 : config.params,
|
|
25
|
+
data,
|
|
26
|
+
sessionId: this.sessionId,
|
|
27
|
+
};
|
|
28
|
+
const response = await this.mindedConnection.awaitEmit(mindedConnectionTypes_1.MindedConnectionSocketMessageType.PII_HTTP_REQUEST, requestPayload, 30000);
|
|
29
|
+
if (response.error) {
|
|
30
|
+
throw new Error(`HTTP request failed: ${response.error}`);
|
|
31
|
+
}
|
|
32
|
+
// Verify that the response requestId matches our request
|
|
33
|
+
if (response.requestId && response.requestId !== requestId) {
|
|
34
|
+
console.warn(`Response requestId (${response.requestId}) does not match request requestId (${requestId})`);
|
|
35
|
+
}
|
|
36
|
+
// Return generic HttpResponse format
|
|
37
|
+
return {
|
|
38
|
+
data: response.data,
|
|
39
|
+
status: response.status || 200,
|
|
40
|
+
statusText: response.statusText || 'OK',
|
|
41
|
+
headers: response.headers || {},
|
|
42
|
+
config: config || {},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
throw new Error(`Secure HTTP request failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async get(url, config) {
|
|
50
|
+
return this.makeRequest('GET', url, undefined, config);
|
|
51
|
+
}
|
|
52
|
+
async post(url, data, config) {
|
|
53
|
+
return this.makeRequest('POST', url, data, config);
|
|
54
|
+
}
|
|
55
|
+
async put(url, data, config) {
|
|
56
|
+
return this.makeRequest('PUT', url, data, config);
|
|
57
|
+
}
|
|
58
|
+
async delete(url, config) {
|
|
59
|
+
return this.makeRequest('DELETE', url, undefined, config);
|
|
60
|
+
}
|
|
61
|
+
async patch(url, data, config) {
|
|
62
|
+
return this.makeRequest('PATCH', url, data, config);
|
|
63
|
+
}
|
|
64
|
+
async head(url, config) {
|
|
65
|
+
return this.makeRequest('HEAD', url, undefined, config);
|
|
66
|
+
}
|
|
67
|
+
async options(url, config) {
|
|
68
|
+
return this.makeRequest('OPTIONS', url, undefined, config);
|
|
69
|
+
}
|
|
70
|
+
async request(config) {
|
|
71
|
+
var _a;
|
|
72
|
+
const method = (((_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || 'GET');
|
|
73
|
+
return this.makeRequest(method, config.url || '', config.data, config);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.PIIGateway = PIIGateway;
|
|
77
|
+
//# sourceMappingURL=gateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../src/pii-gateway/gateway.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAEpC,6EAA2H;AAG3H,MAAa,UAAU;IAIrB,YAAY,gBAAkC,EAAE,SAAiB;QAC/D,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEO,KAAK,CAAC,WAAW,CACvB,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,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACpD,yDAAiC,CAAC,gBAAgB,EAClD,cAAc,EACd,KAAK,CACN,CAAC;YAEF,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;YAC5D,CAA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AQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,KAAK,CAAU,GAAW,EAAE,IAAU,EAAE,MAA0B;QACtE,OAAO,IAAI,CAAC,WAAW,CAAI,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,IAAI,CAAU,GAAW,EAAE,MAA0B;QACzD,OAAO,IAAI,CAAC,WAAW,CAAI,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,OAAO,CAAU,GAAW,EAAE,MAA0B;QAC5D,OAAO,IAAI,CAAC,WAAW,CAAI,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,OAAO,CAAU,MAAyB;;QAC9C,MAAM,MAAM,GAAG,CAAC,CAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,WAAW,EAAE,KAAI,KAAK,CAAQ,CAAC;QAC9D,OAAO,IAAI,CAAC,WAAW,CAAI,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF;AA5FD,gCA4FC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { HttpRequestConfig, HttpResponse, PIIGatewayInstance } from './types';
|
|
2
|
+
export { PIIGateway } from './gateway';
|
|
3
|
+
export { piiGateway, getPIIGateway, createPIIGateway, _setGlobalPIIGateway, _clearGlobalPIIGateway } from './proxy';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pii-gateway/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGnF,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._clearGlobalPIIGateway = exports._setGlobalPIIGateway = exports.createPIIGateway = exports.getPIIGateway = exports.piiGateway = exports.PIIGateway = void 0;
|
|
4
|
+
// Export core gateway class
|
|
5
|
+
var gateway_1 = require("./gateway");
|
|
6
|
+
Object.defineProperty(exports, "PIIGateway", { enumerable: true, get: function () { return gateway_1.PIIGateway; } });
|
|
7
|
+
// Export proxy and management functions
|
|
8
|
+
var proxy_1 = require("./proxy");
|
|
9
|
+
Object.defineProperty(exports, "piiGateway", { enumerable: true, get: function () { return proxy_1.piiGateway; } });
|
|
10
|
+
Object.defineProperty(exports, "getPIIGateway", { enumerable: true, get: function () { return proxy_1.getPIIGateway; } });
|
|
11
|
+
Object.defineProperty(exports, "createPIIGateway", { enumerable: true, get: function () { return proxy_1.createPIIGateway; } });
|
|
12
|
+
Object.defineProperty(exports, "_setGlobalPIIGateway", { enumerable: true, get: function () { return proxy_1._setGlobalPIIGateway; } });
|
|
13
|
+
Object.defineProperty(exports, "_clearGlobalPIIGateway", { enumerable: true, get: function () { return proxy_1._clearGlobalPIIGateway; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pii-gateway/index.ts"],"names":[],"mappings":";;;AAGA,4BAA4B;AAC5B,qCAAuC;AAA9B,qGAAA,UAAU,OAAA;AAEnB,wCAAwC;AACxC,iCAAoH;AAA3G,mGAAA,UAAU,OAAA;AAAE,sGAAA,aAAa,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAAE,6GAAA,oBAAoB,OAAA;AAAE,+GAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MindedConnection } from '../platform/mindedConnection';
|
|
2
|
+
import { PIIGatewayInstance } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Global PII Gateway that is automatically initialized when a trigger with sessionId is received.
|
|
5
|
+
* This provides seamless access to PII masking capabilities within workflows and custom tools.
|
|
6
|
+
*
|
|
7
|
+
* The gateway acts as a proxy that automatically uses the current session's PII context.
|
|
8
|
+
* All standard HTTP methods (get, post, put, delete, patch, head, options, request) are available.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { piiGateway } from '@minded-ai/mindedjs';
|
|
13
|
+
*
|
|
14
|
+
* // Within a custom tool or workflow (after trigger is received)
|
|
15
|
+
* async function fetchUserData() {
|
|
16
|
+
* const response = await piiGateway.get('/api/user/profile');
|
|
17
|
+
* return response.data;
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* // POST request
|
|
21
|
+
* const createResponse = await piiGateway.post('/api/users', {
|
|
22
|
+
* name: 'John Doe',
|
|
23
|
+
* email: 'john@example.com'
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const piiGateway: PIIGatewayInstance;
|
|
28
|
+
/**
|
|
29
|
+
* Get the global PII Gateway instance that is automatically initialized when a trigger with sessionId is received.
|
|
30
|
+
* This provides seamless access to PII masking capabilities within workflows and custom tools.
|
|
31
|
+
*
|
|
32
|
+
* @returns The PII Gateway instance for the current session
|
|
33
|
+
* @throws {Error} When no active session or PII gateway is not initialized
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { getPIIGateway } from '@minded-ai/mindedjs';
|
|
38
|
+
*
|
|
39
|
+
* // Within a custom tool or workflow (after trigger is received)
|
|
40
|
+
* async function fetchUserData() {
|
|
41
|
+
* const piiGateway = getPIIGateway();
|
|
42
|
+
* const response = await piiGateway.get('/api/user/profile');
|
|
43
|
+
* return response.data;
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function getPIIGateway(): PIIGatewayInstance;
|
|
48
|
+
/**
|
|
49
|
+
* Create a PII Gateway instance with a specific Minded connection and session ID.
|
|
50
|
+
* This is used internally by the Agent and for advanced use cases.
|
|
51
|
+
*
|
|
52
|
+
* @param mindedConnection - The Minded connection to use for the requests
|
|
53
|
+
* @param sessionId - Session ID for PII context (required for proper masking)
|
|
54
|
+
* @returns A PII Gateway instance
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { createPIIGateway } from '@minded-ai/mindedjs';
|
|
59
|
+
*
|
|
60
|
+
* const piiGateway = createPIIGateway(mindedConnection, 'session-123');
|
|
61
|
+
* const response = await piiGateway.get('/api/data');
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function createPIIGateway(mindedConnection: MindedConnection, sessionId: string): PIIGatewayInstance;
|
|
65
|
+
/**
|
|
66
|
+
* Internal function used by the Agent to set the global PII gateway when a trigger is received.
|
|
67
|
+
* This ensures the PII masking is automatically available to SDK users.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
* @param mindedConnection - The Minded connection to use
|
|
71
|
+
* @param sessionId - The session ID from the trigger
|
|
72
|
+
*/
|
|
73
|
+
export declare function _setGlobalPIIGateway(mindedConnection: MindedConnection, sessionId: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Internal function to clear the global PII gateway.
|
|
76
|
+
*
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare function _clearGlobalPIIGateway(): void;
|
|
80
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/pii-gateway/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,UAAU,EAAE,kBAOvB,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,IAAI,kBAAkB,CAKlD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAE1G;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAEhG;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.piiGateway = void 0;
|
|
4
|
+
exports.getPIIGateway = getPIIGateway;
|
|
5
|
+
exports.createPIIGateway = createPIIGateway;
|
|
6
|
+
exports._setGlobalPIIGateway = _setGlobalPIIGateway;
|
|
7
|
+
exports._clearGlobalPIIGateway = _clearGlobalPIIGateway;
|
|
8
|
+
const gateway_1 = require("./gateway");
|
|
9
|
+
// Global PII gateway instance that gets automatically set when triggers are received
|
|
10
|
+
let globalPIIGateway = null;
|
|
11
|
+
/**
|
|
12
|
+
* Global PII Gateway that is automatically initialized when a trigger with sessionId is received.
|
|
13
|
+
* This provides seamless access to PII masking capabilities within workflows and custom tools.
|
|
14
|
+
*
|
|
15
|
+
* The gateway acts as a proxy that automatically uses the current session's PII context.
|
|
16
|
+
* All standard HTTP methods (get, post, put, delete, patch, head, options, request) are available.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { piiGateway } from '@minded-ai/mindedjs';
|
|
21
|
+
*
|
|
22
|
+
* // Within a custom tool or workflow (after trigger is received)
|
|
23
|
+
* async function fetchUserData() {
|
|
24
|
+
* const response = await piiGateway.get('/api/user/profile');
|
|
25
|
+
* return response.data;
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // POST request
|
|
29
|
+
* const createResponse = await piiGateway.post('/api/users', {
|
|
30
|
+
* name: 'John Doe',
|
|
31
|
+
* email: 'john@example.com'
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
exports.piiGateway = new Proxy({}, {
|
|
36
|
+
get(target, prop) {
|
|
37
|
+
if (!globalPIIGateway) {
|
|
38
|
+
throw new Error('PII Gateway is not available. Ensure a trigger with sessionId has been received first.');
|
|
39
|
+
}
|
|
40
|
+
return globalPIIGateway[prop];
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Get the global PII Gateway instance that is automatically initialized when a trigger with sessionId is received.
|
|
45
|
+
* This provides seamless access to PII masking capabilities within workflows and custom tools.
|
|
46
|
+
*
|
|
47
|
+
* @returns The PII Gateway instance for the current session
|
|
48
|
+
* @throws {Error} When no active session or PII gateway is not initialized
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* import { getPIIGateway } from '@minded-ai/mindedjs';
|
|
53
|
+
*
|
|
54
|
+
* // Within a custom tool or workflow (after trigger is received)
|
|
55
|
+
* async function fetchUserData() {
|
|
56
|
+
* const piiGateway = getPIIGateway();
|
|
57
|
+
* const response = await piiGateway.get('/api/user/profile');
|
|
58
|
+
* return response.data;
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
function getPIIGateway() {
|
|
63
|
+
if (!globalPIIGateway) {
|
|
64
|
+
throw new Error('PII Gateway is not available. Ensure a trigger with sessionId has been received first.');
|
|
65
|
+
}
|
|
66
|
+
return globalPIIGateway;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a PII Gateway instance with a specific Minded connection and session ID.
|
|
70
|
+
* This is used internally by the Agent and for advanced use cases.
|
|
71
|
+
*
|
|
72
|
+
* @param mindedConnection - The Minded connection to use for the requests
|
|
73
|
+
* @param sessionId - Session ID for PII context (required for proper masking)
|
|
74
|
+
* @returns A PII Gateway instance
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* import { createPIIGateway } from '@minded-ai/mindedjs';
|
|
79
|
+
*
|
|
80
|
+
* const piiGateway = createPIIGateway(mindedConnection, 'session-123');
|
|
81
|
+
* const response = await piiGateway.get('/api/data');
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
function createPIIGateway(mindedConnection, sessionId) {
|
|
85
|
+
return new gateway_1.PIIGateway(mindedConnection, sessionId);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Internal function used by the Agent to set the global PII gateway when a trigger is received.
|
|
89
|
+
* This ensures the PII masking is automatically available to SDK users.
|
|
90
|
+
*
|
|
91
|
+
* @internal
|
|
92
|
+
* @param mindedConnection - The Minded connection to use
|
|
93
|
+
* @param sessionId - The session ID from the trigger
|
|
94
|
+
*/
|
|
95
|
+
function _setGlobalPIIGateway(mindedConnection, sessionId) {
|
|
96
|
+
globalPIIGateway = new gateway_1.PIIGateway(mindedConnection, sessionId);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Internal function to clear the global PII gateway.
|
|
100
|
+
*
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
function _clearGlobalPIIGateway() {
|
|
104
|
+
globalPIIGateway = null;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/pii-gateway/proxy.ts"],"names":[],"mappings":";;;AA2DA,sCAKC;AAkBD,4CAEC;AAUD,oDAEC;AAOD,wDAEC;AAvGD,uCAAuC;AAEvC,qFAAqF;AACrF,IAAI,gBAAgB,GAAsB,IAAI,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,UAAU,GAAuB,IAAI,KAAK,CAAC,EAAwB,EAAE;IAChF,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAC5G,CAAC;QACD,OAAQ,gBAAwB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,aAAa;IAC3B,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;IAC5G,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,gBAAgB,CAAC,gBAAkC,EAAE,SAAiB;IACpF,OAAO,IAAI,oBAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAAC,gBAAkC,EAAE,SAAiB;IACxF,gBAAgB,GAAG,IAAI,oBAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB;IACpC,gBAAgB,GAAG,IAAI,CAAC;AAC1B,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>(url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
19
|
+
post<T = any>(url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
20
|
+
put<T = any>(url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
21
|
+
delete<T = any>(url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
22
|
+
patch<T = any>(url: string, data?: any, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
23
|
+
head<T = any>(url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
24
|
+
options<T = any>(url: string, config?: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
25
|
+
request<T = any>(config: HttpRequestConfig): Promise<HttpResponse<T>>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pii-gateway/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,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;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,YAAY,CA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,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CACvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/pii-gateway/types.ts"],"names":[],"mappings":""}
|
|
@@ -8,7 +8,8 @@ export declare enum MindedConnectionSocketMessageType {
|
|
|
8
8
|
CHECKPOINT_LIST = "checkpoint-list",
|
|
9
9
|
CHECKPOINT_PUT_WRITES = "checkpoint-put-writes",
|
|
10
10
|
GET_SECRETS = "get-secrets",
|
|
11
|
-
GET_FLOWS = "get-flows"
|
|
11
|
+
GET_FLOWS = "get-flows",
|
|
12
|
+
PII_HTTP_REQUEST = "pii-http-request"
|
|
12
13
|
}
|
|
13
14
|
export interface BaseMindedConnectionSocketMessage {
|
|
14
15
|
type: MindedConnectionSocketMessageType;
|
|
@@ -50,4 +51,20 @@ export interface OnCheckpointList extends BaseMindedConnectionSocketMessage {
|
|
|
50
51
|
export interface OnCheckpointListResponse extends BaseSdkConnectionSocketMessageResponseCallbackAck {
|
|
51
52
|
checkpoints?: CheckpointTuple[];
|
|
52
53
|
}
|
|
54
|
+
export interface OnPiiHttpRequest extends BaseMindedConnectionSocketMessage {
|
|
55
|
+
sessionId: string;
|
|
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>;
|
|
69
|
+
}
|
|
53
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;AAEhE,oBAAY,iCAAiC;IAC3C,YAAY,mBAAmB;IAC/B,WAAW,kBAAkB;IAC7B,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,WAAW,gBAAgB;IAC3B,SAAS,cAAc;
|
|
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;AAEhE,oBAAY,iCAAiC;IAC3C,YAAY,mBAAmB;IAC/B,WAAW,kBAAkB;IAC7B,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;CACtC;AAED,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,iCAAiC,CAAC;CACzC;AAED,MA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AAO,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"}
|
|
@@ -11,5 +11,6 @@ var MindedConnectionSocketMessageType;
|
|
|
11
11
|
MindedConnectionSocketMessageType["CHECKPOINT_PUT_WRITES"] = "checkpoint-put-writes";
|
|
12
12
|
MindedConnectionSocketMessageType["GET_SECRETS"] = "get-secrets";
|
|
13
13
|
MindedConnectionSocketMessageType["GET_FLOWS"] = "get-flows";
|
|
14
|
+
MindedConnectionSocketMessageType["PII_HTTP_REQUEST"] = "pii-http-request";
|
|
14
15
|
})(MindedConnectionSocketMessageType || (exports.MindedConnectionSocketMessageType = MindedConnectionSocketMessageType = {}));
|
|
15
16
|
//# sourceMappingURL=mindedConnectionTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mindedConnectionTypes.js","sourceRoot":"","sources":["../../src/platform/mindedConnectionTypes.ts"],"names":[],"mappings":";;;AAUA,IAAY,
|
|
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":"","sources":["../../../src/platform/piiGateway/gateway.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,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,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,EACd,KAAK,CACN,CAAC;YAEF,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,CAAC,KAAK,EAAE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AAM,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.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/platform/piiGateway/types.ts"],"names":[],"mappings":"AACA,MAAM,WAA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