lody 0.57.1-next.6 → 0.57.1-next.7

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 (2) hide show
  1. package/dist/index.js +92 -15
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -36827,7 +36827,7 @@ Mongoose Error Code: ${error2.code}` : ""}`
36827
36827
  return client;
36828
36828
  }
36829
36829
  const name$1 = "lody";
36830
- const version$4 = "0.57.1-next.6";
36830
+ const version$4 = "0.57.1-next.7";
36831
36831
  const description$1 = "Lody Agent CLI tool for managing remote command execution";
36832
36832
  const type$2 = "module";
36833
36833
  const main$4 = "dist/index.js";
@@ -55472,21 +55472,60 @@ ${tailedOutput}` : null;
55472
55472
  const runtimeEnv = getRuntimeEnv();
55473
55473
  const environment$1 = "staging";
55474
55474
  const dsn = "https://080f9de535ff335a1a0440d0e385f796@o4510491299086336.ingest.us.sentry.io/4510559045681152";
55475
- const tracesSampleRate = Number(process.env.SENTRY_TRACES_SAMPLE_RATE) || 1;
55476
- const profilesSampleRate = Number(process.env.SENTRY_PROFILES_SAMPLE_RATE) || 0.25;
55475
+ const tracesSampleRate = parseOptionalSampleRate(process.env.SENTRY_TRACES_SAMPLE_RATE);
55476
+ const profilesSampleRate = parseOptionalSampleRate(process.env.SENTRY_PROFILES_SAMPLE_RATE);
55477
55477
  const sentryEnabled = runtimeEnv !== "dev" && true;
55478
55478
  const release = `${name$1}@${version$4}`;
55479
+ const bundledEsmUnsafeSentryIntegrations = /* @__PURE__ */ new Set([
55480
+ "Http",
55481
+ "NodeFetch",
55482
+ "Express",
55483
+ "Fastify",
55484
+ "Graphql",
55485
+ "Hono",
55486
+ "Mongo",
55487
+ "Mongoose",
55488
+ "Mysql",
55489
+ "Mysql2",
55490
+ "Redis",
55491
+ "Postgres",
55492
+ "Prisma",
55493
+ "Hapi",
55494
+ "Koa",
55495
+ "Connect",
55496
+ "Tedious",
55497
+ "GenericPool",
55498
+ "Kafka",
55499
+ "Amqplib",
55500
+ "LruMemoizer",
55501
+ "LangChain",
55502
+ "LangGraph",
55503
+ "VercelAI",
55504
+ "OpenAI",
55505
+ "Anthropic_AI",
55506
+ "Google_GenAI",
55507
+ "PostgresJs",
55508
+ "Firebase"
55509
+ ]);
55479
55510
  if (sentryEnabled) {
55480
- init$2({
55511
+ const options = {
55481
55512
  dsn,
55482
55513
  environment: environment$1,
55483
55514
  release,
55484
55515
  sendDefaultPii: false,
55485
55516
  enableLogs: true,
55486
55517
  attachStacktrace: true,
55487
- tracesSampleRate,
55488
- profilesSampleRate
55489
- });
55518
+ integrations(defaultIntegrations) {
55519
+ return defaultIntegrations.filter((integration) => !bundledEsmUnsafeSentryIntegrations.has(integration.name));
55520
+ }
55521
+ };
55522
+ if (tracesSampleRate !== void 0) {
55523
+ options.tracesSampleRate = tracesSampleRate;
55524
+ }
55525
+ if (tracesSampleRate !== void 0 && profilesSampleRate !== void 0) {
55526
+ options.profilesSampleRate = profilesSampleRate;
55527
+ }
55528
+ init$2(options);
55490
55529
  setTags({
55491
55530
  service: "lody-cli",
55492
55531
  node: process.version
@@ -55526,6 +55565,17 @@ ${tailedOutput}` : null;
55526
55565
  return flushSentry();
55527
55566
  };
55528
55567
  const isSentryEnabled = () => sentryEnabled;
55568
+ function parseOptionalSampleRate(value) {
55569
+ const trimmed = value?.trim();
55570
+ if (!trimmed) {
55571
+ return void 0;
55572
+ }
55573
+ const parsed = Number(trimmed);
55574
+ if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
55575
+ return void 0;
55576
+ }
55577
+ return parsed;
55578
+ }
55529
55579
  var commander$1 = {};
55530
55580
  var argument = {};
55531
55581
  var error$1 = {};
@@ -141780,6 +141830,7 @@ $mem | ConvertTo-Json -Compress
141780
141830
  }
141781
141831
  class WorkerTaskPoolImpl {
141782
141832
  workerSource;
141833
+ workerData;
141783
141834
  workerCount;
141784
141835
  timeoutMs;
141785
141836
  fallbackResult;
@@ -141792,6 +141843,7 @@ $mem | ConvertTo-Json -Compress
141792
141843
  closed = false;
141793
141844
  constructor(options) {
141794
141845
  this.workerSource = options.workerSource;
141846
+ this.workerData = options.workerData;
141795
141847
  this.workerCount = normalizeWorkerCount(options.workerCount, options.defaultWorkerCount, options.maxWorkerCount);
141796
141848
  this.timeoutMs = normalizeTimeoutMs(options.timeoutMs, options.defaultTimeoutMs);
141797
141849
  this.fallbackResult = options.fallbackResult;
@@ -141848,7 +141900,8 @@ $mem | ConvertTo-Json -Compress
141848
141900
  }
141849
141901
  createWorker() {
141850
141902
  return new Worker$1(this.workerSource, {
141851
- eval: true
141903
+ eval: true,
141904
+ workerData: this.workerData
141852
141905
  });
141853
141906
  }
141854
141907
  attachWorkerListeners(slot, worker) {
@@ -142016,7 +142069,7 @@ $mem | ConvertTo-Json -Compress
142016
142069
  };
142017
142070
  }
142018
142071
  const WORKER_SOURCE$3 = String.raw`
142019
- const { parentPort } = require('node:worker_threads');
142072
+ import { parentPort } from 'node:worker_threads';
142020
142073
 
142021
142074
  const MAX_EXACT_LINE_DIFF_CELLS = 1_000_000;
142022
142075
 
@@ -142137,9 +142190,14 @@ function countLongestCommonSubsequenceLength(left, right) {
142137
142190
  `;
142138
142191
  const DEFAULT_INITIAL_TEXT_SNAPSHOT_WORKER_COUNT = 1;
142139
142192
  const DEFAULT_INITIAL_TEXT_SNAPSHOT_TIMEOUT_MS = 2e3;
142193
+ const nodeRequire$2 = createRequire$1(import.meta.url);
142194
+ const loroCrdtModulePath$2 = nodeRequire$2.resolve("loro-crdt");
142140
142195
  function createInitialTextSnapshotWorkerPool(options = {}) {
142141
142196
  const pool = createWorkerTaskPool({
142142
142197
  workerSource: WORKER_SOURCE$2,
142198
+ workerData: {
142199
+ loroCrdtModulePath: loroCrdtModulePath$2
142200
+ },
142143
142201
  workerCount: options.workerCount,
142144
142202
  defaultWorkerCount: DEFAULT_INITIAL_TEXT_SNAPSHOT_WORKER_COUNT,
142145
142203
  timeoutMs: options.timeoutMs,
@@ -142157,8 +142215,11 @@ function countLongestCommonSubsequenceLength(left, right) {
142157
142215
  };
142158
142216
  }
142159
142217
  const WORKER_SOURCE$2 = String.raw`
142160
- const { parentPort } = require('node:worker_threads');
142161
- const { LoroDoc } = require('loro-crdt');
142218
+ import { createRequire } from 'node:module';
142219
+ import { parentPort, workerData } from 'node:worker_threads';
142220
+
142221
+ const nodeRequire = createRequire(import.meta.url);
142222
+ const { LoroDoc } = nodeRequire(workerData.loroCrdtModulePath);
142162
142223
 
142163
142224
  const TEXT_DOC_META_MAP_NAME = 'meta';
142164
142225
  const TEXT_DOC_MATERIALIZED_KEY = 'materialized';
@@ -142252,9 +142313,14 @@ function frontiersToCanonicalJson(frontiers) {
142252
142313
  `;
142253
142314
  const DEFAULT_TEXT_UPDATE_WORKER_COUNT = 1;
142254
142315
  const DEFAULT_TEXT_UPDATE_TIMEOUT_MS = 2e3;
142316
+ const nodeRequire$1 = createRequire$1(import.meta.url);
142317
+ const loroCrdtModulePath$1 = nodeRequire$1.resolve("loro-crdt");
142255
142318
  function createTextUpdateWorkerPool(options = {}) {
142256
142319
  const pool = createWorkerTaskPool({
142257
142320
  workerSource: WORKER_SOURCE$1,
142321
+ workerData: {
142322
+ loroCrdtModulePath: loroCrdtModulePath$1
142323
+ },
142258
142324
  workerCount: options.workerCount,
142259
142325
  defaultWorkerCount: DEFAULT_TEXT_UPDATE_WORKER_COUNT,
142260
142326
  timeoutMs: options.timeoutMs,
@@ -142275,8 +142341,11 @@ function frontiersToCanonicalJson(frontiers) {
142275
142341
  };
142276
142342
  }
142277
142343
  const WORKER_SOURCE$1 = String.raw`
142278
- const { parentPort } = require('node:worker_threads');
142279
- const { LoroDoc } = require('loro-crdt');
142344
+ import { createRequire } from 'node:module';
142345
+ import { parentPort, workerData } from 'node:worker_threads';
142346
+
142347
+ const nodeRequire = createRequire(import.meta.url);
142348
+ const { LoroDoc } = nodeRequire(workerData.loroCrdtModulePath);
142280
142349
 
142281
142350
  const DEFAULT_TEXT_DOCUMENT_UPDATE_TIMEOUT_MS = 50;
142282
142351
 
@@ -142347,9 +142416,14 @@ function isLoroTextUpdateTimeoutError(error) {
142347
142416
  `;
142348
142417
  const DEFAULT_TEXT_FRONTIER_CHECKOUT_WORKER_COUNT = 1;
142349
142418
  const DEFAULT_TEXT_FRONTIER_CHECKOUT_TIMEOUT_MS = 3e3;
142419
+ const nodeRequire = createRequire$1(import.meta.url);
142420
+ const loroCrdtModulePath = nodeRequire.resolve("loro-crdt");
142350
142421
  function createTextFrontierCheckoutWorkerPool(options = {}) {
142351
142422
  const pool = createWorkerTaskPool({
142352
142423
  workerSource: WORKER_SOURCE,
142424
+ workerData: {
142425
+ loroCrdtModulePath
142426
+ },
142353
142427
  workerCount: options.workerCount,
142354
142428
  defaultWorkerCount: DEFAULT_TEXT_FRONTIER_CHECKOUT_WORKER_COUNT,
142355
142429
  timeoutMs: options.timeoutMs,
@@ -142372,8 +142446,11 @@ function isLoroTextUpdateTimeoutError(error) {
142372
142446
  };
142373
142447
  }
142374
142448
  const WORKER_SOURCE = String.raw`
142375
- const { parentPort } = require('node:worker_threads');
142376
- const { LoroDoc } = require('loro-crdt');
142449
+ import { createRequire } from 'node:module';
142450
+ import { parentPort, workerData } from 'node:worker_threads';
142451
+
142452
+ const nodeRequire = createRequire(import.meta.url);
142453
+ const { LoroDoc } = nodeRequire(workerData.loroCrdtModulePath);
142377
142454
 
142378
142455
  parentPort.on('message', (message) => {
142379
142456
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lody",
3
- "version": "0.57.1-next.6",
3
+ "version": "0.57.1-next.7",
4
4
  "description": "Lody Agent CLI tool for managing remote command execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -76,12 +76,12 @@
76
76
  "ws": "^8.18.3",
77
77
  "zod": "^4.1.5",
78
78
  "@lody/cli-supervisor": "0.0.1",
79
- "@lody/code-collab": "0.0.0",
80
- "@lody/code-collab-testkit": "0.0.0",
81
- "@lody/convex": "0.0.1",
82
79
  "@lody/code-session": "0.0.0",
80
+ "@lody/code-collab": "0.0.0",
83
81
  "@lody/loro-streams-rpc": "0.0.1",
84
- "@lody/shared": "0.0.1"
82
+ "@lody/convex": "0.0.1",
83
+ "@lody/shared": "0.0.1",
84
+ "@lody/code-collab-testkit": "0.0.0"
85
85
  },
86
86
  "files": [
87
87
  "dist",