@loopstack/core 0.0.5 → 0.1.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/CHANGELOG.md +11 -0
- package/dist/config/core.yaml +1 -0
- package/dist/modules/common/services/context.service.d.ts +2 -2
- package/dist/modules/common/services/context.service.js +7 -7
- package/dist/modules/common/services/context.service.js.map +1 -1
- package/dist/modules/common/services/document-helper.service.d.ts +58 -48
- package/dist/modules/common/services/schema-validator.service.d.ts +2 -0
- package/dist/modules/common/services/schema-validator.service.js +14 -11
- package/dist/modules/common/services/schema-validator.service.js.map +1 -1
- package/dist/modules/common/services/value-parser.service.d.ts +2 -6
- package/dist/modules/common/services/value-parser.service.js +0 -3
- package/dist/modules/common/services/value-parser.service.js.map +1 -1
- package/dist/modules/configuration/configuration.module.js +2 -3
- package/dist/modules/configuration/configuration.module.js.map +1 -1
- package/dist/modules/configuration/services/configuration.service.d.ts +5 -7
- package/dist/modules/configuration/services/configuration.service.js +38 -44
- package/dist/modules/configuration/services/configuration.service.js.map +1 -1
- package/dist/modules/configuration/services/dynamic-schema-generator.service.d.ts +8 -8
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js +15 -18
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js.map +1 -1
- package/dist/modules/configuration/services/index.d.ts +1 -2
- package/dist/modules/configuration/services/index.js +1 -2
- package/dist/modules/configuration/services/index.js.map +1 -1
- package/dist/modules/configuration/services/service-registry.service.d.ts +20 -0
- package/dist/modules/configuration/services/{adapter-registry.service.js → service-registry.service.js} +31 -16
- package/dist/modules/configuration/services/service-registry.service.js.map +1 -0
- package/dist/modules/persistence/__tests__/database-entities-utils.d.ts +2 -2
- package/dist/modules/persistence/__tests__/database-entities-utils.js +5 -5
- package/dist/modules/persistence/__tests__/database-entities-utils.js.map +1 -1
- package/dist/modules/persistence/persistence.module.js +3 -3
- package/dist/modules/persistence/persistence.module.js.map +1 -1
- package/dist/modules/persistence/services/document.service.d.ts +3 -3
- package/dist/modules/persistence/services/document.service.js +6 -6
- package/dist/modules/persistence/services/document.service.js.map +1 -1
- package/dist/modules/persistence/services/index.d.ts +1 -1
- package/dist/modules/persistence/services/index.js +1 -1
- package/dist/modules/persistence/services/index.js.map +1 -1
- package/dist/modules/persistence/services/namespace.service.d.ts +2 -2
- package/dist/modules/persistence/services/namespace.service.js +9 -9
- package/dist/modules/persistence/services/namespace.service.js.map +1 -1
- package/dist/modules/persistence/services/pipeline.service.d.ts +8 -0
- package/dist/modules/persistence/services/{project.service.js → pipeline.service.js} +13 -13
- package/dist/modules/persistence/services/pipeline.service.js.map +1 -0
- package/dist/modules/persistence/subscriber/workflow.subscriber.js +2 -2
- package/dist/modules/persistence/subscriber/workflow.subscriber.js.map +1 -1
- package/dist/modules/workflow-processor/services/index.d.ts +2 -1
- package/dist/modules/workflow-processor/services/index.js +2 -1
- package/dist/modules/workflow-processor/services/index.js.map +1 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.js +1 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/pipeline-processor.service.d.ts +15 -0
- package/dist/modules/workflow-processor/services/{project-processor.service.js → pipeline-processor.service.js} +24 -24
- package/dist/modules/workflow-processor/services/pipeline-processor.service.js.map +1 -0
- package/dist/modules/workflow-processor/services/state-machine-config.service.d.ts +7 -7
- package/dist/modules/workflow-processor/services/state-machine-config.service.js +0 -4
- package/dist/modules/workflow-processor/services/state-machine-config.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/state-machine-processor.service.d.ts +3 -1
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js +40 -40
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.d.ts +9 -0
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js +50 -0
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js.map +1 -0
- package/dist/modules/workflow-processor/services/tool-execution.service.d.ts +18 -12
- package/dist/modules/workflow-processor/services/tool-execution.service.js +29 -37
- package/dist/modules/workflow-processor/services/tool-execution.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.d.ts +2 -2
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.js +3 -3
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/workflow-processor.service.js +9 -4
- package/dist/modules/workflow-processor/services/workflow-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/tool-services/add-namespace.service.d.ts +20 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/add-namespace.service.js +16 -13
- package/dist/modules/workflow-processor/tool-services/add-namespace.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.d.ts +33 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/batch-create-documents.service.js +37 -40
- package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/create-document.service.d.ts +209 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/create-document.service.js +35 -41
- package/dist/modules/workflow-processor/tool-services/create-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/index.d.ts +2 -2
- package/dist/modules/workflow-processor/{tools → tool-services}/index.js +2 -2
- package/dist/modules/workflow-processor/tool-services/index.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/load-document.service.d.ts +68 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/load-document.service.js +14 -12
- package/dist/modules/workflow-processor/tool-services/load-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/mock.service.d.ts +17 -0
- package/dist/modules/workflow-processor/{tools/debug.service.js → tool-services/mock.service.js} +29 -22
- package/dist/modules/workflow-processor/tool-services/mock.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/set-context.service.d.ts +18 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/set-context.service.js +20 -17
- package/dist/modules/workflow-processor/tool-services/set-context.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.d.ts +14 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.js +48 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/transition-selector.service.d.ts +29 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/transition-selector.service.js +22 -19
- package/dist/modules/workflow-processor/tool-services/transition-selector.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/update-document.service.d.ts +110 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/update-document.service.js +22 -19
- package/dist/modules/workflow-processor/tool-services/update-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/workflow-processor.module.js +13 -12
- package/dist/modules/workflow-processor/workflow-processor.module.js.map +1 -1
- package/package.json +5 -2
- package/dist/config/documents/assistant-message.yaml +0 -13
- package/dist/config/documents/info-message.yaml +0 -9
- package/dist/config/documents/internal-message.yaml +0 -14
- package/dist/config/documents/loading-message.yaml +0 -10
- package/dist/config/documents/user-message.yaml +0 -13
- package/dist/config/templates/user-input-template.yaml +0 -29
- package/dist/config/tools/creat-error-message.yaml +0 -9
- package/dist/config/tools/create-assistant-message.yaml +0 -9
- package/dist/config/tools/create-chat-message.tool.yaml +0 -7
- package/dist/config/tools/create-template-document-user-update.yaml +0 -7
- package/dist/config/tools/create-template-document.yaml +0 -5
- package/dist/config/tools/create-user-message.tool.yaml +0 -9
- package/dist/modules/configuration/services/adapter-registry.service.d.ts +0 -12
- package/dist/modules/configuration/services/adapter-registry.service.js.map +0 -1
- package/dist/modules/configuration/services/tool.registry.d.ts +0 -13
- package/dist/modules/configuration/services/tool.registry.js +0 -59
- package/dist/modules/configuration/services/tool.registry.js.map +0 -1
- package/dist/modules/persistence/services/project.service.d.ts +0 -8
- package/dist/modules/persistence/services/project.service.js.map +0 -1
- package/dist/modules/workflow-processor/services/project-processor.service.d.ts +0 -15
- package/dist/modules/workflow-processor/services/project-processor.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/add-namespace.service.d.ts +0 -29
- package/dist/modules/workflow-processor/tools/add-namespace.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/batch-create-documents.service.d.ts +0 -42
- package/dist/modules/workflow-processor/tools/batch-create-documents.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/create-document.service.d.ts +0 -378
- package/dist/modules/workflow-processor/tools/create-document.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/debug.service.d.ts +0 -20
- package/dist/modules/workflow-processor/tools/debug.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/index.js.map +0 -1
- package/dist/modules/workflow-processor/tools/load-document.service.d.ts +0 -242
- package/dist/modules/workflow-processor/tools/load-document.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/set-context.service.d.ts +0 -27
- package/dist/modules/workflow-processor/tools/set-context.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/tool-call.service.d.ts +0 -29
- package/dist/modules/workflow-processor/tools/tool-call.service.js +0 -55
- package/dist/modules/workflow-processor/tools/tool-call.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/transition-selector.service.d.ts +0 -50
- package/dist/modules/workflow-processor/tools/transition-selector.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/update-document.service.d.ts +0 -198
- package/dist/modules/workflow-processor/tools/update-document.service.js.map +0 -1
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { ContextImportInterface, ContextInterface, WorkflowRunContext, ToolInterface, ToolResult } from '@loopstack/shared';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { ExpressionEvaluatorService } from '../../common';
|
|
4
|
-
import { DocumentEntity, WorkflowEntity } from '@loopstack/shared';
|
|
5
|
-
import { DocumentService, WorkflowService } from '../../persistence';
|
|
6
|
-
declare const LoadDocumentArgsSchema: z.ZodObject<{
|
|
7
|
-
where: z.ZodUnion<[z.ZodRecord<z.ZodString, any>, z.ZodObject<{
|
|
8
|
-
and: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
9
|
-
or: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
and?: any[] | undefined;
|
|
12
|
-
or?: any[] | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
and?: any[] | undefined;
|
|
15
|
-
or?: any[] | undefined;
|
|
16
|
-
}>, z.ZodObject<{
|
|
17
|
-
brackets: any;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
brackets?: any;
|
|
20
|
-
}, {
|
|
21
|
-
brackets?: any;
|
|
22
|
-
}>]>;
|
|
23
|
-
map: z.ZodOptional<z.ZodString>;
|
|
24
|
-
filter: z.ZodOptional<z.ZodString>;
|
|
25
|
-
sort: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
-
sortBy: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
iteratees: z.ZodArray<z.ZodString, "many">;
|
|
28
|
-
orders: z.ZodArray<z.ZodEnum<["asc", "desc"]>, "many">;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
iteratees: string[];
|
|
31
|
-
orders: ("asc" | "desc")[];
|
|
32
|
-
}, {
|
|
33
|
-
iteratees: string[];
|
|
34
|
-
orders: ("asc" | "desc")[];
|
|
35
|
-
}>>;
|
|
36
|
-
many: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
flat: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
ignoreChanges: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
global: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
-
}, "strict", z.ZodTypeAny, {
|
|
42
|
-
where: Record<string, any> | {
|
|
43
|
-
brackets?: any;
|
|
44
|
-
} | {
|
|
45
|
-
and?: any[] | undefined;
|
|
46
|
-
or?: any[] | undefined;
|
|
47
|
-
};
|
|
48
|
-
sort?: boolean | undefined;
|
|
49
|
-
map?: string | undefined;
|
|
50
|
-
filter?: string | undefined;
|
|
51
|
-
flat?: boolean | undefined;
|
|
52
|
-
many?: boolean | undefined;
|
|
53
|
-
sortBy?: {
|
|
54
|
-
iteratees: string[];
|
|
55
|
-
orders: ("asc" | "desc")[];
|
|
56
|
-
} | undefined;
|
|
57
|
-
ignoreChanges?: boolean | undefined;
|
|
58
|
-
global?: boolean | undefined;
|
|
59
|
-
optional?: boolean | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
where: Record<string, any> | {
|
|
62
|
-
brackets?: any;
|
|
63
|
-
} | {
|
|
64
|
-
and?: any[] | undefined;
|
|
65
|
-
or?: any[] | undefined;
|
|
66
|
-
};
|
|
67
|
-
sort?: boolean | undefined;
|
|
68
|
-
map?: string | undefined;
|
|
69
|
-
filter?: string | undefined;
|
|
70
|
-
flat?: boolean | undefined;
|
|
71
|
-
many?: boolean | undefined;
|
|
72
|
-
sortBy?: {
|
|
73
|
-
iteratees: string[];
|
|
74
|
-
orders: ("asc" | "desc")[];
|
|
75
|
-
} | undefined;
|
|
76
|
-
ignoreChanges?: boolean | undefined;
|
|
77
|
-
global?: boolean | undefined;
|
|
78
|
-
optional?: boolean | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
export type LoadDocumentArgsInterface = z.infer<typeof LoadDocumentArgsSchema>;
|
|
81
|
-
export declare class LoadDocumentService implements ToolInterface {
|
|
82
|
-
private documentService;
|
|
83
|
-
private workflowService;
|
|
84
|
-
private functionCallService;
|
|
85
|
-
private readonly logger;
|
|
86
|
-
configSchema: z.ZodObject<{
|
|
87
|
-
where: z.ZodUnion<[z.ZodRecord<z.ZodString, any>, z.ZodObject<{
|
|
88
|
-
and: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
89
|
-
or: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
and?: any[] | undefined;
|
|
92
|
-
or?: any[] | undefined;
|
|
93
|
-
}, {
|
|
94
|
-
and?: any[] | undefined;
|
|
95
|
-
or?: any[] | undefined;
|
|
96
|
-
}>, z.ZodObject<{
|
|
97
|
-
brackets: any;
|
|
98
|
-
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
brackets?: any;
|
|
100
|
-
}, {
|
|
101
|
-
brackets?: any;
|
|
102
|
-
}>]>;
|
|
103
|
-
map: z.ZodOptional<z.ZodString>;
|
|
104
|
-
filter: z.ZodOptional<z.ZodString>;
|
|
105
|
-
sort: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
-
sortBy: z.ZodOptional<z.ZodObject<{
|
|
107
|
-
iteratees: z.ZodArray<z.ZodString, "many">;
|
|
108
|
-
orders: z.ZodArray<z.ZodEnum<["asc", "desc"]>, "many">;
|
|
109
|
-
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
iteratees: string[];
|
|
111
|
-
orders: ("asc" | "desc")[];
|
|
112
|
-
}, {
|
|
113
|
-
iteratees: string[];
|
|
114
|
-
orders: ("asc" | "desc")[];
|
|
115
|
-
}>>;
|
|
116
|
-
many: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
-
flat: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
-
ignoreChanges: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
global: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
-
}, "strict", z.ZodTypeAny, {
|
|
122
|
-
where: Record<string, any> | {
|
|
123
|
-
brackets?: any;
|
|
124
|
-
} | {
|
|
125
|
-
and?: any[] | undefined;
|
|
126
|
-
or?: any[] | undefined;
|
|
127
|
-
};
|
|
128
|
-
sort?: boolean | undefined;
|
|
129
|
-
map?: string | undefined;
|
|
130
|
-
filter?: string | undefined;
|
|
131
|
-
flat?: boolean | undefined;
|
|
132
|
-
many?: boolean | undefined;
|
|
133
|
-
sortBy?: {
|
|
134
|
-
iteratees: string[];
|
|
135
|
-
orders: ("asc" | "desc")[];
|
|
136
|
-
} | undefined;
|
|
137
|
-
ignoreChanges?: boolean | undefined;
|
|
138
|
-
global?: boolean | undefined;
|
|
139
|
-
optional?: boolean | undefined;
|
|
140
|
-
}, {
|
|
141
|
-
where: Record<string, any> | {
|
|
142
|
-
brackets?: any;
|
|
143
|
-
} | {
|
|
144
|
-
and?: any[] | undefined;
|
|
145
|
-
or?: any[] | undefined;
|
|
146
|
-
};
|
|
147
|
-
sort?: boolean | undefined;
|
|
148
|
-
map?: string | undefined;
|
|
149
|
-
filter?: string | undefined;
|
|
150
|
-
flat?: boolean | undefined;
|
|
151
|
-
many?: boolean | undefined;
|
|
152
|
-
sortBy?: {
|
|
153
|
-
iteratees: string[];
|
|
154
|
-
orders: ("asc" | "desc")[];
|
|
155
|
-
} | undefined;
|
|
156
|
-
ignoreChanges?: boolean | undefined;
|
|
157
|
-
global?: boolean | undefined;
|
|
158
|
-
optional?: boolean | undefined;
|
|
159
|
-
}>;
|
|
160
|
-
schema: z.ZodObject<{
|
|
161
|
-
where: z.ZodUnion<[z.ZodRecord<z.ZodString, any>, z.ZodObject<{
|
|
162
|
-
and: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
163
|
-
or: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
164
|
-
}, "strip", z.ZodTypeAny, {
|
|
165
|
-
and?: any[] | undefined;
|
|
166
|
-
or?: any[] | undefined;
|
|
167
|
-
}, {
|
|
168
|
-
and?: any[] | undefined;
|
|
169
|
-
or?: any[] | undefined;
|
|
170
|
-
}>, z.ZodObject<{
|
|
171
|
-
brackets: any;
|
|
172
|
-
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
brackets?: any;
|
|
174
|
-
}, {
|
|
175
|
-
brackets?: any;
|
|
176
|
-
}>]>;
|
|
177
|
-
map: z.ZodOptional<z.ZodString>;
|
|
178
|
-
filter: z.ZodOptional<z.ZodString>;
|
|
179
|
-
sort: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
-
sortBy: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
iteratees: z.ZodArray<z.ZodString, "many">;
|
|
182
|
-
orders: z.ZodArray<z.ZodEnum<["asc", "desc"]>, "many">;
|
|
183
|
-
}, "strip", z.ZodTypeAny, {
|
|
184
|
-
iteratees: string[];
|
|
185
|
-
orders: ("asc" | "desc")[];
|
|
186
|
-
}, {
|
|
187
|
-
iteratees: string[];
|
|
188
|
-
orders: ("asc" | "desc")[];
|
|
189
|
-
}>>;
|
|
190
|
-
many: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
-
flat: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
-
ignoreChanges: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
-
global: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
-
}, "strict", z.ZodTypeAny, {
|
|
196
|
-
where: Record<string, any> | {
|
|
197
|
-
brackets?: any;
|
|
198
|
-
} | {
|
|
199
|
-
and?: any[] | undefined;
|
|
200
|
-
or?: any[] | undefined;
|
|
201
|
-
};
|
|
202
|
-
sort?: boolean | undefined;
|
|
203
|
-
map?: string | undefined;
|
|
204
|
-
filter?: string | undefined;
|
|
205
|
-
flat?: boolean | undefined;
|
|
206
|
-
many?: boolean | undefined;
|
|
207
|
-
sortBy?: {
|
|
208
|
-
iteratees: string[];
|
|
209
|
-
orders: ("asc" | "desc")[];
|
|
210
|
-
} | undefined;
|
|
211
|
-
ignoreChanges?: boolean | undefined;
|
|
212
|
-
global?: boolean | undefined;
|
|
213
|
-
optional?: boolean | undefined;
|
|
214
|
-
}, {
|
|
215
|
-
where: Record<string, any> | {
|
|
216
|
-
brackets?: any;
|
|
217
|
-
} | {
|
|
218
|
-
and?: any[] | undefined;
|
|
219
|
-
or?: any[] | undefined;
|
|
220
|
-
};
|
|
221
|
-
sort?: boolean | undefined;
|
|
222
|
-
map?: string | undefined;
|
|
223
|
-
filter?: string | undefined;
|
|
224
|
-
flat?: boolean | undefined;
|
|
225
|
-
many?: boolean | undefined;
|
|
226
|
-
sortBy?: {
|
|
227
|
-
iteratees: string[];
|
|
228
|
-
orders: ("asc" | "desc")[];
|
|
229
|
-
} | undefined;
|
|
230
|
-
ignoreChanges?: boolean | undefined;
|
|
231
|
-
global?: boolean | undefined;
|
|
232
|
-
optional?: boolean | undefined;
|
|
233
|
-
}>;
|
|
234
|
-
constructor(documentService: DocumentService, workflowService: WorkflowService, functionCallService: ExpressionEvaluatorService);
|
|
235
|
-
applyFilters(props: z.infer<typeof this.schema>, items: DocumentEntity[]): DocumentEntity<any>[];
|
|
236
|
-
applyModifiers(props: z.infer<typeof this.schema>, entities: DocumentEntity[]): any[];
|
|
237
|
-
getDocumentsByQuery(props: z.infer<typeof this.schema>, projectId: string, workspaceId: string, workflow: WorkflowEntity): Promise<DocumentEntity[]>;
|
|
238
|
-
updateWorkflowDependenciesHash(workflow: WorkflowEntity): void;
|
|
239
|
-
createImportItem(options: LoadDocumentArgsInterface, currentEntities: DocumentEntity[], prevImport: ContextImportInterface | undefined): ContextImportInterface;
|
|
240
|
-
apply(props: z.infer<typeof this.schema>, workflow: WorkflowEntity | undefined, context: ContextInterface, workflowContext: WorkflowRunContext): Promise<ToolResult>;
|
|
241
|
-
}
|
|
242
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tools/load-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,oDAAuB;AACvB,8CAO2B;AAC3B,6BAAwB;AACxB,yCAA0D;AAE1D,mDAI2B;AAE3B,MAAM,sBAAsB,GAAG,OAAC;KAC7B,MAAM,CAAC;IACN,KAAK,EAAE,4BAAc;IACrB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAA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AAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACzE,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAC5C,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CACvD,CAAC;YACF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;YAE/C,IAAI,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CACtC,KAAK,EACL,eAAe,EACf,UAAU,CACX,CAAC;QAEF,OAAO;YACL,QAAQ;YACR,IAAI,EAAE,UAAU;SACjB,CAAC;IACJ,CAAC;CACF,CAAA;AA1LY,kDAAmB;8BAAnB,mBAAmB;IAF/B,IAAA,mBAAU,GAAE;IACZ,IAAA,aAAI,GAAE;qCAOsB,6BAAe;QACf,6BAAe;QACX,mCAA0B;GAR9C,mBAAmB,CA0L/B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ToolInterface, ToolResult } from '@loopstack/shared';
|
|
3
|
-
import { WorkflowEntity } from '@loopstack/shared';
|
|
4
|
-
export declare class SetContextService implements ToolInterface {
|
|
5
|
-
private readonly logger;
|
|
6
|
-
configSchema: z.ZodObject<{
|
|
7
|
-
key: z.ZodString;
|
|
8
|
-
value: z.ZodAny;
|
|
9
|
-
}, "strict", z.ZodTypeAny, {
|
|
10
|
-
key: string;
|
|
11
|
-
value?: any;
|
|
12
|
-
}, {
|
|
13
|
-
key: string;
|
|
14
|
-
value?: any;
|
|
15
|
-
}>;
|
|
16
|
-
schema: z.ZodObject<{
|
|
17
|
-
key: z.ZodString;
|
|
18
|
-
value: z.ZodAny;
|
|
19
|
-
}, "strict", z.ZodTypeAny, {
|
|
20
|
-
key: string;
|
|
21
|
-
value?: any;
|
|
22
|
-
}, {
|
|
23
|
-
key: string;
|
|
24
|
-
value?: any;
|
|
25
|
-
}>;
|
|
26
|
-
apply(props: z.infer<typeof this.schema>, workflow: WorkflowEntity | undefined): Promise<ToolResult>;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-context.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tools/set-context.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAAoE;AAK7D,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IACX,MAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAE7D,YAAY,GAAG,OAAC;SACb,MAAM,CAAC;QACN,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,OAAC,CAAC,GAAG,EAAE;KACf,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,MAAM,GAAG,OAAC;SACP,MAAM,CAAC;QACN,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,OAAC,CAAC,GAAG,EAAE;KACf,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,KAAK,CAAC,KAAK,CACT,KAAkC,EAClC,QAAoC;QAEpC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;YAC5B,QAAQ,CAAC,aAAa,GAAG,EAAE,CAAC;QAC9B,CAAC;QAED,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC;QAE9D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAEnE,OAAO;YACL,QAAQ;SACT,CAAC;IACJ,CAAC;CACF,CAAA;AAvCY,8CAAiB;4BAAjB,iBAAiB;IAF7B,IAAA,mBAAU,GAAE;IACZ,IAAA,aAAI,GAAE;GACM,iBAAiB,CAuC7B"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ContextInterface, WorkflowRunContext, ToolInterface, ToolResult, WorkflowEntity } from '@loopstack/shared';
|
|
3
|
-
import { ToolExecutionService } from '../index';
|
|
4
|
-
export declare class ToolCallService implements ToolInterface {
|
|
5
|
-
private toolExecutionService;
|
|
6
|
-
private readonly logger;
|
|
7
|
-
configSchema: z.ZodObject<{
|
|
8
|
-
tool: z.ZodString;
|
|
9
|
-
options: z.ZodOptional<z.ZodAny>;
|
|
10
|
-
}, "strict", z.ZodTypeAny, {
|
|
11
|
-
tool: string;
|
|
12
|
-
options?: any;
|
|
13
|
-
}, {
|
|
14
|
-
tool: string;
|
|
15
|
-
options?: any;
|
|
16
|
-
}>;
|
|
17
|
-
schema: z.ZodObject<{
|
|
18
|
-
tool: z.ZodString;
|
|
19
|
-
options: z.ZodOptional<z.ZodAny>;
|
|
20
|
-
}, "strict", z.ZodTypeAny, {
|
|
21
|
-
tool: string;
|
|
22
|
-
options?: any;
|
|
23
|
-
}, {
|
|
24
|
-
tool: string;
|
|
25
|
-
options?: any;
|
|
26
|
-
}>;
|
|
27
|
-
constructor(toolExecutionService: ToolExecutionService);
|
|
28
|
-
apply(props: z.infer<typeof this.schema>, workflow: WorkflowEntity | undefined, context: ContextInterface, workflowContext: WorkflowRunContext): Promise<ToolResult>;
|
|
29
|
-
}
|
|
@@ -1,55 +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 ToolCallService_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.ToolCallService = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const zod_1 = require("zod");
|
|
16
|
-
const shared_1 = require("@loopstack/shared");
|
|
17
|
-
const index_1 = require("../index");
|
|
18
|
-
let ToolCallService = ToolCallService_1 = class ToolCallService {
|
|
19
|
-
toolExecutionService;
|
|
20
|
-
logger = new common_1.Logger(ToolCallService_1.name);
|
|
21
|
-
configSchema = zod_1.z
|
|
22
|
-
.object({
|
|
23
|
-
tool: zod_1.z.string(),
|
|
24
|
-
options: zod_1.z.any().optional(),
|
|
25
|
-
})
|
|
26
|
-
.strict();
|
|
27
|
-
schema = zod_1.z
|
|
28
|
-
.object({
|
|
29
|
-
tool: zod_1.z.string(),
|
|
30
|
-
options: zod_1.z.any().optional(),
|
|
31
|
-
})
|
|
32
|
-
.strict();
|
|
33
|
-
constructor(toolExecutionService) {
|
|
34
|
-
this.toolExecutionService = toolExecutionService;
|
|
35
|
-
}
|
|
36
|
-
async apply(props, workflow, context, workflowContext) {
|
|
37
|
-
const validOptions = this.schema.parse(props);
|
|
38
|
-
return this.toolExecutionService.applyTool({
|
|
39
|
-
call: validOptions.tool,
|
|
40
|
-
}, workflow, context, {
|
|
41
|
-
...workflowContext,
|
|
42
|
-
options: {
|
|
43
|
-
...workflowContext.options,
|
|
44
|
-
...validOptions.options,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.ToolCallService = ToolCallService;
|
|
50
|
-
exports.ToolCallService = ToolCallService = ToolCallService_1 = __decorate([
|
|
51
|
-
(0, common_1.Injectable)(),
|
|
52
|
-
(0, shared_1.Tool)(),
|
|
53
|
-
__metadata("design:paramtypes", [index_1.ToolExecutionService])
|
|
54
|
-
], ToolCallService);
|
|
55
|
-
//# sourceMappingURL=tool-call.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tools/tool-call.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAO2B;AAC3B,oCAAgD;AAIzC,IAAM,eAAe,uBAArB,MAAM,eAAe;IAgBN;IAfH,MAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;IAC3D,YAAY,GAAG,OAAC;SACb,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,MAAM,GAAG,OAAC;SACP,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,YAAoB,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAElE,KAAK,CAAC,KAAK,CACT,KAAkC,EAClC,QAAoC,EACpC,OAAyB,EACzB,eAAmC;QAEnC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC,oBAAoB,CAAC,SAAS,CACxC;YACE,IAAI,EAAE,YAAY,CAAC,IAAI;SACxB,EACD,QAAQ,EACR,OAAO,EACP;YACE,GAAG,eAAe;YAClB,OAAO,EAAE;gBACP,GAAG,eAAe,CAAC,OAAO;gBAC1B,GAAG,YAAY,CAAC,OAAO;aACxB;SACF,CACF,CAAC;IACJ,CAAC;CACF,CAAA;AAzCY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,mBAAU,GAAE;IACZ,IAAA,aAAI,GAAE;qCAiBqC,4BAAoB;GAhBnD,eAAe,CAyC3B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ToolInterface, ToolResult } from '@loopstack/shared';
|
|
3
|
-
export declare class TransitionSelectorService implements ToolInterface {
|
|
4
|
-
private readonly logger;
|
|
5
|
-
configSchema: z.ZodObject<{
|
|
6
|
-
transitions: z.ZodArray<z.ZodObject<{
|
|
7
|
-
place: z.ZodString;
|
|
8
|
-
condition: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
place: string;
|
|
11
|
-
condition?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
place: string;
|
|
14
|
-
condition?: string | undefined;
|
|
15
|
-
}>, "many">;
|
|
16
|
-
}, "strict", z.ZodTypeAny, {
|
|
17
|
-
transitions: {
|
|
18
|
-
place: string;
|
|
19
|
-
condition?: string | undefined;
|
|
20
|
-
}[];
|
|
21
|
-
}, {
|
|
22
|
-
transitions: {
|
|
23
|
-
place: string;
|
|
24
|
-
condition?: string | undefined;
|
|
25
|
-
}[];
|
|
26
|
-
}>;
|
|
27
|
-
schema: z.ZodObject<{
|
|
28
|
-
transitions: z.ZodArray<z.ZodObject<{
|
|
29
|
-
place: z.ZodString;
|
|
30
|
-
condition: z.ZodUnion<[z.ZodBoolean, z.ZodUndefined]>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
place: string;
|
|
33
|
-
condition?: boolean | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
place: string;
|
|
36
|
-
condition?: boolean | undefined;
|
|
37
|
-
}>, "many">;
|
|
38
|
-
}, "strict", z.ZodTypeAny, {
|
|
39
|
-
transitions: {
|
|
40
|
-
place: string;
|
|
41
|
-
condition?: boolean | undefined;
|
|
42
|
-
}[];
|
|
43
|
-
}, {
|
|
44
|
-
transitions: {
|
|
45
|
-
place: string;
|
|
46
|
-
condition?: boolean | undefined;
|
|
47
|
-
}[];
|
|
48
|
-
}>;
|
|
49
|
-
apply(props: z.infer<typeof this.schema>): Promise<ToolResult>;
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transition-selector.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tools/transition-selector.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAiC;AACjC,8CAM2B;AAIpB,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IACnB,MAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;IAErE,YAAY,GAAG,OAAC;SACb,MAAM,CAAC;QACN,WAAW,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;YACP,KAAK,EAAE,4BAAmB;YAC1B,SAAS,EAAE,yBAAgB,CAAC,QAAQ,EAAE;SACvC,CAAC,CACH;KACF,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,MAAM,GAAG,OAAC;SACP,MAAM,CAAC;QACN,WAAW,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;YACP,KAAK,EAAE,4BAAmB;YAC1B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,EAAE,EAAE,OAAC,CAAC,SAAS,EAAE,CAAC,CAAC;SACjD,CAAC,CACH;KACF,CAAC;SACD,MAAM,EAAE,CAAC;IAEZ,KAAK,CAAC,KAAK,CAAC,KAAkC;QAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE9C,IAAI,KAAyB,CAAC;QAC9B,KAAK,MAAM,MAAM,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;YAC9C,IAAI,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;gBACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;gBACrB,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO;YACL,KAAK;SACN,CAAC;IACJ,CAAC;CACF,CAAA;AAxCY,8DAAyB;oCAAzB,yBAAyB;IAFrC,IAAA,mBAAU,GAAE;IACZ,IAAA,aAAI,GAAE;GACM,yBAAyB,CAwCrC"}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { ToolInterface, ToolResult } from '@loopstack/shared';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { WorkflowEntity } from '@loopstack/shared';
|
|
4
|
-
import { DocumentService } from '../../persistence';
|
|
5
|
-
export declare class UpdateDocumentService implements ToolInterface {
|
|
6
|
-
private documentService;
|
|
7
|
-
private readonly logger;
|
|
8
|
-
configSchema: z.ZodObject<{
|
|
9
|
-
id: z.ZodString;
|
|
10
|
-
update: z.ZodOptional<z.ZodObject<{
|
|
11
|
-
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
12
|
-
content: z.ZodOptional<z.ZodAny>;
|
|
13
|
-
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
|
-
ui: z.ZodOptional<z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>>;
|
|
15
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>>;
|
|
16
|
-
meta: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
17
|
-
mimeType: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>, z.ZodString]>>;
|
|
18
|
-
invalidate: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
|
|
19
|
-
enableTransitions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
-
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21
|
-
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
22
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
23
|
-
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
invalidate?: string | boolean | undefined;
|
|
25
|
-
data?: any;
|
|
26
|
-
mimeType?: string | undefined;
|
|
27
|
-
enableTransitions?: string[] | undefined;
|
|
28
|
-
enableAtPlaces?: string[] | undefined;
|
|
29
|
-
hideAtPlaces?: string[] | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
invalidate?: string | boolean | undefined;
|
|
32
|
-
data?: any;
|
|
33
|
-
mimeType?: string | undefined;
|
|
34
|
-
enableTransitions?: string[] | undefined;
|
|
35
|
-
enableAtPlaces?: string[] | undefined;
|
|
36
|
-
hideAtPlaces?: string[] | undefined;
|
|
37
|
-
}>>>;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
name?: string | undefined;
|
|
40
|
-
meta?: {
|
|
41
|
-
invalidate?: string | boolean | undefined;
|
|
42
|
-
data?: any;
|
|
43
|
-
mimeType?: string | undefined;
|
|
44
|
-
enableTransitions?: string[] | undefined;
|
|
45
|
-
enableAtPlaces?: string[] | undefined;
|
|
46
|
-
hideAtPlaces?: string[] | undefined;
|
|
47
|
-
} | undefined;
|
|
48
|
-
content?: any;
|
|
49
|
-
schema?: any;
|
|
50
|
-
ui?: any;
|
|
51
|
-
tags?: string | string[] | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
name?: string | undefined;
|
|
54
|
-
meta?: {
|
|
55
|
-
invalidate?: string | boolean | undefined;
|
|
56
|
-
data?: any;
|
|
57
|
-
mimeType?: string | undefined;
|
|
58
|
-
enableTransitions?: string[] | undefined;
|
|
59
|
-
enableAtPlaces?: string[] | undefined;
|
|
60
|
-
hideAtPlaces?: string[] | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
content?: any;
|
|
63
|
-
schema?: any;
|
|
64
|
-
ui?: any;
|
|
65
|
-
tags?: string | string[] | undefined;
|
|
66
|
-
}>>;
|
|
67
|
-
}, "strict", z.ZodTypeAny, {
|
|
68
|
-
id: string;
|
|
69
|
-
update?: {
|
|
70
|
-
name?: string | undefined;
|
|
71
|
-
meta?: {
|
|
72
|
-
invalidate?: string | boolean | undefined;
|
|
73
|
-
data?: any;
|
|
74
|
-
mimeType?: string | undefined;
|
|
75
|
-
enableTransitions?: string[] | undefined;
|
|
76
|
-
enableAtPlaces?: string[] | undefined;
|
|
77
|
-
hideAtPlaces?: string[] | undefined;
|
|
78
|
-
} | undefined;
|
|
79
|
-
content?: any;
|
|
80
|
-
schema?: any;
|
|
81
|
-
ui?: any;
|
|
82
|
-
tags?: string | string[] | undefined;
|
|
83
|
-
} | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
id: string;
|
|
86
|
-
update?: {
|
|
87
|
-
name?: string | undefined;
|
|
88
|
-
meta?: {
|
|
89
|
-
invalidate?: string | boolean | undefined;
|
|
90
|
-
data?: any;
|
|
91
|
-
mimeType?: string | undefined;
|
|
92
|
-
enableTransitions?: string[] | undefined;
|
|
93
|
-
enableAtPlaces?: string[] | undefined;
|
|
94
|
-
hideAtPlaces?: string[] | undefined;
|
|
95
|
-
} | undefined;
|
|
96
|
-
content?: any;
|
|
97
|
-
schema?: any;
|
|
98
|
-
ui?: any;
|
|
99
|
-
tags?: string | string[] | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
}>;
|
|
102
|
-
schema: z.ZodObject<{
|
|
103
|
-
id: z.ZodString;
|
|
104
|
-
update: z.ZodOptional<z.ZodObject<{
|
|
105
|
-
name: z.ZodOptional<z.ZodString>;
|
|
106
|
-
content: z.ZodOptional<z.ZodAny>;
|
|
107
|
-
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
108
|
-
ui: z.ZodOptional<z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>>;
|
|
109
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
110
|
-
meta: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
111
|
-
mimeType: z.ZodOptional<z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>>;
|
|
112
|
-
invalidate: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
enableTransitions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
114
|
-
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
-
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
116
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
117
|
-
}, "strip", z.ZodTypeAny, {
|
|
118
|
-
invalidate?: boolean | undefined;
|
|
119
|
-
data?: any;
|
|
120
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
121
|
-
enableTransitions?: string[] | undefined;
|
|
122
|
-
enableAtPlaces?: string[] | undefined;
|
|
123
|
-
hideAtPlaces?: string[] | undefined;
|
|
124
|
-
}, {
|
|
125
|
-
invalidate?: boolean | undefined;
|
|
126
|
-
data?: any;
|
|
127
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
128
|
-
enableTransitions?: string[] | undefined;
|
|
129
|
-
enableAtPlaces?: string[] | undefined;
|
|
130
|
-
hideAtPlaces?: string[] | undefined;
|
|
131
|
-
}>>>;
|
|
132
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
schema?: any;
|
|
134
|
-
name?: string | undefined;
|
|
135
|
-
content?: any;
|
|
136
|
-
ui?: any;
|
|
137
|
-
tags?: string[] | undefined;
|
|
138
|
-
meta?: {
|
|
139
|
-
invalidate?: boolean | undefined;
|
|
140
|
-
data?: any;
|
|
141
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
142
|
-
enableTransitions?: string[] | undefined;
|
|
143
|
-
enableAtPlaces?: string[] | undefined;
|
|
144
|
-
hideAtPlaces?: string[] | undefined;
|
|
145
|
-
} | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
schema?: any;
|
|
148
|
-
name?: string | undefined;
|
|
149
|
-
content?: any;
|
|
150
|
-
ui?: any;
|
|
151
|
-
tags?: string[] | undefined;
|
|
152
|
-
meta?: {
|
|
153
|
-
invalidate?: boolean | undefined;
|
|
154
|
-
data?: any;
|
|
155
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
156
|
-
enableTransitions?: string[] | undefined;
|
|
157
|
-
enableAtPlaces?: string[] | undefined;
|
|
158
|
-
hideAtPlaces?: string[] | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
}>>;
|
|
161
|
-
}, "strict", z.ZodTypeAny, {
|
|
162
|
-
id: string;
|
|
163
|
-
update?: {
|
|
164
|
-
schema?: any;
|
|
165
|
-
name?: string | undefined;
|
|
166
|
-
content?: any;
|
|
167
|
-
ui?: any;
|
|
168
|
-
tags?: string[] | undefined;
|
|
169
|
-
meta?: {
|
|
170
|
-
invalidate?: boolean | undefined;
|
|
171
|
-
data?: any;
|
|
172
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
173
|
-
enableTransitions?: string[] | undefined;
|
|
174
|
-
enableAtPlaces?: string[] | undefined;
|
|
175
|
-
hideAtPlaces?: string[] | undefined;
|
|
176
|
-
} | undefined;
|
|
177
|
-
} | undefined;
|
|
178
|
-
}, {
|
|
179
|
-
id: string;
|
|
180
|
-
update?: {
|
|
181
|
-
schema?: any;
|
|
182
|
-
name?: string | undefined;
|
|
183
|
-
content?: any;
|
|
184
|
-
ui?: any;
|
|
185
|
-
tags?: string[] | undefined;
|
|
186
|
-
meta?: {
|
|
187
|
-
invalidate?: boolean | undefined;
|
|
188
|
-
data?: any;
|
|
189
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
190
|
-
enableTransitions?: string[] | undefined;
|
|
191
|
-
enableAtPlaces?: string[] | undefined;
|
|
192
|
-
hideAtPlaces?: string[] | undefined;
|
|
193
|
-
} | undefined;
|
|
194
|
-
} | undefined;
|
|
195
|
-
}>;
|
|
196
|
-
constructor(documentService: DocumentService);
|
|
197
|
-
apply(props: z.infer<typeof this.schema>, workflow: WorkflowEntity | undefined): Promise<ToolResult>;
|
|
198
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tools/update-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAO2B;AAC3B,6BAAwB;AAExB,mDAAoD;AACpD,mCAA+B;AAC/B,kGAAyF;AAIlF,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAiBZ;IAhBH,MAAM,GAAG,IAAI,eAAM,CAAC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