@xyne/workflow-sdk 3.2.55 → 3.2.56
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/agents/agent-step.d.ts +30 -15
- package/dist/agents/agent-step.d.ts.map +1 -1
- package/dist/agents/agent-step.js +15 -5
- package/dist/agents/agent-step.js.map +1 -1
- package/dist/agents/citation-resolve.js +1 -1
- package/dist/agents/citation-resolve.js.map +1 -1
- package/dist/agents/contract.d.ts +16 -8
- package/dist/agents/contract.d.ts.map +1 -1
- package/dist/agents/host-agent-step.d.ts +20 -10
- package/dist/agents/host-agent-step.d.ts.map +1 -1
- package/dist/agents/host-agent-step.js +4 -3
- package/dist/agents/host-agent-step.js.map +1 -1
- package/dist/agents/provider.d.ts +2 -2
- package/dist/agents/tool-types.d.ts +13 -2
- package/dist/agents/tool-types.d.ts.map +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/client/workflow-client.js.map +1 -1
- package/dist/common/attachment.d.ts +15 -7
- package/dist/common/attachment.d.ts.map +1 -1
- package/dist/common/attachment.js +14 -7
- package/dist/common/attachment.js.map +1 -1
- package/dist/common/multipart-values.d.ts +21 -0
- package/dist/common/multipart-values.d.ts.map +1 -0
- package/dist/common/multipart-values.js +63 -0
- package/dist/common/multipart-values.js.map +1 -0
- package/dist/completion/attach.d.ts +4 -16
- package/dist/completion/attach.d.ts.map +1 -1
- package/dist/completion/attach.js +7 -62
- package/dist/completion/attach.js.map +1 -1
- package/dist/completion/index.d.ts +1 -1
- package/dist/completion/index.d.ts.map +1 -1
- package/dist/completion/index.js +1 -1
- package/dist/completion/index.js.map +1 -1
- package/dist/completion/types.d.ts +10 -8
- package/dist/completion/types.d.ts.map +1 -1
- package/dist/completion/types.js.map +1 -1
- package/dist/connectors/builtin/steps/code.step.d.ts +20 -10
- package/dist/connectors/builtin/steps/code.step.d.ts.map +1 -1
- package/dist/connectors/builtin/steps/code.step.js +14 -7
- package/dist/connectors/builtin/steps/code.step.js.map +1 -1
- package/dist/connectors/builtin/steps/http-request.step.d.ts +100 -50
- package/dist/connectors/builtin/steps/http-request.step.d.ts.map +1 -1
- package/dist/connectors/builtin/steps/http-request.step.js +14 -15
- package/dist/connectors/builtin/steps/http-request.step.js.map +1 -1
- package/dist/connectors/builtin/steps/multipart-body.d.ts +23 -0
- package/dist/connectors/builtin/steps/multipart-body.d.ts.map +1 -0
- package/dist/connectors/builtin/steps/multipart-body.js +40 -0
- package/dist/connectors/builtin/steps/multipart-body.js.map +1 -0
- package/dist/engine/workflow-executor.d.ts.map +1 -1
- package/dist/engine/workflow-executor.js +5 -1
- package/dist/engine/workflow-executor.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/router/approval-context.d.ts +1 -1
- package/dist/router/approval-context.d.ts.map +1 -1
- package/dist/router/approval-context.js +3 -3
- package/dist/router/approval-context.js.map +1 -1
- package/dist/router/types.d.ts +18 -7
- package/dist/router/types.d.ts.map +1 -1
- package/dist/router/workflow-router.d.ts.map +1 -1
- package/dist/router/workflow-router.js +109 -110
- package/dist/router/workflow-router.js.map +1 -1
- package/dist/runtime/workflow-runtime.d.ts +18 -0
- package/dist/runtime/workflow-runtime.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.js +49 -14
- package/dist/runtime/workflow-runtime.js.map +1 -1
- package/dist/steps/base-step.d.ts +9 -6
- package/dist/steps/base-step.d.ts.map +1 -1
- package/dist/steps/base-step.js.map +1 -1
- package/dist/storage/files.d.ts +39 -0
- package/dist/storage/files.d.ts.map +1 -0
- package/dist/storage/files.js +75 -0
- package/dist/storage/files.js.map +1 -0
- package/dist/storage/in-memory-adapter.d.ts +15 -8
- package/dist/storage/in-memory-adapter.d.ts.map +1 -1
- package/dist/storage/in-memory-adapter.js +36 -18
- package/dist/storage/in-memory-adapter.js.map +1 -1
- package/dist/storage/types.d.ts +36 -26
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/types.js +5 -6
- package/dist/storage/types.js.map +1 -1
- package/dist/testing/mock-step-context.d.ts +7 -2
- package/dist/testing/mock-step-context.d.ts.map +1 -1
- package/dist/testing/mock-step-context.js +2 -1
- package/dist/testing/mock-step-context.js.map +1 -1
- package/dist/types/workflow-variable.d.ts +20 -10
- package/dist/types/workflow-variable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* In-memory StorageAdapter for tests and local development.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Blobs in a Map behind a `mem://<id>` handle. Deliberately not a shortcut
|
|
5
|
+
* around the streaming contract — `put` drains the stream and `stream` hands
|
|
6
|
+
* one back — so a test exercises the paths a real adapter does.
|
|
7
7
|
*/
|
|
8
|
+
import { Readable } from 'node:stream';
|
|
8
9
|
export class InMemoryStorageAdapter {
|
|
9
10
|
/** Exposed for test inspection — count, clear, etc. */
|
|
10
11
|
blobs = new Map();
|
|
11
12
|
nextId = 1;
|
|
12
|
-
|
|
13
|
+
genHandle() {
|
|
13
14
|
return `mem://${String(this.nextId++)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
14
15
|
}
|
|
15
|
-
async
|
|
16
|
-
const
|
|
16
|
+
async put(_scope, file) {
|
|
17
|
+
const chunks = [];
|
|
18
|
+
for await (const chunk of file.stream) {
|
|
19
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
20
|
+
}
|
|
21
|
+
const bytes = new Uint8Array(Buffer.concat(chunks));
|
|
22
|
+
const handle = this.genHandle();
|
|
17
23
|
const attachment = {
|
|
18
24
|
name: file.name,
|
|
19
25
|
mimeType: file.mimeType,
|
|
20
|
-
|
|
21
|
-
size:
|
|
26
|
+
handle,
|
|
27
|
+
size: bytes.byteLength,
|
|
22
28
|
};
|
|
23
|
-
this.blobs.set(
|
|
29
|
+
this.blobs.set(handle, { bytes, attachment });
|
|
24
30
|
return attachment;
|
|
25
31
|
}
|
|
26
|
-
async
|
|
27
|
-
const stored = this.blobs.get(ref.
|
|
32
|
+
async stream(ref) {
|
|
33
|
+
const stored = this.blobs.get(ref.handle);
|
|
28
34
|
if (!stored) {
|
|
29
|
-
throw new Error(`InMemoryStorageAdapter: unknown reference "${ref.
|
|
35
|
+
throw new Error(`InMemoryStorageAdapter: unknown reference "${ref.handle}"`);
|
|
30
36
|
}
|
|
31
|
-
return stored.bytes;
|
|
37
|
+
return Readable.from(Buffer.from(stored.bytes));
|
|
32
38
|
}
|
|
33
|
-
async
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
async info(ref) {
|
|
40
|
+
const stored = this.blobs.get(ref.handle);
|
|
41
|
+
if (!stored)
|
|
42
|
+
return null;
|
|
43
|
+
return { size: stored.bytes.byteLength, mimeType: stored.attachment.mimeType };
|
|
36
44
|
}
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
/**
|
|
46
|
+
* The scope each delete was given. A fake that ignores it passes tests a real
|
|
47
|
+
* adapter fails, which happened once — so tests can assert it arrived.
|
|
48
|
+
*/
|
|
49
|
+
deleteScopes = [];
|
|
50
|
+
async delete(ref, scope) {
|
|
51
|
+
this.deleteScopes.push(scope);
|
|
52
|
+
this.blobs.delete(ref.handle);
|
|
53
|
+
}
|
|
54
|
+
async signUrl(ref, _ttlSeconds) {
|
|
55
|
+
// For tests / dev — the opaque handle doubles as the URL.
|
|
56
|
+
return ref.handle;
|
|
39
57
|
}
|
|
40
58
|
}
|
|
41
59
|
//# sourceMappingURL=in-memory-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-adapter.js","sourceRoot":"","sources":["../../src/storage/in-memory-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"in-memory-adapter.js","sourceRoot":"","sources":["../../src/storage/in-memory-adapter.ts"],"names":[],"mappings":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GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,8CAA8C,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAe;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACjF,CAAC;IAED;;;OAGG;IACM,YAAY,GAAoC,EAAE,CAAC;IAE5D,KAAK,CAAC,MAAM,CAAC,GAAe,EAAE,KAAoB;QAChD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAe,EAAE,WAAmB;QAChD,0DAA0D;QAC1D,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;CACF"}
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StorageAdapter — host plug-in for blob storage.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* the host's reference and the host's adapter must understand it.
|
|
4
|
+
* Every verb takes or returns a stream, never a buffer: a file's size must not
|
|
5
|
+
* decide how much memory the process uses. A step that genuinely needs bytes
|
|
6
|
+
* goes through `ctx.files.buffer()`, which is bounded.
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The framework never opens an attachment's `handle` — only the host's adapter
|
|
9
|
+
* knows what it addresses.
|
|
11
10
|
*/
|
|
11
|
+
import type { Readable } from 'node:stream';
|
|
12
12
|
import type { Attachment } from '../common/attachment.js';
|
|
13
13
|
import type { ResourceAttributes, ResolvedAuthContext } from '../authz/attributes.js';
|
|
14
14
|
/**
|
|
@@ -34,38 +34,48 @@ import type { ResourceAttributes, ResolvedAuthContext } from '../authz/attribute
|
|
|
34
34
|
* looks inside either — it only routes the value to the adapter.
|
|
35
35
|
*/
|
|
36
36
|
export type StorageScope = ResourceAttributes<'workflow'> | ResolvedAuthContext;
|
|
37
|
+
/** A file on its way in. */
|
|
37
38
|
export interface StorageFile {
|
|
38
|
-
/** Original filename — e.g. "contract.pdf". */
|
|
39
39
|
name: string;
|
|
40
|
-
/** MIME type from the multipart part headers. */
|
|
41
40
|
mimeType: string;
|
|
42
|
-
/**
|
|
43
|
-
|
|
41
|
+
/** Unread — the adapter pipes it straight to its store. */
|
|
42
|
+
stream: Readable;
|
|
43
|
+
}
|
|
44
|
+
/** What an object turns out to be, without fetching it. */
|
|
45
|
+
export interface StorageInfo {
|
|
46
|
+
size: number;
|
|
47
|
+
mimeType: string;
|
|
44
48
|
}
|
|
45
49
|
export interface StorageAdapter {
|
|
46
50
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* opening `data`.
|
|
51
|
+
* Consume `file.stream` and return the reference the workflow will carry.
|
|
52
|
+
* `scope` is what the adapter routes on — a security boundary, not a hint.
|
|
50
53
|
*/
|
|
51
|
-
|
|
54
|
+
put(scope: StorageScope, file: StorageFile): Promise<Attachment>;
|
|
52
55
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* step loading an image to send to the LLM).
|
|
56
|
+
* The bytes again, to pipe. `ref` is frequently client-supplied, so `scope`
|
|
57
|
+
* is required: an adapter must refuse a reference owned by another tenant.
|
|
56
58
|
*/
|
|
57
|
-
|
|
59
|
+
stream(ref: Attachment, scope: StorageScope): Promise<Readable>;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* to display the attachment inline.
|
|
61
|
+
* Size and type without transferring anything, or null if it is gone. Lets a
|
|
62
|
+
* size limit refuse before a byte moves rather than after.
|
|
62
63
|
*/
|
|
63
|
-
|
|
64
|
+
info(ref: Attachment, scope: StorageScope): Promise<StorageInfo | null>;
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* Remove the object. Called when bytes already accepted turn out to be
|
|
67
|
+
* unusable — a duplicate, a stale attempt, a body the contract rejects.
|
|
68
|
+
*
|
|
69
|
+
* `scope` is optional because some callers reclaim a write with no caller to
|
|
70
|
+
* name; an adapter must accept that and fall back to the handle. Best-effort:
|
|
71
|
+
* a failure here must not turn a clean rejection into a server error.
|
|
68
72
|
*/
|
|
69
|
-
delete
|
|
73
|
+
delete(ref: Attachment, scope?: StorageScope): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Optional: short-lived presigned URL. When present the download route
|
|
76
|
+
* redirects and no bytes pass through the host; when absent it pipes
|
|
77
|
+
* {@link stream} instead.
|
|
78
|
+
*/
|
|
79
|
+
signUrl?(ref: Attachment, ttlSeconds: number): Promise<string>;
|
|
70
80
|
}
|
|
71
81
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAA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
|
|
6
|
-
*
|
|
7
|
-
* the host's reference and the host's adapter must understand it.
|
|
4
|
+
* Every verb takes or returns a stream, never a buffer: a file's size must not
|
|
5
|
+
* decide how much memory the process uses. A step that genuinely needs bytes
|
|
6
|
+
* goes through `ctx.files.buffer()`, which is bounded.
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The framework never opens an attachment's `handle` — only the host's adapter
|
|
9
|
+
* knows what it addresses.
|
|
11
10
|
*/
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StorageAdapter } from '../storage/types.js';
|
|
1
2
|
import type { StepExecutionContext, ControlFlowExecutionContext } from '../steps/base-step.js';
|
|
2
3
|
import { ServiceRegistry } from '../engine/service-registry.js';
|
|
3
4
|
import type { WorkflowContext } from '../types/context.js';
|
|
@@ -20,8 +21,12 @@ interface MockStepContextOptions<TServices extends Record<string, unknown> = Rec
|
|
|
20
21
|
priorState?: Readonly<Record<string, unknown>>;
|
|
21
22
|
/** This step's config before variable resolution — `{{refs}}` intact. */
|
|
22
23
|
rawConfig?: Record<string, unknown>;
|
|
23
|
-
/**
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Inject a storage adapter. The mock wraps it the way the executor does, so
|
|
26
|
+
* a test exercises `ctx.files` rather than a hand-built stand-in; omit it and
|
|
27
|
+
* `ctx.files.available` is false.
|
|
28
|
+
*/
|
|
29
|
+
storage?: StorageAdapter;
|
|
25
30
|
/** Inject a sandbox adapter (code execution). */
|
|
26
31
|
sandbox?: StepExecutionContext['sandbox'];
|
|
27
32
|
/** Inject credentials already resolved by the executor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-step-context.d.ts","sourceRoot":"","sources":["../../src/testing/mock-step-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock-step-context.d.ts","sourceRoot":"","sources":["../../src/testing/mock-step-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAGlC,UAAU,sBAAsB,CAC9B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnE,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,iCAAiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC;IACnD,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACtC,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC;IACzD,+BAA+B;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,8BAA8B;IAC9B,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C,mEAAm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E,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACrE,kBAAkB,CAOpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createFileAccess } from '../storage/files.js';
|
|
1
2
|
import { createPauseFunction } from '../steps/base-step.js';
|
|
2
3
|
import { ServiceRegistry } from '../engine/service-registry.js';
|
|
3
4
|
import { createMockContext } from './mock-context.js';
|
|
@@ -25,7 +26,7 @@ export function createMockStepContext(options) {
|
|
|
25
26
|
},
|
|
26
27
|
...(options?.priorState ? { priorState: options.priorState } : {}),
|
|
27
28
|
...(options?.rawConfig ? { rawConfig: options.rawConfig } : {}),
|
|
28
|
-
|
|
29
|
+
files: createFileAccess(options?.storage, {}),
|
|
29
30
|
...(options?.sandbox ? { sandbox: options.sandbox } : {}),
|
|
30
31
|
credentials: options?.credentials ?? {},
|
|
31
32
|
services: options?.services ??
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-step-context.js","sourceRoot":"","sources":["../../src/testing/mock-step-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock-step-context.js","sourceRoot":"","sources":["../../src/testing/mock-step-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAOtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAiClE;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAGnC,OAA2C;IAE3C,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACtB,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,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H,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,IAAI,IAAI;YAChC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,IAAI,IAAI;YAChC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,IAAI;SACnC;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAG1C,OAGC;IAKD,MAAM,KAAK,GAAyF,EAAE,CAAC;IACvG,MAAM,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAE/C,OAAO;QACL,GAAG,OAAO;QACV,UAAU,EACR,OAAO,EAAE,UAAU;YACnB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;gBACnC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;YAC5C,CAAC,CAAC;QACJ,eAAe,EAAE,KAAK;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAA4B,EAC5B,MAA0B,EAC1B,IAAsE;IAEtE,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,QAAQ,EAAE;QACtC,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,WAAW,QAAQ,CAAC,WAAW,EAAE,EAAE;QAC/D,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,QAAQ;QAChC,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -94,25 +94,29 @@ export declare const WorkflowVariableSchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
94
94
|
value: z.ZodObject<{
|
|
95
95
|
name: z.ZodString;
|
|
96
96
|
mimeType: z.ZodString;
|
|
97
|
-
|
|
97
|
+
handle: z.ZodString;
|
|
98
98
|
size: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
99
100
|
}, "strip", z.ZodTypeAny, {
|
|
100
101
|
name: string;
|
|
101
102
|
mimeType: string;
|
|
102
|
-
|
|
103
|
+
handle: string;
|
|
103
104
|
size?: number | undefined;
|
|
105
|
+
hash?: string | undefined;
|
|
104
106
|
}, {
|
|
105
107
|
name: string;
|
|
106
108
|
mimeType: string;
|
|
107
|
-
|
|
109
|
+
handle: string;
|
|
108
110
|
size?: number | undefined;
|
|
111
|
+
hash?: string | undefined;
|
|
109
112
|
}>;
|
|
110
113
|
}, "strip", z.ZodTypeAny, {
|
|
111
114
|
value: {
|
|
112
115
|
name: string;
|
|
113
116
|
mimeType: string;
|
|
114
|
-
|
|
117
|
+
handle: string;
|
|
115
118
|
size?: number | undefined;
|
|
119
|
+
hash?: string | undefined;
|
|
116
120
|
};
|
|
117
121
|
type: "document";
|
|
118
122
|
key: string;
|
|
@@ -121,8 +125,9 @@ export declare const WorkflowVariableSchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
121
125
|
value: {
|
|
122
126
|
name: string;
|
|
123
127
|
mimeType: string;
|
|
124
|
-
|
|
128
|
+
handle: string;
|
|
125
129
|
size?: number | undefined;
|
|
130
|
+
hash?: string | undefined;
|
|
126
131
|
};
|
|
127
132
|
type: "document";
|
|
128
133
|
key: string;
|
|
@@ -135,25 +140,29 @@ export declare const WorkflowVariableSchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
135
140
|
value: z.ZodArray<z.ZodObject<{
|
|
136
141
|
name: z.ZodString;
|
|
137
142
|
mimeType: z.ZodString;
|
|
138
|
-
|
|
143
|
+
handle: z.ZodString;
|
|
139
144
|
size: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
140
146
|
}, "strip", z.ZodTypeAny, {
|
|
141
147
|
name: string;
|
|
142
148
|
mimeType: string;
|
|
143
|
-
|
|
149
|
+
handle: string;
|
|
144
150
|
size?: number | undefined;
|
|
151
|
+
hash?: string | undefined;
|
|
145
152
|
}, {
|
|
146
153
|
name: string;
|
|
147
154
|
mimeType: string;
|
|
148
|
-
|
|
155
|
+
handle: string;
|
|
149
156
|
size?: number | undefined;
|
|
157
|
+
hash?: string | undefined;
|
|
150
158
|
}>, "many">;
|
|
151
159
|
}, "strip", z.ZodTypeAny, {
|
|
152
160
|
value: {
|
|
153
161
|
name: string;
|
|
154
162
|
mimeType: string;
|
|
155
|
-
|
|
163
|
+
handle: string;
|
|
156
164
|
size?: number | undefined;
|
|
165
|
+
hash?: string | undefined;
|
|
157
166
|
}[];
|
|
158
167
|
type: "documents";
|
|
159
168
|
key: string;
|
|
@@ -162,8 +171,9 @@ export declare const WorkflowVariableSchema: z.ZodDiscriminatedUnion<"type", [z.
|
|
|
162
171
|
value: {
|
|
163
172
|
name: string;
|
|
164
173
|
mimeType: string;
|
|
165
|
-
|
|
174
|
+
handle: string;
|
|
166
175
|
size?: number | undefined;
|
|
176
|
+
hash?: string | undefined;
|
|
167
177
|
}[];
|
|
168
178
|
type: "documents";
|
|
169
179
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-variable.d.ts","sourceRoot":"","sources":["../../src/types/workflow-variable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yDAAyD;AACzD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAajC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAK3B,CAAC;AASJ;;;GAGG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"workflow-variable.d.ts","sourceRoot":"","sources":["../../src/types/workflow-variable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yDAAyD;AACzD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAajC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAK3B,CAAC;AASJ;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,6EAA6E;AAC7E,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,GACjD,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAO/B;AAoBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,GACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4BzB"}
|
package/package.json
CHANGED