@probelabs/probe 0.6.0-rc170 → 0.6.0-rc171

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.
@@ -3438,7 +3438,7 @@ async function delegate({
3438
3438
  const sessionId = randomUUID();
3439
3439
  const startTime = Date.now();
3440
3440
  const remainingIterations = Math.max(1, maxIterations - currentIteration);
3441
- const delegationSpan = tracer ? tracer.createDelegationSpan(sessionId, task) : null;
3441
+ const delegationSpan = typeof tracer?.createDelegationSpan === "function" ? tracer.createDelegationSpan(sessionId, task) : null;
3442
3442
  let timeoutId = null;
3443
3443
  let acquired = false;
3444
3444
  try {
package/build/delegate.js CHANGED
@@ -200,8 +200,10 @@ export async function delegate({
200
200
  // Calculate remaining iterations for subagent
201
201
  const remainingIterations = Math.max(1, maxIterations - currentIteration);
202
202
 
203
- // Create delegation span for telemetry if tracer is available
204
- const delegationSpan = tracer ? tracer.createDelegationSpan(sessionId, task) : null;
203
+ // Create delegation span for telemetry if tracer is available and has the method
204
+ const delegationSpan = typeof tracer?.createDelegationSpan === 'function'
205
+ ? tracer.createDelegationSpan(sessionId, task)
206
+ : null;
205
207
 
206
208
  let timeoutId = null;
207
209
  let acquired = false;
@@ -29538,7 +29538,7 @@ async function delegate({
29538
29538
  const sessionId = (0, import_crypto2.randomUUID)();
29539
29539
  const startTime = Date.now();
29540
29540
  const remainingIterations = Math.max(1, maxIterations - currentIteration);
29541
- const delegationSpan = tracer ? tracer.createDelegationSpan(sessionId, task) : null;
29541
+ const delegationSpan = typeof tracer?.createDelegationSpan === "function" ? tracer.createDelegationSpan(sessionId, task) : null;
29542
29542
  let timeoutId = null;
29543
29543
  let acquired = false;
29544
29544
  try {
package/cjs/index.cjs CHANGED
@@ -85444,7 +85444,7 @@ async function delegate({
85444
85444
  const sessionId = (0, import_crypto8.randomUUID)();
85445
85445
  const startTime = Date.now();
85446
85446
  const remainingIterations = Math.max(1, maxIterations - currentIteration);
85447
- const delegationSpan = tracer ? tracer.createDelegationSpan(sessionId, task) : null;
85447
+ const delegationSpan = typeof tracer?.createDelegationSpan === "function" ? tracer.createDelegationSpan(sessionId, task) : null;
85448
85448
  let timeoutId = null;
85449
85449
  let acquired = false;
85450
85450
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc170",
3
+ "version": "0.6.0-rc171",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
package/src/delegate.js CHANGED
@@ -200,8 +200,10 @@ export async function delegate({
200
200
  // Calculate remaining iterations for subagent
201
201
  const remainingIterations = Math.max(1, maxIterations - currentIteration);
202
202
 
203
- // Create delegation span for telemetry if tracer is available
204
- const delegationSpan = tracer ? tracer.createDelegationSpan(sessionId, task) : null;
203
+ // Create delegation span for telemetry if tracer is available and has the method
204
+ const delegationSpan = typeof tracer?.createDelegationSpan === 'function'
205
+ ? tracer.createDelegationSpan(sessionId, task)
206
+ : null;
205
207
 
206
208
  let timeoutId = null;
207
209
  let acquired = false;