diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index c9b782d82..f9062bbeb 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -19,8 +19,13 @@ export interface SpawnPtyInput { restartPolicy?: RestartPolicy; continueFrom?: string; skipRelayPrompt?: boolean; - /** JWT token for relayauth/relayfile permissions. When set, the broker - * injects RELAY_AGENT_TOKEN into the agent's environment. */ + /** Optional pre-minted relaycast agent token (`at_live_`, from + * `registerAgent(workspaceKey, name)` in `@agent-relay/sdk/http`). The + * broker plumbs this as `RELAY_AGENT_TOKEN`, which the relaycast MCP + * authenticates with. When omitted, the relaycast MCP auto-mints a token + * using `RELAY_API_KEY` + the spawn name; that is the recommended path. + * Note: this is a relaycast credential, NOT a relayfile/relayauth token — + * override `env.RELAYFILE_TOKEN` on the constructor for relayfile auth. */ agentToken?: string; } @@ -31,8 +36,13 @@ export interface SpawnHeadlessInput { channels?: string[]; task?: string; skipRelayPrompt?: boolean; - /** JWT token for relayauth/relayfile permissions. When set, the broker - * injects RELAY_AGENT_TOKEN into the agent's environment. */ + /** Optional pre-minted relaycast agent token (`at_live_`, from + * `registerAgent(workspaceKey, name)` in `@agent-relay/sdk/http`). The + * broker plumbs this as `RELAY_AGENT_TOKEN`, which the relaycast MCP + * authenticates with. When omitted, the relaycast MCP auto-mints a token + * using `RELAY_API_KEY` + the spawn name; that is the recommended path. + * Note: this is a relaycast credential, NOT a relayfile/relayauth token — + * override `env.RELAYFILE_TOKEN` on the constructor for relayfile auth. */ agentToken?: string; } @@ -54,8 +64,13 @@ export interface SpawnProviderInput { restartPolicy?: RestartPolicy; continueFrom?: string; skipRelayPrompt?: boolean; - /** JWT token for relayauth/relayfile permissions. When set, the broker - * injects RELAY_AGENT_TOKEN into the agent's environment. */ + /** Optional pre-minted relaycast agent token (`at_live_`, from + * `registerAgent(workspaceKey, name)` in `@agent-relay/sdk/http`). The + * broker plumbs this as `RELAY_AGENT_TOKEN`, which the relaycast MCP + * authenticates with. When omitted, the relaycast MCP auto-mints a token + * using `RELAY_API_KEY` + the spawn name; that is the recommended path. + * Note: this is a relaycast credential, NOT a relayfile/relayauth token — + * override `env.RELAYFILE_TOKEN` on the constructor for relayfile auth. */ agentToken?: string; }