deepline 0.1.262 → 0.1.264

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.
@@ -1402,6 +1402,7 @@ export class DeeplineClient {
1402
1402
  */
1403
1403
  async listTools(options?: {
1404
1404
  categories?: string;
1405
+ tags?: string;
1405
1406
  grep?: string;
1406
1407
  grepMode?: 'all' | 'any' | 'phrase';
1407
1408
  compact?: boolean;
@@ -1410,6 +1411,9 @@ export class DeeplineClient {
1410
1411
  if (options?.categories?.trim()) {
1411
1412
  params.set('categories', options.categories.trim());
1412
1413
  }
1414
+ if (options?.tags?.trim()) {
1415
+ params.set('tags', options.tags.trim());
1416
+ }
1413
1417
  if (options?.grep?.trim()) {
1414
1418
  params.set('grep', options.grep.trim());
1415
1419
  params.set('grep_mode', options.grepMode ?? 'all');
@@ -123,8 +123,10 @@ export const SDK_RELEASE = {
123
123
  // Deepline-native radars. Older clients must update before discovering,
124
124
  // checking, or deploying an unlaunched monitor integration.
125
125
  // 0.1.253 makes play-page browser opening opt-in and retires --no-open.
126
- version: '0.1.262',
127
- apiContract: '2026-07-native-monitor-launch-hard-cutover',
126
+ // 0.1.254 removes the internal operations tree from the published SDK CLI.
127
+ // Operators use the checkout-local deepline-admin binary instead.
128
+ version: '0.1.264',
129
+ apiContract: '2026-07-admin-cli-local-cutover',
128
130
  supportPolicy: {
129
131
  minimumSupported: '0.1.53',
130
132
  deprecatedBelow: '0.1.219',
@@ -151,6 +151,8 @@ export interface ToolDefinition {
151
151
  description: string;
152
152
  /** Categorization tags (e.g. `["people", "enrichment"]`). */
153
153
  categories: DeeplineToolCategory[];
154
+ /** Searchable provider and account-signal tags. */
155
+ tags?: string[];
154
156
  /** Operation slug within the provider. */
155
157
  operation?: string;
156
158
  /** Normalized operation identifier. */
@@ -1,5 +1,6 @@
1
1
  import { isHardBillingToolHttpError } from './tool-http-errors';
2
2
  import { isRuntimePersistenceCircuitOpenError } from './persistence-latch';
3
+ import { isWorkspaceStorageNotReadyFailure } from './run-failure';
3
4
 
4
5
  /**
5
6
  * Thrown by runner Adapters when a Play Run is externally cancelled. Row
@@ -41,6 +42,7 @@ export function isRowIsolationExemptError(error: unknown): boolean {
41
42
  if (isRuntimeReceiptPersistenceError(error)) return true;
42
43
  if (isRuntimeStoragePersistenceError(error)) return true;
43
44
  if (isRuntimePersistenceCircuitOpenError(error)) return true;
45
+ if (isWorkspaceStorageNotReadyFailure(error)) return true;
44
46
  return isHardBillingToolHttpError(error);
45
47
  }
46
48
 
@@ -59,6 +59,24 @@ export class WorkspaceStorageNotReadyError extends Error {
59
59
  }
60
60
  }
61
61
 
62
+ export function isWorkspaceStorageNotReadyFailure(error: unknown): boolean {
63
+ if (error instanceof WorkspaceStorageNotReadyError) return true;
64
+ if (!error) return false;
65
+ if (typeof error === 'object') {
66
+ const code = (error as { code?: unknown }).code;
67
+ if (code === WORKSPACE_STORAGE_NOT_READY_CODE) return true;
68
+ const nestedErrors = (error as { errors?: unknown }).errors;
69
+ if (
70
+ Array.isArray(nestedErrors) &&
71
+ nestedErrors.some(isWorkspaceStorageNotReadyFailure)
72
+ ) {
73
+ return true;
74
+ }
75
+ }
76
+ const message = error instanceof Error ? error.message : String(error);
77
+ return /\bWORKSPACE_STORAGE_NOT_READY\b/.test(message);
78
+ }
79
+
62
80
  export const PROVIDER_EXHAUSTED_CODE = 'PROVIDER_EXHAUSTED';
63
81
 
64
82
  /**
@@ -331,7 +349,7 @@ export function normalizePlayRunFailure(error: unknown): PlayRunFailureDetails {
331
349
  };
332
350
  }
333
351
  if (
334
- error instanceof WorkspaceStorageNotReadyError ||
352
+ isWorkspaceStorageNotReadyFailure(error) ||
335
353
  /\bWORKSPACE_STORAGE_NOT_READY\b/.test(rawCause)
336
354
  ) {
337
355
  return {
@@ -490,6 +490,25 @@ function isRetryableDaytonaInfrastructureFailure(error: unknown): boolean {
490
490
  return DAYTONA_INFRASTRUCTURE_RETRY_PATTERN.test(message);
491
491
  }
492
492
 
493
+ function isRetryableUnstartedDaytonaRunner(
494
+ error: unknown,
495
+ ): error is DaytonaRunnerInitializationError {
496
+ if (!(error instanceof DaytonaRunnerInitializationError)) return false;
497
+ const diagnostic = error.startupDiagnostic;
498
+ // The sandbox runner cannot execute customer code until the worker observes
499
+ // its heartbeat, parks the scheduler attempt, and the gateway acknowledges
500
+ // that waiting state. If no heartbeat was observed and Daytona has no exit
501
+ // evidence, deleting this fenced sandbox and retrying once cannot duplicate
502
+ // customer side effects.
503
+ return (
504
+ diagnostic.commandFound &&
505
+ diagnostic.sessionFound &&
506
+ diagnostic.exitCode === null &&
507
+ diagnostic.exitCodeFile === null &&
508
+ !diagnostic.schedulerReadinessObserved
509
+ );
510
+ }
511
+
493
512
  function prepareDaytonaExecution(
494
513
  input: PlayRunnerPrepareInput,
495
514
  callbacks: Parameters<PlayRunnerBackend['execute']>[1],
@@ -930,14 +949,19 @@ export const daytonaPlayRunnerBackend: PlayRunnerBackend = {
930
949
  onCancel();
931
950
  throw new Error(DAYTONA_CANCELLED_ERROR);
932
951
  }
952
+ const retryReason = isRetryableUnstartedDaytonaRunner(error)
953
+ ? 'runner_startup_not_live'
954
+ : isRetryableDaytonaInfrastructureFailure(error)
955
+ ? 'daytona_infrastructure'
956
+ : null;
933
957
  if (
934
958
  executionAttempt < DAYTONA_INFRASTRUCTURE_MAX_ATTEMPTS &&
935
- isRetryableDaytonaInfrastructureFailure(error)
959
+ retryReason
936
960
  ) {
937
961
  emitDaytonaStage(callbacks, config.context, 'execute:retry', {
938
962
  sandboxId: sandboxForAttempt?.id ?? null,
939
963
  attempt: executionAttempt + 1,
940
- reason: 'daytona_infrastructure',
964
+ reason: retryReason,
941
965
  error: error instanceof Error ? error.message : String(error),
942
966
  elapsedMs: Date.now() - startedAt,
943
967
  });
@@ -2,6 +2,15 @@ export function transientServiceUnavailableDetail(
2
2
  error: unknown,
3
3
  ): string | null {
4
4
  const detail = error instanceof Error ? error.message : String(error);
5
+ // The Convex HTTP client surfaces socket/DNS interruptions as the native
6
+ // Undici `TypeError: fetch failed`, without an HTTP envelope. Callers only
7
+ // use this classifier where replay is explicitly safe (for example, reads).
8
+ if (
9
+ error instanceof TypeError &&
10
+ /^fetch failed$/i.test(detail.trim())
11
+ ) {
12
+ return detail;
13
+ }
5
14
  // Convex uses both an explicit ServiceUnavailable response and this generic
6
15
  // InternalServerError envelope for short control-plane outages. The latter
7
16
  // text is intentionally exact: application exceptions must not become