@loopstack/core 0.25.2 → 0.26.0
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/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/loop-core.module.d.ts.map +1 -1
- package/dist/loop-core.module.js +11 -29
- package/dist/loop-core.module.js.map +1 -1
- package/dist/persistence/persistence.module.d.ts.map +1 -1
- package/dist/persistence/persistence.module.js +3 -3
- package/dist/persistence/persistence.module.js.map +1 -1
- package/dist/persistence/services/index.d.ts +0 -1
- package/dist/persistence/services/index.d.ts.map +1 -1
- package/dist/persistence/services/index.js +0 -1
- package/dist/persistence/services/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/documents/error-document.d.ts +0 -8
- package/dist/documents/error-document.d.ts.map +0 -1
- package/dist/documents/error-document.js +0 -27
- package/dist/documents/error-document.js.map +0 -1
- package/dist/documents/error-document.yaml +0 -5
- package/dist/documents/index.d.ts +0 -7
- package/dist/documents/index.d.ts.map +0 -1
- package/dist/documents/index.js +0 -23
- package/dist/documents/index.js.map +0 -1
- package/dist/documents/link-document.d.ts +0 -21
- package/dist/documents/link-document.d.ts.map +0 -1
- package/dist/documents/link-document.js +0 -35
- package/dist/documents/link-document.js.map +0 -1
- package/dist/documents/link-document.yaml +0 -3
- package/dist/documents/markdown-document.d.ts +0 -8
- package/dist/documents/markdown-document.d.ts.map +0 -1
- package/dist/documents/markdown-document.js +0 -27
- package/dist/documents/markdown-document.js.map +0 -1
- package/dist/documents/markdown-document.yaml +0 -3
- package/dist/documents/message-document.d.ts +0 -10
- package/dist/documents/message-document.d.ts.map +0 -1
- package/dist/documents/message-document.js +0 -29
- package/dist/documents/message-document.js.map +0 -1
- package/dist/documents/message-document.yaml +0 -5
- package/dist/documents/plain-document.d.ts +0 -8
- package/dist/documents/plain-document.d.ts.map +0 -1
- package/dist/documents/plain-document.js +0 -27
- package/dist/documents/plain-document.js.map +0 -1
- package/dist/documents/plain-document.yaml +0 -3
- package/dist/documents/secret-request-document.d.ts +0 -14
- package/dist/documents/secret-request-document.d.ts.map +0 -1
- package/dist/documents/secret-request-document.js +0 -32
- package/dist/documents/secret-request-document.js.map +0 -1
- package/dist/documents/secret-request-document.yaml +0 -7
- package/dist/persistence/services/secret.service.d.ts +0 -20
- package/dist/persistence/services/secret.service.d.ts.map +0 -1
- package/dist/persistence/services/secret.service.js +0 -76
- package/dist/persistence/services/secret.service.js.map +0 -1
- package/dist/tools/get-secret-keys.tool.d.ts +0 -7
- package/dist/tools/get-secret-keys.tool.d.ts.map +0 -1
- package/dist/tools/get-secret-keys.tool.js +0 -47
- package/dist/tools/get-secret-keys.tool.js.map +0 -1
- package/dist/tools/index.d.ts +0 -5
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -21
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/request-secrets-task.tool.d.ts +0 -16
- package/dist/tools/request-secrets-task.tool.d.ts.map +0 -1
- package/dist/tools/request-secrets-task.tool.js +0 -75
- package/dist/tools/request-secrets-task.tool.js.map +0 -1
- package/dist/tools/request-secrets.tool.d.ts +0 -13
- package/dist/tools/request-secrets.tool.d.ts.map +0 -1
- package/dist/tools/request-secrets.tool.js +0 -38
- package/dist/tools/request-secrets.tool.js.map +0 -1
- package/dist/tools/secrets-request.ui.yaml +0 -5
- package/dist/tools/secrets-request.workflow.d.ts +0 -16
- package/dist/tools/secrets-request.workflow.d.ts.map +0 -1
- package/dist/tools/secrets-request.workflow.js +0 -51
- package/dist/tools/secrets-request.workflow.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ export * from './common';
|
|
|
3
3
|
export * from './persistence';
|
|
4
4
|
export * from './scheduler';
|
|
5
5
|
export * from './workflow-processor';
|
|
6
|
-
export * from './documents';
|
|
7
6
|
export * from './loop-core.module';
|
|
8
7
|
export * from './loop-core.module-definition';
|
|
9
|
-
export * from './tools';
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AAErC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AAErC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,8 +19,6 @@ __exportStar(require("./common"), exports);
|
|
|
19
19
|
__exportStar(require("./persistence"), exports);
|
|
20
20
|
__exportStar(require("./scheduler"), exports);
|
|
21
21
|
__exportStar(require("./workflow-processor"), exports);
|
|
22
|
-
__exportStar(require("./documents"), exports);
|
|
23
22
|
__exportStar(require("./loop-core.module"), exports);
|
|
24
23
|
__exportStar(require("./loop-core.module-definition"), exports);
|
|
25
|
-
__exportStar(require("./tools"), exports);
|
|
26
24
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA0B;AAE1B,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AAErC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAA0B;AAE1B,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,uDAAqC;AAErC,qDAAmC;AACnC,gEAA8C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-core.module.d.ts","sourceRoot":"","sources":["../src/loop-core.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loop-core.module.d.ts","sourceRoot":"","sources":["../src/loop-core.module.ts"],"names":[],"mappings":"AAkBA,qBA8Ba,cAAc;CAAG"}
|
package/dist/loop-core.module.js
CHANGED
|
@@ -12,9 +12,7 @@ const event_emitter_1 = require("@nestjs/event-emitter");
|
|
|
12
12
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
13
|
const common_2 = require("@loopstack/common");
|
|
14
14
|
const common_3 = require("./common");
|
|
15
|
-
const documents_1 = require("./documents");
|
|
16
15
|
const scheduler_1 = require("./scheduler");
|
|
17
|
-
const tools_1 = require("./tools");
|
|
18
16
|
const workflow_processor_1 = require("./workflow-processor");
|
|
19
17
|
let LoopCoreModule = class LoopCoreModule {
|
|
20
18
|
};
|
|
@@ -22,13 +20,7 @@ exports.LoopCoreModule = LoopCoreModule;
|
|
|
22
20
|
exports.LoopCoreModule = LoopCoreModule = __decorate([
|
|
23
21
|
(0, common_1.Module)({
|
|
24
22
|
imports: [
|
|
25
|
-
typeorm_1.TypeOrmModule.forFeature([
|
|
26
|
-
common_2.WorkflowEntity,
|
|
27
|
-
common_2.DocumentEntity,
|
|
28
|
-
common_2.WorkspaceEntity,
|
|
29
|
-
common_2.WorkspaceEnvironmentEntity,
|
|
30
|
-
common_2.SecretEntity,
|
|
31
|
-
]),
|
|
23
|
+
typeorm_1.TypeOrmModule.forFeature([common_2.WorkflowEntity, common_2.DocumentEntity, common_2.WorkspaceEntity, common_2.WorkspaceEnvironmentEntity]),
|
|
32
24
|
event_emitter_1.EventEmitterModule.forRoot({
|
|
33
25
|
global: true,
|
|
34
26
|
}),
|
|
@@ -37,31 +29,21 @@ exports.LoopCoreModule = LoopCoreModule = __decorate([
|
|
|
37
29
|
scheduler_1.SchedulerModule,
|
|
38
30
|
],
|
|
39
31
|
providers: [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
documents_1.LinkDocument,
|
|
46
|
-
documents_1.MarkdownDocument,
|
|
47
|
-
documents_1.MessageDocument,
|
|
48
|
-
documents_1.PlainDocument,
|
|
49
|
-
documents_1.SecretRequestDocument,
|
|
32
|
+
common_2.ErrorDocument,
|
|
33
|
+
common_2.LinkDocument,
|
|
34
|
+
common_2.MarkdownDocument,
|
|
35
|
+
common_2.MessageDocument,
|
|
36
|
+
common_2.PlainDocument,
|
|
50
37
|
],
|
|
51
38
|
exports: [
|
|
52
39
|
common_3.CommonModule,
|
|
53
40
|
workflow_processor_1.WorkflowProcessorModule,
|
|
54
41
|
scheduler_1.SchedulerModule,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
documents_1.LinkDocument,
|
|
61
|
-
documents_1.MarkdownDocument,
|
|
62
|
-
documents_1.MessageDocument,
|
|
63
|
-
documents_1.PlainDocument,
|
|
64
|
-
documents_1.SecretRequestDocument,
|
|
42
|
+
common_2.ErrorDocument,
|
|
43
|
+
common_2.LinkDocument,
|
|
44
|
+
common_2.MarkdownDocument,
|
|
45
|
+
common_2.MessageDocument,
|
|
46
|
+
common_2.PlainDocument,
|
|
65
47
|
],
|
|
66
48
|
})
|
|
67
49
|
], LoopCoreModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-core.module.js","sourceRoot":"","sources":["../src/loop-core.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAA2D;AAC3D,6CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"loop-core.module.js","sourceRoot":"","sources":["../src/loop-core.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAA2D;AAC3D,6CAAgD;AAChD,8CAU2B;AAC3B,qCAAwC;AACxC,2CAA8C;AAC9C,6DAA+D;AAgCxD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IA9B1B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,uBAAc,EAAE,uBAAc,EAAE,wBAAe,EAAE,mCAA0B,CAAC,CAAC;YACvG,kCAAkB,CAAC,OAAO,CAAC;gBACzB,MAAM,EAAE,IAAI;aACb,CAAC;YACF,qBAAY;YACZ,4CAAuB;YACvB,2BAAe;SAChB;QACD,SAAS,EAAE;YAET,sBAAa;YACb,qBAAY;YACZ,yBAAgB;YAChB,wBAAe;YACf,sBAAa;SACd;QACD,OAAO,EAAE;YACP,qBAAY;YACZ,4CAAuB;YACvB,2BAAe;YAEf,sBAAa;YACb,qBAAY;YACZ,yBAAgB;YAChB,wBAAe;YACf,sBAAa;SACd;KACF,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.module.d.ts","sourceRoot":"","sources":["../../src/persistence/persistence.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"persistence.module.d.ts","sourceRoot":"","sources":["../../src/persistence/persistence.module.ts"],"names":[],"mappings":"AAMA,qBAQa,iBAAiB;CAAG"}
|
|
@@ -18,11 +18,11 @@ exports.PersistenceModule = PersistenceModule;
|
|
|
18
18
|
exports.PersistenceModule = PersistenceModule = __decorate([
|
|
19
19
|
(0, common_1.Module)({
|
|
20
20
|
imports: [
|
|
21
|
-
typeorm_1.TypeOrmModule.forFeature([common_2.WorkflowEntity, common_2.WorkspaceEntity, common_2.DocumentEntity, common_2.
|
|
21
|
+
typeorm_1.TypeOrmModule.forFeature([common_2.WorkflowEntity, common_2.WorkspaceEntity, common_2.DocumentEntity, common_2.WorkflowCheckpointEntity]),
|
|
22
22
|
common_3.CommonModule,
|
|
23
23
|
],
|
|
24
|
-
providers: [services_1.WorkflowService, services_1.WorkspaceService, services_1.
|
|
25
|
-
exports: [services_1.WorkflowService, services_1.WorkspaceService, services_1.
|
|
24
|
+
providers: [services_1.WorkflowService, services_1.WorkspaceService, services_1.WorkflowCheckpointService],
|
|
25
|
+
exports: [services_1.WorkflowService, services_1.WorkspaceService, services_1.WorkflowCheckpointService],
|
|
26
26
|
})
|
|
27
27
|
], PersistenceModule);
|
|
28
28
|
//# sourceMappingURL=persistence.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.module.js","sourceRoot":"","sources":["../../src/persistence/persistence.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"persistence.module.js","sourceRoot":"","sources":["../../src/persistence/persistence.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,8CAA8G;AAC9G,sCAAyC;AACzC,yCAA0F;AAUnF,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAR7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,uBAAc,EAAE,wBAAe,EAAE,uBAAc,EAAE,iCAAwB,CAAC,CAAC;YACrG,qBAAY;SACb;QACD,SAAS,EAAE,CAAC,0BAAe,EAAE,2BAAgB,EAAE,oCAAyB,CAAC;QACzE,OAAO,EAAE,CAAC,0BAAe,EAAE,2BAAgB,EAAE,oCAAyB,CAAC;KACxE,CAAC;GACW,iBAAiB,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/persistence/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/persistence/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC"}
|
|
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./workflow.service"), exports);
|
|
18
18
|
__exportStar(require("./workspace.service"), exports);
|
|
19
|
-
__exportStar(require("./secret.service"), exports);
|
|
20
19
|
__exportStar(require("./workflow-checkpoint.service"), exports);
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/persistence/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,sDAAoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/persistence/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,sDAAoC;AACpC,gEAA8C"}
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@loopstack/core",
|
|
3
3
|
"displayName": "Loopstack Core Module",
|
|
4
4
|
"description": "The core module of the loopstack automation framework",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.26.0",
|
|
6
6
|
"repository": "loopstack-ai/core",
|
|
7
|
-
"license": "
|
|
7
|
+
"license": "MIT",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Jakob Klippel",
|
|
10
10
|
"url": "https://www.linkedin.com/in/jakob-klippel//"
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"watch": "nest build --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@loopstack/common": "^0.
|
|
27
|
+
"@loopstack/common": "^0.26.0",
|
|
28
28
|
"@nestjs/bullmq": "^11.0.4",
|
|
29
|
-
"@nestjs/config": "^4.0.
|
|
29
|
+
"@nestjs/config": "^4.0.4",
|
|
30
30
|
"@nestjs/event-emitter": "^3.0.1",
|
|
31
31
|
"@nestjs/schedule": "^6.1.1",
|
|
32
|
-
"bullmq": "^5.
|
|
32
|
+
"bullmq": "^5.73.5",
|
|
33
33
|
"class-transformer": "^0.5.1",
|
|
34
|
-
"class-validator": "^0.
|
|
35
|
-
"handlebars": "^4.7.
|
|
36
|
-
"lodash": "^4.
|
|
37
|
-
"yaml": "^2.8.
|
|
34
|
+
"class-validator": "^0.15.1",
|
|
35
|
+
"handlebars": "^4.7.9",
|
|
36
|
+
"lodash": "^4.18.1",
|
|
37
|
+
"yaml": "^2.8.3",
|
|
38
38
|
"zod": "^4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-document.d.ts","sourceRoot":"","sources":["../../src/documents/error-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;kBAIrB,CAAC;AAEZ,qBAIa,aAAa;IACxB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ErrorDocument = exports.ErrorDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.ErrorDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
error: zod_1.z.string(),
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
17
|
-
let ErrorDocument = class ErrorDocument {
|
|
18
|
-
error;
|
|
19
|
-
};
|
|
20
|
-
exports.ErrorDocument = ErrorDocument;
|
|
21
|
-
exports.ErrorDocument = ErrorDocument = __decorate([
|
|
22
|
-
(0, common_1.Document)({
|
|
23
|
-
schema: exports.ErrorDocumentSchema,
|
|
24
|
-
uiConfig: __dirname + '/error-document.yaml',
|
|
25
|
-
})
|
|
26
|
-
], ErrorDocument);
|
|
27
|
-
//# sourceMappingURL=error-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-document.js","sourceRoot":"","sources":["../../src/documents/error-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,mBAAmB,GAAG,OAAC;KACjC,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,KAAK,CAAS;CACf,CAAA;AAFY,sCAAa;wBAAb,aAAa;IAJzB,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,2BAAmB;QAC3B,QAAQ,EAAE,SAAS,GAAG,sBAAsB;KAC7C,CAAC;GACW,aAAa,CAEzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC"}
|
package/dist/documents/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./error-document"), exports);
|
|
18
|
-
__exportStar(require("./link-document"), exports);
|
|
19
|
-
__exportStar(require("./markdown-document"), exports);
|
|
20
|
-
__exportStar(require("./message-document"), exports);
|
|
21
|
-
__exportStar(require("./plain-document"), exports);
|
|
22
|
-
__exportStar(require("./secret-request-document"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,qDAAmC;AACnC,mDAAiC;AACjC,4DAA0C"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const LinkDocumentSchema: z.ZodObject<{
|
|
3
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
4
|
-
success: "success";
|
|
5
|
-
pending: "pending";
|
|
6
|
-
failure: "failure";
|
|
7
|
-
}>>;
|
|
8
|
-
label: z.ZodOptional<z.ZodString>;
|
|
9
|
-
workflowId: z.ZodOptional<z.ZodString>;
|
|
10
|
-
embed: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
export type LinkDocumentContent = z.infer<typeof LinkDocumentSchema>;
|
|
14
|
-
export declare class LinkDocument {
|
|
15
|
-
status?: 'pending' | 'success' | 'failure';
|
|
16
|
-
label?: string;
|
|
17
|
-
workflowId?: string;
|
|
18
|
-
embed?: boolean;
|
|
19
|
-
expanded?: boolean;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=link-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-document.d.ts","sourceRoot":"","sources":["../../src/documents/link-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;kBAQpB,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAErE,qBAIa,YAAY;IACvB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.LinkDocument = exports.LinkDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.LinkDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
status: zod_1.z.enum(['pending', 'success', 'failure']).optional(),
|
|
15
|
-
label: zod_1.z.string().optional(),
|
|
16
|
-
workflowId: zod_1.z.string().optional(),
|
|
17
|
-
embed: zod_1.z.boolean().optional(),
|
|
18
|
-
expanded: zod_1.z.boolean().optional(),
|
|
19
|
-
})
|
|
20
|
-
.strict();
|
|
21
|
-
let LinkDocument = class LinkDocument {
|
|
22
|
-
status;
|
|
23
|
-
label;
|
|
24
|
-
workflowId;
|
|
25
|
-
embed;
|
|
26
|
-
expanded;
|
|
27
|
-
};
|
|
28
|
-
exports.LinkDocument = LinkDocument;
|
|
29
|
-
exports.LinkDocument = LinkDocument = __decorate([
|
|
30
|
-
(0, common_1.Document)({
|
|
31
|
-
schema: exports.LinkDocumentSchema,
|
|
32
|
-
uiConfig: __dirname + '/link-document.yaml',
|
|
33
|
-
})
|
|
34
|
-
], LinkDocument);
|
|
35
|
-
//# sourceMappingURL=link-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-document.js","sourceRoot":"","sources":["../../src/documents/link-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5D,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAQL,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,MAAM,CAAqC;IAC3C,KAAK,CAAU;IACf,UAAU,CAAU;IACpB,KAAK,CAAW;IAChB,QAAQ,CAAW;CACpB,CAAA;AANY,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,0BAAkB;QAC1B,QAAQ,EAAE,SAAS,GAAG,qBAAqB;KAC5C,CAAC;GACW,YAAY,CAMxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-document.d.ts","sourceRoot":"","sources":["../../src/documents/markdown-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB;;kBAIxB,CAAC;AAEZ,qBAIa,gBAAgB;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.MarkdownDocument = exports.MarkdownDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.MarkdownDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
markdown: zod_1.z.string(),
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
17
|
-
let MarkdownDocument = class MarkdownDocument {
|
|
18
|
-
markdown;
|
|
19
|
-
};
|
|
20
|
-
exports.MarkdownDocument = MarkdownDocument;
|
|
21
|
-
exports.MarkdownDocument = MarkdownDocument = __decorate([
|
|
22
|
-
(0, common_1.Document)({
|
|
23
|
-
schema: exports.MarkdownDocumentSchema,
|
|
24
|
-
uiConfig: __dirname + '/markdown-document.yaml',
|
|
25
|
-
})
|
|
26
|
-
], MarkdownDocument);
|
|
27
|
-
//# sourceMappingURL=markdown-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-document.js","sourceRoot":"","sources":["../../src/documents/markdown-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,sBAAsB,GAAG,OAAC;KACpC,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,QAAQ,CAAS;CAClB,CAAA;AAFY,4CAAgB;2BAAhB,gBAAgB;IAJ5B,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,8BAAsB;QAC9B,QAAQ,EAAE,SAAS,GAAG,yBAAyB;KAChD,CAAC;GACW,gBAAgB,CAE5B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const MessageDocumentSchema: z.ZodObject<{
|
|
3
|
-
role: z.ZodString;
|
|
4
|
-
content: z.ZodString;
|
|
5
|
-
}, z.core.$strict>;
|
|
6
|
-
export declare class MessageDocument {
|
|
7
|
-
role: string;
|
|
8
|
-
content: string;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=message-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-document.d.ts","sourceRoot":"","sources":["../../src/documents/message-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;kBAKvB,CAAC;AAEZ,qBAIa,eAAe;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.MessageDocument = exports.MessageDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.MessageDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
role: zod_1.z.string(),
|
|
15
|
-
content: zod_1.z.string(),
|
|
16
|
-
})
|
|
17
|
-
.strict();
|
|
18
|
-
let MessageDocument = class MessageDocument {
|
|
19
|
-
role;
|
|
20
|
-
content;
|
|
21
|
-
};
|
|
22
|
-
exports.MessageDocument = MessageDocument;
|
|
23
|
-
exports.MessageDocument = MessageDocument = __decorate([
|
|
24
|
-
(0, common_1.Document)({
|
|
25
|
-
schema: exports.MessageDocumentSchema,
|
|
26
|
-
uiConfig: __dirname + '/message-document.yaml',
|
|
27
|
-
})
|
|
28
|
-
], MessageDocument);
|
|
29
|
-
//# sourceMappingURL=message-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-document.js","sourceRoot":"","sources":["../../src/documents/message-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,qBAAqB,GAAG,OAAC;KACnC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,IAAI,CAAS;IACb,OAAO,CAAS;CACjB,CAAA;AAHY,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,6BAAqB;QAC7B,QAAQ,EAAE,SAAS,GAAG,wBAAwB;KAC/C,CAAC;GACW,eAAe,CAG3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plain-document.d.ts","sourceRoot":"","sources":["../../src/documents/plain-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;kBAIrB,CAAC;AAEZ,qBAIa,aAAa;IACxB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PlainDocument = exports.PlainDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.PlainDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
text: zod_1.z.string(),
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
17
|
-
let PlainDocument = class PlainDocument {
|
|
18
|
-
text;
|
|
19
|
-
};
|
|
20
|
-
exports.PlainDocument = PlainDocument;
|
|
21
|
-
exports.PlainDocument = PlainDocument = __decorate([
|
|
22
|
-
(0, common_1.Document)({
|
|
23
|
-
schema: exports.PlainDocumentSchema,
|
|
24
|
-
uiConfig: __dirname + '/plain-document.yaml',
|
|
25
|
-
})
|
|
26
|
-
], PlainDocument);
|
|
27
|
-
//# sourceMappingURL=plain-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plain-document.js","sourceRoot":"","sources":["../../src/documents/plain-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,mBAAmB,GAAG,OAAC;KACjC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,IAAI,CAAS;CACd,CAAA;AAFY,sCAAa;wBAAb,aAAa;IAJzB,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,2BAAmB;QAC3B,QAAQ,EAAE,SAAS,GAAG,sBAAsB;KAC7C,CAAC;GACW,aAAa,CAEzB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const SecretRequestDocumentSchema: z.ZodObject<{
|
|
3
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4
|
-
key: z.ZodString;
|
|
5
|
-
value: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, z.core.$strip>>>;
|
|
7
|
-
}, z.core.$strict>;
|
|
8
|
-
export declare class SecretRequestDocument {
|
|
9
|
-
variables?: {
|
|
10
|
-
key: string;
|
|
11
|
-
value?: string;
|
|
12
|
-
}[];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=secret-request-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secret-request-document.d.ts","sourceRoot":"","sources":["../../src/documents/secret-request-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,2BAA2B;;;;;kBAW7B,CAAC;AAEZ,qBAIa,qBAAqB;IAChC,SAAS,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.SecretRequestDocument = exports.SecretRequestDocumentSchema = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
exports.SecretRequestDocumentSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
variables: zod_1.z
|
|
15
|
-
.array(zod_1.z.object({
|
|
16
|
-
key: zod_1.z.string(),
|
|
17
|
-
value: zod_1.z.string().optional(),
|
|
18
|
-
}))
|
|
19
|
-
.optional(),
|
|
20
|
-
})
|
|
21
|
-
.strict();
|
|
22
|
-
let SecretRequestDocument = class SecretRequestDocument {
|
|
23
|
-
variables;
|
|
24
|
-
};
|
|
25
|
-
exports.SecretRequestDocument = SecretRequestDocument;
|
|
26
|
-
exports.SecretRequestDocument = SecretRequestDocument = __decorate([
|
|
27
|
-
(0, common_1.Document)({
|
|
28
|
-
schema: exports.SecretRequestDocumentSchema,
|
|
29
|
-
uiConfig: __dirname + '/secret-request-document.yaml',
|
|
30
|
-
})
|
|
31
|
-
], SecretRequestDocument);
|
|
32
|
-
//# sourceMappingURL=secret-request-document.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secret-request-document.js","sourceRoot":"","sources":["../../src/documents/secret-request-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,2BAA2B,GAAG,OAAC;KACzC,MAAM,CAAC;IACN,SAAS,EAAE,OAAC;SACT,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC7B,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,SAAS,CAAqC;CAC/C,CAAA;AAFY,sDAAqB;gCAArB,qBAAqB;IAJjC,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,mCAA2B;QACnC,QAAQ,EAAE,SAAS,GAAG,+BAA+B;KACtD,CAAC;GACW,qBAAqB,CAEjC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
2
|
-
import { SecretEntity } from '@loopstack/common';
|
|
3
|
-
export declare class SecretService {
|
|
4
|
-
private secretRepository;
|
|
5
|
-
constructor(secretRepository: Repository<SecretEntity>);
|
|
6
|
-
findAllByWorkspace(workspaceId: string): Promise<SecretEntity[]>;
|
|
7
|
-
create(workspaceId: string, data: {
|
|
8
|
-
key: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}): Promise<SecretEntity>;
|
|
11
|
-
update(id: string, workspaceId: string, data: {
|
|
12
|
-
value?: string;
|
|
13
|
-
}): Promise<SecretEntity>;
|
|
14
|
-
upsert(workspaceId: string, data: {
|
|
15
|
-
key: string;
|
|
16
|
-
value: string;
|
|
17
|
-
}): Promise<SecretEntity>;
|
|
18
|
-
delete(id: string, workspaceId: string): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=secret.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secret.service.d.ts","sourceRoot":"","sources":["../../../src/persistence/services/secret.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBACa,aAAa;IAGtB,OAAO,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,UAAU,CAAC,YAAY,CAAC;IAG9C,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAOhE,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IASxF,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAcxF,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAaxF,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7D"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.SecretService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
-
const typeorm_2 = require("typeorm");
|
|
19
|
-
const common_2 = require("@loopstack/common");
|
|
20
|
-
let SecretService = class SecretService {
|
|
21
|
-
secretRepository;
|
|
22
|
-
constructor(secretRepository) {
|
|
23
|
-
this.secretRepository = secretRepository;
|
|
24
|
-
}
|
|
25
|
-
async findAllByWorkspace(workspaceId) {
|
|
26
|
-
return this.secretRepository.find({
|
|
27
|
-
where: { workspaceId },
|
|
28
|
-
order: { key: 'ASC' },
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
async create(workspaceId, data) {
|
|
32
|
-
const secret = this.secretRepository.create({
|
|
33
|
-
workspaceId,
|
|
34
|
-
key: data.key,
|
|
35
|
-
value: data.value,
|
|
36
|
-
});
|
|
37
|
-
return this.secretRepository.save(secret);
|
|
38
|
-
}
|
|
39
|
-
async update(id, workspaceId, data) {
|
|
40
|
-
const secret = await this.secretRepository.findOne({
|
|
41
|
-
where: { id, workspaceId },
|
|
42
|
-
});
|
|
43
|
-
if (!secret) {
|
|
44
|
-
throw new common_1.NotFoundException(`Secret with ID ${id} not found`);
|
|
45
|
-
}
|
|
46
|
-
if (data.value !== undefined)
|
|
47
|
-
secret.value = data.value;
|
|
48
|
-
return this.secretRepository.save(secret);
|
|
49
|
-
}
|
|
50
|
-
async upsert(workspaceId, data) {
|
|
51
|
-
const existing = await this.secretRepository.findOne({
|
|
52
|
-
where: { workspaceId, key: data.key },
|
|
53
|
-
});
|
|
54
|
-
if (existing) {
|
|
55
|
-
existing.value = data.value;
|
|
56
|
-
return this.secretRepository.save(existing);
|
|
57
|
-
}
|
|
58
|
-
return this.create(workspaceId, data);
|
|
59
|
-
}
|
|
60
|
-
async delete(id, workspaceId) {
|
|
61
|
-
const secret = await this.secretRepository.findOne({
|
|
62
|
-
where: { id, workspaceId },
|
|
63
|
-
});
|
|
64
|
-
if (!secret) {
|
|
65
|
-
throw new common_1.NotFoundException(`Secret with ID ${id} not found`);
|
|
66
|
-
}
|
|
67
|
-
await this.secretRepository.remove(secret);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
exports.SecretService = SecretService;
|
|
71
|
-
exports.SecretService = SecretService = __decorate([
|
|
72
|
-
(0, common_1.Injectable)(),
|
|
73
|
-
__param(0, (0, typeorm_1.InjectRepository)(common_2.SecretEntity)),
|
|
74
|
-
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
75
|
-
], SecretService);
|
|
76
|
-
//# sourceMappingURL=secret.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secret.service.js","sourceRoot":"","sources":["../../../src/persistence/services/secret.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAqC;AACrC,8CAAiD;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGd;IAFV,YAEU,gBAA0C;QAA1C,qBAAgB,GAAhB,gBAAgB,CAA0B;IACjD,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CAAC,WAAmB;QAC1C,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAChC,KAAK,EAAE,EAAE,WAAW,EAAE;YACtB,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,IAAoC;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAC1C,WAAW;YACX,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,WAAmB,EAAE,IAAwB;QACpE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,0BAAiB,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAExD,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,IAAoC;QACpE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACnD,KAAK,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;SACtC,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5B,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,WAAmB;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,0BAAiB,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;QAChE,CAAC;QAED,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACF,CAAA;AA5DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,qBAAY,CAAC,CAAA;qCACL,oBAAU;GAH3B,aAAa,CA4DzB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
2
|
-
export declare class GetSecretKeysTool extends BaseTool {
|
|
3
|
-
private secretService;
|
|
4
|
-
private executionScope;
|
|
5
|
-
call(_args: object): Promise<ToolResult>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=get-secret-keys.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-secret-keys.tool.d.ts","sourceRoot":"","sources":["../../src/tools/get-secret-keys.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/D,qBAKa,iBAAkB,SAAQ,QAAQ;IACnC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAiB;IAE3C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;CAU/C"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GetSecretKeysTool = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const common_2 = require("@loopstack/common");
|
|
15
|
-
const persistence_1 = require("../persistence");
|
|
16
|
-
const utils_1 = require("../workflow-processor/utils");
|
|
17
|
-
let GetSecretKeysTool = class GetSecretKeysTool extends common_2.BaseTool {
|
|
18
|
-
secretService;
|
|
19
|
-
executionScope;
|
|
20
|
-
async call(_args) {
|
|
21
|
-
const ctx = this.executionScope.get();
|
|
22
|
-
const secrets = await this.secretService.findAllByWorkspace(ctx.getContext().workspaceId);
|
|
23
|
-
return {
|
|
24
|
-
data: secrets.map((s) => ({
|
|
25
|
-
key: s.key,
|
|
26
|
-
hasValue: !!s.value,
|
|
27
|
-
})),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.GetSecretKeysTool = GetSecretKeysTool;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, common_1.Inject)(),
|
|
34
|
-
__metadata("design:type", persistence_1.SecretService)
|
|
35
|
-
], GetSecretKeysTool.prototype, "secretService", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, common_1.Inject)(),
|
|
38
|
-
__metadata("design:type", utils_1.ExecutionScope)
|
|
39
|
-
], GetSecretKeysTool.prototype, "executionScope", void 0);
|
|
40
|
-
exports.GetSecretKeysTool = GetSecretKeysTool = __decorate([
|
|
41
|
-
(0, common_2.Tool)({
|
|
42
|
-
uiConfig: {
|
|
43
|
-
description: 'Returns the list of secret keys for the current workspace. Does not return secret values.',
|
|
44
|
-
},
|
|
45
|
-
})
|
|
46
|
-
], GetSecretKeysTool);
|
|
47
|
-
//# sourceMappingURL=get-secret-keys.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-secret-keys.tool.js","sourceRoot":"","sources":["../../src/tools/get-secret-keys.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AACxC,8CAA+D;AAC/D,gDAA+C;AAC/C,uDAA6D;AAOtD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,iBAAQ;IAC3B,aAAa,CAAgB;IAC7B,cAAc,CAAiB;IAEjD,KAAK,CAAC,IAAI,CAAC,KAAa;QACtB,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC;QAC1F,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxB,GAAG,EAAE,CAAC,CAAC,GAAG;gBACV,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK;aACpB,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF,CAAA;AAdY,8CAAiB;AACV;IAAjB,IAAA,eAAM,GAAE;8BAAwB,2BAAa;wDAAC;AAC7B;IAAjB,IAAA,eAAM,GAAE;8BAAyB,sBAAc;yDAAC;4BAFtC,iBAAiB;IAL7B,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EAAE,2FAA2F;SACzG;KACF,CAAC;GACW,iBAAiB,CAc7B"}
|
package/dist/tools/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC"}
|
package/dist/tools/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./get-secret-keys.tool"), exports);
|
|
18
|
-
__exportStar(require("./request-secrets.tool"), exports);
|
|
19
|
-
__exportStar(require("./request-secrets-task.tool"), exports);
|
|
20
|
-
__exportStar(require("./secrets-request.workflow"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { BaseTool, ToolCallOptions, ToolResult } from '@loopstack/common';
|
|
3
|
-
declare const RequestSecretsTaskInputSchema: z.ZodObject<{
|
|
4
|
-
variables: z.ZodArray<z.ZodObject<{
|
|
5
|
-
key: z.ZodString;
|
|
6
|
-
}, z.core.$strip>>;
|
|
7
|
-
}, z.core.$strict>;
|
|
8
|
-
type RequestSecretsTaskInput = z.infer<typeof RequestSecretsTaskInputSchema>;
|
|
9
|
-
export declare class RequestSecretsTask extends BaseTool {
|
|
10
|
-
private readonly logger;
|
|
11
|
-
private secretsRequest;
|
|
12
|
-
call(args: RequestSecretsTaskInput, options?: ToolCallOptions): Promise<ToolResult>;
|
|
13
|
-
complete(result: Record<string, unknown>): Promise<ToolResult>;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=request-secrets-task.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-secrets-task.tool.d.ts","sourceRoot":"","sources":["../../src/tools/request-secrets-task.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAwB,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIhG,QAAA,MAAM,6BAA6B;;;;kBAQxB,CAAC;AAEZ,KAAK,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE7E,qBAWa,kBAAmB,SAAQ,QAAQ;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE5C,OAAO,CAAC,cAAc,CAAyB;IAE3D,IAAI,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IA2BnF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;CAiBrE"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var RequestSecretsTask_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.RequestSecretsTask = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const zod_1 = require("zod");
|
|
16
|
-
const common_2 = require("@loopstack/common");
|
|
17
|
-
const documents_1 = require("../documents");
|
|
18
|
-
const secrets_request_workflow_1 = require("./secrets-request.workflow");
|
|
19
|
-
const RequestSecretsTaskInputSchema = zod_1.z
|
|
20
|
-
.object({
|
|
21
|
-
variables: zod_1.z.array(zod_1.z.object({
|
|
22
|
-
key: zod_1.z.string().describe('The environment variable key (e.g. OPENAI_API_KEY)'),
|
|
23
|
-
})),
|
|
24
|
-
})
|
|
25
|
-
.strict();
|
|
26
|
-
let RequestSecretsTask = RequestSecretsTask_1 = class RequestSecretsTask extends common_2.BaseTool {
|
|
27
|
-
logger = new common_1.Logger(RequestSecretsTask_1.name);
|
|
28
|
-
secretsRequest;
|
|
29
|
-
async call(args, options) {
|
|
30
|
-
const result = await this.secretsRequest.run({ variables: args.variables }, {
|
|
31
|
-
alias: 'secretsRequest',
|
|
32
|
-
callback: options?.callback,
|
|
33
|
-
});
|
|
34
|
-
await this.repository.save(documents_1.LinkDocument, {
|
|
35
|
-
status: 'pending',
|
|
36
|
-
label: 'Requesting Secrets',
|
|
37
|
-
workflowId: result.workflowId,
|
|
38
|
-
embed: true,
|
|
39
|
-
expanded: true,
|
|
40
|
-
}, { id: `link_${result.workflowId}` });
|
|
41
|
-
return {
|
|
42
|
-
data: { workflowId: result.workflowId },
|
|
43
|
-
pending: { workflowId: result.workflowId },
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
async complete(result) {
|
|
47
|
-
const data = result;
|
|
48
|
-
await this.repository.save(documents_1.LinkDocument, {
|
|
49
|
-
status: 'success',
|
|
50
|
-
label: 'Secrets have been stored',
|
|
51
|
-
workflowId: data.workflowId,
|
|
52
|
-
}, { id: `link_${data.workflowId}` });
|
|
53
|
-
return {
|
|
54
|
-
data: 'Secrets have been stored securely by the user.',
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.RequestSecretsTask = RequestSecretsTask;
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, common_2.InjectWorkflow)(),
|
|
61
|
-
__metadata("design:type", secrets_request_workflow_1.SecretsRequestWorkflow)
|
|
62
|
-
], RequestSecretsTask.prototype, "secretsRequest", void 0);
|
|
63
|
-
exports.RequestSecretsTask = RequestSecretsTask = RequestSecretsTask_1 = __decorate([
|
|
64
|
-
(0, common_1.Injectable)(),
|
|
65
|
-
(0, common_2.Tool)({
|
|
66
|
-
uiConfig: {
|
|
67
|
-
description: 'Requests secret values from the user. Shows a secure input form where the user can enter API keys and other secrets. ' +
|
|
68
|
-
'Values are stored securely and never exposed to the workflow or LLM. ' +
|
|
69
|
-
'Returns only the key names after the user has provided the values. ' +
|
|
70
|
-
'IMPORTANT: When using this tool, it must be the ONLY tool call in your response. Do not combine it with other tool calls.',
|
|
71
|
-
},
|
|
72
|
-
schema: RequestSecretsTaskInputSchema,
|
|
73
|
-
})
|
|
74
|
-
], RequestSecretsTask);
|
|
75
|
-
//# sourceMappingURL=request-secrets-task.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-secrets-task.tool.js","sourceRoot":"","sources":["../../src/tools/request-secrets-task.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAAgG;AAChG,4CAA4C;AAC5C,yEAAoE;AAEpE,MAAM,6BAA6B,GAAG,OAAC;KACpC,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,KAAK,CAChB,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KAC/E,CAAC,CACH;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AAeL,IAAM,kBAAkB,0BAAxB,MAAM,kBAAmB,SAAQ,iBAAQ;IAC7B,MAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAEpC,cAAc,CAAyB;IAEjE,KAAK,CAAC,IAAI,CAAC,IAA6B,EAAE,OAAyB;QACjE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAC1C,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAC7B;YACE,KAAK,EAAE,gBAAgB;YACvB,QAAQ,EAAE,OAAO,EAAE,QAAQ;SAC5B,CACF,CAAC;QAEF,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACxB,wBAAY,EACZ;YACE,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,oBAAoB;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,EACD,EAAE,EAAE,EAAE,QAAQ,MAAM,CAAC,UAAU,EAAE,EAAE,CACpC,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;YACvC,OAAO,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;SAC3C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAA+B;QAC5C,MAAM,IAAI,GAAG,MAAiC,CAAC;QAE/C,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACxB,wBAAY,EACZ;YACE,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,0BAA0B;YACjC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,EACD,EAAE,EAAE,EAAE,QAAQ,IAAI,CAAC,UAAU,EAAE,EAAE,CAClC,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,gDAAgD;SACvD,CAAC;IACJ,CAAC;CACF,CAAA;AAjDY,gDAAkB;AAGH;IAAzB,IAAA,uBAAc,GAAE;8BAAyB,iDAAsB;0DAAC;6BAHtD,kBAAkB;IAX9B,IAAA,mBAAU,GAAE;IACZ,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,uHAAuH;gBACvH,uEAAuE;gBACvE,qEAAqE;gBACrE,2HAA2H;SAC9H;QACD,MAAM,EAAE,6BAA6B;KACtC,CAAC;GACW,kBAAkB,CAiD9B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
-
declare const RequestSecretsInputSchema: z.ZodObject<{
|
|
4
|
-
variables: z.ZodArray<z.ZodObject<{
|
|
5
|
-
key: z.ZodString;
|
|
6
|
-
}, z.core.$strip>>;
|
|
7
|
-
}, z.core.$strict>;
|
|
8
|
-
type RequestSecretsInput = z.infer<typeof RequestSecretsInputSchema>;
|
|
9
|
-
export declare class RequestSecretsTool extends BaseTool {
|
|
10
|
-
call(args: RequestSecretsInput): Promise<ToolResult>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=request-secrets.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-secrets.tool.d.ts","sourceRoot":"","sources":["../../src/tools/request-secrets.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,QAAA,MAAM,yBAAyB;;;;kBAQpB,CAAC;AAEZ,KAAK,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAErE,qBAUa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;CAKrD"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RequestSecretsTool = void 0;
|
|
10
|
-
const zod_1 = require("zod");
|
|
11
|
-
const common_1 = require("@loopstack/common");
|
|
12
|
-
const RequestSecretsInputSchema = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
variables: zod_1.z.array(zod_1.z.object({
|
|
15
|
-
key: zod_1.z.string().describe('The environment variable key (e.g. OPENAI_API_KEY)'),
|
|
16
|
-
})),
|
|
17
|
-
})
|
|
18
|
-
.strict();
|
|
19
|
-
let RequestSecretsTool = class RequestSecretsTool extends common_1.BaseTool {
|
|
20
|
-
call(args) {
|
|
21
|
-
return Promise.resolve({
|
|
22
|
-
data: { variables: args.variables },
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.RequestSecretsTool = RequestSecretsTool;
|
|
27
|
-
exports.RequestSecretsTool = RequestSecretsTool = __decorate([
|
|
28
|
-
(0, common_1.Tool)({
|
|
29
|
-
uiConfig: {
|
|
30
|
-
description: 'Requests secret values from the user. Shows a secure input form where the user can enter API keys and other secrets. ' +
|
|
31
|
-
'Values are stored securely and never exposed to the workflow or LLM. ' +
|
|
32
|
-
'Returns only the key names after the user has provided the values. ' +
|
|
33
|
-
'IMPORTANT: When using this tool, it must be the ONLY tool call in your response. Do not combine it with other tool calls.',
|
|
34
|
-
},
|
|
35
|
-
schema: RequestSecretsInputSchema,
|
|
36
|
-
})
|
|
37
|
-
], RequestSecretsTool);
|
|
38
|
-
//# sourceMappingURL=request-secrets.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-secrets.tool.js","sourceRoot":"","sources":["../../src/tools/request-secrets.tool.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA+D;AAE/D,MAAM,yBAAyB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,KAAK,CAChB,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KAC/E,CAAC,CACH;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AAcL,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,iBAAQ;IAC9C,IAAI,CAAC,IAAyB;QAC5B,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AANY,gDAAkB;6BAAlB,kBAAkB;IAV9B,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,uHAAuH;gBACvH,uEAAuE;gBACvE,qEAAqE;gBACrE,2HAA2H;SAC9H;QACD,MAAM,EAAE,yBAAyB;KAClC,CAAC;GACW,kBAAkB,CAM9B"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseWorkflow } from '@loopstack/common';
|
|
2
|
-
export declare class SecretsRequestWorkflow extends BaseWorkflow<{
|
|
3
|
-
variables: {
|
|
4
|
-
key: string;
|
|
5
|
-
}[];
|
|
6
|
-
}> {
|
|
7
|
-
showForm(args: {
|
|
8
|
-
variables: {
|
|
9
|
-
key: string;
|
|
10
|
-
}[];
|
|
11
|
-
}): Promise<void>;
|
|
12
|
-
secretsSubmitted(): {
|
|
13
|
-
success: boolean;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=secrets-request.workflow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-request.workflow.d.ts","sourceRoot":"","sources":["../../src/tools/secrets-request.workflow.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAG3E,qBAWa,sBAAuB,SAAQ,YAAY,CAAC;IAAE,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC;IAElF,QAAQ,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE;IAOrD,gBAAgB,IAAI;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;CAGzC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SecretsRequestWorkflow = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const zod_1 = require("zod");
|
|
15
|
-
const common_2 = require("@loopstack/common");
|
|
16
|
-
const documents_1 = require("../documents");
|
|
17
|
-
let SecretsRequestWorkflow = class SecretsRequestWorkflow extends common_2.BaseWorkflow {
|
|
18
|
-
async showForm(args) {
|
|
19
|
-
await this.repository.save(documents_1.SecretRequestDocument, {
|
|
20
|
-
variables: args.variables,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
secretsSubmitted() {
|
|
24
|
-
return { success: true };
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.SecretsRequestWorkflow = SecretsRequestWorkflow;
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, common_2.Initial)({ to: 'requesting_secrets' }),
|
|
30
|
-
__metadata("design:type", Function),
|
|
31
|
-
__metadata("design:paramtypes", [Object]),
|
|
32
|
-
__metadata("design:returntype", Promise)
|
|
33
|
-
], SecretsRequestWorkflow.prototype, "showForm", null);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, common_2.Final)({ from: 'requesting_secrets', wait: true }),
|
|
36
|
-
__metadata("design:type", Function),
|
|
37
|
-
__metadata("design:paramtypes", []),
|
|
38
|
-
__metadata("design:returntype", Object)
|
|
39
|
-
], SecretsRequestWorkflow.prototype, "secretsSubmitted", null);
|
|
40
|
-
exports.SecretsRequestWorkflow = SecretsRequestWorkflow = __decorate([
|
|
41
|
-
(0, common_1.Injectable)(),
|
|
42
|
-
(0, common_2.Workflow)({
|
|
43
|
-
uiConfig: __dirname + '/secrets-request.ui.yaml',
|
|
44
|
-
schema: zod_1.z.object({
|
|
45
|
-
variables: zod_1.z.array(zod_1.z.object({
|
|
46
|
-
key: zod_1.z.string(),
|
|
47
|
-
})),
|
|
48
|
-
}),
|
|
49
|
-
})
|
|
50
|
-
], SecretsRequestWorkflow);
|
|
51
|
-
//# sourceMappingURL=secrets-request.workflow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-request.workflow.js","sourceRoot":"","sources":["../../src/tools/secrets-request.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6BAAwB;AACxB,8CAA2E;AAC3E,4CAAqD;AAa9C,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,qBAA8C;IAElF,AAAN,KAAK,CAAC,QAAQ,CAAC,IAAsC;QACnD,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,iCAAqB,EAAE;YAChD,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;IAGD,gBAAgB;QACd,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAA;AAZY,wDAAsB;AAE3B;IADL,IAAA,gBAAO,EAAC,EAAE,EAAE,EAAE,oBAAoB,EAAE,CAAC;;;;sDAKrC;AAGD;IADC,IAAA,cAAK,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;;;8DAGjD;iCAXU,sBAAsB;IAXlC,IAAA,mBAAU,GAAE;IACZ,IAAA,iBAAQ,EAAC;QACR,QAAQ,EAAE,SAAS,GAAG,0BAA0B;QAChD,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,SAAS,EAAE,OAAC,CAAC,KAAK,CAChB,OAAC,CAAC,MAAM,CAAC;gBACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;aAChB,CAAC,CACH;SACF,CAAC;KACH,CAAC;GACW,sBAAsB,CAYlC"}
|