{"record":{"id":"2aacc64731f3bc67","repo":"paperclipai/paperclip","slug":"daytona-interactive-setup-can-start-from-image-or","errorCode":null,"errorMessage":"Daytona interactive setup can start from image or snapshot templates only, not ${sourceKind}.","messagePattern":"Daytona interactive setup can start from image or snapshot templates only, not (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":589,"sourceCode":"    .slice(0, 96);\n  return cleaned || fallback;\n}\n\nfunction withSetupSourceTemplate(\n  config: DaytonaDriverConfig,\n  params: Pick<PluginEnvironmentStartInteractiveSetupParams, \"sourceTemplateRef\" | \"sourceTemplateKind\">,\n): DaytonaDriverConfig {\n  if (!params.sourceTemplateRef) return config;\n  const sourceKind = params.sourceTemplateKind ?? \"snapshot\";\n  if (sourceKind === \"image\") {\n    return {\n      ...config,\n      image: params.sourceTemplateRef,\n      snapshot: null,\n    };\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  }","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L571-L607","documentation":"Thrown by applyInteractiveSetupSourceTemplate when sourceTemplateKind is neither 'image' nor 'snapshot' (defaults to 'snapshot' when omitted). Daytona interactive setup can only start from an image reference or a snapshot reference.","triggerScenarios":"onEnvironmentStartInteractiveSetup is called with sourceTemplateRef set and sourceTemplateKind being some value other than 'image' or 'snapshot' (e.g. a typo, an unsupported kind, or an empty string).","commonSituations":"Caller passes a template kind the Daytona driver does not support; upstream code passes a generic kind like 'docker' or 'container'; sourceTemplateKind defaulted unexpectedly because the caller omitted it but supplied a ref of a different kind.","solutions":["Set sourceTemplateKind to either 'image' (to use an image ref) or 'snapshot' (the default, to use a snapshot ref).","If using an image, provide sourceTemplateRef as the image identifier; for snapshot, provide the snapshot identifier.","Omit sourceTemplateKind entirely if you mean 'snapshot' (the default)."],"exampleFix":"// before: unsupported kind\nparams.sourceTemplateKind = 'container'\n// after: valid kind\nparams.sourceTemplateKind = 'image' // or 'snapshot'","handlingStrategy":"validation","validationCode":"const ALLOWED_TEMPLATE_KINDS = new Set(['image', 'snapshot']);\nfunction isValidTemplateKind(kind: string | undefined): boolean {\n  return kind === undefined || ALLOWED_TEMPLATE_KINDS.has(kind);\n}","typeGuard":"function isDaytonaTemplateKind(v: string): v is 'image' | 'snapshot' {\n  return v === 'image' || v === 'snapshot';\n}","tryCatchPattern":null,"preventionTips":["Only pass sourceTemplateKind values 'image' or 'snapshot' (or omit it for the default 'snapshot').","Validate template kind at the caller boundary before invoking interactive setup."],"tags":["daytona","interactive-setup","template","validation"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}