{"record":{"id":"eb2b94acf6d583de","repo":"paperclipai/paperclip","slug":"daytona-interactive-setup-requires-daytonaio-sdk","errorCode":null,"errorMessage":"Daytona interactive setup requires @daytonaio/sdk Sandbox.createSshAccess support.","messagePattern":"Daytona interactive setup requires @daytonaio/sdk Sandbox\\.createSshAccess support\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":604,"sourceCode":"    };\n  }\n  if (sourceKind !== \"snapshot\") {\n    throw new Error(`Daytona interactive setup can start from image or snapshot templates only, not ${sourceKind}.`);\n  }\n  return {\n    ...config,\n    snapshot: params.sourceTemplateRef,\n    image: null,\n  };\n}\n\nasync function createSshConnection(\n  sandbox: Sandbox,\n  expiresInMinutes: number,\n): Promise<Pick<PluginEnvironmentInteractiveSetupSession, \"connectionSummary\" | \"connectionPayload\">> {\n  const createSshAccess = (sandbox as DaytonaInteractiveSandbox).createSshAccess;\n  if (typeof createSshAccess !== \"function\") {\n    throw new Error(\n      \"Daytona interactive setup requires @daytonaio/sdk Sandbox.createSshAccess support.\",\n    );\n  }\n\n  const fallbackExpiresAt = expiresAtForMinutes(expiresInMinutes);\n  const access = await createSshAccess.call(sandbox, expiresInMinutes);\n  const token = typeof access.token === \"string\" && access.token.trim().length > 0\n    ? access.token.trim()\n    : null;\n  const commandFromAccess =\n    typeof access.command === \"string\" && access.command.trim().length > 0\n      ? access.command.trim()\n      : typeof access.sshCommand === \"string\" && access.sshCommand.trim().length > 0\n        ? access.sshCommand.trim()\n        : null;\n  const command = commandFromAccess ?? (token ? `ssh ${token}@${DAYTONA_SSH_GATEWAY_HOST}` : null);\n  if (!command) {\n    throw new Error(\"Daytona SSH access did not return a token or SSH command.\");","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L586-L622","documentation":"Thrown by createSshConnection when the Daytona SDK Sandbox object does not expose a createSshAccess function. Interactive setup SSH sessions depend on @daytonaio/sdk's Sandbox.createSshAccess support; if the installed SDK version lacks it, the feature cannot proceed.","triggerScenarios":"onEnvironmentStartInteractiveSetup reaches createSshConnection and (sandbox as DaytonaInteractiveSandbox).createSshAccess is not a function — typically because the installed @daytonaio/sdk version predates the SSH access API.","commonSituations":"Upgraded the Paperclip plugin but @daytonaio/sdk dependency is pinned to an older version; SDK major version change removed/renamed createSshAccess; using a forked/custom SDK build without the SSH method.","solutions":["Upgrade @daytonaio/sdk to a version that exposes Sandbox.createSshAccess (check the SDK changelog).","Run `pnpm update @daytonaio/sdk` (or the workspace-specific install) and restart.","Confirm the resolved SDK version in package-lock/pnpm-lock and that no override pins an older one.","If upgrade is blocked, avoid the interactive SSH setup flow until the SDK is updated."],"exampleFix":"// before: @daytonaio/sdk pinned to old version\n\"@daytonaio/sdk\": \"^0.20.0\"\n// after: version with createSshAccess\n\"@daytonaio/sdk\": \"^0.40.0\"","handlingStrategy":"type-guard","validationCode":"import type { Sandbox } from '@daytonaio/sdk';\nfunction supportsCreateSshAccess(s: Sandbox): boolean {\n  return typeof (s as unknown as { createSshAccess?: unknown }).createSshAccess === 'function';\n}","typeGuard":"function hasCreateSshAccess(s: unknown): s is { createSshAccess: (mins: number) => Promise<{ token?: string; command?: string; sshCommand?: string; expiresAt?: string }> } {\n  return typeof (s as { createSshAccess?: unknown }).createSshAccess === 'function';\n}","tryCatchPattern":null,"preventionTips":["Keep @daytonaio/sdk at or above the version that exposes Sandbox.createSshAccess.","Feature-detect createSshAccess before offering the interactive SSH setup flow."],"tags":["daytona","interactive-setup","ssh","sdk-version","dependency"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}