Skip to content

Interface: ClaudeNamespace ​

Defined in: claude/src/builders/claude-namespace-contract.ts:11

Builder namespace contract exported as claude by @paraharness/claude.

Provides entrypoints for declaring passive ClaudeAccountSeatNode and ClaudeModelNode AST descriptors without import-time or declaration-time side effects.

Methods ​

account() ​

ts
account(id): ClaudeAccountSeatBuilder;

Defined in: claude/src/builders/claude-namespace-contract.ts:36

Declares a Claude account seat (type: 'claude:account-seat').

Alias for cliAccount(id) supporting both .apiKey(envRef) and .configDir(path) configurations.

Parameters ​

ParameterTypeDescription
idstringUnique identifier for the Claude account seat.

Returns ​

ClaudeAccountSeatBuilder

Fluent builder for the Claude account seat.

Throws ​

If id is empty or whitespace-only.


cliAccount() ​

ts
cliAccount(id): ClaudeAccountSeatBuilder;

Defined in: claude/src/builders/claude-namespace-contract.ts:23

Declares a Claude CLI subscription or API fallback seat (type: 'claude:account-seat').

Supports .configDir(path) for OAuth credential extraction and .apiKey(envRef) for API key fallback.

Parameters ​

ParameterTypeDescription
idstringUnique identifier for the Claude account seat.

Returns ​

ClaudeAccountSeatBuilder

Fluent builder for the Claude account seat.

Throws ​

If id is empty or whitespace-only.


model() ​

ts
model(alias, options?): ClaudeModelBuilder;

Defined in: claude/src/builders/claude-namespace-contract.ts:50

Declares an Anthropic Claude model configuration (type: 'claude:model', vendor: 'anthropic').

Supports .accountPool(pool) / .pool(pool) and .effort(level) before compiling to ClaudeModelNode.

Parameters ​

ParameterTypeDescription
aliasstringLogical model alias (such as 'sonnet' or 'claude-sonnet-4-6').
options?ClaudeModelOptionsOptional Anthropic model identifier (defaults to alias) and thinking effort.

Returns ​

ClaudeModelBuilder

Fluent builder for the Claude model node.

Throws ​

If alias or options.id is empty or whitespace-only.

Released under the MIT License.