tesseract-agent 0.11.17 → 0.11.18

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.
@@ -26836,38 +26836,7 @@ function recordFailure(creds3, id, errorCode, now2, opts) {
26836
26836
  return c;
26837
26837
  advanced = true;
26838
26838
  const consecutiveFailures = (c.consecutiveFailures ?? 0) + 1;
26839
- if (errorCode === "auth_expired") {
26840
- return {
26841
- ...c,
26842
- status: "expired",
26843
- quarantineUntil: now2 + QUARANTINE_MS,
26844
- lastErrorCode: errorCode,
26845
- consecutiveFailures
26846
- };
26847
- }
26848
- if (errorCode === "invalid_key") {
26849
- return {
26850
- ...c,
26851
- status: "revoked",
26852
- quarantineUntil: now2 + QUARANTINE_MS,
26853
- lastErrorCode: errorCode,
26854
- consecutiveFailures
26855
- };
26856
- }
26857
- if (errorCode === "credit_exhausted") {
26858
- const until = opts?.cooldownUntil && opts.cooldownUntil > now2 ? opts.cooldownUntil : now2 + QUARANTINE_MS;
26859
- return {
26860
- ...c,
26861
- status: "cooldown",
26862
- cooldownUntil: until,
26863
- quarantineUntil: until,
26864
- lastErrorCode: errorCode,
26865
- consecutiveFailures
26866
- };
26867
- }
26868
- const backoff3 = Math.min(COOLDOWN_BASE_MS * 2 ** (consecutiveFailures - 1), COOLDOWN_MAX_MS);
26869
- const cooldownUntil = opts?.cooldownUntil && opts.cooldownUntil > now2 ? opts.cooldownUntil : now2 + backoff3;
26870
- return { ...c, status: "cooldown", cooldownUntil, lastErrorCode: errorCode, consecutiveFailures };
26839
+ return { ...c, lastErrorCode: errorCode, consecutiveFailures };
26871
26840
  });
26872
26841
  return { next, advanced };
26873
26842
  }
@@ -26884,12 +26853,10 @@ function recordSuccess(creds3, id, now2) {
26884
26853
  lastErrorCode: void 0
26885
26854
  } : c);
26886
26855
  }
26887
- var COOLDOWN_BASE_MS, COOLDOWN_MAX_MS, QUARANTINE_MS;
26856
+ var QUARANTINE_MS;
26888
26857
  var init_rotation = __esm({
26889
26858
  "../../packages/shared/dist/rotation.js"() {
26890
26859
  "use strict";
26891
- COOLDOWN_BASE_MS = 6e4;
26892
- COOLDOWN_MAX_MS = 36e5;
26893
26860
  QUARANTINE_MS = 24 * 60 * 60 * 1e3;
26894
26861
  }
26895
26862
  });
@@ -52197,7 +52164,7 @@ var require_deflate2 = __commonJS({
52197
52164
  options.raw = true;
52198
52165
  return deflate(input, options);
52199
52166
  }
52200
- function gzip(input, options) {
52167
+ function gzip2(input, options) {
52201
52168
  options = options || {};
52202
52169
  options.gzip = true;
52203
52170
  return deflate(input, options);
@@ -52205,7 +52172,7 @@ var require_deflate2 = __commonJS({
52205
52172
  module.exports.Deflate = Deflate;
52206
52173
  module.exports.deflate = deflate;
52207
52174
  module.exports.deflateRaw = deflateRaw;
52208
- module.exports.gzip = gzip;
52175
+ module.exports.gzip = gzip2;
52209
52176
  module.exports.constants = require_constants2();
52210
52177
  }
52211
52178
  });
@@ -54214,13 +54181,13 @@ var require_inflate2 = __commonJS({
54214
54181
  var require_pako = __commonJS({
54215
54182
  "../../node_modules/fast-png/node_modules/pako/index.js"(exports, module) {
54216
54183
  "use strict";
54217
- var { Deflate, deflate, deflateRaw, gzip } = require_deflate2();
54184
+ var { Deflate, deflate, deflateRaw, gzip: gzip2 } = require_deflate2();
54218
54185
  var { Inflate, inflate, inflateRaw, ungzip } = require_inflate2();
54219
54186
  var constants = require_constants2();
54220
54187
  module.exports.Deflate = Deflate;
54221
54188
  module.exports.deflate = deflate;
54222
54189
  module.exports.deflateRaw = deflateRaw;
54223
- module.exports.gzip = gzip;
54190
+ module.exports.gzip = gzip2;
54224
54191
  module.exports.Inflate = Inflate;
54225
54192
  module.exports.inflate = inflate;
54226
54193
  module.exports.inflateRaw = inflateRaw;
@@ -101440,6 +101407,8 @@ function createDaemonVideoEditRunner() {
101440
101407
  // ../../packages/host-core/dist/support-submit.js
101441
101408
  init_credentials();
101442
101409
  import { openSync as openSync6, fstatSync, readSync as readSync5, closeSync as closeSync6 } from "node:fs";
101410
+ import { promisify as promisify2 } from "node:util";
101411
+ import { gzip } from "node:zlib";
101443
101412
  import { join as join49 } from "node:path";
101444
101413
 
101445
101414
  // ../../packages/host-core/dist/host-metrics.js
@@ -101475,7 +101444,7 @@ function dynamicMetrics() {
101475
101444
  }
101476
101445
 
101477
101446
  // ../../packages/host-core/dist/support-submit.js
101478
- var LOG_TAIL_BYTES = 64 * 1024;
101447
+ var LOG_TAIL_BYTES = 4 * 1024 * 1024;
101479
101448
  function tail2(path6, bytes3 = LOG_TAIL_BYTES) {
101480
101449
  let fd = null;
101481
101450
  try {
@@ -101514,20 +101483,25 @@ function createDaemonSupportSubmit() {
101514
101483
  userId: creds3.userId,
101515
101484
  logs: { daemon: daemonLog }
101516
101485
  };
101486
+ const payload = await promisify2(gzip)(Buffer.from(JSON.stringify({
101487
+ type: input.type === "feature" ? "feature" : "issue",
101488
+ title: input.title,
101489
+ description: input.description,
101490
+ // NEVER route logs to the PUBLIC issue on the agent path: they're auto-collected
101491
+ // (not human-reviewed) and can carry usernames/paths/ids. The daemon log is already
101492
+ // attached PRIVATELY via `diagnostics` above. Public logs are the desktop form's
101493
+ // job (human-reviewed opt-in) only.
101494
+ includeLogsInIssue: false,
101495
+ diagnostics
101496
+ }), "utf8"));
101517
101497
  const res = await fetch(`${creds3.apiOrigin.replace(/\/$/, "")}/api/core/tesseract/support/issue`, {
101518
101498
  method: "POST",
101519
- headers: { "Content-Type": "application/json", Authorization: `Bearer ${creds3.accessToken}` },
101520
- body: JSON.stringify({
101521
- type: input.type === "feature" ? "feature" : "issue",
101522
- title: input.title,
101523
- description: input.description,
101524
- // NEVER route logs to the PUBLIC issue on the agent path: they're auto-collected
101525
- // (not human-reviewed) and can carry usernames/paths/ids. The daemon log is already
101526
- // attached PRIVATELY via `diagnostics` above. Public logs are the desktop form's
101527
- // job (human-reviewed opt-in) only.
101528
- includeLogsInIssue: false,
101529
- diagnostics
101530
- }),
101499
+ headers: {
101500
+ "Content-Type": "application/json",
101501
+ "Content-Encoding": "gzip",
101502
+ Authorization: `Bearer ${creds3.accessToken}`
101503
+ },
101504
+ body: payload,
101531
101505
  signal: AbortSignal.timeout(3e4)
101532
101506
  });
101533
101507
  if (!res.ok) {
@@ -102873,7 +102847,7 @@ import { openSync as openSync7, readSync as readSync6, writeSync as writeSync2,
102873
102847
  import { tmpdir as tmpdir5 } from "node:os";
102874
102848
  import { basename as basename8, dirname as dirname21, join as join53, relative as relative6, resolve as resolve8, sep as sep7, isAbsolute as isAbsolute7 } from "node:path";
102875
102849
  import { execFile as execFile6 } from "node:child_process";
102876
- import { promisify as promisify2 } from "node:util";
102850
+ import { promisify as promisify3 } from "node:util";
102877
102851
 
102878
102852
  // ../../packages/host-core/dist/os-favorites.js
102879
102853
  init_base_paths();
@@ -103265,7 +103239,7 @@ async function codeStats(root) {
103265
103239
  }
103266
103240
 
103267
103241
  // ../../packages/host-core/dist/fs-remote.js
103268
- var execFileAsync = promisify2(execFile6);
103242
+ var execFileAsync = promisify3(execFile6);
103269
103243
  function insideOk(p) {
103270
103244
  const c = resolveContainmentRoot();
103271
103245
  return c ? isInsideRoot(p, c) : true;
@@ -105959,8 +105933,8 @@ function absOf(root, rel) {
105959
105933
 
105960
105934
  // ../../packages/host-core/dist/active-link/gitignore.js
105961
105935
  import { execFile as execFile7 } from "node:child_process";
105962
- import { promisify as promisify3 } from "node:util";
105963
- var execFileAsync2 = promisify3(execFile7);
105936
+ import { promisify as promisify4 } from "node:util";
105937
+ var execFileAsync2 = promisify4(execFile7);
105964
105938
  async function gitSyncedFiles(root) {
105965
105939
  try {
105966
105940
  const { stdout } = await execFileAsync2("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], { cwd: root, maxBuffer: 128 * 1024 * 1024, windowsHide: true });
@@ -119381,8 +119355,8 @@ function decryptStream(source, keyRaw) {
119381
119355
  // ../../packages/host-core/dist/drops/quarantine.js
119382
119356
  import { execFile as execFile9 } from "node:child_process";
119383
119357
  import { writeFile as writeFile15 } from "node:fs/promises";
119384
- import { promisify as promisify4 } from "node:util";
119385
- var exec = promisify4(execFile9);
119358
+ import { promisify as promisify5 } from "node:util";
119359
+ var exec = promisify5(execFile9);
119386
119360
  async function markQuarantined(path6, sourceLabel) {
119387
119361
  try {
119388
119362
  if (process.platform === "darwin") {
@@ -120799,11 +120773,11 @@ function fileShareToken() {
120799
120773
 
120800
120774
  // ../../packages/host-core/dist/file-share-mount.js
120801
120775
  import { execFile as execFile10 } from "node:child_process";
120802
- import { promisify as promisify5 } from "node:util";
120776
+ import { promisify as promisify6 } from "node:util";
120803
120777
  import { homedir as homedir13 } from "node:os";
120804
120778
  import { existsSync as existsSync43, readFileSync as readFileSync56, appendFileSync as appendFileSync5, mkdirSync as mkdirSync42 } from "node:fs";
120805
120779
  import { join as join84, dirname as dirname37 } from "node:path";
120806
- var run3 = promisify5(execFile10);
120780
+ var run3 = promisify6(execFile10);
120807
120781
  var OPTS = { timeout: 2e4, windowsHide: true };
120808
120782
  var mounted = false;
120809
120783
  var mountedAt = null;
@@ -120907,8 +120881,8 @@ import { join as join85 } from "node:path";
120907
120881
 
120908
120882
  // ../../packages/host-core/dist/vault/peer-verify.js
120909
120883
  import { execFile as execFile11 } from "node:child_process";
120910
- import { promisify as promisify6 } from "node:util";
120911
- var run4 = promisify6(execFile11);
120884
+ import { promisify as promisify7 } from "node:util";
120885
+ var run4 = promisify7(execFile11);
120912
120886
  var APPEX_IDENTIFIER = "dev.tesseract.AutoFill";
120913
120887
  async function teamIdOf(path6) {
120914
120888
  try {
@@ -123061,7 +123035,7 @@ init_credentials();
123061
123035
  import { execFile as execFile16 } from "node:child_process";
123062
123036
  import { existsSync as existsSync52, readFileSync as readFileSync61, statSync as statSync21 } from "node:fs";
123063
123037
  import { dirname as dirname41, join as join93 } from "node:path";
123064
- import { promisify as promisify11 } from "node:util";
123038
+ import { promisify as promisify12 } from "node:util";
123065
123039
 
123066
123040
  // ../../packages/host-core/dist/net-service/launchd-system.js
123067
123041
  import { spawn as spawn9 } from "node:child_process";
@@ -123093,8 +123067,8 @@ function parseOwnerUid(text13) {
123093
123067
 
123094
123068
  // ../../packages/host-core/dist/net-service/elevation.js
123095
123069
  import { execFile as execFile12 } from "node:child_process";
123096
- import { promisify as promisify7 } from "node:util";
123097
- var run5 = promisify7(execFile12);
123070
+ import { promisify as promisify8 } from "node:util";
123071
+ var run5 = promisify8(execFile12);
123098
123072
  async function alreadyElevated() {
123099
123073
  if (process.platform === "win32") {
123100
123074
  try {
@@ -123334,8 +123308,8 @@ import { existsSync as existsSync51, readFileSync as readFileSync60 } from "node
123334
123308
 
123335
123309
  // ../../packages/host-core/dist/service/exec.js
123336
123310
  import { execFile as execFile13, spawn as spawn10 } from "node:child_process";
123337
- import { promisify as promisify8 } from "node:util";
123338
- var run6 = promisify8(execFile13);
123311
+ import { promisify as promisify9 } from "node:util";
123312
+ var run6 = promisify9(execFile13);
123339
123313
  function runInherit(cmd, args) {
123340
123314
  return new Promise((resolve16) => {
123341
123315
  const p = spawn10(cmd, args, { stdio: "inherit" });
@@ -123537,8 +123511,8 @@ import { execFile as execFile14, spawn as spawn12 } from "node:child_process";
123537
123511
  import { mkdtempSync as mkdtempSync3, writeFileSync as writeFileSync46, rmSync as rmSync12 } from "node:fs";
123538
123512
  import { tmpdir as tmpdir7 } from "node:os";
123539
123513
  import { join as join92, win32 } from "node:path";
123540
- import { promisify as promisify9 } from "node:util";
123541
- var run7 = promisify9(execFile14);
123514
+ import { promisify as promisify10 } from "node:util";
123515
+ var run7 = promisify10(execFile14);
123542
123516
  var SERVICE = "TesseractNetd";
123543
123517
  var DISPLAY = "Tesseract network helper";
123544
123518
  function windowsHelperDir() {
@@ -123717,8 +123691,8 @@ function makeWindowsService() {
123717
123691
 
123718
123692
  // ../../packages/host-core/dist/net-service/windows-nat.js
123719
123693
  import { execFile as execFile15 } from "node:child_process";
123720
- import { promisify as promisify10 } from "node:util";
123721
- var run8 = promisify10(execFile15);
123694
+ import { promisify as promisify11 } from "node:util";
123695
+ var run8 = promisify11(execFile15);
123722
123696
  var NAT_FEATURE = "Containers-HNS";
123723
123697
  async function natCapability() {
123724
123698
  if (process.platform !== "win32") {
@@ -123832,7 +123806,7 @@ async function ownerSid() {
123832
123806
  if (process.platform !== "win32")
123833
123807
  return void 0;
123834
123808
  try {
123835
- const { stdout } = await promisify11(execFile16)("whoami", ["/user", "/fo", "csv", "/nh"]);
123809
+ const { stdout } = await promisify12(execFile16)("whoami", ["/user", "/fo", "csv", "/nh"]);
123836
123810
  const m = /"(S-1-[0-9-]+)"/.exec(String(stdout));
123837
123811
  return m?.[1];
123838
123812
  } catch {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fineguide-tesseract/mesh-core",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tesseract-agent",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "license": "UNLICENSED",
5
5
  "publishConfig": {
6
6
  "access": "public",