Documentation
¶
Index ¶
- type AccountGetQuotaResult
- type AccountRpcApi
- type Billing
- type Capabilities
- type Limits
- type Model
- type ModelRpcApi
- type ModelsListResult
- type ModelsRpcApi
- type PingParams
- type PingResult
- type Policy
- type QuotaSnapshot
- type ServerRpc
- type SessionModelGetCurrentResult
- type SessionModelSwitchToParams
- type SessionModelSwitchToResult
- type SessionRpc
- type Supports
- type Tool
- type ToolsListParams
- type ToolsListResult
- type ToolsRpcApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountGetQuotaResult ¶
type AccountGetQuotaResult struct {
// Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
QuotaSnapshots map[string]QuotaSnapshot `json:"quotaSnapshots"`
}
type AccountRpcApi ¶
type AccountRpcApi struct {
// contains filtered or unexported fields
}
func (*AccountRpcApi) GetQuota ¶
func (a *AccountRpcApi) GetQuota(ctx context.Context) (*AccountGetQuotaResult, error)
type Capabilities ¶
Model capabilities and limits
type Model ¶
type Model struct {
// Billing information
Billing *Billing `json:"billing,omitempty"`
// Model capabilities and limits
Capabilities Capabilities `json:"capabilities"`
// Default reasoning effort level (only present if model supports reasoning effort)
DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"`
// Model identifier (e.g., "claude-sonnet-4.5")
ID string `json:"id"`
// Display name
Name string `json:"name"`
// Policy state (if applicable)
Policy *Policy `json:"policy,omitempty"`
// Supported reasoning effort levels (only present if model supports reasoning effort)
SupportedReasoningEfforts []string `json:"supportedReasoningEfforts,omitempty"`
}
type ModelRpcApi ¶
type ModelRpcApi struct {
// contains filtered or unexported fields
}
func (*ModelRpcApi) GetCurrent ¶
func (a *ModelRpcApi) GetCurrent(ctx context.Context) (*SessionModelGetCurrentResult, error)
func (*ModelRpcApi) SwitchTo ¶
func (a *ModelRpcApi) SwitchTo(ctx context.Context, params *SessionModelSwitchToParams) (*SessionModelSwitchToResult, error)
type ModelsListResult ¶
type ModelsListResult struct {
// List of available models with full metadata
Models []Model `json:"models"`
}
type ModelsRpcApi ¶
type ModelsRpcApi struct {
// contains filtered or unexported fields
}
func (*ModelsRpcApi) List ¶
func (a *ModelsRpcApi) List(ctx context.Context) (*ModelsListResult, error)
type PingParams ¶
type PingParams struct {
// Optional message to echo back
Message *string `json:"message,omitempty"`
}
type PingResult ¶
type QuotaSnapshot ¶
type QuotaSnapshot struct {
// Number of requests included in the entitlement
EntitlementRequests float64 `json:"entitlementRequests"`
// Number of overage requests made this period
Overage float64 `json:"overage"`
// Whether pay-per-request usage is allowed when quota is exhausted
OverageAllowedWithExhaustedQuota bool `json:"overageAllowedWithExhaustedQuota"`
// Percentage of entitlement remaining
RemainingPercentage float64 `json:"remainingPercentage"`
// Date when the quota resets (ISO 8601)
ResetDate *string `json:"resetDate,omitempty"`
// Number of requests used so far this period
UsedRequests float64 `json:"usedRequests"`
}
type ServerRpc ¶
type ServerRpc struct {
Models *ModelsRpcApi
Tools *ToolsRpcApi
Account *AccountRpcApi
// contains filtered or unexported fields
}
ServerRpc provides typed server-scoped RPC methods.
func NewServerRpc ¶
func (*ServerRpc) Ping ¶
func (a *ServerRpc) Ping(ctx context.Context, params *PingParams) (*PingResult, error)
type SessionModelGetCurrentResult ¶
type SessionModelGetCurrentResult struct {
ModelID *string `json:"modelId,omitempty"`
}
type SessionModelSwitchToParams ¶
type SessionModelSwitchToParams struct {
ModelID string `json:"modelId"`
}
type SessionModelSwitchToResult ¶
type SessionModelSwitchToResult struct {
ModelID *string `json:"modelId,omitempty"`
}
type SessionRpc ¶
type SessionRpc struct {
Model *ModelRpcApi
// contains filtered or unexported fields
}
SessionRpc provides typed session-scoped RPC methods.
func NewSessionRpc ¶
func NewSessionRpc(client *jsonrpc2.Client, sessionID string) *SessionRpc
type Tool ¶
type Tool struct {
// Description of what the tool does
Description string `json:"description"`
// Optional instructions for how to use this tool effectively
Instructions *string `json:"instructions,omitempty"`
// Tool identifier (e.g., "bash", "grep", "str_replace_editor")
Name string `json:"name"`
// Optional namespaced name for declarative filtering (e.g., "playwright/navigate" for MCP
// tools)
NamespacedName *string `json:"namespacedName,omitempty"`
// JSON Schema for the tool's input parameters
Parameters map[string]interface{} `json:"parameters,omitempty"`
}
type ToolsListParams ¶
type ToolsListParams struct {
// Optional model ID — when provided, the returned tool list reflects model-specific
// overrides
Model *string `json:"model,omitempty"`
}
type ToolsListResult ¶
type ToolsListResult struct {
// List of available built-in tools with metadata
Tools []Tool `json:"tools"`
}
type ToolsRpcApi ¶
type ToolsRpcApi struct {
// contains filtered or unexported fields
}
func (*ToolsRpcApi) List ¶
func (a *ToolsRpcApi) List(ctx context.Context, params *ToolsListParams) (*ToolsListResult, error)
Click to show internal directories.
Click to hide internal directories.