spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / tests / fixtures / wire / batch-of.ts
12 lines · 346 BRaw
1import type { Args } from 'claude-code'
2
3import type { IngestBatch } from './ingest-batch.js'
4
5/**
6 * The batch a post to the ingest carries, as it was sent.
7 *
8 * @param post the `http.fetch` the plugin made
9 * @returns the body, parsed
10 */
11export const batchOf = (post: Args<'http.fetch'>): IngestBatch =>
12 JSON.parse(String(post.init?.body))