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 / gate / next-of.ts
13 lines · 467 BRaw
1import type { Tier } from 'claude-code'
2
3/**
4 * A continuation as the gate is handed it: answers `served` when gone on
5 * to, stamped with a caller in the tier given, or with no origin at all.
6 *
7 * @param tier the caller's tier; undefined for a call that names no origin
8 * @returns the continuation
9 */
10export const nextOf = (tier: Tier | undefined) =>
11 Object.assign(() => 'served', {
12 origin: tier === undefined ? undefined : { plugin: 'caller', tier },
13 })