@integrity-labs/agt-cli 0.28.1292 → 0.28.1293

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.
Files changed (33) hide show
  1. package/dist/{api-client-KSSMYKP7.js → api-client-X6EKO72C.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-Q5Y5WO2A.js → chunk-2N3GYWTF.js} +5 -5
  4. package/dist/{chunk-3NCSZIK4.js → chunk-624FWL4A.js} +2 -2
  5. package/dist/{chunk-QSIKMH7L.js → chunk-J34KVUAW.js} +3 -3
  6. package/dist/{chunk-LAJEUIP7.js → chunk-M3OBVJQP.js} +1 -27
  7. package/dist/chunk-M3OBVJQP.js.map +1 -0
  8. package/dist/{chunk-IPWGWDON.js → chunk-SR46T5UD.js} +2 -2
  9. package/dist/{chunk-CNDXVFNT.js → chunk-YZHOUQRL.js} +3 -3
  10. package/dist/{claude-code-updater-NBWLPWZU.js → claude-code-updater-6AJKWY22.js} +3 -3
  11. package/dist/{claude-pair-runtime-3RJNQ3XJ.js → claude-pair-runtime-ATC6ZI6J.js} +3 -3
  12. package/dist/lib/manager-worker.js +21 -21
  13. package/dist/mcp/direct-chat-channel.js +160 -125
  14. package/dist/mcp/index.js +0 -26
  15. package/dist/mcp/origami.js +0 -26
  16. package/dist/mcp/slack-channel.js +0 -26
  17. package/dist/mcp/telegram-channel.js +0 -26
  18. package/dist/{persistent-session-Q5FJJAFR.js → persistent-session-WLSZATFE.js} +4 -4
  19. package/dist/{responsiveness-probe-EYIQ2RPD.js → responsiveness-probe-F6TL3DZB.js} +4 -4
  20. package/dist/{session-auth-dead-TYDPUWCV.js → session-auth-dead-HJLK5AFT.js} +3 -3
  21. package/package.json +1 -1
  22. package/dist/chunk-LAJEUIP7.js.map +0 -1
  23. /package/dist/{api-client-KSSMYKP7.js.map → api-client-X6EKO72C.js.map} +0 -0
  24. /package/dist/{chunk-Q5Y5WO2A.js.map → chunk-2N3GYWTF.js.map} +0 -0
  25. /package/dist/{chunk-3NCSZIK4.js.map → chunk-624FWL4A.js.map} +0 -0
  26. /package/dist/{chunk-QSIKMH7L.js.map → chunk-J34KVUAW.js.map} +0 -0
  27. /package/dist/{chunk-IPWGWDON.js.map → chunk-SR46T5UD.js.map} +0 -0
  28. /package/dist/{chunk-CNDXVFNT.js.map → chunk-YZHOUQRL.js.map} +0 -0
  29. /package/dist/{claude-code-updater-NBWLPWZU.js.map → claude-code-updater-6AJKWY22.js.map} +0 -0
  30. /package/dist/{claude-pair-runtime-3RJNQ3XJ.js.map → claude-pair-runtime-ATC6ZI6J.js.map} +0 -0
  31. /package/dist/{persistent-session-Q5FJJAFR.js.map → persistent-session-WLSZATFE.js.map} +0 -0
  32. /package/dist/{responsiveness-probe-EYIQ2RPD.js.map → responsiveness-probe-F6TL3DZB.js.map} +0 -0
  33. /package/dist/{session-auth-dead-TYDPUWCV.js.map → session-auth-dead-HJLK5AFT.js.map} +0 -0
@@ -41683,32 +41683,6 @@ var INTEGRATION_REGISTRY = [
41683
41683
  ],
41684
41684
  docs_url: "https://v0.dev/docs/api/platform/overview"
41685
41685
  },
41686
- {
41687
- id: "pika",
41688
- name: "Pika",
41689
- category: "media",
41690
- description: "AI video meeting agent \u2014 join Google Meet and Zoom calls with a custom avatar and cloned voice via PikaStreaming",
41691
- supported_auth_types: ["api_key"],
41692
- // ENG-7015: customer-installable native — the one straggler not in the DB
41693
- // catalog, now carried by this single shared source.
41694
- installable: { category: "Media", authTypes: ["api_key"] },
41695
- capabilities: [
41696
- { id: "pika:join-meeting", name: "Join Meeting", description: "Join a video meeting as an AI participant with avatar and voice", access: "write" },
41697
- { id: "pika:leave-meeting", name: "Leave Meeting", description: "Leave an active video meeting session", access: "write" },
41698
- { id: "pika:generate-avatar", name: "Generate Avatar", description: "Generate an AI avatar image for video calls", access: "write" },
41699
- { id: "pika:clone-voice", name: "Clone Voice", description: "Clone a voice from an audio recording", access: "write" }
41700
- ],
41701
- cli_tool: {
41702
- package: "pika-skills",
41703
- binary: "python3",
41704
- env_key: "PIKA_DEV_KEY",
41705
- skill_id: "pikastream-video-meeting",
41706
- // python3 is part of the host bootstrap baseline — skills are fetched
41707
- // separately. Don't try to auto-install python via npm/brew.
41708
- installer: "manual"
41709
- },
41710
- docs_url: "https://github.com/Pika-Labs/Pika-Skills"
41711
- },
41712
41686
  {
41713
41687
  id: "claude-code",
41714
41688
  name: "Claude Code",
@@ -49562,7 +49536,7 @@ import {
49562
49536
  // src/direct-chat-inbound-attachments.ts
49563
49537
  import { join as join16 } from "path";
49564
49538
 
49565
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/decode-strings.js
49539
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/decode-strings.js
49566
49540
  var textEncoder2 = new TextEncoder();
49567
49541
  var isWsp = (c) => c === 32 || c === 9;
49568
49542
  var base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -49928,7 +49902,7 @@ function canJoinWords(left, right) {
49928
49902
  return false;
49929
49903
  }
49930
49904
  if (encoding === "B") {
49931
- return left.encodedText.length % 4 === 0 && !/=$/.test(left.encodedText);
49905
+ return left.encodedText.length % 4 === 0 && !left.padded;
49932
49906
  }
49933
49907
  return true;
49934
49908
  }
@@ -49951,12 +49925,18 @@ function renderTokens(tokens, joinWords) {
49951
49925
  }
49952
49926
  if (pending && joinWords && canJoinWords(pending, token)) {
49953
49927
  pending.encodedText += token.encodedText;
49928
+ pending.padded = token.encodedText.endsWith("=");
49954
49929
  continue;
49955
49930
  }
49956
49931
  if (pending) {
49957
49932
  result += decodeWord(pending.charset, pending.encoding, pending.encodedText);
49958
49933
  }
49959
- pending = { charset: token.charset, encoding: token.encoding, encodedText: token.encodedText };
49934
+ pending = {
49935
+ charset: token.charset,
49936
+ encoding: token.encoding,
49937
+ encodedText: token.encodedText,
49938
+ padded: token.encodedText.endsWith("=")
49939
+ };
49960
49940
  }
49961
49941
  if (pending) {
49962
49942
  result += decodeWord(pending.charset, pending.encoding, pending.encodedText);
@@ -50044,7 +50024,7 @@ function decodeParameterValueContinuations(header2) {
50044
50024
  });
50045
50025
  }
50046
50026
 
50047
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/pass-through-decoder.js
50027
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/pass-through-decoder.js
50048
50028
  var PassThroughDecoder = class {
50049
50029
  constructor() {
50050
50030
  this.chunks = [];
@@ -50095,18 +50075,70 @@ var PassThroughDecoder = class {
50095
50075
  }
50096
50076
  };
50097
50077
 
50098
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/base64-decoder.js
50078
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/chunk-writer.js
50079
+ var ChunkWriter = class {
50080
+ constructor(maxChunkSize = 100 * 1024) {
50081
+ this.maxChunkSize = maxChunkSize;
50082
+ this.buffer = null;
50083
+ this.bufferPos = 0;
50084
+ this.chunks = [];
50085
+ }
50086
+ writeByte(byte) {
50087
+ if (!this.buffer || this.bufferPos >= this.buffer.length) {
50088
+ this.flush();
50089
+ this.buffer ??= new Uint8Array(this.maxChunkSize);
50090
+ }
50091
+ this.buffer[this.bufferPos++] = byte;
50092
+ }
50093
+ // Copied in runs rather than a byte at a time
50094
+ writeBytes(bytes, start = 0, end = bytes.length) {
50095
+ while (start < end) {
50096
+ if (!this.buffer || this.bufferPos >= this.buffer.length) {
50097
+ this.flush();
50098
+ this.buffer ??= new Uint8Array(this.maxChunkSize);
50099
+ }
50100
+ const count = Math.min(end - start, this.buffer.length - this.bufferPos);
50101
+ this.buffer.set(bytes.subarray(start, start + count), this.bufferPos);
50102
+ this.bufferPos += count;
50103
+ start += count;
50104
+ }
50105
+ }
50106
+ /**
50107
+ * Keeps a buffer the caller hands over and will not touch again. A large one is kept as
50108
+ * a chunk of its own instead of being copied, a small one is copied like any other write.
50109
+ */
50110
+ append(bytes) {
50111
+ if (bytes.length >= this.maxChunkSize / 2) {
50112
+ this.flush();
50113
+ this.chunks.push(bytes);
50114
+ } else {
50115
+ this.writeBytes(bytes);
50116
+ }
50117
+ }
50118
+ flush() {
50119
+ if (this.buffer && this.bufferPos) {
50120
+ this.chunks.push(this.buffer.slice(0, this.bufferPos));
50121
+ this.bufferPos = 0;
50122
+ }
50123
+ }
50124
+ finalize() {
50125
+ this.flush();
50126
+ return blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" }));
50127
+ }
50128
+ };
50129
+
50130
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/base64-decoder.js
50099
50131
  var Base64Decoder = class {
50100
50132
  constructor(opts) {
50101
50133
  opts = opts || {};
50102
50134
  this.decoder = opts.decoder || new TextDecoder();
50103
50135
  this.maxChunkSize = 100 * 1024;
50104
- this.chunks = [];
50136
+ this.output = new ChunkWriter();
50105
50137
  this.remainder = "";
50106
50138
  }
50107
50139
  pushChunk(base64Str) {
50108
50140
  if (base64Str.length) {
50109
- this.chunks.push(decodeBase64(base64Str));
50141
+ this.output.append(new Uint8Array(decodeBase64(base64Str)));
50110
50142
  }
50111
50143
  }
50112
50144
  flushRemainder() {
@@ -50115,13 +50147,14 @@ var Base64Decoder = class {
50115
50147
  }
50116
50148
  update(buffer) {
50117
50149
  let str2 = this.decoder.decode(buffer).replace(/[^a-zA-Z0-9+/=]+/g, "");
50118
- const units = str2.split(/=+/);
50119
- for (let i = 0; i < units.length; i++) {
50120
- this.remainder += units[i];
50121
- if (i < units.length - 1) {
50122
- this.flushRemainder();
50123
- }
50124
- }
50150
+ let start = 0;
50151
+ let end;
50152
+ while ((end = str2.indexOf("=", start)) >= 0) {
50153
+ this.remainder += str2.substring(start, end);
50154
+ this.flushRemainder();
50155
+ start = end + 1;
50156
+ }
50157
+ this.remainder += str2.substring(start);
50125
50158
  if (this.remainder.length >= this.maxChunkSize) {
50126
50159
  const alignedLength = Math.floor(this.remainder.length / 4) * 4;
50127
50160
  this.pushChunk(this.remainder.substring(0, alignedLength));
@@ -50130,48 +50163,20 @@ var Base64Decoder = class {
50130
50163
  }
50131
50164
  finalize() {
50132
50165
  this.flushRemainder();
50133
- return blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" }));
50166
+ return this.output.finalize();
50134
50167
  }
50135
50168
  };
50136
50169
 
50137
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/qp-decoder.js
50170
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/qp-decoder.js
50138
50171
  var CHR_EQUALS = 61;
50139
50172
  var QPDecoder = class {
50140
50173
  constructor() {
50141
- this.maxChunkSize = 100 * 1024;
50142
- this.buffer = new Uint8Array(this.maxChunkSize);
50143
- this.bufferPos = 0;
50144
- this.chunks = [];
50174
+ this.output = new ChunkWriter();
50145
50175
  this.pendingLineBreak = null;
50146
50176
  }
50147
50177
  writeLineBreak() {
50148
50178
  if (this.pendingLineBreak) {
50149
- this.writeBytes(this.pendingLineBreak, 0, this.pendingLineBreak.length);
50150
- }
50151
- }
50152
- writeByte(byte) {
50153
- if (this.bufferPos >= this.buffer.length) {
50154
- this.flushBuffer();
50155
- }
50156
- this.buffer[this.bufferPos++] = byte;
50157
- }
50158
- // Literal text is the bulk of a typical body, so it is copied in runs rather than a
50159
- // byte at a time
50160
- writeBytes(line, start, end) {
50161
- while (start < end) {
50162
- if (this.bufferPos >= this.buffer.length) {
50163
- this.flushBuffer();
50164
- }
50165
- const count = Math.min(end - start, this.buffer.length - this.bufferPos);
50166
- this.buffer.set(line.subarray(start, start + count), this.bufferPos);
50167
- this.bufferPos += count;
50168
- start += count;
50169
- }
50170
- }
50171
- flushBuffer() {
50172
- if (this.bufferPos) {
50173
- this.chunks.push(this.buffer.slice(0, this.bufferPos));
50174
- this.bufferPos = 0;
50179
+ this.output.writeBytes(this.pendingLineBreak);
50175
50180
  }
50176
50181
  }
50177
50182
  // Quoted-printable source is 7 bit by definition, so it is decoded byte by byte and
@@ -50202,12 +50207,12 @@ var QPDecoder = class {
50202
50207
  if (high < 0 || low < 0) {
50203
50208
  continue;
50204
50209
  }
50205
- this.writeBytes(line, literalStart, i);
50206
- this.writeByte(high << 4 | low);
50210
+ this.output.writeBytes(line, literalStart, i);
50211
+ this.output.writeByte(high << 4 | low);
50207
50212
  i += 2;
50208
50213
  literalStart = i + 1;
50209
50214
  }
50210
- this.writeBytes(line, literalStart, len);
50215
+ this.output.writeBytes(line, literalStart, len);
50211
50216
  this.pendingLineBreak = softBreak ? null : lineBreak;
50212
50217
  }
50213
50218
  // see PassThroughDecoder.finalize
@@ -50215,13 +50220,14 @@ var QPDecoder = class {
50215
50220
  if (!boundaryEnded) {
50216
50221
  this.writeLineBreak();
50217
50222
  }
50218
- this.flushBuffer();
50219
- return blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" }));
50223
+ return this.output.finalize();
50220
50224
  }
50221
50225
  };
50222
50226
 
50223
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/mime-node.js
50227
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/mime-node.js
50224
50228
  var headerDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
50229
+ var FLOWED_JOIN_INTERVAL = 4096;
50230
+ var HEADER_LINE_MIN_COST = 64;
50225
50231
  var trimWsp = (str2) => {
50226
50232
  let start = 0;
50227
50233
  let end = str2.length;
@@ -50246,17 +50252,18 @@ var MimeNode = class {
50246
50252
  constructor(options) {
50247
50253
  this.options = options;
50248
50254
  this.postalMime = options.postalMime;
50249
- this.postalMime.partCount++;
50250
- if (this.postalMime.partCount > options.maxPartCount) {
50251
- throw new Error(`Maximum MIME part count of ${options.maxPartCount} parts exceeded`);
50255
+ const limits = this.postalMime.limits;
50256
+ this.postalMime.counters.partCount++;
50257
+ if (this.postalMime.counters.partCount > limits.maxPartCount) {
50258
+ throw new Error(`Maximum MIME part count of ${limits.maxPartCount} parts exceeded`);
50252
50259
  }
50253
50260
  this.childNodes = [];
50254
50261
  this.finalizedChildCount = 0;
50255
50262
  if (options.parentNode) {
50256
50263
  this.parentNode = options.parentNode;
50257
50264
  this.depth = this.parentNode.depth + 1;
50258
- if (this.depth > options.maxNestingDepth) {
50259
- throw new Error(`Maximum MIME nesting depth of ${options.maxNestingDepth} levels exceeded`);
50265
+ if (this.depth > limits.maxNestingDepth) {
50266
+ throw new Error(`Maximum MIME nesting depth of ${limits.maxNestingDepth} levels exceeded`);
50260
50267
  }
50261
50268
  options.parentNode.childNodes.push(this);
50262
50269
  } else {
@@ -50502,12 +50509,16 @@ var MimeNode = class {
50502
50509
  // written, so a fixed quoted line comes out exactly as it went in. An unquoted stuffed
50503
50510
  // line loses its stuffing, which is all the stuffing is for.
50504
50511
  decodeFlowedText(str2, delSp) {
50505
- const parts = [];
50512
+ const chunks = [];
50513
+ let parts = [];
50506
50514
  let flowed = false;
50507
50515
  let depth = 0;
50508
- const lines = str2.split("\n");
50509
- for (let i = 0; i < lines.length; i++) {
50510
- const line = lines[i];
50516
+ for (let lineStart = 0; lineStart <= str2.length; ) {
50517
+ let lineEnd = str2.indexOf("\n", lineStart);
50518
+ if (lineEnd < 0) {
50519
+ lineEnd = str2.length;
50520
+ }
50521
+ const line = str2.slice(lineStart, lineEnd);
50511
50522
  let quoteDepth = 0;
50512
50523
  while (line.charCodeAt(quoteDepth) === 62) {
50513
50524
  quoteDepth++;
@@ -50522,15 +50533,22 @@ var MimeNode = class {
50522
50533
  }
50523
50534
  parts.push(content);
50524
50535
  } else {
50525
- if (i) {
50536
+ if (lineStart) {
50526
50537
  parts.push("\n");
50527
50538
  }
50528
50539
  parts.push(quoteDepth ? line : content);
50529
50540
  }
50530
50541
  flowed = !isSignature && content.endsWith(" ");
50531
50542
  depth = quoteDepth;
50543
+ if (parts.length >= FLOWED_JOIN_INTERVAL) {
50544
+ const last = parts.pop();
50545
+ chunks.push(parts.join(""));
50546
+ parts = [last];
50547
+ }
50548
+ lineStart = lineEnd + 1;
50532
50549
  }
50533
- return parts.join("");
50550
+ chunks.push(parts.join(""));
50551
+ return chunks.join("");
50534
50552
  }
50535
50553
  getTextContent() {
50536
50554
  if (!this.content) {
@@ -50602,6 +50620,7 @@ var MimeNode = class {
50602
50620
  this.contentDisposition.parsed = this.parseStructuredHeader(this.contentDisposition.value);
50603
50621
  this.contentTransferEncoding.encoding = (this.stripComments(this.contentTransferEncoding.value).toLowerCase().match(/[\w-]+/) || [""])[0];
50604
50622
  this.setupContentDecoder(this.contentTransferEncoding.encoding);
50623
+ this.headerLines = [];
50605
50624
  }
50606
50625
  // Ends the header section and sets up the body
50607
50626
  endHeaders() {
@@ -50618,10 +50637,10 @@ var MimeNode = class {
50618
50637
  this.endHeaders();
50619
50638
  return false;
50620
50639
  }
50621
- this.postalMime.headerSize += line.length;
50622
- if (this.postalMime.headerSize > this.options.maxHeadersSize) {
50623
- let error2 = new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);
50624
- throw error2;
50640
+ this.postalMime.counters.headerSize += Math.max(line.length, HEADER_LINE_MIN_COST);
50641
+ const maxHeadersSize = this.postalMime.limits.maxHeadersSize;
50642
+ if (this.postalMime.counters.headerSize > maxHeadersSize) {
50643
+ throw new Error(`Maximum header size of ${maxHeadersSize} bytes exceeded`);
50625
50644
  }
50626
50645
  const text = decodeUtf8OrWindows1252(line, headerDecoder);
50627
50646
  if (this.lastLineBlank && !isWsp(line[0]) && !FIELD_START.test(text)) {
@@ -50643,7 +50662,7 @@ var MimeNode = class {
50643
50662
  }
50644
50663
  };
50645
50664
 
50646
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/html-entities.js
50665
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/html-entities.js
50647
50666
  var htmlEntities = {
50648
50667
  "&AElig": "\xC6",
50649
50668
  "&AElig;": "\xC6",
@@ -52878,7 +52897,7 @@ var htmlEntities = {
52878
52897
  "&zwnj;": "\u200C"
52879
52898
  };
52880
52899
 
52881
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/text-format.js
52900
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/text-format.js
52882
52901
  var C1_ENTITY_REPLACEMENTS = /* @__PURE__ */ new Map([
52883
52902
  [128, 8364],
52884
52903
  [130, 8218],
@@ -52965,9 +52984,12 @@ function createFinder(str2, regex) {
52965
52984
  return found;
52966
52985
  };
52967
52986
  }
52968
- function replaceClosedTags(str2, pattern, replacement) {
52987
+ function throughLastTag(str2, process3) {
52969
52988
  const end = str2.lastIndexOf(">") + 1;
52970
- return str2.slice(0, end).replace(pattern, replacement) + str2.slice(end);
52989
+ return process3(str2.slice(0, end)) + str2.slice(end);
52990
+ }
52991
+ function replaceClosedTags(str2, pattern, replacement) {
52992
+ return throughLastTag(str2, (head) => head.replace(pattern, replacement));
52971
52993
  }
52972
52994
  function replaceTags(str2, prefix, pattern, replacement) {
52973
52995
  const parts = [];
@@ -53069,7 +53091,7 @@ function htmlToText(str2) {
53069
53091
  str2 = stripThroughLastTag(str2, /<!doctype\b/gi);
53070
53092
  str2 = stripFromFirstTag(str2, /<\/body\b/gi);
53071
53093
  str2 = stripFromFirstTag(str2, /<\/html\b/gi);
53072
- str2 = replaceTags(str2, /<a\b/gi, /<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/iy, (match, href) => ` (${href}) `);
53094
+ str2 = throughLastTag(str2, (head) => replaceTags(head, /<a\b/gi, /<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/iy, (match, href) => ` (${href}) `));
53073
53095
  str2 = replaceClosedTags(str2, /<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi, "");
53074
53096
  str2 = replaceTags(str2, /<li\b/gi, /<li\b[^>]*>[\n\u0001\s]*/iy, () => "* ");
53075
53097
  str2 = replaceClosedTags(str2, /<hr\b[^>]*>/g, "\n-------------\n");
@@ -53237,7 +53259,7 @@ function formatHtmlHeader(message) {
53237
53259
  return template;
53238
53260
  }
53239
53261
 
53240
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/address-parser.js
53262
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/address-parser.js
53241
53263
  var HAS_WHITESPACE = /\s/;
53242
53264
  var QUOTED_LOCAL_ADDR = /^("(?:[^"\\]|\\[\s\S])*"@\S+)(?:\s+([\s\S]+))?$/;
53243
53265
  var ADDR_SPEC = /^[^@\s]+@[^@\s]+$/;
@@ -53773,7 +53795,7 @@ function addressParser(str2, options) {
53773
53795
  }
53774
53796
  var address_parser_default = addressParser;
53775
53797
 
53776
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/base64-encoder.js
53798
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/base64-encoder.js
53777
53799
  function base64ArrayBuffer(arrayBuffer) {
53778
53800
  let base642 = "";
53779
53801
  const encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -53806,7 +53828,7 @@ function base64ArrayBuffer(arrayBuffer) {
53806
53828
  return base642;
53807
53829
  }
53808
53830
 
53809
- // ../../node_modules/.pnpm/postal-mime@4.0.5/node_modules/postal-mime/dist/esm/postal-mime.js
53831
+ // ../../node_modules/.pnpm/postal-mime@4.0.8/node_modules/postal-mime/dist/esm/postal-mime.js
53810
53832
  function isReadableStream(value) {
53811
53833
  return !!value && typeof value.getReader === "function";
53812
53834
  }
@@ -53827,6 +53849,17 @@ var MAX_NESTING_DEPTH = 256;
53827
53849
  var MAX_HEADERS_SIZE = 2 * 1024 * 1024;
53828
53850
  var MAX_PART_COUNT = 1e4;
53829
53851
  var MAX_RFC822_NESTING_DEPTH = 10;
53852
+ var MAX_FORWARDED_ADDRESSES = 1e4;
53853
+ function countAddresses(addresses) {
53854
+ if (!addresses) {
53855
+ return 0;
53856
+ }
53857
+ let count = 0;
53858
+ for (const address of Array.isArray(addresses) ? addresses : [addresses]) {
53859
+ count += 1 + (address.group ? address.group.length : 0);
53860
+ }
53861
+ return count;
53862
+ }
53830
53863
  function parseLimitOption(value, defaultValue, name) {
53831
53864
  if (value === void 0 || value === null) {
53832
53865
  return defaultValue;
@@ -53836,6 +53869,17 @@ function parseLimitOption(value, defaultValue, name) {
53836
53869
  }
53837
53870
  return value;
53838
53871
  }
53872
+ function parseLimits(options) {
53873
+ return {
53874
+ maxNestingDepth: parseLimitOption(options.maxNestingDepth, MAX_NESTING_DEPTH, "maxNestingDepth"),
53875
+ maxHeadersSize: parseLimitOption(options.maxHeadersSize, MAX_HEADERS_SIZE, "maxHeadersSize"),
53876
+ maxPartCount: parseLimitOption(options.maxPartCount, MAX_PART_COUNT, "maxPartCount"),
53877
+ // A limit of 0 disables inline parsing entirely, so every message/rfc822 part
53878
+ // becomes an attachment.
53879
+ maxRfc822NestingDepth: parseLimitOption(options.maxRfc822NestingDepth, MAX_RFC822_NESTING_DEPTH, "maxRfc822NestingDepth"),
53880
+ maxForwardedAddresses: parseLimitOption(options.maxForwardedAddresses, MAX_FORWARDED_ADDRESSES, "maxForwardedAddresses")
53881
+ };
53882
+ }
53839
53883
  var PostalMime = class _PostalMime {
53840
53884
  /**
53841
53885
  * Parses a raw email message
@@ -53850,21 +53894,12 @@ var PostalMime = class _PostalMime {
53850
53894
  const parser = new _PostalMime(options);
53851
53895
  return parser.parse(buf);
53852
53896
  }
53853
- constructor(options) {
53897
+ constructor(options, parent) {
53854
53898
  this.options = options || {};
53855
- this.mimeOptions = {
53856
- maxNestingDepth: parseLimitOption(this.options.maxNestingDepth, MAX_NESTING_DEPTH, "maxNestingDepth"),
53857
- maxHeadersSize: parseLimitOption(this.options.maxHeadersSize, MAX_HEADERS_SIZE, "maxHeadersSize"),
53858
- maxPartCount: parseLimitOption(this.options.maxPartCount, MAX_PART_COUNT, "maxPartCount")
53859
- };
53860
- this.maxRfc822NestingDepth = parseLimitOption(this.options.maxRfc822NestingDepth, MAX_RFC822_NESTING_DEPTH, "maxRfc822NestingDepth");
53861
- this.rfc822NestingDepth = 0;
53862
- this.headerSize = 0;
53863
- this.partCount = 0;
53864
- this.root = this.currentNode = new MimeNode({
53865
- postalMime: this,
53866
- ...this.mimeOptions
53867
- });
53899
+ this.rfc822NestingDepth = parent ? parent.rfc822NestingDepth + 1 : 0;
53900
+ this.limits = parent ? parent.limits : parseLimits(this.options);
53901
+ this.counters = parent ? parent.counters : { headerSize: 0, partCount: 0, forwardedAddresses: 0 };
53902
+ this.root = this.currentNode = new MimeNode({ postalMime: this });
53868
53903
  this.boundaries = [];
53869
53904
  this.textContent = {};
53870
53905
  this.textMap = /* @__PURE__ */ new Map();
@@ -53921,8 +53956,7 @@ var PostalMime = class _PostalMime {
53921
53956
  this.currentNode = new MimeNode({
53922
53957
  postalMime: this,
53923
53958
  parentNode: boundary.node,
53924
- parentMultipartType: boundary.node.contentType.multipart,
53925
- ...this.mimeOptions
53959
+ parentMultipartType: boundary.node.contentType.multipart
53926
53960
  });
53927
53961
  }
53928
53962
  if (isFinal) {
@@ -53986,7 +54020,7 @@ var PostalMime = class _PostalMime {
53986
54020
  async collectNode(node, alternative, related) {
53987
54021
  if (!node.contentType.multipart) {
53988
54022
  const inlineRfc822 = this.isInlineMessageRfc822(node);
53989
- const rfc822DepthExceeded = inlineRfc822 && this.rfc822NestingDepth >= this.maxRfc822NestingDepth;
54023
+ const rfc822DepthExceeded = inlineRfc822 && this.rfc822NestingDepth >= this.limits.maxRfc822NestingDepth;
53990
54024
  if (inlineRfc822 && !rfc822DepthExceeded) {
53991
54025
  await this.collectSubMessage(node);
53992
54026
  } else if (this.isInlineTextNode(node)) {
@@ -54009,15 +54043,16 @@ var PostalMime = class _PostalMime {
54009
54043
  /** @internal */
54010
54044
  async collectSubMessage(node) {
54011
54045
  const subParser = new _PostalMime({
54012
- // Only the limits are inherited. Options that decide how a part
54013
- // is classified stay with the parser that was configured.
54014
- ...this.mimeOptions,
54015
- maxRfc822NestingDepth: this.maxRfc822NestingDepth,
54016
- // attachments are encoded by the parent parser, keep raw buffers here
54046
+ // Options that decide how a part is classified stay with the parser that
54047
+ // was configured, the limits and their counters come from this parser.
54048
+ // Attachments are encoded by the parent parser, so raw buffers are kept here.
54017
54049
  attachmentEncoding: "arraybuffer"
54018
- });
54019
- subParser.rfc822NestingDepth = this.rfc822NestingDepth + 1;
54050
+ }, this);
54020
54051
  const subMessage = node.subMessage = await subParser.parse(node.content || new ArrayBuffer(0));
54052
+ this.counters.forwardedAddresses += countAddresses(subMessage.from) + countAddresses(subMessage.to) + countAddresses(subMessage.cc) + countAddresses(subMessage.bcc);
54053
+ if (this.counters.forwardedAddresses > this.limits.maxForwardedAddresses) {
54054
+ throw new Error(`Maximum forwarded address count of ${this.limits.maxForwardedAddresses} addresses exceeded`);
54055
+ }
54021
54056
  if (subMessage.text || !subMessage.html) {
54022
54057
  this.addTextEntry(node, "plain", { type: "subMessage", value: subMessage });
54023
54058
  }
package/dist/mcp/index.js CHANGED
@@ -27696,32 +27696,6 @@ var INTEGRATION_REGISTRY = [
27696
27696
  ],
27697
27697
  docs_url: "https://v0.dev/docs/api/platform/overview"
27698
27698
  },
27699
- {
27700
- id: "pika",
27701
- name: "Pika",
27702
- category: "media",
27703
- description: "AI video meeting agent \u2014 join Google Meet and Zoom calls with a custom avatar and cloned voice via PikaStreaming",
27704
- supported_auth_types: ["api_key"],
27705
- // ENG-7015: customer-installable native — the one straggler not in the DB
27706
- // catalog, now carried by this single shared source.
27707
- installable: { category: "Media", authTypes: ["api_key"] },
27708
- capabilities: [
27709
- { id: "pika:join-meeting", name: "Join Meeting", description: "Join a video meeting as an AI participant with avatar and voice", access: "write" },
27710
- { id: "pika:leave-meeting", name: "Leave Meeting", description: "Leave an active video meeting session", access: "write" },
27711
- { id: "pika:generate-avatar", name: "Generate Avatar", description: "Generate an AI avatar image for video calls", access: "write" },
27712
- { id: "pika:clone-voice", name: "Clone Voice", description: "Clone a voice from an audio recording", access: "write" }
27713
- ],
27714
- cli_tool: {
27715
- package: "pika-skills",
27716
- binary: "python3",
27717
- env_key: "PIKA_DEV_KEY",
27718
- skill_id: "pikastream-video-meeting",
27719
- // python3 is part of the host bootstrap baseline — skills are fetched
27720
- // separately. Don't try to auto-install python via npm/brew.
27721
- installer: "manual"
27722
- },
27723
- docs_url: "https://github.com/Pika-Labs/Pika-Skills"
27724
- },
27725
27699
  {
27726
27700
  id: "claude-code",
27727
27701
  name: "Claude Code",
@@ -41757,32 +41757,6 @@ var INTEGRATION_REGISTRY = [
41757
41757
  ],
41758
41758
  docs_url: "https://v0.dev/docs/api/platform/overview"
41759
41759
  },
41760
- {
41761
- id: "pika",
41762
- name: "Pika",
41763
- category: "media",
41764
- description: "AI video meeting agent \u2014 join Google Meet and Zoom calls with a custom avatar and cloned voice via PikaStreaming",
41765
- supported_auth_types: ["api_key"],
41766
- // ENG-7015: customer-installable native — the one straggler not in the DB
41767
- // catalog, now carried by this single shared source.
41768
- installable: { category: "Media", authTypes: ["api_key"] },
41769
- capabilities: [
41770
- { id: "pika:join-meeting", name: "Join Meeting", description: "Join a video meeting as an AI participant with avatar and voice", access: "write" },
41771
- { id: "pika:leave-meeting", name: "Leave Meeting", description: "Leave an active video meeting session", access: "write" },
41772
- { id: "pika:generate-avatar", name: "Generate Avatar", description: "Generate an AI avatar image for video calls", access: "write" },
41773
- { id: "pika:clone-voice", name: "Clone Voice", description: "Clone a voice from an audio recording", access: "write" }
41774
- ],
41775
- cli_tool: {
41776
- package: "pika-skills",
41777
- binary: "python3",
41778
- env_key: "PIKA_DEV_KEY",
41779
- skill_id: "pikastream-video-meeting",
41780
- // python3 is part of the host bootstrap baseline — skills are fetched
41781
- // separately. Don't try to auto-install python via npm/brew.
41782
- installer: "manual"
41783
- },
41784
- docs_url: "https://github.com/Pika-Labs/Pika-Skills"
41785
- },
41786
41760
  {
41787
41761
  id: "claude-code",
41788
41762
  name: "Claude Code",
@@ -36191,32 +36191,6 @@ var INTEGRATION_REGISTRY = [
36191
36191
  ],
36192
36192
  docs_url: "https://v0.dev/docs/api/platform/overview"
36193
36193
  },
36194
- {
36195
- id: "pika",
36196
- name: "Pika",
36197
- category: "media",
36198
- description: "AI video meeting agent \u2014 join Google Meet and Zoom calls with a custom avatar and cloned voice via PikaStreaming",
36199
- supported_auth_types: ["api_key"],
36200
- // ENG-7015: customer-installable native — the one straggler not in the DB
36201
- // catalog, now carried by this single shared source.
36202
- installable: { category: "Media", authTypes: ["api_key"] },
36203
- capabilities: [
36204
- { id: "pika:join-meeting", name: "Join Meeting", description: "Join a video meeting as an AI participant with avatar and voice", access: "write" },
36205
- { id: "pika:leave-meeting", name: "Leave Meeting", description: "Leave an active video meeting session", access: "write" },
36206
- { id: "pika:generate-avatar", name: "Generate Avatar", description: "Generate an AI avatar image for video calls", access: "write" },
36207
- { id: "pika:clone-voice", name: "Clone Voice", description: "Clone a voice from an audio recording", access: "write" }
36208
- ],
36209
- cli_tool: {
36210
- package: "pika-skills",
36211
- binary: "python3",
36212
- env_key: "PIKA_DEV_KEY",
36213
- skill_id: "pikastream-video-meeting",
36214
- // python3 is part of the host bootstrap baseline — skills are fetched
36215
- // separately. Don't try to auto-install python via npm/brew.
36216
- installer: "manual"
36217
- },
36218
- docs_url: "https://github.com/Pika-Labs/Pika-Skills"
36219
- },
36220
36194
  {
36221
36195
  id: "claude-code",
36222
36196
  name: "Claude Code",
@@ -36663,32 +36663,6 @@ var INTEGRATION_REGISTRY = [
36663
36663
  ],
36664
36664
  docs_url: "https://v0.dev/docs/api/platform/overview"
36665
36665
  },
36666
- {
36667
- id: "pika",
36668
- name: "Pika",
36669
- category: "media",
36670
- description: "AI video meeting agent \u2014 join Google Meet and Zoom calls with a custom avatar and cloned voice via PikaStreaming",
36671
- supported_auth_types: ["api_key"],
36672
- // ENG-7015: customer-installable native — the one straggler not in the DB
36673
- // catalog, now carried by this single shared source.
36674
- installable: { category: "Media", authTypes: ["api_key"] },
36675
- capabilities: [
36676
- { id: "pika:join-meeting", name: "Join Meeting", description: "Join a video meeting as an AI participant with avatar and voice", access: "write" },
36677
- { id: "pika:leave-meeting", name: "Leave Meeting", description: "Leave an active video meeting session", access: "write" },
36678
- { id: "pika:generate-avatar", name: "Generate Avatar", description: "Generate an AI avatar image for video calls", access: "write" },
36679
- { id: "pika:clone-voice", name: "Clone Voice", description: "Clone a voice from an audio recording", access: "write" }
36680
- ],
36681
- cli_tool: {
36682
- package: "pika-skills",
36683
- binary: "python3",
36684
- env_key: "PIKA_DEV_KEY",
36685
- skill_id: "pikastream-video-meeting",
36686
- // python3 is part of the host bootstrap baseline — skills are fetched
36687
- // separately. Don't try to auto-install python via npm/brew.
36688
- installer: "manual"
36689
- },
36690
- docs_url: "https://github.com/Pika-Labs/Pika-Skills"
36691
- },
36692
36666
  {
36693
36667
  id: "claude-code",
36694
36668
  name: "Claude Code",