{"record":{"id":"c83ae5a7355b5355","repo":"deepseek-ai/deepseek-harness","slug":"type-must-be-a-non-empty-string","errorCode":null,"errorMessage":"type must be a non-empty string","messagePattern":"type must be a non-empty string","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/terminal/tool-terminal/src/index.ts","lineNumber":183,"sourceCode":"    parameters: {\n      type: { type: 'string', required: true, description: 'Registered terminal backend type, usually \"shell\".' },\n      name: { type: 'string', description: 'Optional owner-local display name such as \"main\" or \"gdb\".' },\n      cwd: { type: 'string', description: 'Initial working directory. Defaults to the deployment workspace root.' },\n    },\n    finalizeContent,\n    output: {\n      schema: {\n        type: 'object',\n        additionalProperties: false,\n        properties: {\n          ...SESSION_SNAPSHOT_PROPERTIES,\n          motd: { type: 'string', required: true },\n        },\n      },\n      render: (_args, value) => [{ type: 'text', text: renderSpawn(value, maxResultBytes) }],\n    },\n    async execute(args: SpawnArgs, exec) {\n      if (args.type.length === 0) throw new Error('type must be a non-empty string')\n      const result = await ctx.terminals.spawn(requireAgent(exec.agent), {\n        type: args.type,\n        ...args.name !== undefined ? { name: args.name } : {},\n        ...args.cwd !== undefined ? { cwd: args.cwd } : {},\n      }, exec.signal)\n      return result\n    },\n    presentCall: (args) => {\n      const parsed = args\n      return { card: 'generic', title: `Open terminal ${parsed.name ?? parsed.type}`, kind: 'execute' }\n    },\n  }))\n\n  ctx.tools.register(defineTool({\n    name: 'terminal_send',\n    description: 'Send text to a persistent terminal. By default Enter is submitted and the call waits for a prompt, stdin wait, output silence, timeout, or session exit.'\n      + (enableRunInBackground ? ' Background mode returns a job id for job_output/job_kill.' : ''),\n    parameters: {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/terminal/tool-terminal/src/index.ts#L165-L201","documentation":"Error \"type must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/terminal/tool-terminal/src/index.ts:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty type string."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}