@akai-workflow-builder/cli-sdk 0.17.0 → 0.18.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 +12 -0
- package/dist/ctx/build-ctx.d.ts.map +1 -1
- package/dist/ctx/build-ctx.js +41 -4
- package/dist/ctx/dynamic-egress.d.ts +11 -0
- package/dist/ctx/dynamic-egress.d.ts.map +1 -1
- package/dist/ctx/dynamic-egress.js +7 -2
- package/dist/ctx/safe-fetch.d.ts +1 -0
- package/dist/ctx/safe-fetch.d.ts.map +1 -1
- package/dist/ctx/safe-fetch.js +1 -1
- package/dist/ctx/sftp-egress.d.ts +47 -0
- package/dist/ctx/sftp-egress.d.ts.map +1 -0
- package/dist/ctx/sftp-egress.js +99 -0
- package/dist/ctx/sftp.d.ts +101 -0
- package/dist/ctx/sftp.d.ts.map +1 -0
- package/dist/ctx/sftp.js +426 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/manifest/index.d.ts +1 -1
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/json-schema.d.ts +15 -0
- package/dist/manifest/json-schema.d.ts.map +1 -1
- package/dist/manifest/json-schema.js +11 -2
- package/dist/manifest/to-schema.d.ts.map +1 -1
- package/dist/manifest/to-schema.js +10 -0
- package/dist/manifest/types.d.ts +10 -1
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/runtime/executor/index.d.ts.map +1 -1
- package/dist/runtime/executor/index.js +22 -6
- package/dist/runtime/registry/loader.js +4 -0
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +30 -1
- package/dist/types.d.ts +13 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/ctx/sftp.js
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ctx.sftp` — the SFTP client a `transport: 'sftp'` tool gets in place of
|
|
3
|
+
* `ctx.fetch`.
|
|
4
|
+
*
|
|
5
|
+
* The network rules mirror safe-fetch, applied to an SSH socket instead of an
|
|
6
|
+
* HTTPS request:
|
|
7
|
+
*
|
|
8
|
+
* - the host AND port must be an entry of the tool's resolved egress
|
|
9
|
+
* allowlist (see ./sftp-egress.ts), matched exactly — no subdomains;
|
|
10
|
+
* - the host is resolved once, every resolved address must be public
|
|
11
|
+
* (loopback, RFC 1918, link-local and the metadata address are refused),
|
|
12
|
+
* and the socket is dialled to the address that was checked, so a second
|
|
13
|
+
* DNS answer cannot redirect it;
|
|
14
|
+
* - when the entry pins a host key, a server presenting any other key is
|
|
15
|
+
* refused before credentials are sent. Unpinned, the presented fingerprint
|
|
16
|
+
* is reported on the session so it can be pinned;
|
|
17
|
+
* - the invocation's AbortSignal closes the connection.
|
|
18
|
+
*
|
|
19
|
+
* Credentials come from the handler (the connector reads them from its
|
|
20
|
+
* secrets): a password, an OpenSSH/PEM private key with optional passphrase,
|
|
21
|
+
* or both — ssh2 tries the key first, then the password, then
|
|
22
|
+
* keyboard-interactive answered with the password.
|
|
23
|
+
*
|
|
24
|
+
* ssh2 is imported lazily so tools that never open an SFTP connection do not
|
|
25
|
+
* load it.
|
|
26
|
+
*/
|
|
27
|
+
import { createHash } from 'node:crypto';
|
|
28
|
+
import { lookup } from 'node:dns/promises';
|
|
29
|
+
import { isIPv4 } from 'node:net';
|
|
30
|
+
import { posix } from 'node:path';
|
|
31
|
+
import { Readable, Transform } from 'node:stream';
|
|
32
|
+
import { pipeline } from 'node:stream/promises';
|
|
33
|
+
import { AkaiEgressError, AkaiInputError, AkaiResponseTooLargeError, AkaiSecretError, AkaiToolError, } from '../errors.js';
|
|
34
|
+
import { isPrivateIp } from './safe-fetch.js';
|
|
35
|
+
import { formatSftpEgressEntry } from './sftp-egress.js';
|
|
36
|
+
const READY_TIMEOUT_MS = 20_000;
|
|
37
|
+
const KEEPALIVE_INTERVAL_MS = 10_000;
|
|
38
|
+
// SSH_FX_* status codes ssh2 puts on SFTP errors.
|
|
39
|
+
const SFTP_NO_SUCH_FILE = 2;
|
|
40
|
+
const SFTP_PERMISSION_DENIED = 3;
|
|
41
|
+
/** For tools whose transport is not sftp: every call explains what to declare instead. */
|
|
42
|
+
export function unavailableSftp() {
|
|
43
|
+
const fail = () => {
|
|
44
|
+
throw new Error('ctx.sftp is only available to transport: sftp tools — set transport: sftp and declare options.network.egress');
|
|
45
|
+
};
|
|
46
|
+
return Object.freeze({
|
|
47
|
+
allowed: Object.freeze([]),
|
|
48
|
+
connect: async () => fail(),
|
|
49
|
+
withSession: async () => fail(),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export function createSftp(binding) {
|
|
53
|
+
const allowed = Object.freeze(binding.allowed.map((e) => Object.freeze({ ...e })));
|
|
54
|
+
const where = `${binding.cliId}.${binding.toolName}`;
|
|
55
|
+
async function connect(opts) {
|
|
56
|
+
if (binding.signal.aborted)
|
|
57
|
+
throw abortError(binding.signal);
|
|
58
|
+
const entry = pickEntry(allowed, opts.host, opts.port);
|
|
59
|
+
const auth = resolveAuth(opts, where);
|
|
60
|
+
const address = await resolvePublicAddress(entry.host, binding);
|
|
61
|
+
let ssh2;
|
|
62
|
+
try {
|
|
63
|
+
ssh2 = await (binding.loadSsh2 ?? defaultLoadSsh2)();
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
// A bundled runtime gets ssh2 from its host (like sharp); a host without it cannot do SFTP.
|
|
67
|
+
throw AkaiToolError.unavailable(`sftp: this runtime has no SSH client installed (ssh2: ${err instanceof Error ? err.message : String(err)}).`);
|
|
68
|
+
}
|
|
69
|
+
if (auth.privateKey !== undefined)
|
|
70
|
+
checkPrivateKey(ssh2, auth.privateKey, auth.passphrase, where);
|
|
71
|
+
const client = new ssh2.Client();
|
|
72
|
+
let presented = '';
|
|
73
|
+
const config = {
|
|
74
|
+
host: address,
|
|
75
|
+
port: entry.port,
|
|
76
|
+
username: auth.username,
|
|
77
|
+
readyTimeout: READY_TIMEOUT_MS,
|
|
78
|
+
keepaliveInterval: KEEPALIVE_INTERVAL_MS,
|
|
79
|
+
tryKeyboard: auth.password !== undefined,
|
|
80
|
+
...(auth.password !== undefined ? { password: auth.password } : {}),
|
|
81
|
+
...(auth.privateKey !== undefined ? { privateKey: auth.privateKey } : {}),
|
|
82
|
+
...(auth.passphrase !== undefined ? { passphrase: auth.passphrase } : {}),
|
|
83
|
+
hostVerifier: (key) => {
|
|
84
|
+
presented = fingerprint(key);
|
|
85
|
+
return entry.hostKeySha256 === undefined || entry.hostKeySha256 === presented;
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
if (auth.password !== undefined) {
|
|
89
|
+
const password = auth.password;
|
|
90
|
+
client.on('keyboard-interactive', (_name, _instructions, _lang, prompts, finish) => {
|
|
91
|
+
finish(prompts.map(() => password));
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const sftp = await new Promise((resolve, reject) => {
|
|
95
|
+
const onAbort = () => {
|
|
96
|
+
client.end();
|
|
97
|
+
reject(abortError(binding.signal));
|
|
98
|
+
};
|
|
99
|
+
binding.signal.addEventListener('abort', onAbort, { once: true });
|
|
100
|
+
const settle = (fn) => {
|
|
101
|
+
binding.signal.removeEventListener('abort', onAbort);
|
|
102
|
+
fn();
|
|
103
|
+
};
|
|
104
|
+
client.once('ready', () => {
|
|
105
|
+
client.sftp((err, wrapper) => {
|
|
106
|
+
if (err) {
|
|
107
|
+
client.end();
|
|
108
|
+
settle(() => reject(AkaiToolError.unavailable(`${entry.host}:${entry.port} accepted the login but refused the SFTP subsystem: ${err.message}`)));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
settle(() => resolve(wrapper));
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
client.once('error', (err) => {
|
|
115
|
+
client.end();
|
|
116
|
+
settle(() => reject(connectError(err, entry, presented)));
|
|
117
|
+
});
|
|
118
|
+
client.connect(config);
|
|
119
|
+
});
|
|
120
|
+
// An abort after the handshake closes the connection; pending calls then
|
|
121
|
+
// fail with ssh2's "No response from server"/"Not connected" errors.
|
|
122
|
+
const onAbort = () => client.end();
|
|
123
|
+
binding.signal.addEventListener('abort', onAbort, { once: true });
|
|
124
|
+
client.once('close', () => binding.signal.removeEventListener('abort', onAbort));
|
|
125
|
+
return makeSession(client, sftp, entry, presented, binding.maxReadBytes);
|
|
126
|
+
}
|
|
127
|
+
return Object.freeze({
|
|
128
|
+
allowed,
|
|
129
|
+
connect,
|
|
130
|
+
async withSession(opts, fn) {
|
|
131
|
+
const session = await connect(opts);
|
|
132
|
+
try {
|
|
133
|
+
return await fn(session);
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
session.close();
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async function defaultLoadSsh2() {
|
|
142
|
+
const mod = (await import('ssh2'));
|
|
143
|
+
return mod.default ?? mod;
|
|
144
|
+
}
|
|
145
|
+
function pickEntry(allowed, host, port) {
|
|
146
|
+
const list = allowed.map(formatSftpEgressEntry).map((s) => s.split(' ')[0]).join(', ');
|
|
147
|
+
if (host === undefined || host.trim() === '') {
|
|
148
|
+
if (allowed.length === 1)
|
|
149
|
+
return allowed[0];
|
|
150
|
+
throw new AkaiInputError(`Name the host to connect to: this connection allows ${list}.`);
|
|
151
|
+
}
|
|
152
|
+
const wanted = host.trim().toLowerCase();
|
|
153
|
+
const forHost = allowed.filter((e) => e.host === wanted);
|
|
154
|
+
const match = port === undefined
|
|
155
|
+
? forHost.length === 1
|
|
156
|
+
? forHost[0]
|
|
157
|
+
: forHost.find((e) => e.port === 22)
|
|
158
|
+
: forHost.find((e) => e.port === port);
|
|
159
|
+
if (match === undefined) {
|
|
160
|
+
const target = port === undefined ? wanted : `${wanted}:${port}`;
|
|
161
|
+
throw new AkaiEgressError(`sftp: ${target} is not on this connection's allowlist (${list}).`, { host: wanted, port });
|
|
162
|
+
}
|
|
163
|
+
return match;
|
|
164
|
+
}
|
|
165
|
+
function resolveAuth(opts, where) {
|
|
166
|
+
const username = opts.username?.trim() ?? '';
|
|
167
|
+
if (username === '')
|
|
168
|
+
throw new AkaiSecretError(`sftp: ${where} needs a username to log in.`);
|
|
169
|
+
const password = opts.password === undefined || opts.password === '' ? undefined : opts.password;
|
|
170
|
+
const privateKey = opts.privateKey === undefined || opts.privateKey.trim() === '' ? undefined : normalizeSshPrivateKey(opts.privateKey);
|
|
171
|
+
const passphrase = opts.passphrase === undefined || opts.passphrase === '' ? undefined : opts.passphrase;
|
|
172
|
+
if (password === undefined && privateKey === undefined) {
|
|
173
|
+
throw new AkaiSecretError(`sftp: ${where} needs a password or a private key to log in.`);
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
username,
|
|
177
|
+
...(password !== undefined ? { password } : {}),
|
|
178
|
+
...(privateKey !== undefined ? { privateKey } : {}),
|
|
179
|
+
...(passphrase !== undefined ? { passphrase } : {}),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Repair the ways a private key gets mangled on its way into a secret field:
|
|
184
|
+
* newlines escaped to a literal `\n`, or collapsed to spaces. The body is
|
|
185
|
+
* re-wrapped at 70 columns (what ssh-keygen writes); a PEM with headers
|
|
186
|
+
* (`Proc-Type:` …) is left alone apart from the `\n` unescape.
|
|
187
|
+
*/
|
|
188
|
+
export function normalizeSshPrivateKey(raw) {
|
|
189
|
+
const text = raw.replace(/\\n/g, '\n').replace(/\r\n?/g, '\n').trim();
|
|
190
|
+
const m = /^(-----BEGIN [A-Z0-9 ]+-----)\s*([\s\S]*?)\s*(-----END [A-Z0-9 ]+-----)$/.exec(text);
|
|
191
|
+
if (m === null || m[2].includes(':'))
|
|
192
|
+
return `${text}\n`;
|
|
193
|
+
const body = m[2].replace(/\s+/g, '');
|
|
194
|
+
const lines = body.match(/.{1,70}/g) ?? [];
|
|
195
|
+
return `${m[1]}\n${lines.join('\n')}\n${m[3]}\n`;
|
|
196
|
+
}
|
|
197
|
+
function checkPrivateKey(ssh2, key, passphrase, where) {
|
|
198
|
+
const parsed = ssh2.utils.parseKey(key, passphrase);
|
|
199
|
+
if (parsed instanceof Error) {
|
|
200
|
+
const encrypted = /encrypted|passphrase/i.test(parsed.message);
|
|
201
|
+
throw new AkaiSecretError(encrypted
|
|
202
|
+
? `sftp: ${where}'s private key is encrypted and ${passphrase === undefined ? 'no passphrase is set' : 'the passphrase does not open it'}.`
|
|
203
|
+
: `sftp: ${where}'s private key could not be read (${parsed.message}). Paste the whole key file, including its BEGIN and END lines.`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
async function resolvePublicAddress(host, binding) {
|
|
207
|
+
let addresses;
|
|
208
|
+
if (isIPv4(host)) {
|
|
209
|
+
addresses = [host];
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
try {
|
|
213
|
+
addresses = await (binding.resolve ?? defaultResolve)(host);
|
|
214
|
+
}
|
|
215
|
+
catch (err) {
|
|
216
|
+
throw AkaiToolError.unavailable(`sftp: could not resolve ${host} (${err instanceof Error ? err.message : String(err)}).`);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (addresses.length === 0)
|
|
220
|
+
throw AkaiToolError.unavailable(`sftp: ${host} did not resolve to any address.`);
|
|
221
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
222
|
+
for (const address of addresses) {
|
|
223
|
+
if (isPrivateIp(address)) {
|
|
224
|
+
throw new AkaiEgressError(`sftp: ${host} resolved to private address ${address}`, { hostname: host, address, allResolved: addresses });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return addresses[0];
|
|
229
|
+
}
|
|
230
|
+
async function defaultResolve(hostname) {
|
|
231
|
+
const answers = await lookup(hostname, { all: true });
|
|
232
|
+
return answers.map((a) => a.address);
|
|
233
|
+
}
|
|
234
|
+
/** OpenSSH's fingerprint: SHA-256 of the public key blob, base64 without padding. */
|
|
235
|
+
function fingerprint(key) {
|
|
236
|
+
return `SHA256:${createHash('sha256').update(key).digest('base64').replace(/=+$/, '')}`;
|
|
237
|
+
}
|
|
238
|
+
function connectError(err, entry, presented) {
|
|
239
|
+
const target = `${entry.host}:${entry.port}`;
|
|
240
|
+
if (entry.hostKeySha256 !== undefined && presented !== '' && presented !== entry.hostKeySha256) {
|
|
241
|
+
return new AkaiEgressError(`sftp: ${target} presented host key ${presented}, but the allowlist pins ${entry.hostKeySha256}. Refusing to log in. If the server's key really changed, an admin must update the pinned fingerprint.`, { host: entry.host, port: entry.port, presented, pinned: entry.hostKeySha256 });
|
|
242
|
+
}
|
|
243
|
+
if (err.level === 'client-authentication') {
|
|
244
|
+
return AkaiToolError.authExpired(`sftp: ${target} rejected the login. Check the username and password or private key on the connection.`);
|
|
245
|
+
}
|
|
246
|
+
if (err.level === 'client-timeout' || /timed out/i.test(err.message)) {
|
|
247
|
+
return AkaiToolError.unavailable(`sftp: ${target} did not complete the SSH handshake within ${READY_TIMEOUT_MS / 1000}s.`, { retryable: true });
|
|
248
|
+
}
|
|
249
|
+
if (err.code === 'ECONNREFUSED' || err.code === 'ECONNRESET' || err.code === 'EHOSTUNREACH' || err.code === 'ETIMEDOUT') {
|
|
250
|
+
return AkaiToolError.unavailable(`sftp: could not connect to ${target} (${err.code}).`, { retryable: true });
|
|
251
|
+
}
|
|
252
|
+
return AkaiToolError.unavailable(`sftp: connection to ${target} failed: ${err.message}`);
|
|
253
|
+
}
|
|
254
|
+
function opError(err, op, path) {
|
|
255
|
+
const e = err;
|
|
256
|
+
if (e.code === SFTP_NO_SUCH_FILE)
|
|
257
|
+
return AkaiToolError.notFound(`sftp ${op}: ${path} does not exist.`, { path });
|
|
258
|
+
if (e.code === SFTP_PERMISSION_DENIED)
|
|
259
|
+
return AkaiToolError.forbidden(`sftp ${op}: permission denied for ${path}.`, { path });
|
|
260
|
+
if (typeof e.code === 'number')
|
|
261
|
+
return AkaiToolError.invalidInput(`sftp ${op} ${path} failed: ${e.message}`, { path, sftpCode: e.code });
|
|
262
|
+
if (err instanceof Error && err.name === 'AkaiToolError')
|
|
263
|
+
return err;
|
|
264
|
+
return AkaiToolError.unavailable(`sftp ${op} ${path} failed: ${e?.message ?? String(err)}`, { path });
|
|
265
|
+
}
|
|
266
|
+
function toEntry(name, attrs) {
|
|
267
|
+
const type = attrs.isDirectory()
|
|
268
|
+
? 'directory'
|
|
269
|
+
: attrs.isFile()
|
|
270
|
+
? 'file'
|
|
271
|
+
: attrs.isSymbolicLink()
|
|
272
|
+
? 'symlink'
|
|
273
|
+
: 'other';
|
|
274
|
+
return { name, type, size: attrs.size, modifiedAt: new Date(attrs.mtime * 1000).toISOString() };
|
|
275
|
+
}
|
|
276
|
+
function call(fn) {
|
|
277
|
+
return new Promise((resolve, reject) => {
|
|
278
|
+
fn((err, value) => (err ? reject(err) : resolve(value)));
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
function makeSession(client, sftp, entry, hostKeySha256, maxReadBytes) {
|
|
282
|
+
const stat = (path) => call((cb) => sftp.stat(path, cb));
|
|
283
|
+
const session = {
|
|
284
|
+
host: entry.host,
|
|
285
|
+
port: entry.port,
|
|
286
|
+
hostKeySha256,
|
|
287
|
+
hostKeyPinned: entry.hostKeySha256 !== undefined,
|
|
288
|
+
async list(path) {
|
|
289
|
+
try {
|
|
290
|
+
const list = await call((cb) => sftp.readdir(path, cb));
|
|
291
|
+
return list
|
|
292
|
+
.filter((f) => f.filename !== '.' && f.filename !== '..')
|
|
293
|
+
.map((f) => toEntry(f.filename, f.attrs))
|
|
294
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
295
|
+
}
|
|
296
|
+
catch (err) {
|
|
297
|
+
throw opError(err, 'list', path);
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
async stat(path) {
|
|
301
|
+
try {
|
|
302
|
+
return toEntry(posix.basename(path) || path, await stat(path));
|
|
303
|
+
}
|
|
304
|
+
catch (err) {
|
|
305
|
+
throw opError(err, 'stat', path);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
async readFile(path) {
|
|
309
|
+
let size;
|
|
310
|
+
try {
|
|
311
|
+
const attrs = await stat(path);
|
|
312
|
+
if (attrs.isDirectory())
|
|
313
|
+
throw AkaiToolError.invalidInput(`sftp read: ${path} is a directory.`, { path });
|
|
314
|
+
size = attrs.size;
|
|
315
|
+
}
|
|
316
|
+
catch (err) {
|
|
317
|
+
throw opError(err, 'read', path);
|
|
318
|
+
}
|
|
319
|
+
if (size > maxReadBytes) {
|
|
320
|
+
throw new AkaiResponseTooLargeError(`sftp read: ${path} is ${size} bytes, over the ${maxReadBytes}-byte limit.`, { path, size, maxReadBytes });
|
|
321
|
+
}
|
|
322
|
+
const chunks = [];
|
|
323
|
+
let total = 0;
|
|
324
|
+
try {
|
|
325
|
+
await pipeline(sftp.createReadStream(path), new Transform({
|
|
326
|
+
transform(chunk, _enc, done) {
|
|
327
|
+
total += chunk.length;
|
|
328
|
+
if (total > maxReadBytes) {
|
|
329
|
+
done(new AkaiResponseTooLargeError(`sftp read: ${path} grew past the ${maxReadBytes}-byte limit while reading.`, { path, maxReadBytes }));
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
chunks.push(chunk);
|
|
333
|
+
done();
|
|
334
|
+
},
|
|
335
|
+
}));
|
|
336
|
+
}
|
|
337
|
+
catch (err) {
|
|
338
|
+
if (err instanceof AkaiResponseTooLargeError)
|
|
339
|
+
throw err;
|
|
340
|
+
throw opError(err, 'read', path);
|
|
341
|
+
}
|
|
342
|
+
return Buffer.concat(chunks, total);
|
|
343
|
+
},
|
|
344
|
+
async writeFile(path, data) {
|
|
345
|
+
const source = data instanceof Readable ? data : Readable.from([typeof data === 'string' ? Buffer.from(data) : Buffer.from(data)]);
|
|
346
|
+
let written = 0;
|
|
347
|
+
try {
|
|
348
|
+
await pipeline(source, new Transform({
|
|
349
|
+
transform(chunk, _enc, done) {
|
|
350
|
+
written += chunk.length;
|
|
351
|
+
done(null, chunk);
|
|
352
|
+
},
|
|
353
|
+
}), sftp.createWriteStream(path));
|
|
354
|
+
}
|
|
355
|
+
catch (err) {
|
|
356
|
+
throw opError(err, 'write', path);
|
|
357
|
+
}
|
|
358
|
+
return written;
|
|
359
|
+
},
|
|
360
|
+
async mkdir(path, opts) {
|
|
361
|
+
if (opts?.recursive !== true) {
|
|
362
|
+
try {
|
|
363
|
+
await call((cb) => sftp.mkdir(path, (err) => cb(err, undefined)));
|
|
364
|
+
}
|
|
365
|
+
catch (err) {
|
|
366
|
+
throw opError(err, 'mkdir', path);
|
|
367
|
+
}
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const absolute = path.startsWith('/');
|
|
371
|
+
const parts = path.split('/').filter((p) => p !== '');
|
|
372
|
+
let current = absolute ? '' : '.';
|
|
373
|
+
for (const part of parts) {
|
|
374
|
+
current = `${current}/${part}`;
|
|
375
|
+
const target = absolute ? current : current.slice(2);
|
|
376
|
+
try {
|
|
377
|
+
const attrs = await stat(target);
|
|
378
|
+
if (!attrs.isDirectory())
|
|
379
|
+
throw AkaiToolError.conflict(`sftp mkdir: ${target} exists and is not a directory.`, { path: target });
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
catch (err) {
|
|
383
|
+
if (err.code !== SFTP_NO_SUCH_FILE)
|
|
384
|
+
throw opError(err, 'mkdir', target);
|
|
385
|
+
}
|
|
386
|
+
try {
|
|
387
|
+
await call((cb) => sftp.mkdir(target, (err) => cb(err, undefined)));
|
|
388
|
+
}
|
|
389
|
+
catch (err) {
|
|
390
|
+
throw opError(err, 'mkdir', target);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
async rename(from, to) {
|
|
395
|
+
try {
|
|
396
|
+
await call((cb) => sftp.rename(from, to, (err) => cb(err, undefined)));
|
|
397
|
+
}
|
|
398
|
+
catch (err) {
|
|
399
|
+
throw opError(err, 'rename', from);
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
async remove(path) {
|
|
403
|
+
try {
|
|
404
|
+
await call((cb) => sftp.unlink(path, (err) => cb(err, undefined)));
|
|
405
|
+
}
|
|
406
|
+
catch (err) {
|
|
407
|
+
throw opError(err, 'remove', path);
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
async rmdir(path) {
|
|
411
|
+
try {
|
|
412
|
+
await call((cb) => sftp.rmdir(path, (err) => cb(err, undefined)));
|
|
413
|
+
}
|
|
414
|
+
catch (err) {
|
|
415
|
+
throw opError(err, 'rmdir', path);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
close() {
|
|
419
|
+
client.end();
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
return Object.freeze(session);
|
|
423
|
+
}
|
|
424
|
+
function abortError(signal) {
|
|
425
|
+
return signal.reason ?? new DOMException('The operation was aborted.', 'AbortError');
|
|
426
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,14 @@ export type { BuildCtxParams } from './ctx/build-ctx.js';
|
|
|
9
9
|
export { createSafeFetch } from './ctx/safe-fetch.js';
|
|
10
10
|
export type { SafeFetch, SafeFetchBinding } from './ctx/safe-fetch.js';
|
|
11
11
|
export type { PrivateEgressPin } from './ctx/private-egress.js';
|
|
12
|
+
export { parseSftpEgress, parseSftpEgressEntry, formatSftpEgressEntry, normalizeHostKeyFingerprint, DEFAULT_SFTP_PORT, } from './ctx/sftp-egress.js';
|
|
13
|
+
export type { SftpEgressEntry } from './ctx/sftp-egress.js';
|
|
14
|
+
export type { SftpApi, SftpSession, SftpEntry, SftpEntryType, SftpConnectOptions } from './ctx/sftp.js';
|
|
12
15
|
export type { AnyToolDef, CLIDef, CLISpec, ClientCertOptions, ConnectionAuthKind, ConnectionDef, ConnectionOAuthConfig, ConnectionSpec, DynamicEgress, InputOf, NetworkOptions, OAuthAdminField, OutputOf, PropertiesOf, PropertyDecl, RefreshStrategy, SecretDecl, SecretsOf, StepFetcher, TokenEndpointAuthMethod, ToolCtx, ToolDef, ToolLogger, ToolOptions, ToolSpec, } from './types.js';
|
|
13
16
|
export { createSafePath } from './ctx/safe-path.js';
|
|
14
17
|
export type { SafePath } from './ctx/safe-path.js';
|
|
15
18
|
export { AkaiConnectionError, AkaiEgressError, AkaiError, AkaiInputError, AkaiPathError, AkaiPropertyError, AkaiResponseTooLargeError, AkaiSecretError, AkaiSpecError, AkaiToolError, describeError, } from './errors.js';
|
|
16
19
|
export type { ToolErrorKind } from './errors.js';
|
|
17
20
|
export { ConnectionManifestSchema, ManifestJSONSchema, SCHEMA_VERSION, toSchema, validateManifest, } from './manifest/index.js';
|
|
18
|
-
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, SchemaVersion, ToolManifest, } from './manifest/index.js';
|
|
21
|
+
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, SftpToolManifest, SchemaVersion, ToolManifest, } from './manifest/index.js';
|
|
19
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAChE,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kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxG,YAAY,EACV,UAAU,EACV,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,OAAO,EACP,cAAc,EACd,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,OAAO,EACP,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,+BAA+B,EAC/B,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { defineConnection, isAkaiConnection } from './define-connection.js';
|
|
|
5
5
|
export { buildScopedSecrets, buildScopedProperties } from './ctx/secrets.js';
|
|
6
6
|
export { buildCtx } from './ctx/build-ctx.js';
|
|
7
7
|
export { createSafeFetch } from './ctx/safe-fetch.js';
|
|
8
|
+
export { parseSftpEgress, parseSftpEgressEntry, formatSftpEgressEntry, normalizeHostKeyFingerprint, DEFAULT_SFTP_PORT, } from './ctx/sftp-egress.js';
|
|
8
9
|
export { createSafePath } from './ctx/safe-path.js';
|
|
9
10
|
export { AkaiConnectionError, AkaiEgressError, AkaiError, AkaiInputError, AkaiPathError, AkaiPropertyError, AkaiResponseTooLargeError, AkaiSecretError, AkaiSpecError, AkaiToolError, describeError, } from './errors.js';
|
|
10
11
|
export { ConnectionManifestSchema, ManifestJSONSchema, SCHEMA_VERSION, toSchema, validateManifest, } from './manifest/index.js';
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { toSchema } from './to-schema.js';
|
|
|
2
2
|
export { ConnectionManifestSchema, ManifestJSONSchema, validateManifest, } from './json-schema.js';
|
|
3
3
|
export { SCHEMA_VERSION } from './constants.js';
|
|
4
4
|
export type { SchemaVersion } from './constants.js';
|
|
5
|
-
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, ToolManifest, } from './types.js';
|
|
5
|
+
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, SftpToolManifest, ToolManifest, } from './types.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,+BAA+B,EAC/B,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
@@ -158,6 +158,21 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
|
|
|
158
158
|
propertyKeys: z.ZodArray<z.ZodString>;
|
|
159
159
|
inputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
160
160
|
outputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
transport: z.ZodLiteral<"sftp">;
|
|
163
|
+
egress: z.ZodObject<{
|
|
164
|
+
from: z.ZodString;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
name: z.ZodNullable<z.ZodString>;
|
|
168
|
+
description: z.ZodNullable<z.ZodString>;
|
|
169
|
+
isReadonly: z.ZodBoolean;
|
|
170
|
+
producesFiles: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
streamsFileInput: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
secretKeys: z.ZodArray<z.ZodString>;
|
|
173
|
+
propertyKeys: z.ZodArray<z.ZodString>;
|
|
174
|
+
inputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
outputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
161
176
|
}, z.core.$strip>], "transport">>;
|
|
162
177
|
}, z.core.$strip>;
|
|
163
178
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA6LrD,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM/C;AAoGD;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiFnC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAE/D"}
|
|
@@ -108,11 +108,20 @@ const NativeToolManifestSchema = z.object({
|
|
|
108
108
|
transport: z.literal('native'),
|
|
109
109
|
egress: z.null(),
|
|
110
110
|
});
|
|
111
|
+
// sftp tools always take their host:port allowlist from a per-connection
|
|
112
|
+
// property or secret, so only the dynamic reference form is valid.
|
|
113
|
+
const SftpToolManifestSchema = z.object({
|
|
114
|
+
...ToolManifestBaseShape,
|
|
115
|
+
transport: z.literal('sftp'),
|
|
116
|
+
egress: DynamicEgressSchema,
|
|
117
|
+
});
|
|
111
118
|
// Discriminated union enforces `transport`→`egress` invariant at the
|
|
112
|
-
// validator (http requires an array of ≥1 hosts; native
|
|
119
|
+
// validator (http requires an array of ≥1 hosts or a dynamic ref; native
|
|
120
|
+
// requires null; sftp requires a dynamic ref).
|
|
113
121
|
const ToolManifestSchema = z.discriminatedUnion('transport', [
|
|
114
122
|
HttpToolManifestSchema,
|
|
115
123
|
NativeToolManifestSchema,
|
|
124
|
+
SftpToolManifestSchema,
|
|
116
125
|
]);
|
|
117
126
|
// ── Embedded connection (AKAI-2408) ─────────────────────────────────────────
|
|
118
127
|
// A mixed package embeds its sibling connection in the CLI manifest so a lazy
|
|
@@ -282,7 +291,7 @@ export const ConnectionManifestSchema = ConnectionManifestBaseSchema.superRefine
|
|
|
282
291
|
const declaredSecrets = new Set(m.secrets.map((s) => s.key));
|
|
283
292
|
for (let i = 0; i < m.tools.length; i++) {
|
|
284
293
|
const t = m.tools[i];
|
|
285
|
-
if (t.transport
|
|
294
|
+
if (t.transport === 'native')
|
|
286
295
|
continue;
|
|
287
296
|
const egress = t.egress;
|
|
288
297
|
if (Array.isArray(egress) || egress === null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/to-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"to-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/to-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,EAAiB,MAAM,aAAa,CAAC;AAErE,OAAO,KAAK,EACV,kBAAkB,EAKnB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CA0CxD"}
|
|
@@ -75,6 +75,16 @@ function toToolManifest(id, t) {
|
|
|
75
75
|
};
|
|
76
76
|
return native;
|
|
77
77
|
}
|
|
78
|
+
if (t.transport === 'sftp') {
|
|
79
|
+
// Validator guarantees a dynamic `{ from }` egress for sftp tools.
|
|
80
|
+
const egress = t.options.network.egress;
|
|
81
|
+
const sftp = {
|
|
82
|
+
...base,
|
|
83
|
+
transport: 'sftp',
|
|
84
|
+
egress: { from: egress.from },
|
|
85
|
+
};
|
|
86
|
+
return sftp;
|
|
87
|
+
}
|
|
78
88
|
// http path. Validator guarantees options.network is defined when transport='http'.
|
|
79
89
|
const network = t.options.network;
|
|
80
90
|
const egress = network.egress;
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -125,7 +125,16 @@ export interface NativeToolManifest extends BaseToolManifest {
|
|
|
125
125
|
readonly transport: 'native';
|
|
126
126
|
readonly egress: null;
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
/**
|
|
129
|
+
* SFTP-transport tool. Opens SSH/SFTP connections through `ctx.sftp`, never
|
|
130
|
+
* `ctx.fetch`. Egress is always a dynamic reference whose value is a
|
|
131
|
+
* `host[:port][ SHA256:<fingerprint>]` allowlist the host runtime injects.
|
|
132
|
+
*/
|
|
133
|
+
export interface SftpToolManifest extends BaseToolManifest {
|
|
134
|
+
readonly transport: 'sftp';
|
|
135
|
+
readonly egress: DynamicEgressManifest;
|
|
136
|
+
}
|
|
137
|
+
export type ToolManifest = HttpToolManifest | NativeToolManifest | SftpToolManifest;
|
|
129
138
|
/** The auth kind a connection declares — WHAT auth, never the glue. Wire-format
|
|
130
139
|
* mirror of the runtime `ConnectionAuthKind` (kept here so the manifest layer
|
|
131
140
|
* stays self-contained — see the file header). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAG5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAIhC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC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AAC;IAC9C;iGAC6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/executor/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/executor/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAUpE,OA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