@hasna/files 0.2.0 → 0.2.1

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/mcp/index.js CHANGED
@@ -479,6 +479,10 @@ function listFiles(opts = {}) {
479
479
  conditions.push("f.machine_id = ?");
480
480
  params.push(opts.machine_id);
481
481
  }
482
+ if (opts.sync_status) {
483
+ conditions.push("f.sync_status = ?");
484
+ params.push(opts.sync_status);
485
+ }
482
486
  if (opts.ext) {
483
487
  conditions.push("f.ext = ?");
484
488
  params.push(opts.ext.startsWith(".") ? opts.ext : `.${opts.ext}`);
@@ -10029,6 +10033,464 @@ var init_mime_types = __esm(() => {
10029
10033
  populateMaps($extensions, $types);
10030
10034
  });
10031
10035
 
10036
+ // node_modules/@noble/hashes/esm/utils.js
10037
+ function isBytes(a) {
10038
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
10039
+ }
10040
+ function anumber(n) {
10041
+ if (!Number.isSafeInteger(n) || n < 0)
10042
+ throw new Error("positive integer expected, got " + n);
10043
+ }
10044
+ function abytes(b, ...lengths) {
10045
+ if (!isBytes(b))
10046
+ throw new Error("Uint8Array expected");
10047
+ if (lengths.length > 0 && !lengths.includes(b.length))
10048
+ throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
10049
+ }
10050
+ function aexists(instance, checkFinished = true) {
10051
+ if (instance.destroyed)
10052
+ throw new Error("Hash instance has been destroyed");
10053
+ if (checkFinished && instance.finished)
10054
+ throw new Error("Hash#digest() has already been called");
10055
+ }
10056
+ function aoutput(out, instance) {
10057
+ abytes(out);
10058
+ const min = instance.outputLen;
10059
+ if (out.length < min) {
10060
+ throw new Error("digestInto() expects output buffer of length at least " + min);
10061
+ }
10062
+ }
10063
+ function u8(arr) {
10064
+ return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
10065
+ }
10066
+ function u32(arr) {
10067
+ return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
10068
+ }
10069
+ function clean(...arrays) {
10070
+ for (let i = 0;i < arrays.length; i++) {
10071
+ arrays[i].fill(0);
10072
+ }
10073
+ }
10074
+ function rotr(word, shift) {
10075
+ return word << 32 - shift | word >>> shift;
10076
+ }
10077
+ function byteSwap(word) {
10078
+ return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
10079
+ }
10080
+ function byteSwap32(arr) {
10081
+ for (let i = 0;i < arr.length; i++) {
10082
+ arr[i] = byteSwap(arr[i]);
10083
+ }
10084
+ return arr;
10085
+ }
10086
+ function utf8ToBytes(str) {
10087
+ if (typeof str !== "string")
10088
+ throw new Error("string expected");
10089
+ return new Uint8Array(new TextEncoder().encode(str));
10090
+ }
10091
+ function toBytes(data) {
10092
+ if (typeof data === "string")
10093
+ data = utf8ToBytes(data);
10094
+ abytes(data);
10095
+ return data;
10096
+ }
10097
+
10098
+ class Hash {
10099
+ }
10100
+ function createXOFer(hashCons) {
10101
+ const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
10102
+ const tmp = hashCons({});
10103
+ hashC.outputLen = tmp.outputLen;
10104
+ hashC.blockLen = tmp.blockLen;
10105
+ hashC.create = (opts) => hashCons(opts);
10106
+ return hashC;
10107
+ }
10108
+ var isLE, swap8IfBE, swap32IfBE;
10109
+ var init_utils = __esm(() => {
10110
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
10111
+ isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
10112
+ swap8IfBE = isLE ? (n) => n : (n) => byteSwap(n);
10113
+ swap32IfBE = isLE ? (u) => u : byteSwap32;
10114
+ });
10115
+
10116
+ // node_modules/@noble/hashes/esm/_md.js
10117
+ var SHA256_IV;
10118
+ var init__md = __esm(() => {
10119
+ SHA256_IV = /* @__PURE__ */ Uint32Array.from([
10120
+ 1779033703,
10121
+ 3144134277,
10122
+ 1013904242,
10123
+ 2773480762,
10124
+ 1359893119,
10125
+ 2600822924,
10126
+ 528734635,
10127
+ 1541459225
10128
+ ]);
10129
+ });
10130
+
10131
+ // node_modules/@noble/hashes/esm/_u64.js
10132
+ function fromBig(n, le = false) {
10133
+ if (le)
10134
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
10135
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
10136
+ }
10137
+ var U32_MASK64, _32n;
10138
+ var init__u64 = __esm(() => {
10139
+ U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
10140
+ _32n = /* @__PURE__ */ BigInt(32);
10141
+ });
10142
+
10143
+ // node_modules/@noble/hashes/esm/_blake.js
10144
+ function G1s(a, b, c, d, x) {
10145
+ a = a + b + x | 0;
10146
+ d = rotr(d ^ a, 16);
10147
+ c = c + d | 0;
10148
+ b = rotr(b ^ c, 12);
10149
+ return { a, b, c, d };
10150
+ }
10151
+ function G2s(a, b, c, d, x) {
10152
+ a = a + b + x | 0;
10153
+ d = rotr(d ^ a, 8);
10154
+ c = c + d | 0;
10155
+ b = rotr(b ^ c, 7);
10156
+ return { a, b, c, d };
10157
+ }
10158
+ var init__blake = __esm(() => {
10159
+ init_utils();
10160
+ });
10161
+
10162
+ // node_modules/@noble/hashes/esm/blake2.js
10163
+ function compress(s, offset, msg, rounds, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) {
10164
+ let j = 0;
10165
+ for (let i = 0;i < rounds; i++) {
10166
+ ({ a: v0, b: v4, c: v8, d: v12 } = G1s(v0, v4, v8, v12, msg[offset + s[j++]]));
10167
+ ({ a: v0, b: v4, c: v8, d: v12 } = G2s(v0, v4, v8, v12, msg[offset + s[j++]]));
10168
+ ({ a: v1, b: v5, c: v9, d: v13 } = G1s(v1, v5, v9, v13, msg[offset + s[j++]]));
10169
+ ({ a: v1, b: v5, c: v9, d: v13 } = G2s(v1, v5, v9, v13, msg[offset + s[j++]]));
10170
+ ({ a: v2, b: v6, c: v10, d: v14 } = G1s(v2, v6, v10, v14, msg[offset + s[j++]]));
10171
+ ({ a: v2, b: v6, c: v10, d: v14 } = G2s(v2, v6, v10, v14, msg[offset + s[j++]]));
10172
+ ({ a: v3, b: v7, c: v11, d: v15 } = G1s(v3, v7, v11, v15, msg[offset + s[j++]]));
10173
+ ({ a: v3, b: v7, c: v11, d: v15 } = G2s(v3, v7, v11, v15, msg[offset + s[j++]]));
10174
+ ({ a: v0, b: v5, c: v10, d: v15 } = G1s(v0, v5, v10, v15, msg[offset + s[j++]]));
10175
+ ({ a: v0, b: v5, c: v10, d: v15 } = G2s(v0, v5, v10, v15, msg[offset + s[j++]]));
10176
+ ({ a: v1, b: v6, c: v11, d: v12 } = G1s(v1, v6, v11, v12, msg[offset + s[j++]]));
10177
+ ({ a: v1, b: v6, c: v11, d: v12 } = G2s(v1, v6, v11, v12, msg[offset + s[j++]]));
10178
+ ({ a: v2, b: v7, c: v8, d: v13 } = G1s(v2, v7, v8, v13, msg[offset + s[j++]]));
10179
+ ({ a: v2, b: v7, c: v8, d: v13 } = G2s(v2, v7, v8, v13, msg[offset + s[j++]]));
10180
+ ({ a: v3, b: v4, c: v9, d: v14 } = G1s(v3, v4, v9, v14, msg[offset + s[j++]]));
10181
+ ({ a: v3, b: v4, c: v9, d: v14 } = G2s(v3, v4, v9, v14, msg[offset + s[j++]]));
10182
+ }
10183
+ return { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 };
10184
+ }
10185
+ var BLAKE2;
10186
+ var init_blake2 = __esm(() => {
10187
+ init__blake();
10188
+ init_utils();
10189
+ BLAKE2 = class BLAKE2 extends Hash {
10190
+ constructor(blockLen, outputLen) {
10191
+ super();
10192
+ this.finished = false;
10193
+ this.destroyed = false;
10194
+ this.length = 0;
10195
+ this.pos = 0;
10196
+ anumber(blockLen);
10197
+ anumber(outputLen);
10198
+ this.blockLen = blockLen;
10199
+ this.outputLen = outputLen;
10200
+ this.buffer = new Uint8Array(blockLen);
10201
+ this.buffer32 = u32(this.buffer);
10202
+ }
10203
+ update(data) {
10204
+ aexists(this);
10205
+ data = toBytes(data);
10206
+ abytes(data);
10207
+ const { blockLen, buffer, buffer32 } = this;
10208
+ const len = data.length;
10209
+ const offset = data.byteOffset;
10210
+ const buf = data.buffer;
10211
+ for (let pos = 0;pos < len; ) {
10212
+ if (this.pos === blockLen) {
10213
+ swap32IfBE(buffer32);
10214
+ this.compress(buffer32, 0, false);
10215
+ swap32IfBE(buffer32);
10216
+ this.pos = 0;
10217
+ }
10218
+ const take = Math.min(blockLen - this.pos, len - pos);
10219
+ const dataOffset = offset + pos;
10220
+ if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
10221
+ const data32 = new Uint32Array(buf, dataOffset, Math.floor((len - pos) / 4));
10222
+ swap32IfBE(data32);
10223
+ for (let pos32 = 0;pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
10224
+ this.length += blockLen;
10225
+ this.compress(data32, pos32, false);
10226
+ }
10227
+ swap32IfBE(data32);
10228
+ continue;
10229
+ }
10230
+ buffer.set(data.subarray(pos, pos + take), this.pos);
10231
+ this.pos += take;
10232
+ this.length += take;
10233
+ pos += take;
10234
+ }
10235
+ return this;
10236
+ }
10237
+ digestInto(out) {
10238
+ aexists(this);
10239
+ aoutput(out, this);
10240
+ const { pos, buffer32 } = this;
10241
+ this.finished = true;
10242
+ clean(this.buffer.subarray(pos));
10243
+ swap32IfBE(buffer32);
10244
+ this.compress(buffer32, 0, true);
10245
+ swap32IfBE(buffer32);
10246
+ const out32 = u32(out);
10247
+ this.get().forEach((v, i) => out32[i] = swap8IfBE(v));
10248
+ }
10249
+ digest() {
10250
+ const { buffer, outputLen } = this;
10251
+ this.digestInto(buffer);
10252
+ const res = buffer.slice(0, outputLen);
10253
+ this.destroy();
10254
+ return res;
10255
+ }
10256
+ _cloneInto(to) {
10257
+ const { buffer, length, finished, destroyed, outputLen, pos } = this;
10258
+ to || (to = new this.constructor({ dkLen: outputLen }));
10259
+ to.set(...this.get());
10260
+ to.buffer.set(buffer);
10261
+ to.destroyed = destroyed;
10262
+ to.finished = finished;
10263
+ to.length = length;
10264
+ to.pos = pos;
10265
+ to.outputLen = outputLen;
10266
+ return to;
10267
+ }
10268
+ clone() {
10269
+ return this._cloneInto();
10270
+ }
10271
+ };
10272
+ });
10273
+
10274
+ // node_modules/@noble/hashes/esm/blake3.js
10275
+ var B3_Flags, B3_IV, B3_SIGMA, BLAKE3, blake3;
10276
+ var init_blake3 = __esm(() => {
10277
+ init__md();
10278
+ init__u64();
10279
+ init_blake2();
10280
+ init_utils();
10281
+ B3_Flags = {
10282
+ CHUNK_START: 1,
10283
+ CHUNK_END: 2,
10284
+ PARENT: 4,
10285
+ ROOT: 8,
10286
+ KEYED_HASH: 16,
10287
+ DERIVE_KEY_CONTEXT: 32,
10288
+ DERIVE_KEY_MATERIAL: 64
10289
+ };
10290
+ B3_IV = SHA256_IV.slice();
10291
+ B3_SIGMA = /* @__PURE__ */ (() => {
10292
+ const Id = Array.from({ length: 16 }, (_, i) => i);
10293
+ const permute = (arr) => [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8].map((i) => arr[i]);
10294
+ const res = [];
10295
+ for (let i = 0, v = Id;i < 7; i++, v = permute(v))
10296
+ res.push(...v);
10297
+ return Uint8Array.from(res);
10298
+ })();
10299
+ BLAKE3 = class BLAKE3 extends BLAKE2 {
10300
+ constructor(opts = {}, flags = 0) {
10301
+ super(64, opts.dkLen === undefined ? 32 : opts.dkLen);
10302
+ this.chunkPos = 0;
10303
+ this.chunksDone = 0;
10304
+ this.flags = 0 | 0;
10305
+ this.stack = [];
10306
+ this.posOut = 0;
10307
+ this.bufferOut32 = new Uint32Array(16);
10308
+ this.chunkOut = 0;
10309
+ this.enableXOF = true;
10310
+ const { key, context } = opts;
10311
+ const hasContext = context !== undefined;
10312
+ if (key !== undefined) {
10313
+ if (hasContext)
10314
+ throw new Error('Only "key" or "context" can be specified at same time');
10315
+ const k = toBytes(key).slice();
10316
+ abytes(k, 32);
10317
+ this.IV = u32(k);
10318
+ swap32IfBE(this.IV);
10319
+ this.flags = flags | B3_Flags.KEYED_HASH;
10320
+ } else if (hasContext) {
10321
+ const ctx = toBytes(context);
10322
+ const contextKey = new BLAKE3({ dkLen: 32 }, B3_Flags.DERIVE_KEY_CONTEXT).update(ctx).digest();
10323
+ this.IV = u32(contextKey);
10324
+ swap32IfBE(this.IV);
10325
+ this.flags = flags | B3_Flags.DERIVE_KEY_MATERIAL;
10326
+ } else {
10327
+ this.IV = B3_IV.slice();
10328
+ this.flags = flags;
10329
+ }
10330
+ this.state = this.IV.slice();
10331
+ this.bufferOut = u8(this.bufferOut32);
10332
+ }
10333
+ get() {
10334
+ return [];
10335
+ }
10336
+ set() {}
10337
+ b2Compress(counter, flags, buf, bufPos = 0) {
10338
+ const { state: s, pos } = this;
10339
+ const { h, l } = fromBig(BigInt(counter), true);
10340
+ const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, bufPos, buf, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], h, l, pos, flags);
10341
+ s[0] = v0 ^ v8;
10342
+ s[1] = v1 ^ v9;
10343
+ s[2] = v2 ^ v10;
10344
+ s[3] = v3 ^ v11;
10345
+ s[4] = v4 ^ v12;
10346
+ s[5] = v5 ^ v13;
10347
+ s[6] = v6 ^ v14;
10348
+ s[7] = v7 ^ v15;
10349
+ }
10350
+ compress(buf, bufPos = 0, isLast = false) {
10351
+ let flags = this.flags;
10352
+ if (!this.chunkPos)
10353
+ flags |= B3_Flags.CHUNK_START;
10354
+ if (this.chunkPos === 15 || isLast)
10355
+ flags |= B3_Flags.CHUNK_END;
10356
+ if (!isLast)
10357
+ this.pos = this.blockLen;
10358
+ this.b2Compress(this.chunksDone, flags, buf, bufPos);
10359
+ this.chunkPos += 1;
10360
+ if (this.chunkPos === 16 || isLast) {
10361
+ let chunk = this.state;
10362
+ this.state = this.IV.slice();
10363
+ for (let last, chunks = this.chunksDone + 1;isLast || !(chunks & 1); chunks >>= 1) {
10364
+ if (!(last = this.stack.pop()))
10365
+ break;
10366
+ this.buffer32.set(last, 0);
10367
+ this.buffer32.set(chunk, 8);
10368
+ this.pos = this.blockLen;
10369
+ this.b2Compress(0, this.flags | B3_Flags.PARENT, this.buffer32, 0);
10370
+ chunk = this.state;
10371
+ this.state = this.IV.slice();
10372
+ }
10373
+ this.chunksDone++;
10374
+ this.chunkPos = 0;
10375
+ this.stack.push(chunk);
10376
+ }
10377
+ this.pos = 0;
10378
+ }
10379
+ _cloneInto(to) {
10380
+ to = super._cloneInto(to);
10381
+ const { IV, flags, state, chunkPos, posOut, chunkOut, stack, chunksDone } = this;
10382
+ to.state.set(state.slice());
10383
+ to.stack = stack.map((i) => Uint32Array.from(i));
10384
+ to.IV.set(IV);
10385
+ to.flags = flags;
10386
+ to.chunkPos = chunkPos;
10387
+ to.chunksDone = chunksDone;
10388
+ to.posOut = posOut;
10389
+ to.chunkOut = chunkOut;
10390
+ to.enableXOF = this.enableXOF;
10391
+ to.bufferOut32.set(this.bufferOut32);
10392
+ return to;
10393
+ }
10394
+ destroy() {
10395
+ this.destroyed = true;
10396
+ clean(this.state, this.buffer32, this.IV, this.bufferOut32);
10397
+ clean(...this.stack);
10398
+ }
10399
+ b2CompressOut() {
10400
+ const { state: s, pos, flags, buffer32, bufferOut32: out32 } = this;
10401
+ const { h, l } = fromBig(BigInt(this.chunkOut++));
10402
+ swap32IfBE(buffer32);
10403
+ const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, 0, buffer32, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], l, h, pos, flags);
10404
+ out32[0] = v0 ^ v8;
10405
+ out32[1] = v1 ^ v9;
10406
+ out32[2] = v2 ^ v10;
10407
+ out32[3] = v3 ^ v11;
10408
+ out32[4] = v4 ^ v12;
10409
+ out32[5] = v5 ^ v13;
10410
+ out32[6] = v6 ^ v14;
10411
+ out32[7] = v7 ^ v15;
10412
+ out32[8] = s[0] ^ v8;
10413
+ out32[9] = s[1] ^ v9;
10414
+ out32[10] = s[2] ^ v10;
10415
+ out32[11] = s[3] ^ v11;
10416
+ out32[12] = s[4] ^ v12;
10417
+ out32[13] = s[5] ^ v13;
10418
+ out32[14] = s[6] ^ v14;
10419
+ out32[15] = s[7] ^ v15;
10420
+ swap32IfBE(buffer32);
10421
+ swap32IfBE(out32);
10422
+ this.posOut = 0;
10423
+ }
10424
+ finish() {
10425
+ if (this.finished)
10426
+ return;
10427
+ this.finished = true;
10428
+ clean(this.buffer.subarray(this.pos));
10429
+ let flags = this.flags | B3_Flags.ROOT;
10430
+ if (this.stack.length) {
10431
+ flags |= B3_Flags.PARENT;
10432
+ swap32IfBE(this.buffer32);
10433
+ this.compress(this.buffer32, 0, true);
10434
+ swap32IfBE(this.buffer32);
10435
+ this.chunksDone = 0;
10436
+ this.pos = this.blockLen;
10437
+ } else {
10438
+ flags |= (!this.chunkPos ? B3_Flags.CHUNK_START : 0) | B3_Flags.CHUNK_END;
10439
+ }
10440
+ this.flags = flags;
10441
+ this.b2CompressOut();
10442
+ }
10443
+ writeInto(out) {
10444
+ aexists(this, false);
10445
+ abytes(out);
10446
+ this.finish();
10447
+ const { blockLen, bufferOut } = this;
10448
+ for (let pos = 0, len = out.length;pos < len; ) {
10449
+ if (this.posOut >= blockLen)
10450
+ this.b2CompressOut();
10451
+ const take = Math.min(blockLen - this.posOut, len - pos);
10452
+ out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
10453
+ this.posOut += take;
10454
+ pos += take;
10455
+ }
10456
+ return out;
10457
+ }
10458
+ xofInto(out) {
10459
+ if (!this.enableXOF)
10460
+ throw new Error("XOF is not possible after digest call");
10461
+ return this.writeInto(out);
10462
+ }
10463
+ xof(bytes) {
10464
+ anumber(bytes);
10465
+ return this.xofInto(new Uint8Array(bytes));
10466
+ }
10467
+ digestInto(out) {
10468
+ aoutput(out, this);
10469
+ if (this.finished)
10470
+ throw new Error("digest() was already called");
10471
+ this.enableXOF = false;
10472
+ this.writeInto(out);
10473
+ this.destroy();
10474
+ return out;
10475
+ }
10476
+ digest() {
10477
+ return this.digestInto(new Uint8Array(this.outputLen));
10478
+ }
10479
+ };
10480
+ blake3 = /* @__PURE__ */ createXOFer((opts) => new BLAKE3(opts));
10481
+ });
10482
+
10483
+ // src/lib/hasher.ts
10484
+ import { readFileSync as readFileSync2 } from "fs";
10485
+ function hashFile(filePath) {
10486
+ const data = readFileSync2(filePath);
10487
+ const hash = blake3(data);
10488
+ return Buffer.from(hash).toString("hex");
10489
+ }
10490
+ var init_hasher = __esm(() => {
10491
+ init_blake3();
10492
+ });
10493
+
10032
10494
  // node_modules/@smithy/types/dist-cjs/index.js
10033
10495
  var require_dist_cjs = __commonJS((exports) => {
10034
10496
  exports.HttpAuthLocation = undefined;
@@ -42837,7 +43299,7 @@ var validateWaiterOptions = (options) => {
42837
43299
  };
42838
43300
 
42839
43301
  // node_modules/@smithy/util-waiter/dist-es/utils/index.js
42840
- var init_utils = () => {};
43302
+ var init_utils2 = () => {};
42841
43303
 
42842
43304
  // node_modules/@smithy/util-waiter/dist-es/createWaiter.js
42843
43305
  var abortTimeout = (abortSignal) => {
@@ -42885,7 +43347,7 @@ var abortTimeout = (abortSignal) => {
42885
43347
  };
42886
43348
  var init_createWaiter = __esm(() => {
42887
43349
  init_poller();
42888
- init_utils();
43350
+ init_utils2();
42889
43351
  init_waiter();
42890
43352
  });
42891
43353
 
@@ -42909,6 +43371,9 @@ var checkState = async (client, input) => {
42909
43371
  }
42910
43372
  }
42911
43373
  return { state: WaiterState.RETRY, reason };
43374
+ }, waitForBucketExists = async (params, input) => {
43375
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
43376
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
42912
43377
  }, waitUntilBucketExists = async (params, input) => {
42913
43378
  const serviceDefaults = { minDelay: 5, maxDelay: 120 };
42914
43379
  const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
@@ -42932,6 +43397,9 @@ var checkState2 = async (client, input) => {
42932
43397
  }
42933
43398
  }
42934
43399
  return { state: WaiterState.RETRY, reason };
43400
+ }, waitForBucketNotExists = async (params, input) => {
43401
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
43402
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState2);
42935
43403
  }, waitUntilBucketNotExists = async (params, input) => {
42936
43404
  const serviceDefaults = { minDelay: 5, maxDelay: 120 };
42937
43405
  const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState2);
@@ -42956,6 +43424,9 @@ var checkState3 = async (client, input) => {
42956
43424
  }
42957
43425
  }
42958
43426
  return { state: WaiterState.RETRY, reason };
43427
+ }, waitForObjectExists = async (params, input) => {
43428
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
43429
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState3);
42959
43430
  }, waitUntilObjectExists = async (params, input) => {
42960
43431
  const serviceDefaults = { minDelay: 5, maxDelay: 120 };
42961
43432
  const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState3);
@@ -42979,6 +43450,9 @@ var checkState4 = async (client, input) => {
42979
43450
  }
42980
43451
  }
42981
43452
  return { state: WaiterState.RETRY, reason };
43453
+ }, waitForObjectNotExists = async (params, input) => {
43454
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
43455
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState4);
42982
43456
  }, waitUntilObjectNotExists = async (params, input) => {
42983
43457
  const serviceDefaults = { minDelay: 5, maxDelay: 120 };
42984
43458
  const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState4);
@@ -43367,8 +43841,56 @@ var init_waiters = __esm(() => {
43367
43841
  });
43368
43842
 
43369
43843
  // node_modules/@aws-sdk/client-s3/dist-es/models/enums.js
43370
- var ChecksumAlgorithm2;
43844
+ var BucketAbacStatus, RequestCharged, RequestPayer, BucketAccelerateStatus, Type, Permission, OwnerOverride, ChecksumType, ServerSideEncryption, ObjectCannedACL, ChecksumAlgorithm2, MetadataDirective, ObjectLockLegalHoldStatus, ObjectLockMode, StorageClass, TaggingDirective, BucketCannedACL, BucketNamespace, DataRedundancy, BucketType, LocationType, BucketLocationConstraint, ObjectOwnership, InventoryConfigurationState, TableSseAlgorithm, ExpirationState, SessionMode, AnalyticsS3ExportFileFormat, StorageClassAnalysisSchemaVersion, EncryptionType, IntelligentTieringStatus, IntelligentTieringAccessTier, InventoryFormat, InventoryIncludedObjectVersions, InventoryOptionalField, InventoryFrequency, TransitionStorageClass, ExpirationStatus, TransitionDefaultMinimumObjectSize, BucketLogsPermission, PartitionDateSource, S3TablesBucketType, Event, FilterRuleName, DeleteMarkerReplicationStatus, MetricsStatus, ReplicationTimeStatus, ExistingObjectReplicationStatus, ReplicaModificationsStatus, SseKmsEncryptedObjectsStatus, ReplicationRuleStatus, Payer, MFADeleteStatus, BucketVersioningStatus, Protocol, ReplicationStatus, ChecksumMode, ObjectAttributes, ObjectLockEnabled, ObjectLockRetentionMode, ArchiveStatus, EncodingType, ObjectStorageClass, OptionalObjectAttributes, ObjectVersionStorageClass, MFADelete, Tier, ExpressionType, CompressionType, FileHeaderInfo, JSONType, QuoteFields, RestoreRequestType;
43371
43845
  var init_enums = __esm(() => {
43846
+ BucketAbacStatus = {
43847
+ Disabled: "Disabled",
43848
+ Enabled: "Enabled"
43849
+ };
43850
+ RequestCharged = {
43851
+ requester: "requester"
43852
+ };
43853
+ RequestPayer = {
43854
+ requester: "requester"
43855
+ };
43856
+ BucketAccelerateStatus = {
43857
+ Enabled: "Enabled",
43858
+ Suspended: "Suspended"
43859
+ };
43860
+ Type = {
43861
+ AmazonCustomerByEmail: "AmazonCustomerByEmail",
43862
+ CanonicalUser: "CanonicalUser",
43863
+ Group: "Group"
43864
+ };
43865
+ Permission = {
43866
+ FULL_CONTROL: "FULL_CONTROL",
43867
+ READ: "READ",
43868
+ READ_ACP: "READ_ACP",
43869
+ WRITE: "WRITE",
43870
+ WRITE_ACP: "WRITE_ACP"
43871
+ };
43872
+ OwnerOverride = {
43873
+ Destination: "Destination"
43874
+ };
43875
+ ChecksumType = {
43876
+ COMPOSITE: "COMPOSITE",
43877
+ FULL_OBJECT: "FULL_OBJECT"
43878
+ };
43879
+ ServerSideEncryption = {
43880
+ AES256: "AES256",
43881
+ aws_fsx: "aws:fsx",
43882
+ aws_kms: "aws:kms",
43883
+ aws_kms_dsse: "aws:kms:dsse"
43884
+ };
43885
+ ObjectCannedACL = {
43886
+ authenticated_read: "authenticated-read",
43887
+ aws_exec_read: "aws-exec-read",
43888
+ bucket_owner_full_control: "bucket-owner-full-control",
43889
+ bucket_owner_read: "bucket-owner-read",
43890
+ private: "private",
43891
+ public_read: "public-read",
43892
+ public_read_write: "public-read-write"
43893
+ };
43372
43894
  ChecksumAlgorithm2 = {
43373
43895
  CRC32: "CRC32",
43374
43896
  CRC32C: "CRC32C",
@@ -43376,6 +43898,354 @@ var init_enums = __esm(() => {
43376
43898
  SHA1: "SHA1",
43377
43899
  SHA256: "SHA256"
43378
43900
  };
43901
+ MetadataDirective = {
43902
+ COPY: "COPY",
43903
+ REPLACE: "REPLACE"
43904
+ };
43905
+ ObjectLockLegalHoldStatus = {
43906
+ OFF: "OFF",
43907
+ ON: "ON"
43908
+ };
43909
+ ObjectLockMode = {
43910
+ COMPLIANCE: "COMPLIANCE",
43911
+ GOVERNANCE: "GOVERNANCE"
43912
+ };
43913
+ StorageClass = {
43914
+ DEEP_ARCHIVE: "DEEP_ARCHIVE",
43915
+ EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
43916
+ FSX_ONTAP: "FSX_ONTAP",
43917
+ FSX_OPENZFS: "FSX_OPENZFS",
43918
+ GLACIER: "GLACIER",
43919
+ GLACIER_IR: "GLACIER_IR",
43920
+ INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
43921
+ ONEZONE_IA: "ONEZONE_IA",
43922
+ OUTPOSTS: "OUTPOSTS",
43923
+ REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
43924
+ SNOW: "SNOW",
43925
+ STANDARD: "STANDARD",
43926
+ STANDARD_IA: "STANDARD_IA"
43927
+ };
43928
+ TaggingDirective = {
43929
+ COPY: "COPY",
43930
+ REPLACE: "REPLACE"
43931
+ };
43932
+ BucketCannedACL = {
43933
+ authenticated_read: "authenticated-read",
43934
+ private: "private",
43935
+ public_read: "public-read",
43936
+ public_read_write: "public-read-write"
43937
+ };
43938
+ BucketNamespace = {
43939
+ ACCOUNT_REGIONAL: "account-regional",
43940
+ GLOBAL: "global"
43941
+ };
43942
+ DataRedundancy = {
43943
+ SingleAvailabilityZone: "SingleAvailabilityZone",
43944
+ SingleLocalZone: "SingleLocalZone"
43945
+ };
43946
+ BucketType = {
43947
+ Directory: "Directory"
43948
+ };
43949
+ LocationType = {
43950
+ AvailabilityZone: "AvailabilityZone",
43951
+ LocalZone: "LocalZone"
43952
+ };
43953
+ BucketLocationConstraint = {
43954
+ EU: "EU",
43955
+ af_south_1: "af-south-1",
43956
+ ap_east_1: "ap-east-1",
43957
+ ap_northeast_1: "ap-northeast-1",
43958
+ ap_northeast_2: "ap-northeast-2",
43959
+ ap_northeast_3: "ap-northeast-3",
43960
+ ap_south_1: "ap-south-1",
43961
+ ap_south_2: "ap-south-2",
43962
+ ap_southeast_1: "ap-southeast-1",
43963
+ ap_southeast_2: "ap-southeast-2",
43964
+ ap_southeast_3: "ap-southeast-3",
43965
+ ap_southeast_4: "ap-southeast-4",
43966
+ ap_southeast_5: "ap-southeast-5",
43967
+ ca_central_1: "ca-central-1",
43968
+ cn_north_1: "cn-north-1",
43969
+ cn_northwest_1: "cn-northwest-1",
43970
+ eu_central_1: "eu-central-1",
43971
+ eu_central_2: "eu-central-2",
43972
+ eu_north_1: "eu-north-1",
43973
+ eu_south_1: "eu-south-1",
43974
+ eu_south_2: "eu-south-2",
43975
+ eu_west_1: "eu-west-1",
43976
+ eu_west_2: "eu-west-2",
43977
+ eu_west_3: "eu-west-3",
43978
+ il_central_1: "il-central-1",
43979
+ me_central_1: "me-central-1",
43980
+ me_south_1: "me-south-1",
43981
+ sa_east_1: "sa-east-1",
43982
+ us_east_2: "us-east-2",
43983
+ us_gov_east_1: "us-gov-east-1",
43984
+ us_gov_west_1: "us-gov-west-1",
43985
+ us_west_1: "us-west-1",
43986
+ us_west_2: "us-west-2"
43987
+ };
43988
+ ObjectOwnership = {
43989
+ BucketOwnerEnforced: "BucketOwnerEnforced",
43990
+ BucketOwnerPreferred: "BucketOwnerPreferred",
43991
+ ObjectWriter: "ObjectWriter"
43992
+ };
43993
+ InventoryConfigurationState = {
43994
+ DISABLED: "DISABLED",
43995
+ ENABLED: "ENABLED"
43996
+ };
43997
+ TableSseAlgorithm = {
43998
+ AES256: "AES256",
43999
+ aws_kms: "aws:kms"
44000
+ };
44001
+ ExpirationState = {
44002
+ DISABLED: "DISABLED",
44003
+ ENABLED: "ENABLED"
44004
+ };
44005
+ SessionMode = {
44006
+ ReadOnly: "ReadOnly",
44007
+ ReadWrite: "ReadWrite"
44008
+ };
44009
+ AnalyticsS3ExportFileFormat = {
44010
+ CSV: "CSV"
44011
+ };
44012
+ StorageClassAnalysisSchemaVersion = {
44013
+ V_1: "V_1"
44014
+ };
44015
+ EncryptionType = {
44016
+ NONE: "NONE",
44017
+ SSE_C: "SSE-C"
44018
+ };
44019
+ IntelligentTieringStatus = {
44020
+ Disabled: "Disabled",
44021
+ Enabled: "Enabled"
44022
+ };
44023
+ IntelligentTieringAccessTier = {
44024
+ ARCHIVE_ACCESS: "ARCHIVE_ACCESS",
44025
+ DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"
44026
+ };
44027
+ InventoryFormat = {
44028
+ CSV: "CSV",
44029
+ ORC: "ORC",
44030
+ Parquet: "Parquet"
44031
+ };
44032
+ InventoryIncludedObjectVersions = {
44033
+ All: "All",
44034
+ Current: "Current"
44035
+ };
44036
+ InventoryOptionalField = {
44037
+ BucketKeyStatus: "BucketKeyStatus",
44038
+ ChecksumAlgorithm: "ChecksumAlgorithm",
44039
+ ETag: "ETag",
44040
+ EncryptionStatus: "EncryptionStatus",
44041
+ IntelligentTieringAccessTier: "IntelligentTieringAccessTier",
44042
+ IsMultipartUploaded: "IsMultipartUploaded",
44043
+ LastModifiedDate: "LastModifiedDate",
44044
+ LifecycleExpirationDate: "LifecycleExpirationDate",
44045
+ ObjectAccessControlList: "ObjectAccessControlList",
44046
+ ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus",
44047
+ ObjectLockMode: "ObjectLockMode",
44048
+ ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate",
44049
+ ObjectOwner: "ObjectOwner",
44050
+ ReplicationStatus: "ReplicationStatus",
44051
+ Size: "Size",
44052
+ StorageClass: "StorageClass"
44053
+ };
44054
+ InventoryFrequency = {
44055
+ Daily: "Daily",
44056
+ Weekly: "Weekly"
44057
+ };
44058
+ TransitionStorageClass = {
44059
+ DEEP_ARCHIVE: "DEEP_ARCHIVE",
44060
+ GLACIER: "GLACIER",
44061
+ GLACIER_IR: "GLACIER_IR",
44062
+ INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
44063
+ ONEZONE_IA: "ONEZONE_IA",
44064
+ STANDARD_IA: "STANDARD_IA"
44065
+ };
44066
+ ExpirationStatus = {
44067
+ Disabled: "Disabled",
44068
+ Enabled: "Enabled"
44069
+ };
44070
+ TransitionDefaultMinimumObjectSize = {
44071
+ all_storage_classes_128K: "all_storage_classes_128K",
44072
+ varies_by_storage_class: "varies_by_storage_class"
44073
+ };
44074
+ BucketLogsPermission = {
44075
+ FULL_CONTROL: "FULL_CONTROL",
44076
+ READ: "READ",
44077
+ WRITE: "WRITE"
44078
+ };
44079
+ PartitionDateSource = {
44080
+ DeliveryTime: "DeliveryTime",
44081
+ EventTime: "EventTime"
44082
+ };
44083
+ S3TablesBucketType = {
44084
+ aws: "aws",
44085
+ customer: "customer"
44086
+ };
44087
+ Event = {
44088
+ s3_IntelligentTiering: "s3:IntelligentTiering",
44089
+ s3_LifecycleExpiration_: "s3:LifecycleExpiration:*",
44090
+ s3_LifecycleExpiration_Delete: "s3:LifecycleExpiration:Delete",
44091
+ s3_LifecycleExpiration_DeleteMarkerCreated: "s3:LifecycleExpiration:DeleteMarkerCreated",
44092
+ s3_LifecycleTransition: "s3:LifecycleTransition",
44093
+ s3_ObjectAcl_Put: "s3:ObjectAcl:Put",
44094
+ s3_ObjectCreated_: "s3:ObjectCreated:*",
44095
+ s3_ObjectCreated_CompleteMultipartUpload: "s3:ObjectCreated:CompleteMultipartUpload",
44096
+ s3_ObjectCreated_Copy: "s3:ObjectCreated:Copy",
44097
+ s3_ObjectCreated_Post: "s3:ObjectCreated:Post",
44098
+ s3_ObjectCreated_Put: "s3:ObjectCreated:Put",
44099
+ s3_ObjectRemoved_: "s3:ObjectRemoved:*",
44100
+ s3_ObjectRemoved_Delete: "s3:ObjectRemoved:Delete",
44101
+ s3_ObjectRemoved_DeleteMarkerCreated: "s3:ObjectRemoved:DeleteMarkerCreated",
44102
+ s3_ObjectRestore_: "s3:ObjectRestore:*",
44103
+ s3_ObjectRestore_Completed: "s3:ObjectRestore:Completed",
44104
+ s3_ObjectRestore_Delete: "s3:ObjectRestore:Delete",
44105
+ s3_ObjectRestore_Post: "s3:ObjectRestore:Post",
44106
+ s3_ObjectTagging_: "s3:ObjectTagging:*",
44107
+ s3_ObjectTagging_Delete: "s3:ObjectTagging:Delete",
44108
+ s3_ObjectTagging_Put: "s3:ObjectTagging:Put",
44109
+ s3_ReducedRedundancyLostObject: "s3:ReducedRedundancyLostObject",
44110
+ s3_Replication_: "s3:Replication:*",
44111
+ s3_Replication_OperationFailedReplication: "s3:Replication:OperationFailedReplication",
44112
+ s3_Replication_OperationMissedThreshold: "s3:Replication:OperationMissedThreshold",
44113
+ s3_Replication_OperationNotTracked: "s3:Replication:OperationNotTracked",
44114
+ s3_Replication_OperationReplicatedAfterThreshold: "s3:Replication:OperationReplicatedAfterThreshold"
44115
+ };
44116
+ FilterRuleName = {
44117
+ prefix: "prefix",
44118
+ suffix: "suffix"
44119
+ };
44120
+ DeleteMarkerReplicationStatus = {
44121
+ Disabled: "Disabled",
44122
+ Enabled: "Enabled"
44123
+ };
44124
+ MetricsStatus = {
44125
+ Disabled: "Disabled",
44126
+ Enabled: "Enabled"
44127
+ };
44128
+ ReplicationTimeStatus = {
44129
+ Disabled: "Disabled",
44130
+ Enabled: "Enabled"
44131
+ };
44132
+ ExistingObjectReplicationStatus = {
44133
+ Disabled: "Disabled",
44134
+ Enabled: "Enabled"
44135
+ };
44136
+ ReplicaModificationsStatus = {
44137
+ Disabled: "Disabled",
44138
+ Enabled: "Enabled"
44139
+ };
44140
+ SseKmsEncryptedObjectsStatus = {
44141
+ Disabled: "Disabled",
44142
+ Enabled: "Enabled"
44143
+ };
44144
+ ReplicationRuleStatus = {
44145
+ Disabled: "Disabled",
44146
+ Enabled: "Enabled"
44147
+ };
44148
+ Payer = {
44149
+ BucketOwner: "BucketOwner",
44150
+ Requester: "Requester"
44151
+ };
44152
+ MFADeleteStatus = {
44153
+ Disabled: "Disabled",
44154
+ Enabled: "Enabled"
44155
+ };
44156
+ BucketVersioningStatus = {
44157
+ Enabled: "Enabled",
44158
+ Suspended: "Suspended"
44159
+ };
44160
+ Protocol = {
44161
+ http: "http",
44162
+ https: "https"
44163
+ };
44164
+ ReplicationStatus = {
44165
+ COMPLETE: "COMPLETE",
44166
+ COMPLETED: "COMPLETED",
44167
+ FAILED: "FAILED",
44168
+ PENDING: "PENDING",
44169
+ REPLICA: "REPLICA"
44170
+ };
44171
+ ChecksumMode = {
44172
+ ENABLED: "ENABLED"
44173
+ };
44174
+ ObjectAttributes = {
44175
+ CHECKSUM: "Checksum",
44176
+ ETAG: "ETag",
44177
+ OBJECT_PARTS: "ObjectParts",
44178
+ OBJECT_SIZE: "ObjectSize",
44179
+ STORAGE_CLASS: "StorageClass"
44180
+ };
44181
+ ObjectLockEnabled = {
44182
+ Enabled: "Enabled"
44183
+ };
44184
+ ObjectLockRetentionMode = {
44185
+ COMPLIANCE: "COMPLIANCE",
44186
+ GOVERNANCE: "GOVERNANCE"
44187
+ };
44188
+ ArchiveStatus = {
44189
+ ARCHIVE_ACCESS: "ARCHIVE_ACCESS",
44190
+ DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"
44191
+ };
44192
+ EncodingType = {
44193
+ url: "url"
44194
+ };
44195
+ ObjectStorageClass = {
44196
+ DEEP_ARCHIVE: "DEEP_ARCHIVE",
44197
+ EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
44198
+ FSX_ONTAP: "FSX_ONTAP",
44199
+ FSX_OPENZFS: "FSX_OPENZFS",
44200
+ GLACIER: "GLACIER",
44201
+ GLACIER_IR: "GLACIER_IR",
44202
+ INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
44203
+ ONEZONE_IA: "ONEZONE_IA",
44204
+ OUTPOSTS: "OUTPOSTS",
44205
+ REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
44206
+ SNOW: "SNOW",
44207
+ STANDARD: "STANDARD",
44208
+ STANDARD_IA: "STANDARD_IA"
44209
+ };
44210
+ OptionalObjectAttributes = {
44211
+ RESTORE_STATUS: "RestoreStatus"
44212
+ };
44213
+ ObjectVersionStorageClass = {
44214
+ STANDARD: "STANDARD"
44215
+ };
44216
+ MFADelete = {
44217
+ Disabled: "Disabled",
44218
+ Enabled: "Enabled"
44219
+ };
44220
+ Tier = {
44221
+ Bulk: "Bulk",
44222
+ Expedited: "Expedited",
44223
+ Standard: "Standard"
44224
+ };
44225
+ ExpressionType = {
44226
+ SQL: "SQL"
44227
+ };
44228
+ CompressionType = {
44229
+ BZIP2: "BZIP2",
44230
+ GZIP: "GZIP",
44231
+ NONE: "NONE"
44232
+ };
44233
+ FileHeaderInfo = {
44234
+ IGNORE: "IGNORE",
44235
+ NONE: "NONE",
44236
+ USE: "USE"
44237
+ };
44238
+ JSONType = {
44239
+ DOCUMENT: "DOCUMENT",
44240
+ LINES: "LINES"
44241
+ };
44242
+ QuoteFields = {
44243
+ ALWAYS: "ALWAYS",
44244
+ ASNEEDED: "ASNEEDED"
44245
+ };
44246
+ RestoreRequestType = {
44247
+ SELECT: "SELECT"
44248
+ };
43379
44249
  });
43380
44250
 
43381
44251
  // node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js
@@ -43385,7 +44255,679 @@ var init_models_0 = () => {};
43385
44255
  var init_models_1 = () => {};
43386
44256
 
43387
44257
  // node_modules/@aws-sdk/client-s3/dist-es/index.js
44258
+ var exports_dist_es8 = {};
44259
+ __export(exports_dist_es8, {
44260
+ waitUntilObjectNotExists: () => waitUntilObjectNotExists,
44261
+ waitUntilObjectExists: () => waitUntilObjectExists,
44262
+ waitUntilBucketNotExists: () => waitUntilBucketNotExists,
44263
+ waitUntilBucketExists: () => waitUntilBucketExists,
44264
+ waitForObjectNotExists: () => waitForObjectNotExists,
44265
+ waitForObjectExists: () => waitForObjectExists,
44266
+ waitForBucketNotExists: () => waitForBucketNotExists,
44267
+ waitForBucketExists: () => waitForBucketExists,
44268
+ paginateListParts: () => paginateListParts,
44269
+ paginateListObjectsV2: () => paginateListObjectsV2,
44270
+ paginateListDirectoryBuckets: () => paginateListDirectoryBuckets,
44271
+ paginateListBuckets: () => paginateListBuckets,
44272
+ errorTypeRegistries: () => errorTypeRegistries,
44273
+ __Client: () => import_smithy_client9.Client,
44274
+ _Object$: () => _Object$,
44275
+ _Error$: () => _Error$,
44276
+ WriteGetObjectResponseRequest$: () => WriteGetObjectResponseRequest$,
44277
+ WriteGetObjectResponseCommand: () => WriteGetObjectResponseCommand,
44278
+ WriteGetObjectResponse$: () => WriteGetObjectResponse$,
44279
+ WebsiteConfiguration$: () => WebsiteConfiguration$,
44280
+ VersioningConfiguration$: () => VersioningConfiguration$,
44281
+ UploadPartRequest$: () => UploadPartRequest$,
44282
+ UploadPartOutput$: () => UploadPartOutput$,
44283
+ UploadPartCopyRequest$: () => UploadPartCopyRequest$,
44284
+ UploadPartCopyOutput$: () => UploadPartCopyOutput$,
44285
+ UploadPartCopyCommand: () => UploadPartCopyCommand,
44286
+ UploadPartCopy$: () => UploadPartCopy$,
44287
+ UploadPartCommand: () => UploadPartCommand,
44288
+ UploadPart$: () => UploadPart$,
44289
+ UpdateObjectEncryptionResponse$: () => UpdateObjectEncryptionResponse$,
44290
+ UpdateObjectEncryptionRequest$: () => UpdateObjectEncryptionRequest$,
44291
+ UpdateObjectEncryptionCommand: () => UpdateObjectEncryptionCommand,
44292
+ UpdateObjectEncryption$: () => UpdateObjectEncryption$,
44293
+ UpdateBucketMetadataJournalTableConfigurationRequest$: () => UpdateBucketMetadataJournalTableConfigurationRequest$,
44294
+ UpdateBucketMetadataJournalTableConfigurationCommand: () => UpdateBucketMetadataJournalTableConfigurationCommand,
44295
+ UpdateBucketMetadataJournalTableConfiguration$: () => UpdateBucketMetadataJournalTableConfiguration$,
44296
+ UpdateBucketMetadataInventoryTableConfigurationRequest$: () => UpdateBucketMetadataInventoryTableConfigurationRequest$,
44297
+ UpdateBucketMetadataInventoryTableConfigurationCommand: () => UpdateBucketMetadataInventoryTableConfigurationCommand,
44298
+ UpdateBucketMetadataInventoryTableConfiguration$: () => UpdateBucketMetadataInventoryTableConfiguration$,
44299
+ Type: () => Type,
44300
+ TransitionStorageClass: () => TransitionStorageClass,
44301
+ TransitionDefaultMinimumObjectSize: () => TransitionDefaultMinimumObjectSize,
44302
+ Transition$: () => Transition$,
44303
+ TopicConfiguration$: () => TopicConfiguration$,
44304
+ TooManyParts$: () => TooManyParts$,
44305
+ TooManyParts: () => TooManyParts,
44306
+ Tiering$: () => Tiering$,
44307
+ Tier: () => Tier,
44308
+ TargetObjectKeyFormat$: () => TargetObjectKeyFormat$,
44309
+ TargetGrant$: () => TargetGrant$,
44310
+ TaggingDirective: () => TaggingDirective,
44311
+ Tagging$: () => Tagging$,
44312
+ Tag$: () => Tag$,
44313
+ TableSseAlgorithm: () => TableSseAlgorithm,
44314
+ StorageClassAnalysisSchemaVersion: () => StorageClassAnalysisSchemaVersion,
44315
+ StorageClassAnalysisDataExport$: () => StorageClassAnalysisDataExport$,
44316
+ StorageClassAnalysis$: () => StorageClassAnalysis$,
44317
+ StorageClass: () => StorageClass,
44318
+ StatsEvent$: () => StatsEvent$,
44319
+ Stats$: () => Stats$,
44320
+ SseKmsEncryptedObjectsStatus: () => SseKmsEncryptedObjectsStatus,
44321
+ SseKmsEncryptedObjects$: () => SseKmsEncryptedObjects$,
44322
+ SourceSelectionCriteria$: () => SourceSelectionCriteria$,
44323
+ SimplePrefix$: () => SimplePrefix$,
44324
+ SessionMode: () => SessionMode,
44325
+ SessionCredentials$: () => SessionCredentials$,
44326
+ ServerSideEncryptionRule$: () => ServerSideEncryptionRule$,
44327
+ ServerSideEncryptionConfiguration$: () => ServerSideEncryptionConfiguration$,
44328
+ ServerSideEncryptionByDefault$: () => ServerSideEncryptionByDefault$,
44329
+ ServerSideEncryption: () => ServerSideEncryption,
44330
+ SelectParameters$: () => SelectParameters$,
44331
+ SelectObjectContentRequest$: () => SelectObjectContentRequest$,
44332
+ SelectObjectContentOutput$: () => SelectObjectContentOutput$,
44333
+ SelectObjectContentEventStream$: () => SelectObjectContentEventStream$,
44334
+ SelectObjectContentCommand: () => SelectObjectContentCommand,
44335
+ SelectObjectContent$: () => SelectObjectContent$,
44336
+ ScanRange$: () => ScanRange$,
44337
+ SSES3$: () => SSES3$,
44338
+ SSEKMSEncryption$: () => SSEKMSEncryption$,
44339
+ SSEKMS$: () => SSEKMS$,
44340
+ S3TablesDestinationResult$: () => S3TablesDestinationResult$,
44341
+ S3TablesDestination$: () => S3TablesDestination$,
44342
+ S3TablesBucketType: () => S3TablesBucketType,
44343
+ S3ServiceException$: () => S3ServiceException$,
44344
+ S3ServiceException: () => S3ServiceException,
44345
+ S3Location$: () => S3Location$,
44346
+ S3KeyFilter$: () => S3KeyFilter$,
44347
+ S3Client: () => S3Client,
44348
+ S3: () => S3,
44349
+ RoutingRule$: () => RoutingRule$,
44350
+ RestoreStatus$: () => RestoreStatus$,
44351
+ RestoreRequestType: () => RestoreRequestType,
44352
+ RestoreRequest$: () => RestoreRequest$,
44353
+ RestoreObjectRequest$: () => RestoreObjectRequest$,
44354
+ RestoreObjectOutput$: () => RestoreObjectOutput$,
44355
+ RestoreObjectCommand: () => RestoreObjectCommand,
44356
+ RestoreObject$: () => RestoreObject$,
44357
+ RequestProgress$: () => RequestProgress$,
44358
+ RequestPaymentConfiguration$: () => RequestPaymentConfiguration$,
44359
+ RequestPayer: () => RequestPayer,
44360
+ RequestCharged: () => RequestCharged,
44361
+ ReplicationTimeValue$: () => ReplicationTimeValue$,
44362
+ ReplicationTimeStatus: () => ReplicationTimeStatus,
44363
+ ReplicationTime$: () => ReplicationTime$,
44364
+ ReplicationStatus: () => ReplicationStatus,
44365
+ ReplicationRuleStatus: () => ReplicationRuleStatus,
44366
+ ReplicationRuleFilter$: () => ReplicationRuleFilter$,
44367
+ ReplicationRuleAndOperator$: () => ReplicationRuleAndOperator$,
44368
+ ReplicationRule$: () => ReplicationRule$,
44369
+ ReplicationConfiguration$: () => ReplicationConfiguration$,
44370
+ ReplicaModificationsStatus: () => ReplicaModificationsStatus,
44371
+ ReplicaModifications$: () => ReplicaModifications$,
44372
+ RenameObjectRequest$: () => RenameObjectRequest$,
44373
+ RenameObjectOutput$: () => RenameObjectOutput$,
44374
+ RenameObjectCommand: () => RenameObjectCommand,
44375
+ RenameObject$: () => RenameObject$,
44376
+ RedirectAllRequestsTo$: () => RedirectAllRequestsTo$,
44377
+ Redirect$: () => Redirect$,
44378
+ RecordsEvent$: () => RecordsEvent$,
44379
+ RecordExpiration$: () => RecordExpiration$,
44380
+ QuoteFields: () => QuoteFields,
44381
+ QueueConfiguration$: () => QueueConfiguration$,
44382
+ PutPublicAccessBlockRequest$: () => PutPublicAccessBlockRequest$,
44383
+ PutPublicAccessBlockCommand: () => PutPublicAccessBlockCommand,
44384
+ PutPublicAccessBlock$: () => PutPublicAccessBlock$,
44385
+ PutObjectTaggingRequest$: () => PutObjectTaggingRequest$,
44386
+ PutObjectTaggingOutput$: () => PutObjectTaggingOutput$,
44387
+ PutObjectTaggingCommand: () => PutObjectTaggingCommand,
44388
+ PutObjectTagging$: () => PutObjectTagging$,
44389
+ PutObjectRetentionRequest$: () => PutObjectRetentionRequest$,
44390
+ PutObjectRetentionOutput$: () => PutObjectRetentionOutput$,
44391
+ PutObjectRetentionCommand: () => PutObjectRetentionCommand,
44392
+ PutObjectRetention$: () => PutObjectRetention$,
44393
+ PutObjectRequest$: () => PutObjectRequest$,
44394
+ PutObjectOutput$: () => PutObjectOutput$,
44395
+ PutObjectLockConfigurationRequest$: () => PutObjectLockConfigurationRequest$,
44396
+ PutObjectLockConfigurationOutput$: () => PutObjectLockConfigurationOutput$,
44397
+ PutObjectLockConfigurationCommand: () => PutObjectLockConfigurationCommand,
44398
+ PutObjectLockConfiguration$: () => PutObjectLockConfiguration$,
44399
+ PutObjectLegalHoldRequest$: () => PutObjectLegalHoldRequest$,
44400
+ PutObjectLegalHoldOutput$: () => PutObjectLegalHoldOutput$,
44401
+ PutObjectLegalHoldCommand: () => PutObjectLegalHoldCommand,
44402
+ PutObjectLegalHold$: () => PutObjectLegalHold$,
44403
+ PutObjectCommand: () => PutObjectCommand,
44404
+ PutObjectAclRequest$: () => PutObjectAclRequest$,
44405
+ PutObjectAclOutput$: () => PutObjectAclOutput$,
44406
+ PutObjectAclCommand: () => PutObjectAclCommand,
44407
+ PutObjectAcl$: () => PutObjectAcl$,
44408
+ PutObject$: () => PutObject$,
44409
+ PutBucketWebsiteRequest$: () => PutBucketWebsiteRequest$,
44410
+ PutBucketWebsiteCommand: () => PutBucketWebsiteCommand,
44411
+ PutBucketWebsite$: () => PutBucketWebsite$,
44412
+ PutBucketVersioningRequest$: () => PutBucketVersioningRequest$,
44413
+ PutBucketVersioningCommand: () => PutBucketVersioningCommand,
44414
+ PutBucketVersioning$: () => PutBucketVersioning$,
44415
+ PutBucketTaggingRequest$: () => PutBucketTaggingRequest$,
44416
+ PutBucketTaggingCommand: () => PutBucketTaggingCommand,
44417
+ PutBucketTagging$: () => PutBucketTagging$,
44418
+ PutBucketRequestPaymentRequest$: () => PutBucketRequestPaymentRequest$,
44419
+ PutBucketRequestPaymentCommand: () => PutBucketRequestPaymentCommand,
44420
+ PutBucketRequestPayment$: () => PutBucketRequestPayment$,
44421
+ PutBucketReplicationRequest$: () => PutBucketReplicationRequest$,
44422
+ PutBucketReplicationCommand: () => PutBucketReplicationCommand,
44423
+ PutBucketReplication$: () => PutBucketReplication$,
44424
+ PutBucketPolicyRequest$: () => PutBucketPolicyRequest$,
44425
+ PutBucketPolicyCommand: () => PutBucketPolicyCommand,
44426
+ PutBucketPolicy$: () => PutBucketPolicy$,
44427
+ PutBucketOwnershipControlsRequest$: () => PutBucketOwnershipControlsRequest$,
44428
+ PutBucketOwnershipControlsCommand: () => PutBucketOwnershipControlsCommand,
44429
+ PutBucketOwnershipControls$: () => PutBucketOwnershipControls$,
44430
+ PutBucketNotificationConfigurationRequest$: () => PutBucketNotificationConfigurationRequest$,
44431
+ PutBucketNotificationConfigurationCommand: () => PutBucketNotificationConfigurationCommand,
44432
+ PutBucketNotificationConfiguration$: () => PutBucketNotificationConfiguration$,
44433
+ PutBucketMetricsConfigurationRequest$: () => PutBucketMetricsConfigurationRequest$,
44434
+ PutBucketMetricsConfigurationCommand: () => PutBucketMetricsConfigurationCommand,
44435
+ PutBucketMetricsConfiguration$: () => PutBucketMetricsConfiguration$,
44436
+ PutBucketLoggingRequest$: () => PutBucketLoggingRequest$,
44437
+ PutBucketLoggingCommand: () => PutBucketLoggingCommand,
44438
+ PutBucketLogging$: () => PutBucketLogging$,
44439
+ PutBucketLifecycleConfigurationRequest$: () => PutBucketLifecycleConfigurationRequest$,
44440
+ PutBucketLifecycleConfigurationOutput$: () => PutBucketLifecycleConfigurationOutput$,
44441
+ PutBucketLifecycleConfigurationCommand: () => PutBucketLifecycleConfigurationCommand,
44442
+ PutBucketLifecycleConfiguration$: () => PutBucketLifecycleConfiguration$,
44443
+ PutBucketInventoryConfigurationRequest$: () => PutBucketInventoryConfigurationRequest$,
44444
+ PutBucketInventoryConfigurationCommand: () => PutBucketInventoryConfigurationCommand,
44445
+ PutBucketInventoryConfiguration$: () => PutBucketInventoryConfiguration$,
44446
+ PutBucketIntelligentTieringConfigurationRequest$: () => PutBucketIntelligentTieringConfigurationRequest$,
44447
+ PutBucketIntelligentTieringConfigurationCommand: () => PutBucketIntelligentTieringConfigurationCommand,
44448
+ PutBucketIntelligentTieringConfiguration$: () => PutBucketIntelligentTieringConfiguration$,
44449
+ PutBucketEncryptionRequest$: () => PutBucketEncryptionRequest$,
44450
+ PutBucketEncryptionCommand: () => PutBucketEncryptionCommand,
44451
+ PutBucketEncryption$: () => PutBucketEncryption$,
44452
+ PutBucketCorsRequest$: () => PutBucketCorsRequest$,
44453
+ PutBucketCorsCommand: () => PutBucketCorsCommand,
44454
+ PutBucketCors$: () => PutBucketCors$,
44455
+ PutBucketAnalyticsConfigurationRequest$: () => PutBucketAnalyticsConfigurationRequest$,
44456
+ PutBucketAnalyticsConfigurationCommand: () => PutBucketAnalyticsConfigurationCommand,
44457
+ PutBucketAnalyticsConfiguration$: () => PutBucketAnalyticsConfiguration$,
44458
+ PutBucketAclRequest$: () => PutBucketAclRequest$,
44459
+ PutBucketAclCommand: () => PutBucketAclCommand,
44460
+ PutBucketAcl$: () => PutBucketAcl$,
44461
+ PutBucketAccelerateConfigurationRequest$: () => PutBucketAccelerateConfigurationRequest$,
44462
+ PutBucketAccelerateConfigurationCommand: () => PutBucketAccelerateConfigurationCommand,
44463
+ PutBucketAccelerateConfiguration$: () => PutBucketAccelerateConfiguration$,
44464
+ PutBucketAbacRequest$: () => PutBucketAbacRequest$,
44465
+ PutBucketAbacCommand: () => PutBucketAbacCommand,
44466
+ PutBucketAbac$: () => PutBucketAbac$,
44467
+ PublicAccessBlockConfiguration$: () => PublicAccessBlockConfiguration$,
44468
+ Protocol: () => Protocol,
44469
+ ProgressEvent$: () => ProgressEvent$,
44470
+ Progress$: () => Progress$,
44471
+ PolicyStatus$: () => PolicyStatus$,
44472
+ Permission: () => Permission,
44473
+ Payer: () => Payer,
44474
+ PartitionedPrefix$: () => PartitionedPrefix$,
44475
+ PartitionDateSource: () => PartitionDateSource,
44476
+ Part$: () => Part$,
44477
+ ParquetInput$: () => ParquetInput$,
44478
+ OwnershipControlsRule$: () => OwnershipControlsRule$,
44479
+ OwnershipControls$: () => OwnershipControls$,
44480
+ OwnerOverride: () => OwnerOverride,
44481
+ Owner$: () => Owner$,
44482
+ OutputSerialization$: () => OutputSerialization$,
44483
+ OutputLocation$: () => OutputLocation$,
44484
+ OptionalObjectAttributes: () => OptionalObjectAttributes,
44485
+ ObjectVersionStorageClass: () => ObjectVersionStorageClass,
44486
+ ObjectVersion$: () => ObjectVersion$,
44487
+ ObjectStorageClass: () => ObjectStorageClass,
44488
+ ObjectPart$: () => ObjectPart$,
44489
+ ObjectOwnership: () => ObjectOwnership,
44490
+ ObjectNotInActiveTierError$: () => ObjectNotInActiveTierError$,
44491
+ ObjectNotInActiveTierError: () => ObjectNotInActiveTierError,
44492
+ ObjectLockRule$: () => ObjectLockRule$,
44493
+ ObjectLockRetentionMode: () => ObjectLockRetentionMode,
44494
+ ObjectLockRetention$: () => ObjectLockRetention$,
44495
+ ObjectLockMode: () => ObjectLockMode,
44496
+ ObjectLockLegalHoldStatus: () => ObjectLockLegalHoldStatus,
44497
+ ObjectLockLegalHold$: () => ObjectLockLegalHold$,
44498
+ ObjectLockEnabled: () => ObjectLockEnabled,
44499
+ ObjectLockConfiguration$: () => ObjectLockConfiguration$,
44500
+ ObjectIdentifier$: () => ObjectIdentifier$,
44501
+ ObjectEncryption$: () => ObjectEncryption$,
44502
+ ObjectCannedACL: () => ObjectCannedACL,
44503
+ ObjectAttributes: () => ObjectAttributes,
44504
+ ObjectAlreadyInActiveTierError$: () => ObjectAlreadyInActiveTierError$,
44505
+ ObjectAlreadyInActiveTierError: () => ObjectAlreadyInActiveTierError,
44506
+ NotificationConfigurationFilter$: () => NotificationConfigurationFilter$,
44507
+ NotificationConfiguration$: () => NotificationConfiguration$,
44508
+ NotFound$: () => NotFound$,
44509
+ NotFound: () => NotFound,
44510
+ NoncurrentVersionTransition$: () => NoncurrentVersionTransition$,
44511
+ NoncurrentVersionExpiration$: () => NoncurrentVersionExpiration$,
44512
+ NoSuchUpload$: () => NoSuchUpload$,
44513
+ NoSuchUpload: () => NoSuchUpload,
44514
+ NoSuchKey$: () => NoSuchKey$,
44515
+ NoSuchKey: () => NoSuchKey,
44516
+ NoSuchBucket$: () => NoSuchBucket$,
44517
+ NoSuchBucket: () => NoSuchBucket,
44518
+ MultipartUpload$: () => MultipartUpload$,
44519
+ MetricsStatus: () => MetricsStatus,
44520
+ MetricsFilter$: () => MetricsFilter$,
44521
+ MetricsConfiguration$: () => MetricsConfiguration$,
44522
+ MetricsAndOperator$: () => MetricsAndOperator$,
44523
+ Metrics$: () => Metrics$,
44524
+ MetadataTableEncryptionConfiguration$: () => MetadataTableEncryptionConfiguration$,
44525
+ MetadataTableConfigurationResult$: () => MetadataTableConfigurationResult$,
44526
+ MetadataTableConfiguration$: () => MetadataTableConfiguration$,
44527
+ MetadataEntry$: () => MetadataEntry$,
44528
+ MetadataDirective: () => MetadataDirective,
44529
+ MetadataConfigurationResult$: () => MetadataConfigurationResult$,
44530
+ MetadataConfiguration$: () => MetadataConfiguration$,
44531
+ MFADeleteStatus: () => MFADeleteStatus,
44532
+ MFADelete: () => MFADelete,
44533
+ LoggingEnabled$: () => LoggingEnabled$,
44534
+ LocationType: () => LocationType,
44535
+ LocationInfo$: () => LocationInfo$,
44536
+ ListPartsRequest$: () => ListPartsRequest$,
44537
+ ListPartsOutput$: () => ListPartsOutput$,
44538
+ ListPartsCommand: () => ListPartsCommand,
44539
+ ListParts$: () => ListParts$,
44540
+ ListObjectsV2Request$: () => ListObjectsV2Request$,
44541
+ ListObjectsV2Output$: () => ListObjectsV2Output$,
44542
+ ListObjectsV2Command: () => ListObjectsV2Command,
44543
+ ListObjectsV2$: () => ListObjectsV2$,
44544
+ ListObjectsRequest$: () => ListObjectsRequest$,
44545
+ ListObjectsOutput$: () => ListObjectsOutput$,
44546
+ ListObjectsCommand: () => ListObjectsCommand,
44547
+ ListObjects$: () => ListObjects$,
44548
+ ListObjectVersionsRequest$: () => ListObjectVersionsRequest$,
44549
+ ListObjectVersionsOutput$: () => ListObjectVersionsOutput$,
44550
+ ListObjectVersionsCommand: () => ListObjectVersionsCommand,
44551
+ ListObjectVersions$: () => ListObjectVersions$,
44552
+ ListMultipartUploadsRequest$: () => ListMultipartUploadsRequest$,
44553
+ ListMultipartUploadsOutput$: () => ListMultipartUploadsOutput$,
44554
+ ListMultipartUploadsCommand: () => ListMultipartUploadsCommand,
44555
+ ListMultipartUploads$: () => ListMultipartUploads$,
44556
+ ListDirectoryBucketsRequest$: () => ListDirectoryBucketsRequest$,
44557
+ ListDirectoryBucketsOutput$: () => ListDirectoryBucketsOutput$,
44558
+ ListDirectoryBucketsCommand: () => ListDirectoryBucketsCommand,
44559
+ ListDirectoryBuckets$: () => ListDirectoryBuckets$,
44560
+ ListBucketsRequest$: () => ListBucketsRequest$,
44561
+ ListBucketsOutput$: () => ListBucketsOutput$,
44562
+ ListBucketsCommand: () => ListBucketsCommand,
44563
+ ListBuckets$: () => ListBuckets$,
44564
+ ListBucketMetricsConfigurationsRequest$: () => ListBucketMetricsConfigurationsRequest$,
44565
+ ListBucketMetricsConfigurationsOutput$: () => ListBucketMetricsConfigurationsOutput$,
44566
+ ListBucketMetricsConfigurationsCommand: () => ListBucketMetricsConfigurationsCommand,
44567
+ ListBucketMetricsConfigurations$: () => ListBucketMetricsConfigurations$,
44568
+ ListBucketInventoryConfigurationsRequest$: () => ListBucketInventoryConfigurationsRequest$,
44569
+ ListBucketInventoryConfigurationsOutput$: () => ListBucketInventoryConfigurationsOutput$,
44570
+ ListBucketInventoryConfigurationsCommand: () => ListBucketInventoryConfigurationsCommand,
44571
+ ListBucketInventoryConfigurations$: () => ListBucketInventoryConfigurations$,
44572
+ ListBucketIntelligentTieringConfigurationsRequest$: () => ListBucketIntelligentTieringConfigurationsRequest$,
44573
+ ListBucketIntelligentTieringConfigurationsOutput$: () => ListBucketIntelligentTieringConfigurationsOutput$,
44574
+ ListBucketIntelligentTieringConfigurationsCommand: () => ListBucketIntelligentTieringConfigurationsCommand,
44575
+ ListBucketIntelligentTieringConfigurations$: () => ListBucketIntelligentTieringConfigurations$,
44576
+ ListBucketAnalyticsConfigurationsRequest$: () => ListBucketAnalyticsConfigurationsRequest$,
44577
+ ListBucketAnalyticsConfigurationsOutput$: () => ListBucketAnalyticsConfigurationsOutput$,
44578
+ ListBucketAnalyticsConfigurationsCommand: () => ListBucketAnalyticsConfigurationsCommand,
44579
+ ListBucketAnalyticsConfigurations$: () => ListBucketAnalyticsConfigurations$,
44580
+ LifecycleRuleFilter$: () => LifecycleRuleFilter$,
44581
+ LifecycleRuleAndOperator$: () => LifecycleRuleAndOperator$,
44582
+ LifecycleRule$: () => LifecycleRule$,
44583
+ LifecycleExpiration$: () => LifecycleExpiration$,
44584
+ LambdaFunctionConfiguration$: () => LambdaFunctionConfiguration$,
44585
+ JournalTableConfigurationUpdates$: () => JournalTableConfigurationUpdates$,
44586
+ JournalTableConfigurationResult$: () => JournalTableConfigurationResult$,
44587
+ JournalTableConfiguration$: () => JournalTableConfiguration$,
44588
+ JSONType: () => JSONType,
44589
+ JSONOutput$: () => JSONOutput$,
44590
+ JSONInput$: () => JSONInput$,
44591
+ InventoryTableConfigurationUpdates$: () => InventoryTableConfigurationUpdates$,
44592
+ InventoryTableConfigurationResult$: () => InventoryTableConfigurationResult$,
44593
+ InventoryTableConfiguration$: () => InventoryTableConfiguration$,
44594
+ InventorySchedule$: () => InventorySchedule$,
44595
+ InventoryS3BucketDestination$: () => InventoryS3BucketDestination$,
44596
+ InventoryOptionalField: () => InventoryOptionalField,
44597
+ InventoryIncludedObjectVersions: () => InventoryIncludedObjectVersions,
44598
+ InventoryFrequency: () => InventoryFrequency,
44599
+ InventoryFormat: () => InventoryFormat,
44600
+ InventoryFilter$: () => InventoryFilter$,
44601
+ InventoryEncryption$: () => InventoryEncryption$,
44602
+ InventoryDestination$: () => InventoryDestination$,
44603
+ InventoryConfigurationState: () => InventoryConfigurationState,
44604
+ InventoryConfiguration$: () => InventoryConfiguration$,
44605
+ InvalidWriteOffset$: () => InvalidWriteOffset$,
44606
+ InvalidWriteOffset: () => InvalidWriteOffset,
44607
+ InvalidRequest$: () => InvalidRequest$,
44608
+ InvalidRequest: () => InvalidRequest,
44609
+ InvalidObjectState$: () => InvalidObjectState$,
44610
+ InvalidObjectState: () => InvalidObjectState,
44611
+ IntelligentTieringStatus: () => IntelligentTieringStatus,
44612
+ IntelligentTieringFilter$: () => IntelligentTieringFilter$,
44613
+ IntelligentTieringConfiguration$: () => IntelligentTieringConfiguration$,
44614
+ IntelligentTieringAndOperator$: () => IntelligentTieringAndOperator$,
44615
+ IntelligentTieringAccessTier: () => IntelligentTieringAccessTier,
44616
+ InputSerialization$: () => InputSerialization$,
44617
+ Initiator$: () => Initiator$,
44618
+ IndexDocument$: () => IndexDocument$,
44619
+ IdempotencyParameterMismatch$: () => IdempotencyParameterMismatch$,
44620
+ IdempotencyParameterMismatch: () => IdempotencyParameterMismatch,
44621
+ HeadObjectRequest$: () => HeadObjectRequest$,
44622
+ HeadObjectOutput$: () => HeadObjectOutput$,
44623
+ HeadObjectCommand: () => HeadObjectCommand,
44624
+ HeadObject$: () => HeadObject$,
44625
+ HeadBucketRequest$: () => HeadBucketRequest$,
44626
+ HeadBucketOutput$: () => HeadBucketOutput$,
44627
+ HeadBucketCommand: () => HeadBucketCommand,
44628
+ HeadBucket$: () => HeadBucket$,
44629
+ Grantee$: () => Grantee$,
44630
+ Grant$: () => Grant$,
44631
+ GlacierJobParameters$: () => GlacierJobParameters$,
44632
+ GetPublicAccessBlockRequest$: () => GetPublicAccessBlockRequest$,
44633
+ GetPublicAccessBlockOutput$: () => GetPublicAccessBlockOutput$,
44634
+ GetPublicAccessBlockCommand: () => GetPublicAccessBlockCommand,
44635
+ GetPublicAccessBlock$: () => GetPublicAccessBlock$,
44636
+ GetObjectTorrentRequest$: () => GetObjectTorrentRequest$,
44637
+ GetObjectTorrentOutput$: () => GetObjectTorrentOutput$,
44638
+ GetObjectTorrentCommand: () => GetObjectTorrentCommand,
44639
+ GetObjectTorrent$: () => GetObjectTorrent$,
44640
+ GetObjectTaggingRequest$: () => GetObjectTaggingRequest$,
44641
+ GetObjectTaggingOutput$: () => GetObjectTaggingOutput$,
44642
+ GetObjectTaggingCommand: () => GetObjectTaggingCommand,
44643
+ GetObjectTagging$: () => GetObjectTagging$,
44644
+ GetObjectRetentionRequest$: () => GetObjectRetentionRequest$,
44645
+ GetObjectRetentionOutput$: () => GetObjectRetentionOutput$,
44646
+ GetObjectRetentionCommand: () => GetObjectRetentionCommand,
44647
+ GetObjectRetention$: () => GetObjectRetention$,
44648
+ GetObjectRequest$: () => GetObjectRequest$,
44649
+ GetObjectOutput$: () => GetObjectOutput$,
44650
+ GetObjectLockConfigurationRequest$: () => GetObjectLockConfigurationRequest$,
44651
+ GetObjectLockConfigurationOutput$: () => GetObjectLockConfigurationOutput$,
44652
+ GetObjectLockConfigurationCommand: () => GetObjectLockConfigurationCommand,
44653
+ GetObjectLockConfiguration$: () => GetObjectLockConfiguration$,
44654
+ GetObjectLegalHoldRequest$: () => GetObjectLegalHoldRequest$,
44655
+ GetObjectLegalHoldOutput$: () => GetObjectLegalHoldOutput$,
44656
+ GetObjectLegalHoldCommand: () => GetObjectLegalHoldCommand,
44657
+ GetObjectLegalHold$: () => GetObjectLegalHold$,
44658
+ GetObjectCommand: () => GetObjectCommand,
44659
+ GetObjectAttributesRequest$: () => GetObjectAttributesRequest$,
44660
+ GetObjectAttributesParts$: () => GetObjectAttributesParts$,
44661
+ GetObjectAttributesOutput$: () => GetObjectAttributesOutput$,
44662
+ GetObjectAttributesCommand: () => GetObjectAttributesCommand,
44663
+ GetObjectAttributes$: () => GetObjectAttributes$,
44664
+ GetObjectAclRequest$: () => GetObjectAclRequest$,
44665
+ GetObjectAclOutput$: () => GetObjectAclOutput$,
44666
+ GetObjectAclCommand: () => GetObjectAclCommand,
44667
+ GetObjectAcl$: () => GetObjectAcl$,
44668
+ GetObject$: () => GetObject$,
44669
+ GetBucketWebsiteRequest$: () => GetBucketWebsiteRequest$,
44670
+ GetBucketWebsiteOutput$: () => GetBucketWebsiteOutput$,
44671
+ GetBucketWebsiteCommand: () => GetBucketWebsiteCommand,
44672
+ GetBucketWebsite$: () => GetBucketWebsite$,
44673
+ GetBucketVersioningRequest$: () => GetBucketVersioningRequest$,
44674
+ GetBucketVersioningOutput$: () => GetBucketVersioningOutput$,
44675
+ GetBucketVersioningCommand: () => GetBucketVersioningCommand,
44676
+ GetBucketVersioning$: () => GetBucketVersioning$,
44677
+ GetBucketTaggingRequest$: () => GetBucketTaggingRequest$,
44678
+ GetBucketTaggingOutput$: () => GetBucketTaggingOutput$,
44679
+ GetBucketTaggingCommand: () => GetBucketTaggingCommand,
44680
+ GetBucketTagging$: () => GetBucketTagging$,
44681
+ GetBucketRequestPaymentRequest$: () => GetBucketRequestPaymentRequest$,
44682
+ GetBucketRequestPaymentOutput$: () => GetBucketRequestPaymentOutput$,
44683
+ GetBucketRequestPaymentCommand: () => GetBucketRequestPaymentCommand,
44684
+ GetBucketRequestPayment$: () => GetBucketRequestPayment$,
44685
+ GetBucketReplicationRequest$: () => GetBucketReplicationRequest$,
44686
+ GetBucketReplicationOutput$: () => GetBucketReplicationOutput$,
44687
+ GetBucketReplicationCommand: () => GetBucketReplicationCommand,
44688
+ GetBucketReplication$: () => GetBucketReplication$,
44689
+ GetBucketPolicyStatusRequest$: () => GetBucketPolicyStatusRequest$,
44690
+ GetBucketPolicyStatusOutput$: () => GetBucketPolicyStatusOutput$,
44691
+ GetBucketPolicyStatusCommand: () => GetBucketPolicyStatusCommand,
44692
+ GetBucketPolicyStatus$: () => GetBucketPolicyStatus$,
44693
+ GetBucketPolicyRequest$: () => GetBucketPolicyRequest$,
44694
+ GetBucketPolicyOutput$: () => GetBucketPolicyOutput$,
44695
+ GetBucketPolicyCommand: () => GetBucketPolicyCommand,
44696
+ GetBucketPolicy$: () => GetBucketPolicy$,
44697
+ GetBucketOwnershipControlsRequest$: () => GetBucketOwnershipControlsRequest$,
44698
+ GetBucketOwnershipControlsOutput$: () => GetBucketOwnershipControlsOutput$,
44699
+ GetBucketOwnershipControlsCommand: () => GetBucketOwnershipControlsCommand,
44700
+ GetBucketOwnershipControls$: () => GetBucketOwnershipControls$,
44701
+ GetBucketNotificationConfigurationRequest$: () => GetBucketNotificationConfigurationRequest$,
44702
+ GetBucketNotificationConfigurationCommand: () => GetBucketNotificationConfigurationCommand,
44703
+ GetBucketNotificationConfiguration$: () => GetBucketNotificationConfiguration$,
44704
+ GetBucketMetricsConfigurationRequest$: () => GetBucketMetricsConfigurationRequest$,
44705
+ GetBucketMetricsConfigurationOutput$: () => GetBucketMetricsConfigurationOutput$,
44706
+ GetBucketMetricsConfigurationCommand: () => GetBucketMetricsConfigurationCommand,
44707
+ GetBucketMetricsConfiguration$: () => GetBucketMetricsConfiguration$,
44708
+ GetBucketMetadataTableConfigurationResult$: () => GetBucketMetadataTableConfigurationResult$,
44709
+ GetBucketMetadataTableConfigurationRequest$: () => GetBucketMetadataTableConfigurationRequest$,
44710
+ GetBucketMetadataTableConfigurationOutput$: () => GetBucketMetadataTableConfigurationOutput$,
44711
+ GetBucketMetadataTableConfigurationCommand: () => GetBucketMetadataTableConfigurationCommand,
44712
+ GetBucketMetadataTableConfiguration$: () => GetBucketMetadataTableConfiguration$,
44713
+ GetBucketMetadataConfigurationResult$: () => GetBucketMetadataConfigurationResult$,
44714
+ GetBucketMetadataConfigurationRequest$: () => GetBucketMetadataConfigurationRequest$,
44715
+ GetBucketMetadataConfigurationOutput$: () => GetBucketMetadataConfigurationOutput$,
44716
+ GetBucketMetadataConfigurationCommand: () => GetBucketMetadataConfigurationCommand,
44717
+ GetBucketMetadataConfiguration$: () => GetBucketMetadataConfiguration$,
44718
+ GetBucketLoggingRequest$: () => GetBucketLoggingRequest$,
44719
+ GetBucketLoggingOutput$: () => GetBucketLoggingOutput$,
44720
+ GetBucketLoggingCommand: () => GetBucketLoggingCommand,
44721
+ GetBucketLogging$: () => GetBucketLogging$,
44722
+ GetBucketLocationRequest$: () => GetBucketLocationRequest$,
44723
+ GetBucketLocationOutput$: () => GetBucketLocationOutput$,
44724
+ GetBucketLocationCommand: () => GetBucketLocationCommand,
44725
+ GetBucketLocation$: () => GetBucketLocation$,
44726
+ GetBucketLifecycleConfigurationRequest$: () => GetBucketLifecycleConfigurationRequest$,
44727
+ GetBucketLifecycleConfigurationOutput$: () => GetBucketLifecycleConfigurationOutput$,
44728
+ GetBucketLifecycleConfigurationCommand: () => GetBucketLifecycleConfigurationCommand,
44729
+ GetBucketLifecycleConfiguration$: () => GetBucketLifecycleConfiguration$,
44730
+ GetBucketInventoryConfigurationRequest$: () => GetBucketInventoryConfigurationRequest$,
44731
+ GetBucketInventoryConfigurationOutput$: () => GetBucketInventoryConfigurationOutput$,
44732
+ GetBucketInventoryConfigurationCommand: () => GetBucketInventoryConfigurationCommand,
44733
+ GetBucketInventoryConfiguration$: () => GetBucketInventoryConfiguration$,
44734
+ GetBucketIntelligentTieringConfigurationRequest$: () => GetBucketIntelligentTieringConfigurationRequest$,
44735
+ GetBucketIntelligentTieringConfigurationOutput$: () => GetBucketIntelligentTieringConfigurationOutput$,
44736
+ GetBucketIntelligentTieringConfigurationCommand: () => GetBucketIntelligentTieringConfigurationCommand,
44737
+ GetBucketIntelligentTieringConfiguration$: () => GetBucketIntelligentTieringConfiguration$,
44738
+ GetBucketEncryptionRequest$: () => GetBucketEncryptionRequest$,
44739
+ GetBucketEncryptionOutput$: () => GetBucketEncryptionOutput$,
44740
+ GetBucketEncryptionCommand: () => GetBucketEncryptionCommand,
44741
+ GetBucketEncryption$: () => GetBucketEncryption$,
44742
+ GetBucketCorsRequest$: () => GetBucketCorsRequest$,
44743
+ GetBucketCorsOutput$: () => GetBucketCorsOutput$,
44744
+ GetBucketCorsCommand: () => GetBucketCorsCommand,
44745
+ GetBucketCors$: () => GetBucketCors$,
44746
+ GetBucketAnalyticsConfigurationRequest$: () => GetBucketAnalyticsConfigurationRequest$,
44747
+ GetBucketAnalyticsConfigurationOutput$: () => GetBucketAnalyticsConfigurationOutput$,
44748
+ GetBucketAnalyticsConfigurationCommand: () => GetBucketAnalyticsConfigurationCommand,
44749
+ GetBucketAnalyticsConfiguration$: () => GetBucketAnalyticsConfiguration$,
44750
+ GetBucketAclRequest$: () => GetBucketAclRequest$,
44751
+ GetBucketAclOutput$: () => GetBucketAclOutput$,
44752
+ GetBucketAclCommand: () => GetBucketAclCommand,
44753
+ GetBucketAcl$: () => GetBucketAcl$,
44754
+ GetBucketAccelerateConfigurationRequest$: () => GetBucketAccelerateConfigurationRequest$,
44755
+ GetBucketAccelerateConfigurationOutput$: () => GetBucketAccelerateConfigurationOutput$,
44756
+ GetBucketAccelerateConfigurationCommand: () => GetBucketAccelerateConfigurationCommand,
44757
+ GetBucketAccelerateConfiguration$: () => GetBucketAccelerateConfiguration$,
44758
+ GetBucketAbacRequest$: () => GetBucketAbacRequest$,
44759
+ GetBucketAbacOutput$: () => GetBucketAbacOutput$,
44760
+ GetBucketAbacCommand: () => GetBucketAbacCommand,
44761
+ GetBucketAbac$: () => GetBucketAbac$,
44762
+ FilterRuleName: () => FilterRuleName,
44763
+ FilterRule$: () => FilterRule$,
44764
+ FileHeaderInfo: () => FileHeaderInfo,
44765
+ ExpressionType: () => ExpressionType,
44766
+ ExpirationStatus: () => ExpirationStatus,
44767
+ ExpirationState: () => ExpirationState,
44768
+ ExistingObjectReplicationStatus: () => ExistingObjectReplicationStatus,
44769
+ ExistingObjectReplication$: () => ExistingObjectReplication$,
44770
+ EventBridgeConfiguration$: () => EventBridgeConfiguration$,
44771
+ Event: () => Event,
44772
+ ErrorDocument$: () => ErrorDocument$,
44773
+ ErrorDetails$: () => ErrorDetails$,
44774
+ EndEvent$: () => EndEvent$,
44775
+ EncryptionTypeMismatch$: () => EncryptionTypeMismatch$,
44776
+ EncryptionTypeMismatch: () => EncryptionTypeMismatch,
44777
+ EncryptionType: () => EncryptionType,
44778
+ EncryptionConfiguration$: () => EncryptionConfiguration$,
44779
+ Encryption$: () => Encryption$,
44780
+ EncodingType: () => EncodingType,
44781
+ DestinationResult$: () => DestinationResult$,
44782
+ Destination$: () => Destination$,
44783
+ DeletedObject$: () => DeletedObject$,
44784
+ DeletePublicAccessBlockRequest$: () => DeletePublicAccessBlockRequest$,
44785
+ DeletePublicAccessBlockCommand: () => DeletePublicAccessBlockCommand,
44786
+ DeletePublicAccessBlock$: () => DeletePublicAccessBlock$,
44787
+ DeleteObjectsRequest$: () => DeleteObjectsRequest$,
44788
+ DeleteObjectsOutput$: () => DeleteObjectsOutput$,
44789
+ DeleteObjectsCommand: () => DeleteObjectsCommand,
44790
+ DeleteObjects$: () => DeleteObjects$,
44791
+ DeleteObjectTaggingRequest$: () => DeleteObjectTaggingRequest$,
44792
+ DeleteObjectTaggingOutput$: () => DeleteObjectTaggingOutput$,
44793
+ DeleteObjectTaggingCommand: () => DeleteObjectTaggingCommand,
44794
+ DeleteObjectTagging$: () => DeleteObjectTagging$,
44795
+ DeleteObjectRequest$: () => DeleteObjectRequest$,
44796
+ DeleteObjectOutput$: () => DeleteObjectOutput$,
44797
+ DeleteObjectCommand: () => DeleteObjectCommand,
44798
+ DeleteObject$: () => DeleteObject$,
44799
+ DeleteMarkerReplicationStatus: () => DeleteMarkerReplicationStatus,
44800
+ DeleteMarkerReplication$: () => DeleteMarkerReplication$,
44801
+ DeleteMarkerEntry$: () => DeleteMarkerEntry$,
44802
+ DeleteBucketWebsiteRequest$: () => DeleteBucketWebsiteRequest$,
44803
+ DeleteBucketWebsiteCommand: () => DeleteBucketWebsiteCommand,
44804
+ DeleteBucketWebsite$: () => DeleteBucketWebsite$,
44805
+ DeleteBucketTaggingRequest$: () => DeleteBucketTaggingRequest$,
44806
+ DeleteBucketTaggingCommand: () => DeleteBucketTaggingCommand,
44807
+ DeleteBucketTagging$: () => DeleteBucketTagging$,
44808
+ DeleteBucketRequest$: () => DeleteBucketRequest$,
44809
+ DeleteBucketReplicationRequest$: () => DeleteBucketReplicationRequest$,
44810
+ DeleteBucketReplicationCommand: () => DeleteBucketReplicationCommand,
44811
+ DeleteBucketReplication$: () => DeleteBucketReplication$,
44812
+ DeleteBucketPolicyRequest$: () => DeleteBucketPolicyRequest$,
44813
+ DeleteBucketPolicyCommand: () => DeleteBucketPolicyCommand,
44814
+ DeleteBucketPolicy$: () => DeleteBucketPolicy$,
44815
+ DeleteBucketOwnershipControlsRequest$: () => DeleteBucketOwnershipControlsRequest$,
44816
+ DeleteBucketOwnershipControlsCommand: () => DeleteBucketOwnershipControlsCommand,
44817
+ DeleteBucketOwnershipControls$: () => DeleteBucketOwnershipControls$,
44818
+ DeleteBucketMetricsConfigurationRequest$: () => DeleteBucketMetricsConfigurationRequest$,
44819
+ DeleteBucketMetricsConfigurationCommand: () => DeleteBucketMetricsConfigurationCommand,
44820
+ DeleteBucketMetricsConfiguration$: () => DeleteBucketMetricsConfiguration$,
44821
+ DeleteBucketMetadataTableConfigurationRequest$: () => DeleteBucketMetadataTableConfigurationRequest$,
44822
+ DeleteBucketMetadataTableConfigurationCommand: () => DeleteBucketMetadataTableConfigurationCommand,
44823
+ DeleteBucketMetadataTableConfiguration$: () => DeleteBucketMetadataTableConfiguration$,
44824
+ DeleteBucketMetadataConfigurationRequest$: () => DeleteBucketMetadataConfigurationRequest$,
44825
+ DeleteBucketMetadataConfigurationCommand: () => DeleteBucketMetadataConfigurationCommand,
44826
+ DeleteBucketMetadataConfiguration$: () => DeleteBucketMetadataConfiguration$,
44827
+ DeleteBucketLifecycleRequest$: () => DeleteBucketLifecycleRequest$,
44828
+ DeleteBucketLifecycleCommand: () => DeleteBucketLifecycleCommand,
44829
+ DeleteBucketLifecycle$: () => DeleteBucketLifecycle$,
44830
+ DeleteBucketInventoryConfigurationRequest$: () => DeleteBucketInventoryConfigurationRequest$,
44831
+ DeleteBucketInventoryConfigurationCommand: () => DeleteBucketInventoryConfigurationCommand,
44832
+ DeleteBucketInventoryConfiguration$: () => DeleteBucketInventoryConfiguration$,
44833
+ DeleteBucketIntelligentTieringConfigurationRequest$: () => DeleteBucketIntelligentTieringConfigurationRequest$,
44834
+ DeleteBucketIntelligentTieringConfigurationCommand: () => DeleteBucketIntelligentTieringConfigurationCommand,
44835
+ DeleteBucketIntelligentTieringConfiguration$: () => DeleteBucketIntelligentTieringConfiguration$,
44836
+ DeleteBucketEncryptionRequest$: () => DeleteBucketEncryptionRequest$,
44837
+ DeleteBucketEncryptionCommand: () => DeleteBucketEncryptionCommand,
44838
+ DeleteBucketEncryption$: () => DeleteBucketEncryption$,
44839
+ DeleteBucketCorsRequest$: () => DeleteBucketCorsRequest$,
44840
+ DeleteBucketCorsCommand: () => DeleteBucketCorsCommand,
44841
+ DeleteBucketCors$: () => DeleteBucketCors$,
44842
+ DeleteBucketCommand: () => DeleteBucketCommand,
44843
+ DeleteBucketAnalyticsConfigurationRequest$: () => DeleteBucketAnalyticsConfigurationRequest$,
44844
+ DeleteBucketAnalyticsConfigurationCommand: () => DeleteBucketAnalyticsConfigurationCommand,
44845
+ DeleteBucketAnalyticsConfiguration$: () => DeleteBucketAnalyticsConfiguration$,
44846
+ DeleteBucket$: () => DeleteBucket$,
44847
+ Delete$: () => Delete$,
44848
+ DefaultRetention$: () => DefaultRetention$,
44849
+ DataRedundancy: () => DataRedundancy,
44850
+ CreateSessionRequest$: () => CreateSessionRequest$,
44851
+ CreateSessionOutput$: () => CreateSessionOutput$,
44852
+ CreateSessionCommand: () => CreateSessionCommand,
44853
+ CreateSession$: () => CreateSession$,
44854
+ CreateMultipartUploadRequest$: () => CreateMultipartUploadRequest$,
44855
+ CreateMultipartUploadOutput$: () => CreateMultipartUploadOutput$,
44856
+ CreateMultipartUploadCommand: () => CreateMultipartUploadCommand,
44857
+ CreateMultipartUpload$: () => CreateMultipartUpload$,
44858
+ CreateBucketRequest$: () => CreateBucketRequest$,
44859
+ CreateBucketOutput$: () => CreateBucketOutput$,
44860
+ CreateBucketMetadataTableConfigurationRequest$: () => CreateBucketMetadataTableConfigurationRequest$,
44861
+ CreateBucketMetadataTableConfigurationCommand: () => CreateBucketMetadataTableConfigurationCommand,
44862
+ CreateBucketMetadataTableConfiguration$: () => CreateBucketMetadataTableConfiguration$,
44863
+ CreateBucketMetadataConfigurationRequest$: () => CreateBucketMetadataConfigurationRequest$,
44864
+ CreateBucketMetadataConfigurationCommand: () => CreateBucketMetadataConfigurationCommand,
44865
+ CreateBucketMetadataConfiguration$: () => CreateBucketMetadataConfiguration$,
44866
+ CreateBucketConfiguration$: () => CreateBucketConfiguration$,
44867
+ CreateBucketCommand: () => CreateBucketCommand,
44868
+ CreateBucket$: () => CreateBucket$,
44869
+ CopyPartResult$: () => CopyPartResult$,
44870
+ CopyObjectResult$: () => CopyObjectResult$,
44871
+ CopyObjectRequest$: () => CopyObjectRequest$,
44872
+ CopyObjectOutput$: () => CopyObjectOutput$,
44873
+ CopyObjectCommand: () => CopyObjectCommand,
44874
+ CopyObject$: () => CopyObject$,
44875
+ ContinuationEvent$: () => ContinuationEvent$,
44876
+ Condition$: () => Condition$,
44877
+ CompressionType: () => CompressionType,
44878
+ CompletedPart$: () => CompletedPart$,
44879
+ CompletedMultipartUpload$: () => CompletedMultipartUpload$,
44880
+ CompleteMultipartUploadRequest$: () => CompleteMultipartUploadRequest$,
44881
+ CompleteMultipartUploadOutput$: () => CompleteMultipartUploadOutput$,
44882
+ CompleteMultipartUploadCommand: () => CompleteMultipartUploadCommand,
44883
+ CompleteMultipartUpload$: () => CompleteMultipartUpload$,
44884
+ CommonPrefix$: () => CommonPrefix$,
44885
+ ChecksumType: () => ChecksumType,
44886
+ ChecksumMode: () => ChecksumMode,
44887
+ ChecksumAlgorithm: () => ChecksumAlgorithm2,
44888
+ Checksum$: () => Checksum$,
44889
+ CSVOutput$: () => CSVOutput$,
44890
+ CSVInput$: () => CSVInput$,
44891
+ CORSRule$: () => CORSRule$,
44892
+ CORSConfiguration$: () => CORSConfiguration$,
44893
+ BucketVersioningStatus: () => BucketVersioningStatus,
44894
+ BucketType: () => BucketType,
44895
+ BucketNamespace: () => BucketNamespace,
44896
+ BucketLogsPermission: () => BucketLogsPermission,
44897
+ BucketLoggingStatus$: () => BucketLoggingStatus$,
44898
+ BucketLocationConstraint: () => BucketLocationConstraint,
44899
+ BucketLifecycleConfiguration$: () => BucketLifecycleConfiguration$,
44900
+ BucketInfo$: () => BucketInfo$,
44901
+ BucketCannedACL: () => BucketCannedACL,
44902
+ BucketAlreadyOwnedByYou$: () => BucketAlreadyOwnedByYou$,
44903
+ BucketAlreadyOwnedByYou: () => BucketAlreadyOwnedByYou,
44904
+ BucketAlreadyExists$: () => BucketAlreadyExists$,
44905
+ BucketAlreadyExists: () => BucketAlreadyExists,
44906
+ BucketAccelerateStatus: () => BucketAccelerateStatus,
44907
+ BucketAbacStatus: () => BucketAbacStatus,
44908
+ Bucket$: () => Bucket$,
44909
+ BlockedEncryptionTypes$: () => BlockedEncryptionTypes$,
44910
+ ArchiveStatus: () => ArchiveStatus,
44911
+ AnalyticsS3ExportFileFormat: () => AnalyticsS3ExportFileFormat,
44912
+ AnalyticsS3BucketDestination$: () => AnalyticsS3BucketDestination$,
44913
+ AnalyticsFilter$: () => AnalyticsFilter$,
44914
+ AnalyticsExportDestination$: () => AnalyticsExportDestination$,
44915
+ AnalyticsConfiguration$: () => AnalyticsConfiguration$,
44916
+ AnalyticsAndOperator$: () => AnalyticsAndOperator$,
44917
+ AccessDenied$: () => AccessDenied$,
44918
+ AccessDenied: () => AccessDenied,
44919
+ AccessControlTranslation$: () => AccessControlTranslation$,
44920
+ AccessControlPolicy$: () => AccessControlPolicy$,
44921
+ AccelerateConfiguration$: () => AccelerateConfiguration$,
44922
+ AbortMultipartUploadRequest$: () => AbortMultipartUploadRequest$,
44923
+ AbortMultipartUploadOutput$: () => AbortMultipartUploadOutput$,
44924
+ AbortMultipartUploadCommand: () => AbortMultipartUploadCommand,
44925
+ AbortMultipartUpload$: () => AbortMultipartUpload$,
44926
+ AbortIncompleteMultipartUpload$: () => AbortIncompleteMultipartUpload$,
44927
+ AbacStatus$: () => AbacStatus$
44928
+ });
43388
44929
  var init_dist_es27 = __esm(() => {
44930
+ init_S3ServiceException();
43389
44931
  init_S3Client();
43390
44932
  init_S3();
43391
44933
  init_commands();
@@ -44297,11 +45839,39 @@ var init_s3 = __esm(() => {
44297
45839
  init_sources();
44298
45840
  });
44299
45841
 
45842
+ // src/db/resolve.ts
45843
+ var exports_resolve = {};
45844
+ __export(exports_resolve, {
45845
+ resolveId: () => resolveId,
45846
+ requireId: () => requireId
45847
+ });
45848
+ function resolveId(partial, table) {
45849
+ const db2 = getDb();
45850
+ const exact = db2.query(`SELECT id FROM ${table} WHERE id = ?`).get(partial);
45851
+ if (exact)
45852
+ return exact.id;
45853
+ const matches = db2.query(`SELECT id FROM ${table} WHERE id LIKE ?`).all(`${partial}%`);
45854
+ if (matches.length === 1)
45855
+ return matches[0].id;
45856
+ if (matches.length > 1)
45857
+ throw new Error(`Ambiguous ID "${partial}" matches ${matches.length} ${table}: ${matches.map((m2) => m2.id).join(", ")}`);
45858
+ return null;
45859
+ }
45860
+ function requireId(partial, table) {
45861
+ const id = resolveId(partial, table);
45862
+ if (!id)
45863
+ throw new Error(`No ${table.slice(0, -1)} found matching "${partial}"`);
45864
+ return id;
45865
+ }
45866
+ var init_resolve = __esm(() => {
45867
+ init_database();
45868
+ });
45869
+
44300
45870
  // package.json
44301
45871
  var require_package2 = __commonJS((exports, module) => {
44302
45872
  module.exports = {
44303
45873
  name: "@hasna/files",
44304
- version: "0.2.0",
45874
+ version: "0.2.1",
44305
45875
  description: "Agent-first file management \u2014 index local folders and S3 buckets, tag, search, and retrieve files via CLI + MCP",
44306
45876
  type: "module",
44307
45877
  main: "dist/index.js",
@@ -44380,6 +45950,1628 @@ var require_package2 = __commonJS((exports, module) => {
44380
45950
  };
44381
45951
  });
44382
45952
 
45953
+ // node_modules/readdirp/esm/index.js
45954
+ import { stat, lstat, readdir, realpath } from "fs/promises";
45955
+ import { Readable as Readable3 } from "stream";
45956
+ import { resolve as presolve, relative as prelative, join as pjoin, sep as psep } from "path";
45957
+ function readdirp(root, options = {}) {
45958
+ let type = options.entryType || options.type;
45959
+ if (type === "both")
45960
+ type = EntryTypes.FILE_DIR_TYPE;
45961
+ if (type)
45962
+ options.type = type;
45963
+ if (!root) {
45964
+ throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
45965
+ } else if (typeof root !== "string") {
45966
+ throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
45967
+ } else if (type && !ALL_TYPES.includes(type)) {
45968
+ throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
45969
+ }
45970
+ options.root = root;
45971
+ return new ReaddirpStream(options);
45972
+ }
45973
+ var EntryTypes, defaultOptions, RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR", NORMAL_FLOW_ERRORS, ALL_TYPES, DIR_TYPES, FILE_TYPES, isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code), wantBigintFsStats, emptyFn = (_entryInfo) => true, normalizeFilter = (filter) => {
45974
+ if (filter === undefined)
45975
+ return emptyFn;
45976
+ if (typeof filter === "function")
45977
+ return filter;
45978
+ if (typeof filter === "string") {
45979
+ const fl = filter.trim();
45980
+ return (entry) => entry.basename === fl;
45981
+ }
45982
+ if (Array.isArray(filter)) {
45983
+ const trItems = filter.map((item) => item.trim());
45984
+ return (entry) => trItems.some((f2) => entry.basename === f2);
45985
+ }
45986
+ return emptyFn;
45987
+ }, ReaddirpStream;
45988
+ var init_esm2 = __esm(() => {
45989
+ EntryTypes = {
45990
+ FILE_TYPE: "files",
45991
+ DIR_TYPE: "directories",
45992
+ FILE_DIR_TYPE: "files_directories",
45993
+ EVERYTHING_TYPE: "all"
45994
+ };
45995
+ defaultOptions = {
45996
+ root: ".",
45997
+ fileFilter: (_entryInfo) => true,
45998
+ directoryFilter: (_entryInfo) => true,
45999
+ type: EntryTypes.FILE_TYPE,
46000
+ lstat: false,
46001
+ depth: 2147483648,
46002
+ alwaysStat: false,
46003
+ highWaterMark: 4096
46004
+ };
46005
+ Object.freeze(defaultOptions);
46006
+ NORMAL_FLOW_ERRORS = new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
46007
+ ALL_TYPES = [
46008
+ EntryTypes.DIR_TYPE,
46009
+ EntryTypes.EVERYTHING_TYPE,
46010
+ EntryTypes.FILE_DIR_TYPE,
46011
+ EntryTypes.FILE_TYPE
46012
+ ];
46013
+ DIR_TYPES = new Set([
46014
+ EntryTypes.DIR_TYPE,
46015
+ EntryTypes.EVERYTHING_TYPE,
46016
+ EntryTypes.FILE_DIR_TYPE
46017
+ ]);
46018
+ FILE_TYPES = new Set([
46019
+ EntryTypes.EVERYTHING_TYPE,
46020
+ EntryTypes.FILE_DIR_TYPE,
46021
+ EntryTypes.FILE_TYPE
46022
+ ]);
46023
+ wantBigintFsStats = process.platform === "win32";
46024
+ ReaddirpStream = class ReaddirpStream extends Readable3 {
46025
+ constructor(options = {}) {
46026
+ super({
46027
+ objectMode: true,
46028
+ autoDestroy: true,
46029
+ highWaterMark: options.highWaterMark
46030
+ });
46031
+ const opts = { ...defaultOptions, ...options };
46032
+ const { root, type } = opts;
46033
+ this._fileFilter = normalizeFilter(opts.fileFilter);
46034
+ this._directoryFilter = normalizeFilter(opts.directoryFilter);
46035
+ const statMethod = opts.lstat ? lstat : stat;
46036
+ if (wantBigintFsStats) {
46037
+ this._stat = (path) => statMethod(path, { bigint: true });
46038
+ } else {
46039
+ this._stat = statMethod;
46040
+ }
46041
+ this._maxDepth = opts.depth ?? defaultOptions.depth;
46042
+ this._wantsDir = type ? DIR_TYPES.has(type) : false;
46043
+ this._wantsFile = type ? FILE_TYPES.has(type) : false;
46044
+ this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
46045
+ this._root = presolve(root);
46046
+ this._isDirent = !opts.alwaysStat;
46047
+ this._statsProp = this._isDirent ? "dirent" : "stats";
46048
+ this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
46049
+ this.parents = [this._exploreDir(root, 1)];
46050
+ this.reading = false;
46051
+ this.parent = undefined;
46052
+ }
46053
+ async _read(batch) {
46054
+ if (this.reading)
46055
+ return;
46056
+ this.reading = true;
46057
+ try {
46058
+ while (!this.destroyed && batch > 0) {
46059
+ const par = this.parent;
46060
+ const fil = par && par.files;
46061
+ if (fil && fil.length > 0) {
46062
+ const { path, depth } = par;
46063
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
46064
+ const awaited = await Promise.all(slice);
46065
+ for (const entry of awaited) {
46066
+ if (!entry)
46067
+ continue;
46068
+ if (this.destroyed)
46069
+ return;
46070
+ const entryType = await this._getEntryType(entry);
46071
+ if (entryType === "directory" && this._directoryFilter(entry)) {
46072
+ if (depth <= this._maxDepth) {
46073
+ this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
46074
+ }
46075
+ if (this._wantsDir) {
46076
+ this.push(entry);
46077
+ batch--;
46078
+ }
46079
+ } else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
46080
+ if (this._wantsFile) {
46081
+ this.push(entry);
46082
+ batch--;
46083
+ }
46084
+ }
46085
+ }
46086
+ } else {
46087
+ const parent = this.parents.pop();
46088
+ if (!parent) {
46089
+ this.push(null);
46090
+ break;
46091
+ }
46092
+ this.parent = await parent;
46093
+ if (this.destroyed)
46094
+ return;
46095
+ }
46096
+ }
46097
+ } catch (error) {
46098
+ this.destroy(error);
46099
+ } finally {
46100
+ this.reading = false;
46101
+ }
46102
+ }
46103
+ async _exploreDir(path, depth) {
46104
+ let files;
46105
+ try {
46106
+ files = await readdir(path, this._rdOptions);
46107
+ } catch (error) {
46108
+ this._onError(error);
46109
+ }
46110
+ return { files, depth, path };
46111
+ }
46112
+ async _formatEntry(dirent, path) {
46113
+ let entry;
46114
+ const basename4 = this._isDirent ? dirent.name : dirent;
46115
+ try {
46116
+ const fullPath = presolve(pjoin(path, basename4));
46117
+ entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
46118
+ entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
46119
+ } catch (err) {
46120
+ this._onError(err);
46121
+ return;
46122
+ }
46123
+ return entry;
46124
+ }
46125
+ _onError(err) {
46126
+ if (isNormalFlowError(err) && !this.destroyed) {
46127
+ this.emit("warn", err);
46128
+ } else {
46129
+ this.destroy(err);
46130
+ }
46131
+ }
46132
+ async _getEntryType(entry) {
46133
+ if (!entry && this._statsProp in entry) {
46134
+ return "";
46135
+ }
46136
+ const stats = entry[this._statsProp];
46137
+ if (stats.isFile())
46138
+ return "file";
46139
+ if (stats.isDirectory())
46140
+ return "directory";
46141
+ if (stats && stats.isSymbolicLink()) {
46142
+ const full = entry.fullPath;
46143
+ try {
46144
+ const entryRealPath = await realpath(full);
46145
+ const entryRealPathStats = await lstat(entryRealPath);
46146
+ if (entryRealPathStats.isFile()) {
46147
+ return "file";
46148
+ }
46149
+ if (entryRealPathStats.isDirectory()) {
46150
+ const len = entryRealPath.length;
46151
+ if (full.startsWith(entryRealPath) && full.substr(len, 1) === psep) {
46152
+ const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
46153
+ recursiveError.code = RECURSIVE_ERROR_CODE;
46154
+ return this._onError(recursiveError);
46155
+ }
46156
+ return "directory";
46157
+ }
46158
+ } catch (error) {
46159
+ this._onError(error);
46160
+ return "";
46161
+ }
46162
+ }
46163
+ }
46164
+ _includeAsFile(entry) {
46165
+ const stats = entry && entry[this._statsProp];
46166
+ return stats && this._wantsEverything && !stats.isDirectory();
46167
+ }
46168
+ };
46169
+ });
46170
+
46171
+ // node_modules/chokidar/esm/handler.js
46172
+ import { watchFile, unwatchFile, watch as fs_watch } from "fs";
46173
+ import { open, stat as stat2, lstat as lstat2, realpath as fsrealpath } from "fs/promises";
46174
+ import * as sysPath from "path";
46175
+ import { type as osType } from "os";
46176
+ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
46177
+ const handleEvent = (rawEvent, evPath) => {
46178
+ listener(path);
46179
+ emitRaw(rawEvent, evPath, { watchedPath: path });
46180
+ if (evPath && path !== evPath) {
46181
+ fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
46182
+ }
46183
+ };
46184
+ try {
46185
+ return fs_watch(path, {
46186
+ persistent: options.persistent
46187
+ }, handleEvent);
46188
+ } catch (error) {
46189
+ errHandler(error);
46190
+ return;
46191
+ }
46192
+ }
46193
+
46194
+ class NodeFsHandler {
46195
+ constructor(fsW) {
46196
+ this.fsw = fsW;
46197
+ this._boundHandleError = (error) => fsW._handleError(error);
46198
+ }
46199
+ _watchWithNodeFs(path, listener) {
46200
+ const opts = this.fsw.options;
46201
+ const directory = sysPath.dirname(path);
46202
+ const basename5 = sysPath.basename(path);
46203
+ const parent = this.fsw._getWatchedDir(directory);
46204
+ parent.add(basename5);
46205
+ const absolutePath = sysPath.resolve(path);
46206
+ const options = {
46207
+ persistent: opts.persistent
46208
+ };
46209
+ if (!listener)
46210
+ listener = EMPTY_FN;
46211
+ let closer;
46212
+ if (opts.usePolling) {
46213
+ const enableBin = opts.interval !== opts.binaryInterval;
46214
+ options.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
46215
+ closer = setFsWatchFileListener(path, absolutePath, options, {
46216
+ listener,
46217
+ rawEmitter: this.fsw._emitRaw
46218
+ });
46219
+ } else {
46220
+ closer = setFsWatchListener(path, absolutePath, options, {
46221
+ listener,
46222
+ errHandler: this._boundHandleError,
46223
+ rawEmitter: this.fsw._emitRaw
46224
+ });
46225
+ }
46226
+ return closer;
46227
+ }
46228
+ _handleFile(file, stats, initialAdd) {
46229
+ if (this.fsw.closed) {
46230
+ return;
46231
+ }
46232
+ const dirname4 = sysPath.dirname(file);
46233
+ const basename5 = sysPath.basename(file);
46234
+ const parent = this.fsw._getWatchedDir(dirname4);
46235
+ let prevStats = stats;
46236
+ if (parent.has(basename5))
46237
+ return;
46238
+ const listener = async (path, newStats) => {
46239
+ if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
46240
+ return;
46241
+ if (!newStats || newStats.mtimeMs === 0) {
46242
+ try {
46243
+ const newStats2 = await stat2(file);
46244
+ if (this.fsw.closed)
46245
+ return;
46246
+ const at2 = newStats2.atimeMs;
46247
+ const mt = newStats2.mtimeMs;
46248
+ if (!at2 || at2 <= mt || mt !== prevStats.mtimeMs) {
46249
+ this.fsw._emit(EV.CHANGE, file, newStats2);
46250
+ }
46251
+ if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
46252
+ this.fsw._closeFile(path);
46253
+ prevStats = newStats2;
46254
+ const closer2 = this._watchWithNodeFs(file, listener);
46255
+ if (closer2)
46256
+ this.fsw._addPathCloser(path, closer2);
46257
+ } else {
46258
+ prevStats = newStats2;
46259
+ }
46260
+ } catch (error) {
46261
+ this.fsw._remove(dirname4, basename5);
46262
+ }
46263
+ } else if (parent.has(basename5)) {
46264
+ const at2 = newStats.atimeMs;
46265
+ const mt = newStats.mtimeMs;
46266
+ if (!at2 || at2 <= mt || mt !== prevStats.mtimeMs) {
46267
+ this.fsw._emit(EV.CHANGE, file, newStats);
46268
+ }
46269
+ prevStats = newStats;
46270
+ }
46271
+ };
46272
+ const closer = this._watchWithNodeFs(file, listener);
46273
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
46274
+ if (!this.fsw._throttle(EV.ADD, file, 0))
46275
+ return;
46276
+ this.fsw._emit(EV.ADD, file, stats);
46277
+ }
46278
+ return closer;
46279
+ }
46280
+ async _handleSymlink(entry, directory, path, item) {
46281
+ if (this.fsw.closed) {
46282
+ return;
46283
+ }
46284
+ const full = entry.fullPath;
46285
+ const dir = this.fsw._getWatchedDir(directory);
46286
+ if (!this.fsw.options.followSymlinks) {
46287
+ this.fsw._incrReadyCount();
46288
+ let linkPath;
46289
+ try {
46290
+ linkPath = await fsrealpath(path);
46291
+ } catch (e2) {
46292
+ this.fsw._emitReady();
46293
+ return true;
46294
+ }
46295
+ if (this.fsw.closed)
46296
+ return;
46297
+ if (dir.has(item)) {
46298
+ if (this.fsw._symlinkPaths.get(full) !== linkPath) {
46299
+ this.fsw._symlinkPaths.set(full, linkPath);
46300
+ this.fsw._emit(EV.CHANGE, path, entry.stats);
46301
+ }
46302
+ } else {
46303
+ dir.add(item);
46304
+ this.fsw._symlinkPaths.set(full, linkPath);
46305
+ this.fsw._emit(EV.ADD, path, entry.stats);
46306
+ }
46307
+ this.fsw._emitReady();
46308
+ return true;
46309
+ }
46310
+ if (this.fsw._symlinkPaths.has(full)) {
46311
+ return true;
46312
+ }
46313
+ this.fsw._symlinkPaths.set(full, true);
46314
+ }
46315
+ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
46316
+ directory = sysPath.join(directory, "");
46317
+ throttler = this.fsw._throttle("readdir", directory, 1000);
46318
+ if (!throttler)
46319
+ return;
46320
+ const previous = this.fsw._getWatchedDir(wh.path);
46321
+ const current = new Set;
46322
+ let stream = this.fsw._readdirp(directory, {
46323
+ fileFilter: (entry) => wh.filterPath(entry),
46324
+ directoryFilter: (entry) => wh.filterDir(entry)
46325
+ });
46326
+ if (!stream)
46327
+ return;
46328
+ stream.on(STR_DATA, async (entry) => {
46329
+ if (this.fsw.closed) {
46330
+ stream = undefined;
46331
+ return;
46332
+ }
46333
+ const item = entry.path;
46334
+ let path = sysPath.join(directory, item);
46335
+ current.add(item);
46336
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
46337
+ return;
46338
+ }
46339
+ if (this.fsw.closed) {
46340
+ stream = undefined;
46341
+ return;
46342
+ }
46343
+ if (item === target || !target && !previous.has(item)) {
46344
+ this.fsw._incrReadyCount();
46345
+ path = sysPath.join(dir, sysPath.relative(dir, path));
46346
+ this._addToNodeFs(path, initialAdd, wh, depth + 1);
46347
+ }
46348
+ }).on(EV.ERROR, this._boundHandleError);
46349
+ return new Promise((resolve2, reject) => {
46350
+ if (!stream)
46351
+ return reject();
46352
+ stream.once(STR_END, () => {
46353
+ if (this.fsw.closed) {
46354
+ stream = undefined;
46355
+ return;
46356
+ }
46357
+ const wasThrottled = throttler ? throttler.clear() : false;
46358
+ resolve2(undefined);
46359
+ previous.getChildren().filter((item) => {
46360
+ return item !== directory && !current.has(item);
46361
+ }).forEach((item) => {
46362
+ this.fsw._remove(directory, item);
46363
+ });
46364
+ stream = undefined;
46365
+ if (wasThrottled)
46366
+ this._handleRead(directory, false, wh, target, dir, depth, throttler);
46367
+ });
46368
+ });
46369
+ }
46370
+ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath2) {
46371
+ const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
46372
+ const tracked = parentDir.has(sysPath.basename(dir));
46373
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
46374
+ this.fsw._emit(EV.ADD_DIR, dir, stats);
46375
+ }
46376
+ parentDir.add(sysPath.basename(dir));
46377
+ this.fsw._getWatchedDir(dir);
46378
+ let throttler;
46379
+ let closer;
46380
+ const oDepth = this.fsw.options.depth;
46381
+ if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
46382
+ if (!target) {
46383
+ await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
46384
+ if (this.fsw.closed)
46385
+ return;
46386
+ }
46387
+ closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
46388
+ if (stats2 && stats2.mtimeMs === 0)
46389
+ return;
46390
+ this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
46391
+ });
46392
+ }
46393
+ return closer;
46394
+ }
46395
+ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
46396
+ const ready = this.fsw._emitReady;
46397
+ if (this.fsw._isIgnored(path) || this.fsw.closed) {
46398
+ ready();
46399
+ return false;
46400
+ }
46401
+ const wh = this.fsw._getWatchHelpers(path);
46402
+ if (priorWh) {
46403
+ wh.filterPath = (entry) => priorWh.filterPath(entry);
46404
+ wh.filterDir = (entry) => priorWh.filterDir(entry);
46405
+ }
46406
+ try {
46407
+ const stats = await statMethods[wh.statMethod](wh.watchPath);
46408
+ if (this.fsw.closed)
46409
+ return;
46410
+ if (this.fsw._isIgnored(wh.watchPath, stats)) {
46411
+ ready();
46412
+ return false;
46413
+ }
46414
+ const follow = this.fsw.options.followSymlinks;
46415
+ let closer;
46416
+ if (stats.isDirectory()) {
46417
+ const absPath = sysPath.resolve(path);
46418
+ const targetPath = follow ? await fsrealpath(path) : path;
46419
+ if (this.fsw.closed)
46420
+ return;
46421
+ closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
46422
+ if (this.fsw.closed)
46423
+ return;
46424
+ if (absPath !== targetPath && targetPath !== undefined) {
46425
+ this.fsw._symlinkPaths.set(absPath, targetPath);
46426
+ }
46427
+ } else if (stats.isSymbolicLink()) {
46428
+ const targetPath = follow ? await fsrealpath(path) : path;
46429
+ if (this.fsw.closed)
46430
+ return;
46431
+ const parent = sysPath.dirname(wh.watchPath);
46432
+ this.fsw._getWatchedDir(parent).add(wh.watchPath);
46433
+ this.fsw._emit(EV.ADD, wh.watchPath, stats);
46434
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
46435
+ if (this.fsw.closed)
46436
+ return;
46437
+ if (targetPath !== undefined) {
46438
+ this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
46439
+ }
46440
+ } else {
46441
+ closer = this._handleFile(wh.watchPath, stats, initialAdd);
46442
+ }
46443
+ ready();
46444
+ if (closer)
46445
+ this.fsw._addPathCloser(path, closer);
46446
+ return false;
46447
+ } catch (error) {
46448
+ if (this.fsw._handleError(error)) {
46449
+ ready();
46450
+ return path;
46451
+ }
46452
+ }
46453
+ }
46454
+ }
46455
+ var STR_DATA = "data", STR_END = "end", STR_CLOSE = "close", EMPTY_FN = () => {}, pl, isWindows, isMacos, isLinux, isFreeBSD, isIBMi, EVENTS, EV, THROTTLE_MODE_WATCH = "watch", statMethods, KEY_LISTENERS = "listeners", KEY_ERR = "errHandlers", KEY_RAW = "rawEmitters", HANDLER_KEYS, binaryExtensions, isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase()), foreach = (val, fn) => {
46456
+ if (val instanceof Set) {
46457
+ val.forEach(fn);
46458
+ } else {
46459
+ fn(val);
46460
+ }
46461
+ }, addAndConvert = (main, prop, item) => {
46462
+ let container = main[prop];
46463
+ if (!(container instanceof Set)) {
46464
+ main[prop] = container = new Set([container]);
46465
+ }
46466
+ container.add(item);
46467
+ }, clearItem = (cont) => (key) => {
46468
+ const set = cont[key];
46469
+ if (set instanceof Set) {
46470
+ set.clear();
46471
+ } else {
46472
+ delete cont[key];
46473
+ }
46474
+ }, delFromSet = (main, prop, item) => {
46475
+ const container = main[prop];
46476
+ if (container instanceof Set) {
46477
+ container.delete(item);
46478
+ } else if (container === item) {
46479
+ delete main[prop];
46480
+ }
46481
+ }, isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val, FsWatchInstances, fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
46482
+ const cont = FsWatchInstances.get(fullPath);
46483
+ if (!cont)
46484
+ return;
46485
+ foreach(cont[listenerType], (listener) => {
46486
+ listener(val1, val2, val3);
46487
+ });
46488
+ }, setFsWatchListener = (path, fullPath, options, handlers) => {
46489
+ const { listener, errHandler, rawEmitter } = handlers;
46490
+ let cont = FsWatchInstances.get(fullPath);
46491
+ let watcher;
46492
+ if (!options.persistent) {
46493
+ watcher = createFsWatchInstance(path, options, listener, errHandler, rawEmitter);
46494
+ if (!watcher)
46495
+ return;
46496
+ return watcher.close.bind(watcher);
46497
+ }
46498
+ if (cont) {
46499
+ addAndConvert(cont, KEY_LISTENERS, listener);
46500
+ addAndConvert(cont, KEY_ERR, errHandler);
46501
+ addAndConvert(cont, KEY_RAW, rawEmitter);
46502
+ } else {
46503
+ watcher = createFsWatchInstance(path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
46504
+ if (!watcher)
46505
+ return;
46506
+ watcher.on(EV.ERROR, async (error) => {
46507
+ const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
46508
+ if (cont)
46509
+ cont.watcherUnusable = true;
46510
+ if (isWindows && error.code === "EPERM") {
46511
+ try {
46512
+ const fd = await open(path, "r");
46513
+ await fd.close();
46514
+ broadcastErr(error);
46515
+ } catch (err) {}
46516
+ } else {
46517
+ broadcastErr(error);
46518
+ }
46519
+ });
46520
+ cont = {
46521
+ listeners: listener,
46522
+ errHandlers: errHandler,
46523
+ rawEmitters: rawEmitter,
46524
+ watcher
46525
+ };
46526
+ FsWatchInstances.set(fullPath, cont);
46527
+ }
46528
+ return () => {
46529
+ delFromSet(cont, KEY_LISTENERS, listener);
46530
+ delFromSet(cont, KEY_ERR, errHandler);
46531
+ delFromSet(cont, KEY_RAW, rawEmitter);
46532
+ if (isEmptySet(cont.listeners)) {
46533
+ cont.watcher.close();
46534
+ FsWatchInstances.delete(fullPath);
46535
+ HANDLER_KEYS.forEach(clearItem(cont));
46536
+ cont.watcher = undefined;
46537
+ Object.freeze(cont);
46538
+ }
46539
+ };
46540
+ }, FsWatchFileInstances, setFsWatchFileListener = (path, fullPath, options, handlers) => {
46541
+ const { listener, rawEmitter } = handlers;
46542
+ let cont = FsWatchFileInstances.get(fullPath);
46543
+ const copts = cont && cont.options;
46544
+ if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
46545
+ unwatchFile(fullPath);
46546
+ cont = undefined;
46547
+ }
46548
+ if (cont) {
46549
+ addAndConvert(cont, KEY_LISTENERS, listener);
46550
+ addAndConvert(cont, KEY_RAW, rawEmitter);
46551
+ } else {
46552
+ cont = {
46553
+ listeners: listener,
46554
+ rawEmitters: rawEmitter,
46555
+ options,
46556
+ watcher: watchFile(fullPath, options, (curr, prev) => {
46557
+ foreach(cont.rawEmitters, (rawEmitter2) => {
46558
+ rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
46559
+ });
46560
+ const currmtime = curr.mtimeMs;
46561
+ if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
46562
+ foreach(cont.listeners, (listener2) => listener2(path, curr));
46563
+ }
46564
+ })
46565
+ };
46566
+ FsWatchFileInstances.set(fullPath, cont);
46567
+ }
46568
+ return () => {
46569
+ delFromSet(cont, KEY_LISTENERS, listener);
46570
+ delFromSet(cont, KEY_RAW, rawEmitter);
46571
+ if (isEmptySet(cont.listeners)) {
46572
+ FsWatchFileInstances.delete(fullPath);
46573
+ unwatchFile(fullPath);
46574
+ cont.options = cont.watcher = undefined;
46575
+ Object.freeze(cont);
46576
+ }
46577
+ };
46578
+ };
46579
+ var init_handler = __esm(() => {
46580
+ pl = process.platform;
46581
+ isWindows = pl === "win32";
46582
+ isMacos = pl === "darwin";
46583
+ isLinux = pl === "linux";
46584
+ isFreeBSD = pl === "freebsd";
46585
+ isIBMi = osType() === "OS400";
46586
+ EVENTS = {
46587
+ ALL: "all",
46588
+ READY: "ready",
46589
+ ADD: "add",
46590
+ CHANGE: "change",
46591
+ ADD_DIR: "addDir",
46592
+ UNLINK: "unlink",
46593
+ UNLINK_DIR: "unlinkDir",
46594
+ RAW: "raw",
46595
+ ERROR: "error"
46596
+ };
46597
+ EV = EVENTS;
46598
+ statMethods = { lstat: lstat2, stat: stat2 };
46599
+ HANDLER_KEYS = [KEY_LISTENERS, KEY_ERR, KEY_RAW];
46600
+ binaryExtensions = new Set([
46601
+ "3dm",
46602
+ "3ds",
46603
+ "3g2",
46604
+ "3gp",
46605
+ "7z",
46606
+ "a",
46607
+ "aac",
46608
+ "adp",
46609
+ "afdesign",
46610
+ "afphoto",
46611
+ "afpub",
46612
+ "ai",
46613
+ "aif",
46614
+ "aiff",
46615
+ "alz",
46616
+ "ape",
46617
+ "apk",
46618
+ "appimage",
46619
+ "ar",
46620
+ "arj",
46621
+ "asf",
46622
+ "au",
46623
+ "avi",
46624
+ "bak",
46625
+ "baml",
46626
+ "bh",
46627
+ "bin",
46628
+ "bk",
46629
+ "bmp",
46630
+ "btif",
46631
+ "bz2",
46632
+ "bzip2",
46633
+ "cab",
46634
+ "caf",
46635
+ "cgm",
46636
+ "class",
46637
+ "cmx",
46638
+ "cpio",
46639
+ "cr2",
46640
+ "cur",
46641
+ "dat",
46642
+ "dcm",
46643
+ "deb",
46644
+ "dex",
46645
+ "djvu",
46646
+ "dll",
46647
+ "dmg",
46648
+ "dng",
46649
+ "doc",
46650
+ "docm",
46651
+ "docx",
46652
+ "dot",
46653
+ "dotm",
46654
+ "dra",
46655
+ "DS_Store",
46656
+ "dsk",
46657
+ "dts",
46658
+ "dtshd",
46659
+ "dvb",
46660
+ "dwg",
46661
+ "dxf",
46662
+ "ecelp4800",
46663
+ "ecelp7470",
46664
+ "ecelp9600",
46665
+ "egg",
46666
+ "eol",
46667
+ "eot",
46668
+ "epub",
46669
+ "exe",
46670
+ "f4v",
46671
+ "fbs",
46672
+ "fh",
46673
+ "fla",
46674
+ "flac",
46675
+ "flatpak",
46676
+ "fli",
46677
+ "flv",
46678
+ "fpx",
46679
+ "fst",
46680
+ "fvt",
46681
+ "g3",
46682
+ "gh",
46683
+ "gif",
46684
+ "graffle",
46685
+ "gz",
46686
+ "gzip",
46687
+ "h261",
46688
+ "h263",
46689
+ "h264",
46690
+ "icns",
46691
+ "ico",
46692
+ "ief",
46693
+ "img",
46694
+ "ipa",
46695
+ "iso",
46696
+ "jar",
46697
+ "jpeg",
46698
+ "jpg",
46699
+ "jpgv",
46700
+ "jpm",
46701
+ "jxr",
46702
+ "key",
46703
+ "ktx",
46704
+ "lha",
46705
+ "lib",
46706
+ "lvp",
46707
+ "lz",
46708
+ "lzh",
46709
+ "lzma",
46710
+ "lzo",
46711
+ "m3u",
46712
+ "m4a",
46713
+ "m4v",
46714
+ "mar",
46715
+ "mdi",
46716
+ "mht",
46717
+ "mid",
46718
+ "midi",
46719
+ "mj2",
46720
+ "mka",
46721
+ "mkv",
46722
+ "mmr",
46723
+ "mng",
46724
+ "mobi",
46725
+ "mov",
46726
+ "movie",
46727
+ "mp3",
46728
+ "mp4",
46729
+ "mp4a",
46730
+ "mpeg",
46731
+ "mpg",
46732
+ "mpga",
46733
+ "mxu",
46734
+ "nef",
46735
+ "npx",
46736
+ "numbers",
46737
+ "nupkg",
46738
+ "o",
46739
+ "odp",
46740
+ "ods",
46741
+ "odt",
46742
+ "oga",
46743
+ "ogg",
46744
+ "ogv",
46745
+ "otf",
46746
+ "ott",
46747
+ "pages",
46748
+ "pbm",
46749
+ "pcx",
46750
+ "pdb",
46751
+ "pdf",
46752
+ "pea",
46753
+ "pgm",
46754
+ "pic",
46755
+ "png",
46756
+ "pnm",
46757
+ "pot",
46758
+ "potm",
46759
+ "potx",
46760
+ "ppa",
46761
+ "ppam",
46762
+ "ppm",
46763
+ "pps",
46764
+ "ppsm",
46765
+ "ppsx",
46766
+ "ppt",
46767
+ "pptm",
46768
+ "pptx",
46769
+ "psd",
46770
+ "pya",
46771
+ "pyc",
46772
+ "pyo",
46773
+ "pyv",
46774
+ "qt",
46775
+ "rar",
46776
+ "ras",
46777
+ "raw",
46778
+ "resources",
46779
+ "rgb",
46780
+ "rip",
46781
+ "rlc",
46782
+ "rmf",
46783
+ "rmvb",
46784
+ "rpm",
46785
+ "rtf",
46786
+ "rz",
46787
+ "s3m",
46788
+ "s7z",
46789
+ "scpt",
46790
+ "sgi",
46791
+ "shar",
46792
+ "snap",
46793
+ "sil",
46794
+ "sketch",
46795
+ "slk",
46796
+ "smv",
46797
+ "snk",
46798
+ "so",
46799
+ "stl",
46800
+ "suo",
46801
+ "sub",
46802
+ "swf",
46803
+ "tar",
46804
+ "tbz",
46805
+ "tbz2",
46806
+ "tga",
46807
+ "tgz",
46808
+ "thmx",
46809
+ "tif",
46810
+ "tiff",
46811
+ "tlz",
46812
+ "ttc",
46813
+ "ttf",
46814
+ "txz",
46815
+ "udf",
46816
+ "uvh",
46817
+ "uvi",
46818
+ "uvm",
46819
+ "uvp",
46820
+ "uvs",
46821
+ "uvu",
46822
+ "viv",
46823
+ "vob",
46824
+ "war",
46825
+ "wav",
46826
+ "wax",
46827
+ "wbmp",
46828
+ "wdp",
46829
+ "weba",
46830
+ "webm",
46831
+ "webp",
46832
+ "whl",
46833
+ "wim",
46834
+ "wm",
46835
+ "wma",
46836
+ "wmv",
46837
+ "wmx",
46838
+ "woff",
46839
+ "woff2",
46840
+ "wrm",
46841
+ "wvx",
46842
+ "xbm",
46843
+ "xif",
46844
+ "xla",
46845
+ "xlam",
46846
+ "xls",
46847
+ "xlsb",
46848
+ "xlsm",
46849
+ "xlsx",
46850
+ "xlt",
46851
+ "xltm",
46852
+ "xltx",
46853
+ "xm",
46854
+ "xmind",
46855
+ "xpi",
46856
+ "xpm",
46857
+ "xwd",
46858
+ "xz",
46859
+ "z",
46860
+ "zip",
46861
+ "zipx"
46862
+ ]);
46863
+ FsWatchInstances = new Map;
46864
+ FsWatchFileInstances = new Map;
46865
+ });
46866
+
46867
+ // node_modules/chokidar/esm/index.js
46868
+ import { stat as statcb } from "fs";
46869
+ import { stat as stat3, readdir as readdir2 } from "fs/promises";
46870
+ import { EventEmitter as EventEmitter2 } from "events";
46871
+ import * as sysPath2 from "path";
46872
+ function arrify(item) {
46873
+ return Array.isArray(item) ? item : [item];
46874
+ }
46875
+ function createPattern(matcher) {
46876
+ if (typeof matcher === "function")
46877
+ return matcher;
46878
+ if (typeof matcher === "string")
46879
+ return (string) => matcher === string;
46880
+ if (matcher instanceof RegExp)
46881
+ return (string) => matcher.test(string);
46882
+ if (typeof matcher === "object" && matcher !== null) {
46883
+ return (string) => {
46884
+ if (matcher.path === string)
46885
+ return true;
46886
+ if (matcher.recursive) {
46887
+ const relative5 = sysPath2.relative(matcher.path, string);
46888
+ if (!relative5) {
46889
+ return false;
46890
+ }
46891
+ return !relative5.startsWith("..") && !sysPath2.isAbsolute(relative5);
46892
+ }
46893
+ return false;
46894
+ };
46895
+ }
46896
+ return () => false;
46897
+ }
46898
+ function normalizePath(path) {
46899
+ if (typeof path !== "string")
46900
+ throw new Error("string expected");
46901
+ path = sysPath2.normalize(path);
46902
+ path = path.replace(/\\/g, "/");
46903
+ let prepend = false;
46904
+ if (path.startsWith("//"))
46905
+ prepend = true;
46906
+ const DOUBLE_SLASH_RE2 = /\/\//;
46907
+ while (path.match(DOUBLE_SLASH_RE2))
46908
+ path = path.replace(DOUBLE_SLASH_RE2, "/");
46909
+ if (prepend)
46910
+ path = "/" + path;
46911
+ return path;
46912
+ }
46913
+ function matchPatterns(patterns, testString, stats) {
46914
+ const path = normalizePath(testString);
46915
+ for (let index = 0;index < patterns.length; index++) {
46916
+ const pattern = patterns[index];
46917
+ if (pattern(path, stats)) {
46918
+ return true;
46919
+ }
46920
+ }
46921
+ return false;
46922
+ }
46923
+ function anymatch(matchers, testString) {
46924
+ if (matchers == null) {
46925
+ throw new TypeError("anymatch: specify first argument");
46926
+ }
46927
+ const matchersArray = arrify(matchers);
46928
+ const patterns = matchersArray.map((matcher) => createPattern(matcher));
46929
+ if (testString == null) {
46930
+ return (testString2, stats) => {
46931
+ return matchPatterns(patterns, testString2, stats);
46932
+ };
46933
+ }
46934
+ return matchPatterns(patterns, testString);
46935
+ }
46936
+
46937
+ class DirEntry {
46938
+ constructor(dir, removeWatcher) {
46939
+ this.path = dir;
46940
+ this._removeWatcher = removeWatcher;
46941
+ this.items = new Set;
46942
+ }
46943
+ add(item) {
46944
+ const { items } = this;
46945
+ if (!items)
46946
+ return;
46947
+ if (item !== ONE_DOT && item !== TWO_DOTS)
46948
+ items.add(item);
46949
+ }
46950
+ async remove(item) {
46951
+ const { items } = this;
46952
+ if (!items)
46953
+ return;
46954
+ items.delete(item);
46955
+ if (items.size > 0)
46956
+ return;
46957
+ const dir = this.path;
46958
+ try {
46959
+ await readdir2(dir);
46960
+ } catch (err) {
46961
+ if (this._removeWatcher) {
46962
+ this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
46963
+ }
46964
+ }
46965
+ }
46966
+ has(item) {
46967
+ const { items } = this;
46968
+ if (!items)
46969
+ return;
46970
+ return items.has(item);
46971
+ }
46972
+ getChildren() {
46973
+ const { items } = this;
46974
+ if (!items)
46975
+ return [];
46976
+ return [...items.values()];
46977
+ }
46978
+ dispose() {
46979
+ this.items.clear();
46980
+ this.path = "";
46981
+ this._removeWatcher = EMPTY_FN;
46982
+ this.items = EMPTY_SET;
46983
+ Object.freeze(this);
46984
+ }
46985
+ }
46986
+
46987
+ class WatchHelper {
46988
+ constructor(path, follow, fsw) {
46989
+ this.fsw = fsw;
46990
+ const watchPath = path;
46991
+ this.path = path = path.replace(REPLACER_RE, "");
46992
+ this.watchPath = watchPath;
46993
+ this.fullWatchPath = sysPath2.resolve(watchPath);
46994
+ this.dirParts = [];
46995
+ this.dirParts.forEach((parts) => {
46996
+ if (parts.length > 1)
46997
+ parts.pop();
46998
+ });
46999
+ this.followSymlinks = follow;
47000
+ this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
47001
+ }
47002
+ entryPath(entry) {
47003
+ return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
47004
+ }
47005
+ filterPath(entry) {
47006
+ const { stats } = entry;
47007
+ if (stats && stats.isSymbolicLink())
47008
+ return this.filterDir(entry);
47009
+ const resolvedPath = this.entryPath(entry);
47010
+ return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
47011
+ }
47012
+ filterDir(entry) {
47013
+ return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
47014
+ }
47015
+ }
47016
+ function watch(paths, options = {}) {
47017
+ const watcher = new FSWatcher(options);
47018
+ watcher.add(paths);
47019
+ return watcher;
47020
+ }
47021
+ var SLASH = "/", SLASH_SLASH = "//", ONE_DOT = ".", TWO_DOTS = "..", STRING_TYPE = "string", BACK_SLASH_RE, DOUBLE_SLASH_RE, DOT_RE, REPLACER_RE, isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp), unifyPaths = (paths_) => {
47022
+ const paths = arrify(paths_).flat();
47023
+ if (!paths.every((p2) => typeof p2 === STRING_TYPE)) {
47024
+ throw new TypeError(`Non-string provided as watch path: ${paths}`);
47025
+ }
47026
+ return paths.map(normalizePathToUnix);
47027
+ }, toUnix = (string) => {
47028
+ let str = string.replace(BACK_SLASH_RE, SLASH);
47029
+ let prepend = false;
47030
+ if (str.startsWith(SLASH_SLASH)) {
47031
+ prepend = true;
47032
+ }
47033
+ while (str.match(DOUBLE_SLASH_RE)) {
47034
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
47035
+ }
47036
+ if (prepend) {
47037
+ str = SLASH + str;
47038
+ }
47039
+ return str;
47040
+ }, normalizePathToUnix = (path) => toUnix(sysPath2.normalize(toUnix(path))), normalizeIgnored = (cwd = "") => (path) => {
47041
+ if (typeof path === "string") {
47042
+ return normalizePathToUnix(sysPath2.isAbsolute(path) ? path : sysPath2.join(cwd, path));
47043
+ } else {
47044
+ return path;
47045
+ }
47046
+ }, getAbsolutePath = (path, cwd) => {
47047
+ if (sysPath2.isAbsolute(path)) {
47048
+ return path;
47049
+ }
47050
+ return sysPath2.join(cwd, path);
47051
+ }, EMPTY_SET, STAT_METHOD_F = "stat", STAT_METHOD_L = "lstat", FSWatcher, esm_default2;
47052
+ var init_esm3 = __esm(() => {
47053
+ init_esm2();
47054
+ init_handler();
47055
+ /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
47056
+ BACK_SLASH_RE = /\\/g;
47057
+ DOUBLE_SLASH_RE = /\/\//;
47058
+ DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
47059
+ REPLACER_RE = /^\.[/\\]/;
47060
+ EMPTY_SET = Object.freeze(new Set);
47061
+ FSWatcher = class FSWatcher extends EventEmitter2 {
47062
+ constructor(_opts = {}) {
47063
+ super();
47064
+ this.closed = false;
47065
+ this._closers = new Map;
47066
+ this._ignoredPaths = new Set;
47067
+ this._throttled = new Map;
47068
+ this._streams = new Set;
47069
+ this._symlinkPaths = new Map;
47070
+ this._watched = new Map;
47071
+ this._pendingWrites = new Map;
47072
+ this._pendingUnlinks = new Map;
47073
+ this._readyCount = 0;
47074
+ this._readyEmitted = false;
47075
+ const awf = _opts.awaitWriteFinish;
47076
+ const DEF_AWF = { stabilityThreshold: 2000, pollInterval: 100 };
47077
+ const opts = {
47078
+ persistent: true,
47079
+ ignoreInitial: false,
47080
+ ignorePermissionErrors: false,
47081
+ interval: 100,
47082
+ binaryInterval: 300,
47083
+ followSymlinks: true,
47084
+ usePolling: false,
47085
+ atomic: true,
47086
+ ..._opts,
47087
+ ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
47088
+ awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? { ...DEF_AWF, ...awf } : false
47089
+ };
47090
+ if (isIBMi)
47091
+ opts.usePolling = true;
47092
+ if (opts.atomic === undefined)
47093
+ opts.atomic = !opts.usePolling;
47094
+ const envPoll = process.env.CHOKIDAR_USEPOLLING;
47095
+ if (envPoll !== undefined) {
47096
+ const envLower = envPoll.toLowerCase();
47097
+ if (envLower === "false" || envLower === "0")
47098
+ opts.usePolling = false;
47099
+ else if (envLower === "true" || envLower === "1")
47100
+ opts.usePolling = true;
47101
+ else
47102
+ opts.usePolling = !!envLower;
47103
+ }
47104
+ const envInterval = process.env.CHOKIDAR_INTERVAL;
47105
+ if (envInterval)
47106
+ opts.interval = Number.parseInt(envInterval, 10);
47107
+ let readyCalls = 0;
47108
+ this._emitReady = () => {
47109
+ readyCalls++;
47110
+ if (readyCalls >= this._readyCount) {
47111
+ this._emitReady = EMPTY_FN;
47112
+ this._readyEmitted = true;
47113
+ process.nextTick(() => this.emit(EVENTS.READY));
47114
+ }
47115
+ };
47116
+ this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
47117
+ this._boundRemove = this._remove.bind(this);
47118
+ this.options = opts;
47119
+ this._nodeFsHandler = new NodeFsHandler(this);
47120
+ Object.freeze(opts);
47121
+ }
47122
+ _addIgnoredPath(matcher) {
47123
+ if (isMatcherObject(matcher)) {
47124
+ for (const ignored of this._ignoredPaths) {
47125
+ if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
47126
+ return;
47127
+ }
47128
+ }
47129
+ }
47130
+ this._ignoredPaths.add(matcher);
47131
+ }
47132
+ _removeIgnoredPath(matcher) {
47133
+ this._ignoredPaths.delete(matcher);
47134
+ if (typeof matcher === "string") {
47135
+ for (const ignored of this._ignoredPaths) {
47136
+ if (isMatcherObject(ignored) && ignored.path === matcher) {
47137
+ this._ignoredPaths.delete(ignored);
47138
+ }
47139
+ }
47140
+ }
47141
+ }
47142
+ add(paths_, _origAdd, _internal) {
47143
+ const { cwd } = this.options;
47144
+ this.closed = false;
47145
+ this._closePromise = undefined;
47146
+ let paths = unifyPaths(paths_);
47147
+ if (cwd) {
47148
+ paths = paths.map((path) => {
47149
+ const absPath = getAbsolutePath(path, cwd);
47150
+ return absPath;
47151
+ });
47152
+ }
47153
+ paths.forEach((path) => {
47154
+ this._removeIgnoredPath(path);
47155
+ });
47156
+ this._userIgnored = undefined;
47157
+ if (!this._readyCount)
47158
+ this._readyCount = 0;
47159
+ this._readyCount += paths.length;
47160
+ Promise.all(paths.map(async (path) => {
47161
+ const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, undefined, 0, _origAdd);
47162
+ if (res)
47163
+ this._emitReady();
47164
+ return res;
47165
+ })).then((results) => {
47166
+ if (this.closed)
47167
+ return;
47168
+ results.forEach((item) => {
47169
+ if (item)
47170
+ this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
47171
+ });
47172
+ });
47173
+ return this;
47174
+ }
47175
+ unwatch(paths_) {
47176
+ if (this.closed)
47177
+ return this;
47178
+ const paths = unifyPaths(paths_);
47179
+ const { cwd } = this.options;
47180
+ paths.forEach((path) => {
47181
+ if (!sysPath2.isAbsolute(path) && !this._closers.has(path)) {
47182
+ if (cwd)
47183
+ path = sysPath2.join(cwd, path);
47184
+ path = sysPath2.resolve(path);
47185
+ }
47186
+ this._closePath(path);
47187
+ this._addIgnoredPath(path);
47188
+ if (this._watched.has(path)) {
47189
+ this._addIgnoredPath({
47190
+ path,
47191
+ recursive: true
47192
+ });
47193
+ }
47194
+ this._userIgnored = undefined;
47195
+ });
47196
+ return this;
47197
+ }
47198
+ close() {
47199
+ if (this._closePromise) {
47200
+ return this._closePromise;
47201
+ }
47202
+ this.closed = true;
47203
+ this.removeAllListeners();
47204
+ const closers = [];
47205
+ this._closers.forEach((closerList) => closerList.forEach((closer) => {
47206
+ const promise = closer();
47207
+ if (promise instanceof Promise)
47208
+ closers.push(promise);
47209
+ }));
47210
+ this._streams.forEach((stream) => stream.destroy());
47211
+ this._userIgnored = undefined;
47212
+ this._readyCount = 0;
47213
+ this._readyEmitted = false;
47214
+ this._watched.forEach((dirent) => dirent.dispose());
47215
+ this._closers.clear();
47216
+ this._watched.clear();
47217
+ this._streams.clear();
47218
+ this._symlinkPaths.clear();
47219
+ this._throttled.clear();
47220
+ this._closePromise = closers.length ? Promise.all(closers).then(() => {
47221
+ return;
47222
+ }) : Promise.resolve();
47223
+ return this._closePromise;
47224
+ }
47225
+ getWatched() {
47226
+ const watchList = {};
47227
+ this._watched.forEach((entry, dir) => {
47228
+ const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
47229
+ const index = key || ONE_DOT;
47230
+ watchList[index] = entry.getChildren().sort();
47231
+ });
47232
+ return watchList;
47233
+ }
47234
+ emitWithAll(event, args) {
47235
+ this.emit(event, ...args);
47236
+ if (event !== EVENTS.ERROR)
47237
+ this.emit(EVENTS.ALL, event, ...args);
47238
+ }
47239
+ async _emit(event, path, stats) {
47240
+ if (this.closed)
47241
+ return;
47242
+ const opts = this.options;
47243
+ if (isWindows)
47244
+ path = sysPath2.normalize(path);
47245
+ if (opts.cwd)
47246
+ path = sysPath2.relative(opts.cwd, path);
47247
+ const args = [path];
47248
+ if (stats != null)
47249
+ args.push(stats);
47250
+ const awf = opts.awaitWriteFinish;
47251
+ let pw;
47252
+ if (awf && (pw = this._pendingWrites.get(path))) {
47253
+ pw.lastChange = new Date;
47254
+ return this;
47255
+ }
47256
+ if (opts.atomic) {
47257
+ if (event === EVENTS.UNLINK) {
47258
+ this._pendingUnlinks.set(path, [event, ...args]);
47259
+ setTimeout(() => {
47260
+ this._pendingUnlinks.forEach((entry, path2) => {
47261
+ this.emit(...entry);
47262
+ this.emit(EVENTS.ALL, ...entry);
47263
+ this._pendingUnlinks.delete(path2);
47264
+ });
47265
+ }, typeof opts.atomic === "number" ? opts.atomic : 100);
47266
+ return this;
47267
+ }
47268
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path)) {
47269
+ event = EVENTS.CHANGE;
47270
+ this._pendingUnlinks.delete(path);
47271
+ }
47272
+ }
47273
+ if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
47274
+ const awfEmit = (err, stats2) => {
47275
+ if (err) {
47276
+ event = EVENTS.ERROR;
47277
+ args[0] = err;
47278
+ this.emitWithAll(event, args);
47279
+ } else if (stats2) {
47280
+ if (args.length > 1) {
47281
+ args[1] = stats2;
47282
+ } else {
47283
+ args.push(stats2);
47284
+ }
47285
+ this.emitWithAll(event, args);
47286
+ }
47287
+ };
47288
+ this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
47289
+ return this;
47290
+ }
47291
+ if (event === EVENTS.CHANGE) {
47292
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path, 50);
47293
+ if (isThrottled)
47294
+ return this;
47295
+ }
47296
+ if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
47297
+ const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path) : path;
47298
+ let stats2;
47299
+ try {
47300
+ stats2 = await stat3(fullPath);
47301
+ } catch (err) {}
47302
+ if (!stats2 || this.closed)
47303
+ return;
47304
+ args.push(stats2);
47305
+ }
47306
+ this.emitWithAll(event, args);
47307
+ return this;
47308
+ }
47309
+ _handleError(error) {
47310
+ const code = error && error.code;
47311
+ if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) {
47312
+ this.emit(EVENTS.ERROR, error);
47313
+ }
47314
+ return error || this.closed;
47315
+ }
47316
+ _throttle(actionType, path, timeout) {
47317
+ if (!this._throttled.has(actionType)) {
47318
+ this._throttled.set(actionType, new Map);
47319
+ }
47320
+ const action = this._throttled.get(actionType);
47321
+ if (!action)
47322
+ throw new Error("invalid throttle");
47323
+ const actionPath = action.get(path);
47324
+ if (actionPath) {
47325
+ actionPath.count++;
47326
+ return false;
47327
+ }
47328
+ let timeoutObject;
47329
+ const clear = () => {
47330
+ const item = action.get(path);
47331
+ const count = item ? item.count : 0;
47332
+ action.delete(path);
47333
+ clearTimeout(timeoutObject);
47334
+ if (item)
47335
+ clearTimeout(item.timeoutObject);
47336
+ return count;
47337
+ };
47338
+ timeoutObject = setTimeout(clear, timeout);
47339
+ const thr = { timeoutObject, clear, count: 0 };
47340
+ action.set(path, thr);
47341
+ return thr;
47342
+ }
47343
+ _incrReadyCount() {
47344
+ return this._readyCount++;
47345
+ }
47346
+ _awaitWriteFinish(path, threshold, event, awfEmit) {
47347
+ const awf = this.options.awaitWriteFinish;
47348
+ if (typeof awf !== "object")
47349
+ return;
47350
+ const pollInterval = awf.pollInterval;
47351
+ let timeoutHandler;
47352
+ let fullPath = path;
47353
+ if (this.options.cwd && !sysPath2.isAbsolute(path)) {
47354
+ fullPath = sysPath2.join(this.options.cwd, path);
47355
+ }
47356
+ const now = new Date;
47357
+ const writes = this._pendingWrites;
47358
+ function awaitWriteFinishFn(prevStat) {
47359
+ statcb(fullPath, (err, curStat) => {
47360
+ if (err || !writes.has(path)) {
47361
+ if (err && err.code !== "ENOENT")
47362
+ awfEmit(err);
47363
+ return;
47364
+ }
47365
+ const now2 = Number(new Date);
47366
+ if (prevStat && curStat.size !== prevStat.size) {
47367
+ writes.get(path).lastChange = now2;
47368
+ }
47369
+ const pw = writes.get(path);
47370
+ const df = now2 - pw.lastChange;
47371
+ if (df >= threshold) {
47372
+ writes.delete(path);
47373
+ awfEmit(undefined, curStat);
47374
+ } else {
47375
+ timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
47376
+ }
47377
+ });
47378
+ }
47379
+ if (!writes.has(path)) {
47380
+ writes.set(path, {
47381
+ lastChange: now,
47382
+ cancelWait: () => {
47383
+ writes.delete(path);
47384
+ clearTimeout(timeoutHandler);
47385
+ return event;
47386
+ }
47387
+ });
47388
+ timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
47389
+ }
47390
+ }
47391
+ _isIgnored(path, stats) {
47392
+ if (this.options.atomic && DOT_RE.test(path))
47393
+ return true;
47394
+ if (!this._userIgnored) {
47395
+ const { cwd } = this.options;
47396
+ const ign = this.options.ignored;
47397
+ const ignored = (ign || []).map(normalizeIgnored(cwd));
47398
+ const ignoredPaths = [...this._ignoredPaths];
47399
+ const list = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
47400
+ this._userIgnored = anymatch(list, undefined);
47401
+ }
47402
+ return this._userIgnored(path, stats);
47403
+ }
47404
+ _isntIgnored(path, stat4) {
47405
+ return !this._isIgnored(path, stat4);
47406
+ }
47407
+ _getWatchHelpers(path) {
47408
+ return new WatchHelper(path, this.options.followSymlinks, this);
47409
+ }
47410
+ _getWatchedDir(directory) {
47411
+ const dir = sysPath2.resolve(directory);
47412
+ if (!this._watched.has(dir))
47413
+ this._watched.set(dir, new DirEntry(dir, this._boundRemove));
47414
+ return this._watched.get(dir);
47415
+ }
47416
+ _hasReadPermissions(stats) {
47417
+ if (this.options.ignorePermissionErrors)
47418
+ return true;
47419
+ return Boolean(Number(stats.mode) & 256);
47420
+ }
47421
+ _remove(directory, item, isDirectory) {
47422
+ const path = sysPath2.join(directory, item);
47423
+ const fullPath = sysPath2.resolve(path);
47424
+ isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
47425
+ if (!this._throttle("remove", path, 100))
47426
+ return;
47427
+ if (!isDirectory && this._watched.size === 1) {
47428
+ this.add(directory, item, true);
47429
+ }
47430
+ const wp = this._getWatchedDir(path);
47431
+ const nestedDirectoryChildren = wp.getChildren();
47432
+ nestedDirectoryChildren.forEach((nested) => this._remove(path, nested));
47433
+ const parent = this._getWatchedDir(directory);
47434
+ const wasTracked = parent.has(item);
47435
+ parent.remove(item);
47436
+ if (this._symlinkPaths.has(fullPath)) {
47437
+ this._symlinkPaths.delete(fullPath);
47438
+ }
47439
+ let relPath = path;
47440
+ if (this.options.cwd)
47441
+ relPath = sysPath2.relative(this.options.cwd, path);
47442
+ if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
47443
+ const event = this._pendingWrites.get(relPath).cancelWait();
47444
+ if (event === EVENTS.ADD)
47445
+ return;
47446
+ }
47447
+ this._watched.delete(path);
47448
+ this._watched.delete(fullPath);
47449
+ const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
47450
+ if (wasTracked && !this._isIgnored(path))
47451
+ this._emit(eventName, path);
47452
+ this._closePath(path);
47453
+ }
47454
+ _closePath(path) {
47455
+ this._closeFile(path);
47456
+ const dir = sysPath2.dirname(path);
47457
+ this._getWatchedDir(dir).remove(sysPath2.basename(path));
47458
+ }
47459
+ _closeFile(path) {
47460
+ const closers = this._closers.get(path);
47461
+ if (!closers)
47462
+ return;
47463
+ closers.forEach((closer) => closer());
47464
+ this._closers.delete(path);
47465
+ }
47466
+ _addPathCloser(path, closer) {
47467
+ if (!closer)
47468
+ return;
47469
+ let list = this._closers.get(path);
47470
+ if (!list) {
47471
+ list = [];
47472
+ this._closers.set(path, list);
47473
+ }
47474
+ list.push(closer);
47475
+ }
47476
+ _readdirp(root, opts) {
47477
+ if (this.closed)
47478
+ return;
47479
+ const options = { type: EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 };
47480
+ let stream = readdirp(root, options);
47481
+ this._streams.add(stream);
47482
+ stream.once(STR_CLOSE, () => {
47483
+ stream = undefined;
47484
+ });
47485
+ stream.once(STR_END, () => {
47486
+ if (stream) {
47487
+ this._streams.delete(stream);
47488
+ stream = undefined;
47489
+ }
47490
+ });
47491
+ return stream;
47492
+ }
47493
+ };
47494
+ esm_default2 = { watch, FSWatcher };
47495
+ });
47496
+
47497
+ // src/lib/watcher.ts
47498
+ var exports_watcher = {};
47499
+ __export(exports_watcher, {
47500
+ watchSource: () => watchSource,
47501
+ unwatchSource: () => unwatchSource,
47502
+ stopAllWatchers: () => stopAllWatchers
47503
+ });
47504
+ import { extname as extname6, basename as basename6, relative as relative5 } from "path";
47505
+ import { statSync as statSync3 } from "fs";
47506
+ function watchSource(source, machine_id) {
47507
+ if (!source.path)
47508
+ return;
47509
+ if (watchers.has(source.id))
47510
+ return;
47511
+ const watcher = esm_default2.watch(source.path, {
47512
+ ignored: IGNORE_PATTERNS,
47513
+ persistent: true,
47514
+ ignoreInitial: true,
47515
+ awaitWriteFinish: { stabilityThreshold: 500, pollInterval: 100 }
47516
+ });
47517
+ watcher.on("add", (fullPath) => handleAdd(fullPath, source, machine_id));
47518
+ watcher.on("change", (fullPath) => handleAdd(fullPath, source, machine_id));
47519
+ watcher.on("unlink", (fullPath) => {
47520
+ const relPath = relative5(source.path, fullPath);
47521
+ markFileDeleted(source.id, relPath);
47522
+ });
47523
+ watchers.set(source.id, watcher);
47524
+ }
47525
+ function unwatchSource(source_id) {
47526
+ const w2 = watchers.get(source_id);
47527
+ if (w2) {
47528
+ w2.close();
47529
+ watchers.delete(source_id);
47530
+ }
47531
+ }
47532
+ function stopAllWatchers() {
47533
+ for (const [id] of watchers)
47534
+ unwatchSource(id);
47535
+ }
47536
+ function handleAdd(fullPath, source, machine_id) {
47537
+ try {
47538
+ const stat4 = statSync3(fullPath);
47539
+ if (!stat4.isFile())
47540
+ return;
47541
+ const relPath = relative5(source.path, fullPath);
47542
+ const entry = basename6(fullPath);
47543
+ const hash = hashFile(fullPath);
47544
+ upsertFile({
47545
+ source_id: source.id,
47546
+ machine_id,
47547
+ path: relPath,
47548
+ name: entry,
47549
+ ext: extname6(entry).toLowerCase(),
47550
+ size: stat4.size,
47551
+ mime: $lookup(entry) || "application/octet-stream",
47552
+ hash,
47553
+ status: "active",
47554
+ modified_at: stat4.mtime.toISOString()
47555
+ });
47556
+ } catch {}
47557
+ }
47558
+ var IGNORE_PATTERNS, watchers;
47559
+ var init_watcher = __esm(() => {
47560
+ init_esm3();
47561
+ init_mime_types();
47562
+ init_hasher();
47563
+ init_files();
47564
+ IGNORE_PATTERNS = [
47565
+ /node_modules/,
47566
+ /\.git/,
47567
+ /\.DS_Store/,
47568
+ /__pycache__/,
47569
+ /\.next/,
47570
+ /\/dist\//
47571
+ ];
47572
+ watchers = new Map;
47573
+ });
47574
+
44383
47575
  // src/mcp/index.ts
44384
47576
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
44385
47577
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -58620,6 +61812,9 @@ function getOrCreateTag(name, color) {
58620
61812
  db.run("INSERT INTO tags (id, name, color) VALUES (?, ?, ?)", [id, name.toLowerCase(), color ?? "#6366f1"]);
58621
61813
  return db.query("SELECT * FROM tags WHERE id = ?").get(id);
58622
61814
  }
61815
+ function deleteTag(id) {
61816
+ return getDb().run("DELETE FROM tags WHERE id = ?", [id]).changes > 0;
61817
+ }
58623
61818
  function tagFile(file_id, tag_name) {
58624
61819
  const tag = getOrCreateTag(tag_name);
58625
61820
  const db = getDb();
@@ -58685,6 +61880,9 @@ function getCollection(id) {
58685
61880
  const children = db.query("SELECT * FROM collections WHERE parent_id=? ORDER BY name").all(id).map(toCollection);
58686
61881
  return { ...toCollection(row), file_count, children };
58687
61882
  }
61883
+ function deleteCollection(id) {
61884
+ return getDb().run("DELETE FROM collections WHERE id=?", [id]).changes > 0;
61885
+ }
58688
61886
  function addToCollection(collection_id, file_id) {
58689
61887
  getDb().run("INSERT OR IGNORE INTO collection_files (collection_id, file_id) VALUES (?,?)", [collection_id, file_id]);
58690
61888
  }
@@ -58772,6 +61970,9 @@ function getProject(id) {
58772
61970
  const file_count = db.query("SELECT COUNT(*) as cnt FROM project_files WHERE project_id=?").get(id).cnt;
58773
61971
  return { ...toProject(row), file_count };
58774
61972
  }
61973
+ function deleteProject(id) {
61974
+ return getDb().run("DELETE FROM projects WHERE id=?", [id]).changes > 0;
61975
+ }
58775
61976
  function addToProject(project_id, file_id) {
58776
61977
  getDb().run("INSERT OR IGNORE INTO project_files (project_id, file_id) VALUES (?,?)", [project_id, file_id]);
58777
61978
  }
@@ -58781,440 +61982,10 @@ function removeFromProject(project_id, file_id) {
58781
61982
 
58782
61983
  // src/lib/indexer.ts
58783
61984
  init_mime_types();
61985
+ init_hasher();
58784
61986
  import { readdirSync as readdirSync3, statSync, existsSync as existsSync7 } from "fs";
58785
61987
  import { join as join8, relative as relative2, extname as extname3, basename as basename2 } from "path";
58786
61988
 
58787
- // node_modules/@noble/hashes/esm/utils.js
58788
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
58789
- function isBytes(a) {
58790
- return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
58791
- }
58792
- function anumber(n) {
58793
- if (!Number.isSafeInteger(n) || n < 0)
58794
- throw new Error("positive integer expected, got " + n);
58795
- }
58796
- function abytes(b, ...lengths) {
58797
- if (!isBytes(b))
58798
- throw new Error("Uint8Array expected");
58799
- if (lengths.length > 0 && !lengths.includes(b.length))
58800
- throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
58801
- }
58802
- function aexists(instance, checkFinished = true) {
58803
- if (instance.destroyed)
58804
- throw new Error("Hash instance has been destroyed");
58805
- if (checkFinished && instance.finished)
58806
- throw new Error("Hash#digest() has already been called");
58807
- }
58808
- function aoutput(out, instance) {
58809
- abytes(out);
58810
- const min = instance.outputLen;
58811
- if (out.length < min) {
58812
- throw new Error("digestInto() expects output buffer of length at least " + min);
58813
- }
58814
- }
58815
- function u8(arr) {
58816
- return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
58817
- }
58818
- function u32(arr) {
58819
- return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
58820
- }
58821
- function clean(...arrays) {
58822
- for (let i = 0;i < arrays.length; i++) {
58823
- arrays[i].fill(0);
58824
- }
58825
- }
58826
- function rotr(word, shift) {
58827
- return word << 32 - shift | word >>> shift;
58828
- }
58829
- var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
58830
- function byteSwap(word) {
58831
- return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
58832
- }
58833
- var swap8IfBE = isLE ? (n) => n : (n) => byteSwap(n);
58834
- function byteSwap32(arr) {
58835
- for (let i = 0;i < arr.length; i++) {
58836
- arr[i] = byteSwap(arr[i]);
58837
- }
58838
- return arr;
58839
- }
58840
- var swap32IfBE = isLE ? (u) => u : byteSwap32;
58841
- function utf8ToBytes(str) {
58842
- if (typeof str !== "string")
58843
- throw new Error("string expected");
58844
- return new Uint8Array(new TextEncoder().encode(str));
58845
- }
58846
- function toBytes(data) {
58847
- if (typeof data === "string")
58848
- data = utf8ToBytes(data);
58849
- abytes(data);
58850
- return data;
58851
- }
58852
- class Hash {
58853
- }
58854
- function createXOFer(hashCons) {
58855
- const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
58856
- const tmp = hashCons({});
58857
- hashC.outputLen = tmp.outputLen;
58858
- hashC.blockLen = tmp.blockLen;
58859
- hashC.create = (opts) => hashCons(opts);
58860
- return hashC;
58861
- }
58862
-
58863
- // node_modules/@noble/hashes/esm/_md.js
58864
- var SHA256_IV = /* @__PURE__ */ Uint32Array.from([
58865
- 1779033703,
58866
- 3144134277,
58867
- 1013904242,
58868
- 2773480762,
58869
- 1359893119,
58870
- 2600822924,
58871
- 528734635,
58872
- 1541459225
58873
- ]);
58874
-
58875
- // node_modules/@noble/hashes/esm/_u64.js
58876
- var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
58877
- var _32n = /* @__PURE__ */ BigInt(32);
58878
- function fromBig(n, le = false) {
58879
- if (le)
58880
- return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
58881
- return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
58882
- }
58883
-
58884
- // node_modules/@noble/hashes/esm/_blake.js
58885
- function G1s(a, b, c, d, x) {
58886
- a = a + b + x | 0;
58887
- d = rotr(d ^ a, 16);
58888
- c = c + d | 0;
58889
- b = rotr(b ^ c, 12);
58890
- return { a, b, c, d };
58891
- }
58892
- function G2s(a, b, c, d, x) {
58893
- a = a + b + x | 0;
58894
- d = rotr(d ^ a, 8);
58895
- c = c + d | 0;
58896
- b = rotr(b ^ c, 7);
58897
- return { a, b, c, d };
58898
- }
58899
-
58900
- // node_modules/@noble/hashes/esm/blake2.js
58901
- class BLAKE2 extends Hash {
58902
- constructor(blockLen, outputLen) {
58903
- super();
58904
- this.finished = false;
58905
- this.destroyed = false;
58906
- this.length = 0;
58907
- this.pos = 0;
58908
- anumber(blockLen);
58909
- anumber(outputLen);
58910
- this.blockLen = blockLen;
58911
- this.outputLen = outputLen;
58912
- this.buffer = new Uint8Array(blockLen);
58913
- this.buffer32 = u32(this.buffer);
58914
- }
58915
- update(data) {
58916
- aexists(this);
58917
- data = toBytes(data);
58918
- abytes(data);
58919
- const { blockLen, buffer, buffer32 } = this;
58920
- const len = data.length;
58921
- const offset = data.byteOffset;
58922
- const buf = data.buffer;
58923
- for (let pos = 0;pos < len; ) {
58924
- if (this.pos === blockLen) {
58925
- swap32IfBE(buffer32);
58926
- this.compress(buffer32, 0, false);
58927
- swap32IfBE(buffer32);
58928
- this.pos = 0;
58929
- }
58930
- const take = Math.min(blockLen - this.pos, len - pos);
58931
- const dataOffset = offset + pos;
58932
- if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
58933
- const data32 = new Uint32Array(buf, dataOffset, Math.floor((len - pos) / 4));
58934
- swap32IfBE(data32);
58935
- for (let pos32 = 0;pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
58936
- this.length += blockLen;
58937
- this.compress(data32, pos32, false);
58938
- }
58939
- swap32IfBE(data32);
58940
- continue;
58941
- }
58942
- buffer.set(data.subarray(pos, pos + take), this.pos);
58943
- this.pos += take;
58944
- this.length += take;
58945
- pos += take;
58946
- }
58947
- return this;
58948
- }
58949
- digestInto(out) {
58950
- aexists(this);
58951
- aoutput(out, this);
58952
- const { pos, buffer32 } = this;
58953
- this.finished = true;
58954
- clean(this.buffer.subarray(pos));
58955
- swap32IfBE(buffer32);
58956
- this.compress(buffer32, 0, true);
58957
- swap32IfBE(buffer32);
58958
- const out32 = u32(out);
58959
- this.get().forEach((v, i) => out32[i] = swap8IfBE(v));
58960
- }
58961
- digest() {
58962
- const { buffer, outputLen } = this;
58963
- this.digestInto(buffer);
58964
- const res = buffer.slice(0, outputLen);
58965
- this.destroy();
58966
- return res;
58967
- }
58968
- _cloneInto(to) {
58969
- const { buffer, length, finished, destroyed, outputLen, pos } = this;
58970
- to || (to = new this.constructor({ dkLen: outputLen }));
58971
- to.set(...this.get());
58972
- to.buffer.set(buffer);
58973
- to.destroyed = destroyed;
58974
- to.finished = finished;
58975
- to.length = length;
58976
- to.pos = pos;
58977
- to.outputLen = outputLen;
58978
- return to;
58979
- }
58980
- clone() {
58981
- return this._cloneInto();
58982
- }
58983
- }
58984
- function compress(s, offset, msg, rounds, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) {
58985
- let j = 0;
58986
- for (let i = 0;i < rounds; i++) {
58987
- ({ a: v0, b: v4, c: v8, d: v12 } = G1s(v0, v4, v8, v12, msg[offset + s[j++]]));
58988
- ({ a: v0, b: v4, c: v8, d: v12 } = G2s(v0, v4, v8, v12, msg[offset + s[j++]]));
58989
- ({ a: v1, b: v5, c: v9, d: v13 } = G1s(v1, v5, v9, v13, msg[offset + s[j++]]));
58990
- ({ a: v1, b: v5, c: v9, d: v13 } = G2s(v1, v5, v9, v13, msg[offset + s[j++]]));
58991
- ({ a: v2, b: v6, c: v10, d: v14 } = G1s(v2, v6, v10, v14, msg[offset + s[j++]]));
58992
- ({ a: v2, b: v6, c: v10, d: v14 } = G2s(v2, v6, v10, v14, msg[offset + s[j++]]));
58993
- ({ a: v3, b: v7, c: v11, d: v15 } = G1s(v3, v7, v11, v15, msg[offset + s[j++]]));
58994
- ({ a: v3, b: v7, c: v11, d: v15 } = G2s(v3, v7, v11, v15, msg[offset + s[j++]]));
58995
- ({ a: v0, b: v5, c: v10, d: v15 } = G1s(v0, v5, v10, v15, msg[offset + s[j++]]));
58996
- ({ a: v0, b: v5, c: v10, d: v15 } = G2s(v0, v5, v10, v15, msg[offset + s[j++]]));
58997
- ({ a: v1, b: v6, c: v11, d: v12 } = G1s(v1, v6, v11, v12, msg[offset + s[j++]]));
58998
- ({ a: v1, b: v6, c: v11, d: v12 } = G2s(v1, v6, v11, v12, msg[offset + s[j++]]));
58999
- ({ a: v2, b: v7, c: v8, d: v13 } = G1s(v2, v7, v8, v13, msg[offset + s[j++]]));
59000
- ({ a: v2, b: v7, c: v8, d: v13 } = G2s(v2, v7, v8, v13, msg[offset + s[j++]]));
59001
- ({ a: v3, b: v4, c: v9, d: v14 } = G1s(v3, v4, v9, v14, msg[offset + s[j++]]));
59002
- ({ a: v3, b: v4, c: v9, d: v14 } = G2s(v3, v4, v9, v14, msg[offset + s[j++]]));
59003
- }
59004
- return { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 };
59005
- }
59006
-
59007
- // node_modules/@noble/hashes/esm/blake3.js
59008
- var B3_Flags = {
59009
- CHUNK_START: 1,
59010
- CHUNK_END: 2,
59011
- PARENT: 4,
59012
- ROOT: 8,
59013
- KEYED_HASH: 16,
59014
- DERIVE_KEY_CONTEXT: 32,
59015
- DERIVE_KEY_MATERIAL: 64
59016
- };
59017
- var B3_IV = SHA256_IV.slice();
59018
- var B3_SIGMA = /* @__PURE__ */ (() => {
59019
- const Id = Array.from({ length: 16 }, (_, i) => i);
59020
- const permute = (arr) => [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8].map((i) => arr[i]);
59021
- const res = [];
59022
- for (let i = 0, v = Id;i < 7; i++, v = permute(v))
59023
- res.push(...v);
59024
- return Uint8Array.from(res);
59025
- })();
59026
-
59027
- class BLAKE3 extends BLAKE2 {
59028
- constructor(opts = {}, flags = 0) {
59029
- super(64, opts.dkLen === undefined ? 32 : opts.dkLen);
59030
- this.chunkPos = 0;
59031
- this.chunksDone = 0;
59032
- this.flags = 0 | 0;
59033
- this.stack = [];
59034
- this.posOut = 0;
59035
- this.bufferOut32 = new Uint32Array(16);
59036
- this.chunkOut = 0;
59037
- this.enableXOF = true;
59038
- const { key, context } = opts;
59039
- const hasContext = context !== undefined;
59040
- if (key !== undefined) {
59041
- if (hasContext)
59042
- throw new Error('Only "key" or "context" can be specified at same time');
59043
- const k = toBytes(key).slice();
59044
- abytes(k, 32);
59045
- this.IV = u32(k);
59046
- swap32IfBE(this.IV);
59047
- this.flags = flags | B3_Flags.KEYED_HASH;
59048
- } else if (hasContext) {
59049
- const ctx = toBytes(context);
59050
- const contextKey = new BLAKE3({ dkLen: 32 }, B3_Flags.DERIVE_KEY_CONTEXT).update(ctx).digest();
59051
- this.IV = u32(contextKey);
59052
- swap32IfBE(this.IV);
59053
- this.flags = flags | B3_Flags.DERIVE_KEY_MATERIAL;
59054
- } else {
59055
- this.IV = B3_IV.slice();
59056
- this.flags = flags;
59057
- }
59058
- this.state = this.IV.slice();
59059
- this.bufferOut = u8(this.bufferOut32);
59060
- }
59061
- get() {
59062
- return [];
59063
- }
59064
- set() {}
59065
- b2Compress(counter, flags, buf, bufPos = 0) {
59066
- const { state: s, pos } = this;
59067
- const { h, l } = fromBig(BigInt(counter), true);
59068
- const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, bufPos, buf, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], h, l, pos, flags);
59069
- s[0] = v0 ^ v8;
59070
- s[1] = v1 ^ v9;
59071
- s[2] = v2 ^ v10;
59072
- s[3] = v3 ^ v11;
59073
- s[4] = v4 ^ v12;
59074
- s[5] = v5 ^ v13;
59075
- s[6] = v6 ^ v14;
59076
- s[7] = v7 ^ v15;
59077
- }
59078
- compress(buf, bufPos = 0, isLast = false) {
59079
- let flags = this.flags;
59080
- if (!this.chunkPos)
59081
- flags |= B3_Flags.CHUNK_START;
59082
- if (this.chunkPos === 15 || isLast)
59083
- flags |= B3_Flags.CHUNK_END;
59084
- if (!isLast)
59085
- this.pos = this.blockLen;
59086
- this.b2Compress(this.chunksDone, flags, buf, bufPos);
59087
- this.chunkPos += 1;
59088
- if (this.chunkPos === 16 || isLast) {
59089
- let chunk = this.state;
59090
- this.state = this.IV.slice();
59091
- for (let last, chunks = this.chunksDone + 1;isLast || !(chunks & 1); chunks >>= 1) {
59092
- if (!(last = this.stack.pop()))
59093
- break;
59094
- this.buffer32.set(last, 0);
59095
- this.buffer32.set(chunk, 8);
59096
- this.pos = this.blockLen;
59097
- this.b2Compress(0, this.flags | B3_Flags.PARENT, this.buffer32, 0);
59098
- chunk = this.state;
59099
- this.state = this.IV.slice();
59100
- }
59101
- this.chunksDone++;
59102
- this.chunkPos = 0;
59103
- this.stack.push(chunk);
59104
- }
59105
- this.pos = 0;
59106
- }
59107
- _cloneInto(to) {
59108
- to = super._cloneInto(to);
59109
- const { IV, flags, state, chunkPos, posOut, chunkOut, stack, chunksDone } = this;
59110
- to.state.set(state.slice());
59111
- to.stack = stack.map((i) => Uint32Array.from(i));
59112
- to.IV.set(IV);
59113
- to.flags = flags;
59114
- to.chunkPos = chunkPos;
59115
- to.chunksDone = chunksDone;
59116
- to.posOut = posOut;
59117
- to.chunkOut = chunkOut;
59118
- to.enableXOF = this.enableXOF;
59119
- to.bufferOut32.set(this.bufferOut32);
59120
- return to;
59121
- }
59122
- destroy() {
59123
- this.destroyed = true;
59124
- clean(this.state, this.buffer32, this.IV, this.bufferOut32);
59125
- clean(...this.stack);
59126
- }
59127
- b2CompressOut() {
59128
- const { state: s, pos, flags, buffer32, bufferOut32: out32 } = this;
59129
- const { h, l } = fromBig(BigInt(this.chunkOut++));
59130
- swap32IfBE(buffer32);
59131
- const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, 0, buffer32, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], l, h, pos, flags);
59132
- out32[0] = v0 ^ v8;
59133
- out32[1] = v1 ^ v9;
59134
- out32[2] = v2 ^ v10;
59135
- out32[3] = v3 ^ v11;
59136
- out32[4] = v4 ^ v12;
59137
- out32[5] = v5 ^ v13;
59138
- out32[6] = v6 ^ v14;
59139
- out32[7] = v7 ^ v15;
59140
- out32[8] = s[0] ^ v8;
59141
- out32[9] = s[1] ^ v9;
59142
- out32[10] = s[2] ^ v10;
59143
- out32[11] = s[3] ^ v11;
59144
- out32[12] = s[4] ^ v12;
59145
- out32[13] = s[5] ^ v13;
59146
- out32[14] = s[6] ^ v14;
59147
- out32[15] = s[7] ^ v15;
59148
- swap32IfBE(buffer32);
59149
- swap32IfBE(out32);
59150
- this.posOut = 0;
59151
- }
59152
- finish() {
59153
- if (this.finished)
59154
- return;
59155
- this.finished = true;
59156
- clean(this.buffer.subarray(this.pos));
59157
- let flags = this.flags | B3_Flags.ROOT;
59158
- if (this.stack.length) {
59159
- flags |= B3_Flags.PARENT;
59160
- swap32IfBE(this.buffer32);
59161
- this.compress(this.buffer32, 0, true);
59162
- swap32IfBE(this.buffer32);
59163
- this.chunksDone = 0;
59164
- this.pos = this.blockLen;
59165
- } else {
59166
- flags |= (!this.chunkPos ? B3_Flags.CHUNK_START : 0) | B3_Flags.CHUNK_END;
59167
- }
59168
- this.flags = flags;
59169
- this.b2CompressOut();
59170
- }
59171
- writeInto(out) {
59172
- aexists(this, false);
59173
- abytes(out);
59174
- this.finish();
59175
- const { blockLen, bufferOut } = this;
59176
- for (let pos = 0, len = out.length;pos < len; ) {
59177
- if (this.posOut >= blockLen)
59178
- this.b2CompressOut();
59179
- const take = Math.min(blockLen - this.posOut, len - pos);
59180
- out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
59181
- this.posOut += take;
59182
- pos += take;
59183
- }
59184
- return out;
59185
- }
59186
- xofInto(out) {
59187
- if (!this.enableXOF)
59188
- throw new Error("XOF is not possible after digest call");
59189
- return this.writeInto(out);
59190
- }
59191
- xof(bytes) {
59192
- anumber(bytes);
59193
- return this.xofInto(new Uint8Array(bytes));
59194
- }
59195
- digestInto(out) {
59196
- aoutput(out, this);
59197
- if (this.finished)
59198
- throw new Error("digest() was already called");
59199
- this.enableXOF = false;
59200
- this.writeInto(out);
59201
- this.destroy();
59202
- return out;
59203
- }
59204
- digest() {
59205
- return this.digestInto(new Uint8Array(this.outputLen));
59206
- }
59207
- }
59208
- var blake3 = /* @__PURE__ */ createXOFer((opts) => new BLAKE3(opts));
59209
-
59210
- // src/lib/hasher.ts
59211
- import { readFileSync as readFileSync2 } from "fs";
59212
- function hashFile(filePath) {
59213
- const data = readFileSync2(filePath);
59214
- const hash = blake3(data);
59215
- return Buffer.from(hash).toString("hex");
59216
- }
59217
-
59218
61989
  // src/lib/ignore.ts
59219
61990
  import { readFileSync as readFileSync3, existsSync as existsSync6 } from "fs";
59220
61991
  import { join as join7 } from "path";
@@ -59476,7 +62247,7 @@ function applyFilters(conditions, params, opts) {
59476
62247
  }
59477
62248
 
59478
62249
  // src/mcp/index.ts
59479
- import { join as join10 } from "path";
62250
+ import { join as join12 } from "path";
59480
62251
  import { existsSync as existsSync8 } from "fs";
59481
62252
  import { homedir as homedir9 } from "os";
59482
62253
  var server = new McpServer({
@@ -59558,6 +62329,7 @@ server.tool("list_files", "List indexed files with optional filters. If agent_id
59558
62329
  sort_dir: exports_external2.enum(["asc", "desc"]).optional().default("desc"),
59559
62330
  limit: exports_external2.number().optional().default(50),
59560
62331
  offset: exports_external2.number().optional().default(0),
62332
+ sync_status: exports_external2.enum(["local_only", "synced", "conflict"]).optional().describe("Filter by sync status"),
59561
62333
  agent_id: exports_external2.string().optional().describe("Agent ID \u2014 auto-applies focused project filter if set")
59562
62334
  }, async (opts) => {
59563
62335
  if (opts.agent_id && !opts.project_id) {
@@ -59604,12 +62376,12 @@ server.tool("download_file", "Download a file from S3 to a local path", {
59604
62376
  if (!source)
59605
62377
  return { content: [{ type: "text", text: "Source not found" }], isError: true };
59606
62378
  if (source.type === "local") {
59607
- const fullPath = join10(source.path, file.path);
62379
+ const fullPath = join12(source.path, file.path);
59608
62380
  if (agent_id)
59609
62381
  logActivity({ agent_id, action: "read", file_id: id, metadata: { path: fullPath } });
59610
62382
  return { content: [{ type: "text", text: `Local file: ${fullPath}` }] };
59611
62383
  }
59612
- const outPath = dest ?? join10(homedir9(), "Downloads", file.name);
62384
+ const outPath = dest ?? join12(homedir9(), "Downloads", file.name);
59613
62385
  await downloadFromS3(source, file.path, outPath);
59614
62386
  if (agent_id)
59615
62387
  logActivity({ agent_id, action: "download", file_id: id, metadata: { dest: outPath } });
@@ -59660,6 +62432,12 @@ server.tool("untag_file", "Remove tags from a file", {
59660
62432
  logActivity({ agent_id, action: "untag", file_id, metadata: { tags } });
59661
62433
  return { content: [{ type: "text", text: "Tags removed" }] };
59662
62434
  });
62435
+ server.tool("delete_tag", "Delete a tag entirely (removes from all files)", {
62436
+ id: exports_external2.string().describe("Tag ID")
62437
+ }, async ({ id }) => {
62438
+ const ok = deleteTag(id);
62439
+ return { content: [{ type: "text", text: ok ? `Tag ${id} deleted` : `Tag not found: ${id}` }] };
62440
+ });
59663
62441
  server.tool("list_collections", "List all collections", {
59664
62442
  parent_id: exports_external2.string().optional().describe("Filter by parent collection ID")
59665
62443
  }, async ({ parent_id }) => {
@@ -59724,6 +62502,12 @@ server.tool("remove_from_collection", "Remove a file from a collection", {
59724
62502
  removeFromCollection(collection_id, file_id);
59725
62503
  return { content: [{ type: "text", text: "Removed from collection" }] };
59726
62504
  });
62505
+ server.tool("delete_collection", "Delete a collection (does not delete files, only the collection)", {
62506
+ id: exports_external2.string().describe("Collection ID")
62507
+ }, async ({ id }) => {
62508
+ const ok = deleteCollection(id);
62509
+ return { content: [{ type: "text", text: ok ? `Collection ${id} deleted` : `Collection not found: ${id}` }] };
62510
+ });
59727
62511
  server.tool("list_projects", "List all projects", {
59728
62512
  status: exports_external2.enum(["active", "archived", "completed"]).optional().describe("Filter by status")
59729
62513
  }, async ({ status }) => {
@@ -59770,6 +62554,12 @@ server.tool("remove_from_project", "Remove a file from a project", {
59770
62554
  removeFromProject(project_id, file_id);
59771
62555
  return { content: [{ type: "text", text: "Removed from project" }] };
59772
62556
  });
62557
+ server.tool("delete_project", "Delete a project (does not delete files, only the project)", {
62558
+ id: exports_external2.string().describe("Project ID")
62559
+ }, async ({ id }) => {
62560
+ const ok = deleteProject(id);
62561
+ return { content: [{ type: "text", text: ok ? `Project ${id} deleted` : `Project not found: ${id}` }] };
62562
+ });
59773
62563
  server.tool("list_machines", "List all known machines that have indexed files", {}, async () => {
59774
62564
  return { content: [{ type: "text", text: JSON.stringify(listMachines(), null, 2) }] };
59775
62565
  });
@@ -59788,7 +62578,7 @@ server.tool("get_file_url", "Get a pre-signed URL for temporary access to an S3
59788
62578
  const url = await getPresignedUrl(source, file.path, expires_in ?? 3600);
59789
62579
  return { content: [{ type: "text", text: url }] };
59790
62580
  });
59791
- server.tool("get_file_content", "Read the content of a text file (local sources only, max 1MB)", {
62581
+ server.tool("get_file_content", "Read the content of a text file (local or S3 sources, max 1MB)", {
59792
62582
  id: exports_external2.string().describe("File ID"),
59793
62583
  max_bytes: exports_external2.number().optional().default(102400).describe("Max bytes to read (default 100KB)"),
59794
62584
  agent_id: exports_external2.string().optional().describe("Agent ID for activity tracking")
@@ -59799,25 +62589,53 @@ server.tool("get_file_content", "Read the content of a text file (local sources
59799
62589
  const source = getSource(file.source_id);
59800
62590
  if (!source)
59801
62591
  return { content: [{ type: "text", text: "Source not found" }], isError: true };
59802
- if (source.type !== "local")
59803
- return { content: [{ type: "text", text: "get_file_content only works with local sources" }], isError: true };
59804
- const fullPath = join10(source.path, file.path);
59805
- const { readFileSync: readFileSync5 } = await import("fs");
59806
- try {
59807
- const buf = readFileSync5(fullPath);
59808
- const slice = buf.slice(0, max_bytes ?? 102400);
59809
- const text = slice.toString("utf8");
59810
- const truncated = buf.length > (max_bytes ?? 102400);
59811
- if (agent_id)
59812
- logActivity({ agent_id, action: "read", file_id: id, metadata: { bytes_read: slice.length, truncated } });
59813
- return {
59814
- content: [{ type: "text", text: truncated ? `${text}
59815
-
59816
- [truncated \u2014 ${buf.length} bytes total, showing first ${max_bytes} bytes]` : text }]
59817
- };
59818
- } catch (e2) {
59819
- return { content: [{ type: "text", text: `Failed to read file: ${e2.message}` }], isError: true };
62592
+ const limit = max_bytes ?? 102400;
62593
+ let buf;
62594
+ if (source.type === "local") {
62595
+ const fullPath = join12(source.path, file.path);
62596
+ const { readFileSync: readFileSync5 } = await import("fs");
62597
+ try {
62598
+ buf = readFileSync5(fullPath);
62599
+ } catch (e2) {
62600
+ return { content: [{ type: "text", text: `Failed to read file: ${e2.message}` }], isError: true };
62601
+ }
62602
+ } else if (source.type === "s3") {
62603
+ try {
62604
+ const { GetObjectCommand: GetObjectCommand3, S3Client: S3Client3 } = await Promise.resolve().then(() => (init_dist_es27(), exports_dist_es8));
62605
+ const cfg = source.config;
62606
+ const client = new S3Client3({
62607
+ region: source.region ?? "us-east-1",
62608
+ ...cfg.endpoint ? { endpoint: cfg.endpoint } : {},
62609
+ ...cfg.accessKeyId ? { credentials: { accessKeyId: cfg.accessKeyId, secretAccessKey: cfg.secretAccessKey, sessionToken: cfg.sessionToken } } : {}
62610
+ });
62611
+ const resp = await client.send(new GetObjectCommand3({
62612
+ Bucket: source.bucket,
62613
+ Key: file.path,
62614
+ Range: `bytes=0-${limit - 1}`
62615
+ }));
62616
+ if (!resp.Body)
62617
+ return { content: [{ type: "text", text: "Empty response from S3" }], isError: true };
62618
+ const chunks = [];
62619
+ for await (const chunk of resp.Body) {
62620
+ chunks.push(chunk);
62621
+ }
62622
+ buf = Buffer.concat(chunks);
62623
+ } catch (e2) {
62624
+ return { content: [{ type: "text", text: `Failed to read S3 file: ${e2.message}` }], isError: true };
62625
+ }
62626
+ } else {
62627
+ return { content: [{ type: "text", text: `Unsupported source type: ${source.type}` }], isError: true };
59820
62628
  }
62629
+ const slice = buf.slice(0, limit);
62630
+ const text = slice.toString("utf8");
62631
+ const truncated = buf.length > limit;
62632
+ if (agent_id)
62633
+ logActivity({ agent_id, action: "read", file_id: id, metadata: { bytes_read: slice.length, truncated } });
62634
+ return {
62635
+ content: [{ type: "text", text: truncated ? `${text}
62636
+
62637
+ [truncated \u2014 ${buf.length} bytes total, showing first ${limit} bytes]` : text }]
62638
+ };
59821
62639
  });
59822
62640
  server.tool("bulk_tag", "Add tags to multiple files at once (by IDs or search query)", {
59823
62641
  tags: exports_external2.array(exports_external2.string()).describe("Tag names to add"),
@@ -59851,9 +62669,9 @@ server.tool("describe_file", "Get file metadata + first lines of content in one
59851
62669
  let preview = "";
59852
62670
  if (source?.type === "local") {
59853
62671
  const { readFileSync: readFileSync5 } = await import("fs");
59854
- const { join: join11 } = await import("path");
62672
+ const { join: join13 } = await import("path");
59855
62673
  try {
59856
- const fullPath = join11(source.path, file.path);
62674
+ const fullPath = join13(source.path, file.path);
59857
62675
  const content = readFileSync5(fullPath, "utf8");
59858
62676
  preview = content.split(`
59859
62677
  `).slice(0, lines ?? 50).join(`
@@ -59884,10 +62702,10 @@ server.tool("move_file", "Move a file to a different path within the same source
59884
62702
  return { content: [{ type: "text", text: "Source not found" }], isError: true };
59885
62703
  if (source.type === "local") {
59886
62704
  const { renameSync, mkdirSync: mkdirSync4 } = await import("fs");
59887
- const { join: jp, dirname: dirname3 } = await import("path");
62705
+ const { join: jp, dirname: dirname5 } = await import("path");
59888
62706
  const oldPath = jp(source.path, file.path);
59889
62707
  const newPath = jp(source.path, dest_path);
59890
- mkdirSync4(dirname3(newPath), { recursive: true });
62708
+ mkdirSync4(dirname5(newPath), { recursive: true });
59891
62709
  renameSync(oldPath, newPath);
59892
62710
  }
59893
62711
  const { getDb: getMoveDb } = await Promise.resolve().then(() => (init_database(), exports_database));
@@ -59913,10 +62731,10 @@ server.tool("copy_file", "Copy a file to another source (local\u2192S3, S3\u2192
59913
62731
  const { join: jp } = await import("path");
59914
62732
  if (srcSource.type === "local" && dstSource.type === "local") {
59915
62733
  const { copyFileSync: copyFileSync2, mkdirSync: mkdirSync4 } = await import("fs");
59916
- const { dirname: dirname3 } = await import("path");
62734
+ const { dirname: dirname5 } = await import("path");
59917
62735
  const src = jp(srcSource.path, file.path);
59918
62736
  const dst = jp(dstSource.path, finalDest);
59919
- mkdirSync4(dirname3(dst), { recursive: true });
62737
+ mkdirSync4(dirname5(dst), { recursive: true });
59920
62738
  copyFileSync2(src, dst);
59921
62739
  const machine = getCurrentMachine();
59922
62740
  await indexLocalSource(dstSource, machine.id);
@@ -59927,9 +62745,9 @@ server.tool("copy_file", "Copy a file to another source (local\u2192S3, S3\u2192
59927
62745
  await indexS3Source(dstSource, machine.id);
59928
62746
  } else if (srcSource.type === "s3" && dstSource.type === "local") {
59929
62747
  const { mkdirSync: mkdirSync4 } = await import("fs");
59930
- const { dirname: dirname3 } = await import("path");
62748
+ const { dirname: dirname5 } = await import("path");
59931
62749
  const dst = jp(dstSource.path, finalDest);
59932
- mkdirSync4(dirname3(dst), { recursive: true });
62750
+ mkdirSync4(dirname5(dst), { recursive: true });
59933
62751
  await downloadFromS3(srcSource, file.path, dst);
59934
62752
  const machine = getCurrentMachine();
59935
62753
  await indexLocalSource(dstSource, machine.id);
@@ -60088,12 +62906,12 @@ server.tool("import_from_url", "Import a file from any URL (iCloud, Google Drive
60088
62906
  fileName = decodeURIComponent(urlName);
60089
62907
  }
60090
62908
  const { writeFileSync: writeFileSync2, mkdirSync: mkdirSync4 } = await import("fs");
60091
- const { join: joinPath, dirname: dirname3, basename: baseName, extname: extName } = await import("path");
62909
+ const { join: joinPath, dirname: dirname5, basename: baseName, extname: extName } = await import("path");
60092
62910
  const body = Buffer.from(await resp.arrayBuffer());
60093
62911
  if (source.type === "local") {
60094
62912
  const destDir = source.path;
60095
62913
  const finalPath = dest_path ? joinPath(destDir, dest_path) : joinPath(destDir, fileName);
60096
- mkdirSync4(dirname3(finalPath), { recursive: true });
62914
+ mkdirSync4(dirname5(finalPath), { recursive: true });
60097
62915
  writeFileSync2(finalPath, body);
60098
62916
  const machine = getCurrentMachine();
60099
62917
  await indexLocalSource(source, machine.id);
@@ -60139,11 +62957,11 @@ server.tool("import_from_local", "Import a file from any local path into a manag
60139
62957
  if (!existsSync8(srcPath))
60140
62958
  return { content: [{ type: "text", text: `File not found: ${srcPath}` }], isError: true };
60141
62959
  const { copyFileSync: copyFileSync2, renameSync, mkdirSync: mkDir } = await import("fs");
60142
- const { join: joinPath, dirname: dirname3, basename: baseName } = await import("path");
62960
+ const { join: joinPath, dirname: dirname5, basename: baseName } = await import("path");
60143
62961
  const fileName = baseName(srcPath);
60144
62962
  if (source.type === "local") {
60145
62963
  const finalPath = dest_path ? joinPath(source.path, dest_path) : joinPath(source.path, fileName);
60146
- mkDir(dirname3(finalPath), { recursive: true });
62964
+ mkDir(dirname5(finalPath), { recursive: true });
60147
62965
  if (copy)
60148
62966
  copyFileSync2(srcPath, finalPath);
60149
62967
  else
@@ -60244,6 +63062,121 @@ server.tool("bulk_import", "Import multiple files at once from URLs or local pat
60244
63062
  logActivity({ agent_id, action: "import", source_id: dest_source_id, metadata: { imported, failed } });
60245
63063
  return { content: [{ type: "text", text: JSON.stringify({ imported, failed, errors: errors3 }, null, 2) }] };
60246
63064
  });
63065
+ server.tool("resolve_id", "Resolve a partial ID to a full ID (prefix matching)", {
63066
+ partial: exports_external2.string().describe("Partial ID (e.g. 'f_abc' or 'col_x')"),
63067
+ type: exports_external2.enum(["files", "sources", "collections", "projects", "tags", "machines"]).describe("Entity type")
63068
+ }, async ({ partial, type }) => {
63069
+ const { resolveId: resolveId2 } = await Promise.resolve().then(() => (init_resolve(), exports_resolve));
63070
+ try {
63071
+ const id = resolveId2(partial, type);
63072
+ if (!id)
63073
+ return { content: [{ type: "text", text: `No ${type.slice(0, -1)} found matching "${partial}"` }], isError: true };
63074
+ return { content: [{ type: "text", text: id }] };
63075
+ } catch (e2) {
63076
+ return { content: [{ type: "text", text: e2.message }], isError: true };
63077
+ }
63078
+ });
63079
+ server.tool("get_file_by_path", "Look up a file by its path within a source", {
63080
+ source_id: exports_external2.string().describe("Source ID"),
63081
+ path: exports_external2.string().describe("File path relative to source root")
63082
+ }, async ({ source_id, path }) => {
63083
+ const file = getFileByPath(source_id, path);
63084
+ if (!file)
63085
+ return { content: [{ type: "text", text: `File not found: ${path} in source ${source_id}` }], isError: true };
63086
+ const full = getFile(file.id);
63087
+ return { content: [{ type: "text", text: JSON.stringify(full, null, 2) }] };
63088
+ });
63089
+ server.tool("recent_files", "Get files recently touched by agents (read, upload, tag, annotate, etc.)", {
63090
+ agent_id: exports_external2.string().optional().describe("Filter by agent ID (omit for all agents)"),
63091
+ limit: exports_external2.number().optional().default(20)
63092
+ }, async ({ agent_id, limit }) => {
63093
+ const { getDb: getRecentDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63094
+ const db2 = getRecentDb();
63095
+ const lim = limit ?? 20;
63096
+ const query = agent_id ? "SELECT DISTINCT file_id, MAX(created_at) as last_touched FROM agent_activity WHERE file_id IS NOT NULL AND agent_id = ? GROUP BY file_id ORDER BY last_touched DESC LIMIT ?" : "SELECT DISTINCT file_id, MAX(created_at) as last_touched FROM agent_activity WHERE file_id IS NOT NULL GROUP BY file_id ORDER BY last_touched DESC LIMIT ?";
63097
+ const params = agent_id ? [agent_id, lim] : [lim];
63098
+ const rows = db2.query(query).all(params);
63099
+ const files = rows.map((r2) => {
63100
+ const f2 = getFile(r2.file_id);
63101
+ return f2 ? { ...f2, last_touched: r2.last_touched } : null;
63102
+ }).filter(Boolean);
63103
+ return { content: [{ type: "text", text: JSON.stringify(files, null, 2) }] };
63104
+ });
63105
+ server.tool("list_deleted_files", "List soft-deleted files (trash)", {
63106
+ source_id: exports_external2.string().optional(),
63107
+ limit: exports_external2.number().optional().default(50),
63108
+ offset: exports_external2.number().optional().default(0)
63109
+ }, async ({ source_id, limit, offset }) => {
63110
+ const files = listFiles({ source_id, status: "deleted", limit, offset });
63111
+ return { content: [{ type: "text", text: JSON.stringify(files, null, 2) }] };
63112
+ });
63113
+ server.tool("list_conflicts", "List files with sync conflicts", {
63114
+ source_id: exports_external2.string().optional(),
63115
+ limit: exports_external2.number().optional().default(50)
63116
+ }, async ({ source_id, limit }) => {
63117
+ const { getDb: getConflictDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63118
+ const db2 = getConflictDb();
63119
+ const lim = limit ?? 50;
63120
+ const query = source_id ? "SELECT * FROM files WHERE sync_status = 'conflict' AND source_id = ? LIMIT ?" : "SELECT * FROM files WHERE sync_status = 'conflict' LIMIT ?";
63121
+ const params = source_id ? [source_id, lim] : [lim];
63122
+ const rows = db2.query(query).all(params);
63123
+ return { content: [{ type: "text", text: JSON.stringify(rows, null, 2) }] };
63124
+ });
63125
+ server.tool("resolve_conflict", "Resolve a sync conflict by picking a side", {
63126
+ file_id: exports_external2.string().describe("File ID with conflict"),
63127
+ resolution: exports_external2.enum(["keep_local", "keep_remote", "mark_resolved"]).describe("How to resolve")
63128
+ }, async ({ file_id, resolution }) => {
63129
+ const { getDb: getResDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63130
+ getResDb().run("UPDATE files SET sync_status = 'synced', sync_version = sync_version + 1 WHERE id = ?", [file_id]);
63131
+ return { content: [{ type: "text", text: `Conflict resolved for ${file_id} (${resolution})` }] };
63132
+ });
63133
+ server.tool("purge_deleted", "Permanently remove soft-deleted files from the database", {
63134
+ source_id: exports_external2.string().optional().describe("Limit to a specific source"),
63135
+ older_than: exports_external2.string().optional().describe("Only purge files deleted before this date (ISO 8601)")
63136
+ }, async ({ source_id, older_than }) => {
63137
+ const { getDb: getPurgeDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63138
+ const db2 = getPurgeDb();
63139
+ const conditions = ["status = 'deleted'"];
63140
+ const params = [];
63141
+ if (source_id) {
63142
+ conditions.push("source_id = ?");
63143
+ params.push(source_id);
63144
+ }
63145
+ if (older_than) {
63146
+ conditions.push("indexed_at <= ?");
63147
+ params.push(older_than);
63148
+ }
63149
+ const result = db2.run(`DELETE FROM files WHERE ${conditions.join(" AND ")}`, params);
63150
+ return { content: [{ type: "text", text: `Purged ${result.changes} deleted file(s)` }] };
63151
+ });
63152
+ server.tool("get_or_create_collection", "Find a collection by name, or create it if it doesn't exist", {
63153
+ name: exports_external2.string(),
63154
+ description: exports_external2.string().optional().default("")
63155
+ }, async ({ name, description }) => {
63156
+ const { getDb: getGocDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63157
+ const db2 = getGocDb();
63158
+ const existing = db2.query("SELECT id FROM collections WHERE name = ?").get(name);
63159
+ if (existing) {
63160
+ const c3 = getCollection(existing.id);
63161
+ return { content: [{ type: "text", text: JSON.stringify(c3, null, 2) }] };
63162
+ }
63163
+ const c2 = createCollection(name, description);
63164
+ return { content: [{ type: "text", text: JSON.stringify(c2, null, 2) }] };
63165
+ });
63166
+ server.tool("get_or_create_project", "Find a project by name, or create it if it doesn't exist", {
63167
+ name: exports_external2.string(),
63168
+ description: exports_external2.string().optional().default("")
63169
+ }, async ({ name, description }) => {
63170
+ const { getDb: getGopDb } = await Promise.resolve().then(() => (init_database(), exports_database));
63171
+ const db2 = getGopDb();
63172
+ const existing = db2.query("SELECT id FROM projects WHERE name = ?").get(name);
63173
+ if (existing) {
63174
+ const p3 = getProject(existing.id);
63175
+ return { content: [{ type: "text", text: JSON.stringify(p3, null, 2) }] };
63176
+ }
63177
+ const p2 = createProject(name, description);
63178
+ return { content: [{ type: "text", text: JSON.stringify(p2, null, 2) }] };
63179
+ });
60247
63180
  server.tool("send_feedback", "Send feedback about this service", {
60248
63181
  message: exports_external2.string(),
60249
63182
  email: exports_external2.string().optional(),
@@ -60291,6 +63224,26 @@ server.tool("set_focus", "Set active project context for this agent session.", {
60291
63224
  server.tool("list_agents", "List all registered agents.", {}, async () => {
60292
63225
  return { content: [{ type: "text", text: JSON.stringify(listAgents()) }] };
60293
63226
  });
63227
+ server.tool("watch_source", "Start watching a local source for file changes (real-time indexing)", {
63228
+ source_id: exports_external2.string().describe("Source ID (must be a local source)")
63229
+ }, async ({ source_id }) => {
63230
+ const source = getSource(source_id);
63231
+ if (!source)
63232
+ return { content: [{ type: "text", text: `Source not found: ${source_id}` }], isError: true };
63233
+ if (source.type !== "local")
63234
+ return { content: [{ type: "text", text: "watch_source only works with local sources" }], isError: true };
63235
+ const { watchSource: watchSource2 } = await Promise.resolve().then(() => (init_watcher(), exports_watcher));
63236
+ const machine = getCurrentMachine();
63237
+ watchSource2(source, machine.id);
63238
+ return { content: [{ type: "text", text: `Watching ${source.name} (${source.path})` }] };
63239
+ });
63240
+ server.tool("unwatch_source", "Stop watching a source for file changes", {
63241
+ source_id: exports_external2.string().describe("Source ID")
63242
+ }, async ({ source_id }) => {
63243
+ const { unwatchSource: unwatchSource2 } = await Promise.resolve().then(() => (init_watcher(), exports_watcher));
63244
+ unwatchSource2(source_id);
63245
+ return { content: [{ type: "text", text: `Stopped watching source ${source_id}` }] };
63246
+ });
60294
63247
  server.tool("get_file_history", "Get all agent activity for a file", {
60295
63248
  file_id: exports_external2.string().describe("File ID"),
60296
63249
  after: exports_external2.string().optional().describe("Filter: activity after this date (ISO 8601)"),