@akasecurity/ai-tc-codex 0.9.17-beta.1 → 0.9.17

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/scripts/sync.js CHANGED
@@ -22548,6 +22548,11 @@ var CaptureAttributes = external_exports.object({
22548
22548
  // here too. The full statement is on EventMetadata.redactDegradedTo; it is
22549
22549
  // repeated rather than referenced because a store reader opens this file.
22550
22550
  redact_degraded_to: ActionTaken.optional(),
22551
+ // Why a capture has no content and no findings: its field was refused
22552
+ // because its bounded scan did not finish (see EventMetadata.scanIncomplete,
22553
+ // whose value this is). Absent on every capture that was scanned, so a
22554
+ // reader can tell a refused row from an empty clean one.
22555
+ scan_incomplete: external_exports.enum(["timeout", "unavailable"]).optional(),
22551
22556
  // The scope key this capture was stamped with: the canonical repository
22552
22557
  // (`host/owner/repo`) of the path the capture names (a relative path is read
22553
22558
  // against its working directory), else of its own working directory, or a
@@ -23889,7 +23894,19 @@ var EventMetadata = external_exports.object({
23889
23894
  // Both are pinned as behaviour in @akasecurity/plugin-sdk's runtime suite.
23890
23895
  // Closing either means moving the reason onto the finding row, which
23891
23896
  // already carries its own action.
23892
- redactDegradedTo: ActionTaken.optional()
23897
+ redactDegradedTo: ActionTaken.optional(),
23898
+ // Set when this capture's field was REFUSED rather than scanned: a hook
23899
+ // bounds the scan of a large field (see `LargeInputScanOptions` in
23900
+ // @akasecurity/plugin-sdk), and a scan that did not finish blocks the
23901
+ // field instead of letting it through unscanned.
23902
+ //
23903
+ // - 'timeout': the bounded scan ran out of time.
23904
+ // - 'unavailable': no worker could run it.
23905
+ //
23906
+ // A refused row stores '' as its content and has no findings, which is
23907
+ // exactly what a clean, empty capture looks like — this marker is the only
23908
+ // thing that tells the two apart. Absent on every capture that was scanned.
23909
+ scanIncomplete: external_exports.enum(["timeout", "unavailable"]).optional()
23893
23910
  }).meta({ id: "EventMetadata" });
23894
23911
  var Event = external_exports.object({
23895
23912
  id: external_exports.guid(),
@@ -25706,6 +25723,7 @@ function toCaptureAttributes(event) {
25706
25723
  ...metadata?.exceptionIds !== void 0 ? { exception_ids: metadata.exceptionIds } : {},
25707
25724
  ...metadata?.inspectionMs !== void 0 ? { inspection_ms: metadata.inspectionMs } : {},
25708
25725
  ...metadata?.redactDegradedTo !== void 0 ? { redact_degraded_to: metadata.redactDegradedTo } : {},
25726
+ ...metadata?.scanIncomplete !== void 0 ? { scan_incomplete: metadata.scanIncomplete } : {},
25709
25727
  // `model`/`turnIndex` have no dedicated CaptureAttributes field (no writer
25710
25728
  // has ever populated either), but every legacy metadata key still rides
25711
25729
  // the bag rather than being silently dropped — CaptureAttributes'
@@ -38657,6 +38675,38 @@ function worstProbeMs(rule, now = wallClock, corroborate) {
38657
38675
  }
38658
38676
  var CPU_CORROBORATION_SHARE = 0.2;
38659
38677
  var CORROBORATION_FLOOR_MS = BUDGET_MS * CPU_CORROBORATION_SHARE;
38678
+ function repeatTo(unit, length) {
38679
+ return unit.repeat(Math.ceil(length / unit.length)).slice(0, length);
38680
+ }
38681
+ function joinTo(length, open3, close, item) {
38682
+ const parts = [];
38683
+ let size = open3.length;
38684
+ for (let i = 0; size < length; i++) {
38685
+ const next = (i === 0 ? "" : ",") + item(i);
38686
+ parts.push(next);
38687
+ size += next.length;
38688
+ }
38689
+ return (open3 + parts.join("") + close).slice(0, length);
38690
+ }
38691
+ var SQL_WORDS = ["select", "insert", "update", "delete", "drop", "where"];
38692
+ var GROWTH_CORPORA = [
38693
+ {
38694
+ name: "one-line JSON dictionary",
38695
+ build: (length) => joinTo(length, "{", "}", (i) => `"id-${String(i)}":"label ${String(i)}"`)
38696
+ },
38697
+ {
38698
+ name: "JSON array of quoted SQL keywords",
38699
+ build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
38700
+ },
38701
+ { name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
38702
+ { name: "double-quote run", build: (length) => repeatTo('"', length) },
38703
+ { name: "space run", build: (length) => repeatTo(" ", length) },
38704
+ { name: "newline run", build: (length) => repeatTo("\n", length) },
38705
+ ...["abc-", "a.", "a ", "a=", "x", "0", "a@", "a/", "ab"].map((unit) => ({
38706
+ name: `unit run ${JSON.stringify(unit)}`,
38707
+ build: (length) => repeatTo(unit, length)
38708
+ }))
38709
+ ];
38660
38710
  function checkRuleTiming(rule, corroborate) {
38661
38711
  const { ms, probe, corroboratedMs } = worstProbeMs(rule, wallClock, corroborate);
38662
38712
  const work = corroboratedMs ?? 0;
@@ -38958,7 +39008,7 @@ var auth_jwt_no_verify_default = {
38958
39008
  severity: "critical",
38959
39009
  matcher: {
38960
39010
  type: "regex",
38961
- pattern: "(verify\\s*=\\s*false|verify_signature.*false|algorithms\\s*=\\s*\\[\\])",
39011
+ pattern: "(verify\\s*=\\s*false|verify_signature(?:(?!verify_signature).)*false|algorithms\\s*=\\s*\\[\\])",
38962
39012
  flags: "gi"
38963
39013
  },
38964
39014
  requiresNearby: {
@@ -39046,7 +39096,7 @@ var cmd_inject_shell_default = {
39046
39096
  severity: "critical",
39047
39097
  matcher: {
39048
39098
  type: "regex",
39049
- pattern: "subprocess\\.(run|Popen|call|check_output)\\s*\\([^)]*shell\\s*=\\s*True",
39099
+ pattern: "subprocess\\.(run|Popen|call|check_output)\\s*\\((?:(?!subprocess\\.(?:run|Popen|call|check_output)\\s*\\()[^)])*shell\\s*=\\s*True",
39050
39100
  flags: "gi"
39051
39101
  },
39052
39102
  requiresNearby: {
@@ -39175,7 +39225,7 @@ var deser_yaml_unsafe_default = {
39175
39225
  severity: "high",
39176
39226
  matcher: {
39177
39227
  type: "regex",
39178
- pattern: "\\byaml\\.load\\s*\\((?![^)]*SafeLoader|[^)]*safe_load)",
39228
+ pattern: "\\byaml\\.load\\s*\\((?!(?:(?!yaml\\.load\\s*\\()[^)])*?(?:SafeLoader|safe_load))",
39179
39229
  flags: "gi"
39180
39230
  },
39181
39231
  examples: ["data = yaml.load(user_input)", "config = yaml.load(f)"],
@@ -39392,7 +39442,7 @@ var sql_inject_concat_dot_default = {
39392
39442
  severity: "high",
39393
39443
  matcher: {
39394
39444
  type: "regex",
39395
- pattern: `["'][^\\n]*?(select|insert|update|delete|drop|where)[^\\n]*?["']\\s*\\.`,
39445
+ pattern: `["'](?=([^"'\\n]*?(?:select|insert|update|delete|drop|where)))\\1(?:(?!["'][^"'\\n]*?(?:select|insert|update|delete|drop|where))[^\\n])*?["']\\s*\\.`,
39396
39446
  flags: "gi"
39397
39447
  },
39398
39448
  appliesTo: {
@@ -39410,7 +39460,7 @@ var sql_inject_concat_default = {
39410
39460
  severity: "high",
39411
39461
  matcher: {
39412
39462
  type: "regex",
39413
- pattern: `["']\\s*(?:select\\b[^\\n]*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b[^\\n]*?=)[^\\n]*?["']\\s*\\+`,
39463
+ pattern: `(["'])\\s*(?=(select\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?=))\\2(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?["']\\s*\\+`,
39414
39464
  flags: "gi"
39415
39465
  },
39416
39466
  examples: ['"SELECT * FROM users WHERE id = " + userId']
@@ -39425,7 +39475,7 @@ var sql_inject_format_default = {
39425
39475
  severity: "high",
39426
39476
  matcher: {
39427
39477
  type: "regex",
39428
- pattern: "\\b(?:select\\b[^\\n]*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b[^\\n]*?=)[^\\n]*?(?:[%][sd]|\\{[^}]+\\})",
39478
+ pattern: "\\b(?=(select\\b(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))\\1(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|\\b(?=(where\\b(?:(?!\\bwhere\\b)[^\\n])*?=))\\2(?:(?!\\bwhere\\b)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})",
39429
39479
  flags: "gi"
39430
39480
  },
39431
39481
  examples: [
@@ -39443,7 +39493,7 @@ var sql_inject_interp_default = {
39443
39493
  severity: "high",
39444
39494
  matcher: {
39445
39495
  type: "regex",
39446
- pattern: "(select|insert|update|delete|where)[^\\n]*?(#\\{|\\$[a-z_])",
39496
+ pattern: "(select|insert|update|delete|where)(?:(?!(?:select|insert|update|delete|where))[^\\n])*?(#\\{|\\$[a-z_])",
39447
39497
  flags: "gi"
39448
39498
  },
39449
39499
  examples: [
@@ -39818,7 +39868,7 @@ var stack_trace_default = {
39818
39868
  severity: "low",
39819
39869
  matcher: {
39820
39870
  type: "regex",
39821
- pattern: "(?:^|\\s+)at\\s+[A-Za-z0-9._$<>]+\\.[A-Za-z0-9_$]+\\s*\\([A-Za-z0-9._\\-/:]+:\\d+:\\d+\\)",
39871
+ pattern: "(?:^|(?<!\\s)\\s+)at\\s+[A-Za-z0-9._$<>]+\\.[A-Za-z0-9_$]+\\s*\\([A-Za-z0-9._\\-/:]+:\\d+:\\d+\\)",
39822
39872
  flags: "g"
39823
39873
  },
39824
39874
  examples: ["at com.example.service.UserService.findUser(UserService.java:42:13)"]
@@ -40976,7 +41026,7 @@ var BUNDLED_PACKS = [
40976
41026
  {
40977
41027
  packId: "code-flaws",
40978
41028
  name: "Code Security Flaws",
40979
- version: "0.1.0",
41029
+ version: "0.1.1",
40980
41030
  rawRules: [
40981
41031
  sql_inject_concat_default,
40982
41032
  sql_inject_concat_dot_default,
@@ -41026,7 +41076,7 @@ var BUNDLED_PACKS = [
41026
41076
  {
41027
41077
  packId: "core-code-context",
41028
41078
  name: "Code Context",
41029
- version: "0.2.1",
41079
+ version: "0.2.2",
41030
41080
  rawRules: [
41031
41081
  internal_ip_default,
41032
41082
  localhost_ref_default,
@@ -41495,9 +41545,10 @@ function createIsolatedScanner(data, opts = {}) {
41495
41545
  if (job.timer !== void 0) return;
41496
41546
  job.startedAt = performance.now();
41497
41547
  job.progressAt = job.startedAt;
41548
+ const budget = job.deadlineAt === void 0 ? job.budgetMs : Math.max(0, Math.min(job.budgetMs, job.deadlineAt - job.startedAt));
41498
41549
  job.timer = setTimeout(() => {
41499
41550
  onDeadline(job);
41500
- }, job.budgetMs);
41551
+ }, budget);
41501
41552
  }
41502
41553
  function runOne(spec, fail) {
41503
41554
  if (closed) {
@@ -41508,6 +41559,12 @@ function createIsolatedScanner(data, opts = {}) {
41508
41559
  fail({ status: "unavailable", reason: `the scan worker crashed: ${broken}` });
41509
41560
  return;
41510
41561
  }
41562
+ const now = performance.now();
41563
+ const deadlineAt = spec.deadlineAt;
41564
+ if (deadlineAt !== void 0 && deadlineAt <= now) {
41565
+ fail({ status: "timeout", culpritIndex: void 0, elapsedMs: 0 });
41566
+ return;
41567
+ }
41511
41568
  const started = ensureWorker();
41512
41569
  if (!(started instanceof Worker)) {
41513
41570
  broken = started.error;
@@ -41515,11 +41572,11 @@ function createIsolatedScanner(data, opts = {}) {
41515
41572
  return;
41516
41573
  }
41517
41574
  const id = nextJobId++;
41518
- const now = performance.now();
41519
41575
  const job = {
41520
41576
  id,
41521
41577
  worker: started,
41522
41578
  budgetMs: spec.budgetMs,
41579
+ deadlineAt,
41523
41580
  startedAt: now,
41524
41581
  progressIndex: -1,
41525
41582
  progressAt: now,
@@ -41533,14 +41590,19 @@ function createIsolatedScanner(data, opts = {}) {
41533
41590
  if (readyWorker === started) {
41534
41591
  beginDeadline(job);
41535
41592
  } else {
41593
+ const startBudget = spec.startBudgetMs ?? startBudgetMs;
41594
+ const callerLimited = deadlineAt !== void 0 && deadlineAt - now < startBudget;
41595
+ const startWaitMs = callerLimited ? deadlineAt - now : startBudget;
41536
41596
  job.startupTimer = setTimeout(() => {
41537
41597
  if (pending !== job) return;
41538
41598
  kill(job.worker);
41539
- failPending({
41540
- status: "unavailable",
41541
- reason: `the scan worker did not start within ${String(startBudgetMs)}ms`
41542
- });
41543
- }, startBudgetMs);
41599
+ failPending(
41600
+ callerLimited ? { status: "timeout", culpritIndex: void 0, elapsedMs: performance.now() - now } : {
41601
+ status: "unavailable",
41602
+ reason: `the scan worker did not start within ${String(startBudget)}ms`
41603
+ }
41604
+ );
41605
+ }, startWaitMs);
41544
41606
  }
41545
41607
  try {
41546
41608
  started.postMessage(spec.build(id));
@@ -41569,7 +41631,9 @@ function createIsolatedScanner(data, opts = {}) {
41569
41631
  return enqueue((resolve4) => {
41570
41632
  runOne(
41571
41633
  {
41572
- budgetMs,
41634
+ budgetMs: scanOpts?.budgetMs ?? budgetMs,
41635
+ startBudgetMs: scanOpts?.startBudgetMs,
41636
+ deadlineAt: scanOpts?.deadlineAt,
41573
41637
  build: (id) => ({
41574
41638
  kind: "scan",
41575
41639
  id,
@@ -41763,6 +41827,9 @@ function createGuardedScanner(partition, gateway, opts) {
41763
41827
  let unverified = partition.unverified;
41764
41828
  let isolated = unverified.length > 0 ? createIsolatedScanner({ verified, unverified }, opts) : void 0;
41765
41829
  let retired = false;
41830
+ let bounded;
41831
+ let boundedWarned = false;
41832
+ let closed = false;
41766
41833
  function inProcess(text, context) {
41767
41834
  return scan(text, verified, context);
41768
41835
  }
@@ -41824,11 +41891,48 @@ function createGuardedScanner(partition, gateway, opts) {
41824
41891
  await degrade();
41825
41892
  return inProcess(text, context);
41826
41893
  }
41894
+ async function scanBounded(text, context, bound) {
41895
+ const remainingMs = bound.remainingMs;
41896
+ let outcome;
41897
+ if (closed) {
41898
+ outcome = { status: "unavailable", reason: "the scan worker is closed" };
41899
+ } else if (remainingMs !== void 0 && !(remainingMs > 0)) {
41900
+ outcome = { status: "timeout", culpritIndex: void 0, elapsedMs: 0 };
41901
+ } else {
41902
+ bounded ??= createIsolatedScanner({ verified, unverified }, opts);
41903
+ const deadlineAt = remainingMs === void 0 ? void 0 : performance.now() + remainingMs;
41904
+ try {
41905
+ outcome = await bounded.scan(text, context, {
41906
+ budgetMs: bound.budgetMs,
41907
+ startBudgetMs: bound.startBudgetMs,
41908
+ deadlineAt
41909
+ });
41910
+ } catch (error62) {
41911
+ outcome = {
41912
+ status: "unavailable",
41913
+ reason: error62 instanceof Error ? error62.message : "the scan worker failed unexpectedly"
41914
+ };
41915
+ }
41916
+ }
41917
+ if (outcome.status !== "ok" && !boundedWarned) {
41918
+ boundedWarned = true;
41919
+ process.stderr.write(
41920
+ outcome.status === "timeout" ? `[aka] a large input could not be scanned within its time limit and was refused.
41921
+ ` : `[aka] a large input could not be scanned and was refused: ${outcome.reason}.
41922
+ `
41923
+ );
41924
+ }
41925
+ return outcome;
41926
+ }
41827
41927
  return {
41828
41928
  scan: guardedScan,
41929
+ scanBounded,
41829
41930
  degraded: () => retired,
41830
41931
  async close() {
41831
- await retire();
41932
+ closed = true;
41933
+ const live = bounded;
41934
+ bounded = void 0;
41935
+ await Promise.all([retire(), live?.close()]);
41832
41936
  }
41833
41937
  };
41834
41938
  }
@@ -41984,6 +42088,16 @@ function conditionsMatch(conditions, ctx) {
41984
42088
  if (conditions.provider !== void 0) return false;
41985
42089
  return true;
41986
42090
  }
42091
+ function readRemainingMs(largeInput) {
42092
+ const read = largeInput.remainingMs;
42093
+ if (read === void 0) return void 0;
42094
+ try {
42095
+ const remaining = read();
42096
+ return typeof remaining !== "number" || Number.isNaN(remaining) ? 0 : remaining;
42097
+ } catch {
42098
+ return 0;
42099
+ }
42100
+ }
41987
42101
  var bundlesPacked = false;
41988
42102
  function createPluginRuntime(gateway, settings, opts) {
41989
42103
  if (!bundlesPacked) {
@@ -41993,6 +42107,7 @@ function createPluginRuntime(gateway, settings, opts) {
41993
42107
  const policyMode = settings.policy;
41994
42108
  let redactFallback = settings.redactFallback;
41995
42109
  const dataDir2 = opts?.dataDir;
42110
+ const largeInput = opts?.largeInput;
41996
42111
  let rules = [];
41997
42112
  let evidenceOf = evidenceLookup(rules);
41998
42113
  let scanner;
@@ -42205,7 +42320,24 @@ function createPluginRuntime(gateway, settings, opts) {
42205
42320
  await ensureInitialized();
42206
42321
  if (!scanner) throw new Error("the runtime initialized without a scanner");
42207
42322
  const shielded = shieldPointers(text);
42208
- const matched = await scanner.scan(shielded.text, context);
42323
+ let matched;
42324
+ if (largeInput !== void 0 && shielded.text.length >= largeInput.thresholdChars) {
42325
+ const outcome = await scanner.scanBounded(shielded.text, context, {
42326
+ budgetMs: largeInput.budgetMs,
42327
+ startBudgetMs: largeInput.startBudgetMs,
42328
+ remainingMs: readRemainingMs(largeInput)
42329
+ });
42330
+ if (outcome.status !== "ok") {
42331
+ return {
42332
+ decision: { action: "block", text: null, findings: [], scanIncomplete: outcome.status },
42333
+ excepted: /* @__PURE__ */ new Set(),
42334
+ exceptionIds: []
42335
+ };
42336
+ }
42337
+ matched = outcome.findings;
42338
+ } else {
42339
+ matched = await scanner.scan(shielded.text, context);
42340
+ }
42209
42341
  const findings = dropShieldedFindings(matched, shielded.spans);
42210
42342
  const fpCache = /* @__PURE__ */ new Map();
42211
42343
  const { excepted, exceptionIds } = await applyExceptions(findings, ctx, fpCache);
@@ -42246,20 +42378,24 @@ function createPluginRuntime(gateway, settings, opts) {
42246
42378
  }
42247
42379
  async function persistCapture(input2, opts2, { decision, excepted, exceptionIds, timingStartedAt }) {
42248
42380
  const filePath = input2.metadata?.filePath;
42249
- if (opts2.persist === "with-findings" && decision.findings.length === 0) return;
42381
+ if (opts2.persist === "with-findings" && decision.findings.length === 0 && decision.scanIncomplete === void 0) {
42382
+ return;
42383
+ }
42250
42384
  try {
42251
42385
  const contentHash = contentHashOf(input2.text);
42252
42386
  const maskedFindings = decision.findings.filter(
42253
42387
  (match) => isActionAtLeast(actionForFinding(match, excepted, opts2.rewritable), "redact")
42254
42388
  );
42255
- const storedContent = maskedFindings.length > 0 ? redact(input2.text, maskedFindings) : input2.text;
42389
+ const storedContent = decision.scanIncomplete !== void 0 ? "" : maskedFindings.length > 0 ? redact(input2.text, maskedFindings) : input2.text;
42256
42390
  const inspectionMs = elapsedMs(timingStartedAt);
42257
42391
  const redactDegradedTo = decision.redactDegradedTo;
42258
- const metadata = exceptionIds.length > 0 || inspectionMs !== void 0 || redactDegradedTo !== void 0 ? {
42392
+ const scanIncomplete = decision.scanIncomplete;
42393
+ const metadata = exceptionIds.length > 0 || inspectionMs !== void 0 || redactDegradedTo !== void 0 || scanIncomplete !== void 0 ? {
42259
42394
  ...input2.metadata,
42260
42395
  ...exceptionIds.length > 0 ? { exceptionIds } : {},
42261
42396
  ...inspectionMs !== void 0 ? { inspectionMs } : {},
42262
- ...redactDegradedTo !== void 0 ? { redactDegradedTo } : {}
42397
+ ...redactDegradedTo !== void 0 ? { redactDegradedTo } : {},
42398
+ ...scanIncomplete !== void 0 ? { scanIncomplete } : {}
42263
42399
  } : input2.metadata;
42264
42400
  const event = buildIngestEvent({
42265
42401
  kind: input2.kind,
@@ -43936,6 +44072,7 @@ var CORRELATION_ID = EventMetadata.shape.correlationId;
43936
44072
  var TRACE_ID = EventMetadata.shape.traceId;
43937
44073
  var EXCEPTION_ID = EventMetadata.shape.exceptionIds.unwrap().element;
43938
44074
  var REDACT_DEGRADED_TO = EventMetadata.shape.redactDegradedTo.unwrap();
44075
+ var SCAN_INCOMPLETE = EventMetadata.shape.scanIncomplete.unwrap();
43939
44076
 
43940
44077
  // ../../packages/plugin-runtime/src/attached/history-sync.ts
43941
44078
  var CAPTURE_BATCH_BYTES = 1024 * 1024;