Skip to content

Interface: ClaudeAccountSeatBuilder ​

Defined in: claude/src/builders/claude-account-seat-builder.ts:9

Fluent builder for constructing a passive ClaudeAccountSeatNode (type: 'claude:account-seat').

Configures either a Claude CLI subscription seat backed by an OAuth configDir or an API key seat resolved late via P.env(key) at turn execution time without import-time I/O.

Extends ​

Methods ​

apiKey() ​

ts
apiKey(envOrKey): ClaudeAccountSeatBuilder;

Defined in: claude/src/builders/claude-account-seat-builder.ts:37

Binds a literal API key or symbolic P.env(key) reference for Anthropic API authentication.

Returns a new immutable builder instance that resolves the key only at leaf turn invocation time.

Parameters ​

ParameterTypeDescription
envOrKeystring | EnvRefSymbolic EnvRef or literal API key string.

Returns ​

ClaudeAccountSeatBuilder

New immutable account seat builder with apiKey configured.

Throws ​

If envOrKey is an empty or whitespace-only string.


configDir() ​

ts
configDir(path): ClaudeAccountSeatBuilder;

Defined in: claude/src/builders/claude-account-seat-builder.ts:24

Binds a filesystem path to a Claude CLI configuration directory containing OAuth credentials.

Returns a new immutable builder instance with configDir set while leaving the receiver unchanged.

Parameters ​

ParameterTypeDescription
pathstringPath to the Claude CLI directory (such as '~/.claude-a').

Returns ​

ClaudeAccountSeatBuilder

New immutable account seat builder with configDir configured.

Throws ​

If path is empty or whitespace-only.


toAST() ​

ts
toAST(): ClaudeAccountSeatNode;

Defined in: claude/src/builders/claude-account-seat-builder.ts:46

Compiles the builder configuration into a deeply frozen passive ClaudeAccountSeatNode AST node.

Preserves a monomorphic property shape with type: 'claude:account-seat' and zero runtime methods.

Returns ​

ClaudeAccountSeatNode

Frozen passive AST node representing the Claude account seat.

Overrides ​

AstBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringUnique identifier of the Claude account seat within capacity pools.claude/src/builders/claude-account-seat-builder.ts:11

Released under the MIT License.