@xyne/workflow-sdk 3.2.31 → 3.2.33
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 +12 -0
- package/dist/agents/agent-step.d.ts.map +1 -1
- package/dist/agents/agent-step.js +58 -4
- package/dist/agents/agent-step.js.map +1 -1
- package/dist/agents/base-runtime.d.ts +7 -6
- package/dist/agents/base-runtime.d.ts.map +1 -1
- package/dist/agents/base-runtime.js.map +1 -1
- package/dist/agents/index.d.ts +3 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/pi-session-runtime.d.ts +90 -0
- package/dist/agents/pi-session-runtime.d.ts.map +1 -0
- package/dist/agents/pi-session-runtime.js +231 -0
- package/dist/agents/pi-session-runtime.js.map +1 -0
- package/dist/agents/types.d.ts +1 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/types.d.ts +35 -17
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workflow-client.d.ts.map +1 -1
- package/dist/client/workflow-client.js +24 -13
- package/dist/client/workflow-client.js.map +1 -1
- package/dist/common/credentials.d.ts +258 -0
- package/dist/common/credentials.d.ts.map +1 -0
- package/dist/common/credentials.js +176 -0
- package/dist/common/credentials.js.map +1 -0
- package/dist/common/index.d.ts +7 -1
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +19 -1
- package/dist/common/index.js.map +1 -1
- package/dist/engine/workflow-executor.d.ts.map +1 -1
- package/dist/engine/workflow-executor.js +24 -9
- package/dist/engine/workflow-executor.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/persistence/in-memory-adapter.d.ts +93 -29
- package/dist/persistence/in-memory-adapter.d.ts.map +1 -1
- package/dist/persistence/in-memory-adapter.js +171 -52
- package/dist/persistence/in-memory-adapter.js.map +1 -1
- package/dist/persistence/types.d.ts +84 -26
- package/dist/persistence/types.d.ts.map +1 -1
- package/dist/router/workflow-router.d.ts +3 -1
- package/dist/router/workflow-router.d.ts.map +1 -1
- package/dist/router/workflow-router.js +218 -40
- package/dist/router/workflow-router.js.map +1 -1
- package/dist/runtime/workflow-runtime.d.ts +22 -30
- package/dist/runtime/workflow-runtime.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.js +46 -54
- package/dist/runtime/workflow-runtime.js.map +1 -1
- package/dist/steps/base-step.d.ts +12 -26
- package/dist/steps/base-step.d.ts.map +1 -1
- package/dist/steps/base-step.js +2 -4
- package/dist/steps/base-step.js.map +1 -1
- package/dist/steps/builtin/code.step.d.ts +7 -3
- package/dist/steps/builtin/code.step.d.ts.map +1 -1
- package/dist/steps/builtin/code.step.js +77 -47
- package/dist/steps/builtin/code.step.js.map +1 -1
- package/dist/steps/builtin/http-request.step.d.ts +18 -264
- package/dist/steps/builtin/http-request.step.d.ts.map +1 -1
- package/dist/steps/builtin/http-request.step.js +48 -157
- package/dist/steps/builtin/http-request.step.js.map +1 -1
- package/dist/steps/builtin/ssrf-guard.d.ts +9 -0
- package/dist/steps/builtin/ssrf-guard.d.ts.map +1 -0
- package/dist/steps/builtin/ssrf-guard.js +115 -0
- package/dist/steps/builtin/ssrf-guard.js.map +1 -0
- package/dist/steps/builtin/switch.step.d.ts +14 -14
- package/dist/steps/builtin/wait.step.d.ts +56 -56
- package/dist/steps/step-registry.d.ts +1 -3
- package/dist/steps/step-registry.d.ts.map +1 -1
- package/dist/steps/step-registry.js +0 -1
- package/dist/steps/step-registry.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.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 +9 -1
- package/dist/testing/mock-step-context.js.map +1 -1
- package/dist/triggers/webhook-trigger.d.ts +1 -5
- package/dist/triggers/webhook-trigger.d.ts.map +1 -1
- package/dist/triggers/webhook-trigger.js.map +1 -1
- package/package.json +7 -2
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CODE step — sandboxed JavaScript execution.
|
|
3
3
|
*
|
|
4
|
-
* Runs user-provided JS
|
|
4
|
+
* Runs user-provided JS in the host-configured code-execution sandbox — the same
|
|
5
|
+
* isolated E2B / Docker backend the `run_code` agent tool uses — NOT in the
|
|
6
|
+
* workflow process. `node:vm` is not a security boundary (a constructor-chain
|
|
7
|
+
* escape reaches the host runtime and thus OS-level access), so this step
|
|
8
|
+
* requires a real sandbox and FAILS CLOSED when none is configured rather than
|
|
9
|
+
* falling back to in-process evaluation.
|
|
10
|
+
*
|
|
5
11
|
* The code receives:
|
|
6
12
|
* - `$input` — the previous step's output (or {} if first step)
|
|
7
13
|
* - `$context` — read-only snapshot of the workflow context
|
|
8
14
|
*
|
|
9
15
|
* Must return a JSON-serializable value.
|
|
10
|
-
*
|
|
11
|
-
* Security: no access to require, process, fs, net, or any Node globals.
|
|
12
16
|
*/
|
|
13
17
|
import { z } from 'zod';
|
|
14
18
|
import { BaseActionStep } from '../base-step.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.step.d.ts","sourceRoot":"","sources":["../../../src/steps/builtin/code.step.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"code.step.d.ts","sourceRoot":"","sources":["../../../src/steps/builtin/code.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAS9D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC;CACjB;AA+CD,qBAAa,QAAS,SAAQ,cAAc,CAC1C,OAAO,oBAAoB,EAC3B,cAAc,CACf;IACC,SAAkB,IAAI,wBAAwB;IAC9C,SAAkB,IAAI,UAAU;IAChC,SAAkB,WAAW,uCAAuC;IACpE,SAAkB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAwB;IACtD,SAAkB,YAAY;;;;;;OAAwB;IACtD,SAAkB,QAAQ,EAAE,YAAY,CAAU;IAClD,SAAkB,IAAI,UAAU;IAEvB,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAWlF,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAiB3E,OAAO,CACpB,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,oBAAoB,GACxB,OAAO,CAAC,cAAc,CAAC;CA4D3B"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CODE step — sandboxed JavaScript execution.
|
|
3
3
|
*
|
|
4
|
-
* Runs user-provided JS
|
|
4
|
+
* Runs user-provided JS in the host-configured code-execution sandbox — the same
|
|
5
|
+
* isolated E2B / Docker backend the `run_code` agent tool uses — NOT in the
|
|
6
|
+
* workflow process. `node:vm` is not a security boundary (a constructor-chain
|
|
7
|
+
* escape reaches the host runtime and thus OS-level access), so this step
|
|
8
|
+
* requires a real sandbox and FAILS CLOSED when none is configured rather than
|
|
9
|
+
* falling back to in-process evaluation.
|
|
10
|
+
*
|
|
5
11
|
* The code receives:
|
|
6
12
|
* - `$input` — the previous step's output (or {} if first step)
|
|
7
13
|
* - `$context` — read-only snapshot of the workflow context
|
|
8
14
|
*
|
|
9
15
|
* Must return a JSON-serializable value.
|
|
10
|
-
*
|
|
11
|
-
* Security: no access to require, process, fs, net, or any Node globals.
|
|
12
16
|
*/
|
|
13
17
|
import { z } from 'zod';
|
|
14
|
-
import { runInNewContext } from 'node:vm';
|
|
15
18
|
import { BaseActionStep } from '../base-step.js';
|
|
19
|
+
import { bindSandboxSession } from '../../sandbox/types.js';
|
|
16
20
|
import { BuiltinStepType } from '../../types/known-types.js';
|
|
17
21
|
// ─── Config ───
|
|
18
22
|
const OutputFieldSchema = z.object({
|
|
@@ -27,6 +31,38 @@ export const CodeStepConfigSchema = z.object({
|
|
|
27
31
|
const CodeStepOutputSchema = z.object({
|
|
28
32
|
result: z.unknown(),
|
|
29
33
|
});
|
|
34
|
+
// Sentinel delimiting the JSON return value on stdout. The program appends it
|
|
35
|
+
// last, after any user console output, so `lastIndexOf` recovers the result
|
|
36
|
+
// even if the user logged text that resembles the marker.
|
|
37
|
+
const RESULT_MARKER = '__XYNE_CODE_RESULT__';
|
|
38
|
+
// Wrap the user code into a self-contained Node (CommonJS) program that injects
|
|
39
|
+
// $input/$context, runs the code, and prints the JSON result after the marker.
|
|
40
|
+
// $input/$context are embedded via JSON.parse of a JSON-encoded string so no
|
|
41
|
+
// input value can break out into code. User code is written to a file (never a
|
|
42
|
+
// shell argument), so it needs no escaping.
|
|
43
|
+
function buildProgram(code, $input, $context, timeoutMs) {
|
|
44
|
+
const inputLit = JSON.stringify(JSON.stringify($input));
|
|
45
|
+
const contextLit = JSON.stringify(JSON.stringify($context));
|
|
46
|
+
return [
|
|
47
|
+
`const $input = JSON.parse(${inputLit});`,
|
|
48
|
+
`const $context = JSON.parse(${contextLit});`,
|
|
49
|
+
`const __timer = setTimeout(() => { process.stderr.write("Code step timed out after ${timeoutMs}ms"); process.exit(1); }, ${timeoutMs});`,
|
|
50
|
+
`if (__timer.unref) __timer.unref();`,
|
|
51
|
+
`Promise.resolve().then(async () => {`,
|
|
52
|
+
code,
|
|
53
|
+
`}).then((r) => {`,
|
|
54
|
+
` clearTimeout(__timer);`,
|
|
55
|
+
` let out;`,
|
|
56
|
+
` try { out = JSON.stringify(r === undefined ? null : r); }`,
|
|
57
|
+
` catch (_e) { process.stderr.write("Return value is not JSON-serializable"); process.exit(1); return; }`,
|
|
58
|
+
` process.stdout.write("\\n${RESULT_MARKER}" + out);`,
|
|
59
|
+
`}, (e) => {`,
|
|
60
|
+
` clearTimeout(__timer);`,
|
|
61
|
+
` process.stderr.write(String(e && e.stack ? e.stack : e));`,
|
|
62
|
+
` process.exit(1);`,
|
|
63
|
+
`});`,
|
|
64
|
+
].join('\n');
|
|
65
|
+
}
|
|
30
66
|
// ─── Step ───
|
|
31
67
|
export class CodeStep extends BaseActionStep {
|
|
32
68
|
type = BuiltinStepType.CODE;
|
|
@@ -68,54 +104,48 @@ export class CodeStep extends BaseActionStep {
|
|
|
68
104
|
const lastStep = stepEntries[stepEntries.length - 1];
|
|
69
105
|
const $input = lastStep?.output ?? {};
|
|
70
106
|
// Build read-only context snapshot
|
|
71
|
-
const $context =
|
|
107
|
+
const $context = {
|
|
72
108
|
trigger: ctx.workflow.trigger,
|
|
73
|
-
steps: Object.
|
|
74
|
-
k,
|
|
75
|
-
Object.freeze({ ...v }),
|
|
76
|
-
]))),
|
|
77
|
-
});
|
|
78
|
-
// Minimal sandbox — no Node globals
|
|
79
|
-
const sandbox = {
|
|
80
|
-
$input,
|
|
81
|
-
$context,
|
|
82
|
-
// Safe globals
|
|
83
|
-
JSON,
|
|
84
|
-
Math,
|
|
85
|
-
Date,
|
|
86
|
-
Array,
|
|
87
|
-
Object,
|
|
88
|
-
String,
|
|
89
|
-
Number,
|
|
90
|
-
Boolean,
|
|
91
|
-
RegExp,
|
|
92
|
-
Map,
|
|
93
|
-
Set,
|
|
94
|
-
parseInt,
|
|
95
|
-
parseFloat,
|
|
96
|
-
isNaN,
|
|
97
|
-
isFinite,
|
|
98
|
-
// Console (mapped to ctx.log)
|
|
99
|
-
console: Object.freeze({
|
|
100
|
-
log: ctx.log.info,
|
|
101
|
-
warn: ctx.log.warn,
|
|
102
|
-
error: ctx.log.error,
|
|
103
|
-
}),
|
|
109
|
+
steps: Object.fromEntries(Object.entries(ctx.workflow.steps).map(([k, v]) => [k, { ...v }])),
|
|
104
110
|
};
|
|
111
|
+
// Fail closed: JS runs only inside the isolated sandbox, never in-process.
|
|
112
|
+
if (!ctx.sandbox) {
|
|
113
|
+
throw new Error('Code step execution failed: no code-execution sandbox is configured. '
|
|
114
|
+
+ 'The CODE step runs JavaScript in an isolated sandbox and does not fall '
|
|
115
|
+
+ 'back to in-process execution. Configure a sandbox backend (e.g. '
|
|
116
|
+
+ 'SANDBOX_BACKEND / E2B_API_KEY) to enable CODE steps.');
|
|
117
|
+
}
|
|
118
|
+
const program = buildProgram(config.code, $input, $context, config.timeoutMs);
|
|
119
|
+
const scriptPath = `/tmp/xyne-code-${ctx.runtime.executionId}-${ctx.runtime.stepId}.cjs`;
|
|
120
|
+
const scope = ctx.runtime.attributes;
|
|
121
|
+
const handle = await ctx.sandbox.create(scope ? { scope } : {});
|
|
105
122
|
try {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
const session = bindSandboxSession(ctx.sandbox, handle);
|
|
124
|
+
await session.writeFiles([
|
|
125
|
+
{ path: scriptPath, bytes: new TextEncoder().encode(program) },
|
|
126
|
+
]);
|
|
127
|
+
const res = await session.bash(`node ${scriptPath}`, {
|
|
128
|
+
timeoutMs: config.timeoutMs,
|
|
111
129
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
130
|
+
const markerAt = res.stdout.lastIndexOf(RESULT_MARKER);
|
|
131
|
+
if (markerAt === -1) {
|
|
132
|
+
const detail = res.stderr.trim() ||
|
|
133
|
+
res.stdout.trim() ||
|
|
134
|
+
`exited with code ${res.exitCode ?? 'unknown'}`;
|
|
135
|
+
throw new Error(`Code step execution failed: ${detail}`);
|
|
136
|
+
}
|
|
137
|
+
// Surface anything the user logged before the result to the step log.
|
|
138
|
+
const logged = res.stdout.slice(0, markerAt).trim();
|
|
139
|
+
if (logged)
|
|
140
|
+
ctx.log.info(logged);
|
|
141
|
+
const payload = res.stdout.slice(markerAt + RESULT_MARKER.length).trim();
|
|
142
|
+
const result = JSON.parse(payload);
|
|
143
|
+
return { result };
|
|
115
144
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
145
|
+
finally {
|
|
146
|
+
await ctx.sandbox.destroy(handle).catch(() => {
|
|
147
|
+
/* best-effort teardown */
|
|
148
|
+
});
|
|
119
149
|
}
|
|
120
150
|
}
|
|
121
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.step.js","sourceRoot":"","sources":["../../../src/steps/builtin/code.step.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"code.step.js","sourceRoot":"","sources":["../../../src/steps/builtin/code.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,iBAAiB;AAEjB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM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AAE,CAAC,CAAC;YAC3D,CAAC;YAED,sEAAsE;YACtE,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;YACpD,IAAI,MAAM;gBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEjC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;YACzE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAY,CAAC;YAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;QACpB,CAAC;gBAAS,CAAC;YACT,MAAM,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;gBAC3C,0BAA0B;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
*
|
|
20
20
|
* ## Auth
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* 2. **Credential slots** — for stored secrets from the credential vault.
|
|
28
|
-
* Resolved by the executor at runtime, injected via `ctx.credentials`.
|
|
29
|
-
* Config-level auth takes precedence when both are present.
|
|
22
|
+
* The optional `credentialName` selects a stored credential from the vault.
|
|
23
|
+
* Before this step runs, the executor resolves that selection and injects the
|
|
24
|
+
* validated value through `ctx.credentials`. The step
|
|
25
|
+
* receives the resolved value and applies it after user-provided headers, so
|
|
26
|
+
* managed authentication cannot be accidentally overridden.
|
|
30
27
|
*
|
|
31
28
|
* ## Response shape
|
|
32
29
|
*
|
|
@@ -43,65 +40,9 @@
|
|
|
43
40
|
*/
|
|
44
41
|
import { z } from 'zod';
|
|
45
42
|
import { BaseActionStep } from '../base-step.js';
|
|
46
|
-
import type { StepExecutionContext
|
|
43
|
+
import type { StepExecutionContext } from '../base-step.js';
|
|
47
44
|
import { BuiltinStepType } from '../../types/known-types.js';
|
|
48
45
|
import type { StepCategory } from '../../types/categories.js';
|
|
49
|
-
declare const HttpAuthSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
50
|
-
type: z.ZodLiteral<"none">;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
type: "none";
|
|
53
|
-
}, {
|
|
54
|
-
type: "none";
|
|
55
|
-
}>, z.ZodObject<{
|
|
56
|
-
type: z.ZodLiteral<"bearer">;
|
|
57
|
-
token: z.ZodString;
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
type: "bearer";
|
|
60
|
-
token: string;
|
|
61
|
-
}, {
|
|
62
|
-
type: "bearer";
|
|
63
|
-
token: string;
|
|
64
|
-
}>, z.ZodObject<{
|
|
65
|
-
type: z.ZodLiteral<"basic">;
|
|
66
|
-
username: z.ZodString;
|
|
67
|
-
password: z.ZodString;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
type: "basic";
|
|
70
|
-
password: string;
|
|
71
|
-
username: string;
|
|
72
|
-
}, {
|
|
73
|
-
type: "basic";
|
|
74
|
-
password: string;
|
|
75
|
-
username: string;
|
|
76
|
-
}>, z.ZodObject<{
|
|
77
|
-
type: z.ZodLiteral<"apiKey">;
|
|
78
|
-
key: z.ZodString;
|
|
79
|
-
name: z.ZodDefault<z.ZodString>;
|
|
80
|
-
in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
type: "apiKey";
|
|
83
|
-
name: string;
|
|
84
|
-
key: string;
|
|
85
|
-
in: "header" | "query";
|
|
86
|
-
}, {
|
|
87
|
-
type: "apiKey";
|
|
88
|
-
key: string;
|
|
89
|
-
name?: string | undefined;
|
|
90
|
-
in?: "header" | "query" | undefined;
|
|
91
|
-
}>, z.ZodObject<{
|
|
92
|
-
type: z.ZodLiteral<"customHeader">;
|
|
93
|
-
name: z.ZodString;
|
|
94
|
-
value: z.ZodString;
|
|
95
|
-
}, "strip", z.ZodTypeAny, {
|
|
96
|
-
value: string;
|
|
97
|
-
type: "customHeader";
|
|
98
|
-
name: string;
|
|
99
|
-
}, {
|
|
100
|
-
value: string;
|
|
101
|
-
type: "customHeader";
|
|
102
|
-
name: string;
|
|
103
|
-
}>]>;
|
|
104
|
-
export type HttpAuth = z.infer<typeof HttpAuthSchema>;
|
|
105
46
|
export declare const HttpRawContentTypeSchema: z.ZodEnum<["json", "xml", "html", "text", "javascript", "custom"]>;
|
|
106
47
|
export type HttpRawContentType = z.infer<typeof HttpRawContentTypeSchema>;
|
|
107
48
|
export declare const HttpBodySchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
@@ -322,61 +263,7 @@ export type HttpMethod = z.infer<typeof HttpMethodSchema>;
|
|
|
322
263
|
export declare const HttpRequestStepConfigSchema: z.ZodObject<{
|
|
323
264
|
url: z.ZodString;
|
|
324
265
|
method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
|
|
325
|
-
|
|
326
|
-
type: z.ZodLiteral<"none">;
|
|
327
|
-
}, "strip", z.ZodTypeAny, {
|
|
328
|
-
type: "none";
|
|
329
|
-
}, {
|
|
330
|
-
type: "none";
|
|
331
|
-
}>, z.ZodObject<{
|
|
332
|
-
type: z.ZodLiteral<"bearer">;
|
|
333
|
-
token: z.ZodString;
|
|
334
|
-
}, "strip", z.ZodTypeAny, {
|
|
335
|
-
type: "bearer";
|
|
336
|
-
token: string;
|
|
337
|
-
}, {
|
|
338
|
-
type: "bearer";
|
|
339
|
-
token: string;
|
|
340
|
-
}>, z.ZodObject<{
|
|
341
|
-
type: z.ZodLiteral<"basic">;
|
|
342
|
-
username: z.ZodString;
|
|
343
|
-
password: z.ZodString;
|
|
344
|
-
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
type: "basic";
|
|
346
|
-
password: string;
|
|
347
|
-
username: string;
|
|
348
|
-
}, {
|
|
349
|
-
type: "basic";
|
|
350
|
-
password: string;
|
|
351
|
-
username: string;
|
|
352
|
-
}>, z.ZodObject<{
|
|
353
|
-
type: z.ZodLiteral<"apiKey">;
|
|
354
|
-
key: z.ZodString;
|
|
355
|
-
name: z.ZodDefault<z.ZodString>;
|
|
356
|
-
in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
|
|
357
|
-
}, "strip", z.ZodTypeAny, {
|
|
358
|
-
type: "apiKey";
|
|
359
|
-
name: string;
|
|
360
|
-
key: string;
|
|
361
|
-
in: "header" | "query";
|
|
362
|
-
}, {
|
|
363
|
-
type: "apiKey";
|
|
364
|
-
key: string;
|
|
365
|
-
name?: string | undefined;
|
|
366
|
-
in?: "header" | "query" | undefined;
|
|
367
|
-
}>, z.ZodObject<{
|
|
368
|
-
type: z.ZodLiteral<"customHeader">;
|
|
369
|
-
name: z.ZodString;
|
|
370
|
-
value: z.ZodString;
|
|
371
|
-
}, "strip", z.ZodTypeAny, {
|
|
372
|
-
value: string;
|
|
373
|
-
type: "customHeader";
|
|
374
|
-
name: string;
|
|
375
|
-
}, {
|
|
376
|
-
value: string;
|
|
377
|
-
type: "customHeader";
|
|
378
|
-
name: string;
|
|
379
|
-
}>]>>;
|
|
266
|
+
credentialName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
380
267
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
381
268
|
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
382
269
|
body: z.ZodDefault<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
@@ -629,28 +516,9 @@ export declare const HttpRequestStepConfigSchema: z.ZodObject<{
|
|
|
629
516
|
}[] | undefined;
|
|
630
517
|
}[] | undefined;
|
|
631
518
|
};
|
|
632
|
-
timeoutMs: number;
|
|
633
519
|
url: string;
|
|
520
|
+
timeoutMs: number;
|
|
634
521
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
635
|
-
auth: {
|
|
636
|
-
type: "none";
|
|
637
|
-
} | {
|
|
638
|
-
type: "bearer";
|
|
639
|
-
token: string;
|
|
640
|
-
} | {
|
|
641
|
-
type: "basic";
|
|
642
|
-
password: string;
|
|
643
|
-
username: string;
|
|
644
|
-
} | {
|
|
645
|
-
type: "apiKey";
|
|
646
|
-
name: string;
|
|
647
|
-
key: string;
|
|
648
|
-
in: "header" | "query";
|
|
649
|
-
} | {
|
|
650
|
-
value: string;
|
|
651
|
-
type: "customHeader";
|
|
652
|
-
name: string;
|
|
653
|
-
};
|
|
654
522
|
response: {
|
|
655
523
|
type: "json";
|
|
656
524
|
bodySchema?: Record<string, unknown> | undefined;
|
|
@@ -666,6 +534,7 @@ export declare const HttpRequestStepConfigSchema: z.ZodObject<{
|
|
|
666
534
|
};
|
|
667
535
|
followRedirects: boolean;
|
|
668
536
|
headers?: Record<string, string> | undefined;
|
|
537
|
+
credentialName?: string | undefined;
|
|
669
538
|
queryParams?: Record<string, string> | undefined;
|
|
670
539
|
}, {
|
|
671
540
|
url: string;
|
|
@@ -709,25 +578,7 @@ export declare const HttpRequestStepConfigSchema: z.ZodObject<{
|
|
|
709
578
|
} | undefined;
|
|
710
579
|
timeoutMs?: number | undefined;
|
|
711
580
|
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | undefined;
|
|
712
|
-
|
|
713
|
-
type: "none";
|
|
714
|
-
} | {
|
|
715
|
-
type: "bearer";
|
|
716
|
-
token: string;
|
|
717
|
-
} | {
|
|
718
|
-
type: "basic";
|
|
719
|
-
password: string;
|
|
720
|
-
username: string;
|
|
721
|
-
} | {
|
|
722
|
-
type: "apiKey";
|
|
723
|
-
key: string;
|
|
724
|
-
name?: string | undefined;
|
|
725
|
-
in?: "header" | "query" | undefined;
|
|
726
|
-
} | {
|
|
727
|
-
value: string;
|
|
728
|
-
type: "customHeader";
|
|
729
|
-
name: string;
|
|
730
|
-
} | undefined;
|
|
581
|
+
credentialName?: string | undefined;
|
|
731
582
|
queryParams?: Record<string, string> | undefined;
|
|
732
583
|
response?: {
|
|
733
584
|
type: "json";
|
|
@@ -777,61 +628,7 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
777
628
|
readonly configSchema: z.ZodObject<{
|
|
778
629
|
url: z.ZodString;
|
|
779
630
|
method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
|
|
780
|
-
|
|
781
|
-
type: z.ZodLiteral<"none">;
|
|
782
|
-
}, "strip", z.ZodTypeAny, {
|
|
783
|
-
type: "none";
|
|
784
|
-
}, {
|
|
785
|
-
type: "none";
|
|
786
|
-
}>, z.ZodObject<{
|
|
787
|
-
type: z.ZodLiteral<"bearer">;
|
|
788
|
-
token: z.ZodString;
|
|
789
|
-
}, "strip", z.ZodTypeAny, {
|
|
790
|
-
type: "bearer";
|
|
791
|
-
token: string;
|
|
792
|
-
}, {
|
|
793
|
-
type: "bearer";
|
|
794
|
-
token: string;
|
|
795
|
-
}>, z.ZodObject<{
|
|
796
|
-
type: z.ZodLiteral<"basic">;
|
|
797
|
-
username: z.ZodString;
|
|
798
|
-
password: z.ZodString;
|
|
799
|
-
}, "strip", z.ZodTypeAny, {
|
|
800
|
-
type: "basic";
|
|
801
|
-
password: string;
|
|
802
|
-
username: string;
|
|
803
|
-
}, {
|
|
804
|
-
type: "basic";
|
|
805
|
-
password: string;
|
|
806
|
-
username: string;
|
|
807
|
-
}>, z.ZodObject<{
|
|
808
|
-
type: z.ZodLiteral<"apiKey">;
|
|
809
|
-
key: z.ZodString;
|
|
810
|
-
name: z.ZodDefault<z.ZodString>;
|
|
811
|
-
in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
|
|
812
|
-
}, "strip", z.ZodTypeAny, {
|
|
813
|
-
type: "apiKey";
|
|
814
|
-
name: string;
|
|
815
|
-
key: string;
|
|
816
|
-
in: "header" | "query";
|
|
817
|
-
}, {
|
|
818
|
-
type: "apiKey";
|
|
819
|
-
key: string;
|
|
820
|
-
name?: string | undefined;
|
|
821
|
-
in?: "header" | "query" | undefined;
|
|
822
|
-
}>, z.ZodObject<{
|
|
823
|
-
type: z.ZodLiteral<"customHeader">;
|
|
824
|
-
name: z.ZodString;
|
|
825
|
-
value: z.ZodString;
|
|
826
|
-
}, "strip", z.ZodTypeAny, {
|
|
827
|
-
value: string;
|
|
828
|
-
type: "customHeader";
|
|
829
|
-
name: string;
|
|
830
|
-
}, {
|
|
831
|
-
value: string;
|
|
832
|
-
type: "customHeader";
|
|
833
|
-
name: string;
|
|
834
|
-
}>]>>;
|
|
631
|
+
credentialName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
835
632
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
836
633
|
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
837
634
|
body: z.ZodDefault<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
@@ -1084,28 +881,9 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1084
881
|
}[] | undefined;
|
|
1085
882
|
}[] | undefined;
|
|
1086
883
|
};
|
|
1087
|
-
timeoutMs: number;
|
|
1088
884
|
url: string;
|
|
885
|
+
timeoutMs: number;
|
|
1089
886
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
1090
|
-
auth: {
|
|
1091
|
-
type: "none";
|
|
1092
|
-
} | {
|
|
1093
|
-
type: "bearer";
|
|
1094
|
-
token: string;
|
|
1095
|
-
} | {
|
|
1096
|
-
type: "basic";
|
|
1097
|
-
password: string;
|
|
1098
|
-
username: string;
|
|
1099
|
-
} | {
|
|
1100
|
-
type: "apiKey";
|
|
1101
|
-
name: string;
|
|
1102
|
-
key: string;
|
|
1103
|
-
in: "header" | "query";
|
|
1104
|
-
} | {
|
|
1105
|
-
value: string;
|
|
1106
|
-
type: "customHeader";
|
|
1107
|
-
name: string;
|
|
1108
|
-
};
|
|
1109
887
|
response: {
|
|
1110
888
|
type: "json";
|
|
1111
889
|
bodySchema?: Record<string, unknown> | undefined;
|
|
@@ -1121,6 +899,7 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1121
899
|
};
|
|
1122
900
|
followRedirects: boolean;
|
|
1123
901
|
headers?: Record<string, string> | undefined;
|
|
902
|
+
credentialName?: string | undefined;
|
|
1124
903
|
queryParams?: Record<string, string> | undefined;
|
|
1125
904
|
}, {
|
|
1126
905
|
url: string;
|
|
@@ -1164,25 +943,7 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1164
943
|
} | undefined;
|
|
1165
944
|
timeoutMs?: number | undefined;
|
|
1166
945
|
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | undefined;
|
|
1167
|
-
|
|
1168
|
-
type: "none";
|
|
1169
|
-
} | {
|
|
1170
|
-
type: "bearer";
|
|
1171
|
-
token: string;
|
|
1172
|
-
} | {
|
|
1173
|
-
type: "basic";
|
|
1174
|
-
password: string;
|
|
1175
|
-
username: string;
|
|
1176
|
-
} | {
|
|
1177
|
-
type: "apiKey";
|
|
1178
|
-
key: string;
|
|
1179
|
-
name?: string | undefined;
|
|
1180
|
-
in?: "header" | "query" | undefined;
|
|
1181
|
-
} | {
|
|
1182
|
-
value: string;
|
|
1183
|
-
type: "customHeader";
|
|
1184
|
-
name: string;
|
|
1185
|
-
} | undefined;
|
|
946
|
+
credentialName?: string | undefined;
|
|
1186
947
|
queryParams?: Record<string, string> | undefined;
|
|
1187
948
|
response?: {
|
|
1188
949
|
type: "json";
|
|
@@ -1229,13 +990,10 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1229
990
|
}>;
|
|
1230
991
|
readonly category: StepCategory;
|
|
1231
992
|
readonly icon = "globe";
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
readonly credentialSlots: readonly CredentialSlot[];
|
|
1237
|
-
/** Credential type schemas — defines what fields each credential type needs for UI forms. */
|
|
1238
|
-
readonly credentialTypeSchemas: readonly CredentialTypeSchema[];
|
|
993
|
+
readonly credentialSlots: readonly [{
|
|
994
|
+
readonly name: "credentialName";
|
|
995
|
+
readonly required: false;
|
|
996
|
+
}];
|
|
1239
997
|
decorateConfigSchema(jsonSchema: Record<string, unknown>): Record<string, unknown>;
|
|
1240
998
|
/**
|
|
1241
999
|
* Per-instance output schema. When the author's `response` config provides
|
|
@@ -1248,9 +1006,6 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1248
1006
|
redactInput(input: Record<string, unknown>): Record<string, unknown>;
|
|
1249
1007
|
execute(config: HttpRequestStepConfig, ctx: StepExecutionContext): Promise<HttpRequestStepOutput>;
|
|
1250
1008
|
private buildUrl;
|
|
1251
|
-
private applyAuth;
|
|
1252
|
-
private applyConfigAuth;
|
|
1253
|
-
private applyCredentialAuth;
|
|
1254
1009
|
/**
|
|
1255
1010
|
* Encode the request body for the given mode. Mutates `headers` to set
|
|
1256
1011
|
* the appropriate Content-Type unless the user already supplied one.
|
|
@@ -1262,5 +1017,4 @@ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestSt
|
|
|
1262
1017
|
private parseResponseBody;
|
|
1263
1018
|
private autoParseBody;
|
|
1264
1019
|
}
|
|
1265
|
-
export {};
|
|
1266
1020
|
//# sourceMappingURL=http-request.step.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-request.step.d.ts","sourceRoot":"","sources":["../../../src/steps/builtin/http-request.step.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http-request.step.d.ts","sourceRoot":"","sources":["../../../src/steps/builtin/http-request.step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAkB9D,eAAO,MAAM,wBAAwB,oEAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AA0C1E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AA2BtD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAI1D,eAAO,MAAM,gBAAgB,yEAE3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBA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